ApiResult
Assembly: ServiceStack.Client.dll
View Source
Declaration
public static class ApiResult
Fields
FieldErrorCode
View Source
Declaration
public const string FieldErrorCode = "ValidationException"
Methods
Create<TResponse>(TResponse)
View Source
Declaration
public static ApiResult<TResponse> Create<TResponse>(TResponse response)
Returns
ServiceStack.ApiResult<TResponse>
Parameters
Type | Name |
---|---|
<TResponse> | response |
Type Parameters
TResponse
CreateError<TResponse>(ResponseStatus)
View Source
Declaration
public static ApiResult<TResponse> CreateError<TResponse>(ResponseStatus errorStatus)
Returns
ServiceStack.ApiResult<TResponse>
Parameters
Type | Name |
---|---|
ServiceStack.ResponseStatus | errorStatus |
Type Parameters
TResponse
CreateError(ResponseStatus)
View Source
Declaration
public static ApiResult<EmptyResponse> CreateError(ResponseStatus errorStatus)
Returns
ServiceStack.ApiResult<TResponse>
Parameters
Type | Name |
---|---|
ServiceStack.ResponseStatus | errorStatus |
CreateError<TResponse>(String, String)
View Source
Declaration
public static ApiResult<TResponse> CreateError<TResponse>(string message, string errorCode = "Exception")
Returns
ServiceStack.ApiResult<TResponse>
Parameters
Type | Name |
---|---|
System.String | message |
System.String | errorCode |
Type Parameters
TResponse
CreateError(String, String)
View Source
Declaration
public static ApiResult<EmptyResponse> CreateError(string message, string errorCode = "Exception")
Returns
ServiceStack.ApiResult<TResponse>
Parameters
Type | Name |
---|---|
System.String | message |
System.String | errorCode |
CreateError<TResponse>(Exception)
View Source
Declaration
public static ApiResult<TResponse> CreateError<TResponse>(Exception ex)
Returns
ServiceStack.ApiResult<TResponse>
Parameters
Type | Name |
---|---|
System.Exception | ex |
Type Parameters
TResponse
CreateError(Exception)
View Source
Declaration
public static ApiResult<EmptyResponse> CreateError(Exception ex)
Returns
ServiceStack.ApiResult<TResponse>
Parameters
Type | Name |
---|---|
System.Exception | ex |
CreateFieldError<TResponse>(String, String, String)
View Source
Declaration
public static ApiResult<TResponse> CreateFieldError<TResponse>(string fieldName, string message, string errorCode = "ValidationException")
Returns
ServiceStack.ApiResult<TResponse>
Parameters
Type | Name |
---|---|
System.String | fieldName |
System.String | message |
System.String | errorCode |
Type Parameters
TResponse
CreateFieldError(String, String, String)
View Source
Declaration
public static ApiResult<EmptyResponse> CreateFieldError(string fieldName, string message, string errorCode = "ValidationException")
Returns
ServiceStack.ApiResult<TResponse>
Parameters
Type | Name |
---|---|
System.String | fieldName |
System.String | message |
System.String | errorCode |