Class InternalTestActorRef
INTERNAL
This special ActorRef is exclusively for use during unit testing in a single-threaded environment. Therefore, it
overrides the dispatcher to CallingThreadDispatcher and sets the receiveTimeout to None. Otherwise,
it acts just like a normal ActorRef. You may retrieve a reference to the underlying actor to test internal logic.
public class InternalTestActorRef : LocalActorRef
- Inheritance
-
InternalTestActorRef
Properties
UnderlyingActor
TBD
public object UnderlyingActor { get; }
Property Value
Exceptions
- Akka.Actor.IllegalActorStateException
TBD
Methods
Create(ActorSystem, Props, IActorRef, string)
INTERNAL
public static InternalTestActorRef Create(ActorSystem system, Props props, IActorRef supervisor = null, string name = null)
Parameters
system
ActorSystemTBD
props
PropsTBD
supervisor
IActorRefTBD
name
stringTBD
Returns
Exceptions
- Akka.Pattern.IllegalStateException
TBD
CreateUniqueName()
INTERNAL
public static string CreateUniqueName()
Returns
- string
TBD
GetTestActorCell()
TBD
protected InternalTestActorRef.TestActorCell GetTestActorCell()
Returns
NewActorCell(ActorSystemImpl, IInternalActorRef, Props, MessageDispatcher, IInternalActorRef)
TBD
protected override ActorCell NewActorCell(ActorSystemImpl system, IInternalActorRef self, Props props, MessageDispatcher dispatcher, IInternalActorRef supervisor)
Parameters
system
ActorSystemImplTBD
self
IInternalActorRefTBD
props
PropsTBD
dispatcher
MessageDispatcherTBD
supervisor
IInternalActorRefTBD
Returns
- ActorCell
TBD
Receive(object, IActorRef)
Directly inject messages into actor receive behavior. Any exceptions thrown will be available to you, while still being able to use become/unbecome.
public void Receive(object message, IActorRef sender = null)
Parameters
message
objectThe message.
sender
IActorRefThe sender.
ReceiveAsync(object, IActorRef)
public Task ReceiveAsync(object message, IActorRef sender = null)
Parameters
message
objectsender
IActorRef
Returns
ToString()
TBD
public override string ToString()
Returns
- string
TBD
Unwatch(IActorRef)
Deregisters this actor from being a death monitor of the provided ActorRef This means that this actor will not get a Terminated()-message when the provided actor is permanently terminated. Returns the same ActorRef that is provided to it, to allow for cleaner invocations.
public void Unwatch(IActorRef subject)
Parameters
subject
IActorRefThe subject to unwatch.
Watch(IActorRef)
Registers this actor to be a death monitor of the provided ActorRef This means that this actor will get a Terminated()-message when the provided actor is permanently terminated. Returns the same ActorRef that is provided to it, to allow for cleaner invocations.
public void Watch(IActorRef subject)
Parameters
subject
IActorRefThe subject to watch.