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

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

                ProtoOperationBehavior newBehavior = new ProtoOperationBehavior(description)
                {
                    MaxItemsInObjectGraph = dcsOperationBehavior.MaxItemsInObjectGraph
                };
                description.Behaviors.Add(newBehavior);
            }
        }
        void IOperationBehavior.ApplyDispatchBehavior(OperationDescription operationDescription, DispatchOperation dispatchOperation)
        {
            IOperationBehavior innerBehavior = new ProtoOperationBehavior(operationDescription);

            innerBehavior.ApplyDispatchBehavior(operationDescription, dispatchOperation);
        }
        void IOperationBehavior.ApplyClientBehavior(OperationDescription operationDescription, ClientOperation clientOperation)
        {
            IOperationBehavior innerBehavior = new ProtoOperationBehavior(operationDescription);

            innerBehavior.ApplyClientBehavior(operationDescription, clientOperation);
        }