Beamable SDK
Public Member Functions | List of all members
Beamable.Common.Dependencies.IDependencyBuilder Interface Reference

The IDependencyBuilder is part of the Beamable dependency injection system. It is used to describe a set of services that will exist, but the builder never actually creates any service instance. More...

Inheritance diagram for Beamable.Common.Dependencies.IDependencyBuilder:
Inheritance graph
[legend]

Public Member Functions

IDependencyBuilder AddTransient< TInterface, TImpl > (Func< IDependencyProvider, TInterface > factory)
 Add a transient service to the IDependencyBuilder. A transient service will be re-instantiated everytime it is requested from IDependencyProvider.GetService. More...
 
IDependencyBuilder AddTransient< TInterface, TImpl > (Func< TInterface > factory)
 Add a transient service to the IDependencyBuilder. A transient service will be re-instantiated everytime it is requested from IDependencyProvider.GetService. More...
 
IDependencyBuilder AddTransient< TInterface, TImpl > ()
 Add a transient service to the IDependencyBuilder. A transient service will be re-instantiated everytime it is requested from IDependencyProvider.GetService. More...
 
IDependencyBuilder AddTransient< T > (Func< IDependencyProvider, T > factory)
 Add a transient service to the IDependencyBuilder. A transient service will be re-instantiated everytime it is requested from IDependencyProvider.GetService. More...
 
IDependencyBuilder AddTransient< T > (Func< T > factory)
 Add a transient service to the IDependencyBuilder. A transient service will be re-instantiated everytime it is requested from IDependencyProvider.GetService. More...
 
IDependencyBuilder AddTransient< T > ()
 Add a transient service to the IDependencyBuilder. A transient service will be re-instantiated everytime it is requested from IDependencyProvider.GetService. More...
 
IDependencyBuilder AddScoped< TInterface, TImpl > (Func< IDependencyProvider, TInterface > factory)
 Add a scoped service to the IDependencyBuilder. More...
 
IDependencyBuilder AddScoped< TInterface, TImpl > (Func< TInterface > factory)
 Add a transient service to the IDependencyBuilder. More...
 
IDependencyBuilder AddScoped< TInterface, TImpl > (TInterface service)
 Add a transient service to the IDependencyBuilder. More...
 
IDependencyBuilder AddScoped< TInterface, TImpl > ()
 Add a transient service to the IDependencyBuilder. More...
 
IDependencyBuilder AddScoped< T > (Func< IDependencyProvider, T > factory)
 Add a transient service to the IDependencyBuilder. More...
 
IDependencyBuilder AddScoped< T > (Func< T > factory)
 Add a transient service to the IDependencyBuilder. More...
 
IDependencyBuilder AddScoped< T > (T service)
 Add a transient service to the IDependencyBuilder. More...
 
IDependencyBuilder AddScoped< T > ()
 Add a transient service to the IDependencyBuilder. More...
 
IDependencyBuilder AddSingleton< TInterface, TImpl > (Func< IDependencyProvider, TInterface > factory)
 Add a singleton service to the IDependencyBuilder. More...
 
IDependencyBuilder AddSingleton< TInterface, TImpl > (Func< TInterface > factory)
 Add a singleton service to the IDependencyBuilder. More...
 
IDependencyBuilder AddSingleton< TInterface, TImpl > (TInterface service)
 Add a singleton service to the IDependencyBuilder. More...
 
IDependencyBuilder AddSingleton< TInterface, TImpl > ()
 Add a singleton service to the IDependencyBuilder. More...
 
IDependencyBuilder AddSingleton< T > (Func< IDependencyProvider, T > factory)
 Add a singleton service to the IDependencyBuilder. More...
 
IDependencyBuilder AddSingleton< T > (Func< T > factory)
 Add a singleton service to the IDependencyBuilder. More...
 
IDependencyBuilder AddSingleton< T > (Type registeredType, Func< T > factory)
 Add a singleton service to the IDependencyBuilder. This overload allows for you to add batches of concrete service implementations that are tied to their concrete implementation dynamically (without knowing them at compilation-time). More...
 
IDependencyBuilder AddSingleton< T > (T service)
 Add a singleton service to the IDependencyBuilder. More...
 
IDependencyBuilder AddSingleton (Type t)
 Add a singleton service to the IDependencyBuilder. More...
 
IDependencyBuilder AddSingleton< T > ()
 Add a singleton service to the IDependencyBuilder. More...
 
IDependencyProviderScope Build ()
 After you have registered all your services, use this method to finalize the builder and produce a IDependencyProvider that can be used to get services. The actual return value will be a IDependencyProviderScope which has lifecycle controls for the IDependencyProvider More...
 
IDependencyBuilder Remove< T > ()
 Removes a service of some type that was added with any of the AddTransient, AddScoped, or AddSingleton calls. It doesn't matter how the type was registered. If no service was added, then this method will throw an exception. Use RemoveIfExists<T> to avoid the exception. More...
 
IDependencyBuilder RemoveIfExists< T > ()
 Removes a service of some type that was added with any of the AddTransient, AddScoped, or AddSingleton calls. It doesn't matter how the type was registered. If no service was added, then this method is a no-op. More...
 
bool Has< T > ()
 Returns true is the given service has been registered. More...
 
IDependencyBuilder Clone ()
 Clones the IDependencyBuilder. The resulting builder will have of the same registrations that the current instance has. However, if you add any services to the original instance, or the returned instance, the addition won't affect the service registration state of the builder. More...
 

Detailed Description

The IDependencyBuilder is part of the Beamable dependency injection system. It is used to describe a set of services that will exist, but the builder never actually creates any service instance.

You use a IDependencyBuilder to assemble a description of your service layout, and then use the IDependencyBuilder.Build method to construct a IDependencyProvider.

Before you finalize the builder, add services to the builder.

Member Function Documentation

◆ AddScoped< T >() [1/4]

IDependencyBuilder Beamable.Common.Dependencies.IDependencyBuilder.AddScoped< T > ( )

Add a transient service to the IDependencyBuilder.

A scoped service will be instantiated once, and the same instance will be requested from IDependencyProvider.GetService. However, if you use Clone, then all calls to IDependencyProvider.GetService on the resultant IDependencyProvider will generate a new scope instance.

The instance will automatically be created by using the first available constructor of the TImpl type, and providing parameters for the constructor from the IDependencyProvider itself

Template Parameters
TThe type that is actually registered in the IDependencyBuilder. There can only be one registration for this type per IDependencyBuilder
Returns
The same instance of IDependencyBuilder so that you can chain methods together.

Implemented in Beamable.Common.Dependencies.DependencyBuilder.

◆ AddScoped< T >() [2/4]

IDependencyBuilder Beamable.Common.Dependencies.IDependencyBuilder.AddScoped< T > ( Func< IDependencyProvider, T >  factory)

Add a transient service to the IDependencyBuilder.

A scoped service will be instantiated once, and the same instance will be requested from IDependencyProvider.GetService. However, if you use Clone, then all calls to IDependencyProvider.GetService on the resultant IDependencyProvider will generate a new scope instance.

Parameters
factoryA function that takes a IDependencyProvider and produces an instance of TInterface
Template Parameters
TThe type that is actually registered in the IDependencyBuilder. There can only be one registration for this type per IDependencyBuilder
Returns
The same instance of IDependencyBuilder so that you can chain methods together.

Implemented in Beamable.Common.Dependencies.DependencyBuilder.

◆ AddScoped< T >() [3/4]

IDependencyBuilder Beamable.Common.Dependencies.IDependencyBuilder.AddScoped< T > ( Func< T >  factory)

Add a transient service to the IDependencyBuilder.

A scoped service will be instantiated once, and the same instance will be requested from IDependencyProvider.GetService. However, if you use Clone, then all calls to IDependencyProvider.GetService on the resultant IDependencyProvider will generate a new scope instance.

Parameters
factoryA function that produces an instance of TInterface
Template Parameters
TThe type that is actually registered in the IDependencyBuilder. There can only be one registration for this type per IDependencyBuilder
Returns
The same instance of IDependencyBuilder so that you can chain methods together.

Implemented in Beamable.Common.Dependencies.DependencyBuilder.

◆ AddScoped< T >() [4/4]

IDependencyBuilder Beamable.Common.Dependencies.IDependencyBuilder.AddScoped< T > ( service)

Add a transient service to the IDependencyBuilder.

A scoped service will be instantiated once, and the same instance will be requested from IDependencyProvider.GetService. However, if you use Clone, then all calls to IDependencyProvider.GetService on the resultant IDependencyProvider will generate a new scope instance.

Parameters
servicea value of T that will be used as the scoped instance
Template Parameters
TThe type that is actually registered in the IDependencyBuilder. There can only be one registration for this type per IDependencyBuilder
Returns
The same instance of IDependencyBuilder so that you can chain methods together.

Implemented in Beamable.Common.Dependencies.DependencyBuilder.

◆ AddScoped< TInterface, TImpl >() [1/4]

IDependencyBuilder Beamable.Common.Dependencies.IDependencyBuilder.AddScoped< TInterface, TImpl > ( )

Add a transient service to the IDependencyBuilder.

A scoped service will be instantiated once, and the same instance will be requested from IDependencyProvider.GetService. However, if you use Clone, then all calls to IDependencyProvider.GetService on the resultant IDependencyProvider will generate a new scope instance.

The instance will automatically be created by using the first available constructor of the TImpl type, and providing parameters for the constructor from the IDependencyProvider itself

Template Parameters
TInterfaceThe type that is actually registered in the IDependencyBuilder. There can only be one registration for this type per IDependencyBuilder
TImplThe concrete type of the instance that will be returned from IDependencyProvider.GetService
Returns
The same instance of IDependencyBuilder so that you can chain methods together.

Implemented in Beamable.Common.Dependencies.DependencyBuilder.

Type Constraints
TImpl :TInterface 

◆ AddScoped< TInterface, TImpl >() [2/4]

IDependencyBuilder Beamable.Common.Dependencies.IDependencyBuilder.AddScoped< TInterface, TImpl > ( Func< IDependencyProvider, TInterface >  factory)

Add a scoped service to the IDependencyBuilder.

A scoped service will be instantiated once, and the same instance will be requested from IDependencyProvider.GetService. However, if you use Clone, then all calls to IDependencyProvider.GetService on the resultant IDependencyProvider will generate a new scope instance.

Parameters
factoryA function that takes a IDependencyProvider and produces an instance of TInterface
Template Parameters
TInterfaceThe type that is actually registered in the IDependencyBuilder. There can only be one registration for this type per IDependencyBuilder
TImplThe concrete type of the instance that will be returned from IDependencyProvider.GetService
Returns
The same instance of IDependencyBuilder so that you can chain methods together.

Implemented in Beamable.Common.Dependencies.DependencyBuilder.

Type Constraints
TImpl :TInterface 

◆ AddScoped< TInterface, TImpl >() [3/4]

IDependencyBuilder Beamable.Common.Dependencies.IDependencyBuilder.AddScoped< TInterface, TImpl > ( Func< TInterface >  factory)

Add a transient service to the IDependencyBuilder.

A scoped service will be instantiated once, and the same instance will be requested from IDependencyProvider.GetService. However, if you use Clone, then all calls to IDependencyProvider.GetService on the resultant IDependencyProvider will generate a new scope instance.

Parameters
factoryA function that produces an instance of TInterface
Template Parameters
TInterfaceThe type that is actually registered in the IDependencyBuilder. There can only be one registration for this type per IDependencyBuilder
TImplThe concrete type of the instance that will be returned from IDependencyProvider.GetService
Returns
The same instance of IDependencyBuilder so that you can chain methods together.

Implemented in Beamable.Common.Dependencies.DependencyBuilder.

Type Constraints
TImpl :TInterface 

◆ AddScoped< TInterface, TImpl >() [4/4]

IDependencyBuilder Beamable.Common.Dependencies.IDependencyBuilder.AddScoped< TInterface, TImpl > ( TInterface  service)

Add a transient service to the IDependencyBuilder.

A scoped service will be instantiated once, and the same instance will be requested from IDependencyProvider.GetService. However, if you use Clone, then all calls to IDependencyProvider.GetService on the resultant IDependencyProvider will generate a new scope instance.

Parameters
servicea value of TInterface that will be used as the scoped instance
Template Parameters
TInterfaceThe type that is actually registered in the IDependencyBuilder. There can only be one registration for this type per IDependencyBuilder
TImplThe concrete type of the instance that will be returned from IDependencyProvider.GetService
Returns
The same instance of IDependencyBuilder so that you can chain methods together.

Implemented in Beamable.Common.Dependencies.DependencyBuilder.

Type Constraints
TImpl :TInterface 

◆ AddSingleton()

IDependencyBuilder Beamable.Common.Dependencies.IDependencyBuilder.AddSingleton ( Type  t)

Add a singleton service to the IDependencyBuilder.

A singleton service will be instantiated once, and the same instance will be requested from IDependencyProvider.GetService. Even if you use Clone, the one instance will be returned for all children providers.

The instance will automatically be created by using the first available constructor of the TImpl type, and providing parameters for the constructor from the IDependencyProvider itself

Parameters
tThe type of the service that is registered
Returns
The same instance of IDependencyBuilder so that you can chain methods together.

Implemented in Beamable.Common.Dependencies.DependencyBuilder.

◆ AddSingleton< T >() [1/5]

Add a singleton service to the IDependencyBuilder.

A singleton service will be instantiated once, and the same instance will be requested from IDependencyProvider.GetService. Even if you use Clone, the one instance will be returned for all children providers.

The instance will automatically be created by using the first available constructor of the TImpl type, and providing parameters for the constructor from the IDependencyProvider itself

Template Parameters
TThe type that is actually registered in the IDependencyBuilder. There can only be one registration for this type per IDependencyBuilder
Returns
The same instance of IDependencyBuilder so that you can chain methods together.

Implemented in Beamable.Common.Dependencies.DependencyBuilder.

◆ AddSingleton< T >() [2/5]

Add a singleton service to the IDependencyBuilder.

A singleton service will be instantiated once, and the same instance will be requested from IDependencyProvider.GetService. Even if you use Clone, the one instance will be returned for all children providers.

Parameters
factoryA function that takes a IDependencyProvider and produces an instance of T
Template Parameters
TThe type that is actually registered in the IDependencyBuilder. There can only be one registration for this type per IDependencyBuilder
Returns
The same instance of IDependencyBuilder so that you can chain methods together.

Implemented in Beamable.Common.Dependencies.DependencyBuilder.

◆ AddSingleton< T >() [3/5]

Add a singleton service to the IDependencyBuilder.

A singleton service will be instantiated once, and the same instance will be requested from IDependencyProvider.GetService. Even if you use Clone, the one instance will be returned for all children providers.

Parameters
factoryA function that produces an instance of T
Template Parameters
TThe type that is actually registered in the IDependencyBuilder. There can only be one registration for this type per IDependencyBuilder
Returns
The same instance of IDependencyBuilder so that you can chain methods together.

Implemented in Beamable.Common.Dependencies.DependencyBuilder.

◆ AddSingleton< T >() [4/5]

Add a singleton service to the IDependencyBuilder.

A singleton service will be instantiated once, and the same instance will be requested from IDependencyProvider.GetService. Even if you use Clone, the one instance will be returned for all children providers.

Parameters
serviceA value instance of TInterface
Template Parameters
TThe type that is actually registered in the IDependencyBuilder. There can only be one registration for this type per IDependencyBuilder
Returns
The same instance of IDependencyBuilder so that you can chain methods together.

Implemented in Beamable.Common.Dependencies.DependencyBuilder.

◆ AddSingleton< T >() [5/5]

IDependencyBuilder Beamable.Common.Dependencies.IDependencyBuilder.AddSingleton< T > ( Type  registeredType,
Func< T >  factory 
)

Add a singleton service to the IDependencyBuilder. This overload allows for you to add batches of concrete service implementations that are tied to their concrete implementation dynamically (without knowing them at compilation-time).

Parameters
registeredTypeThe service is added tied to this type. Once the services are built, use this type to retrieve it.
factoryA function that produces an instance of registeredType . This type must inherit from T .
Template Parameters
TA parent type of registeredType .
Returns
The same instance of IDependencyBuilder so that you can chain methods together.

Implemented in Beamable.Common.Dependencies.DependencyBuilder.

◆ AddSingleton< TInterface, TImpl >() [1/4]

Add a singleton service to the IDependencyBuilder.

A singleton service will be instantiated once, and the same instance will be requested from IDependencyProvider.GetService. Even if you use Clone, the one instance will be returned for all children providers.

The instance will automatically be created by using the first available constructor of the TImpl type, and providing parameters for the constructor from the IDependencyProvider itself

Template Parameters
TInterfaceThe type that is actually registered in the IDependencyBuilder. There can only be one registration for this type per IDependencyBuilder
TImplThe concrete type of the instance that will be returned from IDependencyProvider.GetService
Returns
The same instance of IDependencyBuilder so that you can chain methods together.

Implemented in Beamable.Common.Dependencies.DependencyBuilder.

Type Constraints
TImpl :TInterface 

◆ AddSingleton< TInterface, TImpl >() [2/4]

Add a singleton service to the IDependencyBuilder.

A singleton service will be instantiated once, and the same instance will be requested from IDependencyProvider.GetService. Even if you use Clone, the one instance will be returned for all children providers.

Parameters
factoryA function that takes a IDependencyProvider and produces an instance of TInterface
Template Parameters
TInterfaceThe type that is actually registered in the IDependencyBuilder. There can only be one registration for this type per IDependencyBuilder
TImplThe concrete type of the instance that will be returned from IDependencyProvider.GetService
Returns
The same instance of IDependencyBuilder so that you can chain methods together.

Implemented in Beamable.Common.Dependencies.DependencyBuilder.

Type Constraints
TImpl :TInterface 

◆ AddSingleton< TInterface, TImpl >() [3/4]

IDependencyBuilder Beamable.Common.Dependencies.IDependencyBuilder.AddSingleton< TInterface, TImpl > ( Func< TInterface >  factory)

Add a singleton service to the IDependencyBuilder.

A singleton service will be instantiated once, and the same instance will be requested from IDependencyProvider.GetService. Even if you use Clone, the one instance will be returned for all children providers.

Parameters
factoryA function that produces an instance of TInterface
Template Parameters
TInterfaceThe type that is actually registered in the IDependencyBuilder. There can only be one registration for this type per IDependencyBuilder
TImplThe concrete type of the instance that will be returned from IDependencyProvider.GetService
Returns
The same instance of IDependencyBuilder so that you can chain methods together.

Implemented in Beamable.Common.Dependencies.DependencyBuilder.

Type Constraints
TImpl :TInterface 

◆ AddSingleton< TInterface, TImpl >() [4/4]

Add a singleton service to the IDependencyBuilder.

A singleton service will be instantiated once, and the same instance will be requested from IDependencyProvider.GetService. Even if you use Clone, the one instance will be returned for all children providers.

Parameters
serviceA value instance of TInterface
Template Parameters
TInterfaceThe type that is actually registered in the IDependencyBuilder. There can only be one registration for this type per IDependencyBuilder
TImplThe concrete type of the instance that will be returned from IDependencyProvider.GetService
Returns
The same instance of IDependencyBuilder so that you can chain methods together.

Implemented in Beamable.Common.Dependencies.DependencyBuilder.

Type Constraints
TImpl :TInterface 

◆ AddTransient< T >() [1/3]

IDependencyBuilder Beamable.Common.Dependencies.IDependencyBuilder.AddTransient< T > ( )

Add a transient service to the IDependencyBuilder. A transient service will be re-instantiated everytime it is requested from IDependencyProvider.GetService.

The instance will automatically be created by using the first available constructor of the TImpl type, and providing parameters for the constructor from the IDependencyProvider itself

Template Parameters
TThe type that is actually registered in the IDependencyBuilder. There can only be one registration for this type per IDependencyBuilder
Returns
The same instance of IDependencyBuilder so that you can chain methods together.

Implemented in Beamable.Common.Dependencies.DependencyBuilder.

◆ AddTransient< T >() [2/3]

IDependencyBuilder Beamable.Common.Dependencies.IDependencyBuilder.AddTransient< T > ( Func< IDependencyProvider, T >  factory)

Add a transient service to the IDependencyBuilder. A transient service will be re-instantiated everytime it is requested from IDependencyProvider.GetService.

Parameters
factoryA function that takes a IDependencyProvider and produces an instance of TInterface
Template Parameters
TThe type that is actually registered in the IDependencyBuilder. There can only be one registration for this type per IDependencyBuilder
Returns
The same instance of IDependencyBuilder so that you can chain methods together.

Implemented in Beamable.Common.Dependencies.DependencyBuilder.

◆ AddTransient< T >() [3/3]

IDependencyBuilder Beamable.Common.Dependencies.IDependencyBuilder.AddTransient< T > ( Func< T >  factory)

Add a transient service to the IDependencyBuilder. A transient service will be re-instantiated everytime it is requested from IDependencyProvider.GetService.

Parameters
factoryA function that produces an instance of TInterface
Template Parameters
TThe type that is actually registered in the IDependencyBuilder. There can only be one registration for this type per IDependencyBuilder
Returns
The same instance of IDependencyBuilder so that you can chain methods together.

Implemented in Beamable.Common.Dependencies.DependencyBuilder.

◆ AddTransient< TInterface, TImpl >() [1/3]

IDependencyBuilder Beamable.Common.Dependencies.IDependencyBuilder.AddTransient< TInterface, TImpl > ( )

Add a transient service to the IDependencyBuilder. A transient service will be re-instantiated everytime it is requested from IDependencyProvider.GetService.

The instance will automatically be created by using the first available constructor of the TImpl type, and providing parameters for the constructor from the IDependencyProvider itself

Template Parameters
TInterfaceThe type that is actually registered in the IDependencyBuilder. There can only be one registration for this type per IDependencyBuilder
TImplThe concrete type of the instance that will be returned from IDependencyProvider.GetService
Returns
The same instance of IDependencyBuilder so that you can chain methods together.

Implemented in Beamable.Common.Dependencies.DependencyBuilder.

Type Constraints
TImpl :TInterface 

◆ AddTransient< TInterface, TImpl >() [2/3]

IDependencyBuilder Beamable.Common.Dependencies.IDependencyBuilder.AddTransient< TInterface, TImpl > ( Func< IDependencyProvider, TInterface >  factory)

Add a transient service to the IDependencyBuilder. A transient service will be re-instantiated everytime it is requested from IDependencyProvider.GetService.

Parameters
factoryA function that takes a IDependencyProvider and produces an instance of TInterface
Template Parameters
TInterfaceThe type that is actually registered in the IDependencyBuilder. There can only be one registration for this type per IDependencyBuilder
TImplThe concrete type of the instance that will be returned from IDependencyProvider.GetService
Returns
The same instance of IDependencyBuilder so that you can chain methods together.

Implemented in Beamable.Common.Dependencies.DependencyBuilder.

Type Constraints
TImpl :TInterface 

◆ AddTransient< TInterface, TImpl >() [3/3]

IDependencyBuilder Beamable.Common.Dependencies.IDependencyBuilder.AddTransient< TInterface, TImpl > ( Func< TInterface >  factory)

Add a transient service to the IDependencyBuilder. A transient service will be re-instantiated everytime it is requested from IDependencyProvider.GetService.

Parameters
factoryA function that produces an instance of TInterface
Template Parameters
TInterfaceThe type that is actually registered in the IDependencyBuilder. There can only be one registration for this type per IDependencyBuilder
TImplThe concrete type of the instance that will be returned from IDependencyProvider.GetService
Returns
The same instance of IDependencyBuilder so that you can chain methods together.

Implemented in Beamable.Common.Dependencies.DependencyBuilder.

Type Constraints
TImpl :TInterface 

◆ Build()

IDependencyProviderScope Beamable.Common.Dependencies.IDependencyBuilder.Build ( )

After you have registered all your services, use this method to finalize the builder and produce a IDependencyProvider that can be used to get services. The actual return value will be a IDependencyProviderScope which has lifecycle controls for the IDependencyProvider

Returns
A IDependencyProviderScope instance

Implemented in Beamable.Common.Dependencies.DependencyBuilder.

◆ Clone()

IDependencyBuilder Beamable.Common.Dependencies.IDependencyBuilder.Clone ( )

Clones the IDependencyBuilder. The resulting builder will have of the same registrations that the current instance has. However, if you add any services to the original instance, or the returned instance, the addition won't affect the service registration state of the builder.

Returns
A new IDependencyBuilder

Implemented in Beamable.Common.Dependencies.DependencyBuilder.

◆ Has< T >()

bool Beamable.Common.Dependencies.IDependencyBuilder.Has< T > ( )

Returns true is the given service has been registered.

Template Parameters
TThe type of service to check for
Returns
True if the service is registered in the builder, False otherwise

Implemented in Beamable.Common.Dependencies.DependencyBuilder.

◆ Remove< T >()

IDependencyBuilder Beamable.Common.Dependencies.IDependencyBuilder.Remove< T > ( )

Removes a service of some type that was added with any of the AddTransient, AddScoped, or AddSingleton calls. It doesn't matter how the type was registered. If no service was added, then this method will throw an exception. Use RemoveIfExists<T> to avoid the exception.

Template Parameters
TThe type of service to remove
Returns
The same instance of IDependencyBuilder so that you can chain methods together.

Implemented in Beamable.Common.Dependencies.DependencyBuilder.

◆ RemoveIfExists< T >()

IDependencyBuilder Beamable.Common.Dependencies.IDependencyBuilder.RemoveIfExists< T > ( )

Removes a service of some type that was added with any of the AddTransient, AddScoped, or AddSingleton calls. It doesn't matter how the type was registered. If no service was added, then this method is a no-op.

Template Parameters
TThe type of service to remove
Returns
The same instance of IDependencyBuilder so that you can chain methods together.

Implemented in Beamable.Common.Dependencies.DependencyBuilder.


The documentation for this interface was generated from the following file: