コード例 #1
0
        public static ContentReceiveResult <T> Success(T data)
        {
            var result = new ContentReceiveResult <T>();

            result.ErrorMessage = null;
            result.Data         = data;

            return(result);
        }
コード例 #2
0
        public static ContentReceiveResult <T> Error(string message = null)
        {
            if (message == null)
            {
                message = "Unknown error";
            }

            var result = new ContentReceiveResult <T>();

            result.ErrorMessage = message;

            return(result);
        }