ctrlX Data Layer .NET API  4.3.0
Loading...
Searching...
No Matches
IVariant.cs
1using Google.FlatBuffers;
2using System;
3
4namespace Datalayer
5{
9 public interface IVariant : INativeDisposable
10 {
15 object Value { get; }
16
22 bool Equals(Variant other);
23
28
35
40 string JsonDataType { get; }
41
46 bool IsArray { get; }
47
52 bool IsString { get; }
53
58 bool IsBool { get; }
59
65 bool IsNumber { get; }
66
71 bool IsFlatbuffers { get; }
72
77 bool IsNull { get; }
78
83 bool ToBool();
84
90 sbyte ToSByte();
91
97 byte ToByte();
98
104 short ToInt16();
105
111 ushort ToUInt16();
112
118 int ToInt32();
119
125 uint ToUInt32();
126
132 long ToInt64();
133
139 ulong ToUInt64();
140
146 float ToFloat();
147
153 double ToDouble();
154
162 string ToString();
163
169 DateTime ToDateTime();
170
176 bool[] ToBoolArray();
177
183 sbyte[] ToSByteArray();
184
190 byte[] ToByteArray();
191
197 short[] ToInt16Array();
198
204 ushort[] ToUInt16Array();
205
212
219
225 long[] ToInt64Array();
226
232 ulong[] ToUInt64Array();
233
239 float[] ToFloatArray();
240
245 double[] ToDoubleArray();
246
251 string[] ToStringArray();
252
257 DateTime[] ToDateTimeArray();
258
265
271 ByteBuffer ToFlatbuffers();
272
281 (DLR_RESULT result, IVariant value) GetDataFromFlatbuffers(IVariant typeFlatbuffers, string query);
282
290
298 }
299}
Provides the implementation for IVariant.
Definition: Variant.cs:18
The INativeDisposable interface.
The IVariant interface.
Definition: IVariant.cs:10
string[] ToStringArray()
Converts the value to an array of strings.
short ToInt16()
Converts the value to a 16-bit signed integer.
long[] ToInt64Array()
Converts the value to an array of 64-bit signed integers.
sbyte ToSByte()
Converts the value to an 8-bit signed integer.
float[] ToFloatArray()
Converts the value to an array of float.
double ToDouble()
Converts the value to a double-precision floating-point number.
string ToString()
Converts the value to string. If the value can't be converted for any reason, an empty string is retu...
sbyte[] ToSByteArray()
Converts the value to an array of an 8-bit signed integers.
ushort[] ToUInt16Array()
Converts the value to an array of 16-bit unsigned integers.
object Value
Gets the value of the variant.
Definition: IVariant.cs:15
DateTime ToDateTime()
Converts the value to DateTime.
short[] ToInt16Array()
Converts the value to an array of 16-bit signed integers.
double[] ToDoubleArray()
Converts the value to an array of double-precision floating-point numbers.
ByteBuffer ToFlatbuffers()
Converts the value to flatbuffers.
uint ToUInt32()
Converts the value to a 32-bit unsigned integer.
byte ToByte()
Converts the value to an 8-bit unsigned integer.
ulong[] ToUInt64Array()
Converts the value to an array of 64-bit unsigned integers.
bool IsString
Gets a value that indicates whether the Variant contains a string value.
Definition: IVariant.cs:52
byte[] ToByteArray()
Converts the value to an array of 8-bit unsigned integers.
DLR_RESULT CheckConvert(DLR_VARIANT_TYPE dataType)
Gets a value that indicates whether the variant can be converted to another type.
bool IsNull
Checks if the value is null.
Definition: IVariant.cs:77
bool Equals(Variant other)
Gets a value that indicates whether the values are equal.
bool IsFlatbuffers
Checks if the value is flatbuffers.
Definition: IVariant.cs:71
byte[] ToRawByteArray()
Converts the value to an array of 8-bit raw integers.
DLR_VARIANT_TYPE DataType
Gets the data type of the variant.
Definition: IVariant.cs:34
int GetHashCode()
Gets the hash code of the variant.
DLR_RESULT result
Gets data of a complex Variant (flatbuffers) by query.
Definition: IVariant.cs:281
bool ToBool()
Converts the value to bool.
uint[] ToUInt32Array()
Converts the value to an array of 32-bit unsigned integers.
long ToInt64()
Converts the value to a 64-bit signed integer.
Variant Clone()
Clones the value.
ulong ToUInt64()
Converts the value to a 64-bit unsigned integer.
string JsonDataType
Gets the data type as JSON string.
Definition: IVariant.cs:40
bool IsBool
Gets a value that indicates whether the Variant contains a boolean value.
Definition: IVariant.cs:58
ushort ToUInt16()
Converts the value to a 16-bit unsigned integer.
float ToFloat()
Converts the value to float.
int ToInt32()
Converts the value to a 32-bit signed integer.
bool IsNumber
Gets a value that indicates whether the Variant contains a numeric value Returns false for numeric ar...
Definition: IVariant.cs:65
int[] ToInt32Array()
Converts the value to an array of 32-bit signed integers.
bool IsArray
Checks if the value is an array.
Definition: IVariant.cs:46
DateTime[] ToDateTimeArray()
Converts the value to an array of DateTime.
bool[] ToBoolArray()
Converts the value to an array of bool value.
DLR_RESULT
The result.
Definition: Enums.cs:153
DLR_VARIANT_TYPE
DLR_VARIANT_TYPE.
Definition: Enums.cs:409