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

NAnt::DotNet::Tasks::CompilerBase Class Reference

Inheritance diagram for NAnt::DotNet::Tasks::CompilerBase:

NAnt::Core::Tasks::ExternalProgramBase NAnt::Core::Task NAnt::Core::Element NAnt::DotNet::Tasks::CscTask NAnt::DotNet::Tasks::JscTask

List of all members.


Detailed Description

Provides the abstract base class for compiler tasks.

Definition at line 42 of file CompilerBase.cs.


Public Member Functions

void Execute ()
 Executes the task unless it is skipped.
string GetManifestResourceName (ResourceFileSet resources, string resourceFile)
 Determines the manifest resource name of the given resource file.
string GetManifestResourceName (ResourceFileSet resources, string resourcePhysicalFile, string resourceLogicalFile, string dependentFile)
 Determines the manifest resource name of the given resource file.
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.
virtual ResourceLinkage PerformSearchForResourceLinkage (TextReader sr)
 Extracts the associated namespace/classname linkage found in the given stream.

Static Public Member Functions

static CultureInfo GetResourceCulture (string resourceFile, string dependentFile)
 Determines the culture associated with a given resource file by scanning the filename for valid culture names.
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 CompileResxResources (StringCollection resxFiles)
 Compiles a set of resx files to a .resources files.
void CopyTo (Element clone)
 Copies all instance data of the Element to a given Element.
override void ExecuteTask ()
 Compiles the sources and resources.
XmlNode GetAttributeConfigurationNode (FrameworkInfo framework, string attributeName)
 Locates the XML node for the specified attribute in the project configuration node.
virtual ResourceLinkage GetResourceLinkage (string dependentFile, CultureInfo resourceCulture)
 Finds the correct namespace/classname for a resource file from the given dependent source file.
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.
void LinkResourceAssembly (Hashtable resourceFiles, FileInfo resourceAssemblyFile, string culture)
 Link a list of files into a resource assembly.
virtual bool NeedsCompiling ()
 Determines whether compilation is needed.
virtual void PrepareProcess (Process process)
 Updates the ProcessStartInfo of the specified Process.
virtual Process StartProcess ()
 Starts the process and handles errors.
virtual void WriteModuleReferences (TextWriter writer)
 Writes module references to the specified TextWriter.
virtual void WriteNoWarnList (TextWriter writer)
 Writes list of warnings to suppress to the specified TextWriter.
virtual void WriteOption (TextWriter writer, string name, string arg)
 Writes an option and its value using the default output format.
virtual void WriteOption (TextWriter writer, string name)
 Writes an option using the default output format.
virtual void WriteOptions (TextWriter writer)
 Allows derived classes to provide compiler-specific options.
virtual void WritePackageReferences (TextWriter writer)
 Writes package references to the specified TextWriter.
virtual void WriteWarningsAsError (TextWriter writer)
 Writes list of warnings to (not) treat as errors to the specified TextWriter.

Static Protected Attributes

static string[] CodebehindExtensions = {".aspx", ".asax", ".ascx", ".asmx"}
 Contains a list of extensions for all file types that should be treated as 'code-behind' when looking for resources. Ultimately this will determine if we use the "namespace+filename" or "namespace+classname" algorithm, since code-behind will use the "namespace+classname" algorithm.
static readonly Hashtable CultureNames
 Case-insensitive list of valid culture names for this platform.

Properties

virtual ArgumentCollection Arguments [get]
 The command-line arguments for the external program.
virtual DirectoryInfo BaseDirectory [get, set]
 Gets the working directory for the application.
abstract Regex ClassNameRegex [get]
 Gets the class name regular expression for the language of the current compiler.
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 bool Debug [get, set]
 Generate debug output. The default is .
string Define [get, set]
 Define conditional compilation symbol(s).
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.
abstract string Extension [get]
 Gets the file extension required by the current compiler.
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 recompile the output file regardless of the file timestamps.
bool IfDefined [get, set]
 If then the task will be executed; otherwise, skipped. The default is .
FileSet Lib [get, set]
 Additional directories to search in for assembly references.
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.
string MainType [get, set]
 Specifies which type contains the Main method that you want to use as the entry point into the program.
virtual AssemblyFileSet Modules [get, set]
 Link the specified modules into this assembly.
override string Name [get]
 The name of the task.
XmlNamespaceManager NamespaceManager [get, set]
 Gets or sets the XmlNamespaceManager.
abstract Regex NamespaceRegex [get]
 Gets the namespace regular expression for the language of the current compiler.
virtual string NoWarn [get, set]
 Specifies a comma-separated list of warnings that should be suppressed by the compiler.
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]
 The output file created by the compiler.
string OutputTarget [get, set]
 Output type. Possible values are exe, winexe, library or module.
virtual TextWriter OutputWriter [get, set]
 Gets or sets the TextWriter to which standard output messages of the external program will be written.
virtual PackageCollection Packages [get, set]
 Specifies list of packages to reference.
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.
AssemblyFileSet References [get, set]
 Reference metadata from the specified assembly files.
ResourceFileSetCollection ResourcesList [get]
 Resources to embed.
FileSet Sources [get, set]
 The set of source files for compilation.
virtual bool SupportsNoWarnList [get, set]
 Indicates whether the compiler for a given target framework supports a command line option that allows a list of warnings to be suppressed. The default is .
virtual bool SupportsPackageReferences [get, set]
 Indicates whether package references are supported by compiler for a given target framework. The default is .
virtual bool SupportsWarnAsErrorList [get, set]
 Indicates whether the compiler for a given target framework supports the "warnaserror" option that takes a list of warnings. The default is .
virtual CompilerWarningCollection SuppressWarnings [get]
 Specifies a list of warnings that you want the compiler to suppress.
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.
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 .
bool WarnAsError [get, set]
 Instructs the compiler to treat all warnings as errors. The default is .
virtual WarningAsError WarningAsError [get]
 Controls which warnings should be reported as errors.
FileInfo Win32Icon [get, set]
 Icon to associate with the application.
virtual XmlNode XmlNode [get, set]
 Gets or sets the XML node of the element.

Static Private Member Functions

static CompilerBase ()
 Class constructor for CompilerBase.

Private Attributes

bool _debug
string _define
bool _forceRebuild
FileSet _lib = new FileSet()
string _mainType
AssemblyFileSet _modules = new AssemblyFileSet()
string _noWarn
FileInfo _outputFile
PackageCollection _packages = new PackageCollection()
AssemblyFileSet _references = new AssemblyFileSet()
ResourceFileSetCollection _resourcesList = new ResourceFileSetCollection()
string _responseFileName
FileSet _sources = new FileSet()
bool _supportsNoWarnList
bool _supportsPackageReferences
bool _supportsWarnAsErrorList
CompilerWarningCollection _suppressWarnings = new CompilerWarningCollection()
string _target
bool _warnAsError
WarningAsError _warningAsError = new WarningAsError()
FileInfo _win32icon

Classes

class  ResourceLinkage
 Holds class and namespace information for resource (*.resx) linkage. More...

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

Generated by  Doxygen 1.6.0   Back to index