Indicates that property should be treated as a XML attribute for the task.
For a list of all members of this type, see BuildAttributeAttribute 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
#region Public Instance Properties [BuildAttribute("out", Required=true)] public string Output { get { return _out; } set { _out = value; } } [BuildAttribute("optimize")] [BooleanValidator()] public bool Optimize { get { return _optimize; } set { _optimize = value; } } [BuildAttribute("warnlevel")] [Int32Validator(0,4)] // limit values to 0-4 public int WarnLevel { get { return _warnLevel; } set { _warnLevel = value; } } [BuildElement("sources")] public FileSet Sources { get { return _sources; } set { _sources = value; } } #endregion Public Instance Properties #region Private Instance Fields private string _out = null; private bool _optimize = false; private int _warnLevel = 4; private FileSet _sources = new FileSet(); #endregion Private Instance Fields
Namespace: NAnt.Core.Attributes
Assembly: NAnt.Core (in NAnt.Core.dll)
BuildAttributeAttribute Members | NAnt.Core.Attributes Namespace