Binding elements can be made “configurable” by using the BindingElementExtensionElement class (similar to the BehaviorExtensionElement class covered in a previous post). Bindings take a little more work, since we need two extension classes, one for the binding “section” (StandardBindingCollectionElement<TStandardBinding, TBindingConfiguration>) for the new binding type, and one for each specific binding “instance” (StandardBindingElement). The next sections will have more details about these classes.
Public implementations in WCFThose are the public binding element extensions – those which can be used inside custom binding declarations in configuration. I’ll divide them in sections for the channel types which those binding elements create. Encoders:
QR:
Public implementations in WCFThose are the public binding element extensions – those which can be used inside custom binding declarations in configuration. I’ll divide them in sections for the channel types which those binding elements create. Encoders:
- BinaryMessageEncodingElement (<binaryMessageEncoding>): Adds a BinaryMessageEncodingBindingElement to the custom binding, defining that the communication will be encoded via the .NET Binary Format.
- ByteStreamMessageEncodingElement (<byteStreamMessageEncoding>, new in 4.0): Adds a ByteStreamMessageEncodingBindingElement to the custom binding, defining the message encoding as a stream of bytes. Useful for services which need access to the raw transport payload.
- MtomMessageEncodingElement (<mtomMessageEncoding>): Adds a MtomMessageEncodingBindingElement to the custom binding, defining the message encoding to be the Message Transmission Optimization Mechanism (MTOM).
- TextMessageEncodingElement (<textMessageEncoding>): Adds a TextMessageEncodingBindingElement to the custom binding, defining that the communication will be encoded via “normal” XML.
- WebMessageEncodingElement (webMessageEncoding, new in 3.5): Adds a WebMessageEncodingBindingElement to the custom binding. Since this is a “composite” encoder, the communication can be made via XML, JSON or the Raw mode.
- PeerTransportElement (<peerTransport>): Adds a PeerTransportBindingElement to the custom binding. Used for peer-to-peer communication.
- NamedPipeTransportElement (<namedPipeTransport>): Adds a NamedPipeTransportBindingElement to the custom binding. Used for same-machine communication.
- TcpTransportElement (<tcpTransport>): Adds a TcpTransportBindingElement to the custom binding. Defines the communication to go over TCP according to the .NET Message Framing rules.
- HttpTransportElement (<httpTransport>): Adds a HttpTransportBindingElement to the custom binding. Defines that the communication will happen over unencrypted HTTP.
- HttpsTransportElement (<httpsTransport>): Adds a HttpsTransportBindingElement to the custom binding. Defines that the communication will happen over HTTPS (HTTP over SSL).
- MsmqIntegrationElement (<msmqIntegration>): Adds a http://msdn.microsoft.com/en-us/library/system.servicemodel.msmqintegration.m...">MsmqIntegrationBindingElement to the custom binding. Defines that the communication will happen through MSMQ using one of the legacy protocols, such as COM, MSMQ native APIs or the System.Messaging APIs.
- MsmqTransportElement (<msmqTransport>): Adds a MsmqTransportBindingElement to the custom binding. Defines that the communication will happen through MSMQ using the native Message Queueing (MSMQ) protocol.
QR:
0 comments:
Post a Comment