Share via


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 CommerceResourceCollection is synchronized (thread-safe).

Namespace:  Microsoft.CommerceServer.Runtime.Configuration
Assembly:  Microsoft.CommerceServer.Shared (in Microsoft.CommerceServer.Shared.dll)

Syntax

'Declaration
Public ReadOnly Property IsSynchronized As Boolean
'Usage
Dim instance As CommerceResourceCollection
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

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.

Permissions

See Also

Reference

CommerceResourceCollection Class

CommerceResourceCollection Members

Microsoft.CommerceServer.Runtime.Configuration Namespace