GrpcServiceClient
Assembly: ServiceStack.GrpcClient.dll
Declaration
public class GrpcServiceClient : IRestServiceClient, IServiceClientAsync, IServiceGatewayAsync, IRestClientAsync, IServiceClientSync, IServiceGateway, IRestClientSync, IServiceClientCommon, IHasSessionId, IHasBearerToken, IHasVersion
Properties
Config
Declaration
public GrpcClientConfig Config { get; }
SessionId
Declaration
public string SessionId { get; set; }
BearerToken
Declaration
public string BearerToken { get; set; }
RefreshToken
Declaration
public string RefreshToken { get; set; }
Version
Declaration
public int Version { get; set; }
RequestFilter
Declaration
public Action<CallContext> RequestFilter { get; set; }
ResponseFilter
Declaration
public Action<ResponseCallContext> ResponseFilter { get; set; }
Methods
Dispose()
RetryRequest(GrpcClientConfig, StatusCode, ResponseStatus, CallInvoker)
Declaration
public async Task<bool> RetryRequest(GrpcClientConfig config, StatusCode statusCode, ResponseStatus status, CallInvoker callInvoker)
Returns
System.Threading.Tasks.Task<System.Boolean>
Parameters
Execute<TResponse>(Object, String, CancellationToken)
Declaration
public async Task<TResponse> Execute<TResponse>(object requestDto, string methodName, CancellationToken token = default(CancellationToken))
Returns
System.Threading.Tasks.Task<<TResponse>>
Parameters
Type | Name |
---|
System.Object | requestDto |
System.String | methodName |
System.Threading.CancellationToken | token |
Type Parameters
ExecuteAll<TResponse>(Object[], CancellationToken)
Declaration
public async Task<List<TResponse>> ExecuteAll<TResponse>(object[] requestDtos, CancellationToken token = default(CancellationToken))
Returns
System.Threading.Tasks.Task<System.Collections.Generic.List<<TResponse>>>
Parameters
Type | Name |
---|
System.Object[] | requestDtos |
System.Threading.CancellationToken | token |
Type Parameters
Stream<TResponse>(Object, String, CancellationToken)
Declaration
public async IAsyncEnumerable<TResponse> Stream<TResponse>(object requestDto, string methodName, CancellationToken token = default(CancellationToken))
Returns
System.Collections.Generic.IAsyncEnumerable<<TResponse>>
Parameters
Type | Name |
---|
System.Object | requestDto |
System.String | methodName |
System.Threading.CancellationToken | token |
Type Parameters
StreamAsync<TResponse>(IReturn<TResponse>, CancellationToken)
Declaration
public IAsyncEnumerable<TResponse> StreamAsync<TResponse>(IReturn<TResponse> requestDto, CancellationToken token = default(CancellationToken))
Returns
System.Collections.Generic.IAsyncEnumerable<<TResponse>>
Parameters
Type Parameters
GetMethod(Object)
Declaration
protected string GetMethod(object request)
Returns
System.String
Parameters
Type | Name |
---|
System.Object | request |
SendAsync<TResponse>(IReturn<TResponse>, CancellationToken)
Declaration
public Task<TResponse> SendAsync<TResponse>(IReturn<TResponse> requestDto, CancellationToken token = default(CancellationToken))
Returns
System.Threading.Tasks.Task<<TResponse>>
Parameters
Type Parameters
SendAsync<TResponse>(Object, CancellationToken)
Declaration
public Task<TResponse> SendAsync<TResponse>(object requestDto, CancellationToken token = default(CancellationToken))
Returns
System.Threading.Tasks.Task<<TResponse>>
Parameters
Type | Name |
---|
System.Object | requestDto |
System.Threading.CancellationToken | token |
Type Parameters
SendAllAsync<TResponse>(IEnumerable<IReturn<TResponse>>, CancellationToken)
Declaration
public Task<List<TResponse>> SendAllAsync<TResponse>(IEnumerable<IReturn<TResponse>> requestDtos, CancellationToken token = default(CancellationToken))
Returns
System.Threading.Tasks.Task<System.Collections.Generic.List<<TResponse>>>
Parameters
Type | Name |
---|
System.Collections.Generic.IEnumerable<ServiceStack.IReturn<<TResponse>>> | requestDtos |
System.Threading.CancellationToken | token |
Type Parameters
SendAllAsync<TResponse>(IEnumerable<Object>, CancellationToken)
Declaration
public Task<List<TResponse>> SendAllAsync<TResponse>(IEnumerable<object> requestDtos, CancellationToken token = default(CancellationToken))
Returns
System.Threading.Tasks.Task<System.Collections.Generic.List<<TResponse>>>
Parameters
Type | Name |
---|
System.Collections.Generic.IEnumerable<System.Object> | requestDtos |
System.Threading.CancellationToken | token |
Type Parameters
PublishAsync(Object, CancellationToken)
Declaration
public async Task PublishAsync(object requestDto, CancellationToken token = default(CancellationToken))
Returns
System.Threading.Tasks.Task
Parameters
Type | Name |
---|
System.Object | requestDto |
System.Threading.CancellationToken | token |
PublishAllAsync(IEnumerable<Object>, CancellationToken)
Declaration
public Task PublishAllAsync(IEnumerable<object> requestDtos, CancellationToken token = default(CancellationToken))
Returns
System.Threading.Tasks.Task
Parameters
Type | Name |
---|
System.Collections.Generic.IEnumerable<System.Object> | requestDtos |
System.Threading.CancellationToken | token |
SetCredentials(String, String)
Declaration
public void SetCredentials(string userName, string password)
Parameters
Type | Name |
---|
System.String | userName |
System.String | password |
Get<TResponse>(IReturn<TResponse>)
Declaration
public TResponse Get<TResponse>(IReturn<TResponse> requestDto)
Returns
<TResponse>
Parameters
Type Parameters
Get<TResponse>(Object)
Declaration
public TResponse Get<TResponse>(object requestDto)
Returns
<TResponse>
Parameters
Type | Name |
---|
System.Object | requestDto |
Type Parameters
Get(IReturnVoid)
Declaration
public void Get(IReturnVoid requestDto)
Parameters
Delete<TResponse>(IReturn<TResponse>)
Declaration
public TResponse Delete<TResponse>(IReturn<TResponse> requestDto)
Returns
<TResponse>
Parameters
Type Parameters
Delete<TResponse>(Object)
Declaration
public TResponse Delete<TResponse>(object requestDto)
Returns
<TResponse>
Parameters
Type | Name |
---|
System.Object | requestDto |
Type Parameters
Delete(IReturnVoid)
Declaration
public void Delete(IReturnVoid requestDto)
Parameters
Post<TResponse>(IReturn<TResponse>)
Declaration
public TResponse Post<TResponse>(IReturn<TResponse> requestDto)
Returns
<TResponse>
Parameters
Type Parameters
Post<TResponse>(Object)
Declaration
public TResponse Post<TResponse>(object requestDto)
Returns
<TResponse>
Parameters
Type | Name |
---|
System.Object | requestDto |
Type Parameters
Post(IReturnVoid)
Declaration
public void Post(IReturnVoid requestDto)
Parameters
Put<TResponse>(IReturn<TResponse>)
Declaration
public TResponse Put<TResponse>(IReturn<TResponse> requestDto)
Returns
<TResponse>
Parameters
Type Parameters
Put<TResponse>(Object)
Declaration
public TResponse Put<TResponse>(object requestDto)
Returns
<TResponse>
Parameters
Type | Name |
---|
System.Object | requestDto |
Type Parameters
Put(IReturnVoid)
Declaration
public void Put(IReturnVoid requestDto)
Parameters
Patch<TResponse>(IReturn<TResponse>)
Declaration
public TResponse Patch<TResponse>(IReturn<TResponse> requestDto)
Returns
<TResponse>
Parameters
Type Parameters
Patch<TResponse>(Object)
Declaration
public TResponse Patch<TResponse>(object requestDto)
Returns
<TResponse>
Parameters
Type | Name |
---|
System.Object | requestDto |
Type Parameters
Patch(IReturnVoid)
Declaration
public void Patch(IReturnVoid requestDto)
Parameters
CustomMethod<TResponse>(String, IReturn<TResponse>)
Declaration
public TResponse CustomMethod<TResponse>(string httpVerb, IReturn<TResponse> requestDto)
Returns
<TResponse>
Parameters
Type Parameters
CustomMethod<TResponse>(String, Object)
Declaration
public TResponse CustomMethod<TResponse>(string httpVerb, object requestDto)
Returns
<TResponse>
Parameters
Type | Name |
---|
System.String | httpVerb |
System.Object | requestDto |
Type Parameters
CustomMethod(String, IReturnVoid)
Declaration
public void CustomMethod(string httpVerb, IReturnVoid requestDto)
Parameters
GetAsync<TResponse>(IReturn<TResponse>, CancellationToken)
Declaration
public Task<TResponse> GetAsync<TResponse>(IReturn<TResponse> requestDto, CancellationToken token = default(CancellationToken))
Returns
System.Threading.Tasks.Task<<TResponse>>
Parameters
Type Parameters
GetAsync<TResponse>(Object, CancellationToken)
Declaration
public Task<TResponse> GetAsync<TResponse>(object requestDto, CancellationToken token = default(CancellationToken))
Returns
System.Threading.Tasks.Task<<TResponse>>
Parameters
Type | Name |
---|
System.Object | requestDto |
System.Threading.CancellationToken | token |
Type Parameters
GetAsync(IReturnVoid, CancellationToken)
Declaration
public async Task GetAsync(IReturnVoid requestDto, CancellationToken token = default(CancellationToken))
Returns
System.Threading.Tasks.Task
Parameters
DeleteAsync<TResponse>(IReturn<TResponse>, CancellationToken)
Declaration
public Task<TResponse> DeleteAsync<TResponse>(IReturn<TResponse> requestDto, CancellationToken token = default(CancellationToken))
Returns
System.Threading.Tasks.Task<<TResponse>>
Parameters
Type Parameters
DeleteAsync<TResponse>(Object, CancellationToken)
Declaration
public Task<TResponse> DeleteAsync<TResponse>(object requestDto, CancellationToken token = default(CancellationToken))
Returns
System.Threading.Tasks.Task<<TResponse>>
Parameters
Type | Name |
---|
System.Object | requestDto |
System.Threading.CancellationToken | token |
Type Parameters
DeleteAsync(IReturnVoid, CancellationToken)
Declaration
public async Task DeleteAsync(IReturnVoid requestDto, CancellationToken token = default(CancellationToken))
Returns
System.Threading.Tasks.Task
Parameters
PostAsync<TResponse>(IReturn<TResponse>, CancellationToken)
Declaration
public Task<TResponse> PostAsync<TResponse>(IReturn<TResponse> requestDto, CancellationToken token = default(CancellationToken))
Returns
System.Threading.Tasks.Task<<TResponse>>
Parameters
Type Parameters
PostAsync<TResponse>(Object, CancellationToken)
Declaration
public Task<TResponse> PostAsync<TResponse>(object requestDto, CancellationToken token = default(CancellationToken))
Returns
System.Threading.Tasks.Task<<TResponse>>
Parameters
Type | Name |
---|
System.Object | requestDto |
System.Threading.CancellationToken | token |
Type Parameters
PostAsync(IReturnVoid, CancellationToken)
Declaration
public async Task PostAsync(IReturnVoid requestDto, CancellationToken token = default(CancellationToken))
Returns
System.Threading.Tasks.Task
Parameters
PutAsync<TResponse>(IReturn<TResponse>, CancellationToken)
Declaration
public Task<TResponse> PutAsync<TResponse>(IReturn<TResponse> requestDto, CancellationToken token = default(CancellationToken))
Returns
System.Threading.Tasks.Task<<TResponse>>
Parameters
Type Parameters
PutAsync<TResponse>(Object, CancellationToken)
Declaration
public Task<TResponse> PutAsync<TResponse>(object requestDto, CancellationToken token = default(CancellationToken))
Returns
System.Threading.Tasks.Task<<TResponse>>
Parameters
Type | Name |
---|
System.Object | requestDto |
System.Threading.CancellationToken | token |
Type Parameters
PutAsync(IReturnVoid, CancellationToken)
Declaration
public async Task PutAsync(IReturnVoid requestDto, CancellationToken token = default(CancellationToken))
Returns
System.Threading.Tasks.Task
Parameters
PatchAsync<TResponse>(IReturn<TResponse>, CancellationToken)
Declaration
public Task<TResponse> PatchAsync<TResponse>(IReturn<TResponse> requestDto, CancellationToken token = default(CancellationToken))
Returns
System.Threading.Tasks.Task<<TResponse>>
Parameters
Type Parameters
PatchAsync<TResponse>(Object, CancellationToken)
Declaration
public Task<TResponse> PatchAsync<TResponse>(object requestDto, CancellationToken token = default(CancellationToken))
Returns
System.Threading.Tasks.Task<<TResponse>>
Parameters
Type | Name |
---|
System.Object | requestDto |
System.Threading.CancellationToken | token |
Type Parameters
PatchAsync(IReturnVoid, CancellationToken)
Declaration
public async Task PatchAsync(IReturnVoid requestDto, CancellationToken token = default(CancellationToken))
Returns
System.Threading.Tasks.Task
Parameters
CustomMethodAsync<TResponse>(String, IReturn<TResponse>, CancellationToken)
Declaration
public Task<TResponse> CustomMethodAsync<TResponse>(string httpVerb, IReturn<TResponse> requestDto, CancellationToken token = default(CancellationToken))
Returns
System.Threading.Tasks.Task<<TResponse>>
Parameters
Type Parameters
CustomMethodAsync<TResponse>(String, Object, CancellationToken)
Declaration
public Task<TResponse> CustomMethodAsync<TResponse>(string httpVerb, object requestDto, CancellationToken token = default(CancellationToken))
Returns
System.Threading.Tasks.Task<<TResponse>>
Parameters
Type | Name |
---|
System.String | httpVerb |
System.Object | requestDto |
System.Threading.CancellationToken | token |
Type Parameters
CustomMethodAsync(String, IReturnVoid, CancellationToken)
Declaration
public async Task CustomMethodAsync(string httpVerb, IReturnVoid requestDto, CancellationToken token = default(CancellationToken))
Returns
System.Threading.Tasks.Task
Parameters
Send<TResponse>(Object)
Declaration
public TResponse Send<TResponse>(object requestDto)
Returns
<TResponse>
Parameters
Type | Name |
---|
System.Object | requestDto |
Type Parameters
SendAll<TResponse>(IEnumerable<Object>)
Declaration
public List<TResponse> SendAll<TResponse>(IEnumerable<object> requestDtos)
Returns
System.Collections.Generic.List<<TResponse>>
Parameters
Type | Name |
---|
System.Collections.Generic.IEnumerable<System.Object> | requestDtos |
Type Parameters
Publish(Object)
Declaration
public void Publish(object requestDto)
Parameters
Type | Name |
---|
System.Object | requestDto |
PublishAll(IEnumerable<Object>)
Declaration
public void PublishAll(IEnumerable<object> requestDtos)
Parameters
Type | Name |
---|
System.Collections.Generic.IEnumerable<System.Object> | requestDtos |
Implements