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
Afficher le fichier Open project: rogeralsing/akka.net Class Usage Examples

Méthodes publiques

Méthode 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.

Méthodes protégées

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

Private Methods

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

Method Details

Create() public static méthode

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
Résultat InternalTestActorRef

CreateUniqueName() public static méthode

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

GetTestActorCell() protected méthode

protected GetTestActorCell ( ) : TestActorCell
Résultat TestActorCell

NewActorCell() protected static méthode

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
Résultat Akka.Actor.ActorCell

Receive() public méthode

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.
Résultat void

ToString() public méthode

public ToString ( ) : string
Résultat string

Unwatch() public méthode

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.
Résultat void

Watch() public méthode

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.
Résultat void