| TestKitBaseActorOfTActor Method (ExpressionFuncTActor, String) |
Create a new actor as child of
Sys using an expression that calls the constructor
of
TActor.
Examples ActorOf<MyActor>(()=>new MyActor("value", 4711), "test-actor")
Namespace:
Akka.TestKit
Assembly:
Akka.TestKit (in Akka.TestKit.dll) Version: 1.2.3.129 (1.2.3.129)
Syntax public IActorRef ActorOf<TActor>(
Expression<Func<TActor>> factory,
string name
)
where TActor : ActorBase
member ActorOf :
factory : Expression<Func<'TActor>> *
name : string -> IActorRef when 'TActor : ActorBase
Parameters
- factory
- Type: System.Linq.ExpressionsExpressionFuncTActor
An expression that calls the constructor of TActor - name
- Type: SystemString
The name of the actor.
Type Parameters
- TActor
- The type of the actor.
Return Value
Type:
IActorRefTBD
See Also