Table of Contents

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

Name string

Operation name.

InputType Type

Input type. If there is no input type (i.e. no parameter), this is typeof(void).

OutputType Type

Output 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

Type

MethodInfo

Gets the reflected interface method this definition is for if any.

public MethodInfo? MethodInfo { get; init; }

Property Value

MethodInfo

Name

Operation name.

public string Name { get; init; }

Property Value

string

OutputType

Output type. If there is no output type (i.e. returns void), this is typeof(void).

public Type OutputType { get; init; }

Property Value

Type

Methods

FromMethod(MethodInfo)

Create an operation definition from the given reflected interface method.

public static OperationDefinition FromMethod(MethodInfo method)

Parameters

method MethodInfo

Interface method.

Returns

OperationDefinition

Operation definition.