internal static NetDataContractSerializerOperationBehavior ApplyTo(OperationDescription operation)
 {
     NetDataContractSerializerOperationBehavior item = null;
     DataContractSerializerOperationBehavior behavior2 = operation.Behaviors.Find<DataContractSerializerOperationBehavior>();
     if (behavior2 != null)
     {
         item = new NetDataContractSerializerOperationBehavior(operation);
         operation.Behaviors.Remove(behavior2);
         operation.Behaviors.Add(item);
         return item;
     }
     return null;
 }
예제 #2
0
        internal static NetDataContractSerializerOperationBehavior ApplyTo(OperationDescription operation)
        {
            NetDataContractSerializerOperationBehavior item      = null;
            DataContractSerializerOperationBehavior    behavior2 = operation.Behaviors.Find <DataContractSerializerOperationBehavior>();

            if (behavior2 != null)
            {
                item = new NetDataContractSerializerOperationBehavior(operation);
                operation.Behaviors.Remove(behavior2);
                operation.Behaviors.Add(item);
                return(item);
            }
            return(null);
        }
        internal static NetDataContractSerializerOperationBehavior ApplyTo(OperationDescription operation)
        {
            NetDataContractSerializerOperationBehavior netDataContractSerializerOperationBehavior = null;
            DataContractSerializerOperationBehavior dataContractSerializerOperationBehavior = operation.Behaviors.Find<DataContractSerializerOperationBehavior>();

            if (dataContractSerializerOperationBehavior != null)
            {
                netDataContractSerializerOperationBehavior = new NetDataContractSerializerOperationBehavior(operation);
                operation.Behaviors.Remove(dataContractSerializerOperationBehavior);
                operation.Behaviors.Add(netDataContractSerializerOperationBehavior);

                return netDataContractSerializerOperationBehavior;
            }

            return null;
        }
        internal static NetDataContractSerializerOperationBehavior ApplyTo(OperationDescription operation)
        {
            NetDataContractSerializerOperationBehavior netDataContractSerializerOperationBehavior = null;
            DataContractSerializerOperationBehavior    dataContractSerializerOperationBehavior    = operation.Behaviors.Find <DataContractSerializerOperationBehavior>();

            if (dataContractSerializerOperationBehavior != null)
            {
                netDataContractSerializerOperationBehavior = new NetDataContractSerializerOperationBehavior(operation);
                operation.Behaviors.Remove(dataContractSerializerOperationBehavior);
                operation.Behaviors.Add(netDataContractSerializerOperationBehavior);

                return(netDataContractSerializerOperationBehavior);
            }

            return(null);
        }