Logo Search packages:      
Sourcecode: nant version File versions  Download package

NAnt::MSNet::Tasks::IldasmTask Class Reference

Inheritance diagram for NAnt::MSNet::Tasks::IldasmTask:

NAnt::Core::Tasks::ExternalProgramBase NAnt::Core::Task NAnt::Core::Element

List of all members.


Detailed Description

Disassembles any portable executable (PE) file that contains intermediate language (IL) code.

Files are only disassembled if the input file is newer than the output file, or if the output file does not exist. However, you can explicitly force files to be disassembled with the ForceRebuild attribute.

A FileSet can be used to select files to disassemble. To use a FileSet, the ToDirectory attribute must be set. The file name of the output file will be equal to the file name of the input file, but with extension ".il".

Disassembles helloworld.exe to helloworld.il.

            <![CDATA[
        <ildasm input="helloworld.exe" output="helloworld.il" />
            ]]>

Disassembles a set of PE files into the specified directory.

            <![CDATA[
        <ildasm todir=".">
            <assemblies>
                <include name="*.exe" />
                <include name="*.dll" />
            </assemblies>
        </ildasm>
            ]]>

Definition at line 78 of file IldasmTask.cs.


Public Member Functions

void Execute ()
 Executes the task unless it is skipped.
void Initialize (XmlNode elementNode)
 Performs default initialization.
void InitializeTaskConfiguration ()
 Initializes the configuration of the task using configuration settings retrieved from the NAnt configuration file.
bool IsLogEnabledFor (Level messageLevel)
 Determines whether build output is enabled for the given Level.
override void Log (Level messageLevel, string message, params object[] args)
 Logs a formatted message with the given priority.
override void Log (Level messageLevel, string message)
 Logs a message with the given priority.

Static Public Member Functions

static Element InitializeBuildElement (Element parent, XmlNode childNode, Element buildElement, Type elementType)

Public Attributes

const int UnknownExitCode = -1000
 Defines the exit code that will be returned by ExitCode if the process could not be started, or did not exit (in time).

Protected Member Functions

void CopyTo (Element clone)
 Copies all instance data of the Element to a given Element.
override void ExecuteTask ()
 Disassembles the PE file(s).
XmlNode GetAttributeConfigurationNode (FrameworkInfo framework, string attributeName)
 Locates the XML node for the specified attribute in the project configuration node.
override void InitializeElement (XmlNode elementNode)
 <note>Deprecated (to be deleted).</note>
override void InitializeTask (XmlNode taskNode)
 Checks whether the task is initialized with valid attributes.
virtual void InitializeXml (XmlNode elementNode, PropertyDictionary properties, FrameworkInfo framework)
 Initializes all build attributes and child elements.
virtual void PrepareProcess (Process process)
 Updates the ProcessStartInfo of the specified Process.
virtual Process StartProcess ()
 Starts the process and handles errors.

Properties

bool All [get, set]
 Specifies whether or not the disassembler should combine the /HEADER, /BYTE, and /TOKENS options. The default is .
override ArgumentCollection Arguments [get]
 The command-line arguments for the external program.
FileSet Assemblies [get, set]
 Specifies a list of PE files to disassemble. To use a FileSet, the ToDirectory attribute must be specified.
virtual DirectoryInfo BaseDirectory [get, set]
 Gets the working directory for the application.
bool Bytes [get, set]
 Specifies whether or not the disassembler should generate the IL stream bytes (in hexadecimal notation) as instruction comments. The default is .
string CommandLine [get]
 Gets the command-line arguments, separated by spaces.
virtual bool CustomXmlProcessing [get]
 Gets a value indicating whether the element is performing additional processing using the XmlNode that was used to initialize the element.
virtual TextWriter ErrorWriter [get, set]
 Gets or sets the TextWriter to which error output of the external program will be written.
virtual string ExeName [get, set]
 The name of the executable that should be used to launch the external program.
int ExitCode [get]
 Gets the value that the process specified when it terminated.
bool FailOnError [get, set]
 Determines if task failure stops the build, or is just reported. The default is .
bool ForceRebuild [get, set]
 Instructs NAnt to rebuild the output file regardless of the file timestamps. The default is .
bool Header [get, set]
 Specifies whether or not the disassembler should include PE header information and runtime header information in the output. The default is .
bool IfDefined [get, set]
 If then the task will be executed; otherwise, skipped. The default is .
FileInfo InputFile [get, set]
 Specifies the PE file to disassemble.
string Item [get, set]
 Instructs the disassembler to disassemble the specified item only.
bool LineNumbers [get, set]
 Specifies whether or not the disassembler should include references to original source lines. The default is .
virtual Location Location [get, set]
 Gets or sets the location in the build file where the element is defined.
string LogPrefix [get]
 The prefix used when sending messages to the log.
override string Name [get]
 The name of the task.
XmlNamespaceManager NamespaceManager [get, set]
 Gets or sets the XmlNamespaceManager.
bool NoIL [get, set]
 Specifies whether or not the disassembler should suppress ILASM code output. The default is .
virtual FileInfo Output [get, set]
 Gets the file to which the standard output should be redirected.
virtual bool OutputAppend [get, set]
 Gets a value indicating whether output will be appended to the Output.
FileInfo OutputFile [get, set]
 Specifies the name of the output file created by the disassembler.
virtual TextWriter OutputWriter [get, set]
 Gets or sets the TextWriter to which standard output messages of the external program will be written.
object Parent [get, set]
 Gets or sets the parent of the element.
override string ProgramArguments [get]
 Gets the command-line arguments for the external program.
virtual string ProgramFileName [get]
 Gets the filename of the external program to start.
virtual Project Project [get, set]
 Gets or sets the Project to which this element belongs.
virtual PropertyDictionary Properties [get]
 Gets the properties local to this Element and the Project.
bool PublicOnly [get, set]
 Specifies whether or not the disassembler should disassemble public items only. This is a shortcut for Visibility="pub". The default is .
bool QuoteAllNames [get, set]
 Specifies whether or not the disassembler should enclose all names in single quotation marks. By default, only names that don't match the ILASM definition of a simple name are quoted. The default is .
bool RawExceptionHandling [get, set]
 Specifies whether or not the disassembler should generate structured exception handling clauses in canonical (label) form. The default is .
bool Source [get, set]
 Specifies whether or not the disassembler should generate original source lines as comments. The default is .
Level Threshold [get, set]
 Gets or sets the log threshold for this Task. By default the threshold of a task matches the threshold of the project.
int TimeOut [get, set]
 The maximum amount of time the application is allowed to execute, expressed in milliseconds. Defaults to no time-out.
DirectoryInfo ToDirectory [get, set]
 Specifies the directory to which outputs will be stored.
bool Tokens [get, set]
 Specifies whether or not the disassembler should generate metadata token values as comments. The default is .
bool Unicode [get, set]
 Specifies whether or not the disassembler should use the UNICODE encoding when generating the output. The default is ANSI.
bool UnlessDefined [get, set]
 Opposite of IfDefined. If then the task will be executed; otherwise, skipped. The default is .
virtual bool UseRuntimeEngine [get, set]
 Specifies whether the external program should be executed using a runtime engine, if configured. The default is .
bool Utf8 [get, set]
 Specifies whether or not the disassembler should use the UTF-8 encoding when generating the output. The default is ANSI.
bool Verbose [get, set]
 Determines whether the task should report detailed build log messages. The default is .
string Visibility [get, set]
 Instructs the disassembler to disassemble only the items with the specified visibility. Possible values are PUB, PRI, FAM, ASM, FAA, FOA, PSC, or any combination of them separated by +.
virtual XmlNode XmlNode [get, set]
 Gets or sets the XML node of the element.

Private Member Functions

void DisassemblyFile (FileInfo inputFile)
 Disassembles the specified PE file.
FileInfo GetOutputFile (FileInfo inputFile)
 Determines the full path and extension for the output file.
bool NeedsDisassembling (FileInfo inputFile, FileInfo outputFile)
 Determines whether or not disassembling is needed.
void WriteOption (StringWriter writer, string name, string arg)
 Writes an option and its value using the default output format.
void WriteOption (StringWriter writer, string name)
 Writes an option using the default output format.
void WriteOptions (FileInfo inputFile, FileInfo outputFile)
 Writes the disassembler options.

Private Attributes

bool _all
FileSet _assemblies
bool _bytes
bool _forceRebuild
bool _header
FileInfo _inputFile
string _item
bool _lineNumbers
bool _noIL
string _options
FileInfo _outputFile
bool _publicOnly
bool _quoteAllNames
bool _rawExceptionHandling
bool _source
const string _TargetExt = "il"
DirectoryInfo _toDir
bool _tokens
bool _unicode
bool _utf8
string _visibility

The documentation for this class was generated from the following file:

Generated by  Doxygen 1.6.0   Back to index