NDocTask Class

Summary

Runs NDoc V1.3.1 to create documentation.
Assembly
NAnt.DotNet.dll
Namespace
NAnt.DotNet.Tasks
Interfaces
Base 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["NDocTask"] class Type type-node

Syntax

[TaskName("ndoc")]
public class NDocTask : Task, IConditional

Examples

Document two assemblies using the MSDN documenter. The namespaces are documented in NamespaceSummary.xml.

    <ndoc>
    <assemblies basedir="${build.dir}">
        <include name="NAnt.exe" />
        <include name="NAnt.Core.dll" />
    </assemblies>
    <summaries basedir="${build.dir}">
        <include name="NamespaceSummary.xml" />
    </summaries>
    <documenters>
        <documenter name="MSDN">
            <property name="OutputDirectory" value="doc\MSDN" />
            <property name="HtmlHelpName" value="NAnt" />
            <property name="IncludeFavorites" value="False" />
            <property name="Title" value="An NDoc Documented Class Library" />
            <property name="SplitTOCs" value="False" />
            <property name="DefaulTOC" value="" />
            <property name="ShowVisualBasic" value="True" />
            <property name="ShowMissingSummaries" value="True" />
            <property name="ShowMissingRemarks" value="True" />
            <property name="ShowMissingParams" value="True" />
            <property name="ShowMissingReturns" value="True" />
            <property name="ShowMissingValues" value="True" />
            <property name="DocumentInternals" value="False" />
            <property name="DocumentProtected" value="True" />
            <property name="DocumentPrivates" value="False" />
            <property name="DocumentEmptyNamespaces" value="False" />
            <property name="IncludeAssemblyVersion" value="False" />
            <property name="CopyrightText" value="" />
            <property name="CopyrightHref" value="" />
         </documenter>
    </documenters> 
</ndoc>

Content of NamespaceSummary.xml :

    <namespaces>
    <namespace name="Foo.Bar">
        The <b>Foo.Bar</b> namespace reinvents the wheel.
    </namespace>
    <namespace name="Foo.Bar.Tests">
        The <b>Foo.Bar.Tests</b> namespace ensures that the Foo.Bar namespace reinvents the wheel correctly.
    </namespace>
</namespaces>

Remarks

See the NDoc home page for more information.

By default, only the NDoc MSDN documenter ships as part of the NAnt distribution. To make another NDoc documenter from the NDoc V1.3.1 distribution available to the NAnt.DotNet.Tasks.NDocTask, copy the documenter assembly (and possible dependencies) to the "lib" directory corresponding with the CLR you're running NAnt on (e.g. <nant root>/bin/lib/net/1.1).

Attributes

Type Description
TaskNameAttribute Indicates that class should be treated as a task.

Properties

Name Value Summary
Assemblies AssemblyFileSet
The set of assemblies to document.
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
Documenters RawXml
Specifies the formats in which the documentation should be generated.
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
Name string
The name of the task.
Inherited from Task
NamespaceManager XmlNamespaceManager
Gets or sets the System.Xml.XmlNamespaceManager.
Inherited from Element
Parent Object
Gets or sets the parent of the element.
Inherited from Element
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
ReferencePaths DirSet
Collection of additional directories to search for referenced assemblies.
Summaries FileSet
The set of namespace summary files.
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
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
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(Element) 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
Generates an NDoc project and builds the documentation.
GetAttributeConfigurationNode(FrameworkInfo, string) XmlNode
Locates the XML node for the specified attribute in either the configuration section of the extension assembly or the.project.
Inherited from Task
GetAttributeConfigurationNode(XmlNode, FrameworkInfo, string) 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 and verifies the parameters.
Initialize(XmlNode) void
Performs default initialization.
Inherited from Element
InitializeBuildElement(Element, XmlNode, Element, Type) Element
Initializes the build element.
Inherited from Element
static
InitializeElement(XmlNode) void
Derived classes should override to this method to provide extra initialization and validation not covered by the base class.
Inherited from Element
InitializeTask(XmlNode) void
Initializes the task.
Inherited from Task
InitializeTaskConfiguration() void
Initializes the configuration of the task using configuration settings retrieved from the NAnt configuration file.
Inherited from Task
InitializeXml(XmlNode, PropertyDictionary, FrameworkInfo) void
Initializes all build attributes and child elements.
Inherited from Element
IsLogEnabledFor(Level) bool
Determines whether build output is enabled for the given NAnt.Core.Level.
Inherited from Task
Log(Level, string) void
Logs a message with the given priority.
Inherited from Task
Log(Level, string, Object[]) void
Logs a formatted message with the given priority.
Inherited from Task