DerrickBrayanClayton / protobuf-net

Automatically exported from code.google.com/p/protobuf-net
0 stars 0 forks source link

Make non-generic variant of Serializer #44

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
This is just an enhancement request - Serializer could have non-generic
Serialize and Deserialize methods that would require to type of the proto
class to be passed as parameter. 

Original issue reported on code.google.com by maciej.p...@gmail.com on 20 Feb 2009 at 11:46

GoogleCodeExporter commented 8 years ago

Original comment by marc.gravell on 2 Apr 2009 at 6:57

GoogleCodeExporter commented 8 years ago
Where is this fixed? And what is the new signature? I don't seem to see it in 
v2.

Original comment by rdwhe...@gmail.com on 19 Jul 2011 at 10:03

GoogleCodeExporter commented 8 years ago
In both v1 and v2, Serializer.NonGeneric

Note that in v1 the generic API is the primary; in v2 this reverses, so 
non-generic is the primary (although all existing APIs are forwarded as you 
would expect ).

In v2, you can also use TypeModel which is entirely non-generic; both 
Serializer and Serializer.NonGeneric are actually now just shortcuts to 
RuntimeTypeModel.Default, an instance of a TypeModel. This is not singleton, 
and additional parallel models are allowed if required.

Original comment by marc.gravell on 19 Jul 2011 at 10:44