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

NAnt::DotNet::Tasks::RegsvcsTask Class Reference

Inheritance diagram for NAnt::DotNet::Tasks::RegsvcsTask:

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

List of all members.


Detailed Description

Installs or removes .NET Services.

This tasks provides the same functionality as the regsvcs tool provided in the .NET SDK.

It performs the following actions:

Refer to the .NET Services Installation Tool (Regsvcs.exe) for more information.

Adds all public classes contained in myTest.dll to a COM+ application and produces the myTest.tlb type library. If the application already exists, it is overwritten.

            <![CDATA[
        <regsvcs action="FindOrCreate" assembly="myTest.dll" />
            ]]>

Adds all public classes contained in myTest.dll to myTargetApp and produces the myTest.tlb type library. If the application already exists, it is overwritten.

            <![CDATA[
        <regsvcs action="FindOrCreate" assembly="myTest.dll" application="myTargetApp" />
            ]]>

Adds all public classes contained in myTest.dll to a COM+ application and produces the myTest.tlb type library. A new application is always created.

            <![CDATA[
        <regsvcs action="Create" assembly="myTest.dll" />
            ]]>

Uninstalls the COM+ application contained in myTest.dll.

            <![CDATA[
        <regsvcs action="Uninstall" assembly="myTest.dll" />
            ]]>

Definition at line 107 of file RegSvcsTask.cs.


Public Types

enum  ActionType {
  FindOrCreate, Create, Uninstall, Start,
  Stop, Restart, Pause, Continue
}
 Defines the possible actions for a .NET Service. More...

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 ()
 Performs the specified action.
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 void PrepareProcess (Process process)
 Updates the ProcessStartInfo of the specified Process.
virtual Process StartProcess ()
 Starts the process and handles errors.

Properties

ActionType Action [get, set]
 Defines the action to take with the assembly. The default is ActionType.FindOrCreate.
string ApplicationName [get, set]
 Specifies the name of the COM+ application to either find or create.
virtual ArgumentCollection Arguments [get]
 The command-line arguments for the external program.
FileInfo AssemblyFile [get, set]
 The source assembly file.
virtual DirectoryInfo BaseDirectory [get, set]
 Gets the working directory for the application.
string CommandLine [get]
 Gets the command-line arguments, separated by spaces.
bool ComponentsOnly [get, set]
 Configures components only; ignores methods and interfaces. The default is .
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.
bool ExistingApplication [get, set]
 Expect an existing application. The default is .
bool ExistingTypeLibrary [get, set]
 Uses an existing type library. The default is .
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 .
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 NoReconfig [get, set]
 Do not reconfigure an existing target application. 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.
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.
string PartitionName [get, set]
 Specifies the name or id of the COM+ application to either find or create.
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.
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 TypeLibrary [get, set]
 Specifies the type library file to install.
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 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

ActionType _action = ActionType.FindOrCreate
string _applicationName
StringBuilder _argumentBuilder = null
FileInfo _assemblyFile
bool _componentsOnly = false
bool _existingApplication = false
bool _existingTlb = false
bool _noreconfig = false
string _partitionName = null
FileInfo _typeLibrary

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

Generated by  Doxygen 1.6.0   Back to index