Class OperationDefinition
- Namespace
- NexusRpc
- Assembly
- NexusRpc.dll
Definition of a Nexus service operation. Most users do not instantiate this directly, it is implicitly instantiated by the system. For those that do, FromMethod(MethodInfo) is the common way to obtain a definition from an interface method.
public record OperationDefinition : IEquatable<OperationDefinition>
- Inheritance
-
OperationDefinition
- Implements
- Inherited Members
Constructors
OperationDefinition(string, Type, Type)
Definition of a Nexus service operation. Most users do not instantiate this directly, it is implicitly instantiated by the system. For those that do, FromMethod(MethodInfo) is the common way to obtain a definition from an interface method.
public OperationDefinition(string Name, Type InputType, Type OutputType)
Parameters
NamestringOperation name.
InputTypeTypeInput type. If there is no input type (i.e. no parameter), this is
typeof(void).OutputTypeTypeOutput type. If there is no output type (i.e. returns void), this is
typeof(void).
Properties
InputType
Input type. If there is no input type (i.e. no parameter), this is
typeof(void).
public Type InputType { get; init; }
Property Value
MethodInfo
Gets the reflected interface method this definition is for if any.
public MethodInfo? MethodInfo { get; init; }
Property Value
Name
Operation name.
public string Name { get; init; }
Property Value
OutputType
Output type. If there is no output type (i.e. returns void), this
is typeof(void).
public Type OutputType { get; init; }
Property Value
Methods
FromMethod(MethodInfo)
Create an operation definition from the given reflected interface method.
public static OperationDefinition FromMethod(MethodInfo method)
Parameters
methodMethodInfoInterface method.
Returns
- OperationDefinition
Operation definition.