Indicates that property should be treated as a XML attribute for the task.
For a list of all members of this type, see TaskAttributeAttribute Members.
System.Object
System.Attribute
NAnt.Core.Attributes.BuildAttributeAttribute
NAnt.Core.Attributes.TaskAttributeAttribute
Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.
Examples of how to specify task attributes
// task XmlType default is string [TaskAttribute("out", Required=true)] string _out = null; // assign default value here [TaskAttribute("optimize")] [BooleanValidator()] // during ExecuteTask you can safely use Convert.ToBoolean(_optimize) string _optimize = Boolean.FalseString; [TaskAttribute("warnlevel")] [Int32Validator(0,4)] // limit values to 0-4 // during ExecuteTask you can safely use Convert.ToInt32(_optimize) string _warnlevel = "0"; [BuildElement("sources")] FileSet _sources = new FileSet();NOTE: Attribute values must be of type of string if you want to be able to have macros. The field stores the exact value during Initialize. Just before ExecuteTask is called NAnt will expand all the macros with the current values.
Namespace: NAnt.Core.Attributes
Assembly: NAnt.Core (in NAnt.Core.dll)
TaskAttributeAttribute Members | NAnt.Core.Attributes Namespace