Class EndpointOptions
Base class for all endpoint options. Handles URI parameter binding via reflection.
Subclass per component with typed properties. BindFromUri maps string params to properties.
public abstract class EndpointOptions
Inheritance
Derived
Properties
UnmappedParameters
Parameters from URI that were not mapped to typed properties.
public IReadOnlyDictionary<string, string> UnmappedParameters { get; }
Methods
BindableOptions(Type)
The options a URI can set on optionsType, by the parameter name it writes: each settable
public static IReadOnlyList<EndpointOptions.BindableOption> BindableOptions(Type optionsType)
BindFromUri(IReadOnlyDictionary<string, string>)
Binds raw string parameters from URI to typed properties.
public void BindFromUri(IReadOnlyDictionary<string, string> parameters)
IsLenient(Type)
Whether optionsType takes parameters it has no property for
public static bool IsLenient(Type optionsType)
OptionValueHint(string)
A connector's own words for an option whose value was refused (what the modes mean, which
protected virtual string? OptionValueHint(string optionName)
ResolveOption(string?, IExchange)
Resolves a string option value per message.
public string? ResolveOption(string? value, IExchange exchange)
RoleOf(PropertyInfo)
The side of an endpoint that reads option (); null for both.
public static EndpointRole? RoleOf(PropertyInfo option)
UnknownParameterHint(string)
A connector's own words for a parameter name it does not know — typically a name it used to
protected virtual string? UnknownParameterHint(string name)
Validate()
Validates required parameters and constraints. Called after BindFromUri.
public abstract void Validate()
WrittenBesideConnectionFactory(Type, EndpointUri)
The parameters uri wrote, as written, that a connection factory sets
public static IReadOnlyList<string> WrittenBesideConnectionFactory(Type optionsType, EndpointUri uri)
WrittenForOtherRole(Type, EndpointUri, EndpointRole)
The parameters uri wrote, as written, whose option only the other side of an endpoint reads:
public static IReadOnlyList<string> WrittenForOtherRole(Type optionsType, EndpointUri uri, EndpointRole creating)