views:

165

answers:

1

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?

+2  A: 

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
+1 for the comment about it not being service oriented.
RichardOD