Table of Contents

Class RemoteServiceOptions

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

Represents the implementation of the IRemoteServiceInvoker immutable options.

public class RemoteServiceOptions
Inheritance
RemoteServiceOptions
Inherited Members

Constructors

RemoteServiceOptions()

Initializes a new instance of the RemoteServiceOptions class.

public RemoteServiceOptions()

RemoteServiceOptions(string)

Initializes a new instance of the RemoteServiceOptions class.

public RemoteServiceOptions(string serviceId)

Parameters

serviceId string

Identifier of the service invoked.

Fields

ApiPrefix

Represents the API prefix.

public const string ApiPrefix = "api"

Field Value

string

DefaultApiVersion

Represents the current API version.

public const string DefaultApiVersion = "v1"

Field Value

string

JsonContentType

Represents the JSON content type.

public const string JsonContentType = "application/json"

Field Value

string

MethodResourceName

Represents the method resource name.

public const string MethodResourceName = "methods"

Field Value

string

Properties

ApiVersion

Gets The API version.

public string ApiVersion { get; }

Property Value

string

Body

Gets the body.

public object? Body { get; }

Property Value

object

CancellationToken

Gets the cancellation token.

public CancellationToken CancellationToken { get; }

Property Value

CancellationToken

Endpoint

Gets the network resource or service.

public string Endpoint { get; }

Property Value

string

Filter

Gets the filter.

public string? Filter { get; }

Property Value

string

HasApiPrefix

Gets a value indicating whether the route has API prefix.

public bool HasApiPrefix { get; }

Property Value

bool

Headers

Gets the request headers.

public IDictionary<string, string>? Headers { get; }

Property Value

IDictionary<string, string>

HttpMethod

Gets the HTTP method.

public HttpMethod HttpMethod { get; }

Property Value

HttpMethod

KeyValues

Gets the key values.

public object? KeyValues { get; }

Property Value

object

MediaType

Gets the media type.

public string MediaType { get; }

Property Value

string

OrderBy

Gets the sort order.

public string? OrderBy { get; }

Property Value

string

Path

Gets the path.

public string Path { get; }

Property Value

string

QueryParameters

Gets the key query parameter collection.

public IList<RemoteServiceParameter>? QueryParameters { get; }

Property Value

IList<RemoteServiceParameter>

ServiceId

Gets the service identifier.

public string ServiceId { get; }

Property Value

string

Skip

Gets the number of items to skip.

public int? Skip { get; }

Property Value

int?

Top

Gets the number of items to return.

public int? Top { get; }

Property Value

int?

Methods

WithApiPrefix(bool)

Sets a value indicating whether the request is a API call.

public RemoteServiceOptions WithApiPrefix(bool value)

Parameters

value bool

trueif the request is a API call; otherwise, false.

Returns

RemoteServiceOptions

This instance for fluent code.

WithApiVersion(string)

Sets the API version.

public RemoteServiceOptions WithApiVersion(string value)

Parameters

value string

The API version.

Returns

RemoteServiceOptions

This instance for fluent code.

WithApiVersionNeutral()

Sets versionless API.

public RemoteServiceOptions WithApiVersionNeutral()

Returns

RemoteServiceOptions

This instance for fluent code.

WithBody(HttpContent)

Sets the http content as the data.

public RemoteServiceOptions WithBody(HttpContent httpContent)

Parameters

httpContent HttpContent

The http contents.

Returns

RemoteServiceOptions

This instance for fluent code.

WithBody(object?)

Sets the data.

It will be serialized into json content.

public RemoteServiceOptions WithBody(object? value)

Parameters

value object

The data.

Returns

RemoteServiceOptions

This instance for fluent code.

WithCancellationToken(CancellationToken)

Sets the cancellation token.

public RemoteServiceOptions WithCancellationToken(CancellationToken value)

Parameters

value CancellationToken

The cancellation token.

Returns

RemoteServiceOptions

This instance for fluent code.

WithDefaultApiVersion()

Sets the default API version.

public RemoteServiceOptions WithDefaultApiVersion()

Returns

RemoteServiceOptions

This instance for fluent code.

WithFilter(string)

Sets the filter.

public RemoteServiceOptions WithFilter(string value)

Parameters

value string

The filter.

Returns

RemoteServiceOptions

This instance for fluent code.

WithHeader(string, string)

Adds a header.

public RemoteServiceOptions WithHeader(string name, string value)

Parameters

name string

The name of the header.

value string

The value of the header.

Returns

RemoteServiceOptions

This instance for fluent code.

WithHeaders(IDictionary<string, string>?)

Sets the headers.

public RemoteServiceOptions WithHeaders(IDictionary<string, string>? values)

Parameters

values IDictionary<string, string>

The headers to use.

Returns

RemoteServiceOptions

This instance for fluent code.

WithHttpMethod(HttpMethod)

Sets the HTTP method.

public RemoteServiceOptions WithHttpMethod(HttpMethod value)

Parameters

value HttpMethod

The HTTP method.

Returns

RemoteServiceOptions

This instance for fluent code.

WithKeyValues(object?)

Sets the key values.

public RemoteServiceOptions WithKeyValues(object? values)

Parameters

values object

The key values.

Returns

RemoteServiceOptions

This instance for fluent code.

WithMediaType(string)

Sets the media type.

public RemoteServiceOptions WithMediaType(string value)

Parameters

value string

The media type.

Returns

RemoteServiceOptions

This instance for fluent code.

WithOrderBy(string)

Sets the sort order.

public RemoteServiceOptions WithOrderBy(string value)

Parameters

value string

The filter.

Returns

RemoteServiceOptions

This instance for fluent code.

WithPath(string)

Sets the path.

public RemoteServiceOptions WithPath(string value)

Parameters

value string

The path.

Returns

RemoteServiceOptions

This instance for fluent code.

WithQueryParameter(RemoteServiceParameter)

Adds a parameter.

public RemoteServiceOptions WithQueryParameter(RemoteServiceParameter value)

Parameters

value RemoteServiceParameter

The parameter to add.

Returns

RemoteServiceOptions

This instance for fluent code.

WithQueryParameter(string, object?)

Adds a parameter.

public RemoteServiceOptions WithQueryParameter(string name, object? value)

Parameters

name string

The name of the parameter.

value object

The value of the parameter.

Returns

RemoteServiceOptions

This instance for fluent code.

WithQueryParameters(IDictionary<string, object?>?)

Sets the parameters.

public RemoteServiceOptions WithQueryParameters(IDictionary<string, object?>? values)

Parameters

values IDictionary<string, object>

The parameters to use.

Returns

RemoteServiceOptions

This instance for fluent code.

WithQueryParameters(IEnumerable<RemoteServiceParameter>?)

Sets the parameters.

public RemoteServiceOptions WithQueryParameters(IEnumerable<RemoteServiceParameter>? values)

Parameters

values IEnumerable<RemoteServiceParameter>

The parameters to use.

Returns

RemoteServiceOptions

This instance for fluent code.

WithSkip(int)

Sets the number of items to skip.

public RemoteServiceOptions WithSkip(int value)

Parameters

value int

The number of items to skip.

Returns

RemoteServiceOptions

This instance for fluent code.

WithTop(int)

Sets the number of items to return.

public RemoteServiceOptions WithTop(int value)

Parameters

value int

The number of items to return.

Returns

RemoteServiceOptions

This instance for fluent code.