コード例 #1
0
        public static ObjectUploadResponse CreateSuccess(string objectId)
        {
            ObjectUploadResponse res = new ObjectUploadResponse();

            res.api_ret_code    = 0;
            res.api_ret_message = "Success";
            res.status          = 200;
            res.timestamp       = DateTime.Now.ToUniversalTime();
            res.object_id       = objectId;

            return(res);
        }
コード例 #2
0
        public static ObjectUploadResponse CreateFailure(string objectId,
                                                         int httpStatus, Exception e)
        {
            ObjectUploadResponse res = new ObjectUploadResponse();

            res.api_ret_code    = -1;
            res.api_ret_message = e.Message;
            res.status          = httpStatus;
            res.timestamp       = DateTime.Now.ToUniversalTime();
            res.object_id       = objectId;

            return(res);
        }