Used to enforce SimpleDB consistent reads with limited scope.

Namespace: Simol.Consistency
Assembly: Simol (in Simol.dll) Version: 1.0.0.0

Syntax

C#
public class ConsistentReadScope : IDisposable
Visual Basic
Public Class ConsistentReadScope _
	Implements IDisposable
Visual C++
public ref class ConsistentReadScope : IDisposable

Remarks

To use consistent reads for a single operation or set of operations, create an instance of this class and dispose it when you wish to return to using "normal" reads. All read operations on the current thread will be performed using consistent reads for the life of the instance. For example:
CopyC#
// all read operations in the using block will return "consistent" data
using (new ConsistentReadScope()) {
    Person p = Simol.Get<Person>(personId);
    List<Employee> employees = Simol.Select<Employee>("select * from Employees");
}

Inheritance Hierarchy

System..::..Object
  Simol.Consistency..::..ConsistentReadScope

See Also