private HttpResponse SetStatus( ServiceResponseType type, HttpStatusCode httpStatusCode, string message = null) { Type = type; Code = httpStatusCode; Message = message; return(this); }
private ServiceResponse SetStatus( ServiceResponseType type, string message, string stackTrace, string code = DefaultUndefinedCode) { Type = type; Message = message; StackTrace = stackTrace; Code = code; return(this); }
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); }
public ServiceResponse(ServiceResponseType result) { Result = result; }
public ServiceResponse(T result, ServiceResponseType responseType) { Result = result; ResponseType = responseType; }