Class DIActorContextAdapter
This class represents an adapter used to generate Props configuration objects using the dependency injection (DI) extension using a given actor context.
Inherited Members
Namespace: Akka.DI.Core
Assembly: Akka.DI.Core.dll
Syntax
public class DIActorContextAdapter
Constructors
| Improve this Doc View SourceDIActorContextAdapter(IActorContext)
Initializes a new instance of the DIActorContextAdapter class.
Declaration
public DIActorContextAdapter(IActorContext context)
Parameters
| Type | Name | Description |
|---|---|---|
| IActorContext | context | The actor context associated with a system that contains the DI extension. |
Exceptions
| Type | Condition |
|---|---|
| ArgumentNullException | This exception is thrown when the specified |
| InvalidOperationException | This exception is thrown when the Dependency Resolver has not been configured in the ActorSystem. |
Methods
| Improve this Doc View SourceActorOf<TActor>(String)
Obsolete. Use Props(Type) or Props<TActor>() methods for actor creation. This method will be removed in future versions.
Declaration
[Obsolete("Use Props methods for actor creation. This method will be removed in future versions")]
public IActorRef ActorOf<TActor>(string name = null)
where TActor : ActorBase
Parameters
| Type | Name | Description |
|---|---|---|
| String | name | N/A |
Returns
| Type | Description |
|---|---|
| IActorRef | N/A |
Type Parameters
| Name | Description |
|---|---|
| TActor | N/A |
Props(Type)
Creates a Props configuration object for a given actor type.
Declaration
public Props Props(Type actorType)
Parameters
| Type | Name | Description |
|---|---|---|
| Type | actorType | The actor type for which to create the Props configuration. |
Returns
| Type | Description |
|---|---|
| Props | A Props configuration object for the given actor type. |
Props<TActor>()
Creates a Props configuration object for a given actor type.
Declaration
public Props Props<TActor>()
where TActor : ActorBase
Returns
| Type | Description |
|---|---|
| Props | A Props configuration object for the given actor type. |
Type Parameters
| Name | Description |
|---|---|
| TActor | The actor type for which to create the Props configuration. |
Improve this Doc