ComponentFunctionType Class

A function type of the component model: named parameters, an optional result, and whether it is asynchronous.

public sealed class ComponentFunctionType : ComponentType, IEquatable<ComponentFunctionType>
Inheritance
ComponentType ComponentFunctionType
Implements

Constructors

NameDescription
ComponentFunctionType(IEnumerable<ComponentField>, ComponentValueType?, bool)Initializes a new instance of the ComponentFunctionType class.

ComponentFunctionType(IEnumerable<ComponentField>, ComponentValueType?, bool)

ComponentTypes.cs

Initializes a new instance of the ComponentFunctionType class.

public ComponentFunctionType(IEnumerable<ComponentField> parameters, ComponentValueType? result, bool isAsync = false)

Parameters

parameters IEnumerable<ComponentField>
The parameters.
result ComponentValueType?
The type of the result, or null.
isAsync bool
Whether the function is asynchronous (async).

Properties

NameDescription
IsAsyncGets whether the function is asynchronous (async).
ParametersGets the parameters.
ResultGets the type of the result, or null.

Gets whether the function is asynchronous (async).

public bool IsAsync { get; }

Property value

bool

Gets the parameters.

public ImmutableArray<ComponentField> Parameters { get; }

Gets the type of the result, or null.

public ComponentValueType? Result { get; }

Property value

ComponentValueType?

Methods

NameDescription
Equals(ComponentFunctionType?)Indicates whether the current object is equal to another object of the same type.
Equals(object?)Determines whether the specified object is equal to the current object.
GetHashCode()Serves as the default hash function.
ToString()Returns the type in the text format.

Equals overloads

Equals(ComponentFunctionType?)

ComponentTypes.cs

Indicates whether the current object is equal to another object of the same type.

public bool Equals(ComponentFunctionType? other)
Parameters
other ComponentFunctionType?
An object to compare with this object.
Returns

bool true if the current object is equal to the other parameter; otherwise, false.

Equals(object?)

ComponentTypes.cs

Determines whether the specified object is equal to the current object.

public override bool Equals(object? obj)
Parameters
obj object?
The object to compare with the current object.
Returns

bool true if the specified object is equal to the current object; otherwise, false.

GetHashCode()

ComponentTypes.cs

Serves as the default hash function.

public override int GetHashCode()

Returns

int A hash code for the current object.

Returns the type in the text format.

public override string ToString()

Returns

string