From fbaac1095a58415aec23e708bead08124afe8a2d Mon Sep 17 00:00:00 2001 From: sornaks Date: Thu, 16 Oct 2014 15:30:33 -0700 Subject: [PATCH] Reacting to XmlDictionaryQuotas change from the fundamentals team. --- .../Formatters/FormattingUtilities.cs | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/src/Microsoft.AspNet.Mvc.Core/Formatters/FormattingUtilities.cs b/src/Microsoft.AspNet.Mvc.Core/Formatters/FormattingUtilities.cs index a1310a9425..b799d39343 100644 --- a/src/Microsoft.AspNet.Mvc.Core/Formatters/FormattingUtilities.cs +++ b/src/Microsoft.AspNet.Mvc.Core/Formatters/FormattingUtilities.cs @@ -1,7 +1,6 @@ // Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. -using System; using System.Runtime.Serialization; using System.Xml; @@ -24,18 +23,14 @@ namespace Microsoft.AspNet.Mvc /// XmlReaderQuotas with default values public static XmlDictionaryReaderQuotas GetDefaultXmlReaderQuotas() { -#if ASPNET50 return new XmlDictionaryReaderQuotas() { - MaxArrayLength = Int32.MaxValue, - MaxBytesPerRead = Int32.MaxValue, + MaxArrayLength = int.MaxValue, + MaxBytesPerRead = int.MaxValue, MaxDepth = DefaultMaxDepth, - MaxNameTableCharCount = Int32.MaxValue, - MaxStringContentLength = Int32.MaxValue + MaxNameTableCharCount = int.MaxValue, + MaxStringContentLength = int.MaxValue }; -#else - return XmlDictionaryReaderQuotas.Max; -#endif } } }