#if FEAT_SERVICEMODEL && PLAT_XMLSERIALIZER using System; using System.ServiceModel.Configuration; namespace ProtoBuf.ServiceModel { /// /// Configuration element to swap out DatatContractSerilaizer with the XmlProtoSerializer for a given endpoint. /// /// public class ProtoBehaviorExtension : BehaviorExtensionElement { /// /// Creates a new ProtoBehaviorExtension instance. /// public ProtoBehaviorExtension() { } /// /// Gets the type of behavior. /// public override Type BehaviorType { get { return typeof(ProtoEndpointBehavior); } } /// /// Creates a behavior extension based on the current configuration settings. /// /// The behavior extension. protected override object CreateBehavior() { return new ProtoEndpointBehavior(); } } } #endif