ctrlX Data Layer API for .NET 5  2.1.0
IVariant Interface Reference

The variant interface. More...

Inheritance diagram for IVariant:
INativeDisposable Variant

Public Member Functions

DLR_RESULT CheckConvert (DLR_VARIANT_TYPE dataType)
 Checks whether the variant can be converted to another type. More...
 
Variant Clone ()
 Clones the value. More...
 
bool Equals (Variant other)
 Checks whether the values are equal. More...
 
int GetHashCode ()
 Gets the hash code of the variant. More...
 
bool ToBool ()
 Converts the value to bool. More...
 
bool[] ToBoolArray ()
 Converts the value to an array of bool value. More...
 
byte ToByte ()
 Converts the value to an 8-bit unsigned integer. More...
 
byte[] ToByteArray ()
 Converts the value to an array of 8-bit unsigned integers. More...
 
double ToDouble ()
 Converts the value to a double-precision floating-point number. More...
 
double[] ToDoubleArray ()
 Converts the value to an array of double-precision floating-point numbers. More...
 
ByteBuffer ToFlatbuffers ()
 Converts the value to flatbuffers. More...
 
float ToFloat ()
 Converts the value to float. More...
 
float[] ToFloatArray ()
 Converts the value to an array of float. More...
 
short ToInt16 ()
 Converts the value to a 16-bit signed integer. More...
 
short[] ToInt16Array ()
 Converts the value to an array of 16-bit signed integers. More...
 
int ToInt32 ()
 Converts the value to a 32-bit signed integer. More...
 
int[] ToInt32Array ()
 Converts the value to an array of 32-bit signed integers. More...
 
long ToInt64 ()
 Converts the value to a 64-bit signed integer. More...
 
long[] ToInt64Array ()
 Converts the value to an array of 64-bit signed integers. More...
 
byte[] ToRawByteArray ()
 Converts the value to an array of 8-bit raw integers. More...
 
sbyte ToSByte ()
 Converts the value to an 8-bit signed integer. More...
 
sbyte[] ToSByteArray ()
 Converts the value to an array of an 8-bit signed integers. More...
 
string ToString ()
 Converts the value to string. If the value can't be converted for any reason, an empty string is returned. For arrays and numbers an empty string is returned (not implemented yet). More...
 
string[] ToStringArray ()
 Converts the value to an array of strings. More...
 
ushort ToUInt16 ()
 Converts the value to a 16-bit unsigned integer. More...
 
ushort[] ToUInt16Array ()
 Converts the value to an array of 16-bit unsigned integers. More...
 
uint ToUInt32 ()
 Converts the value to a 32-bit unsigned integer. More...
 
uint[] ToUInt32Array ()
 Converts the value to an array of 32-bit unsigned integers. More...
 
ulong ToUInt64 ()
 Converts the value to a 64-bit unsigned integer. More...
 
ulong[] ToUInt64Array ()
 Converts the value to an array of 64-bit unsigned integers. More...
 

Properties

DLR_VARIANT_TYPE DataType [get]
 Gets the data type of the variant. More...
 
bool IsArray [get]
 Checks if the value is an array. More...
 
bool IsBool [get]
 Indicates whether the Variant contains a boolean value More...
 
bool IsFlatbuffers [get]
 Checks if the value is flatbuffers. More...
 
bool IsNull [get]
 Checks if the value is null. More...
 
bool IsNumber [get]
 Indicates whether the Variant contains a numeric value Returns false for numeric arrays and booleans More...
 
bool IsString [get]
 Indicates whether the Variant contains a string value More...
 
string JsonDataType [get]
 Gets the data type as JSON string. More...
 
DateTime Timestamp [get]
 Gets the time stamp of the variant. More...
 
object Value [get]
 Gets the value of the variant. More...
 
- Properties inherited from INativeDisposable
bool IsDisposed [get]
 Checks disposed More...
 

Detailed Description

The variant interface.

Definition at line 9 of file IVariant.cs.

Member Function Documentation

◆ CheckConvert()

DLR_RESULT CheckConvert ( DLR_VARIANT_TYPE  dataType)

Checks whether the variant can be converted to another type.

Parameters
dataTypeDestination type
Returns
Result whether the conversion is possible
Exceptions
ObjectDisposedExceptionCannot access a disposed object

Implemented in Variant.

◆ Clone()

Variant Clone ( )

Clones the value.

Returns
Result of clone
Exceptions
ObjectDisposedExceptionCannot access a disposed object
InvalidOperationExceptionObject ist not cloneable.

Implemented in Variant.

◆ Equals()

bool Equals ( Variant  other)

Checks whether the values are equal.

Parameters
otherReference to variant
Returns
Returns whether the values are equal

Implemented in Variant.

◆ GetHashCode()

int GetHashCode ( )

Gets the hash code of the variant.

Implemented in Variant.

◆ ToBool()

bool ToBool ( )

Converts the value to bool.

Exceptions
ObjectDisposedExceptionCannot access a disposed object

Implemented in Variant.

◆ ToBoolArray()

bool [] ToBoolArray ( )

Converts the value to an array of bool value.

Returns
An array of bool values
Exceptions
ObjectDisposedExceptionCannot access a disposed object

Implemented in Variant.

◆ ToByte()

byte ToByte ( )

Converts the value to an 8-bit unsigned integer.

Returns
Value of the variant as a byte
Exceptions
ObjectDisposedExceptionCannot access a disposed object

Implemented in Variant.

◆ ToByteArray()

byte [] ToByteArray ( )

Converts the value to an array of 8-bit unsigned integers.

Returns
An array of bytes
Exceptions
ObjectDisposedExceptionCannot access a disposed object

Implemented in Variant.

◆ ToDouble()

double ToDouble ( )

Converts the value to a double-precision floating-point number.

Returns
Value of the variant as a double
Exceptions
ObjectDisposedExceptionCannot access a disposed object

Implemented in Variant.

◆ ToDoubleArray()

double [] ToDoubleArray ( )

Converts the value to an array of double-precision floating-point numbers.

Returns
An array of double

Implemented in Variant.

◆ ToFlatbuffers()

ByteBuffer ToFlatbuffers ( )

Converts the value to flatbuffers.

Returns
ByteBuffer
Exceptions
ObjectDisposedExceptionCannot access a disposed object

Implemented in Variant.

◆ ToFloat()

float ToFloat ( )

Converts the value to float.

Returns
Value of the variant as a float
Exceptions
ObjectDisposedExceptionCannot access a disposed object

Implemented in Variant.

◆ ToFloatArray()

float [] ToFloatArray ( )

Converts the value to an array of float.

Returns
An array of float
Exceptions
ObjectDisposedExceptionCannot access a disposed object

Implemented in Variant.

◆ ToInt16()

short ToInt16 ( )

Converts the value to a 16-bit signed integer.

Returns
Value of the variant as a short
Exceptions
ObjectDisposedExceptionCannot access a disposed object

Implemented in Variant.

◆ ToInt16Array()

short [] ToInt16Array ( )

Converts the value to an array of 16-bit signed integers.

Returns
An array of short
Exceptions
ObjectDisposedExceptionCannot access a disposed object

Implemented in Variant.

◆ ToInt32()

int ToInt32 ( )

Converts the value to a 32-bit signed integer.

Returns
Value of the variant as an int
Exceptions
ObjectDisposedExceptionCannot access a disposed object

Implemented in Variant.

◆ ToInt32Array()

int [] ToInt32Array ( )

Converts the value to an array of 32-bit signed integers.

Returns
An array of int
Exceptions
ObjectDisposedExceptionCannot access a disposed object

Implemented in Variant.

◆ ToInt64()

long ToInt64 ( )

Converts the value to a 64-bit signed integer.

Returns
Value of the variant as a long
Exceptions
ObjectDisposedExceptionCannot access a disposed object

Implemented in Variant.

◆ ToInt64Array()

long [] ToInt64Array ( )

Converts the value to an array of 64-bit signed integers.

Returns
An array of long
Exceptions
ObjectDisposedExceptionCannot access a disposed object

Implemented in Variant.

◆ ToRawByteArray()

byte [] ToRawByteArray ( )

Converts the value to an array of 8-bit raw integers.

Returns
An array of byte
Exceptions
ObjectDisposedExceptionCannot access a disposed object

Implemented in Variant.

◆ ToSByte()

sbyte ToSByte ( )

Converts the value to an 8-bit signed integer.

Returns
Value of the variant as a sbyte
Exceptions
ObjectDisposedExceptionCannot access a disposed object

Implemented in Variant.

◆ ToSByteArray()

sbyte [] ToSByteArray ( )

Converts the value to an array of an 8-bit signed integers.

Returns
An array of sbytes
Exceptions
ObjectDisposedExceptionCannot access a disposed object

Implemented in Variant.

◆ ToString()

string ToString ( )

Converts the value to string. If the value can't be converted for any reason, an empty string is returned. For arrays and numbers an empty string is returned (not implemented yet).

Returns
Value of the variant as a string
Exceptions
ObjectDisposedExceptionCannot access a disposed object

Implemented in Variant.

◆ ToStringArray()

string [] ToStringArray ( )

Converts the value to an array of strings.

Returns
An array of string

Implemented in Variant.

◆ ToUInt16()

ushort ToUInt16 ( )

Converts the value to a 16-bit unsigned integer.

Returns
Value of the variant as a ushort
Exceptions
ObjectDisposedExceptionCannot access a disposed object

Implemented in Variant.

◆ ToUInt16Array()

ushort [] ToUInt16Array ( )

Converts the value to an array of 16-bit unsigned integers.

Returns
An array of ushort
Exceptions
ObjectDisposedExceptionCannot access a disposed object

Implemented in Variant.

◆ ToUInt32()

uint ToUInt32 ( )

Converts the value to a 32-bit unsigned integer.

Returns
Value of the variant as an uint
Exceptions
ObjectDisposedExceptionCannot access a disposed object

Implemented in Variant.

◆ ToUInt32Array()

uint [] ToUInt32Array ( )

Converts the value to an array of 32-bit unsigned integers.

Returns
An array of uint
Exceptions
ObjectDisposedExceptionCannot access a disposed object

Implemented in Variant.

◆ ToUInt64()

ulong ToUInt64 ( )

Converts the value to a 64-bit unsigned integer.

Returns
Value of the variant as a ulong
Exceptions
ObjectDisposedExceptionCannot access a disposed object

Implemented in Variant.

◆ ToUInt64Array()

ulong [] ToUInt64Array ( )

Converts the value to an array of 64-bit unsigned integers.

Returns
An array of ulong
Exceptions
ObjectDisposedExceptionCannot access a disposed object

Implemented in Variant.

Property Documentation

◆ DataType

DLR_VARIANT_TYPE DataType
get

Gets the data type of the variant.

Returns
Type of the variant
Exceptions
ObjectDisposedExceptionCannot access a disposed object

Definition at line 40 of file IVariant.cs.

◆ IsArray

bool IsArray
get

Checks if the value is an array.

Exceptions
ObjectDisposedExceptionCannot access a disposed object

Definition at line 52 of file IVariant.cs.

◆ IsBool

bool IsBool
get

Indicates whether the Variant contains a boolean value

Exceptions
ObjectDisposedExceptionCannot access a disposed object

Definition at line 64 of file IVariant.cs.

◆ IsFlatbuffers

bool IsFlatbuffers
get

Checks if the value is flatbuffers.

Exceptions
ObjectDisposedExceptionCannot access a disposed object

Definition at line 77 of file IVariant.cs.

◆ IsNull

bool IsNull
get

Checks if the value is null.

Exceptions
ObjectDisposedExceptionCannot access a disposed object

Definition at line 83 of file IVariant.cs.

◆ IsNumber

bool IsNumber
get

Indicates whether the Variant contains a numeric value Returns false for numeric arrays and booleans

Exceptions
ObjectDisposedExceptionCannot access a disposed object

Definition at line 71 of file IVariant.cs.

◆ IsString

bool IsString
get

Indicates whether the Variant contains a string value

Exceptions
ObjectDisposedExceptionCannot access a disposed object

Definition at line 58 of file IVariant.cs.

◆ JsonDataType

string JsonDataType
get

Gets the data type as JSON string.

Exceptions
ObjectDisposedExceptionCannot access a disposed object

Definition at line 46 of file IVariant.cs.

◆ Timestamp

DateTime Timestamp
get

Gets the time stamp of the variant.

Exceptions
ObjectDisposedExceptionCannot access a disposed object

Definition at line 33 of file IVariant.cs.

◆ Value

object Value
get

Gets the value of the variant.

Exceptions
ObjectDisposedExceptionCannot access a disposed object

Definition at line 15 of file IVariant.cs.


The documentation for this interface was generated from the following file: