DirectoryEntry.CommitChanges 方法
定义
将目录项所作更改保存到基础目录存储中。Saves changes that are made to a directory entry to the underlying directory store.
public:
void CommitChanges();
public void CommitChanges ();
member this.CommitChanges : unit -> unit
Public Sub CommitChanges ()
注解
默认情况下,对属性所做的更改将在本地对缓存进行,并且在第一次读取后缓存属性值。By default, changes to properties are made locally to a cache, and property values to be read are cached after the first read. 有关详细信息,请参阅 UsePropertyCache。For more information, see UsePropertyCache.
对缓存所做的更改包括对属性的更改, Add 如果这是新创建的) 条目,则为对 (的调用。Changes made to the cache include changes to the properties as well as calls to Add (if this is the newly created entry).
注意
如果在 RefreshCache 调用之前调用 CommitChanges ,对属性缓存的任何未提交的更改都将丢失。If you call RefreshCache before calling CommitChanges, any uncommitted changes to the property cache will be lost.
安全性Security
- 使用 DirectoryServicesPermission 类来读取、写入、删除、更改和添加到 Active Directory 域服务层次结构。Use the DirectoryServicesPermission class for reading, writing, deleting, changing, and adding to the Active Directory Domain Services hierarchy. 关联的枚举:DirectoryServicesPermissionAccess。Associated enumeration: DirectoryServicesPermissionAccess.