Neuron®
The Neuron® is the basis for the creation of open and secure federated networks for smart societies.
Loading...
Searching...
No Matches
Comparison.cs
1using System;
2using System.Collections.Generic;
3using System.Text;
4using System.Threading.Tasks;
6
8{
12 public static class Comparison
13 {
20 public static bool TryMakeSameType(ref object x, ref object y)
21 {
22 Type xType = x.GetType();
23 Type yType = y.GetType();
24
25 if (xType == yType)
26 {
27 if (x is DateTime TPx &&
28 y is DateTime TPy &&
29 TPx.Kind != TPy.Kind &&
30 TPx.Kind != DateTimeKind.Unspecified &&
31 TPy.Kind != DateTimeKind.Unspecified)
32 {
33 x = TPx.ToLocalTime();
34 y = TPy.ToLocalTime();
35 }
36
37 return true;
38 }
39
40 uint xTypeCode = ObjectSerializer.GetFieldDataTypeCode(xType);
41 uint yTypeCode = ObjectSerializer.GetFieldDataTypeCode(yType);
42
43 Upgrade(ref x, ref xTypeCode);
44 Upgrade(ref y, ref yTypeCode);
45
46 if (xTypeCode == yTypeCode)
47 return true;
48
49 if (xTypeCode == ObjectSerializer.TYPE_CI_STRING)
50 {
51 y = (CaseInsensitiveString)ToString(y, yTypeCode);
52 return true;
53 }
54 else if (yTypeCode == ObjectSerializer.TYPE_CI_STRING)
55 {
56 x = (CaseInsensitiveString)ToString(x, xTypeCode);
57 return true;
58 }
59 else if (yTypeCode == ObjectSerializer.TYPE_STRING)
60 {
61 x = ToString(x, xTypeCode);
62 return true;
63 }
64
65 switch (xTypeCode)
66 {
68 if (yTypeCode == ObjectSerializer.TYPE_DOUBLE)
69 {
70 y = (decimal)((double)y);
71 return true;
72 }
73 else
74 return false;
75
77 if (yTypeCode == ObjectSerializer.TYPE_DECIMAL)
78 {
79 x = (decimal)((double)x);
80 return true;
81 }
82 else
83 return false;
84
86 y = ToString(y, yTypeCode);
87 return true;
88
89 default:
90 return false;
91 }
92 }
93
94 internal static string ToString(object Value)
95 {
96 if (Value is null)
97 return string.Empty;
98 else
99 return ToString(Value, ObjectSerializer.GetFieldDataTypeCode(Value.GetType()));
100 }
101
102 internal static string ToString(object Value, uint TypeCode)
103 {
104 if (TypeCode == ObjectSerializer.TYPE_NULL)
105 return string.Empty;
106 else if (TypeCode == ObjectSerializer.TYPE_DOUBLE || TypeCode == ObjectSerializer.TYPE_DECIMAL)
107 return Value.ToString().Replace(System.Globalization.NumberFormatInfo.CurrentInfo.NumberDecimalSeparator, ".");
108 else if (TypeCode == ObjectSerializer.TYPE_DATETIME)
109 return ((DateTime)Value).ToUniversalTime().ToString("yyyy-MM-ddTHH:mm:ss") + "z";
110 else if (TypeCode == ObjectSerializer.TYPE_DATETIMEOFFSET)
111 return ((DateTimeOffset)Value).ToUniversalTime().DateTime.ToString("yyyy-MM-ddTHH:mm:ss") + "z";
112 else if (TypeCode == ObjectSerializer.TYPE_BYTEARRAY)
113 return Convert.ToBase64String((byte[])Value);
114 else
115 return Value?.ToString() ?? string.Empty;
116 }
117
118 private static void Upgrade(ref object Value, ref uint TypeCode)
119 {
120 switch (TypeCode)
121 {
123 Value = (decimal)(((bool)Value) ? 1 : 0);
125 break;
126
128 Value = (decimal)((byte)Value);
130 break;
131
134 Value = (decimal)((short)Value);
136 break;
137
140 Value = (decimal)((int)Value);
142 break;
143
146 Value = (decimal)((long)Value);
148 break;
149
151 Value = (decimal)((sbyte)Value);
153 break;
154
157 Value = (decimal)((ushort)Value);
159 break;
160
163 Value = (decimal)((uint)Value);
165 break;
166
169 Value = (decimal)((ulong)Value);
171 break;
172
174 break;
175
177 break;
178
180 Value = (double)((float)Value);
181 TypeCode = ObjectSerializer.TYPE_DOUBLE;
182 break;
183
185 Value = ((DateTime)Value).ToUniversalTime();
186 break;
187
189 Value = ((DateTimeOffset)Value).ToUniversalTime().DateTime;
190 break;
191
193 break;
194
196 Value = (decimal)((char)Value);
198 break;
199
202 break;
203
206 Value = Value.ToString();
207 TypeCode = ObjectSerializer.TYPE_STRING;
208 break;
209 }
210 }
211
222 public static int? Compare(object Value1, object Value2)
223 {
224 bool IsNull1 = Value1 is null;
225 bool IsNull2 = Value2 is null;
226
227 if (IsNull1 ^ IsNull2)
228 {
229 if (IsNull1)
230 return -1;
231 else
232 return 1;
233 }
234 else if (IsNull1)
235 return 0;
236
237 if (!TryMakeSameType(ref Value1, ref Value2))
238 return null;
239
240 if (Value1 is IComparable Comparable)
241 return Comparable.CompareTo(Value2);
242 else if (Value1 is byte[] b1 && Value2 is byte[] b2)
243 return Storage.IndexRecords.BinaryCompare(b1, b2);
244 else
245 return null;
246 }
247
253 public static bool Increment(ref object Value)
254 {
255 if (Value is null)
256 return false;
257
258 Type T = Value.GetType();
259 uint TypeCode = ObjectSerializer.GetFieldDataTypeCode(T);
260
261 switch (TypeCode)
262 {
264 if ((bool)Value)
265 Value = (byte)2;
266 else
267 Value = true;
268
269 return true;
270
272 byte b = (byte)Value;
273 if (b == byte.MaxValue)
274 Value = (ushort)(byte.MaxValue + 1);
275 else
276 {
277 b++;
278 Value = b;
279 }
280 return true;
281
284 short i16 = (short)Value;
285 if (i16 == short.MaxValue)
286 Value = short.MaxValue + 1;
287 else
288 {
289 i16++;
290 Value = i16;
291 }
292 return true;
293
296 int i32 = (int)Value;
297 if (i32 == int.MaxValue)
298 Value = (long)int.MaxValue + 1;
299 else
300 {
301 i32++;
302 Value = i32;
303 }
304 return true;
305
308 long i64 = (long)Value;
309 if (i64 == long.MaxValue)
310 Value = (ulong)long.MaxValue + 1;
311 else
312 {
313 i64++;
314 Value = i64;
315 }
316 return true;
317
319 sbyte i8 = (sbyte)Value;
320 if (i8 == sbyte.MaxValue)
321 Value = (short)sbyte.MaxValue + 1;
322 else
323 {
324 i8++;
325 Value = i8;
326 }
327 return true;
328
331 ushort ui16 = (ushort)Value;
332 if (ui16 == ushort.MaxValue)
333 Value = (uint)ushort.MaxValue + 1;
334 else
335 {
336 ui16++;
337 Value = ui16;
338 }
339 return true;
340
343 uint ui32 = (uint)Value;
344 if (ui32 == uint.MaxValue)
345 Value = (ulong)uint.MaxValue + 1;
346 else
347 {
348 ui32++;
349 Value = ui32;
350 }
351 return true;
352
355 ulong ui64 = (ulong)Value;
356 if (ui64 == ulong.MaxValue)
357 {
358 double d = ulong.MaxValue;
359 if (Increment(ref d))
360 {
361 Value = d;
362 return true;
363 }
364 else
365 return false;
366 }
367 else
368 {
369 ui64++;
370 Value = ui64;
371 }
372 return true;
373
375 decimal dec = (decimal)Value;
376 if (!Increment(ref dec))
377 return false;
378 else
379 {
380 Value = dec;
381 return true;
382 }
383
385 double dbl = (double)Value;
386 if (!Increment(ref dbl))
387 return false;
388 else
389 {
390 Value = dbl;
391 return true;
392 }
393
395 float sng = (float)Value;
396 if (!Increment(ref sng))
397 return false;
398 else
399 {
400 Value = sng;
401 return true;
402 }
403
405 DateTime DT = (DateTime)Value;
406 if (DT.Ticks == long.MaxValue)
407 return false;
408 else
409 {
410 Value = new DateTime(DT.Ticks + 1, DT.Kind);
411 return true;
412 }
413
415 DateTimeOffset DTO = (DateTimeOffset)Value;
416 if (DTO.Ticks == long.MaxValue)
417 return false;
418 else
419 {
420 Value = new DateTimeOffset(DTO.Ticks + 1, DTO.Offset);
421 return true;
422 }
423
425 TimeSpan TS = (TimeSpan)Value;
426 if (TS.Ticks == long.MaxValue)
427 return false;
428 else
429 {
430 Value = new TimeSpan(TS.Ticks + 1);
431 return true;
432 }
433
435 char ch = (char)Value;
436 if (ch == char.MaxValue)
437 Value = char.MaxValue + 1;
438 else
439 Value = (char)(ch + 1);
440 return true;
441
443 string s = (string)Value;
444 if (Increment(ref s))
445 {
446 Value = s;
447 return true;
448 }
449 else
450 return false;
451
454 s = s2.Value;
455 if (Increment(ref s))
456 {
457 Value = (CaseInsensitiveString)s;
458 return true;
459 }
460 else
461 return false;
462
464 s = Value.ToString();
465 if (Increment(ref s))
466 {
467 Value = s;
468 return true;
469 }
470 else
471 return false;
472
474 Guid Guid = (Guid)Value;
475 if (Increment(ref Guid))
476 {
477 Value = Guid;
478 return true;
479 }
480 else
481 return false;
482
484 byte[] Bin = (byte[])((byte[])Value).Clone();
485 int c = Bin.Length;
486
487 while (--c >= 0)
488 {
489 b = ++Bin[c];
490 if (b!=0)
491 {
492 Value = Bin;
493 return true;
494 }
495 }
496
497 return false;
498
499 default:
500 return false;
501 }
502 }
503
509 public static bool Increment(ref double Value)
510 {
511 if (Value == 0)
512 {
513 Value = double.Epsilon;
514 return true;
515 }
516
517 double Eps = Value / Math.Pow(2, 51);
518 double Diff;
519 double Last = Value;
520
521 while (Value != (Diff = (Value + Eps)))
522 {
523 Last = Diff;
524 Eps /= 2;
525 }
526
527 if (Value != Last)
528 {
529 Value = Last;
530 return true;
531 }
532 else
533 return false;
534 }
535
541 public static bool Increment(ref float Value)
542 {
543 if (Value == 0)
544 {
545 Value = float.Epsilon;
546 return true;
547 }
548
549 float Eps = Value / (float)Math.Pow(2, 21);
550 float Diff;
551 float Last = Value;
552
553 while (Value != (Diff = (Value + Eps)))
554 {
555 Last = Diff;
556 Eps /= 2;
557 }
558
559 if (Value != Last)
560 {
561 Value = Last;
562 return true;
563 }
564 else
565 return false;
566 }
567
573 public static bool Increment(ref decimal Value)
574 {
575 if (Value == 0)
576 {
577 Value = DecimalEpsilon;
578 return true;
579 }
580
581 decimal Eps = Value / (decimal)Math.Pow(2, 92);
582 decimal Diff;
583 decimal Last = Value;
584
585 while (Value != (Diff = (Value + Eps)))
586 {
587 Last = Diff;
588 Eps /= 2;
589 }
590
591 if (Value != Last)
592 {
593 Value = Last;
594 return true;
595 }
596 else
597 return false;
598 }
599
603 public static readonly decimal DecimalEpsilon = new decimal(1, 0, 0, false, 28);
604
610 public static bool Increment(ref string Value)
611 {
612 Value += "\x00";
613 return true;
614 }
615
621 public static bool Increment(ref CaseInsensitiveString Value)
622 {
623 string s = Value.Value;
624 Increment(ref s);
625 Value = (CaseInsensitiveString)s;
626 return true;
627 }
628
634 public static bool Increment(ref Guid Value)
635 {
636 byte[] A = Value.ToByteArray();
637
638 A[15]++;
639 if (A[15] == 0)
640 {
641 A[14]++;
642 if (A[14] == 0)
643 {
644 A[13]++;
645 if (A[13] == 0)
646 {
647 A[12]++;
648 if (A[12] == 0)
649 {
650 A[11]++;
651 if (A[11] == 0)
652 {
653 A[10]++;
654 if (A[10] == 0)
655 {
656 A[9]++;
657 if (A[9] == 0)
658 {
659 A[8]++;
660 if (A[8] == 0)
661 {
662 A[6]++;
663 if (A[6] == 0)
664 {
665 A[7]++;
666 if (A[7] == 0)
667 {
668 A[4]++;
669 if (A[4] == 0)
670 {
671 A[5]++;
672 if (A[5] == 0)
673 {
674 A[0]++;
675 if (A[0] == 0)
676 {
677 A[1]++;
678 if (A[1] == 0)
679 {
680 A[2]++;
681 if (A[2] == 0)
682 {
683 A[3]++;
684 if (A[3] == 0)
685 return false;
686 }
687 }
688 }
689 }
690 }
691 }
692 }
693 }
694 }
695 }
696 }
697 }
698 }
699 }
700 }
701
702 Value = new Guid(A);
703 return true;
704 }
705
711 public static bool Decrement(ref object Value)
712 {
713 if (Value is null)
714 return false;
715
716 Type T = Value.GetType();
717 uint TypeCode = ObjectSerializer.GetFieldDataTypeCode(T);
718
719 switch (TypeCode)
720 {
722 if (!(bool)Value)
723 Value = (sbyte)-1;
724 else
725 Value = false;
726
727 return true;
728
730 byte b = (byte)Value;
731 if (b == byte.MinValue)
732 Value = (sbyte)-1;
733 else
734 {
735 b--;
736 Value = b;
737 }
738 return true;
739
742 short i16 = (short)Value;
743 if (i16 == short.MinValue)
744 Value = short.MinValue - 1;
745 else
746 {
747 i16--;
748 Value = i16;
749 }
750 return true;
751
754 int i32 = (int)Value;
755 if (i32 == int.MinValue)
756 Value = (long)int.MinValue - 1;
757 else
758 {
759 i32--;
760 Value = i32;
761 }
762 return true;
763
766 long i64 = (long)Value;
767 if (i64 == long.MinValue)
768 {
769 double d = long.MinValue;
770 if (Decrement(ref d))
771 {
772 Value = d;
773 return true;
774 }
775 else
776 return false;
777 }
778 else
779 {
780 i64--;
781 Value = i64;
782 }
783 return true;
784
786 sbyte i8 = (sbyte)Value;
787 if (i8 == sbyte.MinValue)
788 Value = (short)sbyte.MinValue - 1;
789 else
790 {
791 i8--;
792 Value = i8;
793 }
794 return true;
795
798 ushort ui16 = (ushort)Value;
799 if (ui16 == ushort.MinValue)
800 Value = (short)ushort.MinValue - 1;
801 else
802 {
803 ui16--;
804 Value = ui16;
805 }
806 return true;
807
810 uint ui32 = (uint)Value;
811 if (ui32 == uint.MinValue)
812 Value = (int)uint.MinValue - 1;
813 else
814 {
815 ui32--;
816 Value = ui32;
817 }
818 return true;
819
822 ulong ui64 = (ulong)Value;
823 if (ui64 == ulong.MinValue)
824 Value = (long)ulong.MinValue - 1;
825 else
826 {
827 ui64--;
828 Value = ui64;
829 }
830 return true;
831
833 decimal dec = (decimal)Value;
834 if (!Decrement(ref dec))
835 return false;
836 else
837 {
838 Value = dec;
839 return true;
840 }
841
843 double dbl = (double)Value;
844 if (!Decrement(ref dbl))
845 return false;
846 else
847 {
848 Value = dbl;
849 return true;
850 }
851
853 float sng = (float)Value;
854 if (!Decrement(ref sng))
855 return false;
856 else
857 {
858 Value = sng;
859 return true;
860 }
861
863 DateTime DT = (DateTime)Value;
864 if (DT.Ticks == long.MinValue)
865 return false;
866 else
867 {
868 Value = new DateTime(DT.Ticks - 1, DT.Kind);
869 return true;
870 }
871
873 DateTimeOffset DTO = (DateTimeOffset)Value;
874 if (DTO.Ticks == long.MinValue)
875 return false;
876 else
877 {
878 Value = new DateTimeOffset(DTO.Ticks - 1, DTO.Offset);
879 return true;
880 }
881
883 TimeSpan TS = (TimeSpan)Value;
884 if (TS.Ticks == long.MinValue)
885 return false;
886 else
887 {
888 Value = new TimeSpan(TS.Ticks - 1);
889 return true;
890 }
891
893 char ch = (char)Value;
894 if (ch == char.MinValue)
895 Value = char.MinValue - 1;
896 else
897 Value = (char)(ch - 1);
898
899 return true;
900
902 string s = (string)Value;
903 if (Decrement(ref s))
904 {
905 Value = s;
906 return true;
907 }
908 else
909 return false;
910
913 s = s2.Value;
914 if (Decrement(ref s))
915 {
916 Value = (CaseInsensitiveString)s;
917 return true;
918 }
919 else
920 return false;
921
923 s = Value.ToString();
924 if (Decrement(ref s))
925 {
926 Value = s;
927 return true;
928 }
929 else
930 return false;
931
933 Guid Guid = (Guid)Value;
934 if (!Decrement(ref Guid))
935 return false;
936 else
937 {
938 Value = Guid;
939 return true;
940 }
941
943 byte[] Bin = (byte[])((byte[])Value).Clone();
944 int c = Bin.Length;
945
946 while (--c >= 0)
947 {
948 b = --Bin[c];
949 if (b != 0xff)
950 {
951 Value = Bin;
952 return true;
953 }
954 }
955
956 return false;
957
958 default:
959 return false;
960 }
961 }
962
968 public static bool Decrement(ref double Value)
969 {
970 if (Value == 0)
971 {
972 Value = -double.Epsilon;
973 return true;
974 }
975
976 double Eps = Value / Math.Pow(2, 51);
977 double Diff;
978 double Last = Value;
979
980 while (Value != (Diff = (Value + Eps)))
981 {
982 Last = Diff;
983 Eps /= 2;
984 }
985
986 if (Value != Last)
987 {
988 Value = Last;
989 return true;
990 }
991 else
992 return false;
993 }
994
1000 public static bool Decrement(ref float Value)
1001 {
1002 if (Value == 0)
1003 {
1004 Value = -float.Epsilon;
1005 return true;
1006 }
1007
1008 float Eps = Value / (float)Math.Pow(2, 21);
1009 float Diff;
1010 float Last = Value;
1011
1012 while (Value != (Diff = (Value + Eps)))
1013 {
1014 Last = Diff;
1015 Eps /= 2;
1016 }
1017
1018 if (Value != Last)
1019 {
1020 Value = Last;
1021 return true;
1022 }
1023 else
1024 return false;
1025 }
1026
1032 public static bool Decrement(ref decimal Value)
1033 {
1034 if (Value == 0)
1035 {
1036 Value = -DecimalEpsilon;
1037 return true;
1038 }
1039
1040 decimal Eps = Value / (decimal)Math.Pow(2, 92);
1041 decimal Diff;
1042 decimal Last = Value;
1043
1044 while (Value != (Diff = (Value + Eps)))
1045 {
1046 Last = Diff;
1047 Eps /= 2;
1048 }
1049
1050 if (Value != Last)
1051 {
1052 Value = Last;
1053 return true;
1054 }
1055 else
1056 return false;
1057 }
1058
1064 public static bool Decrement(ref string Value)
1065 {
1066 if (string.IsNullOrEmpty(Value))
1067 return false;
1068
1069 int c = Value.Length;
1070 char ch = Value[c - 1];
1071
1072 if (ch == 0)
1073 Value = Value.Substring(0, c - 1);
1074 else
1075 Value = Value.Substring(0, c - 1) + ((char)(ch - 1)) + char.MaxValue;
1076
1077 return true;
1078 }
1079
1085 public static bool Decrement(ref CaseInsensitiveString Value)
1086 {
1087 string s = Value.Value;
1088 if (!Decrement(ref s))
1089 return false;
1090
1091 Value = (CaseInsensitiveString)s;
1092 return true;
1093 }
1094
1100 public static bool Decrement(ref Guid Value)
1101 {
1102 byte[] A = Value.ToByteArray();
1103
1104 A[15]--;
1105 if (A[15] == 0xff)
1106 {
1107 A[14]--;
1108 if (A[14] == 0xff)
1109 {
1110 A[13]--;
1111 if (A[13] == 0xff)
1112 {
1113 A[12]--;
1114 if (A[12] == 0xff)
1115 {
1116 A[11]--;
1117 if (A[11] == 0xff)
1118 {
1119 A[10]--;
1120 if (A[10] == 0xff)
1121 {
1122 A[9]--;
1123 if (A[9] == 0xff)
1124 {
1125 A[8]--;
1126 if (A[8] == 0xff)
1127 {
1128 A[6]--;
1129 if (A[6] == 0xff)
1130 {
1131 A[7]--;
1132 if (A[7] == 0xff)
1133 {
1134 A[4]--;
1135 if (A[4] == 0xff)
1136 {
1137 A[5]--;
1138 if (A[5] == 0xff)
1139 {
1140 A[0]--;
1141 if (A[0] == 0xff)
1142 {
1143 A[1]--;
1144 if (A[1] == 0xff)
1145 {
1146 A[2]--;
1147 if (A[2] == 0xff)
1148 {
1149 A[3]--;
1150 if (A[3] == 0xff)
1151 return false;
1152 }
1153 }
1154 }
1155 }
1156 }
1157 }
1158 }
1159 }
1160 }
1161 }
1162 }
1163 }
1164 }
1165 }
1166 }
1167
1168 Value = new Guid(A);
1169 return true;
1170 }
1171
1172 }
1173}
Represents a case-insensitive string.
string Value
String-representation of the case-insensitive string. (Representation is case sensitive....
Static class that performs comparisons of property values.
Definition: Comparison.cs:13
static bool Decrement(ref object Value)
Decrements Value to the largest value smaller than Value .
Definition: Comparison.cs:711
static bool Decrement(ref CaseInsensitiveString Value)
Decrements Value to the largest value smaller than Value .
Definition: Comparison.cs:1085
static bool Decrement(ref float Value)
Decrements Value to the largest value smaller than Value .
Definition: Comparison.cs:1000
static ? int Compare(object Value1, object Value2)
Compares two values. The values can be of different, but compatible types.
Definition: Comparison.cs:222
static bool Increment(ref CaseInsensitiveString Value)
Increments Value to the smallest value greater than Value .
Definition: Comparison.cs:621
static bool Increment(ref string Value)
Increments Value to the smallest value greater than Value .
Definition: Comparison.cs:610
static bool Decrement(ref Guid Value)
Decrements Value to the largest value smaller than Value .
Definition: Comparison.cs:1100
static bool Decrement(ref double Value)
Decrements Value to the largest value smaller than Value .
Definition: Comparison.cs:968
static bool TryMakeSameType(ref object x, ref object y)
Tries to make sure x and y have the same type.
Definition: Comparison.cs:20
static bool Increment(ref object Value)
Increments Value to the smallest value greater than Value .
Definition: Comparison.cs:253
static bool Increment(ref float Value)
Increments Value to the smallest value greater than Value .
Definition: Comparison.cs:541
static bool Decrement(ref decimal Value)
Decrements Value to the largest value smaller than Value .
Definition: Comparison.cs:1032
static bool Increment(ref Guid Value)
Increments Value to the smallest value greater than Value .
Definition: Comparison.cs:634
static bool Decrement(ref string Value)
Decrements Value to the largest value smaller than Value .
Definition: Comparison.cs:1064
static bool Increment(ref double Value)
Increments Value to the smallest value greater than Value .
Definition: Comparison.cs:509
static bool Increment(ref decimal Value)
Increments Value to the smallest value greater than Value .
Definition: Comparison.cs:573
Serializes a class, taking into account attributes defined in Attributes.
const uint TYPE_TIMESPAN
Represents a TimeSpan
const uint TYPE_NULL
Represents a null value.
const uint TYPE_VARINT64
Variable length INT64
const uint TYPE_VARUINT32
Variable length UINT32
const uint TYPE_VARINT16
Variable length INT16
static uint GetFieldDataTypeCode(object Value)
Returns the type code corresponding to a given field data type.
const uint TYPE_CI_STRING
Represents a CaseInsensitiveString
const uint TYPE_DATETIMEOFFSET
Represents a DateTimeOffset
const uint TYPE_VARUINT16
Variable length UINT16
const uint TYPE_BYTEARRAY
Represents a byte array.
const uint TYPE_VARUINT64
Variable length UINT64
const uint TYPE_DATETIME
Represents a DateTime
const uint TYPE_VARINT32
Variable length INT32
const uint TYPE_ENUM
Represents an enumerated value.