Akka.Streams.Tests.Actor.ManualSubscriber.Receive C# (CSharp) Method

Receive() protected method

protected Receive ( object message ) : bool
message object
return bool
        protected override bool Receive(object message)
        {
            return message.Match()
                .With<OnNext>(_probe.Tell)
                .With<OnComplete>(_probe.Tell)
                .With<OnError>(_probe.Tell)
                .With<string>(s =>
                {
                    if (s.Equals("ready"))
                        Request(2);
                    else if (s.Equals("boom"))
                        throw new SystemException(s);
                    else if (s.Equals("requestAndCancel"))
                    {
                        Request(1);
                        Cancel();
                    }
                    else if (s.Equals("cancel"))
                        Cancel();
                })
                .WasHandled;
        }
    }