PersonalizationStateInfoCollection.IsSynchronized Propriedade
Definição
Obtém um valor que indica se o acesso à coleção PersonalizationStateInfoCollection é sincronizado (thread-safe).Gets a value indicating whether access to the PersonalizationStateInfoCollection collection is synchronized (thread safe).
public:
property bool IsSynchronized { bool get(); };
public bool IsSynchronized { get; }
member this.IsSynchronized : bool
Public ReadOnly Property IsSynchronized As Boolean
Valor da propriedade
O valor será true se o acesso à coleção for sincronizado; caso contrário, o valor será false.true if access to the collection is synchronized; otherwise, false. O valor é sempre false para PersonalizationStateInfoCollection objetos criados pelo conjunto de controle de Web Parts.The value is always false for PersonalizationStateInfoCollection objects created by the Web Parts control set.
Implementações
Comentários
A enumeração por meio de uma coleção não é um procedimento thread-safe intrínseco.Enumerating through a collection is intrinsically not a thread-safe procedure. Mesmo quando uma coleção está sincronizada, outros threads ainda podem modificar a coleção, o que faz o enumerador lançar uma exceção.Even when a collection is synchronized, other threads can still modify the collection, which causes the enumerator to throw an exception. Para garantir thread-safe durante a enumeração, é possível bloquear a coleção durante toda a enumeração ou verificar as exceções resultantes das alterações feitas por outros threads.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.
A SyncRoot propriedade retorna um objeto, que pode ser usado para sincronizar o acesso ao PersonalizationStateInfoCollection .The SyncRoot property returns an object, which can be used to synchronize access to the PersonalizationStateInfoCollection.