#if FEAT_SERVICEMODEL && PLAT_XMLSERIALIZER && FEAT_SERVICECONFIGMODEL 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 => typeof(ProtoEndpointBehavior); /// /// Creates a behavior extension based on the current configuration settings. /// /// The behavior extension. protected override object CreateBehavior() => new ProtoEndpointBehavior(); } } #endif