private static XmlSerializerFormatAttribute FindAttribute(OperationDescription operation)
            {
                System.Type attrProvider = (operation.DeclaringContract != null) ? operation.DeclaringContract.ContractType : null;
                XmlSerializerFormatAttribute defaultFormatAttribute = (attrProvider != null) ? (TypeLoader.GetFormattingAttribute(attrProvider, null) as XmlSerializerFormatAttribute) : null;

                return(TypeLoader.GetFormattingAttribute(operation.OperationMethod, defaultFormatAttribute) as XmlSerializerFormatAttribute);
            }
示例#2
0
            private static XmlSerializerFormatAttribute FindAttribute(OperationDescription operation)
            {
                Type contractType = operation.DeclaringContract != null ? operation.DeclaringContract.ContractType : null;
                XmlSerializerFormatAttribute contractFormatAttribute = contractType != null?TypeLoader.GetFormattingAttribute(contractType, null) as XmlSerializerFormatAttribute : null;

                return(TypeLoader.GetFormattingAttribute(operation.OperationMethod, contractFormatAttribute) as XmlSerializerFormatAttribute);
            }