You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
34 lines
1.4 KiB
34 lines
1.4 KiB
#if FEAT_SERVICEMODEL && PLAT_XMLSERIALIZER |
|
using System; |
|
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, System.ServiceModel.Channels.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 |