GroupPrincipal 类

定义

封装组帐户。Encapsulates group accounts. 组帐户可以是出于管理目的而创建的主体对象或帐户的任意集合。Group accounts can be arbitrary collections of principal objects or accounts created for administrative purposes.

public ref class GroupPrincipal : System::DirectoryServices::AccountManagement::Principal
[System.DirectoryServices.AccountManagement.DirectoryRdnPrefix("CN")]
[System.Security.SecurityCritical(System.Security.SecurityCriticalScope.Everything)]
public class GroupPrincipal : System.DirectoryServices.AccountManagement.Principal
type GroupPrincipal = class
    inherit Principal
Public Class GroupPrincipal
Inherits Principal
继承
GroupPrincipal
属性

构造函数

GroupPrincipal(PrincipalContext)

使用指定的上下文初始化 GroupPrincipal 类的新实例。Initializes a new instance of the GroupPrincipal class by using the specified context.

GroupPrincipal(PrincipalContext, String)

初始化 GroupPrincipal 类的新实例并将该实例分配给指定的上下文和 SAM 帐户名。Initializes a new instance of the GroupPrincipal class and assigns it to the specified context and SAM account name.

属性

Context

获取与主体关联的主体上下文。Gets a principal context that is associated with the principal.

(继承自 Principal)
ContextRaw

获取与此主体关联的主体上下文。Gets a principal context that is associated with this principal.

(继承自 Principal)
ContextType

获取上下文类型枚举值,该值指定与此主体关联的主体上下文的类型。Gets the context type enumeration value that specifies the type of principal context associated with this principal.

(继承自 Principal)
Description

获取或设置主体的说明。Gets or sets the description of the principal.

(继承自 Principal)
DisplayName

获取或设置此主体的显示名称。Gets or sets the display name for this principal.

(继承自 Principal)
DistinguishedName

获取此主体的可分辨名称 (DN)。Gets the distinguished name (DN) for this principal.

(继承自 Principal)
GroupScope

获取或设置一个可以为 null 的 GroupScope 枚举,用于指定此组主体的范围。Gets or sets a Nullable GroupScope enumeration that specifies the scope for this group principal.

Guid

获取与此主体关联的 GUID。Gets the GUID associated with this principal.

(继承自 Principal)
IsSecurityGroup

获取或设置一个可以为 null 的布尔值,该值指示是否对组启用安全性。Gets or sets a Nullable Boolean value that indicates whether the group is security-enabled.

Members

获取主体对象的集合,这些对象表示组的成员。Gets a collection of principal objects that represent the members of the group.

Name

获取或设置此主体的名称。Gets or sets the name of this principal.

(继承自 Principal)
SamAccountName

获取或设置此主体的 SAM 帐户名。Gets or sets the SAM account name for this principal.

(继承自 Principal)
Sid

获取主体的安全 ID (SID)。Gets the Security ID (SID) of the principal.

(继承自 Principal)
StructuralObjectClass

获取结构对象类目录特性。Gets the structural object class directory attribute.

(继承自 Principal)
UserPrincipalName

获取或设置与此主体关联的用户主体名称 (UPN)。Gets or sets the user principal name (UPN) associated with this principal.

(继承自 Principal)

方法

CheckDisposedOrDeleted()

确定是否已对此类调用 Dispose()Delete() 方法。Determines whether the Dispose() or Delete() methods have been called on this class. 此方法由从此主体类派生的类调用。This method is called by classes that derive from this principal class.

(继承自 Principal)
Delete()

从存储区中删除主体对象。Deletes the principal object from the store.

(继承自 Principal)
Dispose()

处置 GroupPrincipal 对象的当前实例。Disposes the current instance of the GroupPrincipal object.

Equals(Object)

返回一个布尔值,该值指定提供的对象是否等于当前对象。Returns a Boolean value that specifies whether the supplied object is equal to the current object.

(继承自 Principal)
ExtensionGet(String)

检索扩展类对象的属性。Retrieves an attribute of an extended class object.

(继承自 Principal)
ExtensionSet(String, Object)

设置扩展类中特性的值。Sets the value of an attribute in an extended class.

(继承自 Principal)
FindByIdentity(PrincipalContext, IdentityType, String)

返回一个与指定的标识类型和值匹配的组主体对象。Returns a group principal object that matches the specified identity type, and value. 此版本的 FindByIdentity 方法确定标识值的格式。This version of the FindByIdentity method determines the format of the identity value.

FindByIdentity(PrincipalContext, String)

返回一个与指定的标识值匹配的组主体对象。Returns a group principal object that matches the specified identity value.

GetGroups()

返回组对象的集合,这些对象指定当前主体是其成员的组。Returns a collection of group objects that specify the groups of which the current principal is a member.

(继承自 Principal)
GetGroups(PrincipalContext)

返回组对象的集合,主体是这些对象的成员,并且这些对象存在于由指定的上下文参数提供的存储区中。Returns a collection of group objects that the principal is a member of and that exist in the store provided by the specified context parameter.

(继承自 Principal)
GetHashCode()

检索从主体对象的内容创建的哈希,适合在哈希算法和哈希表这样的数据结构中使用。Retrieves the hash created from the contents of the principal object, suited for use in hashing algorithms and data structures like a hash table.

(继承自 Principal)
GetMembers()

返回组中包含的主体对象的集合。Returns a collection of the principal objects that is contained in the group.

GetMembers(Boolean)

返回组中包含的主体对象的集合。Returns a collection of the principal objects that is contained in the group. 当递归标志设置为 true 时,此方法将以递归方式搜索当前组并返回所有嵌套的组成员。When the recursive flag is set to true, this method searches the current group recursively and returns all nested group members.

GetType()

获取当前实例的 TypeGets the Type of the current instance.

(继承自 Object)
GetUnderlyingObject()

返回基础 DirectoryEntry 对象,其将提供主体对象的联系人数据。Returns the underlying DirectoryEntry object that provides the contact data for the principal object.

(继承自 Principal)
GetUnderlyingObjectType()

返回基础对象类型。Returns the underlying object type.

(继承自 Principal)
IsMemberOf(GroupPrincipal)

返回一个布尔值,该值指定该主体是否是指定组的成员。Returns a Boolean value that specifies whether the principal is a member of the specified group.

(继承自 Principal)
IsMemberOf(PrincipalContext, IdentityType, String)

返回一个布尔值,该值指定该主体是否是由标识类型和值指定的组的成员。Returns a Boolean value that specifies whether the principal is a member of the group specified by identity type and value.

(继承自 Principal)
MemberwiseClone()

创建当前 Object 的浅表副本。Creates a shallow copy of the current Object.

(继承自 Object)
Save()

将对主体对象所做的更改保存到存储区中。Saves the changes that were made on the principal object to the store. 如果它是一个新主体对象,则此方法会将其插入到存储区中。If this is a new principal object, this method inserts it into the store.

(继承自 Principal)
Save(PrincipalContext)

将对主体对象所做的更改保存到存储区中。Saves the changes that were made on the principal object to the store. 如果它是一个新主体对象,则此方法会将其插入到指定上下文中。If this is a new principal object, this method inserts it into the specified context. 如果已保持主体,则会将该主体从原来的上下文移动到指定的上下文中。If the principal has already been persisted, it is moved from the original context to the specified context.

(继承自 Principal)
ToString()

返回当前主体对象的用户友好字符串表示形式。Returns a user friendly string representation of the current principal object.

(继承自 Principal)

适用于