コード例 #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);
                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);
        }