Class JsonRpcProxyOptions
- Namespace
- Nerdbank.JsonRpc
- Assembly
- Nerdbank.JsonRpc.dll
Provides options that control generated JSON-RPC client proxy attachment.
public sealed record JsonRpcProxyOptions : IEquatable<JsonRpcProxyOptions>
- Inheritance
-
JsonRpcProxyOptions
- Implements
- Inherited Members
Properties
Default
Gets a shared instance with default settings.
public static JsonRpcProxyOptions Default { get; }
Property Value
MethodNameTransform
Gets a function that maps a CLR method name without an explicit Name to the JSON-RPC method name sent on the wire.
public Func<string, string> MethodNameTransform { get; init; }
Property Value
- Func<string, string>
A non-null function. The default value is Default, which removes a trailing
Asyncsuffix and converts the result to camelCase.
Remarks
Methods explicitly named via Name always use that exact name and bypass this transform. Use Identity to interoperate with a StreamJsonRpc peer using its default (untransformed) method naming.
Exceptions
- ArgumentNullException
Thrown when set to null.
UseNamedArguments
Gets a value indicating whether requests encode arguments by parameter name rather than position.
public bool UseNamedArguments { get; init; }