Subscribe() public method

public Subscribe ( ) : Task
return Task
Exemplo n.º 1
0
 private Task <PersistentResponse> WaitForSignal(long?messageId = null)
 {
     // Wait for a signal to get triggered and return with a response
     return(_signaler.Subscribe(Signals)
            .Success(task => ProcessSignal(task, messageId))
            .Unwrap());
 }
Exemplo n.º 2
0
        private Task <PersistentResponse> WaitForSignal(long?messageId = null)
        {
            if (WaitingForSignal != null)
            {
                WaitingForSignal(this, EventArgs.Empty);
            }

            // Wait for a signal to get triggered and return with a response
            return(_signaler.Subscribe(Signals)
                   .Then((result, id) => ProcessSignal(result, id), messageId)
                   .FastUnwrap());
        }