Chili.Opf3 Send comments on this topic.
ObjectInfo Class
See Also  Members   Example 
Chili.Opf3 Namespace : ObjectInfo Class




Implements all information that are required to remote or persist a persistent object to any kind of device.

Syntax

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

Example

C#Copy Code
            [Persistent("USER")] 
public class User : ISelfContainingObject 

    // ... Other properties and fields. 

  
// ... Other code 
  
// Loads a user object from the storage. 
ISelfContainingObject user =  
    (ISelfContainingObject)context.GetObject<User>("Id = {0}", "1"); 
// Checks if the object has been loaded. 
if (user.ObjectInfo.ObjectState == ObjectStates.Loaded) 

    Debug.WriteLine("Object has been loaded."); 

    

Remarks

This class contains all information to save a persistent object to any kind of device. It makes the persistent object independent from the ObjectContext. This object is returned by the ISelfContaining interface that is implemented if an object is remoted or persisted to a device (other then a storage). The interface should also be implemented if the object is loaded with one ObjectContext and then saved with another.

Attention: Please do not change any properties of this object from your code, since this could affect the stability of your application! If you implement some new kind of IConcurrencyManager you have to populate the ConcurrencyData property with your concurrency data. Other properties are not required to modify.

Inheritance Hierarchy

System.Object
   Chili.Opf3.ObjectInfo

Requirements

Namespace: Chili.Opf3

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