59 references to BinaryType
System.Formats.Nrbf (59)
System\Formats\Nrbf\MemberTypeInfo.cs (31)
20
internal MemberTypeInfo(IReadOnlyList<(
BinaryType
BinaryType, object? AdditionalInfo)> infos) => _infos = infos;
22
private readonly IReadOnlyList<(
BinaryType
BinaryType, object? AdditionalInfo)> _infos;
24
internal IReadOnlyList<(
BinaryType
BinaryType, object? AdditionalInfo)> Infos => _infos;
28
List<(
BinaryType
BinaryType, object? AdditionalInfo)> info = [];
43
BinaryType
type = info[i].BinaryType;
46
case
BinaryType
.Primitive:
47
case
BinaryType
.PrimitiveArray:
50
case
BinaryType
.SystemClass:
53
case
BinaryType
.Class:
56
case
BinaryType
.String:
57
case
BinaryType
.StringArray:
58
case
BinaryType
.Object:
59
case
BinaryType
.ObjectArray:
72
(
BinaryType
binaryType, object? additionalInfo) = Infos[currentValuesCount];
99
BinaryType
.Primitive => (default, (PrimitiveType)additionalInfo!),
100
BinaryType
.String => (Strings, default),
101
BinaryType
.Object => (AllowedRecordTypes.AnyObject, default),
102
BinaryType
.StringArray => (StringArray, default),
103
BinaryType
.PrimitiveArray => (PrimitiveArray, default),
104
BinaryType
.Class => (NonSystemClass, default),
105
BinaryType
.SystemClass => (SystemClass, default),
106
BinaryType
.ObjectArray => (ObjectArray, default),
113
(
BinaryType
binaryType, object? additionalInfo) = Infos[0];
117
BinaryType
.String => TypeNameHelpers.GetPrimitiveTypeName(TypeNameHelpers.StringPrimitiveType),
118
BinaryType
.StringArray => TypeNameHelpers.GetPrimitiveSZArrayTypeName(TypeNameHelpers.StringPrimitiveType),
119
BinaryType
.Primitive => TypeNameHelpers.GetPrimitiveTypeName((PrimitiveType)additionalInfo!),
120
BinaryType
.PrimitiveArray => TypeNameHelpers.GetPrimitiveSZArrayTypeName((PrimitiveType)additionalInfo!),
121
BinaryType
.Object => TypeNameHelpers.GetPrimitiveTypeName(TypeNameHelpers.ObjectPrimitiveType),
122
BinaryType
.ObjectArray => TypeNameHelpers.GetPrimitiveSZArrayTypeName(TypeNameHelpers.ObjectPrimitiveType),
123
BinaryType
.SystemClass => (TypeName)additionalInfo!,
124
BinaryType
.Class => ((ClassTypeInfo)additionalInfo!).TypeName,
System\Formats\Nrbf\NrbfDecoder.cs (24)
385
(
BinaryType
binaryType, object? additionalInfo) = memberTypeInfo.Infos[0];
388
if (binaryType ==
BinaryType
.Primitive)
392
else if (binaryType ==
BinaryType
.String)
396
else if (binaryType ==
BinaryType
.Object)
400
else if (binaryType is
BinaryType
.SystemClass or
BinaryType
.Class)
402
TypeName typeName = binaryType ==
BinaryType
.SystemClass ? (TypeName)additionalInfo! : ((ClassTypeInfo)additionalInfo!).TypeName;
408
else if (binaryType is
BinaryType
.PrimitiveArray or
BinaryType
.StringArray or
BinaryType
.ObjectArray)
416
if (binaryType is
BinaryType
.SystemClass or
BinaryType
.Class)
418
TypeName typeName = binaryType ==
BinaryType
.SystemClass ? (TypeName)additionalInfo! : ((ClassTypeInfo)additionalInfo!).TypeName;
424
else if (binaryType ==
BinaryType
.String)
429
else if (binaryType ==
BinaryType
.Primitive)
434
else if (binaryType ==
BinaryType
.Object)
439
else if (binaryType is
BinaryType
.ObjectArray or
BinaryType
.StringArray or
BinaryType
.PrimitiveArray)
447
if (binaryType is
BinaryType
.ObjectArray or
BinaryType
.StringArray or
BinaryType
.PrimitiveArray)
452
else if (binaryType ==
BinaryType
.SystemClass && ((TypeName)additionalInfo!).IsArray)
458
else if (binaryType ==
BinaryType
.Class && ((ClassTypeInfo)additionalInfo!).TypeName.IsArray)
System\Formats\Nrbf\SystemClassWithMembersAndTypesRecord.cs (1)
43
if (!classInfo.TypeName.IsSimple || classInfo.MemberNames.Count == 0 || memberTypeInfo.Infos[0].BinaryType !=
BinaryType
.Primitive)
System\Formats\Nrbf\Utils\BinaryReaderExtensions.cs (3)
55
internal static
BinaryType
ReadBinaryType(this BinaryReader reader)
59
if (binaryType > (byte)
BinaryType
.PrimitiveArray)
63
return (
BinaryType
)binaryType;