DsmlResponseDocument.SyncRoot 属性

定义

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

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

属性值

Object

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

注解

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

适用于