Akka.Actor.ActorCell.Watch C# (CSharp) Method

Watch() public method

public Watch ( IActorRef subject ) : IActorRef
subject IActorRef
return IActorRef
        public IActorRef Watch(IActorRef subject)
        {
            var a = (IInternalActorRef)subject;

            if (!a.Equals(Self) && !WatchingContains(a))
            {
                MaintainAddressTerminatedSubscription(() =>
                {
                    a.SendSystemMessage(new Watch(a, _self)); // ➡➡➡ NEVER SEND THE SAME SYSTEM MESSAGE OBJECT TO TWO ACTORS
                    _state = _state.AddWatching(a);
                }, a);
            }
            return a;
        }