<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" />
  <AssemblyInfo>
    <AssemblyName>mscorlib</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>
  <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>
  <Docs>
    <summary>This class represent an operating system identity (user).</summary>
    <remarks>
      <para>The WindowsIdentity class can also be used on POSIX compliant operating system.</para>
      <example>
        <code lang="C#">
// are we running on UNIX ?
switch ((int)Environment.OSVersion.Platform) {
	case 4:		// new value added by MS in 2.0 framework
	case 128:		// old value used by Mono for 1.x framework
		// then if UID is 0 you're root!
		if (WindowsIdentity.GetCurrent ().Token == IntPtr.Zero) {
        	       Console.WriteLine ("Cool you're root!");
		}
		break;
	default:
		Console.WriteLine ("You're not running on a Unix-like operating system");
		break;
	}
}
  </code>
      </example>
    </remarks>
  </Docs>
  <Members>
    <Member MemberName=".ctor">
      <MemberSignature Language="C#" Value="public WindowsIdentity (IntPtr userToken);" />
      <MemberType>Constructor</MemberType>
      <ReturnValue />
      <Parameters>
        <Parameter Name="userToken" Type="System.IntPtr" />
      </Parameters>
      <Docs>
        <param name="userToken">The user token.</param>
        <summary>Create a new WindowsIdentity instance based on the specified user token.</summary>
        <remarks>To be added</remarks>
      </Docs>
    </Member>
    <Member MemberName=".ctor">
      <MemberSignature Language="C#" Value="public WindowsIdentity (string sUserPrincipalName);" />
      <MemberType>Constructor</MemberType>
      <Parameters>
        <Parameter Name="sUserPrincipalName" Type="System.String" />
      </Parameters>
      <Docs>
        <param name="sUserPrincipalName">The user principal name.</param>
        <summary>Create a new WindowsIdentity instance based on the specified user principal name. </summary>
        <remarks>Currently this constructor is only supported on POSIX compliant oiperating systems.</remarks>
      </Docs>
    </Member>
    <Member MemberName=".ctor">
      <MemberSignature Language="C#" Value="public WindowsIdentity (IntPtr userToken, string type);" />
      <MemberType>Constructor</MemberType>
      <ReturnValue />
      <Parameters>
        <Parameter Name="userToken" Type="System.IntPtr" />
        <Parameter Name="type" Type="System.String" />
      </Parameters>
      <Docs>
        <param name="userToken">The user token.</param>
        <param name="type">The name of the authentication method used to authentify the current identity.</param>
        <summary>Create a new WindowsIdentity instance based on the specified user token.</summary>
        <remarks>To be added</remarks>
      </Docs>
    </Member>
    <Member MemberName=".ctor">
      <MemberSignature Language="C#" Value="public WindowsIdentity (System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context);" />
      <MemberType>Constructor</MemberType>
      <Parameters>
        <Parameter Name="info" Type="System.Runtime.Serialization.SerializationInfo" />
        <Parameter Name="context" Type="System.Runtime.Serialization.StreamingContext" />
      </Parameters>
      <Docs>
        <param name="info">To be added.</param>
        <param name="context">To be added.</param>
        <summary>Create a new WindowsIdentity instance based on the serialized informations. </summary>
        <remarks>To be added.</remarks>
      </Docs>
    </Member>
    <Member MemberName=".ctor">
      <MemberSignature Language="C#" Value="public WindowsIdentity (string sUserPrincipalName, string type);" />
      <MemberType>Constructor</MemberType>
      <Parameters>
        <Parameter Name="sUserPrincipalName" Type="System.String" />
        <Parameter Name="type" Type="System.String" />
      </Parameters>
      <Docs>
        <param name="sUserPrincipalName">The user principal name.</param>
        <param name="type">The name of the authentication method used to authentify the current identity.</param>
        <summary>Create a new WindowsIdentity instance based on the specified user principal name.</summary>
        <remarks>Currently this constructor is only supported on POSIX compliant oiperating systems.</remarks>
      </Docs>
    </Member>
    <Member MemberName=".ctor">
      <MemberSignature Language="C#" Value="public WindowsIdentity (IntPtr userToken, string type, System.Security.Principal.WindowsAccountType acctType);" />
      <MemberType>Constructor</MemberType>
      <ReturnValue />
      <Parameters>
        <Parameter Name="userToken" Type="System.IntPtr" />
        <Parameter Name="type" Type="System.String" />
        <Parameter Name="acctType" Type="System.Security.Principal.WindowsAccountType" />
      </Parameters>
      <Docs>
        <param name="userToken">The user token.</param>
        <param name="type">The name of the authentication method used to authentify the current identity.</param>
        <param name="acctType">The type of Windows account associated with the identity.</param>
        <summary>Create a new WindowsIdentity instance based on the specified user token.</summary>
        <remarks>To be added</remarks>
      </Docs>
    </Member>
    <Member MemberName=".ctor">
      <MemberSignature Language="C#" Value="public WindowsIdentity (IntPtr userToken, string type, System.Security.Principal.WindowsAccountType acctType, bool isAuthenticated);" />
      <MemberType>Constructor</MemberType>
      <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>
        <param name="userToken">The user token.</param>
        <param name="type">The name of the authentication method used to authentify the current identity.</param>
        <param name="acctType">The type of Windows account associated with the identity.</param>
        <param name="isAuthenticated">The authentication status.</param>
        <summary>Create a new WindowsIdentity instance based on the specified user token.</summary>
        <remarks>To be added</remarks>
      </Docs>
    </Member>
    <Member MemberName="AuthenticationType">
      <MemberSignature Language="C#" Value="public string AuthenticationType { get; };" />
      <MemberType>Property</MemberType>
      <ReturnValue>
        <ReturnType>System.String</ReturnType>
      </ReturnValue>
      <Docs>
        <summary>The name of the authentication method used to authentify the current identity.</summary>
        <value>The authentication method (e.g. NTLM, POSIX ...).</value>
        <remarks>To be added</remarks>
      </Docs>
    </Member>
    <Member MemberName="Dispose">
      <MemberSignature Language="C#" Value="public void Dispose ();" />
      <MemberType>Method</MemberType>
      <ReturnValue>
        <ReturnType>System.Void</ReturnType>
      </ReturnValue>
      <Parameters />
      <Docs>
        <summary>To be added.</summary>
        <remarks>To be added.</remarks>
        <since version=".NET 2.0" />
      </Docs>
    </Member>
    <Member MemberName="Dispose">
      <MemberSignature Language="C#" Value="protected virtual void Dispose (bool disposing);" />
      <MemberType>Method</MemberType>
      <ReturnValue>
        <ReturnType>System.Void</ReturnType>
      </ReturnValue>
      <Parameters>
        <Parameter Name="disposing" Type="System.Boolean" />
      </Parameters>
      <Docs>
        <param name="disposing">To be added.</param>
        <summary>To be added.</summary>
        <remarks>To be added.</remarks>
        <since version=".NET 2.0" />
      </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>
    </Member>
    <Member MemberName="GetAnonymous">
      <MemberSignature Language="C#" Value="public static System.Security.Principal.WindowsIdentity GetAnonymous ();" />
      <MemberType>Method</MemberType>
      <ReturnValue>
        <ReturnType>System.Security.Principal.WindowsIdentity</ReturnType>
      </ReturnValue>
      <Parameters />
      <Docs>
        <summary>Return the operating system anonymous identity. </summary>
        <returns>To be added: an object of type 'WindowsIdentity'</returns>
        <remarks>On POSIX compliant system the anonymous identity is mapped to the "nobody" user account.</remarks>
      </Docs>
    </Member>
    <Member MemberName="GetCurrent">
      <MemberSignature Language="C#" Value="public static System.Security.Principal.WindowsIdentity GetCurrent ();" />
      <MemberType>Method</MemberType>
      <ReturnValue>
        <ReturnType>System.Security.Principal.WindowsIdentity</ReturnType>
      </ReturnValue>
      <Parameters />
      <Docs>
        <summary>Return the current operating system identity (user).</summary>
        <returns>a WindowsIdentity instance representing the current user.</returns>
        <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>
      </Docs>
    </Member>
    <Member MemberName="GetCurrent">
      <MemberSignature Language="C#" Value="public static System.Security.Principal.WindowsIdentity GetCurrent (bool ifImpersonating);" />
      <MemberType>Method</MemberType>
      <ReturnValue>
        <ReturnType>System.Security.Principal.WindowsIdentity</ReturnType>
      </ReturnValue>
      <Parameters>
        <Parameter Name="ifImpersonating" Type="System.Boolean" />
      </Parameters>
      <Docs>
        <param name="ifImpersonating">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>
    <Member MemberName="GetCurrent">
      <MemberSignature Language="C#" Value="public static System.Security.Principal.WindowsIdentity GetCurrent (System.Security.Principal.TokenAccessLevels desiredAccess);" />
      <MemberType>Method</MemberType>
      <ReturnValue>
        <ReturnType>System.Security.Principal.WindowsIdentity</ReturnType>
      </ReturnValue>
      <Parameters>
        <Parameter Name="desiredAccess" Type="System.Security.Principal.TokenAccessLevels" />
      </Parameters>
      <Docs>
        <param name="desiredAccess">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>
    <Member MemberName="Groups">
      <MemberSignature Language="C#" Value="public System.Security.Principal.IdentityReferenceCollection Groups { get; };" />
      <MemberType>Property</MemberType>
      <ReturnValue>
        <ReturnType>System.Security.Principal.IdentityReferenceCollection</ReturnType>
      </ReturnValue>
      <Docs>
        <summary>To be added.</summary>
        <value>To be added.</value>
        <remarks>To be added.</remarks>
        <since version=".NET 2.0" />
      </Docs>
    </Member>
    <Member MemberName="Impersonate">
      <MemberSignature Language="C#" Value="public virtual System.Security.Principal.WindowsImpersonationContext Impersonate ();" />
      <MemberType>Method</MemberType>
      <ReturnValue>
        <ReturnType>System.Security.Principal.WindowsImpersonationContext</ReturnType>
      </ReturnValue>
      <Parameters />
      <Docs>
        <summary>Impersonate the instance identity (user).</summary>
        <returns>To be added: an object of type 'WindowsImpersonationContext'</returns>
        <remarks>To be added</remarks>
      </Docs>
    </Member>
    <Member MemberName="Impersonate">
      <MemberSignature Language="C#" Value="public static System.Security.Principal.WindowsImpersonationContext Impersonate (IntPtr userToken);" />
      <MemberType>Method</MemberType>
      <ReturnValue>
        <ReturnType>System.Security.Principal.WindowsImpersonationContext</ReturnType>
      </ReturnValue>
      <Parameters>
        <Parameter Name="userToken" Type="System.IntPtr" />
      </Parameters>
      <Docs>
        <param name="userToken">To be added: an object of type 'IntPtr'</param>
        <summary>Impersonate the identity identified by the specified token.</summary>
        <returns>To be added: an object of type 'WindowsImpersonationContext'</returns>
        <remarks>To be added</remarks>
      </Docs>
    </Member>
    <Member MemberName="ImpersonationLevel">
      <MemberSignature Language="C#" Value="public System.Security.Principal.TokenImpersonationLevel ImpersonationLevel { get; };" />
      <MemberType>Property</MemberType>
      <Attributes>
        <Attribute>
          <AttributeName>System.Runtime.InteropServices.ComVisible(false)</AttributeName>
        </Attribute>
      </Attributes>
      <ReturnValue>
        <ReturnType>System.Security.Principal.TokenImpersonationLevel</ReturnType>
      </ReturnValue>
      <Docs>
        <summary>To be added.</summary>
        <value>To be added.</value>
        <remarks>To be added.</remarks>
        <since version=".NET 2.0" />
      </Docs>
    </Member>
    <Member MemberName="IsAnonymous">
      <MemberSignature Language="C#" Value="public virtual bool IsAnonymous { get; };" />
      <MemberType>Property</MemberType>
      <ReturnValue>
        <ReturnType>System.Boolean</ReturnType>
      </ReturnValue>
      <Docs>
        <summary>Returns if the current identity represents an anonymous identity.</summary>
        <value>True if the current identity is anonymous, false otherwise.</value>
        <remarks>To be added</remarks>
      </Docs>
    </Member>
    <Member MemberName="IsAuthenticated">
      <MemberSignature Language="C#" Value="public virtual bool IsAuthenticated { get; };" />
      <MemberType>Property</MemberType>
      <ReturnValue>
        <ReturnType>System.Boolean</ReturnType>
      </ReturnValue>
      <Docs>
        <summary>Returns if the current identity was authenticated.</summary>
        <value>True if the current identity was authenticated, false otherwise.</value>
        <remarks>To be added</remarks>
      </Docs>
    </Member>
    <Member MemberName="IsGuest">
      <MemberSignature Language="C#" Value="public virtual bool IsGuest { get; };" />
      <MemberType>Property</MemberType>
      <ReturnValue>
        <ReturnType>System.Boolean</ReturnType>
      </ReturnValue>
      <Docs>
        <summary>Returns if the current identity represents an guest identity.</summary>
        <value>True if the current identity is guest, false otherwise.</value>
        <remarks>To be added</remarks>
      </Docs>
    </Member>
    <Member MemberName="IsSystem">
      <MemberSignature Language="C#" Value="public virtual bool IsSystem { get; };" />
      <MemberType>Property</MemberType>
      <ReturnValue>
        <ReturnType>System.Boolean</ReturnType>
      </ReturnValue>
      <Docs>
        <summary>Returns if the current identity represents the SYSTEM identity.</summary>
        <value>True if the current identity is SYSTEM, false otherwise.</value>
        <remarks>To be added</remarks>
      </Docs>
    </Member>
    <Member MemberName="Name">
      <MemberSignature Language="C#" Value="public virtual string Name { get; };" />
      <MemberType>Property</MemberType>
      <ReturnValue>
        <ReturnType>System.String</ReturnType>
      </ReturnValue>
      <Docs>
        <summary>Current name of the identity.</summary>
        <value>Textual representation of the current identity (e.g. user name). </value>
        <remarks>To be added</remarks>
      </Docs>
    </Member>
    <Member MemberName="Owner">
      <MemberSignature Language="C#" Value="public System.Security.Principal.SecurityIdentifier Owner { get; };" />
      <MemberType>Property</MemberType>
      <Attributes>
        <Attribute>
          <AttributeName>System.Runtime.InteropServices.ComVisible(false)</AttributeName>
        </Attribute>
      </Attributes>
      <ReturnValue>
        <ReturnType>System.Security.Principal.SecurityIdentifier</ReturnType>
      </ReturnValue>
      <Docs>
        <summary>To be added.</summary>
        <value>To be added.</value>
        <remarks>To be added.</remarks>
        <since version=".NET 2.0" />
      </Docs>
    </Member>
    <Member MemberName="System.Runtime.Serialization.IDeserializationCallback.OnDeserialization">
      <MemberSignature Language="C#" Value="void IDeserializationCallback.OnDeserialization (object sender);" />
      <MemberType>Method</MemberType>
      <ReturnValue>
        <ReturnType>System.Void</ReturnType>
      </ReturnValue>
      <Parameters>
        <Parameter Name="sender" Type="System.Object" />
      </Parameters>
      <Docs>
        <param name="sender">To be added.</param>
        <summary>To be added.</summary>
        <remarks>To be added.</remarks>
      </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);" />
      <MemberType>Method</MemberType>
      <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>
        <param name="info">To be added.</param>
        <param name="context">To be added.</param>
        <summary>To be added.</summary>
        <remarks>To be added.</remarks>
      </Docs>
    </Member>
    <Member MemberName="Token">
      <MemberSignature Language="C#" Value="public virtual IntPtr Token { get; };" />
      <MemberType>Property</MemberType>
      <ReturnValue>
        <ReturnType>System.IntPtr</ReturnType>
      </ReturnValue>
      <Docs>
        <summary>Return the current user token.</summary>
        <value>To be added: an object of type 'IntPtr'</value>
        <remarks>To be added</remarks>
      </Docs>
    </Member>
    <Member MemberName="User">
      <MemberSignature Language="C#" Value="public System.Security.Principal.SecurityIdentifier User { get; };" />
      <MemberType>Property</MemberType>
      <Attributes>
        <Attribute>
          <AttributeName>System.Runtime.InteropServices.ComVisible(false)</AttributeName>
        </Attribute>
      </Attributes>
      <ReturnValue>
        <ReturnType>System.Security.Principal.SecurityIdentifier</ReturnType>
      </ReturnValue>
      <Docs>
        <summary>To be added.</summary>
        <value>To be added.</value>
        <remarks>To be added.</remarks>
        <since version=".NET 2.0" />
      </Docs>
    </Member>
  </Members>
  <Attributes>
    <Attribute>
      <AttributeName>System.Runtime.InteropServices.ComVisible(true)</AttributeName>
    </Attribute>
  </Attributes>
</Type>
