0

I am trying to send a TreeDictionary from the C5 collection library over WCF. It gets to the recipient OK (I had to add a lot of KnownType attributes for what seems to be internal data structures). However, now I am stuck at a point where it fails because it cannot create a default comparer for C5.KeyValuePair'2[typea,typeb].

Is this because the C5 classes inherently cannot go across WCF (and I am lucky to have got this far) or something else?

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
freddy smith
  • 3,347
  • 5
  • 24
  • 28

1 Answers1

2

C5 classes are indeed not designed to go across a serialization boundary. You have several options.

  1. Add a reference to the C5 libraries on your client side. This is not service oriented and will not work on anything but a .NET client at best. Not recommended.
  2. If possible, convert the dictionary to a regular .NET dictionary and return that. Your client ought to be able to receive this.

Good luck!

Anderson Imes
  • 25,500
  • 4
  • 67
  • 82