예제 #1
0
 private HttpResponse SetStatus(
     ServiceResponseType type,
     HttpStatusCode httpStatusCode,
     string message = null)
 {
     Type    = type;
     Code    = httpStatusCode;
     Message = message;
     return(this);
 }
예제 #2
0
 private ServiceResponse SetStatus(
     ServiceResponseType type,
     string message,
     string stackTrace,
     string code = DefaultUndefinedCode)
 {
     Type       = type;
     Message    = message;
     StackTrace = stackTrace;
     Code       = code;
     return(this);
 }
예제 #3
0
 protected async Task <bool> ProcessResponse(ServiceResponseType response, bool showDialog = true)
 {
     if (response == ServiceResponseType.ERROR)
     {
         if (showDialog)
         {
             await OnError();
         }
         return(false);
     }
     else if (response == ServiceResponseType.NO_CONNECTION)
     {
         if (showDialog)
         {
             await OnNoConnection();
         }
         return(false);
     }
     else if (response == ServiceResponseType.SUCCESS)
     {
         return(true);
     }
     return(false);
 }
예제 #4
0
 public ServiceResponse(ServiceResponseType result)
 {
     Result = result;
 }
예제 #5
0
 public ServiceResponse(T result, ServiceResponseType responseType)
 {
     Result       = result;
     ResponseType = responseType;
 }