IsSynchronized Property
For the latest version of Commerce Server 2007 Help, see the Microsoft Web site.
Gets a value indicating whether access to the current ContentSelectionContextCollection is synchronized (thread-safe).
Namespace: Microsoft.CommerceServer.Runtime.Targeting
Assembly: Microsoft.CommerceServer.Runtime (in Microsoft.CommerceServer.Runtime.dll)
Syntax
'Declaration
Public ReadOnly Property IsSynchronized As Boolean
'Usage
Dim instance As ContentSelectionContextCollection
Dim value As Boolean
value = instance.IsSynchronized
public bool IsSynchronized { get; }
public:
virtual property bool IsSynchronized {
bool get () sealed;
}
public final function get IsSynchronized () : boolean
Property Value
Type: System..::.Boolean
false in all cases.
Implements
ICollection..::.IsSynchronized
Remarks
This property is derived from the ICollection interface and is overridden to always return false.
Enumerating through a collection is intrinsically not a thread-safe procedure. Even when a collection is synchronized, other threads could still modify the collection, which causes the enumerator to throw an exception. To guarantee thread safety during enumeration, you can either lock the collection during the entire enumeration or catch the exceptions resulting from changes made by other threads.
For more information on the IsSynchronized property, see IsSynchronized property of the ICollection interface.
Permissions
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.
See Also
Reference
ContentSelectionContextCollection Class