8 types derived from SerializationRecord
System.Formats.Nrbf (8)
System\Formats\Nrbf\ArrayRecord.cs (1)
13public abstract class ArrayRecord : SerializationRecord
System\Formats\Nrbf\BinaryLibraryRecord.cs (1)
17internal sealed class BinaryLibraryRecord : SerializationRecord
System\Formats\Nrbf\ClassRecord.cs (1)
13public abstract class ClassRecord : SerializationRecord
System\Formats\Nrbf\MemberReferenceRecord.cs (1)
16internal sealed class MemberReferenceRecord : SerializationRecord
System\Formats\Nrbf\MessageEndRecord.cs (1)
15internal sealed class MessageEndRecord : SerializationRecord
System\Formats\Nrbf\NullsRecord.cs (1)
9internal abstract class NullsRecord : SerializationRecord
System\Formats\Nrbf\PrimitiveTypeRecord.cs (1)
23public abstract class PrimitiveTypeRecord : SerializationRecord
System\Formats\Nrbf\SerializedStreamHeaderRecord.cs (1)
17internal sealed class SerializedStreamHeaderRecord : SerializationRecord
170 references to SerializationRecord
BinaryFormatTests (10)
FormatTests\FormattedObject\BinaryFormatWriterTests.cs (2)
100SerializationRecord rootRecord = NrbfDecoder.Decode(stream); 132SerializationRecord rootRecord = NrbfDecoder.Decode(stream);
FormatTests\FormattedObject\HashTableTests.cs (3)
71SerializationRecord rootRecord = NrbfDecoder.Decode(Serialize(hashtable)); 129SerializationRecord rootRecord = NrbfDecoder.Decode(Serialize(hashtable)); 147SerializationRecord rootRecord = NrbfDecoder.Decode(stream);
FormatTests\FormattedObject\ListTests.cs (1)
83SerializationRecord rootRecord = NrbfDecoder.Decode(Serialize(list));
FormatTests\FormattedObject\PrimitiveTypeTests.cs (1)
112SerializationRecord rootRecord = NrbfDecoder.Decode(Serialize(value));
SerializationRecordExtensionsTests.cs (3)
28SerializationRecord rootRecord = NrbfDecoder.Decode(stream); 66SerializationRecord rootRecord = NrbfDecoder.Decode(stream); 91SerializationRecord rootRecord = NrbfDecoder.Decode(stream);
PresentationCore (23)
System\Windows\Nrbf\SerializationRecordExtensions.cs (23)
16private delegate bool TryGetDelegate(SerializationRecord record, [NotNullWhen(true)] out object? value); 18private static bool TryGet(TryGetDelegate get, SerializationRecord record, [NotNullWhen(true)] out object? value) 36public static bool TryGetPointF(this SerializationRecord record, [NotNullWhen(true)] out object? value) 40static bool Get(SerializationRecord record, [NotNullWhen(true)] out object? value) 61public static bool TryGetRectangleF(this SerializationRecord record, [NotNullWhen(true)] out object? value) 65static bool Get(SerializationRecord record, [NotNullWhen(true)] out object? value) 93public static bool TryGetPrimitiveType(this SerializationRecord record, [NotNullWhen(true)] out object? value) 97static bool Get(SerializationRecord record, [NotNullWhen(true)] out object? value) 118public static bool TryGetPrimitiveList(this SerializationRecord record, [NotNullWhen(true)] out object? list) 122static bool Get(SerializationRecord record, [NotNullWhen(true)] out object? list) 168public static bool TryGetPrimitiveArrayList(this SerializationRecord record, [NotNullWhen(true)] out object? value) 172static bool Get(SerializationRecord record, [NotNullWhen(true)] out object? value) 191if (array[i] is SerializationRecord) 207public static bool TryGetPrimitiveArray(this SerializationRecord record, [NotNullWhen(true)] out object? value) 211static bool Get(SerializationRecord record, [NotNullWhen(true)] out object? value) 247public static bool TryGetPrimitiveHashtable(this SerializationRecord record, [NotNullWhen(true)] out object? hashtable) 251static bool Get(SerializationRecord record, [NotNullWhen(true)] out object? hashtable) 277if (key is null or SerializationRecord || value is SerializationRecord) 294this SerializationRecord record, 299static bool Get(SerializationRecord record, [NotNullWhen(true)] out object? exception) 318this SerializationRecord record, 329private static bool IsPrimitiveArrayRecord(SerializationRecord serializationRecord)
PresentationCore.Tests (9)
BinaryFormat\BinaryFormatWriterTests.cs (1)
73SerializationRecord format = NrbfDecoder.Decode(stream);
BinaryFormat\HashTableTests.cs (3)
70SerializationRecord format = hashtable.SerializeAndParse(); 129SerializationRecord format = hashtable.SerializeAndParse(); 147SerializationRecord format = NrbfDecoder.Decode(stream);
BinaryFormat\ListTests.cs (1)
101SerializationRecord format = list.SerializeAndParse();
BinaryFormat\SystemDrawingTests.cs (2)
15SerializationRecord record = input.SerializeAndParse(); 27SerializationRecord record = input.SerializeAndParse();
TestUtilities\BinaryFormatTestExtensions.cs (2)
14/// Serializes the object using the <see cref="BinaryFormatter"/> and reads it into a <see cref="SerializationRecord"/>. 16public static SerializationRecord SerializeAndParse(this object source) => NrbfDecoder.Decode(source.Serialize());
System.Formats.Nrbf (53)
System\Formats\Nrbf\ArrayOfClassesRecord.cs (4)
24internal List<SerializationRecord> Records { get; } 40foreach (SerializationRecord record in Records) 42SerializationRecord actual = record is MemberReferenceRecord referenceRecord 73private protected override void AddValue(object value) => Records.Add((SerializationRecord)value);
System\Formats\Nrbf\ArrayRecord.cs (1)
97internal sealed override void HandleNextRecord(SerializationRecord nextRecord, NextInfo info)
System\Formats\Nrbf\ArraySingleObjectRecord.cs (3)
27private List<SerializationRecord> Records { get; } 40SerializationRecord record = Records[recordIndex]; 81private protected override void AddValue(object value) => Records.Add((SerializationRecord)value);
System\Formats\Nrbf\ArraySingleStringRecord.cs (3)
27private List<SerializationRecord> Records { get; } 41private protected override void AddValue(object value) => Records.Add((SerializationRecord)value); 54SerializationRecord record = Records[recordIndex];
System\Formats\Nrbf\BinaryArrayRecord.cs (2)
95if (item is not SerializationRecord record) 217if (value is not SerializationRecord record)
System\Formats\Nrbf\ClassRecord.cs (6)
109/// Retrieves the <see cref="SerializationRecord" /> of the provided <paramref name="memberName"/>. 116/// <exception cref="InvalidOperationException">The specified member is not a <see cref="SerializationRecord"/>, but just a raw primitive value.</exception> 117public SerializationRecord? GetSerializationRecord(string memberName) 122SerializationRecord serializationRecord => serializationRecord, 131if (value is SerializationRecord record) 145internal override void HandleNextRecord(SerializationRecord nextRecord, NextInfo info)
System\Formats\Nrbf\MemberReferenceRecord.cs (1)
41internal SerializationRecord GetReferencedRecord() => RecordMap.GetRecord(Reference);
System\Formats\Nrbf\NextInfo.cs (2)
12internal NextInfo(AllowedRecordTypes allowed, SerializationRecord parent, 23internal SerializationRecord Parent { get; }
System\Formats\Nrbf\NrbfDecoder.cs (13)
99/// <returns>A <see cref="SerializationRecord"/> that represents the root object. 115public static SerializationRecord Decode(Stream payload, PayloadOptions? options = default, bool leaveOpen = false) 129public static SerializationRecord Decode(Stream payload, out IReadOnlyDictionary<SerializationRecordId, SerializationRecord> recordMap, PayloadOptions? options = default, bool leaveOpen = false) 159private static SerializationRecord Decode(BinaryReader reader, PayloadOptions options, out IReadOnlyDictionary<SerializationRecordId, SerializationRecord> readOnlyRecordMap) 171SerializationRecord nextRecord; 216private static SerializationRecord DecodeNext(BinaryReader reader, RecordMap recordMap, 221SerializationRecord record = recordType switch 247private static SerializationRecord DecodeMemberPrimitiveTypedRecord(BinaryReader reader) 272private static SerializationRecord DecodeArraySinglePrimitiveRecord(BinaryReader reader) 297static SerializationRecord Decode<T>(ArrayInfo info, BinaryReader reader) where T : unmanaged 309private static void PushFirstNestedRecordInfo(SerializationRecord record, Stack<NextInfo> readStack)
System\Formats\Nrbf\RecordMap.cs (13)
12internal sealed class RecordMap : IReadOnlyDictionary<SerializationRecordId, SerializationRecord> 14private readonly Dictionary<SerializationRecordId, SerializationRecord> _map = new(); 18public IEnumerable<SerializationRecord> Values => _map.Values; 22public SerializationRecord this[SerializationRecordId objectId] => _map[objectId]; 26public bool TryGetValue(SerializationRecordId key, [MaybeNullWhen(false)] out SerializationRecord value) => _map.TryGetValue(key, out value); 28public IEnumerator<KeyValuePair<SerializationRecordId, SerializationRecord>> GetEnumerator() => _map.GetEnumerator(); 32internal void Add(SerializationRecord record) 64internal SerializationRecord GetRootRecord(SerializedStreamHeaderRecord header) 66SerializationRecord rootRecord = GetRecord(header.RootId); 77internal SerializationRecord GetRecord(SerializationRecordId recordId) 78=> _map.TryGetValue(recordId, out SerializationRecord? record) 82internal T GetRecord<T>(SerializationRecordId recordId) where T : SerializationRecord 83=> _map.TryGetValue(recordId, out SerializationRecord? record) && record is T casted
System\Formats\Nrbf\RectangularArrayRecord.cs (1)
260=> value is SerializationRecord serializationRecord
System\Formats\Nrbf\SerializationRecord.cs (1)
162internal virtual void HandleNextRecord(SerializationRecord nextRecord, NextInfo info)
System\Formats\Nrbf\SerializationRecordId.cs (1)
17/// The ID of <see cref="SerializationRecord" />.
System\Formats\Nrbf\SystemClassWithMembersAndTypesRecord.cs (2)
39internal SerializationRecord TryToMapToUserFriendly() 101SerializationRecord Create<T>(T value) where T : unmanaged
System.Private.Windows.Core (46)
System\Private\Windows\Core\BinaryFormat\Deserializer\ArrayRecordDeserializer.cs (1)
100internal static Array GetArraySinglePrimitive(SerializationRecord record) => record switch
System\Private\Windows\Core\BinaryFormat\Deserializer\Deserializer.cs (4)
52private readonly IReadOnlyDictionary<SerializationRecordId, SerializationRecord> _recordMap; 101IReadOnlyDictionary<SerializationRecordId, SerializationRecord> recordMap, 121IReadOnlyDictionary<SerializationRecordId, SerializationRecord> recordMap, 220SerializationRecord record = _recordMap[id];
System\Private\Windows\Core\BinaryFormat\Deserializer\ObjectRecordDeserializer.cs (4)
19internal SerializationRecord ObjectRecord { get; } 26private protected ObjectRecordDeserializer(SerializationRecord objectRecord, IDeserializer deserializer) 49else if (memberValue is not SerializationRecord serializationRecord) // a primitive value 97internal static ObjectRecordDeserializer Create(SerializationRecord record, IDeserializer deserializer) => record switch
System\Private\Windows\Core\Nrbf\SerializationRecordExtensions.cs (37)
27internal static SerializationRecord Decode(this Stream stream) 44internal delegate bool TryGetDelegate(SerializationRecord record, [NotNullWhen(true)] out object? value); 46internal static bool TryGet(TryGetDelegate get, SerializationRecord record, [NotNullWhen(true)] out object? value) 64public static bool TryGetPoint(this SerializationRecord record, [NotNullWhen(true)] out object? value) 68static bool Get(SerializationRecord record, [NotNullWhen(true)] out object? value) 89public static bool TryGetSize(this SerializationRecord record, [NotNullWhen(true)] out object? value) 93static bool Get(SerializationRecord record, [NotNullWhen(true)] out object? value) 114public static bool TryGetRectangle(this SerializationRecord record, [NotNullWhen(true)] out object? value) 118static bool Get(SerializationRecord record, [NotNullWhen(true)] out object? value) 145public static bool TryGetPointF(this SerializationRecord record, [NotNullWhen(true)] out object? value) 149static bool Get(SerializationRecord record, [NotNullWhen(true)] out object? value) 170public static bool TryGetSizeF(this SerializationRecord record, [NotNullWhen(true)] out object? value) 174static bool Get(SerializationRecord record, [NotNullWhen(true)] out object? value) 195public static bool TryGetRectangleF(this SerializationRecord record, [NotNullWhen(true)] out object? value) 199static bool Get(SerializationRecord record, [NotNullWhen(true)] out object? value) 226public static bool TryGetColor(this SerializationRecord record, [NotNullWhen(true)] out object? value) 230static bool Get(SerializationRecord record, [NotNullWhen(true)] out object? value) 265public static bool TryGetPrimitiveType(this SerializationRecord record, [NotNullWhen(true)] out object? value) 269static bool Get(SerializationRecord record, [NotNullWhen(true)] out object? value) 287internal static object GetMemberPrimitiveTypedValue(this SerializationRecord record) 296public static bool TryGetPrimitiveList(this SerializationRecord record, [NotNullWhen(true)] out object? list) 300static bool Get(SerializationRecord record, [NotNullWhen(true)] out object? list) 346public static bool TryGetPrimitiveArrayList(this SerializationRecord record, [NotNullWhen(true)] out object? value) 350static bool Get(SerializationRecord record, [NotNullWhen(true)] out object? value) 369if (array[i] is SerializationRecord) 385public static bool TryGetPrimitiveArray(this SerializationRecord record, [NotNullWhen(true)] out object? value) 389static bool Get(SerializationRecord record, [NotNullWhen(true)] out object? value) 425public static bool TryGetPrimitiveHashtable(this SerializationRecord record, [NotNullWhen(true)] out Hashtable? hashtable) 435public static bool TryGetPrimitiveHashtable(this SerializationRecord record, [NotNullWhen(true)] out object? hashtable) 439static bool Get(SerializationRecord record, [NotNullWhen(true)] out object? hashtable) 465if (key is null or SerializationRecord || value is SerializationRecord) 482this SerializationRecord record, 487static bool Get(SerializationRecord record, [NotNullWhen(true)] out object? exception) 506this SerializationRecord record, 522this SerializationRecord record, 530private static bool IsPrimitiveArrayRecord(SerializationRecord serializationRecord) =>
System.Resources.Extensions (14)
System\Resources\Extensions\BinaryFormat\BinaryFormattedObject.cs (3)
86public SerializationRecord RootRecord { get; } 92public SerializationRecord this[SerializationRecordId id] => RecordMap[id]; 94public IReadOnlyDictionary<SerializationRecordId, SerializationRecord> RecordMap { get; }
System\Resources\Extensions\BinaryFormat\BinaryFormattedObject.IParseState.cs (1)
18IReadOnlyDictionary<SerializationRecordId, SerializationRecord> RecordMap { get; }
System\Resources\Extensions\BinaryFormat\BinaryFormattedObject.ParseState.cs (1)
26public IReadOnlyDictionary<SerializationRecordId, SerializationRecord> RecordMap => _format.RecordMap;
System\Resources\Extensions\BinaryFormat\Deserializer\ArrayRecordDeserializer.cs (1)
103internal static Array GetArraySinglePrimitive(SerializationRecord record) => record switch
System\Resources\Extensions\BinaryFormat\Deserializer\Deserializer.cs (4)
54private readonly IReadOnlyDictionary<SerializationRecordId, SerializationRecord> _recordMap; 103IReadOnlyDictionary<SerializationRecordId, SerializationRecord> recordMap, 124IReadOnlyDictionary<SerializationRecordId, SerializationRecord> recordMap, 224SerializationRecord record = _recordMap[id];
System\Resources\Extensions\BinaryFormat\Deserializer\ObjectRecordDeserializer.cs (4)
18internal SerializationRecord ObjectRecord { get; } 25private protected ObjectRecordDeserializer(SerializationRecord objectRecord, IDeserializer deserializer) 48else if (memberValue is not SerializationRecord serializationRecord) // a primitive value 96internal static ObjectRecordDeserializer Create(SerializationRecord record, IDeserializer deserializer) => record switch
System.Windows.Forms (9)
System\Resources\ResXDataNode.cs (1)
433SerializationRecord rootRecord = stream.Decode();
System\Windows\Forms\ActiveX\AxHost.PropertyBagStream.cs (1)
28SerializationRecord rootRecord = stream.Decode();
System\Windows\Forms\ActiveX\Control.ActiveXImpl.cs (1)
1141SerializationRecord rootRecord = stream.Decode();
System\Windows\Forms\ActiveX\Control.ActiveXImpl.PropertyBagStream.cs (1)
32SerializationRecord rootRecord = stream.Decode();
System\Windows\Forms\Nrbf\WinFormsSerializationRecordExtensions.cs (5)
15this SerializationRecord record, 20static bool Get(SerializationRecord record, [NotNullWhen(true)] out object? imageListStreamer) 40public static bool TryGetBitmap(this SerializationRecord record, out object? bitmap) 59public static bool TryGetResXObject(this SerializationRecord record, [NotNullWhen(true)] out object? value) => 64public static bool TryGetCommonObject(this SerializationRecord record, [NotNullWhen(true)] out object? value) =>
System.Windows.Forms.Primitives.TestUtilities (2)
System\Windows\Forms\BinaryFormat\BinaryFormatTestExtensions.cs (2)
14/// Serializes the object using the <see cref="BinaryFormatter"/> and reads it into a <see cref="SerializationRecord"/>. 16public static SerializationRecord SerializeAndDecode(this object source)
System.Windows.Forms.Tests (4)
System\Windows\Forms\BinaryFormat\WinFormsBinaryFormattedObjectTests.cs (4)
23SerializationRecord rootRecord = bitmap.SerializeAndDecode(); 43SerializationRecord rootRecord = NrbfDecoder.Decode(stream); 78SerializationRecord rootRecord = stream.SerializeAndDecode(); 104SerializationRecord rootRecord = NrbfDecoder.Decode(memoryStream);