public static Session <F, E, P> Return <F, E, P>(this Session <Eps, Push <F, E>, P> session) where F : SessionType where E : SessionStack where P : ProtocolType
 {
     if (session is null)
     {
         throw new ArgumentNullException(nameof(session));
     }
     return(session.ToNextSession <F, E>());
 }
 public static Session <S8, E, Cons <S0, Cons <S1, Cons <S2, Cons <S3, Cons <S4, Cons <S5, Cons <S6, Cons <S7, Cons <S8, L> > > > > > > > > > Goto <S0, S1, S2, S3, S4, S5, S6, S7, S8, E, L>(this Session <Call8, E, Cons <S0, Cons <S1, Cons <S2, Cons <S3, Cons <S4, Cons <S5, Cons <S6, Cons <S7, Cons <S8, L> > > > > > > > > > session) where S0 : SessionType where S1 : SessionType where S2 : SessionType where S3 : SessionType where S4 : SessionType where S5 : SessionType where S6 : SessionType where S7 : SessionType where S8 : SessionType where E : SessionStack where L : SessionList
 {
     if (session is null)
     {
         throw new ArgumentNullException(nameof(session));
     }
     session.CallSimply();
     return(session.ToNextSession <S8>());
 }
 public static Session <S, E, S> Goto <S, E>(this Session <Call0, E, S> session) where S : SessionType where E : SessionStack
 {
     if (session is null)
     {
         throw new ArgumentNullException(nameof(session));
     }
     session.CallSimply();
     return(session.ToNextSession <S>());
 }
 public static Session <S3, E, Cons <S0, Cons <S1, Cons <S2, Cons <S3, L> > > > > Goto <S0, S1, S2, S3, E, L>(this Session <Call3, E, Cons <S0, Cons <S1, Cons <S2, Cons <S3, L> > > > > session) where S0 : SessionType where S1 : SessionType where S2 : SessionType where S3 : SessionType where E : SessionStack where L : SessionList
 {
     if (session is null)
     {
         throw new ArgumentNullException(nameof(session));
     }
     session.CallSimply();
     return(session.ToNextSession <S3>());
 }
 public static Session <S6, Push <Z, E>, Cons <S0, Cons <S1, Cons <S2, Cons <S3, Cons <S4, Cons <S5, Cons <S6, L> > > > > > > > Call <S0, S1, S2, S3, S4, S5, S6, Z, E, L>(this Session <Call6 <Z>, E, Cons <S0, Cons <S1, Cons <S2, Cons <S3, Cons <S4, Cons <S5, Cons <S6, L> > > > > > > > session) where S0 : SessionType where S1 : SessionType where S2 : SessionType where S3 : SessionType where S4 : SessionType where S5 : SessionType where S6 : SessionType where Z : SessionType where E : SessionStack where L : SessionList
 {
     if (session is null)
     {
         throw new ArgumentNullException(nameof(session));
     }
     session.CallSimply();
     return(session.ToNextSession <S6, Push <Z, E> >());
 }
 public static Session <S1, Push <Z, E>, Cons <S0, Cons <S1, L> > > Call <S0, S1, Z, E, L>(this Session <Call1 <Z>, E, Cons <S0, Cons <S1, L> > > session) where S0 : SessionType where S1 : SessionType where Z : SessionType where E : SessionStack where L : SessionList
 {
     if (session is null)
     {
         throw new ArgumentNullException(nameof(session));
     }
     session.CallSimply();
     return(session.ToNextSession <S1, Push <Z, E> >());
 }
 public static Session <S, Push <Z, E>, S> Call <S, Z, E>(this Session <Call0 <Z>, E, S> session) where S : SessionType where Z : SessionType where E : SessionStack
 {
     if (session is null)
     {
         throw new ArgumentNullException(nameof(session));
     }
     session.CallSimply();
     return(session.ToNextSession <S, Push <Z, E> >());
 }
Example #8
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>());
 }
Example #9
0
 public static Session <S, E, P> Send <S, E, P>(this Session <Send <S>, E, P> session) where S : SessionType where E : SessionStack where P : ProtocolType
 {
     if (session is null)
     {
         throw new ArgumentNullException(nameof(session));
     }
     session.Send();
     return(session.ToNextSession <S>());
 }
Example #10
0
 public static Session <S, E, P> SendAsync <S, E, P, T>(this Session <Send <T, S>, E, P> session, T value, out Task task) where S : SessionType where E : SessionStack where P : ProtocolType
 {
     if (session is null)
     {
         throw new ArgumentNullException(nameof(session));
     }
     task = session.SendAsync(value);
     return(session.ToNextSession <S>());
 }
        public static Session <Z, E, Cons <S0, Cons <S1, Cons <S2, Cons <S3, Cons <S4, Cons <S5, Cons <S6, Cons <S7, Cons <S8, Cons <S9, L> > > > > > > > > > > Call <S0, S1, S2, S3, S4, S5, S6, S7, S8, S9, Z, E, L>(this Session <Call9 <Z>, E, Cons <S0, Cons <S1, Cons <S2, Cons <S3, Cons <S4, Cons <S5, Cons <S6, Cons <S7, Cons <S8, Cons <S9, L> > > > > > > > > > > session, DepletionFunc <S9, Cons <S0, Cons <S1, Cons <S2, Cons <S3, Cons <S4, Cons <S5, Cons <S6, Cons <S7, Cons <S8, Cons <S9, L> > > > > > > > > > > depletion) where S0 : SessionType where S1 : SessionType where S2 : SessionType where S3 : SessionType where S4 : SessionType where S5 : SessionType where S6 : SessionType where S7 : SessionType where S8 : SessionType where S9 : SessionType where Z : SessionType where E : SessionStack where L : SessionList
        {
            if (session is null)
            {
                throw new ArgumentNullException(nameof(session));
            }
            if (depletion is null)
            {
                throw new ArgumentNullException(nameof(depletion));
            }
            session.CallSimply();
            var depleted = depletion(session.ToNextSession <S9, Any>(), depletion);

            depleted.CallSimply();
            return(depleted.ToNextSession <Z, E>());
        }
        public static Session <Z, E, Cons <S0, Cons <S1, Cons <S2, L> > > > Call <S0, S1, S2, Z, E, L>(this Session <Call2 <Z>, E, Cons <S0, Cons <S1, Cons <S2, L> > > > session, DepletionFunc <S2, Cons <S0, Cons <S1, Cons <S2, L> > > > depletion) where S0 : SessionType where S1 : SessionType where S2 : SessionType where Z : SessionType where E : SessionStack where L : SessionList
        {
            if (session is null)
            {
                throw new ArgumentNullException(nameof(session));
            }
            if (depletion is null)
            {
                throw new ArgumentNullException(nameof(depletion));
            }
            session.CallSimply();
            var depleted = depletion(session.ToNextSession <S2, Any>(), depletion);

            depleted.CallSimply();
            return(depleted.ToNextSession <Z, E>());
        }
        public static Session <Z, E, S> Call <S, Z, E>(this Session <Call0 <Z>, E, S> session, DepletionFunc <S, S> depletion) where S : SessionType where Z : SessionType where E : SessionStack
        {
            if (session is null)
            {
                throw new ArgumentNullException(nameof(session));
            }
            if (depletion is null)
            {
                throw new ArgumentNullException(nameof(depletion));
            }
            session.CallSimply();
            var depleted = depletion(session.ToNextSession <S, Any>(), depletion);

            depleted.CallSimply();
            return(depleted.ToNextSession <Z, E>());
        }