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
stringIdentifier of the service invoked.
Fields
ApiPrefix
Represents the API prefix.
public const string ApiPrefix = "api"
Field Value
DefaultApiVersion
Represents the current API version.
public const string DefaultApiVersion = "v1"
Field Value
JsonContentType
Represents the JSON content type.
public const string JsonContentType = "application/json"
Field Value
MethodResourceName
Represents the method resource name.
public const string MethodResourceName = "methods"
Field Value
Properties
ApiVersion
Gets The API version.
public string ApiVersion { get; }
Property Value
Body
Gets the body.
public object? Body { get; }
Property Value
CancellationToken
Gets the cancellation token.
public CancellationToken CancellationToken { get; }
Property Value
Endpoint
Gets the network resource or service.
public string Endpoint { get; }
Property Value
Filter
Gets the filter.
public string? Filter { get; }
Property Value
HasApiPrefix
Gets a value indicating whether the route has API prefix.
public bool HasApiPrefix { get; }
Property Value
Headers
Gets the request headers.
public IDictionary<string, string>? Headers { get; }
Property Value
HttpMethod
Gets the HTTP method.
public HttpMethod HttpMethod { get; }
Property Value
KeyValues
Gets the key values.
public object? KeyValues { get; }
Property Value
MediaType
Gets the media type.
public string MediaType { get; }
Property Value
OrderBy
Gets the sort order.
public string? OrderBy { get; }
Property Value
Path
Gets the path.
public string Path { get; }
Property Value
QueryParameters
Gets the key query parameter collection.
public IList<RemoteServiceParameter>? QueryParameters { get; }
Property Value
ServiceId
Gets the service identifier.
public string ServiceId { get; }
Property Value
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
booltrue
if 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
stringThe 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
HttpContentThe 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
objectThe data.
Returns
- RemoteServiceOptions
This instance for fluent code.
WithCancellationToken(CancellationToken)
Sets the cancellation token.
public RemoteServiceOptions WithCancellationToken(CancellationToken value)
Parameters
value
CancellationTokenThe 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
stringThe filter.
Returns
- RemoteServiceOptions
This instance for fluent code.
WithHeader(string, string)
Adds a header.
public RemoteServiceOptions WithHeader(string name, string value)
Parameters
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
HttpMethodThe HTTP method.
Returns
- RemoteServiceOptions
This instance for fluent code.
WithKeyValues(object?)
Sets the key values.
public RemoteServiceOptions WithKeyValues(object? values)
Parameters
values
objectThe key values.
Returns
- RemoteServiceOptions
This instance for fluent code.
WithMediaType(string)
Sets the media type.
public RemoteServiceOptions WithMediaType(string value)
Parameters
value
stringThe media type.
Returns
- RemoteServiceOptions
This instance for fluent code.
WithOrderBy(string)
Sets the sort order.
public RemoteServiceOptions WithOrderBy(string value)
Parameters
value
stringThe filter.
Returns
- RemoteServiceOptions
This instance for fluent code.
WithPath(string)
Sets the path.
public RemoteServiceOptions WithPath(string value)
Parameters
value
stringThe path.
Returns
- RemoteServiceOptions
This instance for fluent code.
WithQueryParameter(RemoteServiceParameter)
Adds a parameter.
public RemoteServiceOptions WithQueryParameter(RemoteServiceParameter value)
Parameters
value
RemoteServiceParameterThe parameter to add.
Returns
- RemoteServiceOptions
This instance for fluent code.
WithQueryParameter(string, object?)
Adds a parameter.
public RemoteServiceOptions WithQueryParameter(string name, object? value)
Parameters
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
intThe 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
intThe number of items to return.
Returns
- RemoteServiceOptions
This instance for fluent code.