ctrlX Data Layer API for .NET 5  2.1.0
IVariant.cs
1 using FlatBuffers;
2 using System;
3 
4 namespace Datalayer
5 {
9  public interface IVariant : INativeDisposable
10  {
15  object Value { get; }
16 
22  bool Equals(Variant other);
23 
27  int GetHashCode();
28 
33  DateTime Timestamp { get; }
34 
41 
46  string JsonDataType { get; }
47 
52  bool IsArray { get; }
53 
58  bool IsString { get; }
59 
64  bool IsBool { get; }
65 
71  bool IsNumber { get; }
72 
77  bool IsFlatbuffers { get; }
78 
83  bool IsNull { get; }
84 
89  bool ToBool();
90 
96  sbyte ToSByte();
97 
103  byte ToByte();
104 
110  short ToInt16();
111 
117  ushort ToUInt16();
118 
124  int ToInt32();
125 
131  uint ToUInt32();
132 
138  long ToInt64();
139 
145  ulong ToUInt64();
146 
152  float ToFloat();
153 
159  double ToDouble();
160 
168  string ToString();
169 
175  bool[] ToBoolArray();
176 
182  sbyte[] ToSByteArray();
183 
189  byte[] ToByteArray();
190 
196  short[] ToInt16Array();
197 
203  ushort[] ToUInt16Array();
204 
210  int[] ToInt32Array();
211 
217  uint[] ToUInt32Array();
218 
224  long[] ToInt64Array();
225 
231  ulong[] ToUInt64Array();
232 
238  float[] ToFloatArray();
239 
244  double[] ToDoubleArray();
245 
250  string[] ToStringArray();
251 
257  byte[] ToRawByteArray();
258 
264  ByteBuffer ToFlatbuffers();
265 
273 
280  Variant Clone();
281  }
282 }
Datalayer.IVariant.ToString
string ToString()
Converts the value to string. If the value can't be converted for any reason, an empty string is retu...
Datalayer.IVariant.IsArray
bool IsArray
Checks if the value is an array.
Definition: IVariant.cs:52
Datalayer.IVariant.ToInt32
int ToInt32()
Converts the value to a 32-bit signed integer.
Datalayer.IVariant.ToByte
byte ToByte()
Converts the value to an 8-bit unsigned integer.
Datalayer.IVariant.IsString
bool IsString
Indicates whether the Variant contains a string value
Definition: IVariant.cs:58
Datalayer.IVariant.ToByteArray
byte[] ToByteArray()
Converts the value to an array of 8-bit unsigned integers.
Datalayer.IVariant.GetHashCode
int GetHashCode()
Gets the hash code of the variant.
Datalayer.IVariant.ToSByte
sbyte ToSByte()
Converts the value to an 8-bit signed integer.
Datalayer.IVariant.ToInt64Array
long[] ToInt64Array()
Converts the value to an array of 64-bit signed integers.
Datalayer.IVariant.Equals
bool Equals(Variant other)
Checks whether the values are equal.
Datalayer.DLR_VARIANT_TYPE
DLR_VARIANT_TYPE
DLR_VARIANT_TYPE
Definition: Enums.cs:218
Datalayer.IVariant.CheckConvert
DLR_RESULT CheckConvert(DLR_VARIANT_TYPE dataType)
Checks whether the variant can be converted to another type.
Datalayer.IVariant.ToInt32Array
int[] ToInt32Array()
Converts the value to an array of 32-bit signed integers.
Datalayer.IVariant.ToRawByteArray
byte[] ToRawByteArray()
Converts the value to an array of 8-bit raw integers.
Datalayer.IVariant.IsBool
bool IsBool
Indicates whether the Variant contains a boolean value
Definition: IVariant.cs:64
Datalayer.IVariant.ToBool
bool ToBool()
Converts the value to bool.
Datalayer.DLR_RESULT
DLR_RESULT
DLR_RESULT
Definition: Enums.cs:63
Datalayer.IVariant.ToUInt32Array
uint[] ToUInt32Array()
Converts the value to an array of 32-bit unsigned integers.
Datalayer.IVariant.ToInt16
short ToInt16()
Converts the value to a 16-bit signed integer.
Datalayer.Variant
Variant class
Definition: Variant.cs:15
Datalayer.IVariant.ToUInt64
ulong ToUInt64()
Converts the value to a 64-bit unsigned integer.
Datalayer.IVariant.ToUInt16Array
ushort[] ToUInt16Array()
Converts the value to an array of 16-bit unsigned integers.
Datalayer.IVariant.ToUInt32
uint ToUInt32()
Converts the value to a 32-bit unsigned integer.
Datalayer.INativeDisposable
The native disposable interface
Definition: INativeDisposable.cs:8
Datalayer.IVariant.ToInt16Array
short[] ToInt16Array()
Converts the value to an array of 16-bit signed integers.
Datalayer.IVariant.ToUInt64Array
ulong[] ToUInt64Array()
Converts the value to an array of 64-bit unsigned integers.
Datalayer.IVariant.ToFloatArray
float[] ToFloatArray()
Converts the value to an array of float.
Datalayer.IVariant.DataType
DLR_VARIANT_TYPE DataType
Gets the data type of the variant.
Definition: IVariant.cs:40
Datalayer
Definition: DatalayerSystem.cs:5
Datalayer.IVariant.ToStringArray
string[] ToStringArray()
Converts the value to an array of strings.
Datalayer.IVariant.ToInt64
long ToInt64()
Converts the value to a 64-bit signed integer.
Datalayer.IVariant.ToDoubleArray
double[] ToDoubleArray()
Converts the value to an array of double-precision floating-point numbers.
Datalayer.IVariant.Clone
Variant Clone()
Clones the value.
Datalayer.IVariant.IsNumber
bool IsNumber
Indicates whether the Variant contains a numeric value Returns false for numeric arrays and booleans
Definition: IVariant.cs:71
Datalayer.IVariant.Timestamp
DateTime Timestamp
Gets the time stamp of the variant.
Definition: IVariant.cs:33
Datalayer.IVariant.ToFlatbuffers
ByteBuffer ToFlatbuffers()
Converts the value to flatbuffers.
Datalayer.IVariant.Value
object Value
Gets the value of the variant.
Definition: IVariant.cs:15
Datalayer.IVariant.ToDouble
double ToDouble()
Converts the value to a double-precision floating-point number.
Datalayer.IVariant.IsNull
bool IsNull
Checks if the value is null.
Definition: IVariant.cs:83
Datalayer.IVariant.IsFlatbuffers
bool IsFlatbuffers
Checks if the value is flatbuffers.
Definition: IVariant.cs:77
Datalayer.IVariant.JsonDataType
string JsonDataType
Gets the data type as JSON string.
Definition: IVariant.cs:46
Datalayer.IVariant
The variant interface.
Definition: IVariant.cs:9
Datalayer.IVariant.ToUInt16
ushort ToUInt16()
Converts the value to a 16-bit unsigned integer.
Datalayer.IVariant.ToSByteArray
sbyte[] ToSByteArray()
Converts the value to an array of an 8-bit signed integers.
Datalayer.IVariant.ToFloat
float ToFloat()
Converts the value to float.
Datalayer.IVariant.ToBoolArray
bool[] ToBoolArray()
Converts the value to an array of bool value.