<Type Name="CredentialCache" FullName="System.Net.CredentialCache" FullNameSP="System_Net_CredentialCache" Maintainer="ecma">
  <TypeSignature Language="ILASM" Value=".class public CredentialCache extends System.Object implements System.Net.ICredentials, System.Collections.IEnumerable" />
  <TypeSignature Language="C#" Value="public class CredentialCache : ICredentials, IEnumerable" />
  <MemberOfLibrary>Networking</MemberOfLibrary>
  <AssemblyInfo>
    <AssemblyName>System</AssemblyName>
    <AssemblyPublicKey>[00 00 00 00 00 00 00 00 04 00 00 00 00 00 00 00 ]</AssemblyPublicKey>
    <AssemblyVersion>1.0.x.x</AssemblyVersion>
    <AssemblyCulture>none</AssemblyCulture>
    <Attributes>
      <Attribute>
        <AttributeName>CLSCompliantAttribute(true)</AttributeName>
        <Excluded>0</Excluded>
      </Attribute>
    </Attributes>
  </AssemblyInfo>
  <ThreadingSafetyStatement>All public static members of this type are safe for multithreaded operations. No instance members are guaranteed to be thread safe.</ThreadingSafetyStatement>
  <Docs>
    <summary>
      <para>Provides storage for multiple credentials.</para>
    </summary>
    <remarks>
      <para>The <see cref="T:System.Net.CredentialCache" /> class stores credentials for multiple
   Internet resources. Applications that need to access multiple resources can
   store the credentials for those resources in a <see cref="T:System.Net.CredentialCache" /> instance that then provides the proper set of credentials
   for a given resource when required. When the
<see cref="M:System.Net.CredentialCache.GetCredential(System.Uri,System.String)" />
method is called, it compares the URI and authentication type provided
with those stored in the cache, and returns the first set of credentials that
match.</para>
    </remarks>
  </Docs>
  <Base>
    <BaseTypeName>System.Object</BaseTypeName>
  </Base>
  <Interfaces>
    <Interface>
      <InterfaceName>System.Net.ICredentials</InterfaceName>
      <Excluded>0</Excluded>
    </Interface>
    <Interface>
      <InterfaceName>System.Collections.IEnumerable</InterfaceName>
      <Excluded>0</Excluded>
    </Interface>
  </Interfaces>
  <Members>
    <Member MemberName="GetEnumerator">
      <MemberSignature Language="ILASM" Value=".method public final hidebysig virtual class System.Collections.IEnumerator GetEnumerator()" />
      <MemberSignature Language="C#" Value="public IEnumerator GetEnumerator();" />
      <MemberType>Method</MemberType>
      <ReturnValue>
        <ReturnType>System.Collections.IEnumerator</ReturnType>
      </ReturnValue>
      <Parameters />
      <Docs>
        <summary>
          <para>Returns an enumerator that iterates through credentials stored in the current
   <see cref="T:System.Net.CredentialCache" /> instance.</para>
        </summary>
        <returns>
          <para> A <see cref="T:System.Collections.IEnumerator" /> for the current <see cref="T:System.Net.CredentialCache" /> instance.</para>
        </returns>
      </Docs>
      <Excluded>0</Excluded>
    </Member>
    <Member MemberName="GetCredential">
      <MemberSignature Language="ILASM" Value=".method public final hidebysig virtual class System.Net.NetworkCredential GetCredential(class System.Uri uriPrefix, string authType)" />
      <MemberSignature Language="C#" Value="public NetworkCredential GetCredential(Uri uriPrefix, string authType);" />
      <MemberType>Method</MemberType>
      <ReturnValue>
        <ReturnType>System.Net.NetworkCredential</ReturnType>
      </ReturnValue>
      <Parameters>
		<Parameter Name="uriPrefix" Type="System.Uri" />
		<Parameter Name="authType" Type="System.String" />
	</Parameters>
      <Docs>
        <summary>
          <para>Returns the <see cref="T:System.Net.NetworkCredential" />
instance associated with a URI and
authentication type.</para>
        </summary>
        <param name="uriPrefix">A <see cref="T:System.Uri" /> that contains the URI prefix of resources for which the client will be authenticated.</param>
        <param name="authType">A <see cref="T:System.String" /> containing the authentication type used by the resource named in <paramref name="uriPrefix" /> . This string is required to be identical to the <see cref="P:System.Net.IAuthenticationModule.AuthenticationType" /> of the authentication module that uses the credential.</param>
        <returns>
          <para>A <see cref="T:System.Net.NetworkCredential" />, or <see langword="null" /> if there is no
   matching credential in the cache.</para>
        </returns>
        <exception cref="T:System.ArgumentNullException">The <paramref name="uriPrefix" /> or <paramref name="authType" /> parameter is <see langword="null" />.</exception>
        <remarks>
          <para>This method searches the <see cref="T:System.Net.CredentialCache" /> and
   returns the <see cref="T:System.Net.NetworkCredential" />
   instance for the specified URI prefix
   and authentication type. This method uses the longest matching URI prefix in the cache
   to determine which credentials to return for an authentication
   type. </para>
          <block subset="none" type="note">
            <para>The following table shows the matches
      for a set of URI prefixes (assuming the URI prefixes are all cached for the
      specified authentication type). </para>
            <list type="table">
              <listheader>
                <term>URI Prefix</term>
                <description>Matches</description>
              </listheader>
              <item>
                <term> http://www.contoso.com/portal/news.htm</term>
                <description>Matches only requests for
            http://www.contoso.com/portal/news.htm.</description>
              </item>
              <item>
                <term> http://www.contoso.com/portal/</term>
                <description>Matches requests for all resources in the portal
            path, except for requests for the http://www.contoso.com/portal/news.htm
            page.</description>
              </item>
              <item>
                <term> http://www.contoso.com/</term>
                <description>Matches requests for all resources at www.contoso.com, except
            those in the portal
            path.</description>
              </item>
            </list>
          </block>
        </remarks>
      </Docs>
      <Excluded>0</Excluded>
    </Member>
    <Member MemberName="Add">
      <MemberSignature Language="ILASM" Value=".method public hidebysig instance void Add(class System.Uri uriPrefix, string authType, class System.Net.NetworkCredential cred)" />
      <MemberSignature Language="C#" Value="public void Add(Uri uriPrefix, string authType, NetworkCredential cred);" />
      <MemberType>Method</MemberType>
      <ReturnValue>
        <ReturnType>System.Void</ReturnType>
      </ReturnValue>
      <Parameters>
		<Parameter Name="uriPrefix" Type="System.Uri" />
		<Parameter Name="authType" Type="System.String" />
		<Parameter Name="cred" Type="System.Net.NetworkCredential" />
	</Parameters>
      <Docs>
        <summary>
          <para>Adds a <see cref="T:System.Net.NetworkCredential" />
instance to the credential cache.</para>
        </summary>
        <param name="uriPrefix">A <see cref="T:System.Uri" /> that contains the URI prefix of resources to which <paramref name="cred" /> grants access.</param>
        <param name="authType">A <see cref="T:System.String" /> containing the authentication type used by the resource named in <paramref name="uriPrefix" /> . This string is required to be identical to the <see cref="P:System.Net.IAuthenticationModule.AuthenticationType" /> of the authentication module that uses the credential.</param>
        <param name="cred">A <see cref="T:System.Net.NetworkCredential" /> to add to the credential cache.</param>
        <exception cref="T:System.ArgumentNullException">The <paramref name="uriPrefix" /> or <paramref name="authType" /> parameter is <see langword="null" />.</exception>
        <exception cref="T:System.ArgumentException">The cache already contains a credential for the specified <paramref name="uriPrefix" /> and <paramref name="authType." /></exception>
        <remarks>
          <para>The cache stores credentials in the order in which they
      are added.</para>
          <para>
            <block subset="none" type="note">Use the <see cref="M:System.Net.CredentialCache.GetCredential(System.Uri,System.String)" />
method
to retrieve <see cref="T:System.Net.NetworkCredential" />
instances.</block>
          </para>
        </remarks>
      </Docs>
      <Excluded>0</Excluded>
    </Member>
    <Member MemberName="Remove">
      <MemberSignature Language="ILASM" Value=".method public hidebysig instance void Remove(class System.Uri uriPrefix, string authType)" />
      <MemberSignature Language="C#" Value="public void Remove(Uri uriPrefix, string authType);" />
      <MemberType>Method</MemberType>
      <ReturnValue>
        <ReturnType>System.Void</ReturnType>
      </ReturnValue>
      <Parameters>
		<Parameter Name="uriPrefix" Type="System.Uri" />
		<Parameter Name="authType" Type="System.String" />
	</Parameters>
      <Docs>
        <summary>
          <para> Deletes a <see cref="T:System.Net.NetworkCredential" />
instance from the cache.</para>
        </summary>
        <param name="uriPrefix">A <see cref="T:System.Uri" /> that specifies the resources for which the credential is used.</param>
        <param name="authType">A <see cref="T:System.String" /> containing the authentication type used by the resource named in <paramref name="uriPrefix" /> . This string is required to be identical to the <see cref="P:System.Net.IAuthenticationModule.AuthenticationType" /> of the authentication module that uses the credential.</param>
        <remarks>
          <para>The <see cref="M:System.Net.CredentialCache.Remove(System.Uri,System.String)" /> method
   locates and removes the <see cref="T:System.Net.NetworkCredential" /> instance that is cached
   for the specified URI prefix and authentication type. If there is no match found
   in the cache for the specified values, this method has no effect. The
<paramref name="uriPrefix" /> and <paramref name="authType" /> 
values are required to exactly match the values supplied at the time the
credential was added to the cache. <block subset="none" type="note">For
additional information, see <see cref="M:System.Net.CredentialCache.Add(System.Uri,System.String,System.Net.NetworkCredential)" />.</block></para>
        </remarks>
      </Docs>
      <Excluded>0</Excluded>
    </Member>
    <Member MemberName=".ctor">
      <MemberSignature Language="ILASM" Value="public rtspecialname specialname instance void .ctor()" />
      <MemberSignature Language="C#" Value="public CredentialCache();" />
      <MemberType>Constructor</MemberType>
      <ReturnValue />
      <Parameters />
      <Docs>
        <summary>
          <para>Constructs and initializes a new instance of the <see cref="T:System.Net.CredentialCache" /> class.</para>
        </summary>
        <remarks>
          <para>This constructor creates a <see cref="T:System.Net.CredentialCache" />
instance with its <see cref="P:System.Net.CredentialCache.DefaultCredentials" />
property initialized to the system
credentials of the current process. </para>
          <para>
            <block subset="none" type="note">Use the <see cref="M:System.Net.CredentialCache.Add(System.Uri,System.String,System.Net.NetworkCredential)" /> method to add additional
credentials to the <see cref="T:System.Net.CredentialCache" /> instance.
</block>
          </para>
        </remarks>
      </Docs>
      <Excluded>0</Excluded>
    </Member>
    <Member MemberName="DefaultCredentials">
      <MemberSignature Language="ILASM" Value=".property class System.Net.ICredentials DefaultCredentials { public hidebysig static specialname class System.Net.ICredentials get_DefaultCredentials() }" />
      <MemberSignature Language="C#" Value="public static ICredentials DefaultCredentials { get; }" />
      <MemberType>Property</MemberType>
      <ReturnValue>
        <ReturnType>System.Net.ICredentials</ReturnType>
      </ReturnValue>
      <Parameters />
      <Docs>
        <summary>
          <para> Gets the system credentials in use for
      the current process.</para>
        </summary>
        <value>
          <para>A <see cref="T:System.Net.ICredentials" /> instance that represents the system credentials in use for the current process.</para>
        </value>
        <remarks>
          <para>This property is read-only.</para>
        </remarks>
        <permission cref="T:System.Security.Permissions.EnvironmentPermission">Requires read access to the environment variable that contains the user name. See <see cref="F:System.Security.Permissions.EnvironmentPermissionAccess.Read" />.</permission>
      </Docs>
      <Excluded>0</Excluded>
    </Member>
  </Members>
  <TypeExcluded>0</TypeExcluded>
</Type>
