ApiResultUtils
Assembly: ServiceStack.Client.dll
View Source
public static class ApiResultUtils
Methods
ThrowIfError<TResponse>(ApiResult<TResponse>)
View Source
public static void ThrowIfError<TResponse>(this ApiResult<TResponse> api)
Parameters
Type | Name |
---|---|
ServiceStack.ApiResult<TResponse> | api |
Type Parameters
TResponse
ToApiResult<TResponse>(Exception)
View Source
public static ApiResult<TResponse> ToApiResult<TResponse>(this Exception ex)
Returns
ServiceStack.ApiResult<TResponse>
Parameters
Type | Name |
---|---|
System.Exception | ex |
Type Parameters
TResponse
ToApiResult(Exception)
View Source
public static ApiResult<EmptyResponse> ToApiResult(this Exception ex)
Returns
ServiceStack.ApiResult<TResponse>
Parameters
Type | Name |
---|---|
System.Exception | ex |
Api<TResponse>(IServiceClient, IReturn<TResponse>)
Annotate Request DTOs with IGet, IPost, etc HTTP Verb markers to specify which HTTP Method is used: https://docs.servicestack.net/csharp-client.html#http-verb-interface-markers
View Source
public static ApiResult<TResponse> Api<TResponse>(this IServiceClient client, IReturn<TResponse> request)
Returns
ServiceStack.ApiResult<TResponse>
Parameters
Type | Name |
---|---|
ServiceStack.IServiceClient | client |
ServiceStack.IReturn<T> | request |
Type Parameters
TResponse
ApiAsync<TResponse>(IServiceClient, IReturn<TResponse>)
Annotate Request DTOs with IGet, IPost, etc HTTP Verb markers to specify which HTTP Method is used: https://docs.servicestack.net/csharp-client.html#http-verb-interface-markers
View Source
public static async Task<ApiResult<TResponse>> ApiAsync<TResponse>(this IServiceClient client, IReturn<TResponse> request)
Returns
System.Threading.Tasks.Task<ServiceStack.ApiResult<<TResponse>>>
Parameters
Type | Name |
---|---|
ServiceStack.IServiceClient | client |
ServiceStack.IReturn<T> | request |
Type Parameters
TResponse
Api(IServiceClient, IReturnVoid)
Annotate Request DTOs with IGet, IPost, etc HTTP Verb markers to specify which HTTP Method is used: https://docs.servicestack.net/csharp-client.html#http-verb-interface-markers
View Source
public static ApiResult<EmptyResponse> Api(this IServiceClient client, IReturnVoid request)
Returns
ServiceStack.ApiResult<TResponse>
Parameters
Type | Name |
---|---|
ServiceStack.IServiceClient | client |
ServiceStack.IReturnVoid | request |
ApiAsync(IServiceClient, IReturnVoid)
Annotate Request DTOs with IGet, IPost, etc HTTP Verb markers to specify which HTTP Method is used: https://docs.servicestack.net/csharp-client.html#http-verb-interface-markers
View Source
public static async Task<ApiResult<EmptyResponse>> ApiAsync(this IServiceClient client, IReturnVoid request)
Returns
System.Threading.Tasks.Task<ServiceStack.ApiResult<ServiceStack.EmptyResponse>>
Parameters
Type | Name |
---|---|
ServiceStack.IServiceClient | client |
ServiceStack.IReturnVoid | request |
ToAuthenticateResponse(RegisterResponse)
Convert AutoLogin RegisterResponse into AuthenticateResponse to avoid additional trip
View Source
public static AuthenticateResponse ToAuthenticateResponse(this RegisterResponse from)
Returns
ServiceStack.AuthenticateResponse
Parameters
Type | Name |
---|---|
ServiceStack.RegisterResponse | from |