ActorSystemWithExtensionsWithExtensionT Method (ActorSystem, Type) |
Registers a type and returns it if one doesn't yet exist
Namespace: Akka.ActorAssembly: Akka (in Akka.dll) Version: 0.8.0.0 (0.8.0.0)
Syntaxpublic static T WithExtension<T>(
this ActorSystem system,
Type extensionId
)
where T : class, IExtension
<ExtensionAttribute>
Public Shared Function WithExtension(Of T As {Class, IExtension}) (
system As ActorSystem,
extensionId As Type
) As T
public:
[ExtensionAttribute]
generic<typename T>
where T : ref class, IExtension
static T WithExtension(
ActorSystem^ system,
Type^ extensionId
)
[<ExtensionAttribute>]
static member WithExtension :
system : ActorSystem *
extensionId : Type -> 'T when 'T : not struct and IExtension
Parameters
- system
- Type: Akka.ActorActorSystem
[Missing <param name="system"/> documentation for "M:Akka.Actor.ActorSystemWithExtensions.WithExtension``1(Akka.Actor.ActorSystem,System.Type)"]
- extensionId
- Type: SystemType
[Missing <param name="extensionId"/> documentation for "M:Akka.Actor.ActorSystemWithExtensions.WithExtension``1(Akka.Actor.ActorSystem,System.Type)"]
Type Parameters
- T
[Missing <typeparam name="T"/> documentation for "M:Akka.Actor.ActorSystemWithExtensions.WithExtension``1(Akka.Actor.ActorSystem,System.Type)"]
Return Value
Type:
T[Missing <returns> documentation for "M:Akka.Actor.ActorSystemWithExtensions.WithExtension``1(Akka.Actor.ActorSystem,System.Type)"]
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