C# Class NAnt.Core.Element

Datei anzeigen Open project: skolima/NAnt Class Usage Examples

Public Methods

Method Description
GetLocation ( ) : Location

Retrieves the location in the build file where the element is defined.

Initialize ( XmlNode elementNode ) : void

Performs default initialization.

Derived classes that wish to add custom initialization should override the M:Initialize() method.

InitializeBuildElement ( Element parent, XmlNode childNode, Element buildElement, Type elementType ) : Element
Log ( Level messageLevel, string message ) : void

Logs a message with the given priority.

The actual logging is delegated to the project.

Protected Methods

Method Description
CopyTo ( Element clone ) : void

Copies all instance data of the Element to a given Element.

Element ( ) : System

Initializes a new instance of the Element class.

Element ( Element e ) : System

Initializes a new instance of the Element class from the specified element.

GetAttributeConfigurationNode ( FrameworkInfo framework, string attributeName ) : XmlNode

Locates the XML node for the specified attribute in the project configuration node.

If there's a valid current framework, the configuration section for that framework will first be searched. If no corresponding configuration node can be located in that section, the framework-neutral section of the project configuration node will be searched.

GetAttributeConfigurationNode ( XmlNode configSection, FrameworkInfo framework, string attributeName ) : XmlNode
Initialize ( ) : void

Derived classes should override to this method to provide extra initialization and validation not covered by the base class.

Access to the XmlNode that was used to initialize this Element is available through XmlNode.

InitializeXml ( XmlNode elementNode, PropertyDictionary properties, FrameworkInfo framework ) : void

Initializes all build attributes and child elements.

Private Methods

Method Description
GetElementNameFromType ( Type type ) : string

Returns the ElementNameAttribute.Name of the ElementNameAttribute assigned to the specified Type.

Initialize ( XmlNode elementNode, PropertyDictionary properties, FrameworkInfo framework ) : void

Performs initialization using the given set of properties.

InitializeElement ( XmlNode elementNode ) : void

Method Details

CopyTo() protected method

Copies all instance data of the Element to a given Element.
protected CopyTo ( Element clone ) : void
clone Element
return void

Element() protected method

Initializes a new instance of the Element class.
protected Element ( ) : System
return System

Element() protected method

Initializes a new instance of the Element class from the specified element.
protected Element ( Element e ) : System
e Element The element that should be used to create a new instance of the class.
return System

GetAttributeConfigurationNode() protected method

Locates the XML node for the specified attribute in the project configuration node.
If there's a valid current framework, the configuration section for that framework will first be searched. If no corresponding configuration node can be located in that section, the framework-neutral section of the project configuration node will be searched.
protected GetAttributeConfigurationNode ( FrameworkInfo framework, string attributeName ) : XmlNode
framework FrameworkInfo The framework to use to obtain framework specific information, or if no framework specific information should be used.
attributeName string The name of attribute for which the XML configuration node should be located.
return System.Xml.XmlNode

GetAttributeConfigurationNode() protected method

protected GetAttributeConfigurationNode ( XmlNode configSection, FrameworkInfo framework, string attributeName ) : XmlNode
configSection System.Xml.XmlNode
framework FrameworkInfo
attributeName string
return System.Xml.XmlNode

GetLocation() public method

Retrieves the location in the build file where the element is defined.
public GetLocation ( ) : Location
return Location

Initialize() protected method

Derived classes should override to this method to provide extra initialization and validation not covered by the base class.
Access to the XmlNode that was used to initialize this Element is available through XmlNode.
protected Initialize ( ) : void
return void

Initialize() public method

Performs default initialization.
Derived classes that wish to add custom initialization should override the M:Initialize() method.
public Initialize ( XmlNode elementNode ) : void
elementNode System.Xml.XmlNode
return void

InitializeBuildElement() public static method

public static InitializeBuildElement ( Element parent, XmlNode childNode, Element buildElement, Type elementType ) : Element
parent Element
childNode System.Xml.XmlNode
buildElement Element
elementType System.Type
return Element

InitializeXml() protected method

Initializes all build attributes and child elements.
protected InitializeXml ( XmlNode elementNode, PropertyDictionary properties, FrameworkInfo framework ) : void
elementNode System.Xml.XmlNode
properties PropertyDictionary
framework FrameworkInfo
return void

Log() public method

Logs a message with the given priority.
The actual logging is delegated to the project.
public Log ( Level messageLevel, string message ) : void
messageLevel Level The message priority at which the specified message is to be logged.
message string The message to be logged.
return void