C# Class Akka.TestKit.Internal.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. Note! Part of internal API. Breaking changes may occur without notice. Use at own risk.
Inheritance: Akka.Actor.LocalActorRef
Datei anzeigen Open project: rogeralsing/akka.net Class Usage Examples

Public Methods

Method Description
Create ( ActorSystem system, Props props, IActorRef supervisor = null, string name = null ) : InternalTestActorRef

INTERNAL Note! Part of internal API. Breaking changes may occur without notice. Use at own risk.

CreateUniqueName ( ) : string

INTERNAL Note! Part of internal API. Breaking changes may occur without notice. Use at own risk.

Receive ( object message, IActorRef sender = null ) : void

Directly inject messages into actor receive behavior. Any exceptions thrown will be available to you, while still being able to use become/unbecome.

ToString ( ) : string
Unwatch ( IActorRef subject ) : void

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.

Watch ( IActorRef subject ) : void

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.

Protected Methods

Method Description
GetTestActorCell ( ) : TestActorCell
NewActorCell ( ActorSystem system, LocalActorRef actorRef, Props props, MessageDispatcher dispatcher, IInternalActorRef supervisor, Func createMailbox ) : ActorCell

Private Methods

Method Description
InternalTestActorRef ( ActorSystem system, Props props, MessageDispatcher dispatcher, Func createMailbox, IInternalActorRef supervisor, ActorPath path ) : System

Method Details

Create() public static method

INTERNAL Note! Part of internal API. Breaking changes may occur without notice. Use at own risk.
public static Create ( ActorSystem system, Props props, IActorRef supervisor = null, string name = null ) : InternalTestActorRef
system ActorSystem
props Props
supervisor IActorRef
name string
return InternalTestActorRef

CreateUniqueName() public static method

INTERNAL Note! Part of internal API. Breaking changes may occur without notice. Use at own risk.
public static CreateUniqueName ( ) : string
return string

GetTestActorCell() protected method

protected GetTestActorCell ( ) : TestActorCell
return TestActorCell

NewActorCell() protected static method

protected static NewActorCell ( ActorSystem system, LocalActorRef actorRef, Props props, MessageDispatcher dispatcher, IInternalActorRef supervisor, Func createMailbox ) : ActorCell
system ActorSystem
actorRef Akka.Actor.LocalActorRef
props Props
dispatcher Akka.Dispatch.MessageDispatcher
supervisor IInternalActorRef
createMailbox Func
return Akka.Actor.ActorCell

Receive() public method

Directly inject messages into actor receive behavior. Any exceptions thrown will be available to you, while still being able to use become/unbecome.
public Receive ( object message, IActorRef sender = null ) : void
message object The message.
sender IActorRef The sender.
return void

ToString() public method

public ToString ( ) : string
return string

Unwatch() public method

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 Unwatch ( IActorRef subject ) : void
subject IActorRef The subject to unwatch.
return void

Watch() public method

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 Watch ( IActorRef subject ) : void
subject IActorRef The subject to watch.
return void