Akka.Cluster.Tools.Tests.Singleton.PointToPointChannel.Active C# (CSharp) Метод

Active() приватный Метод

private Active ( IActorRef consumer ) : UntypedReceive
consumer IActorRef
Результат UntypedReceive
        private UntypedReceive Active(IActorRef consumer)
        {
            return message =>
            {
                message.Match()
                    .With<UnregisterConsumer>(_ =>
                    {
                        if (Sender.Equals(consumer))
                        {
                            _log.Info("Unregistration ok: [{0}]", Sender.Path);
                            Sender.Tell(UnregistrationOk.Instance);
                            Context.Become(Idle);
                        }
                        else
                        {
                            _log.Info("Unexpected unregistration: [{0}], expected: [{1}]", Sender.Path, consumer.Path);
                            Sender.Tell(UnexpectedUnregistration.Instance);
                            Context.Stop(Self);
                        }
                    })
                    .With<RegisterConsumer>(_ =>
                    {
                        _log.Info("Unexpected registration: [{0}], active consumer: [{1}]", Sender.Path, consumer.Path);
                        Sender.Tell(UnexpectedRegistration.Instance);
                        Context.Stop(Self);
                    })
                    .With<Reset>(_ =>
                    {
                        Context.Become(Idle);
                        Sender.Tell(ResetOk.Instance);
                    })
                    .Default(m => Sender.Tell(m));
            };
        }