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

NAnt::Win32::Tasks::TlbImpTask Class Reference

Inheritance diagram for NAnt::Win32::Tasks::TlbImpTask:

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

List of all members.

Detailed Description

Imports a type library to a .NET assembly (wraps Microsoft's tlbimp.exe).

This task lets you easily create interop assemblies. By default, it will not reimport if the underlying COM TypeLib or reference has not changed.

See the Microsoft.NET Framework SDK documentation for details.

Import LegacyCOM.dll to DotNetAssembly.dll.

        <tlbimp typelib="LegacyCOM.dll" output="DotNetAssembly.dll" />

Definition at line 57 of file TlbImpTask.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 ()
 Imports the type library to a .NET assembly.
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>
virtual void InitializeTask (XmlNode taskNode)
 Initializes the task.
virtual void InitializeXml (XmlNode elementNode, PropertyDictionary properties, FrameworkInfo framework)
 Initializes all build attributes and child elements.
virtual bool NeedsCompiling ()
 Determines whether the type library needs to be imported again.
virtual void PrepareProcess (Process process)
 Updates the ProcessStartInfo of the specified Process.
virtual Process StartProcess ()
 Starts the process and handles errors.


virtual ArgumentCollection Arguments [get]
 The command-line arguments for the external program.
string AsmVersion [get, set]
 Specifies the version number of the assembly to produce.
virtual DirectoryInfo BaseDirectory [get, set]
 Gets the working directory for the application.
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.
bool DelaySign [get, set]
 Specifies whether the resulting assembly should be signed with a strong name using delayed signing. The default is .
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 IfDefined [get, set]
 If then the task will be executed; otherwise, skipped. The default is .
string KeyContainer [get, set]
 Specifies the key container in which the public/private key pair should be found that should be used to sign the resulting assembly with a strong name.
FileInfo KeyFile [get, set]
 Specifies the publisher's official public/private key pair with which the resulting assembly should be signed with a strong name.
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.
string Namespace [get, set]
 Specifies the namespace in which to produce the assembly.
XmlNamespaceManager NamespaceManager [get, set]
 Gets or sets the XmlNamespaceManager.
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.
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.
bool Primary [get, set]
 Specifies whether a primary interop assembly should be produced for the specified type library. The default is .
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.
FileInfo PublicKeyFile [get, set]
 Specifies the file containing the public key to use to sign the resulting assembly.
AssemblyFileSet References [get, set]
 Specifies the assembly files to use to resolve references to types defined outside the current type library.
bool StrictRef [get, set]
 Specifies whether a type library should not be imported if all references within the current assembly or the reference assemblies cannot be resolved. The default is .
bool SysArray [get, set]
 Specifies whether to import a COM style SafeArray as a managed System.Array class type. 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.
FileInfo TypeLib [get, set]
 Specifies the source type library that gets passed to the type library importer.
bool UnlessDefined [get, set]
 Opposite of IfDefined. If then the task will be executed; otherwise, skipped. The default is .
bool Unsafe [get, set]
 Specifies whether interfaces should be produced without .NET Framework security checks. 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 Verbose [get, set]
 Determines whether the task should report detailed build log messages. The default is .
virtual XmlNode XmlNode [get, set]
 Gets or sets the XML node of the element.

Private Attributes

StringBuilder _argumentBuilder
string _asmVersion
bool _delaySign
string _keyContainer
FileInfo _keyFile
string _namespace
FileInfo _outputFile
bool _primary
FileInfo _publicKeyFile
AssemblyFileSet _references = new AssemblyFileSet()
bool _strictref
bool _sysarray
FileInfo _typelib
bool _unsafe

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

Generated by  Doxygen 1.6.0   Back to index