C# Class Opc.Ua.NumericRange

A class that stores a numeric range.
A class that stores a numeric range.
ファイルを表示 Open project: OPCFoundation/UA-.NETStandardLibrary Class Usage Examples

Public Methods

Method Description
EnsureValid ( int count ) : bool

Ensures the bounds are valid values for a collection with the specified length.

Returns false if the numeric range is out-of-bounds.

EnsureValid ( object value ) : bool

Ensures the bounds are valid values for the object passed in.

Returns false if the object is not indexable or if the numeric range is out-of-bounds.

Equals ( object obj ) : bool

Returns true if the objects are equal.

Returns true if the objects are equal.

GetHashCode ( ) : int

Returns a suitable hash code for the object.

Returns a suitable hash code for the object.

NumericRange ( int begin ) : System

Initializes the object with a begin index.

Initializes the object with a begin index.

NumericRange ( int begin, int end ) : System

Initializes the object with a begin and end indexes.

Initializes the object with a begin and end indexes.

Parse ( string textToParse ) : NumericRange

Parses a string representing a numeric range.

Parses a string representing a numeric range.

ToString ( ) : string

Returns the string representation of the object.

Returns the string representation of the object.

ToString ( string format, IFormatProvider formatProvider ) : string

Formats the numeric range as a string.

Formats the numeric range as a string.

UpdateRange ( object &dst, object src ) : Opc.Ua.StatusCode

Applies the multidimensional index range.

Validate ( string textToParse, NumericRange &range ) : ServiceResult

Parses a string representing a numeric range.

operator ( ) : bool

Returns true if the objects are equal.

Returns true if the objects are equal.

Private Methods

Method Description
ApplyMultiRange ( object &value ) : Opc.Ua.StatusCode

Applies the multidimensional index range.

ApplyRange ( object &value ) : Opc.Ua.StatusCode

Method Details

EnsureValid() public method

Ensures the bounds are valid values for a collection with the specified length.
Returns false if the numeric range is out-of-bounds.
public EnsureValid ( int count ) : bool
count int The value to check is within range
return bool

EnsureValid() public method

Ensures the bounds are valid values for the object passed in.
Returns false if the object is not indexable or if the numeric range is out-of-bounds.
public EnsureValid ( object value ) : bool
value object The value to check
return bool

Equals() public method

Returns true if the objects are equal.
Returns true if the objects are equal.
public Equals ( object obj ) : bool
obj object The object to test against this
return bool

GetHashCode() public method

Returns a suitable hash code for the object.
Returns a suitable hash code for the object.
public GetHashCode ( ) : int
return int

NumericRange() public method

Initializes the object with a begin index.
Initializes the object with a begin index.
Thrown when the parameter is less than -1
public NumericRange ( int begin ) : System
begin int The starting point of the range
return System

NumericRange() public method

Initializes the object with a begin and end indexes.
Initializes the object with a begin and end indexes.
public NumericRange ( int begin, int end ) : System
begin int The end of the range
end int The beginning of the range
return System

Parse() public static method

Parses a string representing a numeric range.
Parses a string representing a numeric range.
Thrown when the numeric value of the parsed text is out of range
public static Parse ( string textToParse ) : NumericRange
textToParse string The text to parse, prior to checking it is within the allowed range
return NumericRange

ToString() public method

Returns the string representation of the object.
Returns the string representation of the object.
public ToString ( ) : string
return string

ToString() public method

Formats the numeric range as a string.
Formats the numeric range as a string.
Thrown when a non null/nothing is passed for either parameter
public ToString ( string format, IFormatProvider formatProvider ) : string
format string (Unused) Always pass NULL/NOTHING
formatProvider IFormatProvider (Unused) Always pass NULL/NOTHING
return string

UpdateRange() public method

Applies the multidimensional index range.
public UpdateRange ( object &dst, object src ) : Opc.Ua.StatusCode
dst object
src object
return Opc.Ua.StatusCode

Validate() public static method

Parses a string representing a numeric range.
public static Validate ( string textToParse, NumericRange &range ) : ServiceResult
textToParse string The text to parse, prior to checking it is within the allowed range
range NumericRange The parsed range.
return ServiceResult

operator() public static method

Returns true if the objects are equal.
Returns true if the objects are equal.
public static operator ( ) : bool
return bool