Skip to content

)} ,System.String)}

ServiceLocator.AddService(Func) method

Defined in

Type: ServiceLocator Namespace: ReactiveMarbles.Locator Assembly: ReactiveMarbles.Locator.dll

Applies to

net8.0, net8.0-ios17.5, net8.0-maccatalyst17.5, net8.0-macos14.2, net8.0-macos14.5, net8.0-tvos17.2, netstandard2.0

Overloads

  • 1. public void AddService<T>(Func<T> instanceFactory)
  • 2. public void AddService<T>(Func<T> instanceFactory, string contract)

1. Overload

public void AddService<T>(Func<T> instanceFactory)

View source

Inherited documentation

These docs were inherited from IEditServices. The member doesn't override them on this type.

Summary: Adds the service.

Type parameters

NameDescription
T--

Parameters

NameTypeDescription
instanceFactoryFuncThe instance factory.

2. Overload

public void AddService<T>(Func<T> instanceFactory, string contract)

View source

Inherited documentation

These docs were inherited from IEditServices. The member doesn't override them on this type.

Summary: Adds the service.

Type parameters

NameDescription
T--

Parameters

NameTypeDescription
instanceFactoryFuncThe instance factory.
contractstringThe contract.