GoDigram for .NET Framework and .NET Core
Northwoods.Go.Xml Namespace / GoXmlWriter Class / DefineAndGenerateSharedObject Method
an Object; if null this method does nothing
In This Topic
    DefineAndGenerateSharedObject Method
    In This Topic
    If the given object is not already known to be a shared object, define it and generate it, so that you can use simple ID references to the shared object both during generation and during consumption.
    Syntax
    public virtual void DefineAndGenerateSharedObject( 
       object obj
    )

    Parameters

    obj
    an Object; if null this method does nothing
    Remarks
    This convenience method can be called from an override of GenerateDefinitions when there are auxiliary objects that can be shared by the primary Objects but are not in that collection of Objects. If InvokeSkipGeneration returns true, or if the obj is already shared, no element is generated. This method is implemented as: if (obj == null) return; Type t = obj.GetType(); if (InvokeSkipGeneration(t, obj)) return; String id = FindShared(obj); if (id == null) { MakeShared(obj); DefineObject(obj); GenerateObject(obj); }
    See Also