Home All Groups Group Topic Archive Search About

IFormatter custom implementation

Author
10 Nov 2006 1:28 PM
Michal Dvorak
Can anyone point me to some info how SHOULD be serialization formatters
implemented? MSDN docs barely describes what built-in formatters do..
Thanks for any help

Author
10 Nov 2006 2:47 PM
Ciaran O''Donnell
Serialization Formatters write a representation on an object to a stream, and
read them from a stream, the exact method depends on the type of
serialization being used but it isnt an easy thing to code. Why cant you use
a BinaryFormatter (very fast), SoapFormatter, or XMLSerializer(slow) in your
app?
There isn't really a need to write your own.

Ciaran O'Donnell

Show quote
"Michal Dvorak" wrote:

> Can anyone point me to some info how SHOULD be serialization formatters
> implemented? MSDN docs barely describes what built-in formatters do..
> Thanks for any help
>
Author
11 Nov 2006 1:00 PM
Michal Dvorak
Thanks for advice, however if i asked it means that i probably need it ;)
SoapFormatter is obsolete and very limited, and XmlSerializer does not
implement IFormatter interface and does not follow .NET serialization
design (i.e. does not support dictionaries)
I've already written XmlFormatter that works fine form my purposes
(saving/loading data from files), but i want to do it "the right way",
so it will be fully compatible..

Ciaran O''Donnell wrote:
Show quote
> Serialization Formatters write a representation on an object to a stream, and
> read them from a stream, the exact method depends on the type of
> serialization being used but it isnt an easy thing to code. Why cant you use
> a BinaryFormatter (very fast), SoapFormatter, or XMLSerializer(slow) in your
> app?
> There isn't really a need to write your own.
>
> Ciaran O'Donnell
>
> "Michal Dvorak" wrote:
>
>> Can anyone point me to some info how SHOULD be serialization formatters
>> implemented? MSDN docs barely describes what built-in formatters do..
>> Thanks for any help
>>

AddThis Social Bookmark Button