Class Extensions
This class contains extension methods used to simplify working with dependency injection (DI) inside an ActorSystem.
Inherited Members
Namespace: Akka.DI.Core
Assembly: Akka.DI.Core.dll
Syntax
public static class Extensions
Methods
| Improve this Doc View SourceAddDependencyResolver(ActorSystem, IDependencyResolver)
Registers a dependency resolver with a given actor system.
Declaration
public static void AddDependencyResolver(this ActorSystem system, IDependencyResolver dependencyResolver)
Parameters
| Type | Name | Description |
|---|---|---|
| ActorSystem | system | The actor system in which to register the given dependency resolver. |
| IDependencyResolver | dependencyResolver | The dependency resolver being registered to the actor system. |
Exceptions
| Type | Condition |
|---|---|
| ArgumentNullException | This exception is thrown when either the specified |
DI(ActorSystem)
Creates an adapter used to generate Props configuration objects using the DI extension using a given actor system.
Declaration
public static DIActorSystemAdapter DI(this ActorSystem system)
Parameters
| Type | Name | Description |
|---|---|---|
| ActorSystem | system | The actor system that contains the DI extension. |
Returns
| Type | Description |
|---|---|
| DIActorSystemAdapter | An adapter used to generate Props configuration objects using the DI extension. |
DI(IActorContext)
Creates an adapter used to generate Props configuration objects using the DI extension using a given actor context.
Declaration
public static DIActorContextAdapter DI(this IActorContext context)
Parameters
| Type | Name | Description |
|---|---|---|
| IActorContext | context | The actor context associated with a system that contains the DI extension. |
Returns
| Type | Description |
|---|---|
| DIActorContextAdapter | An adapter used to generate Props configuration objects using the DI extension. |
GetTypeValue(String)
Declaration
public static Type GetTypeValue(this string typeName)
Parameters
| Type | Name | Description |
|---|---|---|
| String | typeName | The string representation of the type to retrieve. |
Returns
| Type | Description |
|---|---|
| Type | The Type with the given name. |
Improve this Doc