The requested page is not available for the requested platform. You are viewing the content for .NET Framework 4.5.2+ platform.

XPMemberInfo.IsDelayed Property

Gets whether the property is marked as delayed.

Namespace: DevExpress.Xpo.Metadata

Assembly: DevExpress.Xpo.v19.1.dll

Declaration

public bool IsDelayed { get; }
Public ReadOnly Property IsDelayed As Boolean
public bool IsDelayed { get; }
Public ReadOnly Property IsDelayed As Boolean

Property Value

Type Description
Boolean

true if the property is marked as delayed; otherwise, false.

Property Value

Type Description
Boolean

true if the property is marked as delayed; otherwise, false.

Remarks

A property is delayed if its value remains unassigned after the persistent object has been loaded. The property will be loaded the first time it is accessed.

See the DelayedAttribute topic for information on how to delay the loading of the property.

Examples

The following example demonstrates how to delay the loading of the DelayedAttachment property and improve property value update performance, by enabling the DelayedAttribute.UpdateModifiedOnly property.

Note

This solution uses the XPDelayedProperty object explicitly and doesn't raise property change notifications in all scenarios. You may need to explicitly call the Session.Save method after modifying the property value to save changes. Alternatively, implement the delayed property as shown in the Delayed Loading article.

using DevExpress.Xpo;

public class Customer : XPObject {
   // ...
   private XPDelayedProperty document = new XPDelayedProperty();
   // Improve update performance for the property's value
   // by passing true as the attribute's
   // updateModifiedOnly parameter.
   [Delayed("document", true)]
   public Byte[] DelayedAttachment {
      get { return (Byte[])document.Value; }
      set { document.Value = value; }
   }
}
See Also