private XmlDictionaryReaderQuotas(int maxDepth, int maxStringContentLength, int maxArrayLength, int maxBytesPerRead, int maxNameTableCharCount, XmlDictionaryReaderQuotaTypes modifiedQuotas) { _maxDepth = maxDepth; _maxStringContentLength = maxStringContentLength; _maxArrayLength = maxArrayLength; _maxBytesPerRead = maxBytesPerRead; _maxNameTableCharCount = maxNameTableCharCount; _modifiedQuotas = modifiedQuotas; MakeReadOnly(); }
private static bool IsDefaultQuota(XmlDictionaryReaderQuotas quotas, XmlDictionaryReaderQuotaTypes quotaType) { switch (quotaType) { case XmlDictionaryReaderQuotaTypes.MaxDepth: case XmlDictionaryReaderQuotaTypes.MaxStringContentLength: case XmlDictionaryReaderQuotaTypes.MaxArrayLength: case XmlDictionaryReaderQuotaTypes.MaxBytesPerRead: case XmlDictionaryReaderQuotaTypes.MaxNameTableCharCount: return((quotas.ModifiedQuotas & quotaType) == 0x00); } Fx.Assert("invalid quota type."); return(false); }
private static bool IsDefaultQuota(XmlDictionaryReaderQuotas quotas, XmlDictionaryReaderQuotaTypes quotaType) { switch (quotaType) { case XmlDictionaryReaderQuotaTypes.MaxDepth: case XmlDictionaryReaderQuotaTypes.MaxStringContentLength: case XmlDictionaryReaderQuotaTypes.MaxArrayLength: case XmlDictionaryReaderQuotaTypes.MaxBytesPerRead: case XmlDictionaryReaderQuotaTypes.MaxNameTableCharCount: return (quotas.ModifiedQuotas & quotaType) == 0x00; } Fx.Assert("invalid quota type."); return false; }