Skip to main content

GrpcServiceClient

Assembly: ServiceStack.GrpcClient.dll
View Source
Declaration
public class GrpcServiceClient : IRestServiceClient, IServiceClientAsync, IServiceGatewayAsync, IRestClientAsync, IServiceClientSync, IServiceGateway, IRestClientSync, IServiceClientCommon, IHasSessionId, IHasBearerToken, IHasVersion

Properties

Config

View Source
Declaration
public GrpcClientConfig Config { get; }

SessionId

View Source
Declaration
public string SessionId { get; set; }

BearerToken

View Source
Declaration
public string BearerToken { get; set; }

RefreshToken

View Source
Declaration
public string RefreshToken { get; set; }

Version

View Source
Declaration
public int Version { get; set; }

RequestFilter

View Source
Declaration
public Action<CallContext> RequestFilter { get; set; }

ResponseFilter

View Source
Declaration
public Action<ResponseCallContext> ResponseFilter { get; set; }

Methods

Dispose()

View Source
Declaration
public void Dispose()

RetryRequest(GrpcClientConfig, StatusCode, ResponseStatus, CallInvoker)

View Source
Declaration
public async Task<bool> RetryRequest(GrpcClientConfig config, StatusCode statusCode, ResponseStatus status, CallInvoker callInvoker)
Returns

System.Threading.Tasks.Task<System.Boolean>

Parameters
TypeName
ServiceStack.GrpcClientConfigconfig
StatusCodestatusCode
ServiceStack.ResponseStatusstatus
CallInvokercallInvoker

Execute<TResponse>(Object, String, CancellationToken)

View Source
Declaration
public async Task<TResponse> Execute<TResponse>(object requestDto, string methodName, CancellationToken token = default(CancellationToken))
Returns

System.Threading.Tasks.Task<<TResponse>>

Parameters
TypeName
System.ObjectrequestDto
System.StringmethodName
System.Threading.CancellationTokentoken
Type Parameters
  • TResponse

ExecuteAll<TResponse>(Object[], CancellationToken)

View Source
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
TypeName
System.Object[]requestDtos
System.Threading.CancellationTokentoken
Type Parameters
  • TResponse

Stream<TResponse>(Object, String, CancellationToken)

View Source
Declaration
public async IAsyncEnumerable<TResponse> Stream<TResponse>(object requestDto, string methodName, CancellationToken token = default(CancellationToken))
Returns

System.Collections.Generic.IAsyncEnumerable<<TResponse>>

Parameters
TypeName
System.ObjectrequestDto
System.StringmethodName
System.Threading.CancellationTokentoken
Type Parameters
  • TResponse

StreamAsync<TResponse>(IReturn<TResponse>, CancellationToken)

View Source
Declaration
public IAsyncEnumerable<TResponse> StreamAsync<TResponse>(IReturn<TResponse> requestDto, CancellationToken token = default(CancellationToken))
Returns

System.Collections.Generic.IAsyncEnumerable<<TResponse>>

Parameters
TypeName
ServiceStack.IReturn<T>requestDto
System.Threading.CancellationTokentoken
Type Parameters
  • TResponse

GetMethod(Object)

View Source
Declaration
protected string GetMethod(object request)
Returns

System.String

Parameters
TypeName
System.Objectrequest

SendAsync<TResponse>(IReturn<TResponse>, CancellationToken)

View Source
Declaration
public Task<TResponse> SendAsync<TResponse>(IReturn<TResponse> requestDto, CancellationToken token = default(CancellationToken))
Returns

System.Threading.Tasks.Task<<TResponse>>

Parameters
TypeName
ServiceStack.IReturn<T>requestDto
System.Threading.CancellationTokentoken
Type Parameters
  • TResponse

SendAsync<TResponse>(Object, CancellationToken)

View Source
Declaration
public Task<TResponse> SendAsync<TResponse>(object requestDto, CancellationToken token = default(CancellationToken))
Returns

System.Threading.Tasks.Task<<TResponse>>

Parameters
TypeName
System.ObjectrequestDto
System.Threading.CancellationTokentoken
Type Parameters
  • TResponse

SendAllAsync<TResponse>(IEnumerable<IReturn<TResponse>>, CancellationToken)

View Source
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
TypeName
System.Collections.Generic.IEnumerable<ServiceStack.IReturn<<TResponse>>>requestDtos
System.Threading.CancellationTokentoken
Type Parameters
  • TResponse

SendAllAsync<TResponse>(IEnumerable<Object>, CancellationToken)

View Source
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
TypeName
System.Collections.Generic.IEnumerable<System.Object>requestDtos
System.Threading.CancellationTokentoken
Type Parameters
  • TResponse

PublishAsync(Object, CancellationToken)

View Source
Declaration
public async Task PublishAsync(object requestDto, CancellationToken token = default(CancellationToken))
Returns

System.Threading.Tasks.Task

Parameters
TypeName
System.ObjectrequestDto
System.Threading.CancellationTokentoken

PublishAllAsync(IEnumerable<Object>, CancellationToken)

View Source
Declaration
public Task PublishAllAsync(IEnumerable<object> requestDtos, CancellationToken token = default(CancellationToken))
Returns

System.Threading.Tasks.Task

Parameters
TypeName
System.Collections.Generic.IEnumerable<System.Object>requestDtos
System.Threading.CancellationTokentoken

SetCredentials(String, String)

View Source
Declaration
public void SetCredentials(string userName, string password)
Parameters
TypeName
System.StringuserName
System.Stringpassword

Get<TResponse>(IReturn<TResponse>)

View Source
Declaration
public TResponse Get<TResponse>(IReturn<TResponse> requestDto)
Returns

<TResponse>

Parameters
TypeName
ServiceStack.IReturn<T>requestDto
Type Parameters
  • TResponse

Get<TResponse>(Object)

View Source
Declaration
public TResponse Get<TResponse>(object requestDto)
Returns

<TResponse>

Parameters
TypeName
System.ObjectrequestDto
Type Parameters
  • TResponse

Get(IReturnVoid)

View Source
Declaration
public void Get(IReturnVoid requestDto)
Parameters
TypeName
ServiceStack.IReturnVoidrequestDto

Delete<TResponse>(IReturn<TResponse>)

View Source
Declaration
public TResponse Delete<TResponse>(IReturn<TResponse> requestDto)
Returns

<TResponse>

Parameters
TypeName
ServiceStack.IReturn<T>requestDto
Type Parameters
  • TResponse

Delete<TResponse>(Object)

View Source
Declaration
public TResponse Delete<TResponse>(object requestDto)
Returns

<TResponse>

Parameters
TypeName
System.ObjectrequestDto
Type Parameters
  • TResponse

Delete(IReturnVoid)

View Source
Declaration
public void Delete(IReturnVoid requestDto)
Parameters
TypeName
ServiceStack.IReturnVoidrequestDto

Post<TResponse>(IReturn<TResponse>)

View Source
Declaration
public TResponse Post<TResponse>(IReturn<TResponse> requestDto)
Returns

<TResponse>

Parameters
TypeName
ServiceStack.IReturn<T>requestDto
Type Parameters
  • TResponse

Post<TResponse>(Object)

View Source
Declaration
public TResponse Post<TResponse>(object requestDto)
Returns

<TResponse>

Parameters
TypeName
System.ObjectrequestDto
Type Parameters
  • TResponse

Post(IReturnVoid)

View Source
Declaration
public void Post(IReturnVoid requestDto)
Parameters
TypeName
ServiceStack.IReturnVoidrequestDto

Put<TResponse>(IReturn<TResponse>)

View Source
Declaration
public TResponse Put<TResponse>(IReturn<TResponse> requestDto)
Returns

<TResponse>

Parameters
TypeName
ServiceStack.IReturn<T>requestDto
Type Parameters
  • TResponse

Put<TResponse>(Object)

View Source
Declaration
public TResponse Put<TResponse>(object requestDto)
Returns

<TResponse>

Parameters
TypeName
System.ObjectrequestDto
Type Parameters
  • TResponse

Put(IReturnVoid)

View Source
Declaration
public void Put(IReturnVoid requestDto)
Parameters
TypeName
ServiceStack.IReturnVoidrequestDto

Patch<TResponse>(IReturn<TResponse>)

View Source
Declaration
public TResponse Patch<TResponse>(IReturn<TResponse> requestDto)
Returns

<TResponse>

Parameters
TypeName
ServiceStack.IReturn<T>requestDto
Type Parameters
  • TResponse

Patch<TResponse>(Object)

View Source
Declaration
public TResponse Patch<TResponse>(object requestDto)
Returns

<TResponse>

Parameters
TypeName
System.ObjectrequestDto
Type Parameters
  • TResponse

Patch(IReturnVoid)

View Source
Declaration
public void Patch(IReturnVoid requestDto)
Parameters
TypeName
ServiceStack.IReturnVoidrequestDto

CustomMethod<TResponse>(String, IReturn<TResponse>)

View Source
Declaration
public TResponse CustomMethod<TResponse>(string httpVerb, IReturn<TResponse> requestDto)
Returns

<TResponse>

Parameters
TypeName
System.StringhttpVerb
ServiceStack.IReturn<T>requestDto
Type Parameters
  • TResponse

CustomMethod<TResponse>(String, Object)

View Source
Declaration
public TResponse CustomMethod<TResponse>(string httpVerb, object requestDto)
Returns

<TResponse>

Parameters
TypeName
System.StringhttpVerb
System.ObjectrequestDto
Type Parameters
  • TResponse

CustomMethod(String, IReturnVoid)

View Source
Declaration
public void CustomMethod(string httpVerb, IReturnVoid requestDto)
Parameters
TypeName
System.StringhttpVerb
ServiceStack.IReturnVoidrequestDto

GetAsync<TResponse>(IReturn<TResponse>, CancellationToken)

View Source
Declaration
public Task<TResponse> GetAsync<TResponse>(IReturn<TResponse> requestDto, CancellationToken token = default(CancellationToken))
Returns

System.Threading.Tasks.Task<<TResponse>>

Parameters
TypeName
ServiceStack.IReturn<T>requestDto
System.Threading.CancellationTokentoken
Type Parameters
  • TResponse

GetAsync<TResponse>(Object, CancellationToken)

View Source
Declaration
public Task<TResponse> GetAsync<TResponse>(object requestDto, CancellationToken token = default(CancellationToken))
Returns

System.Threading.Tasks.Task<<TResponse>>

Parameters
TypeName
System.ObjectrequestDto
System.Threading.CancellationTokentoken
Type Parameters
  • TResponse

GetAsync(IReturnVoid, CancellationToken)

View Source
Declaration
public async Task GetAsync(IReturnVoid requestDto, CancellationToken token = default(CancellationToken))
Returns

System.Threading.Tasks.Task

Parameters
TypeName
ServiceStack.IReturnVoidrequestDto
System.Threading.CancellationTokentoken

DeleteAsync<TResponse>(IReturn<TResponse>, CancellationToken)

View Source
Declaration
public Task<TResponse> DeleteAsync<TResponse>(IReturn<TResponse> requestDto, CancellationToken token = default(CancellationToken))
Returns

System.Threading.Tasks.Task<<TResponse>>

Parameters
TypeName
ServiceStack.IReturn<T>requestDto
System.Threading.CancellationTokentoken
Type Parameters
  • TResponse

DeleteAsync<TResponse>(Object, CancellationToken)

View Source
Declaration
public Task<TResponse> DeleteAsync<TResponse>(object requestDto, CancellationToken token = default(CancellationToken))
Returns

System.Threading.Tasks.Task<<TResponse>>

Parameters
TypeName
System.ObjectrequestDto
System.Threading.CancellationTokentoken
Type Parameters
  • TResponse

DeleteAsync(IReturnVoid, CancellationToken)

View Source
Declaration
public async Task DeleteAsync(IReturnVoid requestDto, CancellationToken token = default(CancellationToken))
Returns

System.Threading.Tasks.Task

Parameters
TypeName
ServiceStack.IReturnVoidrequestDto
System.Threading.CancellationTokentoken

PostAsync<TResponse>(IReturn<TResponse>, CancellationToken)

View Source
Declaration
public Task<TResponse> PostAsync<TResponse>(IReturn<TResponse> requestDto, CancellationToken token = default(CancellationToken))
Returns

System.Threading.Tasks.Task<<TResponse>>

Parameters
TypeName
ServiceStack.IReturn<T>requestDto
System.Threading.CancellationTokentoken
Type Parameters
  • TResponse

PostAsync<TResponse>(Object, CancellationToken)

View Source
Declaration
public Task<TResponse> PostAsync<TResponse>(object requestDto, CancellationToken token = default(CancellationToken))
Returns

System.Threading.Tasks.Task<<TResponse>>

Parameters
TypeName
System.ObjectrequestDto
System.Threading.CancellationTokentoken
Type Parameters
  • TResponse

PostAsync(IReturnVoid, CancellationToken)

View Source
Declaration
public async Task PostAsync(IReturnVoid requestDto, CancellationToken token = default(CancellationToken))
Returns

System.Threading.Tasks.Task

Parameters
TypeName
ServiceStack.IReturnVoidrequestDto
System.Threading.CancellationTokentoken

PutAsync<TResponse>(IReturn<TResponse>, CancellationToken)

View Source
Declaration
public Task<TResponse> PutAsync<TResponse>(IReturn<TResponse> requestDto, CancellationToken token = default(CancellationToken))
Returns

System.Threading.Tasks.Task<<TResponse>>

Parameters
TypeName
ServiceStack.IReturn<T>requestDto
System.Threading.CancellationTokentoken
Type Parameters
  • TResponse

PutAsync<TResponse>(Object, CancellationToken)

View Source
Declaration
public Task<TResponse> PutAsync<TResponse>(object requestDto, CancellationToken token = default(CancellationToken))
Returns

System.Threading.Tasks.Task<<TResponse>>

Parameters
TypeName
System.ObjectrequestDto
System.Threading.CancellationTokentoken
Type Parameters
  • TResponse

PutAsync(IReturnVoid, CancellationToken)

View Source
Declaration
public async Task PutAsync(IReturnVoid requestDto, CancellationToken token = default(CancellationToken))
Returns

System.Threading.Tasks.Task

Parameters
TypeName
ServiceStack.IReturnVoidrequestDto
System.Threading.CancellationTokentoken

PatchAsync<TResponse>(IReturn<TResponse>, CancellationToken)

View Source
Declaration
public Task<TResponse> PatchAsync<TResponse>(IReturn<TResponse> requestDto, CancellationToken token = default(CancellationToken))
Returns

System.Threading.Tasks.Task<<TResponse>>

Parameters
TypeName
ServiceStack.IReturn<T>requestDto
System.Threading.CancellationTokentoken
Type Parameters
  • TResponse

PatchAsync<TResponse>(Object, CancellationToken)

View Source
Declaration
public Task<TResponse> PatchAsync<TResponse>(object requestDto, CancellationToken token = default(CancellationToken))
Returns

System.Threading.Tasks.Task<<TResponse>>

Parameters
TypeName
System.ObjectrequestDto
System.Threading.CancellationTokentoken
Type Parameters
  • TResponse

PatchAsync(IReturnVoid, CancellationToken)

View Source
Declaration
public async Task PatchAsync(IReturnVoid requestDto, CancellationToken token = default(CancellationToken))
Returns

System.Threading.Tasks.Task

Parameters
TypeName
ServiceStack.IReturnVoidrequestDto
System.Threading.CancellationTokentoken

CustomMethodAsync<TResponse>(String, IReturn<TResponse>, CancellationToken)

View Source
Declaration
public Task<TResponse> CustomMethodAsync<TResponse>(string httpVerb, IReturn<TResponse> requestDto, CancellationToken token = default(CancellationToken))
Returns

System.Threading.Tasks.Task<<TResponse>>

Parameters
TypeName
System.StringhttpVerb
ServiceStack.IReturn<T>requestDto
System.Threading.CancellationTokentoken
Type Parameters
  • TResponse

CustomMethodAsync<TResponse>(String, Object, CancellationToken)

View Source
Declaration
public Task<TResponse> CustomMethodAsync<TResponse>(string httpVerb, object requestDto, CancellationToken token = default(CancellationToken))
Returns

System.Threading.Tasks.Task<<TResponse>>

Parameters
TypeName
System.StringhttpVerb
System.ObjectrequestDto
System.Threading.CancellationTokentoken
Type Parameters
  • TResponse

CustomMethodAsync(String, IReturnVoid, CancellationToken)

View Source
Declaration
public async Task CustomMethodAsync(string httpVerb, IReturnVoid requestDto, CancellationToken token = default(CancellationToken))
Returns

System.Threading.Tasks.Task

Parameters
TypeName
System.StringhttpVerb
ServiceStack.IReturnVoidrequestDto
System.Threading.CancellationTokentoken

Send<TResponse>(Object)

View Source
Declaration
public TResponse Send<TResponse>(object requestDto)
Returns

<TResponse>

Parameters
TypeName
System.ObjectrequestDto
Type Parameters
  • TResponse

SendAll<TResponse>(IEnumerable<Object>)

View Source
Declaration
public List<TResponse> SendAll<TResponse>(IEnumerable<object> requestDtos)
Returns

System.Collections.Generic.List<<TResponse>>

Parameters
TypeName
System.Collections.Generic.IEnumerable<System.Object>requestDtos
Type Parameters
  • TResponse

Publish(Object)

View Source
Declaration
public void Publish(object requestDto)
Parameters
TypeName
System.ObjectrequestDto

PublishAll(IEnumerable<Object>)

View Source
Declaration
public void PublishAll(IEnumerable<object> requestDtos)
Parameters
TypeName
System.Collections.Generic.IEnumerable<System.Object>requestDtos

Implements