Table of Contents

Class LocalEndpoint

Namespace
The.RPC
Assembly
Instagile.dll

Implementation of IEndpoint which deserialises the text and connects to a local framework instance.

public sealed class LocalEndpoint : IEndpoint
Inheritance
LocalEndpoint
Implements
Inherited Members

Remarks

Like PersistenceService, this needs to use a The.Persistence.SecureStore rather than IEntityStore directly.

Constructors

LocalEndpoint(IServices, IAuthentication, RPCOptions, SessionCache?)

public LocalEndpoint(IServices services, IAuthentication authentication, RPCOptions options, SessionCache? cache)

Parameters

services IServices

backend containing procedure instances

authentication IAuthentication

remote authenticator

options RPCOptions

protocol config

cache SessionCache

must be supplied if EncryptedSession is used

Properties

Description

Human-readable name.

public string Description { get; }

Property Value

string

Methods

ConnectAsync(byte[], CancellationToken)

Proves the client's identity to the server in exchange for a symmetric session key.

public Task<byte[]> ConnectAsync(byte[] serializedTicket, CancellationToken cancellationToken)

Parameters

serializedTicket byte[]
cancellationToken CancellationToken

Returns

Task<byte[]>

Serialised Response<T>.

ExecuteAsync(string, Message, byte[]?, CancellationToken)

Calls an untyped procedure - this may involve local lookup, passthrough or decoration.

public Task<Message> ExecuteAsync(string name, Message request, byte[]? ticket, CancellationToken cancellationToken)

Parameters

name string
request Message
ticket byte[]
cancellationToken CancellationToken

Returns

Task<Message>

VisitAsync<T, U>(AnonymousProcedure<T, U>, Message, CancellationToken)

Calls a typed procedure on a local or remote host.

public Task<Message> VisitAsync<T, U>(AnonymousProcedure<T, U> proc, Message serializedRequest, CancellationToken cancellationToken) where T : notnull

Parameters

proc AnonymousProcedure<T, U>
serializedRequest Message
cancellationToken CancellationToken

Returns

Task<Message>

Serialised Response<T>.

Type Parameters

T
U

VisitAsync<T, U>(Procedure<T, U>, Message, byte[], CancellationToken)

Calls a typed procedure on a local or remote host.

public Task<Message> VisitAsync<T, U>(Procedure<T, U> proc, Message serializedRequest, byte[] serializedTicket, CancellationToken cancellationToken) where T : notnull

Parameters

proc Procedure<T, U>
serializedRequest Message
serializedTicket byte[]
cancellationToken CancellationToken

Returns

Task<Message>

Serialised Response<T>.

Type Parameters

T
U