Exemple #1
0
 public static void TrySetNngError <T>(this CancellationTokenTaskSource <NngResult <T> > socket, int error)
 {
     if (error == 0)
     {
         return;
     }
     socket.TrySetResult(NngResult <T> .Fail(error));
 }
Exemple #2
0
 public static void TrySetNngResult <T>(this CancellationTokenTaskSource <NngResult <T> > socket, T message)
 {
     socket.TrySetResult(NngResult <T> .Ok(message));
 }
Exemple #3
0
 public static void TrySetNngError <T>(this CancellationTokenTaskSource <NngResult <T> > socket, NngErrno error)
 {
     socket.TrySetResult(NngResult <T> .Fail(error));
 }