1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244
|
<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>
|