Class ServiceProviderDependencyResolver
INTERNAL API.
IDependencyResolver implementation backed by IServiceProvider
Implements
Inherited Members
Namespace: Akka.DependencyInjection
Assembly: Akka.DependencyInjection.dll
Syntax
public class ServiceProviderDependencyResolver : IDependencyResolver
Constructors
| Edit this page View SourceServiceProviderDependencyResolver(IServiceProvider)
Declaration
public ServiceProviderDependencyResolver(IServiceProvider serviceProvider)
Parameters
Type | Name | Description |
---|---|---|
IServiceProvider | serviceProvider |
Properties
| Edit this page View SourceServiceProvider
Declaration
public IServiceProvider ServiceProvider { get; }
Property Value
Type | Description |
---|---|
IServiceProvider |
Methods
| Edit this page View SourceCreateScope()
Declaration
public IResolverScope CreateScope()
Returns
Type | Description |
---|---|
IResolverScope |
GetService(Type)
Declaration
public object GetService(Type type)
Parameters
Type | Name | Description |
---|---|---|
Type | type |
Returns
Type | Description |
---|---|
object |
GetService<T>()
Declaration
public T GetService<T>()
Returns
Type | Description |
---|---|
T |
Type Parameters
Name | Description |
---|---|
T |
Props(Type)
Used to dynamically instantiate an actor where some of the constructor arguments are populated via dependency injection and others are not.
Declaration
public Props Props(Type type)
Parameters
Type | Name | Description |
---|---|---|
Type | type | The type of actor to instantiate. |
Returns
Type | Description |
---|---|
Props | A new Props instance which uses DI internally. |
Remarks
YOU ARE RESPONSIBLE FOR MANAGING THE LIFECYCLE OF YOUR OWN DEPENDENCIES. AKKA.NET WILL NOT ATTEMPT TO DO IT FOR YOU.
Props(Type, params object[])
Used to dynamically instantiate an actor where some of the constructor arguments are populated via dependency injection and others are not.
Declaration
public Props Props(Type type, params object[] args)
Parameters
Type | Name | Description |
---|---|---|
Type | type | The type of actor to instantiate. |
object[] | args | Optional. Any constructor arguments that will be passed into the actor's constructor directly without being resolved by DI first. |
Returns
Type | Description |
---|---|
Props | A new Props instance which uses DI internally. |
Remarks
YOU ARE RESPONSIBLE FOR MANAGING THE LIFECYCLE OF YOUR OWN DEPENDENCIES. AKKA.NET WILL NOT ATTEMPT TO DO IT FOR YOU.
Props<T>(params object[])
Used to dynamically instantiate an actor where some of the constructor arguments are populated via dependency injection and others are not.
Declaration
public Props Props<T>(params object[] args) where T : ActorBase
Parameters
Type | Name | Description |
---|---|---|
object[] | args | Optional. Any constructor arguments that will be passed into the actor's constructor directly without being resolved by DI first. |
Returns
Type | Description |
---|---|
Props | A new Props instance which uses DI internally. |
Type Parameters
Name | Description |
---|---|
T | The type of actor to instantiate. |
Remarks
YOU ARE RESPONSIBLE FOR MANAGING THE LIFECYCLE OF YOUR OWN DEPENDENCIES. AKKA.NET WILL NOT ATTEMPT TO DO IT FOR YOU.