-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMicrosoft.Diagnostics.FastSerialization.xml
1948 lines (1888 loc) · 99.6 KB
/
Microsoft.Diagnostics.FastSerialization.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<?xml version="1.0"?>
<doc>
<assembly>
<name>Microsoft.Diagnostics.FastSerialization</name>
</assembly>
<members>
<member name="T:FastSerialization.StreamLabelWidth">
<summary>
Allows users of serialization and de-serialization mechanisms to specify the size of the StreamLabel.
As traces get larger, there is a need to support larger file sizes, and thus to increase the addressable
space within the files. StreamLabel instances are 8-bytes in-memory, but all serialization and de-serialization
of them results in the upper 4-bytes being lost. This setting will allow Serializer and Deserializer to read
and write 8-byte StreamLabel instances.
</summary>
</member>
<member name="T:FastSerialization.SerializationConfiguration">
<summary>
These settings apply to use of Serializer and Deserializer specifically.
</summary>
</member>
<member name="T:FastSerialization.StreamLabel">
<summary>
A StreamLabel represents a position in a IStreamReader or IStreamWriter.
In memory it is represented as a 64 bit signed value but to preserve compat
with the FastSerializer.1 format it is a 32 bit unsigned value when
serialized in a file. FastSerializer can parse files exceeding 32 bit sizes
as long as the format doesn't persist a StreamLabel in the content. NetTrace
is an example of this.
During writing it is generated by the IStreamWriter.GetLabel method an
consumed by the IStreamWriter.WriteLabel method. On reading you can use
IStreamReader.Current and and IStreamReader.
</summary>
</member>
<member name="F:FastSerialization.StreamLabel.Invalid">
<summary>
Represents a stream label that is not a valid value
</summary>
</member>
<member name="T:FastSerialization.IStreamWriter">
<summary>
IStreamWriter is meant to be a very simple streaming protocol. You can write integral types,
strings, and labels to the stream itself.
IStreamWrite can be thought of a simplified System.IO.BinaryWriter, or maybe the writer
part of a System.IO.Stream with a few helpers for primitive types.
See also IStreamReader
</summary>
</member>
<member name="M:FastSerialization.IStreamWriter.Write(System.Byte)">
<summary>
Write a byte to a stream
</summary>
</member>
<member name="M:FastSerialization.IStreamWriter.Write(System.Int16)">
<summary>
Write a short to a stream
</summary>
</member>
<member name="M:FastSerialization.IStreamWriter.Write(System.Int32)">
<summary>
Write an int to a stream
</summary>
</member>
<member name="M:FastSerialization.IStreamWriter.Write(System.Int64)">
<summary>
Write a long to a stream
</summary>
</member>
<member name="M:FastSerialization.IStreamWriter.Write(FastSerialization.StreamLabel)">
<summary>
Write a StreamLabel (a pointer to another part of the stream) to a stream
</summary>
</member>
<member name="M:FastSerialization.IStreamWriter.Write(System.String)">
<summary>
Write a string to a stream (supports null values).
</summary>
</member>
<member name="M:FastSerialization.IStreamWriter.GetLabel">
<summary>
Get the stream label for the current position (points at whatever is written next
</summary>
<returns></returns>
</member>
<member name="M:FastSerialization.IStreamWriter.WriteSuffixLabel(FastSerialization.StreamLabel)">
<summary>
Write a SuffixLabel it must be the last thing written to the stream. The stream
guarantees that this value can be efficiently read at any time (probably by seeking
back from the end of the stream)). The idea is that when you generate a 'tableOfContents'
you can only do this after processing the data (and probably writing it out), If you
remember where you write this table of contents and then write a suffix label to it
as the last thing in the stream using this API, you guarantee that the reader can
efficiently seek to the end, read the value, and then goto that position. (See
IStreamReader.GotoSuffixLabel for more)
</summary>
</member>
<member name="T:FastSerialization.IStreamReader">
IStreamReader is meant to be a very simple streaming protocol. You can read integral types,
strings, and labels to the stream itself. You can also goto labels you have read from the stream.
IStreamReader can be thought of a simplified System.IO.BinaryReder, or maybe the reader
part of a System.IO.Stream with a few helpers for primitive types.
See also IStreamWriter
</member>
<member name="M:FastSerialization.IStreamReader.ReadByte">
<summary>
Read a byte from the stream
</summary>
</member>
<member name="M:FastSerialization.IStreamReader.ReadInt16">
<summary>
Read a short from the stream
</summary>
</member>
<member name="M:FastSerialization.IStreamReader.ReadInt32">
<summary>
Read an int from the stream
</summary>
</member>
<member name="M:FastSerialization.IStreamReader.ReadInt64">
<summary>
Read a long from the stream
</summary>
</member>
<member name="M:FastSerialization.IStreamReader.ReadString">
<summary>
Read a string from the stream. Can represent null strings
</summary>
</member>
<member name="M:FastSerialization.IStreamReader.Read(System.Byte[],System.Int32,System.Int32)">
<summary>
Read a span of bytes from the stream.
</summary>
</member>
<member name="M:FastSerialization.IStreamReader.ReadLabel">
<summary>
Read a StreamLabel (pointer to some other part of the stream) from the stream
</summary>
</member>
<member name="M:FastSerialization.IStreamReader.Goto(FastSerialization.StreamLabel)">
<summary>
Goto a location in the stream
</summary>
</member>
<member name="P:FastSerialization.IStreamReader.Current">
<summary>
Returns the current position in the stream.
</summary>
</member>
<member name="M:FastSerialization.IStreamReader.GotoSuffixLabel">
<summary>
Sometimes information is only known after writing the entire stream. This information can be put
on the end of the stream, but there needs to be a way of finding it relative to the end, rather
than from the beginning. A IStreamReader, however, does not actually let you go 'backwards' easily
because it does not guarantee the size what it writes out (it might compress).
The solution is the concept of a 'suffixLabel' which is location in the stream where you can always
efficiently get to.
It is written with a special API (WriteSuffixLabel that must be the last thing written. It is
expected that it simply write an uncompressed StreamLabel. It can then be used by using the
GotoSTreamLabel() method below. This goes to this well know position in the stream. We expect
this is implemented by seeking to the end of the stream, reading the uncompressed streamLabel,
and then seeking to that position.
</summary>
</member>
<member name="T:FastSerialization.IStreamWriterExentions">
<summary>
Support for higher level operations on IStreamWriter and IStreamReader
</summary>
</member>
<member name="M:FastSerialization.IStreamWriterExentions.Write(FastSerialization.IStreamWriter,System.Guid)">
<summary>
Writes a Guid to stream 'writer' as sequence of 8 bytes
</summary>
</member>
<member name="M:FastSerialization.IStreamWriterExentions.ReadGuid(FastSerialization.IStreamReader)">
<summary>
Reads a Guid to stream 'reader' as sequence of 8 bytes and returns it
</summary>
</member>
<member name="M:FastSerialization.IStreamWriterExentions.Add(FastSerialization.StreamLabel,System.Int32)">
<summary>
Returns a StreamLabel that is the sum of label + offset.
</summary>
</member>
<member name="M:FastSerialization.IStreamWriterExentions.Sub(FastSerialization.StreamLabel,FastSerialization.StreamLabel)">
<summary>
Returns the difference between two stream labels
</summary>
</member>
<member name="M:FastSerialization.IStreamWriterExentions.Skip(FastSerialization.IStreamReader,System.Int32)">
<summary>
Convenience method for skipping a a certain number of bytes in the stream.
</summary>
</member>
<member name="T:FastSerialization.ForwardReference">
<summary>
Like a StreamLabel, a ForwardReference represents a pointer to a location in the stream.
However unlike a StreamLabel, the exact value in the stream does not need to be known at the
time the forward references is written. Instead the ID is written, and later that ID is
associated with the target location (using DefineForwardReference).
</summary>
</member>
<member name="F:FastSerialization.ForwardReference.Invalid">
<summary>
Returned when no appropriate ForwardReference exists.
</summary>
</member>
<member name="T:FastSerialization.Serializer">
<summary>
#SerializerIntroduction see also #StreamLayout
The Serializer class is a general purpose object graph serializer helper. While it does not have
any knowledge of the serialization format of individual object, it does impose conventions on how to
serialize support information like the header (which holds versioning information), a trailer (which
holds deferred pointer information), and how types are versioned. However these conventions are
intended to be very generic and thus this class can be used for essentially any serialization need.
Goals:
* Allows full range of serialization, including subclassing and cyclic object graphs.
* Can be serialized and deserialized efficiently sequentially (no seeks MANDATED on read or
write). This allows the serializer to be used over pipes and other non-seekable devices).
* Pay for play (thus very efficient in simple cases (no subclassing or cyclic graphs).
* Ideally self-describing, and debuggable (output as XML if desired?)
Versioning:
* We want the ability for new formats to accept old versions if objects wish to support old
formats
* Also wish to allow new formats to be read by OLD version if the new format is just an
'extension' (data added to end of objects). This makes making new versions almost pain-free.
Concepts:
* No-seek requirement
The serialized form should be such that it can be deserialized efficiently in a serial fashion
(no seeks). This means all information needed to deserialize has to be 'just in time' (can't
be some table at the end). Pragmatically this means that type information (needed to create
instances), has to be output on first use, so it is available for the deserializer.
* Laziness requirement
While is should be possible to read the serialized for sequentially, we should also not force
it. It should be possible to have a large file that represents a persisted structure that can
be lazily brought into memory on demand. This means that all information needed to
deserialize must also be 'randomly available' and not depend on reading from the beginning.
Pragmatically this means that type information, and forward forwardReference information needs to
have a table in a well known Location at the end so that it can be found without having to
search the file sequentially.
* Versioning requirement
To allow OLD code to access NEW formats, it must be the case that the serialized form of
every instance knows how to 'skip' past any new data (even if it does not know its exact
size). To support this, objects have 'begin' and 'end' tags, which allows the deserializer to
skip the next object.
* Polymorphism requirement
Because the user of a filed may not know the exact instance stored there, in general objects
need to store the exact type of the instance. Thus they need to store a type identifier, this
can be folded into the 'begin' tag.
* Arbitrary object graph (circularity) requirement (Forward references)
The serializer needs to be able to serialize arbitrary object graphs, including those with
cycles in them. While you can do this without forward references, the system is more flexible
if it has the concept of a forward reference. Thus whenever a object reference is required, a
'forward forwardReference' can be given instead. What gets serialized is simply an unique forward
reference index (index into an array), and at some later time that index is given its true
value. This can either happen with the target object is serialized (see
Serializer.Tags.ForwardDefintion) or at the end of the serialization in a forward
reference table (which allows forward references to be resolved without scanning then entire
file.
* Contract between objects IFastSerializable.ToStream:
The heart of the serialization and deserialization process the IFastSerializable
interface, which implements just two methods: ToStream (for serializing an object), and
FromStream (for deserializing and object). This interfaces is the mechanism by which objects
tell the serializer what data to store for an individual instance. However this core is not
enough. An object that implements IFastSerializable must also implement a default
constructor (constructor with no args), so that that deserializer can create the object (and
then call FromStream to populated it).
The ToStream method is only responsible for serializing the data in the object, and by itself
is not sufficient to serialize an interconnected, polymorphic graph of objects. It needs
help from the Serializer and Deserialize to do this. Serializer takes on the
responsibility to deal with persisting type information (so that Deserialize can create
the correct type before IFastSerializable.FromStream is called). It is also the
serializer's responsibility to provide the mechanism for dealing with circular object graphs
and forward references.
* Layout of a serialized object: A serialized object has the following basic format
* If the object is the definition of a previous forward references, then the definition must
begin with a Serializer.Tags.ForwardDefintion tag followed by a forward forwardReference
index which is being defined.
* Serializer.Tags.BeginObject tag
* A reference to the SerializationType for the object. This reference CANNOT be a
forward forwardReference because its value is needed during the deserialization process before
forward references are resolved.
* All the data that that objects 'IFastSerializable.ToStream method wrote. This is the
heart of the deserialized data, and the object itself has a lot of control over this
format.
* Serializer.Tags.EndObject tag. This marks the end of the object. It quickly finds bugs
in ToStream FromStream mismatches, and also allows for V1 deserializers to skip past
additional fields added since V1.
* Serializing Object references:
When an object forwardReference is serialized, any of the following may follow in the stream
* Serializer.Tags.NullReference used to encode a null object forwardReference.
* Serializer.Tags.BeginObject or Serializer.Tags.ForwardDefintion, which indicates
that this the first time the target object has been referenced, and the target is being
serialized on the spot.
* Serializer.Tags.ObjectReference which indicates that the target object has already
been serialized and what follows is the StreamLabel of where the definition is.
* Serializer.Tags.ForwardReference followed by a new forward forwardReference index. This
indicates that the object is not yet serialized, but the serializer has chosen not to
immediately serialize the object. Ultimately this object will be defined, but has not
happened yet.
* Serializing Types:
Types are simply objects of type SerializationType which contain enough information about
the type for the Deserializer to do its work (it full name and version number). They are
serialized just like all other types. The only thing special about it is that references to
types after the BeginObject tag must not be forward references.
#StreamLayout:
The structure of the file as a whole is simply a list of objects. The first and last objects in
the file are part of the serialization infrastructure.
Layout Synopsis
* Signature representing Serializer format
* EntryObject (most of the rest of the file)
* BeginObject tag
* Type for This object (which is a object of type SerializationType)
* BeginObject tag
* Type for SerializationType POSITION1
* BeginObject tag
* Type for SerializationType
* ObjectReference tag // This is how our recursion ends.
* StreamLabel for POSITION1
* Version Field for SerializationType
* Minimum Version Field for SerializationType
* FullName string for SerializationType
* EndObject tag
* Version field for EntryObject's type
* Minimum Version field for EntryObject's type
* FullName string for EntryObject's type
* EndObject tag
* Field1
* Field2
* V2_Field (this should be tagged so that it can be skipped by V1 deserializers.
* EndObject tag
* ForwardReferenceTable pseudo-object
* Count of forward references
* StreamLabel for forward ref 0
* StreamLabel for forward ref 1.
* ...
* SerializationTrailer pseudo-object
* StreamLabel ForwardReferenceTable
* StreamLabel to SerializationTrailer
* End of stream
</summary>
</member>
<member name="M:FastSerialization.Serializer.#ctor(System.String,FastSerialization.IFastSerializable)">
<summary>
Create a serializer writes 'entryObject' to a file.
</summary>
</member>
<member name="M:FastSerialization.Serializer.#ctor(System.IO.Stream,FastSerialization.IFastSerializable)">
<summary>
Create a serializer that writes <paramref name="entryObject"/> to a <see cref="T:System.IO.Stream"/>. The serializer
will close the stream when it closes.
</summary>
</member>
<member name="M:FastSerialization.Serializer.#ctor(System.IO.Stream,FastSerialization.IFastSerializable,System.Boolean)">
<summary>
Create a serializer that writes <paramref name="entryObject"/> to a <see cref="T:System.IO.Stream"/>. The
<paramref name="leaveOpen"/> parameter determines whether the serializer will close the stream when it
closes.
</summary>
</member>
<member name="M:FastSerialization.Serializer.#ctor(FastSerialization.IStreamWriter,FastSerialization.IFastSerializable)">
<summary>
Create a serializer that writes 'entryObject' another IStreamWriter
</summary>
</member>
<member name="M:FastSerialization.Serializer.Write(System.Boolean)">
<summary>
Write a bool to a stream
</summary>
</member>
<member name="M:FastSerialization.Serializer.Write(System.Byte)">
<summary>
Write a byte to a stream
</summary>
</member>
<member name="M:FastSerialization.Serializer.Write(System.Int16)">
<summary>
Write a short to a stream
</summary>
</member>
<member name="M:FastSerialization.Serializer.Write(System.Int32)">
<summary>
Write an int to a stream
</summary>
</member>
<member name="M:FastSerialization.Serializer.Write(System.Int64)">
<summary>
Write a long to a stream
</summary>
</member>
<member name="M:FastSerialization.Serializer.Write(System.Guid)">
<summary>
Write a Guid to a stream
</summary>
</member>
<member name="M:FastSerialization.Serializer.Write(System.String)">
<summary>
Write a string to a stream
</summary>
</member>
<member name="M:FastSerialization.Serializer.Write(System.Single)">
<summary>
Write a float to a stream
</summary>
</member>
<member name="M:FastSerialization.Serializer.Write(System.Double)">
<summary>
Write a double to a stream
</summary>
</member>
<member name="M:FastSerialization.Serializer.Write(FastSerialization.StreamLabel)">
<summary>
Write a StreamLabel (pointer to some other part of the stream whose location is current known) to the stream
</summary>
</member>
<member name="M:FastSerialization.Serializer.Write(FastSerialization.ForwardReference)">
<summary>
Write a ForwardReference (pointer to some other part of the stream that whose location is not currently known) to the stream
</summary>
</member>
<member name="M:FastSerialization.Serializer.Write(FastSerialization.IFastSerializable)">
<summary>
If the object is potentially aliased (multiple references to it), you should write it with this method.
</summary>
</member>
<member name="M:FastSerialization.Serializer.WriteDefered(FastSerialization.IFastSerializable)">
<summary>
To tune working set (or disk seeks), or to make the dump of the format more readable, it is
valuable to have control over which of several references to an object will actually cause it to
be serialized (by default the first encountered does it).
WriteDefered allows you to write just a forwardReference to an object with the expectation that
somewhere later in the serialization process the object will be serialized. If no call to
WriteObject() occurs, then the object is serialized automatically before the stream is closed
(thus dangling references are impossible).
</summary>
</member>
<member name="M:FastSerialization.Serializer.WritePrivate(FastSerialization.IFastSerializable)">
<summary>
This is an optimized version of WriteObjectReference that can be used in some cases.
If the object is not aliased (it has an 'owner' and only that owner has references to it (which
implies its lifetime is strictly less than its owners), then the serialization system does not
need to put the object in the 'interning' table. This saves a space (entries in the intern table
as well as 'SyncEntry' overhead of creating hash codes for object) as well as time (to create
that bookkeeping) for each object that is treated as private (which can add up if because it is
common that many objects are private). The private instances are also marked in the serialized
format so on reading there is a similar bookkeeping savings.
The ultimate bits written by WritePrivateObject are the same as WriteObject.
TODO Need a DEBUG mode where we detect if others besides the owner reference the object.
</summary>
</member>
<member name="M:FastSerialization.Serializer.GetForwardReference">
<summary>
Create a ForwardReference. At some point before the end of the serialization, DefineForwardReference must be called on this value
</summary>
<returns></returns>
</member>
<member name="M:FastSerialization.Serializer.DefineForwardReference(FastSerialization.ForwardReference)">
<summary>
Define the ForwardReference forwardReference to point at the current write location.
</summary>
<param name="forwardReference"></param>
</member>
<member name="M:FastSerialization.Serializer.WriteTagged(System.Boolean)">
<summary>
Write a byte preceded by a tag that indicates its a byte. These should be read with the corresponding TryReadTagged operation
</summary>
</member>
<member name="M:FastSerialization.Serializer.WriteTagged(System.Byte)">
<summary>
Write a byte preceded by a tag that indicates its a byte. These should be read with the corresponding TryReadTagged operation
</summary>
</member>
<member name="M:FastSerialization.Serializer.WriteTagged(System.Int16)">
<summary>
Write a byte preceded by a tag that indicates its a short. These should be read with the corresponding TryReadTagged operation
</summary>
</member>
<member name="M:FastSerialization.Serializer.WriteTagged(System.Int32)">
<summary>
Write a byte preceded by a tag that indicates its a int. These should be read with the corresponding TryReadTagged operation
</summary>
</member>
<member name="M:FastSerialization.Serializer.WriteTagged(System.Int64)">
<summary>
Write a byte preceded by a tag that indicates its a long. These should be read with the corresponding TryReadTagged operation
</summary>
</member>
<member name="M:FastSerialization.Serializer.WriteTagged(System.String)">
<summary>
Write a byte preceded by a tag that indicates its a string. These should be read with the corresponding TryReadTagged operation
</summary>
</member>
<member name="M:FastSerialization.Serializer.WriteTagged(FastSerialization.IFastSerializable)">
<summary>
Write a byte preceded by a tag that indicates its a object. These should be read with the corresponding TryReadTagged operation
</summary>
</member>
<member name="M:FastSerialization.Serializer.WriteTaggedBlobHeader(System.Int32)">
<summary>
Writes the header for a skipping an arbitrary blob. THus it writes a Blob
tag and the size, and the caller must then write 'sizes' bytes of data in
some way. This allows you to create regions of arbitrary size that can
be skipped by old as well as new parsers.
</summary>
<param name="size"></param>
</member>
<member name="M:FastSerialization.Serializer.WriteTaggedEnd">
<summary>
Writes an end tag (which is different from all others). This is useful
when you have a deferred region of tagged items.
</summary>
</member>
<member name="P:FastSerialization.Serializer.Writer">
<summary>
Retrieve the underlying stream we are writing to. Generally the Write* methods are enough.
</summary>
</member>
<member name="M:FastSerialization.Serializer.Close">
<summary>
Completes the writing of the stream.
</summary>
</member>
<member name="M:FastSerialization.Serializer.Log(System.String)">
<summary>
To help debug any serialization issues, you can write data to a side file called 'log.serialize.xml'
which can track exactly what serialization operations occurred.
</summary>
</member>
<member name="M:FastSerialization.Serializer.Dispose">
<summary>
Dispose pattern
</summary>
</member>
<member name="T:FastSerialization.Deserializer">
<summary>
Deserializer is a helper class that holds all the information needed to deserialize an object
graph as a whole (things like the table of objects already deserialized, and the list of types in
the object graph.
see #SerializerIntroduction for more
</summary>
</member>
<member name="M:FastSerialization.Deserializer.#ctor(System.String,FastSerialization.SerializationConfiguration)">
<summary>
Create a Deserializer that reads its data from a given file
</summary>
</member>
<member name="M:FastSerialization.Deserializer.#ctor(System.IO.Stream,System.String,FastSerialization.SerializationConfiguration)">
<summary>
Create a Deserializer that reads its data from a given System.IO.Stream. The stream will be closed when the Deserializer is done with it.
</summary>
</member>
<member name="M:FastSerialization.Deserializer.#ctor(System.IO.Stream,System.String,System.Boolean,FastSerialization.SerializationConfiguration)">
<summary>
Create a Deserializer that reads its data from a given System.IO.Stream. The
<paramref name="leaveOpen"/> parameter determines whether the deserializer will close the stream when it
closes.
</summary>
</member>
<member name="M:FastSerialization.Deserializer.#ctor(FastSerialization.IStreamReader,System.String)">
<summary>
Create a Deserializer that reads its data from a given IStreamReader. The stream will be closed when the Deserializer is done with it.
</summary>
</member>
<member name="M:FastSerialization.Deserializer.GetEntryTypeName">
<summary>
Returns the full name of the type of the entry object without actually creating it.
Will return null on failure.
</summary>
</member>
<member name="M:FastSerialization.Deserializer.GetEntryObject``1(``0@)">
<summary>
GetEntryObject is the main deserialization entry point. The serialization stream always has an object that represents the stream as
a whole, called the entry object and this returns it and places it in 'ret'
</summary>
</member>
<member name="M:FastSerialization.Deserializer.GetEntryObject">
<summary>
GetEntryObject is the main deserialization entry point. The serialization stream always has an object that represents the stream as
a whole, called the entry object and this returns it and returns it
</summary>
</member>
<member name="M:FastSerialization.Deserializer.Read(System.Boolean@)">
<summary>
Read a bool from the stream
</summary>
</member>
<member name="M:FastSerialization.Deserializer.Read(System.Byte@)">
<summary>
Read a byte from the stream
</summary>
</member>
<member name="M:FastSerialization.Deserializer.Read(System.Int16@)">
<summary>
Read a short from the stream
</summary>
</member>
<member name="M:FastSerialization.Deserializer.Read(System.Int32@)">
<summary>
Read an int from the stream
</summary>
</member>
<member name="M:FastSerialization.Deserializer.Read(System.Int64@)">
<summary>
Read a long from the stream
</summary>
</member>
<member name="M:FastSerialization.Deserializer.Read(System.Guid@)">
<summary>
Read a Guid from the stream
</summary>
</member>
<member name="M:FastSerialization.Deserializer.Read(System.Single@)">
<summary>
Read a float from the stream
</summary>
</member>
<member name="M:FastSerialization.Deserializer.Read(System.Double@)">
<summary>
Read a double from the stream
</summary>
</member>
<member name="M:FastSerialization.Deserializer.Read(System.String@)">
<summary>
Read a string from the stream. Can represent null
</summary>
</member>
<member name="M:FastSerialization.Deserializer.Read(FastSerialization.StreamLabel@)">
<summary>
d) from the stream
</summary>
</member>
<member name="M:FastSerialization.Deserializer.Read``1(``0@)">
<summary>
Read a IFastSerializable object from the stream and place it in ret
</summary>
</member>
<member name="M:FastSerialization.Deserializer.ReadObject">
<summary>
Read a IFastSerializable object from the stream and return it
</summary>
</member>
<member name="M:FastSerialization.Deserializer.ReadBool">
<summary>
Read a bool from the stream and return it
</summary>
</member>
<member name="M:FastSerialization.Deserializer.ReadByte">
<summary>
Read a byte from the stream and return it
</summary>
</member>
<member name="M:FastSerialization.Deserializer.ReadInt16">
<summary>
Read a short from the stream and return it
</summary>
</member>
<member name="M:FastSerialization.Deserializer.ReadInt">
<summary>
Read an int from the stream and return it
</summary>
</member>
<member name="M:FastSerialization.Deserializer.ReadInt64">
<summary>
Read a long from the stream and return it
</summary>
</member>
<member name="M:FastSerialization.Deserializer.ReadFloat">
<summary>
Read a float from the stream and return it
</summary>
</member>
<member name="M:FastSerialization.Deserializer.ReadDouble">
<summary>
Read a double from the stream and return it
</summary>
</member>
<member name="M:FastSerialization.Deserializer.ReadString">
<summary>
Read in a string value and return it
</summary>
</member>
<member name="M:FastSerialization.Deserializer.ReadLabel">
<summary>
Read in a StreamLabel (a pointer to some other part of the stream) and return it
</summary>
</member>
<member name="M:FastSerialization.Deserializer.ReadForwardReference">
<summary>
Read in a ForwardReference (a pointer to some other part of the stream which was not known at the tie it was written) and return it
Use ResolveForwardReference to convert the ForwardReference to a StreamLabel
</summary>
</member>
<member name="M:FastSerialization.Deserializer.ResolveForwardReference(FastSerialization.ForwardReference,System.Boolean)">
<summary>
Given a forward reference find the StreamLabel (location in the stream) that it points at).
Normally this call preserves the current read location, but if you do don't care you can
set preserveCurrent as an optimization to make it more efficient.
</summary>
</member>
<member name="P:FastSerialization.Deserializer.VersionBeingRead">
<summary>
Meant to be called from FromStream. It returns the version number of the
type being deserialized. It can be used so that new code can recognizes that it
is reading an old file format and adjust what it reads.
</summary>
</member>
<member name="P:FastSerialization.Deserializer.MinimumReaderVersionBeingRead">
<summary>
Meant to be called from FromStream. It returns the version number of the MinimumReaderVersion
of the type that was serialized.
</summary>
</member>
<member name="P:FastSerialization.Deserializer.Name">
<summary>
The filename if read from a file or the stream name if read from a stream
</summary>
</member>
<member name="P:FastSerialization.Deserializer.TypeResolver">
<summary>
If set this function is set, then it is called whenever a type name from the serialization
data is encountered. It is your you then need to look that up. If it is not present
it uses Type.GetType(string) which only checks the current assembly and mscorlib.
</summary>
</member>
<member name="M:FastSerialization.Deserializer.RegisterFactory(System.Type,System.Func{FastSerialization.IFastSerializable})">
<summary>
For every IFastSerializable object being deserialized, the Deserializer needs to create 'empty' objects
that 'FromStream' is invoked on. The Deserializer gets these 'empty' objects by calling a 'factory'
delegate for that type. Thus all types being deserialized must have a factory.
RegisterFactory registers such a factory for particular 'type'.
</summary>
</member>
<member name="M:FastSerialization.Deserializer.RegisterDefaultFactory(System.Func{System.Type,FastSerialization.IFastSerializable})">
<summary>
For every IFastSerializable object being deserialized, the Deserializer needs to create 'empty' objects
that 'FromStream' is invoked on. The Deserializer gets these 'empty' objects by calling a 'factory'
delegate for that type. Thus all types being deserialized must have a factory.
RegisterDefaultFactory registers a factory that is passed a type parameter and returns a new IFastSerialable object.
</summary>
</member>
<member name="M:FastSerialization.Deserializer.TryReadTagged(System.Boolean@)">
<summary>
Try to read tagged value from the stream. If it is a tagged bool, return int in ret and return true, otherwise leave the cursor unchanged and return false
</summary>
</member>
<member name="M:FastSerialization.Deserializer.TryReadTagged(System.Byte@)">
<summary>
Try to read tagged value from the stream. If it is a tagged byte, return int in ret and return true, otherwise leave the cursor unchanged and return false
</summary>
</member>
<member name="M:FastSerialization.Deserializer.TryReadTagged(System.Int16@)">
<summary>
Try to read tagged value from the stream. If it is a tagged short, return int in ret and return true, otherwise leave the cursor unchanged and return false
</summary>
</member>
<member name="M:FastSerialization.Deserializer.TryReadTagged(System.Int32@)">
<summary>
Try to read tagged value from the stream. If it is a tagged int, return int in ret and return true, otherwise leave the cursor unchanged and return false
</summary>
</member>
<member name="M:FastSerialization.Deserializer.TryReadTagged(System.Int64@)">
<summary>
Try to read tagged value from the stream. If it is a tagged long, return int in ret and return true, otherwise leave the cursor unchanged and return false
</summary>
</member>
<member name="M:FastSerialization.Deserializer.TryReadTagged(System.String@)">
<summary>
Try to read tagged value from the stream. If it is a tagged string, return int in ret and return true, otherwise leave the cursor unchanged and return false
</summary>
</member>
<member name="M:FastSerialization.Deserializer.TryReadTaggedBlobHeader">
<summary>
Try to read the header for a tagged blob of bytes. If Current points at a tagged
blob it succeeds and returns the size of the blob (the caller must read or skip
past it manually) If it is not a tagged blob it returns a size of 0 and resets
the read pointer to what it was before this method was called.
</summary>
</member>
<member name="M:FastSerialization.Deserializer.TryReadTagged``1(``0@)">
<summary>
Try to read tagged value from the stream. If it is a tagged FastSerializable, return int in ret and return true, otherwise leave the cursor unchanged and return false
</summary>
</member>
<member name="M:FastSerialization.Deserializer.TryReadTaggedObject">
<summary>
Try to read tagged value from the stream. If it is a tagged FastSerializable, return it, otherwise leave the cursor unchanged and return null
</summary>
</member>
<member name="M:FastSerialization.Deserializer.Goto(FastSerialization.StreamLabel)">
<summary>
Set the read position to the given StreamLabel
</summary>
</member>
<member name="M:FastSerialization.Deserializer.Goto(FastSerialization.ForwardReference)">
<summary>
Set the read position to the given ForwardReference
</summary>
</member>
<member name="P:FastSerialization.Deserializer.Current">
<summary>
Returns the current read position in the stream.
</summary>
</member>
<member name="P:FastSerialization.Deserializer.Reader">
<summary>
Fetch the underlying IStreamReader that the deserializer reads data from
</summary>
</member>
<member name="M:FastSerialization.Deserializer.Dispose">
<summary>
Close the IStreamReader and free resources associated with the Deserializer
</summary>
</member>
<member name="F:FastSerialization.Deserializer.deferForwardReferences">
<summary>
When we encounter a forward reference, we can either go to the forward reference table immediately and resolve it
(deferForwardReferences == false), or simply remember that that position needs to be fixed up and continue with
the deserialization. This later approach allows 'no seek' deserialization. This variable which scheme we do.
</summary>
</member>
<member name="T:FastSerialization.DeferedRegion">
<summary>
#DeferedRegionOverview.
A DeferedRegion help make 'lazy' objects. You will have a DeferedRegion for each block of object you
wish to independently decide whether to deserialize lazily (typically you have one per object however
in the limit you can have one per field, it is up to you).
When you call DeferedRegion.Write you give it a delegate that will write all the deferred fields.
The Write operation will place a forward reference in the stream that skips all the fields written,
then the fields themselves, then define the forward reference. This allows readers to skip the
deferred fields.
When you call DeferedRegion.Read you also give it a delegate that reads all the deferred fields.
However when 'Read' instead of reading the fields it
* remembers the deserializer, stream position, and reading delegate.
* it uses the forward reference to skip the region.
When DeferedRegion.FinishRead is called, it first checks if the region was already restored.
If not it used the information to read in the deferred region and returns. Thus this FinishRead
should be called before any deferred field is used.
</summary>
</member>
<member name="M:FastSerialization.DeferedRegion.Write(FastSerialization.Serializer,System.Action)">
<summary>
see #DeferedRegionOverview.
TODO more
</summary>
</member>
<member name="M:FastSerialization.DeferedRegion.Read(FastSerialization.Deserializer,System.Action)">
<summary>
See overview in DeferedRegion class comment.
This call indicates that the 'fromStream' delegate can deserialize a region of the object, which
was serialized with the DeferedRegion.Write method. The read skips the data for the region (thus
no objects associated with the region are created in memory) but the deferred object remembers
'fromStream' and will call it when 'FinishRead()' is called.
</summary>
</member>
<member name="M:FastSerialization.DeferedRegion.FinishRead(System.Boolean)">
<summary>
FinishRead indicates that you need to deserialize the lazy region you defined with the 'Read' method.
If the region has already been deserialized, nothing is done. Otherwise when you call this
method the current position in the stream is put back to where it was when Read was called and the
'fromStream' delegate registered in 'Read' is called to perform the deserialization.
</summary>
</member>
<member name="P:FastSerialization.DeferedRegion.IsFinished">
<summary>
Returns true if the FinsihRead() has already been called.
</summary>
</member>
<member name="P:FastSerialization.DeferedRegion.Deserializer">
<summary>
Get the deserializer associated with this DeferredRegion
</summary>
</member>
<member name="P:FastSerialization.DeferedRegion.StartPosition">
<summary>
Get the stream position when Read was called
</summary>
</member>
<member name="M:FastSerialization.DeferedRegion.FinishReadHelper(System.Boolean)">
<summary>
This helper is just here to ensure that FinishRead gets inlined
</summary>
</member>
<member name="T:FastSerialization.IFastSerializable">
<summary>
A type can opt into being serializable by implementing IFastSerializable and a default constructor
(constructor that takes not arguments).
Conceptually all clients of IFastSerializable also implement IFastSerializableVersion
however the serializer will assume a default implementation of IFastSerializableVersion (that
Returns version 1 and assumes all versions are allowed to deserialize it.
</summary>
</member>
<member name="M:FastSerialization.IFastSerializable.ToStream(FastSerialization.Serializer)">
<summary>
Given a Serializer, write yourself to the output stream. Conceptually this routine is NOT
responsible for serializing its type information but only its field values. However it is
conceptually responsible for the full transitive closure of its fields.
* For primitive fields, the choice is easy, simply call Serializer.Write
* For object fields there is a choice
* If is is only references by the enclosing object (eg and therefore field's lifetime is
identical to referencing object), then the Serialize.WritePrivateObject can be
used. This skips placing the object in the interning table (that ensures it is written
exactly once).
* Otherwise call Serialize.WriteObject
* For value type fields (or collections of structs), you serialize the component fields.
* For collections, typically you serialize an integer inclusiveCountRet followed by each object.
</summary>
</member>
<member name="M:FastSerialization.IFastSerializable.FromStream(FastSerialization.Deserializer)">
<summary>
Given a reader, and a 'this' instance, made by calling the default constructor, create a fully
initialized instance of the object from the reader stream. The deserializer provides the extra
state needed to do this for cyclic object graphs.
Note that it is legal for the instance to cache the deserializer and thus be 'lazy' about when
the actual deserialization happens (thus large persisted strucuture on the disk might stay on the
disk).
Typically the FromStream implementation is an exact mirror of the ToStream implementation, where
there is a Read() for every Write().
</summary>
</member>
<member name="T:FastSerialization.IFastSerializableVersion">
<summary>
Objects implement IFastSerializableVersion to indicate what the current version is for writing
and which readers can read the current version. If this interface is not implemented a default is
provided (assuming version 1 for writing and MinimumVersion = 0).
By default Serializer.WriteObject will place marks when the object ends and always skip to the
end even if the FromStream did not read all the object data. This allows considerable versioning
flexibility. Simply by placing the new data at the end of the existing serialization, new versions
of the type can be read by OLD deserializers (new fields will have the value determined by the
default constructor (typically 0 or null). This makes is relatively easy to keep MinimumVersion = 0
(the ideal case).
</summary>
</member>
<member name="P:FastSerialization.IFastSerializableVersion.Version">
<summary>
This is the version number for the serialization CODE (that is the app decoding the format)
It should be incremented whenever a change is made to IFastSerializable.ToStream and the format
is publicly disseminated. It must not vary from instance to instance. This is pretty straightforward.
It defaults to 0
</summary>
</member>
<member name="P:FastSerialization.IFastSerializableVersion.MinimumVersionCanRead">
<summary>
At some point typically you give up allowing new versions of the read to read old wire formats
This is the Minimum version of the serialized data that this reader can deserialize. Trying
to read wire formats strictly smaller (older) than this will fail. Setting this to the current
version indicates that you don't care about ever reading data generated with an older version
of the code.
If you set this to something other than your current version, you are obligated to ensure that
your FromStream() method can handle all formats >= than this number.
You can achieve this if you simply use the 'WriteTagged' and 'ReadTagged' APIs in your 'ToStream'
and 'FromStream' after your V1 AND you always add new fields to the end of your class.
This is the best practice. Thus