public void Handle(IHandleResult <T> handler)
        {
            switch (Type)
            {
            case EventType.Data:
                handler.HandleData(Data);
                break;

            case EventType.Done:
                handler.HandleDone();
                break;

            case EventType.ErrorAndDone:
                handler.HandleError(Error);
                handler.HandleDone();
                break;

            default: throw new ArgumentOutOfRangeException();
            }
        }
 public void AndThen(IHandleResult <TOut> downstream)
 {
     ResultGenerated += evt => evt.Handle(downstream);
     _listeners.Add(downstream);
 }