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