IsContractDeclared() 정적인 개인적인 메소드

static private IsContractDeclared ( System.Runtime.Serialization.DataContract contract, System.Runtime.Serialization.DataContract declaredContract ) : bool
contract System.Runtime.Serialization.DataContract
declaredContract System.Runtime.Serialization.DataContract
리턴 bool
 protected virtual bool WriteTypeInfo(XmlWriterDelegator writer, DataContract contract, DataContract declaredContract)
 {
     if (!XmlObjectSerializer.IsContractDeclared(contract, declaredContract))
     {
         if (base.DataContractResolver == null)
         {
             this.WriteTypeInfo(writer, contract.Name, contract.Namespace);
             return(true);
         }
         this.WriteResolvedTypeInfo(writer, contract.OriginalUnderlyingType, declaredContract.OriginalUnderlyingType);
     }
     return(false);
 }
예제 #2
0
        protected virtual bool WriteTypeInfo(XmlWriterDelegator writer, DataContract contract, DataContract declaredContract)
        {
            if (XmlObjectSerializer.IsContractDeclared(contract, declaredContract))
            {
                return(false);
            }
            bool hasResolver = DataContractResolver != null;

            if (hasResolver)
            {
                WriteResolvedTypeInfo(writer, contract.UnderlyingType, declaredContract.UnderlyingType);
            }
            else
            {
                WriteTypeInfo(writer, contract.Name, contract.Namespace);
            }
            return(hasResolver);
        }