Files
TEngine/Assets/GameScripts/ThirdParty/Protobuf-net/ServiceModel/ProtoBehaviorExtensionElement.cs
ALEXTANG 0c8f3a5f92 [+] TEngineServer
[+] TEngineServer
2023-07-13 17:17:26 +08:00

29 lines
1.0 KiB
C#

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