Example #1
0
 public static Session <S, E, P> Receive <S, E, P, T>(this Session <Receive <T, S>, E, P> session, out T value) where S : SessionType where E : SessionStack where P : ProtocolType
 {
     if (session is null)
     {
         throw new ArgumentNullException(nameof(session));
     }
     value = session.Receive <T>();
     return(session.ToNextSession <S>());
 }