Interface IEndpoint
Dynamically typed RPC mechanism, used to transport serialised requests and security tokens.
public interface IEndpoint
Remarks
Remote/"transport" endpoint plugins can be implemented anywhere, but any local endpoint should use The.Persistence.SecureStore. Endpoints are only used within an IEntityStore, so this doesn't allow for a licensing bypass; it would permit a server developer to disable user security, but they can do that trivially using a null auth plugin. An IoC container (IServiceProvider) is optional; if provided, it will be used to look up additional RPCs.
Properties
Description
Human-readable name.
string Description { get; }
Property Value
Methods
ConnectAsync(byte[], CancellationToken)
Proves the client's identity to the server in exchange for a symmetric session key.
Task<byte[]> ConnectAsync(byte[] ticket, CancellationToken token)
Parameters
ticketbyte[]tokenCancellationToken
Returns
- Task<byte[]>
Serialised Response<T>.
ExecuteAsync(string, EndpointMessage, byte[]?, CancellationToken)
Calls an untyped procedure - this may involve local lookup, passthrough or decoration.
Task<EndpointMessage> ExecuteAsync(string name, EndpointMessage request, byte[]? ticket, CancellationToken cancellationToken)
Parameters
namestringrequestEndpointMessageticketbyte[]cancellationTokenCancellationToken
Returns
VisitAsync<T, U>(AnonymousProcedure<T, U>, EndpointMessage, CancellationToken)
Calls a typed procedure on a local or remote host.
Task<EndpointMessage> VisitAsync<T, U>(AnonymousProcedure<T, U> proc, EndpointMessage request, CancellationToken token) where T : notnull
Parameters
procAnonymousProcedure<T, U>requestEndpointMessagetokenCancellationToken
Returns
- Task<EndpointMessage>
Serialised Response<T>.
Type Parameters
TU
VisitAsync<T, U>(Procedure<T, U>, EndpointMessage, byte[], CancellationToken)
Calls a typed procedure on a local or remote host.
Task<EndpointMessage> VisitAsync<T, U>(Procedure<T, U> proc, EndpointMessage request, byte[] ticket, CancellationToken token) where T : notnull
Parameters
procProcedure<T, U>requestEndpointMessageticketbyte[]tokenCancellationToken
Returns
- Task<EndpointMessage>
Serialised Response<T>.
Type Parameters
TU