संपादित करें

इसके माध्यम से साझा किया गया


PrincipalContext Class

Definition

Encapsulates the server or domain against which all operations are performed, the container that is used as the base of those operations, and the credentials used to perform the operations.

public ref class PrincipalContext : IDisposable
public class PrincipalContext : IDisposable
[System.Security.SecurityCritical(System.Security.SecurityCriticalScope.Everything)]
public class PrincipalContext : IDisposable
type PrincipalContext = class
    interface IDisposable
[<System.Security.SecurityCritical(System.Security.SecurityCriticalScope.Everything)>]
type PrincipalContext = class
    interface IDisposable
Public Class PrincipalContext
Implements IDisposable
Inheritance
PrincipalContext
Attributes
Implements

Remarks

For search operations, the principal context defines the search base, and for insert operations the context defines the container into which the object is inserted.

Constructors

PrincipalContext(ContextType, String, String, ContextOptions, String, String)

Initializes a new instance of the PrincipalContext class with the specified context type, name, container, context options, username, and password.

PrincipalContext(ContextType, String, String, ContextOptions)

Initializes a new instance of the PrincipalContext class with the specified context type, name, container, and context options.

PrincipalContext(ContextType, String, String, String, String)

Initializes a new instance of the PrincipalContext class with the specified context type, name, container, username, and password.

PrincipalContext(ContextType, String, String, String)

Initializes a new instance of the PrincipalContext class with the specified context type, name, username, and password.

PrincipalContext(ContextType, String, String)

Initializes a new instance of the PrincipalContext class with the specified context type, name, and container.

PrincipalContext(ContextType, String)

Initializes a new instance of the PrincipalContext class with the specified context type and name.

PrincipalContext(ContextType)

Initializes a new instance of the PrincipalContext class with the specified context type.

Properties

ConnectedServer

Gets the name of the server to which the principal context is connected.

Container

Gets the value specified in the container parameter in the constructor.

ContextType

Gets the context type that specifies the type of store for the principal context.

Name

Gets the value specified as the name parameter in the constructor.

Options

Gets the options specified in the contextOptions parameter of the constructor.

UserName

Gets the value specified in the username parameter in the constructor.

Methods

Dispose()

Disposes the current instance of the PrincipalContext object.

Equals(Object)

Determines whether the specified object is equal to the current object.

(Inherited from Object)
GetHashCode()

Serves as the default hash function.

(Inherited from Object)
GetType()

Gets the Type of the current instance.

(Inherited from Object)
MemberwiseClone()

Creates a shallow copy of the current Object.

(Inherited from Object)
ToString()

Returns a string that represents the current object.

(Inherited from Object)
ValidateCredentials(String, String, ContextOptions)

Creates the connections to the server and returns a Boolean value that specifies whether the specified user name and password are valid. This method performs fast credential validation of the username and password.

ValidateCredentials(String, String)

Creates the connections to the server and returns a Boolean value that specifies whether the specified username and password are valid.

Applies to