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