ctrlX Data Layer .NET API  4.3.0
Loading...
Searching...
No Matches
IVariant Interface Reference

The IVariant interface. More...

Inheritance diagram for IVariant:
INativeDisposable Variant

Public Member Functions

DLR_RESULT CheckConvert (DLR_VARIANT_TYPE dataType)
 Gets a value that indicates whether the variant can be converted to another type.
 
Variant Clone ()
 Clones the value.
 
bool Equals (Variant other)
 Gets a value that indicates whether the values are equal.
 
DLR_RESULT IVariant value GetDataFromFlatbuffers (IVariant typeFlatbuffers, string query)
 
int GetHashCode ()
 Gets the hash code of the variant.
 
bool ToBool ()
 Converts the value to bool.
 
bool[] ToBoolArray ()
 Converts the value to an array of bool value.
 
byte ToByte ()
 Converts the value to an 8-bit unsigned integer.
 
byte[] ToByteArray ()
 Converts the value to an array of 8-bit unsigned integers.
 
DateTime ToDateTime ()
 Converts the value to DateTime.
 
DateTime[] ToDateTimeArray ()
 Converts the value to an array of DateTime.
 
double ToDouble ()
 Converts the value to a double-precision floating-point number.
 
double[] ToDoubleArray ()
 Converts the value to an array of double-precision floating-point numbers.
 
ByteBuffer ToFlatbuffers ()
 Converts the value to flatbuffers.
 
float ToFloat ()
 Converts the value to float.
 
float[] ToFloatArray ()
 Converts the value to an array of float.
 
short ToInt16 ()
 Converts the value to a 16-bit signed integer.
 
short[] ToInt16Array ()
 Converts the value to an array of 16-bit signed integers.
 
int ToInt32 ()
 Converts the value to a 32-bit signed integer.
 
int[] ToInt32Array ()
 Converts the value to an array of 32-bit signed integers.
 
long ToInt64 ()
 Converts the value to a 64-bit signed integer.
 
long[] ToInt64Array ()
 Converts the value to an array of 64-bit signed integers.
 
byte[] ToRawByteArray ()
 Converts the value to an array of 8-bit raw integers.
 
sbyte ToSByte ()
 Converts the value to an 8-bit signed integer.
 
sbyte[] ToSByteArray ()
 Converts the value to an array of an 8-bit signed integers.
 
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).
 
string[] ToStringArray ()
 Converts the value to an array of strings.
 
ushort ToUInt16 ()
 Converts the value to a 16-bit unsigned integer.
 
ushort[] ToUInt16Array ()
 Converts the value to an array of 16-bit unsigned integers.
 
uint ToUInt32 ()
 Converts the value to a 32-bit unsigned integer.
 
uint[] ToUInt32Array ()
 Converts the value to an array of 32-bit unsigned integers.
 
ulong ToUInt64 ()
 Converts the value to a 64-bit unsigned integer.
 
ulong[] ToUInt64Array ()
 Converts the value to an array of 64-bit unsigned integers.
 

Public Attributes

DLR_RESULT result
 Gets data of a complex Variant (flatbuffers) by query.
 

Properties

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

Detailed Description

The IVariant interface.

Definition at line 9 of file IVariant.cs.

Member Function Documentation

◆ CheckConvert()

DLR_RESULT CheckConvert ( DLR_VARIANT_TYPE  dataType)

Gets a value that indicates 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)

Gets a value that indicates 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.

◆ ToDateTime()

DateTime ToDateTime ( )

Converts the value to DateTime.

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

Implemented in Variant.

◆ ToDateTimeArray()

DateTime[] ToDateTimeArray ( )

Converts the value to an array of DateTime.

Returns
An array of DateTime.

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.

Member Data Documentation

◆ result

DLR_RESULT result

Gets data of a complex Variant (flatbuffers) by query.

Parameters
typeFlatbuffersType (schema) of the flatbuffers.
queryQuery string
Returns
Result of the method call.
Exceptions
ObjectDisposedExceptionCannot access a disposed object.
ArgumentNullExceptionArgument cannot be null.

Definition at line 281 of file IVariant.cs.

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.

Implemented in Variant.

Definition at line 34 of file IVariant.cs.

◆ IsArray

bool IsArray
get

Checks if the value is an array.

Exceptions
ObjectDisposedExceptionCannot access a disposed object.

Implemented in Variant.

Definition at line 46 of file IVariant.cs.

◆ IsBool

bool IsBool
get

Gets a value that indicates whether the Variant contains a boolean value.

Exceptions
ObjectDisposedExceptionCannot access a disposed object.

Implemented in Variant.

Definition at line 58 of file IVariant.cs.

◆ IsFlatbuffers

bool IsFlatbuffers
get

Checks if the value is flatbuffers.

Exceptions
ObjectDisposedExceptionCannot access a disposed object.

Implemented in Variant.

Definition at line 71 of file IVariant.cs.

◆ IsNull

bool IsNull
get

Checks if the value is null.

Exceptions
ObjectDisposedExceptionCannot access a disposed object.

Implemented in Variant.

Definition at line 77 of file IVariant.cs.

◆ IsNumber

bool IsNumber
get

Gets a value that indicates whether the Variant contains a numeric value Returns false for numeric arrays and booleans.

Exceptions
ObjectDisposedExceptionCannot access a disposed object.

Implemented in Variant.

Definition at line 65 of file IVariant.cs.

◆ IsString

bool IsString
get

Gets a value that indicates whether the Variant contains a string value.

Exceptions
ObjectDisposedExceptionCannot access a disposed object.

Implemented in Variant.

Definition at line 52 of file IVariant.cs.

◆ JsonDataType

string JsonDataType
get

Gets the data type as JSON string.

Exceptions
ObjectDisposedExceptionCannot access a disposed object.

Implemented in Variant.

Definition at line 40 of file IVariant.cs.

◆ Value

object Value
get

Gets the value of the variant.

Exceptions
ObjectDisposedExceptionCannot access a disposed object.

Implemented in Variant.

Definition at line 15 of file IVariant.cs.


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