GoDigram for .NET Framework and .NET Core
Northwoods.Go Namespace / GoObject Class / CopyObjectDelayed Method
In This Topic
    CopyObjectDelayed Method (GoObject)
    In This Topic
    For objects that require a second pass to complete the copying, this method is called after the first pass of copying all of the objects in CopyFromCollection(IGoCollection).
    Syntax
    public virtual void CopyObjectDelayed( 
       GoCopyDictionary env,
       GoObject newobj
    )

    Parameters

    env
    newobj
    Remarks

    This method need only be overridden by objects that refer to other independent objects. The problem usually is that during the call to CopyObject, some of the objects that this object refers to might not yet have been copied. So it's best to add this object to the Delayeds collection in the call to CopyObject, and then fix things up during the second pass in the call to this method.

    For most objects, this method just adds the new observers that are copies of any old observers of this object. For GoLinks, however, it also makes sure both ports refer to the copied ports, and if the ports were not copied, it removes the link.

    The base method should be called by any override that you define. You should not be calling this method from other code; normally only GoCopyDictionary.FinishDelayedCopies is the caller.

    See Also