BuildElementCollectionAttribute Class

Summary

Indicates that the property should be treated as a container for a collection of build elements.
graph BT Type-->Base0["BuildElementArrayAttribute"] click Base0 "/api/NAnt.Core.Attributes/BuildElementArrayAttribute" Base0-->Base1["BuildElementAttribute"] click Base1 "/api/NAnt.Core.Attributes/BuildElementAttribute" Base1-->Base2["BaseBuildAttribute"] click Base2 "/api/NAnt.Core.Attributes/BaseBuildAttribute" Base2-->Base3["Attribute"] Type["BuildElementCollectionAttribute"] class Type type-node

Syntax

[AttributeUsage(AttributeTargets.Property, Inherited = true)]
public sealed class BuildElementCollectionAttribute : BuildElementArrayAttribute

Remarks

Should only be applied to properties exposing strongly typed arrays or strongly typed collections.

The XML format is like this:

    <task>
    <collectionName>
        <elementName ... />
        <elementName ... />
        <elementName ... />
        <elementName ... />
    </collectionName>
</task>

Attributes

Type Description
AttributeUsageAttribute

Constructors

Name Summary
BuildElementCollectionAttribute(string, string) Initializes a new instance of the NAnt.Core.Attributes.BuildElementCollectionAttribute with the specified name and child element name.

Properties

Name Value Summary
ChildElementName string
The name of the child element within the collection.
ElementType Type
Gets or sets the type of objects that this container holds.
Name string
Gets or sets the name of the item.
Inherited from BaseBuildAttribute
ProcessXml bool
Used to specify how this element will be handled as the XML is parsed and given to the element.
Inherited from BaseBuildAttribute
Required bool
Gets or sets a value indicating whether the item is required.
Inherited from BaseBuildAttribute