The WCF MessageEncoder Decoded 3
Class Requirements
Like Channels and other classes in WCF, when you build a MessageEncoder you also build an accompanying MessageEncodingBindingElement and MessageEncoderFactory. Also, as with other WCF classes, the binding class handles configuration and the factory class handles creation. Following is the class declaration for TestEncoderFactory.
public class TestEncoderFactory : MessageEncoderFactory
{
Following is the class declaration for TestEncoderBinding.
public class TestEncoderBindingElement :
MessageEncodingBindingElement
{
As stated earlier, normally the MessageEncoder resides inside the Transport Channel. My WCF Channels and Binding article illustrates how to incorporate a MessageEncoder in the binding and use a MessageEncoder inside a Transport Channel. Typically, the MessageEncoder is created by using the following function calls and properties.
(more…)
