WCF Custom Serialization in Silverlight

An implementation of a custom serializer hooked up to the WCF pipeline in Silverlight, working around the limitation that the DataContractSerializerOperationBehavior is not public on that platform.

C# (55.8 KB)
 
 
 
 
 
(0)
1,971 times
Add to favorites
5/24/2011
E-mail Twitter del.icio.us Digg Facebook
Sign in to ask a question


  • How about the code that gets generated by slsvcutil - can it be integrated with that
    2 Posts | Last post June 05, 2011
    • Just wondering if there is someway to integrate with this code.  It used System.ServiceModel.ClientBase to handle ChannelFactory stuff...
      
      So how do I get that to use the serialiser?
    • To integrate it with the code generated by slsvcutil you have two choices: modify the generated code to add the behavior attribute [MyNewSerializerContractBehavior] to the [ServiceContract] interface; or you can, when creating the client, add the behavior programatically, something like
      TestClient client = new TestClient();
      client.Endpoint.Contract.Behaviors.Add(new MyNewSerializerContractBehaviorAttribute());
      // use client