Exemple #1
0
        private string CreateResponse <K>(RestServiceResultCode code, string message, K data)
        {
            var standardResponse = new StandartResponse <K>()
            {
                Message    = "",
                ResultCode = RestServiceResultCode.OK,
                Data       = data
            };
            //this.responseCreated = true;
            var ret = JsonSerializer.Serialize(standardResponse);

            return(ret);
        }
Exemple #2
0
 private JSONBaseResponse <JSONEmpty> createReturnObject(string errorToSend, RestServiceResultCode resultCode)
 {
     return(new JSONBaseResponse <JSONEmpty> {
         ResultCode = resultCode, Message = errorToSend
     });
 }