Interface IDependencyResolver
Interface abstraction for working with DI providers in Akka.NET without being bound to any specific implementation.
Namespace: Akka.DependencyInjection
Assembly: Akka.DependencyInjection.dll
Syntax
public interface IDependencyResolver
Remarks
See ServiceProviderDependencyResolver for a reference implementation.
Methods
| Improve this Doc View SourceCreateScope()
Declaration
IResolverScope CreateScope()
Returns
Type | Description |
---|---|
IResolverScope |
GetService(Type)
Declaration
object GetService(Type type)
Parameters
Type | Name | Description |
---|---|---|
Type | type |
Returns
Type | Description |
---|---|
Object |
GetService<T>()
Declaration
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
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, Object[])
Used to dynamically instantiate an actor where some of the constructor arguments are populated via dependency injection and others are not.
Declaration
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>(Object[])
Used to dynamically instantiate an actor where some of the constructor arguments are populated via dependency injection and others are not.
Declaration
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.