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> : IInternalActorRef, IActorRef, ICanTell, IEquatable<IActorRef>, IComparable<IActorRef>, ISurrogated, IComparable, IActorRefScope where TActor : ActorBase
Type Parameters
Name | Description |
---|---|
TActor | The type of actor |
Constructors
| Improve this Doc 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
| Improve this Doc 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
| Improve this Doc View SourceCompareTo(Object)
Declaration
public int CompareTo(object obj)
Parameters
Type | Name | Description |
---|---|---|
Object | obj |
Returns
Type | Description |
---|---|
Int32 |
Equals(IActorRef)
Declaration
public bool Equals(IActorRef other)
Parameters
Type | Name | Description |
---|---|---|
IActorRef | other |
Returns
Type | Description |
---|---|
Boolean |
Equals(Object)
Declaration
public override bool Equals(object obj)
Parameters
Type | Name | Description |
---|---|---|
Object | obj |
Returns
Type | Description |
---|---|
Boolean |
Overrides
| Improve this Doc 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 |
---|---|
Int32 |
Overrides
| Improve this Doc 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
| Improve this Doc 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
| Improve this Doc View SourceEquality(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 |
---|---|
Boolean |
|
Equality(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 |
---|---|
Boolean |
|
Inequality(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 |
---|---|
Boolean |
|
Inequality(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 |
---|---|
Boolean |
|
Explicit Interface Implementations
| Improve this Doc View SourceIActorRef.Path
Declaration
ActorPath IActorRef.Path { get; }
Returns
Type | Description |
---|---|
ActorPath |
ICanTell.Tell(Object, IActorRef)
Declaration
void ICanTell.Tell(object message, IActorRef sender)
Parameters
Type | Name | Description |
---|---|---|
Object | message | |
IActorRef | sender |
ISurrogated.ToSurrogate(ActorSystem)
Declaration
ISurrogate ISurrogated.ToSurrogate(ActorSystem system)
Parameters
Type | Name | Description |
---|---|---|
ActorSystem | system |
Returns
Type | Description |
---|---|
ISurrogate |
IComparable<IActorRef>.CompareTo(IActorRef)
Declaration
int IComparable<IActorRef>.CompareTo(IActorRef other)
Parameters
Type | Name | Description |
---|---|---|
IActorRef | other |
Returns
Type | Description |
---|---|
Int32 |
IEquatable<IActorRef>.Equals(IActorRef)
Declaration
bool IEquatable<IActorRef>.Equals(IActorRef other)
Parameters
Type | Name | Description |
---|---|---|
IActorRef | other |
Returns
Type | Description |
---|---|
Boolean |