<Type Name="XmlUrlResolver" FullName="System.Xml.XmlUrlResolver" FullNameSP="System_Xml_XmlUrlResolver" Maintainer="ecma">
  <TypeSignature Language="ILASM" Value=".class public XmlUrlResolver extends System.Xml.XmlResolver" />
  <TypeSignature Language="C#" Value="public class XmlUrlResolver : System.Xml.XmlResolver" />
  <MemberOfLibrary>XML</MemberOfLibrary>
  <AssemblyInfo>
    <AssemblyName>System.Xml</AssemblyName>
    <AssemblyPublicKey>[00 00 00 00 00 00 00 00 04 00 00 00 00 00 00 00 ]</AssemblyPublicKey>
    <AssemblyVersion>2.0.0.0</AssemblyVersion>
  </AssemblyInfo>
  <ThreadingSafetyStatement>All public static members of this type are safe for multithreaded operations. No instance members are guaranteed to be thread safe.</ThreadingSafetyStatement>
  <Base>
    <BaseTypeName>System.Xml.XmlResolver</BaseTypeName>
  </Base>
  <Interfaces />
  <Docs>
    <summary>
      <para> Resolves external XML resources
      named by a URI.</para>
    </summary>
    <remarks>
      <para>This class is used to resolve external XML resources such as entities, document type definitions 
      (DTDs), or schemas. It is also used to process include and import elements found in
      Extensible StyleSheet Language (XSL) stylesheets or XML Schema Definition
      language (XSD) schemas.</para>
      <para>This class implements the <see cref="T:System.Xml.XmlResolver" /> class.</para>
    </remarks>
  </Docs>
  <Members>
    <Member MemberName=".ctor">
      <MemberSignature Language="ILASM" Value="public rtspecialname specialname instance void .ctor()" />
      <MemberSignature Language="C#" Value="public XmlUrlResolver ();" />
      <MemberType>Constructor</MemberType>
      <ReturnValue />
      <Parameters />
      <Docs>
        <summary>
          <para> Constructs and initializes a new instance of 
      the <see cref="T:System.Xml.XmlUrlResolver" /> class.
      </para>
        </summary>
        <remarks>To be added.</remarks>
      </Docs>
      <Excluded>0</Excluded>
    </Member>
    <Member MemberName="Credentials">
      <MemberSignature Language="ILASM" Value=".property class System.Net.ICredentials Credentials { public hidebysig virtual specialname void set_Credentials(class System.Net.ICredentials value) }" />
      <MemberSignature Language="C#" Value="public override System.Net.ICredentials Credentials { set; };" />
      <MemberType>Property</MemberType>
      <ReturnValue>
        <ReturnType>System.Net.ICredentials</ReturnType>
      </ReturnValue>
      <Parameters />
      <Docs>
        <summary>
          <para> Sets the credentials used to authenticate Web
      requests.</para>
        </summary>
        <value>
          <para>A <see cref="T:System.Net.ICredentials" /> instance containing the credentials.</para>
        </value>
        <remarks>
          <para>This property is write-only.</para>
          <para> If the virtual directory is configured to allow
      anonymous access, credentials are not needed and this property does not need to
      be set. If credentials are needed but not supplied, the <see cref="T:System.Xml.XmlUrlResolver" /> class
      uses default credentials (<see cref="P:System.Net.CredentialCache.DefaultCredentials" qualify="true" />).
      
   </para>
          <block subset="none" type="note">
            <para>This property overrides <see cref="P:System.Xml.XmlResolver.Credentials" qualify="true" />.</para>
          </block>
        </remarks>
        <example>
          <para>The following example sets credentials for the virtual directory "http://localhost/bookstore/inventory.xml". There
      is no
      output from this example.</para>
          <code lang="C#">using System;
using System.Net;
using System.Xml;

public class App {

  public static void Main() {

    XmlTextReader xtReader =  
      new XmlTextReader("http://localhost/" +
                        "bookstore/inventory.xml");
    NetworkCredential netCredential =
      new NetworkCredential("username",
                            "password",
                            "domain");
    XmlUrlResolver xResolver = new XmlUrlResolver();
    xResolver.Credentials = netCredential;
    xtReader.XmlResolver= xResolver;
  }
}
   </code>
          <para>The following example associates different credentials
      with different URIs and adds the credentials to a credential cache. The
      credentials can then be used to check authentication for different URIs
      regardless of the original source of the XML. There is no output from this
      example.</para>
          <code lang="C#">using System;
using System.Net;
using System.Xml;

public class App {

  public static void Main() {

    XmlTextReader xtReader =  
      new XmlTextReader("http://localhost/" +
                        "bookstore/inventory.xml");
    NetworkCredential netCredential1 =
      new NetworkCredential("username1",
                            "password1",
                            "domain1");
    NetworkCredential netCredential2 =
      new NetworkCredential("username2",
                            "password2",
                            "domain2");
    CredentialCache credCache = new CredentialCache(); 
    credCache.Add( new Uri("http://www.contoso.com/"),
                  "Basic",
                   netCredential1); 
    credCache.Add( new Uri("http://app.contoso.com/"),
                  "Basic",
                   netCredential2);
    XmlUrlResolver xResolver = new XmlUrlResolver();
    xResolver.Credentials = credCache;
    xtReader.XmlResolver= xResolver;
  }
}
   </code>
        </example>
      </Docs>
      <Excluded>0</Excluded>
    </Member>
    <Member MemberName="GetEntity">
      <MemberSignature Language="ILASM" Value=".method public hidebysig virtual object GetEntity(class System.Uri absoluteUri, string role, class System.Type ofObjectToReturn)" />
      <MemberSignature Language="C#" Value="public override object GetEntity (Uri absoluteUri, string role, Type ofObjectToReturn);" />
      <MemberType>Method</MemberType>
      <ReturnValue>
        <ReturnType>System.Object</ReturnType>
      </ReturnValue>
      <Parameters>
        <Parameter Name="absoluteUri" Type="System.Uri" />
        <Parameter Name="role" Type="System.String" />
        <Parameter Name="ofObjectToReturn" Type="System.Type" />
      </Parameters>
      <Docs>
        <param name="absoluteUri">The <see cref="T:System.Uri" qualify="true" /> returned from <see cref="M:System.Xml.XmlUrlResolver.ResolveUri(System.Uri,System.String)" />.</param>
        <param name="role">This parameter is not used.</param>
        <param name="ofObjectToReturn">
          <see langword="null" /> or <see langword="typeof" />(<see cref="T:System.IO.Stream" qualify="true" />).</param>
        <summary>
          <para>Maps a URI to an object
      containing the actual resource that the URI represents.</para>
        </summary>
        <returns>
          <para> A <see cref="T:System.IO.Stream" qualify="true" /> containing the
   resource, or <see langword="null" />
   if <paramref name="ofObjectToReturn" /> is <see langword="null" />.</para>
        </returns>
        <remarks>
          <block subset="none" type="note">
            <para>This method overrides <see cref="M:System.Xml.XmlResolver.GetEntity(System.Uri,System.String,System.Type)" qualify="true" />.</para>
          </block>
        </remarks>
        <exception cref="T:System.ArgumentNullException">
          <paramref name="absoluteUri" /> is <see langword="null" />.</exception>
        <exception cref="T:System.Xml.XmlException">
          <paramref name="ofObjectToReturn" /> is not <see langword="null" /> or <see langword="typeof" />(<see cref="T:System.IO.Stream" qualify="true" />).</exception>
      </Docs>
      <Excluded>0</Excluded>
    </Member>
    <Member MemberName="ResolveUri">
      <MemberSignature Language="C#" Value="public override Uri ResolveUri (Uri baseUri, string relativeUri);" />
      <MemberType>Method</MemberType>
      <ReturnValue>
        <ReturnType>System.Uri</ReturnType>
      </ReturnValue>
      <Parameters>
        <Parameter Name="baseUri" Type="System.Uri" />
        <Parameter Name="relativeUri" Type="System.String" />
      </Parameters>
      <Docs>
        <param name="baseUri">To be added.</param>
        <param name="relativeUri">To be added.</param>
        <summary>To be added.</summary>
        <returns>To be added.</returns>
        <remarks>To be added.</remarks>
        <since version=".NET 2.0" />
      </Docs>
    </Member>
  </Members>
  <TypeExcluded>0</TypeExcluded>
</Type>
