From 4cf4c1e3834d80f0616d8ad1452ee1ab5b040cc0 Mon Sep 17 00:00:00 2001 From: HCanber Date: Tue, 31 Mar 2015 20:52:01 +0200 Subject: [PATCH] Rename AutoReceivedMessage > IAutoReceivedMessage #652 --- .../Akka.TestKit/Internal/InternalTestActorRef.cs | 2 +- src/core/Akka/Actor/ActorCell.DefaultMessages.cs | 2 +- src/core/Akka/Actor/ActorSelection.cs | 2 +- src/core/Akka/Actor/AutoReceivedMessage.cs | 12 ++++++------ src/core/Akka/Routing/RouterConfig.cs | 2 +- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/core/Akka.TestKit/Internal/InternalTestActorRef.cs b/src/core/Akka.TestKit/Internal/InternalTestActorRef.cs index 45f8de625a4..00a75406144 100644 --- a/src/core/Akka.TestKit/Internal/InternalTestActorRef.cs +++ b/src/core/Akka.TestKit/Internal/InternalTestActorRef.cs @@ -190,7 +190,7 @@ protected override void AutoReceiveMessage(Envelope envelope) } - public class InternalGetActor : AutoReceivedMessage, PossiblyHarmful + public class InternalGetActor : IAutoReceivedMessage, PossiblyHarmful { public static readonly InternalGetActor Instance = new InternalGetActor(); private InternalGetActor() { } diff --git a/src/core/Akka/Actor/ActorCell.DefaultMessages.cs b/src/core/Akka/Actor/ActorCell.DefaultMessages.cs index 7d3f51a73e2..4519db2daaa 100644 --- a/src/core/Akka/Actor/ActorCell.DefaultMessages.cs +++ b/src/core/Akka/Actor/ActorCell.DefaultMessages.cs @@ -41,7 +41,7 @@ public void Invoke(Envelope envelope) try { - var autoReceivedMessage = message as AutoReceivedMessage; + var autoReceivedMessage = message as IAutoReceivedMessage; if (autoReceivedMessage != null) AutoReceiveMessage(envelope); else diff --git a/src/core/Akka/Actor/ActorSelection.cs b/src/core/Akka/Actor/ActorSelection.cs index 64913ecb26a..87ed8e0f56f 100644 --- a/src/core/Akka/Actor/ActorSelection.cs +++ b/src/core/Akka/Actor/ActorSelection.cs @@ -197,7 +197,7 @@ public override int GetHashCode() /// /// Class ActorSelectionMessage. /// - public class ActorSelectionMessage : AutoReceivedMessage, PossiblyHarmful + public class ActorSelectionMessage : IAutoReceivedMessage, PossiblyHarmful { /// /// Initializes a new instance of the class. diff --git a/src/core/Akka/Actor/AutoReceivedMessage.cs b/src/core/Akka/Actor/AutoReceivedMessage.cs index d685429124b..13d30fb8aed 100644 --- a/src/core/Akka/Actor/AutoReceivedMessage.cs +++ b/src/core/Akka/Actor/AutoReceivedMessage.cs @@ -2,12 +2,12 @@ namespace Akka.Actor { - public interface AutoReceivedMessage : NoSerializationVerificationNeeded + public interface IAutoReceivedMessage : NoSerializationVerificationNeeded { } public sealed class - Terminated : AutoReceivedMessage, PossiblyHarmful + Terminated : IAutoReceivedMessage, PossiblyHarmful { public Terminated(IActorRef actorRef, bool existenceConfirmed, bool addressTerminated) { @@ -30,7 +30,7 @@ public override string ToString() } //request to an actor ref, to get back the identity of the underlying actors - public sealed class Identify : AutoReceivedMessage + public sealed class Identify : IAutoReceivedMessage { public Identify(object messageId) { @@ -71,7 +71,7 @@ public override string ToString() /// it processes the message, which gets handled using the normal supervisor mechanism, and /// which causes the actor to stop without processing any more messages. /// - public sealed class PoisonPill : AutoReceivedMessage + public sealed class PoisonPill : IAutoReceivedMessage { private PoisonPill() { } private static readonly PoisonPill _instance = new PoisonPill(); @@ -97,7 +97,7 @@ public override string ToString() /// is processed, without throwing an exception, and /// which causes the actor to stop without processing any more messages. /// - public sealed class Kill : AutoReceivedMessage + public sealed class Kill : IAutoReceivedMessage { private Kill() { } @@ -128,7 +128,7 @@ public override string ToString() /// The watcher subscribes to the and translates this /// event to , which is sent to itself. /// - internal class AddressTerminated : AutoReceivedMessage, PossiblyHarmful + internal class AddressTerminated : IAutoReceivedMessage, PossiblyHarmful { public AddressTerminated(Address address) { diff --git a/src/core/Akka/Routing/RouterConfig.cs b/src/core/Akka/Routing/RouterConfig.cs index 0667ffa8c66..b79d2bd2122 100644 --- a/src/core/Akka/Routing/RouterConfig.cs +++ b/src/core/Akka/Routing/RouterConfig.cs @@ -34,7 +34,7 @@ public virtual RouterConfig WithFallback(RouterConfig routerConfig) public virtual bool IsManagementMessage(object message) { return - message is AutoReceivedMessage || + message is IAutoReceivedMessage || // in akka.net this message is a subclass of AutoReceivedMessage - so removed condition that "message is Terminated ||" message is RouterManagementMesssage; }