﻿<?xml version="1.0" encoding="utf-8"?><Type Name="WindowsIdentity" FullName="System.Security.Principal.WindowsIdentity"><TypeSignature Maintainer="auto" Language="C#" Value="public class WindowsIdentity : IDisposable, System.Runtime.Serialization.IDeserializationCallback, System.Runtime.Serialization.ISerializable, System.Security.Principal.IIdentity" /><TypeSignature Language="ILAsm" Value=".class public auto ansi serializable beforefieldinit WindowsIdentity extends System.Object implements class System.IDisposable, class System.Runtime.Serialization.IDeserializationCallback, class System.Runtime.Serialization.ISerializable, class System.Security.Principal.IIdentity" /><AssemblyInfo><AssemblyName>mscorlib</AssemblyName><AssemblyPublicKey>[00 00 00 00 00 00 00 00 04 00 00 00 00 00 00 00]</AssemblyPublicKey><AssemblyVersion>1.0.5000.0</AssemblyVersion><AssemblyVersion>2.0.0.0</AssemblyVersion><AssemblyVersion>4.0.0.0</AssemblyVersion></AssemblyInfo><ThreadSafetyStatement>Gtk# is thread aware, but not thread safe; See the &lt;link location="node:gtk-sharp/programming/threads"&gt;Gtk# Thread Programming&lt;/link&gt; for details.</ThreadSafetyStatement><Base><BaseTypeName>System.Object</BaseTypeName></Base><Interfaces><Interface><InterfaceName>System.IDisposable</InterfaceName></Interface><Interface><InterfaceName>System.Runtime.Serialization.IDeserializationCallback</InterfaceName></Interface><Interface><InterfaceName>System.Runtime.Serialization.ISerializable</InterfaceName></Interface><Interface><InterfaceName>System.Security.Principal.IIdentity</InterfaceName></Interface></Interfaces><Attributes><Attribute><AttributeName>System.Runtime.InteropServices.ComVisible(true)</AttributeName></Attribute></Attributes><Docs><remarks><attribution license="cc4" from="Microsoft" modified="false" /><para>Call the <see cref="M:System.Security.Principal.WindowsIdentity.GetCurrent" /> method to create a <see cref="T:System.Security.Principal.WindowsIdentity" /> object that represents the current user.</para></remarks><summary><attribution license="cc4" from="Microsoft" modified="false" /><para>Represents a Windows user.</para></summary></Docs><Members><Member MemberName=".ctor"><MemberSignature Language="C#" Value="public WindowsIdentity (IntPtr userToken);" /><MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor(native int userToken) cil managed" /><MemberType>Constructor</MemberType><AssemblyInfo><AssemblyVersion>1.0.5000.0</AssemblyVersion><AssemblyVersion>2.0.0.0</AssemblyVersion><AssemblyVersion>4.0.0.0</AssemblyVersion></AssemblyInfo><ReturnValue /><Parameters><Parameter Name="userToken" Type="System.IntPtr" /></Parameters><Docs><remarks><attribution license="cc4" from="Microsoft" modified="false" /><para>The following table shows initial property values for an instance of <see cref="T:System.Security.Principal.WindowsIdentity" />.</para><list type="table"><listheader><item><term><para>Property </para></term><description><para>Initial value </para></description></item></listheader><item><term><para><see cref="P:System.Security.Principal.WindowsIdentity.AuthenticationType" /></para></term><description><para>Negotiate </para></description></item><item><term><para><see cref="T:System.Security.Principal.WindowsAccountType" /></para></term><description><para>Normal </para></description></item><item><term><para><see cref="P:System.Security.Principal.WindowsIdentity.IsAuthenticated" /></para></term><description><para>false </para></description></item></list><block subset="none" type="note"><para>You can retrieve the token represented by <paramref name="userToken" /> by calling unmanaged code such as the Win32 API <unmanagedCodeEntityReference>LogonUser</unmanagedCodeEntityReference> function. Always release <paramref name="userToken" /> by calling the Win32 API <unmanagedCodeEntityReference>CloseHandle</unmanagedCodeEntityReference> function. For more information on calling unmanaged code, see <format type="text/html"><a href="eca7606e-ebfb-4f47-b8d9-289903fdc045">Consuming Unmanaged DLL Functions</a></format>.</para></block></remarks><summary><attribution license="cc4" from="Microsoft" modified="false" /><para>Initializes a new instance of the <see cref="T:System.Security.Principal.WindowsIdentity" /> class for the user represented by the specified Windows account token.</para></summary><param name="userToken"><attribution license="cc4" from="Microsoft" modified="false" />The account token for the user on whose behalf the code is running. </param></Docs></Member><Member MemberName=".ctor"><MemberSignature Language="C#" Value="public WindowsIdentity (string sUserPrincipalName);" /><MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor(string sUserPrincipalName) cil managed" /><MemberType>Constructor</MemberType><AssemblyInfo><AssemblyVersion>1.0.5000.0</AssemblyVersion><AssemblyVersion>2.0.0.0</AssemblyVersion><AssemblyVersion>4.0.0.0</AssemblyVersion></AssemblyInfo><Parameters><Parameter Name="sUserPrincipalName" Type="System.String" /></Parameters><Docs><remarks><attribution license="cc4" from="Microsoft" modified="false" /><para>A UPN has the format username@domainname.com, in other words, an email address. The UPN identified in <paramref name="sUserPrincipalName" /> is used to retrieve a token for that user through the Win32 API <unmanagedCodeEntityReference>LsaLogonUser</unmanagedCodeEntityReference> function. In turn that token is used to identify the user. An exception might be returned due to the inability to log on using the supplied UPN.</para><block subset="none" type="note"><para>This constructor is intended for use on computers joined only to Windows Server 2003 domains. An exception is thrown for other domain types. This restriction is because the constructor uses the <see cref="http://go.microsoft.com/fwlink/?LinkId=143533">KERB_S4U_LOGON structure</see>.</para></block></remarks><summary><attribution license="cc4" from="Microsoft" modified="false" /><para>Initializes a new instance of the <see cref="T:System.Security.Principal.WindowsIdentity" /> class for the user represented by the specified User Principal Name (UPN).</para></summary><param name="sUserPrincipalName"><attribution license="cc4" from="Microsoft" modified="false" />The UPN for the user on whose behalf the code is running. </param></Docs></Member><Member MemberName=".ctor"><MemberSignature Language="C#" Value="public WindowsIdentity (IntPtr userToken, string type);" /><MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor(native int userToken, string type) cil managed" /><MemberType>Constructor</MemberType><AssemblyInfo><AssemblyVersion>1.0.5000.0</AssemblyVersion><AssemblyVersion>2.0.0.0</AssemblyVersion><AssemblyVersion>4.0.0.0</AssemblyVersion></AssemblyInfo><ReturnValue /><Parameters><Parameter Name="userToken" Type="System.IntPtr" /><Parameter Name="type" Type="System.String" /></Parameters><Docs><remarks><attribution license="cc4" from="Microsoft" modified="false" /><para>The following table shows initial property values for an instance of <see cref="T:System.Security.Principal.WindowsIdentity" />.</para><list type="table"><listheader><item><term><para>Property </para></term><description><para>Initial value </para></description></item></listheader><item><term><para><see cref="T:System.Security.Principal.WindowsAccountType" /></para></term><description><para>Normal </para></description></item><item><term><para><see cref="P:System.Security.Principal.WindowsIdentity.IsAuthenticated" /></para></term><description><para>false </para></description></item></list><para>The value of the <paramref name="type" /> parameter is used to set the <see cref="P:System.Security.Principal.WindowsIdentity.AuthenticationType" /> parameter. If <paramref name="type" /> is null, the security system sets <see cref="P:System.Security.Principal.WindowsIdentity.AuthenticationType" /> to Negotiate on Windows Vista and later versions of the Windows operating system, and to Kerberos on earlier versions of the Windows operating system. The security system does not use this value; it is for informational use only.</para><block subset="none" type="note"><para>You can retrieve the token represented by <paramref name="userToken" /> by calling unmanaged code such as the Win32 API <unmanagedCodeEntityReference>LogonUser</unmanagedCodeEntityReference> function. Always release <paramref name="userToken" /> by calling the Win32 API <unmanagedCodeEntityReference>CloseHandle</unmanagedCodeEntityReference> function. For more information on calling unmanaged code, see <format type="text/html"><a href="eca7606e-ebfb-4f47-b8d9-289903fdc045">Consuming Unmanaged DLL Functions</a></format>.</para></block></remarks><summary><attribution license="cc4" from="Microsoft" modified="false" /><para>Initializes a new instance of the <see cref="T:System.Security.Principal.WindowsIdentity" /> class for the user represented by the specified Windows account token and the specified authentication type.</para></summary><param name="userToken"><attribution license="cc4" from="Microsoft" modified="false" />The account token for the user on whose behalf the code is running. </param><param name="type"><attribution license="cc4" from="Microsoft" modified="false" />(Informational use only.) The type of authentication used to identify the user. For more information, see Remarks.</param></Docs></Member><Member MemberName=".ctor"><MemberSignature Language="C#" Value="public WindowsIdentity (System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context);" /><MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor(class System.Runtime.Serialization.SerializationInfo info, valuetype System.Runtime.Serialization.StreamingContext context) cil managed" /><MemberType>Constructor</MemberType><AssemblyInfo><AssemblyVersion>1.0.5000.0</AssemblyVersion><AssemblyVersion>2.0.0.0</AssemblyVersion><AssemblyVersion>4.0.0.0</AssemblyVersion></AssemblyInfo><Parameters><Parameter Name="info" Type="System.Runtime.Serialization.SerializationInfo" /><Parameter Name="context" Type="System.Runtime.Serialization.StreamingContext" /></Parameters><Docs><remarks><attribution license="cc4" from="Microsoft" modified="false" /><block subset="none" type="note"><para>Calling this method with untrusted data is a security risk. Call this method only with trusted data. For more information, see <see cref="http://go.microsoft.com/fwlink/?LinkId=330378">Untrusted Data Security Risks</see>.</para></block></remarks><summary><attribution license="cc4" from="Microsoft" modified="false" /><para>Initializes a new instance of the <see cref="T:System.Security.Principal.WindowsIdentity" /> class for the user represented by information in a <see cref="T:System.Runtime.Serialization.SerializationInfo" /> stream.</para></summary><param name="info"><attribution license="cc4" from="Microsoft" modified="false" />The object containing the account information for the user. </param><param name="context"><attribution license="cc4" from="Microsoft" modified="false" />An object that indicates the stream characteristics. </param></Docs></Member><Member MemberName=".ctor"><MemberSignature Language="C#" Value="public WindowsIdentity (string sUserPrincipalName, string type);" /><MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor(string sUserPrincipalName, string type) cil managed" /><MemberType>Constructor</MemberType><AssemblyInfo><AssemblyVersion>1.0.5000.0</AssemblyVersion><AssemblyVersion>2.0.0.0</AssemblyVersion><AssemblyVersion>4.0.0.0</AssemblyVersion></AssemblyInfo><Parameters><Parameter Name="sUserPrincipalName" Type="System.String" /><Parameter Name="type" Type="System.String" /></Parameters><Docs><remarks><attribution license="cc4" from="Microsoft" modified="false" /><para>The value of the <paramref name="type" /> parameter is used to set the <see cref="P:System.Security.Principal.WindowsIdentity.AuthenticationType" /> parameter. If <paramref name="type" /> is null, the security system sets <see cref="P:System.Security.Principal.WindowsIdentity.AuthenticationType" /> to Negotiate on Windows Vista and later versions of the Windows operating system, and to Kerberos on earlier versions of the Windows operating system. The security system does not use this value; it is for informational use only.</para><para>The UPN identified in <paramref name="sUserPrincipalName" /> is used to retrieve a token for that user through the Win32 API <unmanagedCodeEntityReference>LsaLogonUser</unmanagedCodeEntityReference> function. In turn that token is used to identify the user. An exception might be returned due to the inability to log on using the supplied UPN.</para><block subset="none" type="note"><para>This constructor is intended for use only on computers joined to Windows Server 2003 domains. An exception is thrown for other domain types. This restriction is because the constructor uses the <see cref="http://go.microsoft.com/fwlink/?LinkId=143533">KERB_S4U_LOGON structure</see>.</para></block></remarks><summary><attribution license="cc4" from="Microsoft" modified="false" /><para>Initializes a new instance of the <see cref="T:System.Security.Principal.WindowsIdentity" /> class for the user represented by the specified User Principal Name (UPN) and the specified authentication type.</para></summary><param name="sUserPrincipalName"><attribution license="cc4" from="Microsoft" modified="false" />The UPN for the user on whose behalf the code is running. </param><param name="type"><attribution license="cc4" from="Microsoft" modified="false" />(Informational use only.) The type of authentication used to identify the user. For more information, see Remarks.</param></Docs></Member><Member MemberName=".ctor"><MemberSignature Language="C#" Value="public WindowsIdentity (IntPtr userToken, string type, System.Security.Principal.WindowsAccountType acctType);" /><MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor(native int userToken, string type, valuetype System.Security.Principal.WindowsAccountType acctType) cil managed" /><MemberType>Constructor</MemberType><AssemblyInfo><AssemblyVersion>1.0.5000.0</AssemblyVersion><AssemblyVersion>2.0.0.0</AssemblyVersion><AssemblyVersion>4.0.0.0</AssemblyVersion></AssemblyInfo><ReturnValue /><Parameters><Parameter Name="userToken" Type="System.IntPtr" /><Parameter Name="type" Type="System.String" /><Parameter Name="acctType" Type="System.Security.Principal.WindowsAccountType" /></Parameters><Docs><remarks><attribution license="cc4" from="Microsoft" modified="false" /><para>The following table shows initial property values for an instance of <see cref="T:System.Security.Principal.WindowsIdentity" />.</para><list type="table"><listheader><item><term><para>Property </para></term><description><para>Initial Value </para></description></item></listheader><item><term><para><see cref="P:System.Security.Principal.WindowsIdentity.IsAuthenticated" /></para></term><description><para>false </para></description></item></list><para>The value of the <paramref name="type" /> parameter is used to set the <see cref="P:System.Security.Principal.WindowsIdentity.AuthenticationType" /> parameter. If <paramref name="type" /> is null, the security system sets <see cref="P:System.Security.Principal.WindowsIdentity.AuthenticationType" /> to Negotiate on Windows Vista and later versions of the Windows operating system, and to Kerberos on earlier versions of the Windows operating system. The security system does not use this value; it is for informational use only.</para><block subset="none" type="note"><para>You can retrieve the token represented by <paramref name="userToken" /> by calling unmanaged code such as the Win32 API <unmanagedCodeEntityReference>LogonUser</unmanagedCodeEntityReference> function. Always release <paramref name="userToken" /> by calling the Win32 API <unmanagedCodeEntityReference>CloseHandle</unmanagedCodeEntityReference> function. For more information on calling unmanaged code, see <format type="text/html"><a href="eca7606e-ebfb-4f47-b8d9-289903fdc045">Consuming Unmanaged DLL Functions</a></format>.</para></block></remarks><summary><attribution license="cc4" from="Microsoft" modified="false" /><para>Initializes a new instance of the <see cref="T:System.Security.Principal.WindowsIdentity" /> class for the user represented by the specified Windows account token, the specified authentication type, and the specified Windows account type.</para></summary><param name="userToken"><attribution license="cc4" from="Microsoft" modified="false" />The account token for the user on whose behalf the code is running. </param><param name="type"><attribution license="cc4" from="Microsoft" modified="false" />(Informational use only.) The type of authentication used to identify the user. For more information, see Remarks.</param><param name="acctType"><attribution license="cc4" from="Microsoft" modified="false" />One of the enumeration values. </param></Docs></Member><Member MemberName=".ctor"><MemberSignature Language="C#" Value="public WindowsIdentity (IntPtr userToken, string type, System.Security.Principal.WindowsAccountType acctType, bool isAuthenticated);" /><MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor(native int userToken, string type, valuetype System.Security.Principal.WindowsAccountType acctType, bool isAuthenticated) cil managed" /><MemberType>Constructor</MemberType><AssemblyInfo><AssemblyVersion>1.0.5000.0</AssemblyVersion><AssemblyVersion>2.0.0.0</AssemblyVersion><AssemblyVersion>4.0.0.0</AssemblyVersion></AssemblyInfo><ReturnValue /><Parameters><Parameter Name="userToken" Type="System.IntPtr" /><Parameter Name="type" Type="System.String" /><Parameter Name="acctType" Type="System.Security.Principal.WindowsAccountType" /><Parameter Name="isAuthenticated" Type="System.Boolean" /></Parameters><Docs><remarks><attribution license="cc4" from="Microsoft" modified="false" /><para>The value of the <paramref name="type" /> parameter is used to set the <see cref="P:System.Security.Principal.WindowsIdentity.AuthenticationType" /> parameter. If <paramref name="type" /> is null, the security system sets <see cref="P:System.Security.Principal.WindowsIdentity.AuthenticationType" /> to Negotiate on Windows Vista and later versions of the Windows operating system, and to Kerberos on earlier versions of the Windows operating system. The security system does not use this value; it is for informational use only.</para><para>You can retrieve the token represented by <paramref name="userToken" /> by calling unmanaged code such as the Win32 API <unmanagedCodeEntityReference>LogonUser</unmanagedCodeEntityReference> function. Always release <paramref name="userToken" /> by calling the Win32 API <unmanagedCodeEntityReference>CloseHandle</unmanagedCodeEntityReference> function. For more information on calling unmanaged code, see <format type="text/html"><a href="eca7606e-ebfb-4f47-b8d9-289903fdc045">Consuming Unmanaged DLL Functions</a></format>.</para></remarks><summary><attribution license="cc4" from="Microsoft" modified="false" /><para>Initializes a new instance of the <see cref="T:System.Security.Principal.WindowsIdentity" /> class for the user represented by the specified Windows account token, the specified authentication type, the specified Windows account type, and the specified authentication status.</para></summary><param name="userToken"><attribution license="cc4" from="Microsoft" modified="false" />The account token for the user on whose behalf the code is running. </param><param name="type"><attribution license="cc4" from="Microsoft" modified="false" />(Informational use only.) The type of authentication used to identify the user. For more information, see Remarks.</param><param name="acctType"><attribution license="cc4" from="Microsoft" modified="false" />One of the enumeration values. </param><param name="isAuthenticated"><attribution license="cc4" from="Microsoft" modified="false" />true to indicate that the user is authenticated; otherwise, false. </param></Docs></Member><Member MemberName="AuthenticationType"><MemberSignature Language="C#" Value="public string AuthenticationType { get; }" /><MemberSignature Language="ILAsm" Value=".property instance string AuthenticationType" /><MemberType>Property</MemberType><AssemblyInfo><AssemblyVersion>1.0.5000.0</AssemblyVersion><AssemblyVersion>2.0.0.0</AssemblyVersion><AssemblyVersion>4.0.0.0</AssemblyVersion></AssemblyInfo><ReturnValue><ReturnType>System.String</ReturnType></ReturnValue><Docs><value>The authentication method (e.g. NTLM, POSIX ...).</value><remarks><attribution license="cc4" from="Microsoft" modified="false" /><para>This property is informational; it is not used by the security system. On Windows Vista and later versions of the Windows operating system, the default value for this property is Negotiate, which chooses the best security support provider (SSP) based on customer-configured security policy. The default property value for earlier versions of the Windows operating system is Kerberos.</para></remarks><summary><attribution license="cc4" from="Microsoft" modified="false" /><para>Gets the type of authentication used to identify the user.</para></summary></Docs></Member><Member MemberName="Dispose"><MemberSignature Language="C#" Value="public void Dispose ();" /><MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance void Dispose() cil managed" /><MemberType>Method</MemberType><AssemblyInfo><AssemblyVersion>2.0.0.0</AssemblyVersion><AssemblyVersion>4.0.0.0</AssemblyVersion></AssemblyInfo><Attributes><Attribute><AttributeName>System.Runtime.InteropServices.ComVisible(false)</AttributeName></Attribute></Attributes><ReturnValue><ReturnType>System.Void</ReturnType></ReturnValue><Parameters /><Docs><since version=".NET 2.0" /><remarks><attribution license="cc4" from="Microsoft" modified="false" /><para>Call <see cref="M:System.Security.Principal.WindowsIdentity.Dispose" /> when you are finished using the <see cref="T:System.Security.Principal.WindowsIdentity" />. The <see cref="M:System.Security.Principal.WindowsIdentity.Dispose" /> method leaves the <see cref="T:System.Security.Principal.WindowsIdentity" /> in an unusable state. After calling <see cref="M:System.Security.Principal.WindowsIdentity.Dispose" />, you must release all references to the <see cref="T:System.Security.Principal.WindowsIdentity" /> so the garbage collector can reclaim the memory that the <see cref="T:System.Security.Principal.WindowsIdentity" /> was occupying. For more information, see <format type="text/html"><a href="a17b0066-71c2-4ba4-9822-8e19332fc213">Cleaning Up Unmanaged Resources</a></format> and <format type="text/html"><a href="eb4e1af0-3b48-4fbc-ad4e-fc2f64138bf9">Implementing a Dispose Method</a></format>. </para><block subset="none" type="note"><para>Always call <see cref="M:System.Security.Principal.WindowsIdentity.Dispose" /> before you release your last reference to the <see cref="T:System.Security.Principal.WindowsIdentity" />. Otherwise, the resources it is using will not be freed until the garbage collector calls the <see cref="T:System.Security.Principal.WindowsIdentity" /> object's Finalize method.</para></block></remarks><summary><attribution license="cc4" from="Microsoft" modified="false" /><para>Releases all resources used by the <see cref="T:System.Security.Principal.WindowsIdentity" />. </para></summary></Docs></Member><Member MemberName="Dispose"><MemberSignature Language="C#" Value="protected virtual void Dispose (bool disposing);" /><MemberSignature Language="ILAsm" Value=".method familyhidebysig newslot virtual instance void Dispose(bool disposing) cil managed" /><MemberType>Method</MemberType><AssemblyInfo><AssemblyVersion>2.0.0.0</AssemblyVersion><AssemblyVersion>4.0.0.0</AssemblyVersion></AssemblyInfo><Attributes><Attribute><AttributeName>System.Runtime.InteropServices.ComVisible(false)</AttributeName></Attribute></Attributes><ReturnValue><ReturnType>System.Void</ReturnType></ReturnValue><Parameters><Parameter Name="disposing" Type="System.Boolean" /></Parameters><Docs><since version=".NET 2.0" /><remarks><attribution license="cc4" from="Microsoft" modified="false" /><para>This method is called by the public Dispose() method and the <see cref="M:System.Object.Finalize" /> method. Dispose() invokes the protected Dispose(Boolean) method with the <paramref name="disposing" /> parameter set to true. <see cref="M:System.Object.Finalize" /> invokes Dispose with <paramref name="disposing" /> set to false.</para><para>When the <paramref name="disposing" /> parameter is true, this method releases all resources held by any managed objects that this <see cref="T:System.Security.Principal.WindowsIdentity" /> references. This method invokes the Dispose() method of each referenced object.</para></remarks><summary><attribution license="cc4" from="Microsoft" modified="false" /><para>Releases the unmanaged resources used by the <see cref="T:System.Security.Principal.WindowsIdentity" /> and optionally releases the managed resources. </para></summary><param name="disposing"><attribution license="cc4" from="Microsoft" modified="false" />true to release both managed and unmanaged resources; false to release only unmanaged resources. </param></Docs></Member><Member MemberName="Finalize"><MemberSignature Language="C#" Value="~WindowsIdentity ();" /><MemberType>Method</MemberType><ReturnValue><ReturnType>System.Void</ReturnType></ReturnValue><Parameters /><Docs><summary>To be added.</summary><remarks>To be added.</remarks></Docs><AssemblyInfo><AssemblyVersion>1.0.5000.0</AssemblyVersion></AssemblyInfo></Member><Member MemberName="GetAnonymous"><MemberSignature Language="C#" Value="public static System.Security.Principal.WindowsIdentity GetAnonymous ();" /><MemberSignature Language="ILAsm" Value=".method public static hidebysig class System.Security.Principal.WindowsIdentity GetAnonymous() cil managed" /><MemberType>Method</MemberType><AssemblyInfo><AssemblyVersion>1.0.5000.0</AssemblyVersion><AssemblyVersion>2.0.0.0</AssemblyVersion><AssemblyVersion>4.0.0.0</AssemblyVersion></AssemblyInfo><ReturnValue><ReturnType>System.Security.Principal.WindowsIdentity</ReturnType></ReturnValue><Parameters /><Docs><remarks><attribution license="cc4" from="Microsoft" modified="false" /><para>This property returns an empty <see cref="T:System.Security.Principal.WindowsIdentity" /> object that enables you to treat operations as anonymous. The property value does not correspond to a Windows anonymous user and cannot be used for impersonation. Also, note that the identity returned by this property is not static; each call to <see cref="M:System.Security.Principal.WindowsIdentity.GetAnonymous" /> returns a different anonymous identity.</para><para>You can use the <see cref="P:System.Security.Principal.WindowsIdentity.IsAnonymous" /> property to detect the return value from <see cref="M:System.Security.Principal.WindowsIdentity.GetAnonymous" />. However, <see cref="P:System.Security.Principal.WindowsIdentity.IsAnonymous" /> detects both the Windows anonymous identity and the anonymous identity returned by this method. To use the latter identity, cache the <see cref="M:System.Security.Principal.WindowsIdentity.GetAnonymous" /> return value instead of relying on the <see cref="P:System.Security.Principal.WindowsIdentity.IsAnonymous" /> property.</para></remarks><summary><attribution license="cc4" from="Microsoft" modified="false" /><para>Returns a <see cref="T:System.Security.Principal.WindowsIdentity" /> object that you can use as a sentinel value in your code to represent an anonymous user. The property value does not represent the built-in anonymous identity used by the Windows operating system.</para></summary><returns><attribution license="cc4" from="Microsoft" modified="false" /><para>An object that represents an anonymous user.</para></returns></Docs></Member><Member MemberName="GetCurrent"><MemberSignature Language="C#" Value="public static System.Security.Principal.WindowsIdentity GetCurrent ();" /><MemberSignature Language="ILAsm" Value=".method public static hidebysig class System.Security.Principal.WindowsIdentity GetCurrent() cil managed" /><MemberType>Method</MemberType><AssemblyInfo><AssemblyVersion>1.0.5000.0</AssemblyVersion><AssemblyVersion>2.0.0.0</AssemblyVersion><AssemblyVersion>4.0.0.0</AssemblyVersion></AssemblyInfo><ReturnValue><ReturnType>System.Security.Principal.WindowsIdentity</ReturnType></ReturnValue><Parameters /><Docs><remarks><example><code lang="C#">
WindowsIdentity wi = WindowsIdentity.GetCurrent ();
Console.WriteLine ("\tUserName:\t{0}", wi.Name);
Console.WriteLine ("\tToken:\t\t{0}", wi.Token);
  </code></example></remarks><summary><attribution license="cc4" from="Microsoft" modified="false" /><para>Returns a <see cref="T:System.Security.Principal.WindowsIdentity" /> object that represents the current Windows user.</para></summary><returns><attribution license="cc4" from="Microsoft" modified="false" /><para>An object that represents the current user.</para></returns></Docs></Member><Member MemberName="GetCurrent"><MemberSignature Language="C#" Value="public static System.Security.Principal.WindowsIdentity GetCurrent (bool ifImpersonating);" /><MemberSignature Language="ILAsm" Value=".method public static hidebysig class System.Security.Principal.WindowsIdentity GetCurrent(bool ifImpersonating) cil managed" /><MemberType>Method</MemberType><AssemblyInfo><AssemblyVersion>2.0.0.0</AssemblyVersion><AssemblyVersion>4.0.0.0</AssemblyVersion></AssemblyInfo><ReturnValue><ReturnType>System.Security.Principal.WindowsIdentity</ReturnType></ReturnValue><Parameters><Parameter Name="ifImpersonating" Type="System.Boolean" /></Parameters><Docs><since version=".NET 2.0" /><remarks><attribution license="cc4" from="Microsoft" modified="false" /><para>If <paramref name="ifImpersonating" /> is true and the thread is not impersonating, the returned <see cref="T:System.Security.Principal.WindowsIdentity" /> object has no value.  If <paramref name="ifImpersonating" /> is false and the thread is impersonating, the <see cref="T:System.Security.Principal.WindowsIdentity" /> for the thread is returned.  If <paramref name="ifImpersonating" /> is false and the thread is not impersonating, the <see cref="T:System.Security.Principal.WindowsIdentity" /> for the process is returned.  </para></remarks><summary><attribution license="cc4" from="Microsoft" modified="false" /><para>Returns a <see cref="T:System.Security.Principal.WindowsIdentity" /> object that represents the Windows identity for either the thread or the process, depending on the value of the <paramref name="ifImpersonating" /> parameter.</para></summary><returns><attribution license="cc4" from="Microsoft" modified="false" /><para>An object that represents a Windows user.</para></returns><param name="ifImpersonating"><attribution license="cc4" from="Microsoft" modified="false" />true to return the <see cref="T:System.Security.Principal.WindowsIdentity" /> only if the thread is currently impersonating; false to return the <see cref="T:System.Security.Principal.WindowsIdentity" />   of the thread if it is impersonating or the <see cref="T:System.Security.Principal.WindowsIdentity" /> of the process if the thread is not currently impersonating.</param></Docs></Member><Member MemberName="GetCurrent"><MemberSignature Language="C#" Value="public static System.Security.Principal.WindowsIdentity GetCurrent (System.Security.Principal.TokenAccessLevels desiredAccess);" /><MemberSignature Language="ILAsm" Value=".method public static hidebysig class System.Security.Principal.WindowsIdentity GetCurrent(valuetype System.Security.Principal.TokenAccessLevels desiredAccess) cil managed" /><MemberType>Method</MemberType><AssemblyInfo><AssemblyVersion>2.0.0.0</AssemblyVersion><AssemblyVersion>4.0.0.0</AssemblyVersion></AssemblyInfo><ReturnValue><ReturnType>System.Security.Principal.WindowsIdentity</ReturnType></ReturnValue><Parameters><Parameter Name="desiredAccess" Type="System.Security.Principal.TokenAccessLevels" /></Parameters><Docs><since version=".NET 2.0" /><remarks><attribution license="cc4" from="Microsoft" modified="false" /><para>The <paramref name="desiredAccess" /> parameter specifies an access mask that identifies the requested types of access to the access token. These requested access types are compared with the token's discretionary access control list (DACL) to determine which types of access are granted or denied. </para></remarks><summary><attribution license="cc4" from="Microsoft" modified="false" /><para>Returns a <see cref="T:System.Security.Principal.WindowsIdentity" /> object that represents the current Windows user, using the specified desired token access level.</para></summary><returns><attribution license="cc4" from="Microsoft" modified="false" /><para>An object that represents the current user.</para></returns><param name="desiredAccess"><attribution license="cc4" from="Microsoft" modified="false" />A bitwise combination of the enumeration values. </param></Docs></Member><Member MemberName="Groups"><MemberSignature Language="C#" Value="public System.Security.Principal.IdentityReferenceCollection Groups { get; }" /><MemberSignature Language="ILAsm" Value=".property instance class System.Security.Principal.IdentityReferenceCollection Groups" /><MemberType>Property</MemberType><AssemblyInfo><AssemblyVersion>2.0.0.0</AssemblyVersion><AssemblyVersion>4.0.0.0</AssemblyVersion></AssemblyInfo><ReturnValue><ReturnType>System.Security.Principal.IdentityReferenceCollection</ReturnType></ReturnValue><Docs><value>To be added.</value><remarks>To be added.</remarks><since version=".NET 2.0" /><summary><attribution license="cc4" from="Microsoft" modified="false" /><para>Gets the groups the current Windows user belongs to.</para></summary></Docs></Member><Member MemberName="Impersonate"><MemberSignature Language="C#" Value="public virtual System.Security.Principal.WindowsImpersonationContext Impersonate ();" /><MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance class System.Security.Principal.WindowsImpersonationContext Impersonate() cil managed" /><MemberType>Method</MemberType><AssemblyInfo><AssemblyVersion>1.0.5000.0</AssemblyVersion><AssemblyVersion>2.0.0.0</AssemblyVersion><AssemblyVersion>4.0.0.0</AssemblyVersion></AssemblyInfo><ReturnValue><ReturnType>System.Security.Principal.WindowsImpersonationContext</ReturnType></ReturnValue><Parameters /><Docs><remarks><attribution license="cc4" from="Microsoft" modified="false" /><para>On Windows NT platforms, the current user must have sufficient rights to allow impersonation.</para></remarks><summary><attribution license="cc4" from="Microsoft" modified="false" /><para>Impersonates the user represented by the <see cref="T:System.Security.Principal.WindowsIdentity" /> object.</para></summary><returns><attribution license="cc4" from="Microsoft" modified="false" /><para>An object that represents the Windows user prior to impersonation; this can be used to revert to the original user's context.</para></returns></Docs></Member><Member MemberName="Impersonate"><MemberSignature Language="C#" Value="public static System.Security.Principal.WindowsImpersonationContext Impersonate (IntPtr userToken);" /><MemberSignature Language="ILAsm" Value=".method public static hidebysig class System.Security.Principal.WindowsImpersonationContext Impersonate(native int userToken) cil managed" /><MemberType>Method</MemberType><AssemblyInfo><AssemblyVersion>1.0.5000.0</AssemblyVersion><AssemblyVersion>2.0.0.0</AssemblyVersion><AssemblyVersion>4.0.0.0</AssemblyVersion></AssemblyInfo><ReturnValue><ReturnType>System.Security.Principal.WindowsImpersonationContext</ReturnType></ReturnValue><Parameters><Parameter Name="userToken" Type="System.IntPtr" /></Parameters><Docs><remarks><attribution license="cc4" from="Microsoft" modified="false" /><para>On Windows NT platforms, the current user must have sufficient rights to allow impersonation.</para><block subset="none" type="note"><para>Calling the <see cref="M:System.Security.Principal.WindowsIdentity.Impersonate(System.IntPtr)" /> method with a <paramref name="userToken" /> value of <see cref="F:System.IntPtr.Zero" /> is equivalent to calling the Win32 <unmanagedCodeEntityReference>RevertToSelf</unmanagedCodeEntityReference> function. If another user is currently being impersonated, control reverts to the original user.</para></block><para>For more information about calls to unmanaged code, see <format type="text/html"><a href="eca7606e-ebfb-4f47-b8d9-289903fdc045">Consuming Unmanaged DLL Functions</a></format>. </para></remarks><summary><attribution license="cc4" from="Microsoft" modified="false" /><para>Impersonates the user represented by the specified user token.</para></summary><returns><attribution license="cc4" from="Microsoft" modified="false" /><para>An object that represents the Windows user prior to impersonation; this object can be used to revert to the original user's context.</para></returns><param name="userToken"><attribution license="cc4" from="Microsoft" modified="false" />The handle of a Windows account token. This token is usually retrieved through a call to unmanaged code, such as a call to the Win32 API LogonUser function. </param></Docs></Member><Member MemberName="ImpersonationLevel"><MemberSignature Language="C#" Value="public System.Security.Principal.TokenImpersonationLevel ImpersonationLevel { get; }" /><MemberSignature Language="ILAsm" Value=".property instance valuetype System.Security.Principal.TokenImpersonationLevel ImpersonationLevel" /><MemberType>Property</MemberType><AssemblyInfo><AssemblyVersion>2.0.0.0</AssemblyVersion><AssemblyVersion>4.0.0.0</AssemblyVersion></AssemblyInfo><Attributes><Attribute><AttributeName>System.Runtime.InteropServices.ComVisible(false)</AttributeName></Attribute></Attributes><ReturnValue><ReturnType>System.Security.Principal.TokenImpersonationLevel</ReturnType></ReturnValue><Docs><value>To be added.</value><since version=".NET 2.0" /><remarks><attribution license="cc4" from="Microsoft" modified="false" /><para>Describes the impersonation level to be used to connect to WMI.</para></remarks><summary><attribution license="cc4" from="Microsoft" modified="false" /><para>Gets the impersonation level for the user.</para></summary></Docs></Member><Member MemberName="IsAnonymous"><MemberSignature Language="C#" Value="public virtual bool IsAnonymous { get; }" /><MemberSignature Language="ILAsm" Value=".property instance bool IsAnonymous" /><MemberType>Property</MemberType><AssemblyInfo><AssemblyVersion>1.0.5000.0</AssemblyVersion><AssemblyVersion>2.0.0.0</AssemblyVersion><AssemblyVersion>4.0.0.0</AssemblyVersion></AssemblyInfo><ReturnValue><ReturnType>System.Boolean</ReturnType></ReturnValue><Docs><value>True if the current identity is anonymous, false otherwise.</value><remarks><attribution license="cc4" from="Microsoft" modified="false" /><para>The <see cref="P:System.Security.Principal.WindowsIdentity.IsAnonymous" /> property detects both the Windows anonymous identity and the anonymous identity that is returned by the <see cref="M:System.Security.Principal.WindowsIdentity.GetAnonymous" /> method. </para><para>Anonymous accounts are typically encountered only from within ASP.NET-based applications when anonymous access is allowed by Internet Information Services (IIS).</para></remarks><summary><attribution license="cc4" from="Microsoft" modified="false" /><para>Gets a value that indicates whether the user account is identified as an anonymous account by the system.</para></summary></Docs></Member><Member MemberName="IsAuthenticated"><MemberSignature Language="C#" Value="public virtual bool IsAuthenticated { get; }" /><MemberSignature Language="ILAsm" Value=".property instance bool IsAuthenticated" /><MemberType>Property</MemberType><AssemblyInfo><AssemblyVersion>1.0.5000.0</AssemblyVersion><AssemblyVersion>2.0.0.0</AssemblyVersion><AssemblyVersion>4.0.0.0</AssemblyVersion></AssemblyInfo><ReturnValue><ReturnType>System.Boolean</ReturnType></ReturnValue><Docs><value>True if the current identity was authenticated, false otherwise.</value><remarks>To be added</remarks><summary><attribution license="cc4" from="Microsoft" modified="false" /><para>Gets a value indicating whether the user has been authenticated by Windows.</para></summary></Docs></Member><Member MemberName="IsGuest"><MemberSignature Language="C#" Value="public virtual bool IsGuest { get; }" /><MemberSignature Language="ILAsm" Value=".property instance bool IsGuest" /><MemberType>Property</MemberType><AssemblyInfo><AssemblyVersion>1.0.5000.0</AssemblyVersion><AssemblyVersion>2.0.0.0</AssemblyVersion><AssemblyVersion>4.0.0.0</AssemblyVersion></AssemblyInfo><ReturnValue><ReturnType>System.Boolean</ReturnType></ReturnValue><Docs><value>True if the current identity is guest, false otherwise.</value><remarks>To be added</remarks><summary><attribution license="cc4" from="Microsoft" modified="false" /><para>Gets a value indicating whether the user account is identified as a <see cref="F:System.Security.Principal.WindowsAccountType.Guest" /> account by the system.</para></summary></Docs></Member><Member MemberName="IsSystem"><MemberSignature Language="C#" Value="public virtual bool IsSystem { get; }" /><MemberSignature Language="ILAsm" Value=".property instance bool IsSystem" /><MemberType>Property</MemberType><AssemblyInfo><AssemblyVersion>1.0.5000.0</AssemblyVersion><AssemblyVersion>2.0.0.0</AssemblyVersion><AssemblyVersion>4.0.0.0</AssemblyVersion></AssemblyInfo><ReturnValue><ReturnType>System.Boolean</ReturnType></ReturnValue><Docs><value>True if the current identity is SYSTEM, false otherwise.</value><remarks>To be added</remarks><summary><attribution license="cc4" from="Microsoft" modified="false" /><para>Gets a value indicating whether the user account is identified as a <see cref="F:System.Security.Principal.WindowsAccountType.System" /> account by the system.</para></summary></Docs></Member><Member MemberName="Name"><MemberSignature Language="C#" Value="public virtual string Name { get; }" /><MemberSignature Language="ILAsm" Value=".property instance string Name" /><MemberType>Property</MemberType><AssemblyInfo><AssemblyVersion>1.0.5000.0</AssemblyVersion><AssemblyVersion>2.0.0.0</AssemblyVersion><AssemblyVersion>4.0.0.0</AssemblyVersion></AssemblyInfo><ReturnValue><ReturnType>System.String</ReturnType></ReturnValue><Docs><value>Textual representation of the current identity (e.g. user name). </value><remarks><attribution license="cc4" from="Microsoft" modified="false" /><para>The logon name is in the form DOMAIN\USERNAME.</para></remarks><summary><attribution license="cc4" from="Microsoft" modified="false" /><para>Gets the user's Windows logon name.</para></summary></Docs></Member><Member MemberName="Owner"><MemberSignature Language="C#" Value="public System.Security.Principal.SecurityIdentifier Owner { get; }" /><MemberSignature Language="ILAsm" Value=".property instance class System.Security.Principal.SecurityIdentifier Owner" /><MemberType>Property</MemberType><AssemblyInfo><AssemblyVersion>2.0.0.0</AssemblyVersion><AssemblyVersion>4.0.0.0</AssemblyVersion></AssemblyInfo><Attributes><Attribute><AttributeName>System.Runtime.InteropServices.ComVisible(false)</AttributeName></Attribute></Attributes><ReturnValue><ReturnType>System.Security.Principal.SecurityIdentifier</ReturnType></ReturnValue><Docs><value>To be added.</value><since version=".NET 2.0" /><remarks><attribution license="cc4" from="Microsoft" modified="false" /><para>The SID uniquely identifies a user or group on all Windows NT implementations.  The returned SID identifies the default owner SID that will be applied to newly created objects.</para></remarks><summary><attribution license="cc4" from="Microsoft" modified="false" /><para>Gets the security identifier (SID) for the token owner.</para></summary></Docs></Member><Member MemberName="System.Runtime.Serialization.IDeserializationCallback.OnDeserialization"><MemberSignature Language="C#" Value="void IDeserializationCallback.OnDeserialization (object sender);" /><MemberSignature Language="ILAsm" Value=".method hidebysig newslot virtual instance void System.Runtime.Serialization.IDeserializationCallback.OnDeserialization(object sender) cil managed" /><MemberType>Method</MemberType><AssemblyInfo><AssemblyVersion>1.0.5000.0</AssemblyVersion><AssemblyVersion>2.0.0.0</AssemblyVersion><AssemblyVersion>4.0.0.0</AssemblyVersion></AssemblyInfo><ReturnValue><ReturnType>System.Void</ReturnType></ReturnValue><Parameters><Parameter Name="sender" Type="System.Object" /></Parameters><Docs><remarks>To be added.</remarks><summary><attribution license="cc4" from="Microsoft" modified="false" /><para>Implements the <see cref="T:System.Runtime.Serialization.ISerializable" /> interface and is called back by the deserialization event when deserialization is complete.</para></summary><param name="sender"><attribution license="cc4" from="Microsoft" modified="false" />The source of the deserialization event. </param></Docs></Member><Member MemberName="System.Runtime.Serialization.ISerializable.GetObjectData"><MemberSignature Language="C#" Value="void ISerializable.GetObjectData (System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context);" /><MemberSignature Language="ILAsm" Value=".method hidebysig newslot virtual instance void System.Runtime.Serialization.ISerializable.GetObjectData(class System.Runtime.Serialization.SerializationInfo info, valuetype System.Runtime.Serialization.StreamingContext context) cil managed" /><MemberType>Method</MemberType><AssemblyInfo><AssemblyVersion>1.0.5000.0</AssemblyVersion><AssemblyVersion>2.0.0.0</AssemblyVersion><AssemblyVersion>4.0.0.0</AssemblyVersion></AssemblyInfo><ReturnValue><ReturnType>System.Void</ReturnType></ReturnValue><Parameters><Parameter Name="info" Type="System.Runtime.Serialization.SerializationInfo" /><Parameter Name="context" Type="System.Runtime.Serialization.StreamingContext" /></Parameters><Docs><remarks><attribution license="cc4" from="Microsoft" modified="false" /><para>This method sets a <see cref="T:System.Runtime.Serialization.SerializationInfo" /> with the logical call context information. During deserialization, the execution context object is reconstituted from the <see cref="T:System.Runtime.Serialization.SerializationInfo" /> transmitted over the stream.</para><para>For more information, see <see cref="T:System.Runtime.Serialization.SerializationInfo" />.</para></remarks><summary><attribution license="cc4" from="Microsoft" modified="false" /><para>Sets the <see cref="T:System.Runtime.Serialization.SerializationInfo" /> object with the logical context information needed to recreate an instance of this execution context.</para></summary><param name="info"><attribution license="cc4" from="Microsoft" modified="false" />An object containing the information required to serialize the <see cref="T:System.Collections.Hashtable" />. </param><param name="context"><attribution license="cc4" from="Microsoft" modified="false" />An object containing the source and destination of the serialized stream associated with the <see cref="T:System.Collections.Hashtable" />. </param></Docs></Member><Member MemberName="Token"><MemberSignature Language="C#" Value="public virtual IntPtr Token { get; }" /><MemberSignature Language="ILAsm" Value=".property instance native int Token" /><MemberType>Property</MemberType><AssemblyInfo><AssemblyVersion>1.0.5000.0</AssemblyVersion><AssemblyVersion>2.0.0.0</AssemblyVersion><AssemblyVersion>4.0.0.0</AssemblyVersion></AssemblyInfo><ReturnValue><ReturnType>System.IntPtr</ReturnType></ReturnValue><Docs><value>To be added: an object of type 'IntPtr'</value><remarks><attribution license="cc4" from="Microsoft" modified="false" /><para>Do not explicitly release the account token that is returned by the <see cref="P:System.Security.Principal.WindowsIdentity.Token" /> property. The token is released by the <see cref="M:System.Security.Principal.WindowsIdentity.Dispose" /> method, which you can call in code. <see cref="M:System.Security.Principal.WindowsIdentity.Dispose" /> is also automatically called by the garbage collector.</para><block subset="none" type="note"><para>The account token that is returned by the <see cref="P:System.Security.Principal.WindowsIdentity.Token" /> property is a duplicate of the Windows token that is used to create the <see cref="T:System.Security.Principal.WindowsIdentity" /> object and is automatically released by the .NET Framework. This is different from the account token (the <paramref name="userToken" /> parameter for the constructor), which is used to create the <see cref="T:System.Security.Principal.WindowsIdentity" /> object. <paramref name="userToken" /> is a Windows account token that is created by a call to <unmanagedCodeEntityReference>LogonUser</unmanagedCodeEntityReference> and must be closed to avoid a memory leak. </para></block></remarks><summary><attribution license="cc4" from="Microsoft" modified="false" /><para>Gets the Windows account token for the user.</para></summary></Docs></Member><Member MemberName="User"><MemberSignature Language="C#" Value="public System.Security.Principal.SecurityIdentifier User { get; }" /><MemberSignature Language="ILAsm" Value=".property instance class System.Security.Principal.SecurityIdentifier User" /><MemberType>Property</MemberType><AssemblyInfo><AssemblyVersion>2.0.0.0</AssemblyVersion><AssemblyVersion>4.0.0.0</AssemblyVersion></AssemblyInfo><Attributes><Attribute><AttributeName>System.Runtime.InteropServices.ComVisible(false)</AttributeName></Attribute></Attributes><ReturnValue><ReturnType>System.Security.Principal.SecurityIdentifier</ReturnType></ReturnValue><Docs><value>To be added.</value><since version=".NET 2.0" /><remarks><attribution license="cc4" from="Microsoft" modified="false" /><para>The SID uniquely identifies a user or group on all Windows NT implementations.  </para><block subset="none" type="note"><para>The <see cref="T:System.Security.Principal.WindowsIdentity" /> object returned by the <see cref="M:System.Security.Principal.WindowsIdentity.GetAnonymous" /> method is not the same as the Windows anonymous user. This property gets null for an anonymous user represented by the <see cref="T:System.Security.Principal.WindowsIdentity" /> object returned by the <see cref="M:System.Security.Principal.WindowsIdentity.GetAnonymous" /> method; it does not get the SID representing an anonymous Windows user.</para></block></remarks><summary><attribution license="cc4" from="Microsoft" modified="false" /><para>Gets the security identifier (SID) for the user.</para></summary></Docs></Member></Members></Type>