Skip to content

DataSet serialization #249

Description

@cata02

Hello!
I have a large .net project for which i want to use messagepack for wcf serialization.
The project uses a lot of untyped DataSets, typed DataSets, and nested DataSets inside POCO.
I already have a way of serializing a dataset (typed or not) to a POCO or byte[].

I've created a custom message pack serializer for the base class: DataSet and i'm trying to register it for all untyped DataSets and typed DataSets (which are derived classed from the DataSet class).

I get an exception trying to register the custom message pack serializer for typed datasets.

This line:
e.SetSerializer(new MsgPackDatasetSerializer(e.Context));

Throws an exception:
'The serializer must be MsgPack.Serialization.MessagePackSerializer`1[.......] type.'

The class MsgPackDatasetSerializer is my custom serializer which derives from MessagePackSerializer and has a proper implementation.

What are my options?
I cannot register a custom serializer for every single typed dataset; there are many of them. :)

Thanks!

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementRequires or request to feature enhancement

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions