NAnt SDK Documentation - v0.92

Argument Class

Represents a command-line argument.

For a list of all members of this type, see Argument Members.

System.Object
   NAnt.Core.Element
      NAnt.Core.Types.Argument

[Visual Basic]
<Serializable, _  Serializable, _  ElementName(Name:="arg")>
Public Class Argument
    Inherits Element
[C#]
[Serializable]
[Serializable]
[ElementName(Name="arg")]
public class Argument : Element

Thread Safety

Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.

Remarks

When passed to an external application, the argument will be quoted when appropriate. This does not apply to the Line parameter, which is always passed as is.

Example

A single command-line argument containing a space character.

    
<arg value="-l -a" />
    
  

Two separate command-line arguments.

    
<arg line="-l -a" />
    
  

A single command-line argument with the value \dir;\dir2;\dir3 on DOS-based systems and /dir:/dir2:/dir3 on Unix-like systems.

    
<arg path="/dir;/dir2:\dir3" />
    
  

Requirements

Namespace: NAnt.Core.Types

Assembly: NAnt.Core (in NAnt.Core.dll)

See Also

Argument Members | NAnt.Core.Types Namespace