DsmlRequestDocument.SyncRoot 属性

定义

SyncRoot 属性包含一个可用于同步对 DsmlRequestDocument 的访问的对象。The SyncRoot property contains an object that can be used to synchronize access to the DsmlRequestDocument.

protected:
 property System::Object ^ SyncRoot { System::Object ^ get(); };
protected object SyncRoot { get; }
member this.SyncRoot : obj
Protected ReadOnly Property SyncRoot As Object

属性值

可用于同步对 DsmlRequestDocument 的访问的对象。An object that can be used to synchronize access to the DsmlRequestDocument.

实现

注解

派生类可以DsmlRequestDocument SyncRoot使用属性提供的同步版本。Derived classes can provide synchronized versions of the DsmlRequestDocument using the SyncRoot property. 同步代码必须对的执行操作SyncRoot DsmlRequestDocument DsmlRequestDocument, 而不是直接在上执行操作。The synchronizing code must perform operations on the SyncRoot of the DsmlRequestDocument, not directly on the DsmlRequestDocument. 这样可确保对从其他对象派生的集合正确地执行操作。This ensures proper operation of collections that are derived from other objects. 具体而言, 它与可能同时修改DsmlRequestDocument对象的其他线程保持正确的同步。Specifically, it maintains proper synchronization with other threads that might be simultaneously modifying the DsmlRequestDocument object.

适用于