Class RPCClient
Provides a client for making remote procedure calls (RPC) to an endpoint.
public class RPCClient
- Inheritance
-
RPCClient
- Inherited Members
Constructors
RPCClient(IEndpoint, IAuthentication, RPCOptions, string, string)
public RPCClient(IEndpoint endpoint, IAuthentication authentication, RPCOptions options, string appVersion, string environmentName)
Parameters
endpointIEndpointauthenticationIAuthenticationoptionsRPCOptionsappVersionstringenvironmentNamestring
Fields
Timeout
public readonly TimeSpan Timeout
Field Value
Methods
ConnectAsync(CallbackEnvironment, bool)
public Task<Response<KeyedConnectResult>> ConnectAsync(CallbackEnvironment environment, bool reuseExistingConnection)
Parameters
environmentCallbackEnvironmentreuseExistingConnectionbool
Returns
ExecuteHighLevelAsync<T, U>(AnonymousProcedure<T, U>, AnonymousEnvironment, T)
Call a remote procedure via the configured endpoint, handling retries and errors internally.
public Task<U> ExecuteHighLevelAsync<T, U>(AnonymousProcedure<T, U> proc, AnonymousEnvironment environment, T request) where T : notnull
Parameters
procAnonymousProcedure<T, U>The procedure to call.
environmentAnonymousEnvironmentCommon parameters.
requestTProcedure-specific parameters.
Returns
- Task<U>
Procedure-specific result.
Type Parameters
TThe type of the request.
UThe type of the response.
Exceptions
- SecurityException
Thrown when executing the procedure is not permitted.
- RPCException
Thrown when unable to execute the procedure. Subtypes include ConnectionException and MessageNotEncryptedException.
ExecuteHighLevelAsync<T, U>(Procedure<T, U>, CallbackEnvironment, T)
Call an authenticated remote procedure via the configured endpoint, handling retries and errors internally.
public Task<U> ExecuteHighLevelAsync<T, U>(Procedure<T, U> proc, CallbackEnvironment environment, T request) where T : notnull
Parameters
procProcedure<T, U>The procedure to call.
environmentCallbackEnvironmentCommon parameters.
requestTProcedure-specific parameters.
Returns
- Task<U>
Procedure-specific result.
Type Parameters
TThe type of the request.
UThe type of the response.
Exceptions
- SecurityException
Thrown when executing the procedure is not permitted.
- RPCException
Thrown when unable to execute the procedure. Subtypes include ConnectionException and MessageNotEncryptedException.
ExecuteLowLevelAsync<T, U>(AnonymousProcedure<T, U>, AnonymousEnvironment, T)
Call a remote procedure via the configured endpoint.
public Task<Response<U>> ExecuteLowLevelAsync<T, U>(AnonymousProcedure<T, U> proc, AnonymousEnvironment environment, T request) where T : notnull
Parameters
procAnonymousProcedure<T, U>The procedure to call.
environmentAnonymousEnvironmentCommon parameters.
requestTProcedure-specific parameters.
Returns
Type Parameters
TThe type of the request.
UThe type of the response.
ExecuteLowLevelAsync<T, U>(Procedure<T, U>, CallbackEnvironment, T)
Call an authenticated remote procedure via the configured endpoint.
public Task<Response<U>> ExecuteLowLevelAsync<T, U>(Procedure<T, U> proc, CallbackEnvironment environment, T request) where T : notnull
Parameters
procProcedure<T, U>The procedure to call.
environmentCallbackEnvironmentCommon parameters.
requestTProcedure-specific parameters.
Returns
Type Parameters
TThe type of the request.
UThe type of the response.
ResetSessionAsync(Identity)
Clear out any session state belonging to this identity.
public Task ResetSessionAsync(Identity identity)
Parameters
identityIdentity