System.Security.Principal.GenericIdentity Class

Assembly: Mscorlib.dll
Namespace: System.Security.Principal
Summary
Represents a generic user.
C# Syntax:
[Serializable]
public class GenericIdentity : IIdentity
Remarks
An identity object represents the user on whose behalf the code is running.
See also:
System.Security.Principal Namespace

System.Security.Principal.GenericIdentity Member List:

Public Constructors
ctor #1 Overloaded:
.ctor(string name)

Initializes a new instance of the GenericIdentity class representing the user with the specified name.
ctor #2 Overloaded:
.ctor(string name, string type)

Initializes a new instance of the GenericIdentity class representing the user with the specified name and authentication type.
Public Properties
AuthenticationType Read-only

Gets the type of authentication used to identify the user.
IsAuthenticated Read-only

Gets a value indicating whether the user has been authenticated.
Name Read-only

Gets the user's name.
Public Methods
Equals
(inherited from System.Object)
See base class member description: System.Object.Equals

Derived from System.Object, the primary base class for all objects.
GetHashCode
(inherited from System.Object)
See base class member description: System.Object.GetHashCode

Derived from System.Object, the primary base class for all objects.
GetType
(inherited from System.Object)
See base class member description: System.Object.GetType

Derived from System.Object, the primary base class for all objects.
ToString
(inherited from System.Object)
See base class member description: System.Object.ToString

Derived from System.Object, the primary base class for all objects.
Protected Methods
Finalize
(inherited from System.Object)
See base class member description: System.Object.Finalize

Derived from System.Object, the primary base class for all objects.
MemberwiseClone
(inherited from System.Object)
See base class member description: System.Object.MemberwiseClone

Derived from System.Object, the primary base class for all objects.

Hierarchy:


System.Security.Principal.GenericIdentity Member Details

Overloaded ctor #1
Summary
Initializes a new instance of the GenericIdentity class representing the user with the specified name.
C# Syntax:
public GenericIdentity(
   string name
);
Parameters:

name

The name of the user on whose behalf the code is running.

Exceptions
Exception Type Condition
ArgumentNullException The name parameter is null.

Return to top


Overloaded ctor #2
Summary
Initializes a new instance of the GenericIdentity class representing the user with the specified name and authentication type.
C# Syntax:
public GenericIdentity(
   string name,
   string type
);
Parameters:

name

The name of the user on whose behalf the code is running.

type

The type of authentication used to identify the user.

Exceptions
Exception Type Condition
ArgumentNullException The name parameter is null.

-or-

The type parameter is null.

Return to top


Property: AuthenticationType (read-only)
Summary
Gets the type of authentication used to identify the user.
C# Syntax:
public virtual string AuthenticationType {get;}
Implements:
IIdentity.AuthenticationType

Return to top


Property: IsAuthenticated (read-only)
Summary
Gets a value indicating whether the user has been authenticated.
C# Syntax:
public virtual bool IsAuthenticated {get;}
Implements:
IIdentity.IsAuthenticated

Return to top


Property: Name (read-only)
Summary
Gets the user's name.
C# Syntax:
public virtual string Name {get;}
Implements:
IIdentity.Name

Return to top


Method: Equals(
   object obj
)
Inherited
See base class member description: System.Object.Equals
C# Syntax:
public virtual bool Equals(
   object obj
);

For more information on members inherited from System.Object click on the link above.

Return to top


Method: Finalize()
Inherited
See base class member description: System.Object.Finalize
C# Syntax:
~GenericIdentity();

For more information on members inherited from System.Object click on the link above.

Return to top


Method: GetHashCode()
Inherited
See base class member description: System.Object.GetHashCode
C# Syntax:
public virtual int GetHashCode();

For more information on members inherited from System.Object click on the link above.

Return to top


Method: GetType()
Inherited
See base class member description: System.Object.GetType
C# Syntax:
public Type GetType();

For more information on members inherited from System.Object click on the link above.

Return to top


Method: MemberwiseClone()
Inherited
See base class member description: System.Object.MemberwiseClone
C# Syntax:
protected object MemberwiseClone();

For more information on members inherited from System.Object click on the link above.

Return to top


Method: ToString()
Inherited
See base class member description: System.Object.ToString
C# Syntax:
public virtual string ToString();

For more information on members inherited from System.Object click on the link above.

Return to top


Top of page

Copyright (c) 2002 Microsoft Corporation. All rights reserved.