Esempio n. 1
0
        public static TRSR <T> FromSR(TCore.SR sr)
        {
            TRSR <T> vsr = new TRSR <T>();

            vsr.Result = sr.Result;
            vsr.Reason = sr.Reason;

            return(vsr);
        }
Esempio n. 2
0
        public static RSR ToRsr(TRSR <T> sr)
        {
            RSR rsr = new RSR();

            rsr.Reason = sr.Reason;
            rsr.Result = sr.Result;

            return(rsr);
        }
Esempio n. 3
0
        public static TRSR <T> Failed(Exception e)
        {
            TRSR <T> sr = new TRSR <T>();

            sr.Result = false;
            sr.Reason = e.Message;

            return(sr);
        }
Esempio n. 4
0
        public static TRSR <T> Failed(string sReason)
        {
            TRSR <T> sr = new TRSR <T>();

            sr.Result = false;
            sr.Reason = sReason;

            return(sr);
        }
Esempio n. 5
0
        public static TRSR <T> Success()
        {
            TRSR <T> sr = new TRSR <T>();

            sr.Result = true;
            sr.Reason = null;

            return(sr);
        }