Class ActorSystemWithExtensions
This class contains extension methods used for resolving ActorSystem extensions.
Inherited Members
Namespace: Akka.Actor
Assembly: Akka.dll
Syntax
public static class ActorSystemWithExtensions
Methods
| Improve this Doc View SourceWithExtension<T>(ActorSystem)
Retrieves the extension specified by a given type, T
, from a given actor system.
Declaration
public static T WithExtension<T>(this ActorSystem system)
where T : class, IExtension
Parameters
Type | Name | Description |
---|---|---|
ActorSystem | system | The actor system from which to retrieve the extension. |
Returns
Type | Description |
---|---|
T | The extension retrieved from the given actor system. |
Type Parameters
Name | Description |
---|---|
T | The type associated with the extension to retrieve. |
WithExtension<T>(ActorSystem, Type)
Retrieves the extension specified by a given type, T
, from a given actor system.
If the extension does not exist within the actor system, then the extension specified by extensionId
is registered to the actor system.
Declaration
public static T WithExtension<T>(this ActorSystem system, Type extensionId)
where T : class, IExtension
Parameters
Type | Name | Description |
---|---|---|
ActorSystem | system | The actor system from which to retrieve the extension or to register with if it does not exist. |
Type | extensionId | The type of the extension to register if it does not exist in the given actor system. |
Returns
Type | Description |
---|---|
T | The extension retrieved from the given actor system. |
Type Parameters
Name | Description |
---|---|
T | The type associated with the extension to retrieve. |
WithExtension<T, TI>(ActorSystem)
Retrieves the extension specified by a given type, T
, from a given actor system.
If the extension does not exist within the actor system, then the extension specified by TI
is registered to the actor system.
Declaration
public static T WithExtension<T, TI>(this ActorSystem system)
where T : class, IExtension where TI : IExtensionId
Parameters
Type | Name | Description |
---|---|---|
ActorSystem | system | The actor system from which to retrieve the extension or to register with if it does not exist. |
Returns
Type | Description |
---|---|
T | The extension retrieved from the given actor system. |
Type Parameters
Name | Description |
---|---|
T | The type associated with the extension to retrieve. |
TI | The type associated with the extension to retrieve if it does not exist within the system. |