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 clusterName)

Parameters

clusterName string

The cluster name for a Neos Cluster.

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

PlainTextContentType

Represents the text content type.

public const string PlainTextContentType = "text/plain"

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

Remarks

If the service is a Neos cluster, it's the name of the cluster.

ServiceType

Gets the service type.

public NeosServiceType ServiceType { get; }

Property Value

NeosServiceType

Skip

Gets the number of items to skip.

public int? Skip { get; }

Property Value

int?

TargetedVersion

Gets the targeted version.

public string? TargetedVersion { get; }

Property Value

string

Remarks

If null the targeted version will be resolved depending on the tenant.

TenantIdentifier

Gets the tenant identifier to invoke a cluster Neos with a specific tenant.

public string? TenantIdentifier { get; }

Property Value

string

Remarks

If null the target tenant is the same as the current tenant.

Top

Gets the number of items to return. If left unspecified, the value of 10 will be used by the EntityViewController (see GroupeIsa.Neos.AspNetCore.Controllers.QueryArguments.Top) (REF. bug/26514).

public int? Top { get; }

Property Value

int?

UserIdentifier

Gets the user identifier to invoke a cluster Neos with a specific user.

public string? UserIdentifier { get; }

Property Value

string

Remarks

If null the target user is the same as the current user.

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.

[Obsolete("Use overloaded method with cancellation argument")]
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.

WithServiceType(NeosServiceType)

Sets the service type.

public RemoteServiceOptions WithServiceType(NeosServiceType serviceType)

Parameters

serviceType NeosServiceType

The service type.

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.

WithTargetedVersion(string)

Sets the targeted version.

When the targeted version is set, the service of the specified cluster will be invoked with the specified version, regardless of the tenant.

When the targeted version is not set, the service of the specified cluster will be invoked with the version resolved depending on the tenant.

public RemoteServiceOptions WithTargetedVersion(string version)

Parameters

version string

The targeted version.

Returns

RemoteServiceOptions

This instance.

WithTenantIdentifier(string)

Sets the tenant identifier to invoke a cluster Neos with a specific tenant.

public RemoteServiceOptions WithTenantIdentifier(string tenantIdentifier)

Parameters

tenantIdentifier string

The tenant identifier.

Returns

RemoteServiceOptions

This instance.

Remarks

Without calling WithTenantIdentifier(string), the target tenant is the same as the current tenant (if the current cluster is multi-tenant).

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.

WithUserIdentifier(string)

Sets the user identifier to invoke a cluster Neos with a specific user.

public RemoteServiceOptions WithUserIdentifier(string userIdentifier)

Parameters

userIdentifier string

The user identifier.

Returns

RemoteServiceOptions

This instance.

Remarks

Without calling WithUserIdentifier(string), the target user is the same as the current user.