OpcRange Members

Namespace: Opc.UaFx
Assemblies: Opc.UaFx.Advanced.dll
The OpcRange struct defines the following members.

OpcRange(int)

Initializes a new instance of the OpcRange with the specified start index of a single element.

C#

public OpcRange(int start)


Parameters

start Int32

The index of a single element to identify.


Exceptions

ArgumentOutOfRangeException

The start is less than zero.

OpcRange(int, int)

Initializes a new instance of the OpcRange with the specified start and end index of a range of elements.

C#

public OpcRange(int start, int end)


Parameters

start Int32

The index of the first element in the range.

end Int32

The index of the last element in the range.


Exceptions

ArgumentException

The start is not less than end.

ArgumentOutOfRangeException

The start or end is less than zero.

OpcRange(int, int, OpcRange)

Initializes a new instance of the OpcRange with the specified start and end index of a range of elements in the first dimension used for the next range.

C#

public OpcRange(int start, int end, OpcRange next)


Parameters

start Int32

The index of the first element in the first dimension.

end Int32

The index of the last element in the first dimension.

next OpcRange

The OpcRange for the next dimension.


Exceptions

ArgumentException

The start is not less than end.

ArgumentOutOfRangeException

The start or end is less than zero.

OpcRange(int, OpcRange)

Initializes a new instance of the OpcRange with the specified start index of a single element in the first dimension used for the next range.

C#

public OpcRange(int start, OpcRange next)


Parameters

start Int32

The index of a single element in the first dimension.

next OpcRange

The OpcRange for the next dimension.


Exceptions

ArgumentOutOfRangeException

The start is less than zero.

Empty

Stores the value used to identify an undefined OpcRange.

C#

public static readonly OpcRange Empty


Field Value
OpcRange


Remarks

Do not use NumericRange.Empty, because the foundations definition of empty does not support the 'default' value of a struct accordingly. This means the NumericRange.Empty uses the value -1 for the Start and End properties. However this can only be assured in case the user uses NumericRange.Empty (or Empty with this value). To assure that the 'real' default value results into a 'not used/considered' OpcRange we've decided to use our own definition of Empty using the default value zero for Start and End to assure that the default value of a OpcRange matches the definition of Empty.

Dimensions

Gets the total number of dimensions identified by this and its subsequent OpcRange values (see Next).

C#

public int Dimensions { get; }


Property Value

Int32

The total number of dimensions identified by this and its subsequent OpcRange values (see Next).

End

Gets the index of the last element in the range.

C#

public int End { get; }


Property Value

Int32

The zero-based index of the last element in the range.

Length

Gets the total number of elements identified by this OpcRange.

C#

public int Length { get; }


Property Value

Int32

The total number of elements identified from Start to End by this OpcRange.

Next

Gets the OpcRange for the next dimension within this OpcRange.

C#

public OpcRange Next { get; }


Property Value

OpcRange

A OpcRange identifying a single element or a range of elements in the next dimension or Empty if there is no subsequent range defined.

Start

Gets the index of the first element in the range.

C#

public int Start { get; }


Property Value

Int32

The zero-based index of the first element in the range.

CompareTo(object)

Compares the current OpcRange with the other.

C#

public int CompareTo(object other)


Parameters

other Object

The OpcRange to compare with this OpcRange.


Returns

Int32

A 32-bit signed integer that indicates the relative order of the objects being compared (CompareTo(Object)).

CompareTo(OpcRange)

Compares the current OpcRange with another OpcRange.

C#

public int CompareTo(OpcRange other)


Parameters

other OpcRange

The OpcRange to compare with this OpcRange.


Returns

Int32

A 32-bit signed integer that indicates the relative order of the objects being compared (CompareTo(0)).

Equals(object)

Determines whether the specified other is equal to this OpcRange.

C#

public override bool Equals(object other)


Parameters

other Object

The OpcRange to compare to the current OpcRange.


Returns

Boolean

The value true if the specified OpcRange is equal to the current OpcRange; otherwise the value false.

Equals(OpcRange)

Determines whether the specified other is equal to this OpcRange.

C#

public bool Equals(OpcRange other)


Parameters

other OpcRange

The OpcRange to compare to the current OpcRange.


Returns

Boolean

The value true if the specified OpcRange is equal to the current OpcRange; otherwise the value false.

GetHashCode()

Retrieves a hash code for this OpcRange.

C#

public override int GetHashCode()


Returns

Int32

An Int32 that contains the hash code for the OpcRange.

Of(int)

Determines the OpcRange which applies to the dimension specified.

C#

public OpcRange Of(int dimension)


Parameters

dimension Int32

The zero-based index of the dimension its range is to be determined.


Returns

OpcRange

The OpcRange which applies to the dimension specified.



Exceptions

ArgumentOutOfRangeException

The dimension is less than zero or greater or equals to Dimensions.

Parse(string)

Converts the specified String to its OpcRange equivalent.

C#

public static OpcRange Parse(string value)


Parameters

value String

A String containing the textual representation of a OpcRange to convert to.


Returns

OpcRange

A OpcRange which represents the numerical range data of the value specified.



Exceptions

ArgumentNullException

The value is a null reference (Nothing in Visual Basic).

FormatException

The value is not a valid textual representation of a numerical range.

ToString()

Converts the value of this instance to its equivalent string representation.

C#

public override string ToString()


Returns

String

The string representation.

TryParse(string, out OpcRange)

Tries to convert the specified String to its OpcRange equivalent. A return value indicates whether the conversion succeeded or failed.

C#

public static bool TryParse(string value, out OpcRange result)


Parameters

value String

A String containing the textual representation of a OpcRange to convert to.

result OpcRange

When this method returns, if the conversion succeeded, the OpcRange if value is a valid textual represention of a OpcRange. If the conversion failed, contains a default OpcRange. The conversion fails if value is a null reference (Nothing in Visual Basic) or is not a valid textual representation of a OpcRange.


Returns

Boolean

The value true if value was converted successfully; otherwise the value false.

explicit operator NumericRange(OpcRange)

Converts a OpcRange to an NumericRange object.

C#

public static explicit operator NumericRange(OpcRange value)

explicit operator string(OpcRange)

Converts a OpcRange to a String object.

C#

public static explicit operator string(OpcRange value)

implicit operator OpcRange((int, int))

Converts a Tuple“2 of Int32 values to a OpcRange value using the Item1 as the Start and the Item2 as the End of the OpcRange.

C#

public static implicit operator OpcRange((int, int) value)

implicit operator OpcRange(int)

Converts an Int32 to a OpcRange value using the value as the Start of the OpcRange.

C#

public static implicit operator OpcRange(int value)

implicit operator OpcRange(NumericRange)

Converts a NumericRange to an OpcRange object.

C#

public static implicit operator OpcRange(NumericRange value)

implicit operator OpcRange(string)

Converts a String to an OpcRange object.

C#

public static implicit operator OpcRange(string value)

operator !=(OpcRange, OpcRange)

Returns a value indicating whether two values of OpcRange are not equal.

C#

public static bool operator !=(OpcRange left, OpcRange right)

operator <(OpcRange, OpcRange)

Determines whether the first specified OpcRange value is less than the second specified OpcRange value.

C#

public static bool operator <(OpcRange left, OpcRange right)

operator <=(OpcRange, OpcRange)

Determines whether the first specified OpcRange value is less than or equal to the second OpcRange value.

C#

public static bool operator <=(OpcRange left, OpcRange right)

operator ==(OpcRange, OpcRange)

Returns a value indicating whether two values of OpcRange are equal.

C#

public static bool operator ==(OpcRange left, OpcRange right)

operator >(OpcRange, OpcRange)

Determines whether the first specified OpcRange value is greater than the second specified OpcRange value.

C#

public static bool operator >(OpcRange left, OpcRange right)

operator >=(OpcRange, OpcRange)

Determines whether the first specified OpcRange value is greater than or equal to the second specified OpcRange value.

C#

public static bool operator >=(OpcRange left, OpcRange right)