Search Results for

    Show / Hide Table of Contents

    Class TestActorRefBase<TActor>

    This is the base class for TestActorRefs

    Inheritance
    object
    TestActorRefBase<TActor>
    TestActorRef<TActor>
    TestFSMRef<TActor, TState, TData>
    Implements
    IActorRef
    ICanTell
    IEquatable<IActorRef>
    IComparable<IActorRef>
    ISurrogated
    IComparable
    Inherited Members
    object.Equals(object, object)
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    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 Source

    TestActorRefBase(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 Source

    InternalRef

    TBD

    Declaration
    protected InternalTestActorRef InternalRef { get; }
    Property Value
    Type Description
    InternalTestActorRef
    | Edit this page View Source

    Path

    Gets the path of this instance

    Declaration
    public ActorPath Path { get; }
    Property Value
    Type Description
    ActorPath
    | Edit this page View Source

    Ref

    TBD

    Declaration
    public IActorRef Ref { get; }
    Property Value
    Type Description
    IActorRef
    | Edit this page View Source

    UnderlyingActor

    TBD

    Declaration
    public TActor UnderlyingActor { get; }
    Property Value
    Type Description
    TActor

    Methods

    | Edit this page View Source

    CompareTo(object)

    Declaration
    public int CompareTo(object obj)
    Parameters
    Type Name Description
    object obj
    Returns
    Type Description
    int
    | Edit this page View Source

    Equals(IActorRef)

    Declaration
    public bool Equals(IActorRef other)
    Parameters
    Type Name Description
    IActorRef other
    Returns
    Type Description
    bool
    | Edit this page View Source

    Equals(object)

    Declaration
    public override bool Equals(object obj)
    Parameters
    Type Name Description
    object obj
    Returns
    Type Description
    bool
    Overrides
    object.Equals(object)
    | Edit this page View Source

    Forward(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.

    | Edit this page View Source

    GetHashCode()

    Declaration
    public override int GetHashCode()
    Returns
    Type Description
    int
    Overrides
    object.GetHashCode()
    | Edit this page View Source

    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. 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.

    | Edit this page View Source

    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
    | Edit this page View Source

    SendSystemMessage(ISystemMessage)

    TBD

    Declaration
    public void SendSystemMessage(ISystemMessage message)
    Parameters
    Type Name Description
    ISystemMessage message

    TBD

    | Edit this page View Source

    SendSystemMessage(ISystemMessage, IActorRef)

    TBD

    Declaration
    public void SendSystemMessage(ISystemMessage message, IActorRef sender)
    Parameters
    Type Name Description
    ISystemMessage message

    TBD

    IActorRef sender

    TBD

    | Edit this page View Source

    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.

    | Edit this page View Source

    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

    | Edit this page View Source

    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

    | Edit this page View Source

    ToString()

    Declaration
    public override string ToString()
    Returns
    Type Description
    string
    Overrides
    object.ToString()
    | Edit this page View Source

    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.

    Declaration
    public void Unwatch(IActorRef subject)
    Parameters
    Type Name Description
    IActorRef subject

    The subject to unwatch.

    | Edit this page View Source

    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 Source

    operator ==(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

    true if both actors are equal; otherwise false

    | Edit this page View Source

    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

    true if both actors are equal; otherwise false

    | Edit this page View Source

    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

    true if both actors are not equal; otherwise false

    | Edit this page View Source

    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

    true if both actors are not equal; otherwise false

    Implements

    IActorRef
    ICanTell
    IEquatable<T>
    IComparable<T>
    ISurrogated
    IComparable

    Extension Methods

    ActorRefExtensions.GetOrElse(IActorRef, Func<IActorRef>)
    ActorRefExtensions.IsNobody(IActorRef)
    ActorRefImplicitSenderExtensions.Forward(IActorRef, object)
    ActorRefImplicitSenderExtensions.Tell(IActorRef, object)
    GracefulStopSupport.GracefulStop(IActorRef, TimeSpan)
    GracefulStopSupport.GracefulStop(IActorRef, TimeSpan, object)
    WatchAsyncSupport.WatchAsync(IActorRef, CancellationToken)
    Futures.Ask(ICanTell, object, TimeSpan?)
    Futures.Ask(ICanTell, object, TimeSpan?, CancellationToken)
    Futures.Ask(ICanTell, object, CancellationToken)
    Futures.Ask<T>(ICanTell, Func<IActorRef, object>, TimeSpan?, CancellationToken)
    Futures.Ask<T>(ICanTell, object, TimeSpan?)
    Futures.Ask<T>(ICanTell, object, TimeSpan?, CancellationToken)
    Futures.Ask<T>(ICanTell, object, CancellationToken)
    ObjectExtensions.IsDefaultForType<T>(T)
    ObjectExtensions.AsOption<T>(T)
    Extensions.AsInstanceOf<T>(object)
    In this article
    • githubEdit this page
    • View Source
    Back to top
    Contribute
    • Project Chat
    • Discussion Forum
    • Source Code
    Support
    • Akka.NET Support Plans
    • Akka.NET Observability Tools
    • Akka.NET Training & Consulting
    Maintained By
    • Petabridge - The Akka.NET Company
    • Learn Akka.NET