GoDiagram Win Reference
Allocate Method (GoXmlTransformer)

Override this method to construct a new object for the current XML element.
Syntax
'Declaration
 
Public Overridable Function Allocate() As Object
public virtual object Allocate()

Return Value

An object of type TransformerType, or null if no object needs to be created for the current element.
Remarks
This is called by GoXmlReader.ConsumeObject. By default this returns a new instance of TransformerType, if that property is not null and represents a class. This should be overridden to construct an object. The construction may need to use the values of some attributes on the current XML element in order to decide what to construct or which constructor to call. If this is called by a nested call to ConsumeObject within an implementation of ConsumeBody, then the ParentObject property will refer to the object for which the body is being consumed. The ParentObject can be used to find and return an existing child of the parent object, rather than constructing a new object as the child. Note that unlike the other implementations of IGoXmlTransformer methods, this method does not default to calling InvokeAllocate on the base Type, since that is unlikely to create an instance of the desired type.
Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

Reference

GoXmlTransformer Class
GoXmlTransformer Members

 

 


© 2015. Northwoods Software Corporation. All Rights Reserved.

Send Feedback