Summary
Provides the abstract base class for tasks that execute external applications.
- Assembly
- NAnt
.Core .dll - Namespace
- NAnt
.Core .Tasks - Interfaces
- Base Types
- Derived Types
graph BT
Type-->Base0["Task"]
click Base0 "/api/NAnt.Core/Task"
Base0-->Base1["Element"]
click Base1 "/api/NAnt.Core/Element"
Base1-->Base2["Object"]
Type-.->Interface0["IConditional"]
click Interface0 "/api/NAnt.Core/IConditional"
Type["ExternalProgramBase"]
class Type type-node
Derived0["DelaySignTask"]-->Type
click Derived0 "/api/NAnt.DotNet.Tasks/DelaySignTask"
Derived1["CompilerBase"]-->Type
click Derived1 "/api/NAnt.DotNet.Tasks/CompilerBase"
Derived2["RcTask"]-->Type
click Derived2 "/api/NAnt.VisualCpp.Tasks/RcTask"
Derived3["LibTask"]-->Type
click Derived3 "/api/NAnt.VisualCpp.Tasks/LibTask"
Derived4["ResGenTask"]-->Type
click Derived4 "/api/NAnt.DotNet.Tasks/ResGenTask"
Derived5["LicenseTask"]-->Type
click Derived5 "/api/NAnt.DotNet.Tasks/LicenseTask"
Derived6["AssemblyLinkerTask"]-->Type
click Derived6 "/api/NAnt.DotNet.Tasks/AssemblyLinkerTask"
Derived7["ClTask"]-->Type
click Derived7 "/api/NAnt.VisualCpp.Tasks/ClTask"
Derived8["RegsvcsTask"]-->Type
click Derived8 "/api/NAnt.DotNet.Tasks/RegsvcsTask"
Derived9["McTask"]-->Type
click Derived9 "/api/NAnt.VisualCpp.Tasks/McTask"
Derived10["AxImpTask"]-->Type
click Derived10 "/api/NAnt.Win32.Tasks/AxImpTask"
Derived11["RegAsmTask"]-->Type
click Derived11 "/api/NAnt.Win32.Tasks/RegAsmTask"
Derived12["TlbImpTask"]-->Type
click Derived12 "/api/NAnt.Win32.Tasks/TlbImpTask"
Derived13["TlbExpTask"]-->Type
click Derived13 "/api/NAnt.Win32.Tasks/TlbExpTask"
Derived14["MidlTask"]-->Type
click Derived14 "/api/NAnt.VisualCpp.Tasks/MidlTask"
Derived15["IlasmTask"]-->Type
click Derived15 "/api/NAnt.DotNet.Tasks/IlasmTask"
Derived16["IldasmTask"]-->Type
click Derived16 "/api/NAnt.MSNet.Tasks/IldasmTask"
Derived17["LinkTask"]-->Type
click Derived17 "/api/NAnt.VisualCpp.Tasks/LinkTask"
Derived18["AbstractSourceControlTask"]-->Type
click Derived18 "/api/NAnt.SourceControl.Tasks/AbstractSourceControlTask"
Derived19["ExecTask"]-->Type
click Derived19 "/api/NAnt.Core.Tasks/ExecTask"
Syntax
[Serializable()]
public abstract class ExternalProgramBase : Task, IConditional
Remarks
When a NAnt.Core.Attributes.ProgramLocationAttribute
is applied to the
deriving class and NAnt.Core.Tasks.ExternalProgramBase.ExeName
does not return an
absolute path, then the program to execute will first be searched for
in the location specified by NAnt.Core.Attributes.ProgramLocationAttribute.LocationType
.
If the program does not exist in that location, then the list of tool paths of the current target framework will be scanned in the order in which they are defined in the NAnt configuration file.
Attributes
Type | Description |
---|---|
Serializable |
Fields
Name | Constant Value | Summary |
---|---|---|
UnknownExitCode | -1000 |
Defines the exit code that will be returned by
NAnt.Core.Tasks.ExternalProgramBase.ExitCode
if the process could not be started, or did not exit (in time).
static
|
Properties
Name | Value | Summary |
---|---|---|
Arguments | ArgumentCollection |
The command-line arguments for the external program.
|
BaseDirectory | DirectoryInfo |
Gets the working directory for the application.
|
CommandLine | string |
Gets the command-line arguments, separated by spaces.
|
CustomXmlProcessing | bool |
Gets a value indicating whether the element is performing additional
processing using the
NAnt.Core.Element.XmlNode that was used to
initialize the element.
Inherited from Element
|
ErrorWriter | TextWriter |
Gets or sets the
System.IO.TextWriter to which error output
of the external program will be written.
|
ExeName | string |
The name of the executable that should be used to launch the
external program.
|
ExitCode | int |
Gets the value that the process specified when it terminated.
|
FailOnError | bool |
Determines if task failure stops the build, or is just reported.
The default is
true .
Inherited from Task
|
IfDefined | bool |
If
true then the task will be executed; otherwise,
skipped. The default is true .
Inherited from Task
|
Location | Location |
Gets or sets the location in the build file where the element is
defined.
Inherited from Element
|
LogPrefix | string |
The prefix used when sending messages to the log.
Inherited from Task
|
Managed | ManagedExecution |
Specifies whether the external program should be treated as a managed
application, possibly forcing it to be executed under the currently
targeted version of the CLR.
|
Name | string |
The name of the task.
Inherited from Task
|
NamespaceManager | XmlNamespaceManager |
Gets or sets the
System.Xml.XmlNamespaceManager .
Inherited from Element
|
Output | FileInfo |
Gets the file to which the standard output should be redirected.
|
OutputAppend | bool |
Gets a value indicating whether output will be appended to the
NAnt.Core.Tasks.ExternalProgramBase.Output .
|
OutputWriter | TextWriter |
Gets or sets the
System.IO.TextWriter to which standard output
messages of the external program will be written.
|
Parent | Object |
Gets or sets the parent of the element.
Inherited from Element
|
ProcessId | int |
Gets the unique identifier for the spawned application.
|
ProgramArguments | string |
Gets the command-line arguments for the external program.
|
ProgramFileName | string |
Gets the filename of the external program to start.
|
Project | Project |
Gets or sets the
NAnt.Core.Element.Project to which this element belongs.
Inherited from Element
|
Properties | PropertyDictionary |
Gets the properties local to this
NAnt.Core.Element and the
NAnt.Core.Element.Project .
Inherited from Element
|
Spawn | bool |
Gets or sets a value indicating whether the application should be
spawned. If you spawn an application, its output will not be logged
by NAnt. The default is
false .
|
Threshold | Level |
Gets or sets the log threshold for this
NAnt.Core.Task . By
default the threshold of a task is NAnt.Core.Level.Debug ,
causing no messages to be filtered in the task itself.
Inherited from Task
|
TimeOut | int |
The maximum amount of time the application is allowed to execute,
expressed in milliseconds. Defaults to no time-out.
|
UnlessDefined | bool |
Opposite of
NAnt.Core.Task.IfDefined . If false
then the task will be executed; otherwise, skipped. The default is
false .
Inherited from Task
|
UseRuntimeEngine | bool |
Specifies whether the external program is a managed application
which should be executed using a runtime engine, if configured.
The default is
false .
|
Verbose | bool |
Determines whether the task should report detailed build log messages.
The default is
false .
Inherited from Task
|
XmlNode | XmlNode |
Gets or sets the XML node of the element.
Inherited from Element
|
Methods
Name | Value | Summary |
---|---|---|
CopyTo |
void |
Copies all instance data of the
NAnt.Core.Element to a given
NAnt.Core.Element .
Inherited from Element
|
Execute |
void |
Executes the task unless it is skipped.
Inherited from Task
|
ExecuteTask |
void |
Starts the external process and captures its output.
|
Get |
XmlNode |
Locates the XML node for the specified attribute in either the
configuration section of the extension assembly or the.project.
Inherited from Task
|
Get |
XmlNode |
Inherited from Element
|
GetLocation |
Location |
Retrieves the location in the build file where the element is
defined.
Inherited from Element
|
Initialize |
void |
Initializes the task.
Inherited from Task
|
Initialize |
void |
Performs default initialization.
Inherited from Element
|
Initialize |
Element |
Initializes the build element.
Inherited from Element
static
|
InitializeElement |
void |
Derived classes should override to this method to provide extra
initialization and validation not covered by the base class.
Inherited from Element
|
InitializeTask |
void |
Initializes the task.
Inherited from Task
|
Initialize |
void |
Initializes the configuration of the task using configuration
settings retrieved from the NAnt configuration file.
Inherited from Task
|
InitializeXml |
void |
Initializes all build attributes and child elements.
Inherited from Element
|
IsLogEnabledFor |
bool |
Determines whether build output is enabled for the given
NAnt.Core.Level .
Inherited from Task
|
Log |
void |
Logs a message with the given priority.
Inherited from Task
|
Log |
void |
Logs a formatted message with the given priority.
Inherited from Task
|
PrepareProcess |
void |
Updates the
System.Diagnostics.ProcessStartInfo of the specified
System.Diagnostics.Process .
|
StartProcess |
Process |
Starts the process and handles errors.
|