[This is preliminary documentation and is subject to change.]
C# |
public void CopyFrom( Persistent from )
- from (Persistent)
- The object to copy the members from.
Only fields corresponding to members defined in the ObjectClass of this object and it's base classes are copied. Note that contained object members and all collection members are NOT copied. Associated object members ARE copied.
This method copies fields, not properties. Before the fields are copied, SetModified()()()() is called to mark this object as modified. After the fields are copied, OnModified()()()() is called to signal the Modified event for this object.
After all the persistent properties have been copied, this method calls the virtual method CopyTransientFrom. If you need to copy any non persistent data or do any other work during a copy, then override this method and perform the work there. CopyTransientFrom is called before the Modified event is signalled.
Exception | Condition |
---|---|
ArgumentException | Thrown if the from parameter is of a
different type to this object. |