Class TestActorRefBase<TActor>
This is the base class for TestActorRefs
Inherited Members
Namespace: Akka.TestKit
Assembly: Akka.TestKit.dll
Syntax
public abstract class TestActorRefBase<TActor> : IActorRef, ICanTell, IEquatable<IActorRef>, IComparable<IActorRef>, ISurrogated, IComparable where TActor : ActorBase
Type Parameters
Name | Description |
---|---|
TActor | The type of actor |
Constructors
| Edit this page View SourceTestActorRefBase(ActorSystem, Props, IActorRef, string)
TBD
Declaration
protected TestActorRefBase(ActorSystem system, Props actorProps, IActorRef supervisor = null, string name = null)
Parameters
Type | Name | Description |
---|---|---|
ActorSystem | system | TBD |
Props | actorProps | TBD |
IActorRef | supervisor | TBD |
string | name | TBD |
Properties
| Edit this page View SourceInternalRef
TBD
Declaration
protected InternalTestActorRef InternalRef { get; }
Property Value
Type | Description |
---|---|
InternalTestActorRef |
Path
Gets the path of this instance
Declaration
public ActorPath Path { get; }
Property Value
Type | Description |
---|---|
ActorPath |
Ref
TBD
Declaration
public IActorRef Ref { get; }
Property Value
Type | Description |
---|---|
IActorRef |
UnderlyingActor
TBD
Declaration
public TActor UnderlyingActor { get; }
Property Value
Type | Description |
---|---|
TActor |
Methods
| Edit this page View SourceCompareTo(object)
Declaration
public int CompareTo(object obj)
Parameters
Type | Name | Description |
---|---|---|
object | obj |
Returns
Type | Description |
---|---|
int |
Equals(IActorRef)
Declaration
public bool Equals(IActorRef other)
Parameters
Type | Name | Description |
---|---|---|
IActorRef | other |
Returns
Type | Description |
---|---|
bool |
Equals(object)
Declaration
public override bool Equals(object obj)
Parameters
Type | Name | Description |
---|---|---|
object | obj |
Returns
Type | Description |
---|---|
bool |
Overrides
| Edit this page View SourceForward(object)
Forwards a message to this actor. If this call is made from within an actor, the current actor will be the sender. If the call is made from a test class that is based on TestKit, TestActor will will be the sender;
Declaration
public void Forward(object message)
Parameters
Type | Name | Description |
---|---|---|
object | message | The message. |
GetHashCode()
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
int |
Overrides
| Edit this page View SourceReceive(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. Note: This method violates the actor model and could cause unpredictable behavior. For example, a Receive call to an actor could run simultaneously (2 simultaneous threads running inside the actor) with the actor's handling of a previous Tell call.
Declaration
public void Receive(object message, IActorRef sender = null)
Parameters
Type | Name | Description |
---|---|---|
object | message | The message. |
IActorRef | sender | The sender. |
ReceiveAsync(object, IActorRef)
Directly inject messages into actor ReceiveAsync behavior. Any exceptions thrown will be available to you, while still being able to use become/unbecome. Note: This method violates the actor model and could cause unpredictable behavior. For example, a Receive call to an actor could run simultaneously (2 simultaneous threads running inside the actor) with the actor's handling of a previous Tell call.
Declaration
public Task ReceiveAsync(object message, IActorRef sender = null)
Parameters
Type | Name | Description |
---|---|---|
object | message | The message. |
IActorRef | sender | The sender. |
Returns
Type | Description |
---|---|
Task |
SendSystemMessage(ISystemMessage)
TBD
Declaration
public void SendSystemMessage(ISystemMessage message)
Parameters
Type | Name | Description |
---|---|---|
ISystemMessage | message | TBD |
SendSystemMessage(ISystemMessage, IActorRef)
TBD
Declaration
public void SendSystemMessage(ISystemMessage message, IActorRef sender)
Parameters
Type | Name | Description |
---|---|---|
ISystemMessage | message | TBD |
IActorRef | sender | TBD |
Tell(object)
Sends a message to this actor. If this call is made from within an actor, the current actor will be the sender. If the call is made from a test class that is based on TestKit, TestActor will will be the sender; otherwise NoSender will be set as sender.
Declaration
public void Tell(object message)
Parameters
Type | Name | Description |
---|---|---|
object | message | The message. |
Tell(object, IActorRef)
Sends a message to this actor with the specified sender.
Declaration
public void Tell(object message, IActorRef sender)
Parameters
Type | Name | Description |
---|---|---|
object | message | The message. |
IActorRef | sender | The sender |
ToActorRef(TestActorRefBase<TActor>)
TBD
Declaration
public static IActorRef ToActorRef(TestActorRefBase<TActor> actorRef)
Parameters
Type | Name | Description |
---|---|---|
TestActorRefBase<TActor> | actorRef | TBD |
Returns
Type | Description |
---|---|
IActorRef | TBD |
ToString()
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
string |
Overrides
| Edit this page View SourceUnwatch(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.
Declaration
public void Unwatch(IActorRef subject)
Parameters
Type | Name | Description |
---|---|---|
IActorRef | subject | The 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.
Declaration
public void Watch(IActorRef subject)
Parameters
Type | Name | Description |
---|---|---|
IActorRef | subject | The subject to watch. |
Operators
| Edit this page View Sourceoperator ==(IActorRef, TestActorRefBase<TActor>)
Compares a specified IActorRef to an TestActorRefBase<TActor> for equality.
Declaration
public static bool operator ==(IActorRef actorRef, TestActorRefBase<TActor> testActorRef)
Parameters
Type | Name | Description |
---|---|---|
IActorRef | actorRef | The actor used for comparison |
TestActorRefBase<TActor> | testActorRef | The test actor used for comparison |
Returns
Type | Description |
---|---|
bool |
|
operator ==(TestActorRefBase<TActor>, IActorRef)
Compares a specified TestActorRefBase<TActor> to an IActorRef for equality.
Declaration
public static bool operator ==(TestActorRefBase<TActor> testActorRef, IActorRef actorRef)
Parameters
Type | Name | Description |
---|---|---|
TestActorRefBase<TActor> | testActorRef | The test actor used for comparison |
IActorRef | actorRef | The actor used for comparison |
Returns
Type | Description |
---|---|
bool |
|
operator !=(IActorRef, TestActorRefBase<TActor>)
Compares a specified IActorRef to an TestActorRefBase<TActor> for inequality.
Declaration
public static bool operator !=(IActorRef actorRef, TestActorRefBase<TActor> testActorRef)
Parameters
Type | Name | Description |
---|---|---|
IActorRef | actorRef | The actor used for comparison |
TestActorRefBase<TActor> | testActorRef | The test actor used for comparison |
Returns
Type | Description |
---|---|
bool |
|
operator !=(TestActorRefBase<TActor>, IActorRef)
Compares a specified TestActorRefBase<TActor> to an IActorRef for inequality.
Declaration
public static bool operator !=(TestActorRefBase<TActor> testActorRef, IActorRef actorRef)
Parameters
Type | Name | Description |
---|---|---|
TestActorRefBase<TActor> | testActorRef | The test actor used for comparison |
IActorRef | actorRef | The actor used for comparison |
Returns
Type | Description |
---|---|
bool |
|