void IActorBoundChannelObserver.ChannelOpen(IActorBoundChannel channel, object tag) { _channel = (ActorBoundChannelRef)channel; if (_id.StartsWith("bot") == false) { _eventObserver.Channel = new AkkaReceiverNotificationChannel(((ActorBoundChannelRef)channel).CastToIActorRef()); } }
void IActorBoundChannelObserver.ChannelClose(IActorBoundChannel channel, object tag) { if (tag == null) return; // Deactivate observer bound to closed channel var userId = (long)tag; var player = _players.FirstOrDefault(p => p.UserId == userId); if (player != null) player.Observer = null; }
void IActorBoundChannelObserver.ChannelOpen(IActorBoundChannel channel, object tag) { if (tag == null) return; // Change notification message route to open channel var userId = (long)tag; var player = _players.FirstOrDefault(p => p.UserId == userId); if (player != null && player.Observer != null) { AkkaReceiverNotificationChannel.OverrideReceiver( player.Observer.Channel, ((ActorBoundChannelRef)channel).CastToIActorRef()); } }
void IActorBoundChannelObserver.ChannelClose(IActorBoundChannel channel, object tag) { // Deactivate observer bound to closed channel var userId = tag as string; if (userId != null) { UserData userData; if (_userMap.TryGetValue(userId, out userData)) { userData.Observer = null; } } }
void IActorBoundChannelObserver.ChannelClose(IActorBoundChannel channel, object tag) { if (tag == null) { return; } // Deactivate observer bound to closed channel var userId = (long)tag; var player = _players.FirstOrDefault(p => p.UserId == userId); if (player != null) { player.Observer = null; } }
void IActorBoundChannelObserver.ChannelOpen(IActorBoundChannel channel, object tag) { if (tag == null) { return; } // Change notification message route to open channel var userId = (long)tag; var player = _players.FirstOrDefault(p => p.UserId == userId); if (player != null && player.Observer != null) { AkkaReceiverNotificationChannel.OverrideReceiver( player.Observer.Channel, ((ActorBoundChannelRef)channel).CastToIActorRef()); } }
void IActorBoundChannelObserver.ChannelOpen(IActorBoundChannel channel, object tag) { // Change notification message route to open channel var userId = tag as string; if (userId != null) { UserData userData; if (_userMap.TryGetValue(userId, out userData)) { var actorChannel = userData.Observer.Channel as AkkaReceiverNotificationChannel; if (actorChannel != null) { userData.Observer.Channel = new AkkaReceiverNotificationChannel(((ActorBoundChannelRef)channel).CastToIActorRef()); } } } }
void IActorBoundChannelObserver.ChannelClose(IActorBoundChannel channel, object tag) { _channel = null; }
void IActorBoundChannelObserver.ChannelOpen(IActorBoundChannel channel, object tag) { _channel = (ActorBoundChannelRef)channel; }
void IActorBoundChannelObserver.ChannelClose(IActorBoundChannel channel, object tag) { _tagByChannelClose = tag; Self.Tell(InterfacedPoisonPill.Instance); }
void IActorBoundChannelObserver.ChannelOpen(IActorBoundChannel channel, object tag) { _tagByChannelOpen = tag; }