Chili.Opf3 Send comments on this topic.
TimeStampConcurrencyManager Class
See Also  Members   Example 
Chili.Opf3.Concurrency.TimeStamp Namespace : TimeStampConcurrencyManager Class




Implements the time stamp concurrency manager. This class uses a time stamp check to discover if somebody else has changed the object in the meantime.

Syntax

Visual Basic (Declaration) 
Public NotInheritable Class TimeStampConcurrencyManager 
   Implements IConcurrencyManager 
Visual Basic (Usage)Copy Code
Dim instance As TimeStampConcurrencyManager
C# 
public sealed class TimeStampConcurrencyManager : IConcurrencyManager  
Managed Extensions for C++ 
public __gc __sealed class TimeStampConcurrencyManager : public IConcurrencyManager  
C++/CLI 
public ref class TimeStampConcurrencyManager sealed : public IConcurrencyManager  

Example

The following example shows the usage of the class in your application.
C#Copy Code
             [Persistent("USER")] 
public class User 

    // ... Other code of the class. 
 
    [TimeStamp] 
                    [Field("TIME_STAMP")] 
    public string TimeStamp 
    { 
        // ... code of the property. 
    } 

 
// ... Other code 
 
// Creates a new ObjectContext that uses an MsSql Server as storage. 
ObjectContext context = new ObjectContext(new MsSqlStorage("sa", "", "localhost", "application")); 
// Set the time stamp concurrency manager. The ObjectContext uses it from  
// now on to check the concurrency. 
context.ConcurrencyManager = new TimeStampConcurrencyManager(); 
 
// ... Other code

Remarks

This class implements a time stamp check that is used to validate an object against the storage. It checks if somebody else changed the object in the meantime (while it has been in memory) and informs the ObjectContext whether a problem has been encountered.

Inheritance Hierarchy

System.Object
   Chili.Opf3.Concurrency.TimeStamp.TimeStampConcurrencyManager

Requirements

Namespace: Chili.Opf3.Concurrency.TimeStamp

Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

Assembly: Chili.Opf3 (in Chili.Opf3.dll)

See Also