mirror of
https://github.com/Alex-Rachel/TEngine.git
synced 2025-08-14 16:51:28 +00:00
[+] TEngineServer
[+] TEngineServer
This commit is contained in:
35
Assets/GameScripts/ThirdParty/Protobuf-net/ServiceModel/ProtoBehaviorAttribute.cs
vendored
Normal file
35
Assets/GameScripts/ThirdParty/Protobuf-net/ServiceModel/ProtoBehaviorAttribute.cs
vendored
Normal file
@@ -0,0 +1,35 @@
|
||||
#if FEAT_SERVICEMODEL && PLAT_XMLSERIALIZER
|
||||
using System;
|
||||
using System.ServiceModel.Channels;
|
||||
using System.ServiceModel.Description;
|
||||
using System.ServiceModel.Dispatcher;
|
||||
|
||||
namespace ProtoBuf.ServiceModel
|
||||
{
|
||||
/// <summary>
|
||||
/// Uses protocol buffer serialization on the specified operation; note that this
|
||||
/// must be enabled on both the client and server.
|
||||
/// </summary>
|
||||
[AttributeUsage(AttributeTargets.Method, AllowMultiple = false)]
|
||||
public sealed class ProtoBehaviorAttribute : Attribute, IOperationBehavior
|
||||
{
|
||||
void IOperationBehavior.AddBindingParameters(OperationDescription operationDescription, BindingParameterCollection bindingParameters)
|
||||
{ }
|
||||
|
||||
void IOperationBehavior.ApplyClientBehavior(OperationDescription operationDescription, ClientOperation clientOperation)
|
||||
{
|
||||
IOperationBehavior innerBehavior = new ProtoOperationBehavior(operationDescription);
|
||||
innerBehavior.ApplyClientBehavior(operationDescription, clientOperation);
|
||||
}
|
||||
|
||||
void IOperationBehavior.ApplyDispatchBehavior(OperationDescription operationDescription, DispatchOperation dispatchOperation)
|
||||
{
|
||||
IOperationBehavior innerBehavior = new ProtoOperationBehavior(operationDescription);
|
||||
innerBehavior.ApplyDispatchBehavior(operationDescription, dispatchOperation);
|
||||
}
|
||||
|
||||
void IOperationBehavior.Validate(OperationDescription operationDescription)
|
||||
{ }
|
||||
}
|
||||
}
|
||||
#endif
|
Reference in New Issue
Block a user