Table of Contents

Class Parameter

Namespace
xFunc.Maths.Expressions.Parameters
Assembly
xFunc.Maths.dll

Represents the item of ExpressionParameters.

public class Parameter : IComparable<Parameter>, IEquatable<Parameter>
Inheritance
Parameter
Implements
Inherited Members

Constructors

Parameter(string, ParameterValue, ParameterType)

Initializes a new instance of the Parameter class.

public Parameter(string key, ParameterValue value, ParameterType type = ParameterType.Normal)

Parameters

key string

The name of parameter.

value ParameterValue

The value of parameter.

type ParameterType

The type of parameter.

Exceptions

ArgumentNullException

The key is null or empty.

Properties

Key

Gets the name of parameter.

public string Key { get; }

Property Value

string

Type

Gets the type of parameter.

public ParameterType Type { get; }

Property Value

ParameterType

Value

Gets or sets the value of parameter.

public ParameterValue Value { get; set; }

Property Value

ParameterValue

Exceptions

ParameterIsReadOnlyException

Thrown when the user tries to update read-only or constant parameter.

Methods

CompareTo(Parameter?)

Compares the current instance with another object of the same type and returns an integer that indicates whether the current instance precedes, follows, or occurs in the same position in the sort order as the other object.

public int CompareTo(Parameter? other)

Parameters

other Parameter

An object to compare with this instance.

Returns

int

A value that indicates the relative order of the objects being compared. The return value has these meanings:

Value Meaning
Less than zero This instance precedes other in the sort order.
Zero This instance occurs in the same position in the sort order as other.
Greater than zero This instance follows other in the sort order.

Constant(string, ParameterValue)

Creates a constant.

public static Parameter Constant(string key, ParameterValue value)

Parameters

key string

The name of parameter.

value ParameterValue

The value of parameter.

Returns

Parameter

A constant.

Equals(object?)

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.

Equals(Parameter?)

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

public bool Equals(Parameter? other)

Parameters

other Parameter

An object to compare with this object.

Returns

bool

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

GetHashCode()

Serves as the default hash function.

public override int GetHashCode()

Returns

int

A hash code for the current object.

ToString()

Returns a string that represents the current object.

public override string ToString()

Returns

string

A string that represents the current object.

Operators

operator ==(Parameter?, Parameter?)

Indicates whether left parameter is equal to the right parameter.

public static bool operator ==(Parameter? left, Parameter? right)

Parameters

left Parameter

The left parameter.

right Parameter

The right parameter.

Returns

bool

true if the left parameter is equal to the right parameter; otherwise, false.

operator >(Parameter?, Parameter?)

Indicates whether left parameter is greater than the right parameter.

public static bool operator >(Parameter? left, Parameter? right)

Parameters

left Parameter

The left parameter.

right Parameter

The right parameter.

Returns

bool

true if the left parameter is greater than the right parameter; otherwise, false.

operator >=(Parameter?, Parameter?)

Indicates whether left parameter is greater than or equal to the right parameter.

public static bool operator >=(Parameter? left, Parameter? right)

Parameters

left Parameter

The left parameter.

right Parameter

The right parameter.

Returns

bool

true if the left parameter is greater than or equal to the right parameter; otherwise, false.

operator !=(Parameter?, Parameter?)

Indicates whether left parameter is not equal to the right parameter.

public static bool operator !=(Parameter? left, Parameter? right)

Parameters

left Parameter

The left parameter.

right Parameter

The right parameter.

Returns

bool

true if the left parameter is not equal to the right parameter; otherwise, false.

operator <(Parameter?, Parameter?)

Indicates whether left parameter is less than the right parameter.

public static bool operator <(Parameter? left, Parameter? right)

Parameters

left Parameter

The left parameter.

right Parameter

The right parameter.

Returns

bool

true if the left parameter is less than the right parameter; otherwise, false.

operator <=(Parameter?, Parameter?)

Indicates whether left parameter is less than or equal to the right parameter.

public static bool operator <=(Parameter? left, Parameter? right)

Parameters

left Parameter

The left parameter.

right Parameter

The right parameter.

Returns

bool

true if the left parameter is less than or equal to the right parameter; otherwise, false.