Skip to main content

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
TypeName
<TResponse>response
Type Parameters
  • TResponse

CreateError<TResponse>(ResponseStatus)

View Source
Declaration
public static ApiResult<TResponse> CreateError<TResponse>(ResponseStatus errorStatus)
Returns

ServiceStack.ApiResult<TResponse>

Parameters
TypeName
ServiceStack.ResponseStatuserrorStatus
Type Parameters
  • TResponse

CreateError(ResponseStatus)

View Source
Declaration
public static ApiResult<EmptyResponse> CreateError(ResponseStatus errorStatus)
Returns

ServiceStack.ApiResult<TResponse>

Parameters
TypeName
ServiceStack.ResponseStatuserrorStatus

CreateError<TResponse>(String, String)

View Source
Declaration
public static ApiResult<TResponse> CreateError<TResponse>(string message, string errorCode = "Exception")
Returns

ServiceStack.ApiResult<TResponse>

Parameters
TypeName
System.Stringmessage
System.StringerrorCode
Type Parameters
  • TResponse

CreateError(String, String)

View Source
Declaration
public static ApiResult<EmptyResponse> CreateError(string message, string errorCode = "Exception")
Returns

ServiceStack.ApiResult<TResponse>

Parameters
TypeName
System.Stringmessage
System.StringerrorCode

CreateError<TResponse>(Exception)

View Source
Declaration
public static ApiResult<TResponse> CreateError<TResponse>(Exception ex)
Returns

ServiceStack.ApiResult<TResponse>

Parameters
TypeName
System.Exceptionex
Type Parameters
  • TResponse

CreateError(Exception)

View Source
Declaration
public static ApiResult<EmptyResponse> CreateError(Exception ex)
Returns

ServiceStack.ApiResult<TResponse>

Parameters
TypeName
System.Exceptionex

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
TypeName
System.StringfieldName
System.Stringmessage
System.StringerrorCode
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
TypeName
System.StringfieldName
System.Stringmessage
System.StringerrorCode