Click or drag to resize
Akka.NETTestKitBaseActorOfAsTestActorRefTActor Method (ExpressionFuncTActor, String)
Create a new actor as child of Sys and returns it as TestActorRefTActor to enable access to the underlying actor instance via UnderlyingActor. Uses 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 TestActorRef<TActor> ActorOfAsTestActorRef<TActor>(
	Expression<Func<TActor>> factory,
	string name = null
)
where TActor : ActorBase

Parameters

factory
Type: System.Linq.ExpressionsExpressionFuncTActor
An expression that calls the constructor of TActor
name (Optional)
Type: SystemString
Optional: The name.

Type Parameters

TActor
The type of the actor.

Return Value

Type: TestActorRefTActor
TBD
See Also