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. 有关详细信息,请参阅 UsePropertyCacheFor 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

适用于

另请参阅