| ActorSystemWithExtensionsWithExtensionT, TI Method (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.
Namespace:
Akka.Actor
Assembly:
Akka (in Akka.dll) Version: 1.2.3.129 (1.2.3.129)
Syntax public static T WithExtension<T, TI>(
this ActorSystem system
)
where T : class, IExtension
where TI : IExtensionId
[<ExtensionAttribute>]
static member WithExtension :
system : ActorSystem -> 'T when 'T : not struct and IExtension when 'TI : IExtensionId
Parameters
- system
- Type: Akka.ActorActorSystem
The actor system from which to retrieve the extension or to register with if it does not exist.
Type Parameters
- 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.
Return Value
Type:
TThe extension retrieved from the given actor system.
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type
ActorSystem. When you use instance method syntax to call this method, omit the first parameter. For more information, see
Extension Methods (Visual Basic) or
Extension Methods (C# Programming Guide).
See Also