Table of Contents

Class RpcEndpointBase

Namespace
TypedRest.Endpoints.Rpc
Assembly
TypedRest.dll

Base class for building RPC endpoints.

public abstract class RpcEndpointBase : EndpointBase, IRpcEndpoint, IEndpoint
Inheritance
RpcEndpointBase
Implements
Derived
Inherited Members

Constructors

RpcEndpointBase(IEndpoint, string)

Creates a new RPC endpoint with a relative URI.

protected RpcEndpointBase(IEndpoint referrer, string relativeUri)

Parameters

referrer IEndpoint

The endpoint used to navigate to this one.

relativeUri string

The URI of this endpoint relative to the referrer's. Add a ./ prefix here to imply a trailing slash referrer's URI.

RpcEndpointBase(IEndpoint, Uri)

Creates a new RPC endpoint with a relative URI.

protected RpcEndpointBase(IEndpoint referrer, Uri relativeUri)

Parameters

referrer IEndpoint

The endpoint used to navigate to this one.

relativeUri Uri

The URI of this endpoint relative to the referrer's.

Properties

InvokeAllowed

Shows whether the server has indicated that the invoke method is currently allowed.

public bool? InvokeAllowed { get; }

Property Value

bool?

true if the method is allowed, false if the method is not allowed, null If no request has been sent yet or the server did not specify allowed methods.

Remarks

Uses cached data from last response.

Methods

ProbeAsync(CancellationToken)

Queries the server about capabilities of the endpoint without performing any action.

public Task ProbeAsync(CancellationToken cancellationToken = default)

Parameters

cancellationToken CancellationToken

Used to cancel the request.

Returns

Task

Exceptions

AuthenticationException

Unauthorized

UnauthorizedAccessException

Forbidden

KeyNotFoundException

NotFound or Gone

HttpRequestException

Other non-success status code.