Persistate API documentation
SetModified Method
NamespacesPersistatePersistentSetModified()()()()

[This is preliminary documentation and is subject to change.]

Signals to Persistate that an object has been modified.
Declaration Syntax
C#
protected internal void SetModified()
Remarks

This method is normally called from generated code. If you look at the set method of a generated property it will look something like

CopyC#
set { SetModified();  myMember = value;  OnModified(); }

This is executed every time you set a property. If an object has already been modified in the current transaction, the the call to SetModified is very fast. However for time critical processing, you may want to set the fields behind each property manually - in this case myMember.

If you set fields directly, you should call this method directly too. You should do this before you modify your first field. You should also call OnModified()()()() at an appropriate time. This raises the Modified event for this object. and InstanceModified for its ObjectClass and base classes.

This method sets the Modified flag so that IsModified returns true, and makes a copy of the object which is available through the PreviousVersion property. This copy is made using Clone()()()() which you can override if you wish, but only if this object's ObjectClass has the Clone on Mutate function.

Assembly: Persistate (Module: Persistate) Version: 0.6.1.20 (0.6.1.20)