﻿// Decompiled with JetBrains decompiler
// Type: System.Xml.XmlCharCheckingReaderWithNS
// Assembly: System.Xml, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
// MVID: 50ABAB51-7DC3-4F0A-A797-0D0C2D124D60
// Assembly location: C:\Windows\Microsoft.NET\Framework\v4.0.30319\System.Xml.dll

using System.Collections.Generic;
using System.Runtime;

namespace System.Xml
{
  internal class XmlCharCheckingReaderWithNS : XmlCharCheckingReader, IXmlNamespaceResolver
  {
    internal IXmlNamespaceResolver readerAsNSResolver;

    [TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")]
    internal XmlCharCheckingReaderWithNS(XmlReader reader, IXmlNamespaceResolver readerAsNSResolver, bool checkCharacters, bool ignoreWhitespace, bool ignoreComments, bool ignorePis, DtdProcessing dtdProcessing)
      : base(reader, checkCharacters, ignoreWhitespace, ignoreComments, ignorePis, dtdProcessing)
    {
      this.readerAsNSResolver = readerAsNSResolver;
    }

    IDictionary<string, string> IXmlNamespaceResolver.GetNamespacesInScope(XmlNamespaceScope scope)
    {
      return this.readerAsNSResolver.GetNamespacesInScope(scope);
    }

    string IXmlNamespaceResolver.LookupNamespace(string prefix)
    {
      return this.readerAsNSResolver.LookupNamespace(prefix);
    }

    string IXmlNamespaceResolver.LookupPrefix(string namespaceName)
    {
      return this.readerAsNSResolver.LookupPrefix(namespaceName);
    }
  }
}
