Table of Contents

Class RemoteServiceInvoker

Namespace
GroupeIsa.Neos.ClusterCommunication
Assembly
GroupeIsa.Neos.ClusterCommunication.dll

Represents the implementation of a client for interacting with the Dapr endpoints over HTTP protocol.

public class RemoteServiceInvoker : RemoteServiceInvokerBase, IRemoteServiceInvoker
Inheritance
RemoteServiceInvoker
Implements
Inherited Members

Constructors

RemoteServiceInvoker(IConfiguration, IHttpClientFactory, IHttpContextAccessor, IApplicationContext, INeosLogger<RemoteServiceInvoker>)

Initializes a new instance of the RemoteServiceInvoker class.

public RemoteServiceInvoker(IConfiguration configuration, IHttpClientFactory httpClientFactory, IHttpContextAccessor httpContextAccessor, IApplicationContext applicationContext, INeosLogger<RemoteServiceInvoker> logger)

Parameters

configuration IConfiguration

The configuration.

httpClientFactory IHttpClientFactory

The http client factory.

httpContextAccessor IHttpContextAccessor

Provides access to the current HttpContext.

applicationContext IApplicationContext

The application context.

logger INeosLogger<RemoteServiceInvoker>

The logger.

Methods

GetByteArrayAsync(RemoteServiceOptions)

Send a GET request with the specified options and return the response body as a byte array.

public override Task<byte[]> GetByteArrayAsync(RemoteServiceOptions options)

Parameters

options RemoteServiceOptions

The options to invoke the method on.

Returns

Task<byte[]>

A Task<TResult> that will return when the operation has completed with byte array.

GetStringAsync(RemoteServiceOptions)

Send a GET request with the specified options and return the response body as a string.

public override Task<string> GetStringAsync(RemoteServiceOptions options)

Parameters

options RemoteServiceOptions

The options to invoke the method on.

Returns

Task<string>

A Task<TResult> that will return when the operation has completed with string.

InvokeAsync(RemoteServiceOptions)

Performs service invocation for the service identified by options.ServiceId.ServiceId and invokes the resource specified by options.Path.Path with the options.HttpMethod.HttpMethod HTTP method.

public override Task InvokeAsync(RemoteServiceOptions options)

Parameters

options RemoteServiceOptions

The options to invoke the method on.

Returns

Task

A Task<TResult> that will return when the operation has completed.

InvokeAsync<TResponse>(RemoteServiceOptions)

Performs service invocation for the service identified by options.ServiceId.ServiceId and invokes the resource specified by options.Path.Path with the options.HttpMethod.HttpMethod HTTP method.

public override Task<TResponse?> InvokeAsync<TResponse>(RemoteServiceOptions options)

Parameters

options RemoteServiceOptions

The options to invoke the method on.

Returns

Task<TResponse>

A Task<TResult> that will return when the operation has completed.

Type Parameters

TResponse

The type of the data that will be JSON deserialized from the response body.