Export (0) Print
Expand All

WeakEventManager.ReadLock Property

Establishes a read-lock on the underlying data table, and returns an IDisposable.

Namespace: System.Windows
Assembly: WindowsBase (in windowsbase.dll)
XML Namespace:  http://schemas.microsoft.com/winfx/2006/xaml/presentation

protected IDisposable ReadLock { get; }
/** @property */
protected IDisposable get_ReadLock ()

protected function get ReadLock () : IDisposable

You cannot use this property in XAML.

Property Value

An object that can be used to establish a lock on the data table members and then be appropriately disposed, via a using construct.

In derived classes, queries to the table contained in Item should always occur within a using (ReadLock) { ... } clause, except for queries that are already within a write lock. Such queries may be necessary if your class supports a more sophisticated AddListener implementation that requires more data beyond the source and the listener, and uses the Item collection to store the extra informatiom.

Windows 98, Windows Server 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0

Community Additions

ADD
Show:
© 2014 Microsoft