internal void InitializeReaderQuotas(XmlDictionaryReaderQuotas readerQuotas)
        {
            if (readerQuotas == null)
            {
                throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull("readerQuotas");
            }
            XmlDictionaryReaderQuotasElement thisQuotas = this.ReaderQuotas;

            // Can't call thisQuotas.InitializeFrom() because it's internal to System.ServiceModel.dll, so we duplicate the logic
            if (readerQuotas.MaxDepth != EncoderDefaults.MaxDepth && readerQuotas.MaxDepth != 0)
            {
                thisQuotas.MaxDepth = readerQuotas.MaxDepth;
            }
            if (readerQuotas.MaxStringContentLength != EncoderDefaults.MaxStringContentLength && readerQuotas.MaxStringContentLength != 0)
            {
                thisQuotas.MaxStringContentLength = readerQuotas.MaxStringContentLength;
            }
            if (readerQuotas.MaxArrayLength != EncoderDefaults.MaxArrayLength && readerQuotas.MaxArrayLength != 0)
            {
                thisQuotas.MaxArrayLength = readerQuotas.MaxArrayLength;
            }
            if (readerQuotas.MaxBytesPerRead != EncoderDefaults.MaxBytesPerRead && readerQuotas.MaxBytesPerRead != 0)
            {
                thisQuotas.MaxBytesPerRead = readerQuotas.MaxBytesPerRead;
            }
            if (readerQuotas.MaxNameTableCharCount != EncoderDefaults.MaxNameTableCharCount && readerQuotas.MaxNameTableCharCount != 0)
            {
                thisQuotas.MaxNameTableCharCount = readerQuotas.MaxNameTableCharCount;
            }
        }
示例#2
0
 internal void ApplyConfiguration(XmlDictionaryReaderQuotasElement currentQuotas, XmlDictionaryReaderQuotas readerQuotas)
 {
     if (readerQuotas == null)
     {
         throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull("readerQuotas");
     }
     if (currentQuotas.MaxDepth != 0)
     {
         readerQuotas.MaxDepth = currentQuotas.MaxDepth;
     }
     if (currentQuotas.MaxStringContentLength != 0)
     {
         readerQuotas.MaxStringContentLength = currentQuotas.MaxStringContentLength;
     }
     if (currentQuotas.MaxArrayLength != 0)
     {
         readerQuotas.MaxArrayLength = currentQuotas.MaxArrayLength;
     }
     if (currentQuotas.MaxBytesPerRead != 0)
     {
         readerQuotas.MaxBytesPerRead = currentQuotas.MaxBytesPerRead;
     }
     if (currentQuotas.MaxNameTableCharCount != 0)
     {
         readerQuotas.MaxNameTableCharCount = currentQuotas.MaxNameTableCharCount;
     }
 }
        void ApplyConfiguration(XmlDictionaryReaderQuotas readerQuotas)
        {
            if (readerQuotas == null)
            {
                throw FxTrace.Exception.ArgumentNull("readerQuotas");
            }

            XmlDictionaryReaderQuotasElement oldQuotas = this.ReaderQuotas;

            if (oldQuotas.MaxDepth != 0)
            {
                readerQuotas.MaxDepth = oldQuotas.MaxDepth;
            }
            if (oldQuotas.MaxStringContentLength != 0)
            {
                readerQuotas.MaxStringContentLength = oldQuotas.MaxStringContentLength;
            }
            if (oldQuotas.MaxArrayLength != 0)
            {
                readerQuotas.MaxArrayLength = oldQuotas.MaxArrayLength;
            }
            if (oldQuotas.MaxBytesPerRead != 0)
            {
                readerQuotas.MaxBytesPerRead = oldQuotas.MaxBytesPerRead;
            }
            if (oldQuotas.MaxNameTableCharCount != 0)
            {
                readerQuotas.MaxNameTableCharCount = oldQuotas.MaxNameTableCharCount;
            }
        }
示例#4
0
 public static void CopyFrom(this XmlDictionaryReaderQuotasElement e, XmlDictionaryReaderQuotasElement o)
 {
     e.MaxArrayLength         = o.MaxArrayLength;
     e.MaxBytesPerRead        = o.MaxBytesPerRead;
     e.MaxDepth               = o.MaxDepth;
     e.MaxNameTableCharCount  = o.MaxNameTableCharCount;
     e.MaxStringContentLength = o.MaxStringContentLength;
 }
示例#5
0
 public static void ApplyConfiguration(this XmlDictionaryReaderQuotasElement e, XmlDictionaryReaderQuotas q)
 {
     q.MaxArrayLength         = e.MaxArrayLength;
     q.MaxBytesPerRead        = e.MaxBytesPerRead;
     q.MaxDepth               = e.MaxDepth;
     q.MaxNameTableCharCount  = e.MaxNameTableCharCount;
     q.MaxStringContentLength = e.MaxStringContentLength;
 }
        void CopyFrom(XmlDictionaryReaderQuotasElement readerQuotas)
        {
            XmlDictionaryReaderQuotasElement thisQuotas = this.ReaderQuotas;

            thisQuotas.MaxDepth = readerQuotas.MaxDepth;
            thisQuotas.MaxStringContentLength = readerQuotas.MaxStringContentLength;
            thisQuotas.MaxArrayLength         = readerQuotas.MaxArrayLength;
            thisQuotas.MaxBytesPerRead        = readerQuotas.MaxBytesPerRead;
            thisQuotas.MaxNameTableCharCount  = readerQuotas.MaxNameTableCharCount;
        }
示例#7
0
 internal void CopyFrom(XmlDictionaryReaderQuotasElement q)
 {
     if (q.MaxArrayLength > 0)
     {
         MaxArrayLength = q.MaxArrayLength;
     }
     if (q.MaxBytesPerRead > 0)
     {
         MaxBytesPerRead = q.MaxBytesPerRead;
     }
     if (q.MaxDepth > 0)
     {
         MaxDepth = q.MaxDepth;
     }
     if (q.MaxNameTableCharCount > 0)
     {
         MaxNameTableCharCount = q.MaxNameTableCharCount;
     }
     if (q.MaxStringContentLength > 0)
     {
         MaxStringContentLength = q.MaxStringContentLength;
     }
 }
示例#8
0
 internal void ApplyConfiguration(XmlDictionaryReaderQuotasElement q)
 {
     if (MaxArrayLength > 0)
     {
         q.MaxArrayLength = MaxArrayLength;
     }
     if (MaxBytesPerRead > 0)
     {
         q.MaxBytesPerRead = MaxBytesPerRead;
     }
     if (MaxDepth > 0)
     {
         q.MaxDepth = MaxDepth;
     }
     if (MaxNameTableCharCount > 0)
     {
         q.MaxNameTableCharCount = MaxNameTableCharCount;
     }
     if (MaxStringContentLength > 0)
     {
         q.MaxStringContentLength = MaxStringContentLength;
     }
 }
 internal void ApplyConfiguration(XmlDictionaryReaderQuotasElement currentQuotas, XmlDictionaryReaderQuotas readerQuotas)
 {
     if (readerQuotas == null)
     {
         throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull("readerQuotas");
     }
     if (currentQuotas.MaxDepth != 0)
     {
         readerQuotas.MaxDepth = currentQuotas.MaxDepth;
     }
     if (currentQuotas.MaxStringContentLength != 0)
     {
         readerQuotas.MaxStringContentLength = currentQuotas.MaxStringContentLength;
     }
     if (currentQuotas.MaxArrayLength != 0)
     {
         readerQuotas.MaxArrayLength = currentQuotas.MaxArrayLength;
     }
     if (currentQuotas.MaxBytesPerRead != 0)
     {
         readerQuotas.MaxBytesPerRead = currentQuotas.MaxBytesPerRead;
     }
     if (currentQuotas.MaxNameTableCharCount != 0)
     {
         readerQuotas.MaxNameTableCharCount = currentQuotas.MaxNameTableCharCount;
     }
 }
 internal static void ApplyReaderQuotasConfiguration(XmlDictionaryReaderQuotas webBindingReaderQuotas, XmlDictionaryReaderQuotasElement elementReaderQuotas)
 {
     if (webBindingReaderQuotas == null)
     {
         throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull("webBindingReaderQuotas");
     }
     if (elementReaderQuotas.MaxDepth != 0)
     {
         webBindingReaderQuotas.MaxDepth = elementReaderQuotas.MaxDepth;
     }
     if (elementReaderQuotas.MaxStringContentLength != 0)
     {
         webBindingReaderQuotas.MaxStringContentLength = elementReaderQuotas.MaxStringContentLength;
     }
     if (elementReaderQuotas.MaxArrayLength != 0)
     {
         webBindingReaderQuotas.MaxArrayLength = elementReaderQuotas.MaxArrayLength;
     }
     if (elementReaderQuotas.MaxBytesPerRead != 0)
     {
         webBindingReaderQuotas.MaxBytesPerRead = elementReaderQuotas.MaxBytesPerRead;
     }
     if (elementReaderQuotas.MaxNameTableCharCount != 0)
     {
         webBindingReaderQuotas.MaxNameTableCharCount = elementReaderQuotas.MaxNameTableCharCount;
     }
 }
        void CopyFrom(XmlDictionaryReaderQuotasElement readerQuotas)
        {
            XmlDictionaryReaderQuotasElement thisQuotas = this.ReaderQuotas;

            thisQuotas.MaxDepth = readerQuotas.MaxDepth;
            thisQuotas.MaxStringContentLength = readerQuotas.MaxStringContentLength;
            thisQuotas.MaxArrayLength = readerQuotas.MaxArrayLength;
            thisQuotas.MaxBytesPerRead = readerQuotas.MaxBytesPerRead;
            thisQuotas.MaxNameTableCharCount = readerQuotas.MaxNameTableCharCount;
        }
示例#12
0
		public static void CopyFrom (this XmlDictionaryReaderQuotasElement e, XmlDictionaryReaderQuotasElement o)
		{
			e.MaxArrayLength = o.MaxArrayLength;
			e.MaxBytesPerRead = o.MaxBytesPerRead;
			e.MaxDepth = o.MaxDepth;
			e.MaxNameTableCharCount = o.MaxNameTableCharCount;
			e.MaxStringContentLength = o.MaxStringContentLength;
		}
示例#13
0
 internal static void ApplyReaderQuotasConfiguration(XmlDictionaryReaderQuotas webBindingReaderQuotas, XmlDictionaryReaderQuotasElement elementReaderQuotas)
 {
     if (webBindingReaderQuotas == null)
     {
         throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull("webBindingReaderQuotas");
     }
     if (elementReaderQuotas.MaxDepth != 0)
     {
         webBindingReaderQuotas.MaxDepth = elementReaderQuotas.MaxDepth;
     }
     if (elementReaderQuotas.MaxStringContentLength != 0)
     {
         webBindingReaderQuotas.MaxStringContentLength = elementReaderQuotas.MaxStringContentLength;
     }
     if (elementReaderQuotas.MaxArrayLength != 0)
     {
         webBindingReaderQuotas.MaxArrayLength = elementReaderQuotas.MaxArrayLength;
     }
     if (elementReaderQuotas.MaxBytesPerRead != 0)
     {
         webBindingReaderQuotas.MaxBytesPerRead = elementReaderQuotas.MaxBytesPerRead;
     }
     if (elementReaderQuotas.MaxNameTableCharCount != 0)
     {
         webBindingReaderQuotas.MaxNameTableCharCount = elementReaderQuotas.MaxNameTableCharCount;
     }
 }
		internal void CopyFrom (XmlDictionaryReaderQuotasElement q)
		{
			if (q.MaxArrayLength > 0)
				MaxArrayLength = q.MaxArrayLength;
			if (q.MaxBytesPerRead > 0)
				MaxBytesPerRead = q.MaxBytesPerRead;
			if (q.MaxDepth > 0)
				MaxDepth = q.MaxDepth;
			if (q.MaxNameTableCharCount > 0)
				MaxNameTableCharCount = q.MaxNameTableCharCount;
			if (q.MaxStringContentLength > 0)
				MaxStringContentLength = q.MaxStringContentLength;
		}
		internal void ApplyConfiguration (XmlDictionaryReaderQuotasElement q)
		{
			if (MaxArrayLength > 0)
				q.MaxArrayLength = MaxArrayLength;
			if (MaxBytesPerRead > 0)
				q.MaxBytesPerRead = MaxBytesPerRead;
			if (MaxDepth > 0)
				q.MaxDepth = MaxDepth;
			if (MaxNameTableCharCount > 0)
				q.MaxNameTableCharCount = MaxNameTableCharCount;
			if (MaxStringContentLength > 0)
				q.MaxStringContentLength = MaxStringContentLength;
		}