コード例 #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);
        }
コード例 #2
0
        public static RSR ToRsr(TRSR <T> sr)
        {
            RSR rsr = new RSR();

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

            return(rsr);
        }
コード例 #3
0
        public static TRSR <T> Failed(Exception e)
        {
            TRSR <T> sr = new TRSR <T>();

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

            return(sr);
        }
コード例 #4
0
        public static TRSR <T> Failed(string sReason)
        {
            TRSR <T> sr = new TRSR <T>();

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

            return(sr);
        }
コード例 #5
0
        public static TRSR <T> Success()
        {
            TRSR <T> sr = new TRSR <T>();

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

            return(sr);
        }