Share via


SetChildDirty Method (DateTime)

For the latest version of Commerce Server 2007 Help, see the Microsoft Web site.

Propagates change notifications, using the specified date and time generated by the child class that made the call.

Namespace:  Microsoft.CommerceServer.Runtime
Assembly:  Microsoft.CommerceServer.Runtime (in Microsoft.CommerceServer.Runtime.dll)

Syntax

'Declaration
Public MustOverride Sub SetChildDirty ( _
    modificationTime As DateTime _
)
'Usage
Dim instance As MappedStorageBase
Dim modificationTime As DateTime

instance.SetChildDirty(modificationTime)
public abstract void SetChildDirty(
    DateTime modificationTime
)
public:
virtual void SetChildDirty(
    DateTime modificationTime
) abstract
public abstract function SetChildDirty(
    modificationTime : DateTime
)

Parameters

Remarks

SetChildDirty(DateTime) is called by the SetDirty implementations within child classes to propagate the dirty state upward, eventually up to base OrderGroup-derived classes. Parent class implementations use this notification to update local "last updated" DateTime properties, and potentially to optimize update queries to storage.

Use this version of SetChildDirty(DateTime) when the child class propagates.

Root classes having no parent should implement this function as empty. Note that in the orders class hierarchy, only system-defined OrderGroup-derived classes can be root classes.

Examples

The following code example shows how to implement SetChildDirty(DateTime) for a parent class that is itself contained within a parent class.

using Microsoft.CommerceServer.Runtime;
class MyClass : MappedStorageBase
{
  void SetChildDirty(DateTime modificationTime)
  {
    // Check to see if StorageLoadInProgress is set - if so, skip
    // processing of this call.
    if (!StorageLoadInProgress)
    {
      // If there is a local DateTime property that stores a "last
      // modified" time,
      // update it here with the value passed in.
      // If this class is contained within a parent (e.g. an OrderForm
      // or OrderGroup),
      // notify that parent instance of a change in this class,
      // propagating the DateTime
      // value passed to us.
      this.myParentRef.SetChildDirty(modificationTime);
    }
  }
} 

Permissions

See Also

Reference

MappedStorageBase Class

MappedStorageBase Members

SetChildDirty Overload

Microsoft.CommerceServer.Runtime Namespace

StorageLoadInProgress

SetChildDirty