168 references to PrimitiveType
PresentationCore (3)
System\Windows\Nrbf\SerializationRecordExtensions.cs (3)
114/// Trys to get this object as a <see cref="List{T}"/> of <see cref="PrimitiveType"/>. 164/// Tries to get this object as a <see cref="ArrayList"/> of <see cref="PrimitiveType"/> values. 251/// Trys to get this object as a binary recordted <see cref="Hashtable"/> of <see cref="PrimitiveType"/> keys and values.
System.Formats.Nrbf (161)
System\Formats\Nrbf\ArrayRecord.cs (1)
117internal abstract (AllowedRecordTypes allowed, PrimitiveType primitiveType) GetAllowedRecordType();
System\Formats\Nrbf\ArrayRectangularPrimitiveRecord.cs (1)
38internal override (AllowedRecordTypes allowed, PrimitiveType primitiveType) GetAllowedRecordType() => throw new InvalidOperationException();
System\Formats\Nrbf\ArraySingleObjectRecord.cs (1)
75internal override (AllowedRecordTypes allowed, PrimitiveType primitiveType) GetAllowedRecordType()
System\Formats\Nrbf\ArraySinglePrimitiveRecord.cs (1)
44internal override (AllowedRecordTypes allowed, PrimitiveType primitiveType) GetAllowedRecordType() => throw new InvalidOperationException();
System\Formats\Nrbf\ArraySingleStringRecord.cs (1)
32internal override (AllowedRecordTypes allowed, PrimitiveType primitiveType) GetAllowedRecordType()
System\Formats\Nrbf\BinaryType.cs (1)
15/// The type is defined by <see cref="PrimitiveType"/> and it is not a string.
System\Formats\Nrbf\ClassRecord.cs (2)
143internal abstract (AllowedRecordTypes allowed, PrimitiveType primitiveType) GetNextAllowedRecordType(); 160(AllowedRecordTypes allowed, PrimitiveType primitiveType) = GetNextAllowedRecordType();
System\Formats\Nrbf\ClassWithIdRecord.cs (1)
84internal override (AllowedRecordTypes allowed, PrimitiveType primitiveType) GetNextAllowedRecordType()
System\Formats\Nrbf\ClassWithMembersAndTypesRecord.cs (1)
36internal override (AllowedRecordTypes allowed, PrimitiveType primitiveType) GetNextAllowedRecordType()
System\Formats\Nrbf\JaggedArrayRecord.cs (1)
63internal override (AllowedRecordTypes allowed, PrimitiveType primitiveType) GetAllowedRecordType()
System\Formats\Nrbf\MemberTypeInfo.cs (4)
70internal (AllowedRecordTypes allowed, PrimitiveType primitiveType) GetNextAllowedRecordType(int currentValuesCount) 99BinaryType.Primitive => (default, (PrimitiveType)additionalInfo!), 119BinaryType.Primitive => TypeNameHelpers.GetPrimitiveTypeName((PrimitiveType)additionalInfo!), 120BinaryType.PrimitiveArray => TypeNameHelpers.GetPrimitiveSZArrayTypeName((PrimitiveType)additionalInfo!),
System\Formats\Nrbf\NextInfo.cs (3)
13Stack<NextInfo> stack, PrimitiveType primitiveType = default) 27internal PrimitiveType PrimitiveType { get; } 29internal NextInfo With(AllowedRecordTypes allowed, PrimitiveType primitiveType)
System\Formats\Nrbf\NrbfDecoder.cs (53)
250PrimitiveType primitiveType = reader.ReadPrimitiveType(); 254PrimitiveType.Boolean => new MemberPrimitiveTypedRecord<bool>(reader.ReadBoolean()), 255PrimitiveType.Byte => new MemberPrimitiveTypedRecord<byte>(reader.ReadByte()), 256PrimitiveType.SByte => new MemberPrimitiveTypedRecord<sbyte>(reader.ReadSByte()), 257PrimitiveType.Char => new MemberPrimitiveTypedRecord<char>(reader.ParseChar()), 258PrimitiveType.Int16 => new MemberPrimitiveTypedRecord<short>(reader.ReadInt16()), 259PrimitiveType.UInt16 => new MemberPrimitiveTypedRecord<ushort>(reader.ReadUInt16()), 260PrimitiveType.Int32 => new MemberPrimitiveTypedRecord<int>(reader.ReadInt32()), 261PrimitiveType.UInt32 => new MemberPrimitiveTypedRecord<uint>(reader.ReadUInt32()), 262PrimitiveType.Int64 => new MemberPrimitiveTypedRecord<long>(reader.ReadInt64()), 263PrimitiveType.UInt64 => new MemberPrimitiveTypedRecord<ulong>(reader.ReadUInt64()), 264PrimitiveType.Single => new MemberPrimitiveTypedRecord<float>(reader.ReadSingle()), 265PrimitiveType.Double => new MemberPrimitiveTypedRecord<double>(reader.ReadDouble()), 266PrimitiveType.Decimal => new MemberPrimitiveTypedRecord<decimal>(reader.ParseDecimal()), 267PrimitiveType.DateTime => new MemberPrimitiveTypedRecord<DateTime>(Utils.BinaryReaderExtensions.CreateDateTimeFromData(reader.ReadUInt64())), 268PrimitiveType.TimeSpan => new MemberPrimitiveTypedRecord<TimeSpan>(new TimeSpan(reader.ReadInt64())), 276PrimitiveType primitiveType = reader.ReadPrimitiveType(); 281private static ArrayRecord DecodeArraySinglePrimitiveRecord(BinaryReader reader, ArrayInfo info, PrimitiveType primitiveType) 285PrimitiveType.Boolean => Decode<bool>(info, reader), 286PrimitiveType.Byte => Decode<byte>(info, reader), 287PrimitiveType.SByte => Decode<sbyte>(info, reader), 288PrimitiveType.Char => Decode<char>(info, reader), 289PrimitiveType.Int16 => Decode<short>(info, reader), 290PrimitiveType.UInt16 => Decode<ushort>(info, reader), 291PrimitiveType.Int32 => Decode<int>(info, reader), 292PrimitiveType.UInt32 => Decode<uint>(info, reader), 293PrimitiveType.Int64 => Decode<long>(info, reader), 294PrimitiveType.UInt64 => Decode<ulong>(info, reader), 295PrimitiveType.Single => Decode<float>(info, reader), 296PrimitiveType.Double => Decode<double>(info, reader), 297PrimitiveType.Decimal => Decode<decimal>(info, reader), 298PrimitiveType.DateTime => Decode<DateTime>(info, reader), 299PrimitiveType.TimeSpan => Decode<TimeSpan>(info, reader), 307private static ArrayRecord DecodeArrayRectangularPrimitiveRecord(PrimitiveType primitiveType, ArrayInfo info, int[] lengths, BinaryReader reader) 311PrimitiveType.Boolean => Decode<bool>(info, lengths, reader), 312PrimitiveType.Byte => Decode<byte>(info, lengths, reader), 313PrimitiveType.SByte => Decode<sbyte>(info, lengths, reader), 314PrimitiveType.Char => Decode<char>(info, lengths, reader), 315PrimitiveType.Int16 => Decode<short>(info, lengths, reader), 316PrimitiveType.UInt16 => Decode<ushort>(info, lengths, reader), 317PrimitiveType.Int32 => Decode<int>(info, lengths, reader), 318PrimitiveType.UInt32 => Decode<uint>(info, lengths, reader), 319PrimitiveType.Int64 => Decode<long>(info, lengths, reader), 320PrimitiveType.UInt64 => Decode<ulong>(info, lengths, reader), 321PrimitiveType.Single => Decode<float>(info, lengths, reader), 322PrimitiveType.Double => Decode<double>(info, lengths, reader), 323PrimitiveType.Decimal => Decode<decimal>(info, lengths, reader), 324PrimitiveType.DateTime => Decode<DateTime>(info, lengths, reader), 325PrimitiveType.TimeSpan => Decode<TimeSpan>(info, lengths, reader), 386return DecodeArrayRectangularPrimitiveRecord((PrimitiveType)additionalInfo!, arrayInfo, lengths, reader); 428return DecodeArraySinglePrimitiveRecord(reader, arrayInfo, (PrimitiveType)additionalInfo!); 482(AllowedRecordTypes allowed, PrimitiveType primitiveType) = classRecord.GetNextAllowedRecordType(); 489(AllowedRecordTypes allowed, PrimitiveType primitiveType) = arrayRecord.GetAllowedRecordType();
System\Formats\Nrbf\RectangularArrayRecord.cs (1)
68internal override (AllowedRecordTypes allowed, PrimitiveType primitiveType) GetAllowedRecordType()
System\Formats\Nrbf\SystemClassWithMembersAndTypesRecord.cs (26)
49PrimitiveType primitiveType = (PrimitiveType)memberTypeInfo.Infos[0].AdditionalInfo!; 57(PrimitiveType.Boolean, "System.Boolean", "m_value") => Create(reader.ReadBoolean()), 58(PrimitiveType.Byte, "System.Byte", "m_value") => Create(reader.ReadByte()), 59(PrimitiveType.SByte, "System.SByte", "m_value") => Create(reader.ReadSByte()), 60(PrimitiveType.Char, "System.Char", "m_value") => Create(reader.ParseChar()), 61(PrimitiveType.Int16, "System.Int16", "m_value") => Create(reader.ReadInt16()), 62(PrimitiveType.UInt16, "System.UInt16", "m_value") => Create(reader.ReadUInt16()), 63(PrimitiveType.Int32, "System.Int32", "m_value") => Create(reader.ReadInt32()), 64(PrimitiveType.UInt32, "System.UInt32", "m_value") => Create(reader.ReadUInt32()), 65(PrimitiveType.Int64, "System.Int64", "m_value") => Create(reader.ReadInt64()), 66(PrimitiveType.Int64, "System.IntPtr", "value") => Create(new IntPtr(reader.ReadInt64())), 67(PrimitiveType.Int64, "System.TimeSpan", "_ticks") => Create(new TimeSpan(reader.ReadInt64())), 68(PrimitiveType.UInt64, "System.UInt64", "m_value") => Create(reader.ReadUInt64()), 69(PrimitiveType.UInt64, "System.UIntPtr", "value") => Create(new UIntPtr(reader.ReadUInt64())), 70(PrimitiveType.Single, "System.Single", "m_value") => Create(reader.ReadSingle()), 71(PrimitiveType.Double, "System.Double", "m_value") => Create(reader.ReadDouble()), 76&& HasMember("ticks", 0, PrimitiveType.Int64) 77&& HasMember("dateData", 1, PrimitiveType.UInt64)) 82&& HasMember("flags", 0, PrimitiveType.Int32) 83&& HasMember("hi", 1, PrimitiveType.Int32) 84&& HasMember("lo", 2, PrimitiveType.Int32) 85&& HasMember("mid", 3, PrimitiveType.Int32)) 95bool HasMember(string name, int order, PrimitiveType primitiveType) 98&& ((PrimitiveType)memberTypeInfo.Infos[order].AdditionalInfo!) == primitiveType; 101internal override (AllowedRecordTypes allowed, PrimitiveType primitiveType) GetNextAllowedRecordType()
System\Formats\Nrbf\SZArrayOfRecords.cs (2)
79internal override (AllowedRecordTypes allowed, PrimitiveType primitiveType) GetAllowedRecordType() 81(AllowedRecordTypes allowed, PrimitiveType primitiveType) = MemberTypeInfo.GetNextAllowedRecordType(0);
System\Formats\Nrbf\Utils\BinaryReaderExtensions.cs (20)
66internal static PrimitiveType ReadPrimitiveType(this BinaryReader reader) 70if (primitiveType is 4 or < (byte)PrimitiveType.Boolean or > (byte)PrimitiveType.UInt64) 74return (PrimitiveType)primitiveType; 80internal static object ReadPrimitiveValue(this BinaryReader reader, PrimitiveType primitiveType) 83PrimitiveType.Boolean => reader.ReadBoolean(), 84PrimitiveType.Byte => reader.ReadByte(), 85PrimitiveType.SByte => reader.ReadSByte(), 86PrimitiveType.Char => reader.ParseChar(), 87PrimitiveType.Int16 => reader.ReadInt16(), 88PrimitiveType.UInt16 => reader.ReadUInt16(), 89PrimitiveType.Int32 => reader.ReadInt32(), 90PrimitiveType.UInt32 => reader.ReadUInt32(), 91PrimitiveType.Int64 => reader.ReadInt64(), 92PrimitiveType.UInt64 => reader.ReadUInt64(), 93PrimitiveType.Single => reader.ReadSingle(), 94PrimitiveType.Double => reader.ReadDouble(), 95PrimitiveType.Decimal => reader.ParseDecimal(), 96PrimitiveType.DateTime => CreateDateTimeFromData(reader.ReadUInt64()), 97PrimitiveType.TimeSpan => new TimeSpan(reader.ReadInt64()),
System\Formats\Nrbf\Utils\TypeNameHelpers.cs (41)
16internal const PrimitiveType StringPrimitiveType = (PrimitiveType)18; 17internal const PrimitiveType ObjectPrimitiveType = (PrimitiveType)19; 18internal const PrimitiveType IntPtrPrimitiveType = (PrimitiveType)20; 19internal const PrimitiveType UIntPtrPrimitiveType = (PrimitiveType)21; 24internal static TypeName GetPrimitiveTypeName(PrimitiveType primitiveType) 31PrimitiveType.Boolean => "System.Boolean", 32PrimitiveType.Byte => "System.Byte", 33PrimitiveType.SByte => "System.SByte", 34PrimitiveType.Char => "System.Char", 35PrimitiveType.Int16 => "System.Int16", 36PrimitiveType.UInt16 => "System.UInt16", 37PrimitiveType.Int32 => "System.Int32", 38PrimitiveType.UInt32 => "System.UInt32", 39PrimitiveType.Int64 => "System.Int64", 40PrimitiveType.UInt64 => "System.UInt64", 41PrimitiveType.Single => "System.Single", 42PrimitiveType.Double => "System.Double", 43PrimitiveType.Decimal => "System.Decimal", 44PrimitiveType.TimeSpan => "System.TimeSpan", 45PrimitiveType.DateTime => "System.DateTime", 58internal static TypeName GetPrimitiveSZArrayTypeName(PrimitiveType primitiveType) 68internal static PrimitiveType GetPrimitiveType<T>() 71return PrimitiveType.Boolean; 73return PrimitiveType.Byte; 75return PrimitiveType.SByte; 77return PrimitiveType.Char; 79return PrimitiveType.Int16; 81return PrimitiveType.UInt16; 83return PrimitiveType.Int32; 85return PrimitiveType.UInt32; 87return PrimitiveType.Int64; 89return PrimitiveType.UInt64; 91return PrimitiveType.Single; 93return PrimitiveType.Double; 95return PrimitiveType.Decimal; 97return PrimitiveType.DateTime; 99return PrimitiveType.TimeSpan;
System.Private.Windows.Core (4)
System\Private\Windows\Core\Nrbf\SerializationRecordExtensions.cs (4)
337/// Tries to get this object as a <see cref="List{T}"/> of <see cref="PrimitiveType"/>. 387/// Tries to get this object as a <see cref="ArrayList"/> of <see cref="PrimitiveType"/> values. 474/// Tries to get this object as a binary formatted <see cref="Hashtable"/> of <see cref="PrimitiveType"/> keys and values. 484/// Tries to get this object as a binary formatted <see cref="Hashtable"/> of <see cref="PrimitiveType"/> keys and values.