GoDigram for .NET Framework and .NET Core
Northwoods.Go.Xml Namespace / GoXmlTransformer Class / ConsumeAttributes Method
the object being constructed
In This Topic
    ConsumeAttributes Method (GoXmlTransformer)
    In This Topic
    Consume attributes for the current element, helping to initialize most of the object's properties.
    Syntax
    public virtual void ConsumeAttributes( 
       object obj
    )

    Parameters

    obj
    the object being constructed
    Remarks

    You will typically override this method to call methods such as StringAttr or SingleAttr to read property values and set them on the object obj being initialized. The set of attributes usually matches those generated in an override of GenerateAttributes, although sometimes some of the attributes are needed in the override of Allocate.

    This is called by GoXmlReader.ConsumeObject. By default this calls ConsumeAttributes on the InheritsFromTransformer, to allow another specific transformer to implement this behavior, or else calls GoXmlWriter.InvokeConsumeAttributes, to allow this TransformerType's base Type to provide a default behavior. If IdAttributeUsedForSharedObjects is true, this method also looks at the "id" attribute and, if present, will associate that identifier with the given obj by calling GoXmlReader.MakeShared.

    See Also