|
Beamable SDK
|
The IDependencyProvider is a collection of services, built from a IDependencyBuilder. Use the GetService<T> method to get services. More...

Public Member Functions | |
| bool | CanBuildService (Type t) |
| Returns true if the given service is registered in the provider. If you make a call to GetService<T> for a service that doesn't exist, you'll get an exception. More... | |
| object | GetService (Type t) |
| Finds an instance of a service given the type parameter. All services are lazily initialized, so its possible that if is the first time the type of service has been requested, this call could allocate a new instance of the service. More... | |
| T | GetService< T > () |
| Finds an instance of a service given the type parameter. All services are lazily initialized, so its possible that if is the first time the type of service has been requested, this call could allocate a new instance of the service. More... | |
| bool | CanBuildService< T > () |
| Returns true if the given service is registered in the provider. If you make a call to GetService<T> for a service that doesn't exist, you'll get an exception. More... | |
| IDependencyProviderScope | Fork (Action< IDependencyBuilder > configure=null) |
| Create a new IDependencyProviderScope, using the current instance as a parent. Any service that was registered as a Scoped service will be re-created in the new provider. Any service that was registered as a Singleton will use the instance from the parent provider. If the parent provider has IDependencyProviderScope.Dispose called, then the child provider will also be disposed. More... | |
The IDependencyProvider is a collection of services, built from a IDependencyBuilder. Use the GetService<T> method to get services.
| bool Beamable.Common.Dependencies.IDependencyProvider.CanBuildService | ( | Type | t | ) |
Returns true if the given service is registered in the provider. If you make a call to GetService<T> for a service that doesn't exist, you'll get an exception.
| t | the type of service to check for |
Implemented in Beamable.Common.Dependencies.DependencyProvider.
Returns true if the given service is registered in the provider. If you make a call to GetService<T> for a service that doesn't exist, you'll get an exception.
| T | The type of service to get |
Implemented in Beamable.Common.Dependencies.DependencyProvider.
| IDependencyProviderScope Beamable.Common.Dependencies.IDependencyProvider.Fork | ( | Action< IDependencyBuilder > | configure = null | ) |
Create a new IDependencyProviderScope, using the current instance as a parent. Any service that was registered as a Scoped service will be re-created in the new provider. Any service that was registered as a Singleton will use the instance from the parent provider. If the parent provider has IDependencyProviderScope.Dispose called, then the child provider will also be disposed.
| configure | Optionally, you can pass a configuration function that registers new services specific to the child provider. |
Implemented in Beamable.Common.Dependencies.DependencyProvider.
| object Beamable.Common.Dependencies.IDependencyProvider.GetService | ( | Type | t | ) |
Finds an instance of a service given the type parameter. All services are lazily initialized, so its possible that if is the first time the type of service has been requested, this call could allocate a new instance of the service.
If the service wasn't registered, you'll get an exception. Use CanBuildService<T> to check if the service can be got.
| t | the type of service to get |
Implemented in Beamable.Common.Dependencies.DependencyProvider.
Finds an instance of a service given the type parameter. All services are lazily initialized, so its possible that if is the first time the type of service has been requested, this call could allocate a new instance of the service.
If the service wasn't registered, you'll get an exception. Use CanBuildService<T> to check if the service can be got.
| T | The type of service to get |
Implemented in Beamable.Common.Dependencies.DependencyProvider.