private static void ReplaceDataContractSerializerOperationBehavior(OperationDescription description)
        {
            DataContractSerializerOperationBehavior dcsOperationBehavior = description.Behaviors.Find <DataContractSerializerOperationBehavior>();

            if (dcsOperationBehavior != null)
            {
                description.Behaviors.Remove(dcsOperationBehavior);

                ProtoOperationBehavior newBehavior = new ProtoOperationBehavior(description);
                newBehavior.MaxItemsInObjectGraph = dcsOperationBehavior.MaxItemsInObjectGraph;
                description.Behaviors.Add(newBehavior);
            }
        }
Пример #2
0
        void IOperationBehavior.ApplyDispatchBehavior(OperationDescription operationDescription, DispatchOperation dispatchOperation)
        {
            IOperationBehavior innerBehavior = new ProtoOperationBehavior(operationDescription);

            innerBehavior.ApplyDispatchBehavior(operationDescription, dispatchOperation);
        }
Пример #3
0
        void IOperationBehavior.ApplyClientBehavior(OperationDescription operationDescription, ClientOperation clientOperation)
        {
            IOperationBehavior innerBehavior = new ProtoOperationBehavior(operationDescription);

            innerBehavior.ApplyClientBehavior(operationDescription, clientOperation);
        }