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

NAnt::DotNet::Tasks::ResGenTask Class Reference

Inheritance diagram for NAnt::DotNet::Tasks::ResGenTask:

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

List of all members.


Detailed Description

Converts files from one resource format to another.

<note> If no ToDirectory is specified, the resource file will be created next to the input file. </note>

Convert a resource file from the .resx to the .resources format.

            <![CDATA[
        <resgen input="translations.resx" output="translations.resources" />
            ]]>

Convert a set of .resx files to the .resources format.

            <![CDATA[
        <resgen todir=".">
            <resources>
                <include name="*.resx" />
            </resources>
        </resgen>
            ]]>

Definition at line 78 of file ResGenTask.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.
void RemoveOutputs ()
 Cleans up generated files.

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 AppendArgument (string s)
 Adds a command line argument to the command line for the external program that is used to convert the resource files.
void CopyTo (Element clone)
 Copies all instance data of the Element to a given Element.
override void ExecuteTask ()
 Converts a single file or group of files.
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 (FileInfo inputFile, FileInfo outputFile)
 Determines whether the specified input file needs to be compiled.
override void PrepareProcess (Process process)
 Updates the ProcessStartInfo of the specified Process.
virtual Process StartProcess ()
 Starts the process and handles errors.

Properties

virtual ArgumentCollection Arguments [get]
 The command-line arguments for the external program.
AssemblyFileSet Assemblies [get, set]
 Reference metadata from the specified assembly files.
override 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.
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 .
FileInfo InputFile [get, set]
 Input file to process.
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.
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 resource file to 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.
override string ProgramArguments [get]
 Gets the command line arguments for the external program.
override 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 RequiresAssemblyReferences [get]
ResourceFileSet Resources [get, set]
 Takes a list of .resx or .txt files to convert to .resources files.
bool SupportsAssemblyReferences [get, set]
 Indicates whether assembly references are supported by the resgen tool for the current target framework. The default is .
bool SupportsExternalFileReferences [get, set]
 Indicates whether external file references are supported by the resgen tool for the current target framework. The default is .
string TargetExt [get, set]
 The target type. The default is resources.
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]
 The directory to which outputs will be stored.
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 UseSourcePath [get, set]
 Use each source file's directory as the current directory for resolving relative file paths. The default is . Only supported when targeting .NET 2.0 (or higher).
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 Member Functions

StringCollection GetExternalFileReferences (FileInfo resxFile)
 Returns a list of external file references for the specified file.
FileInfo GetOutputFile (FileInfo file)
 Determines the full path and extension for the output file.
bool ReferencesThirdPartyAssemblies (string resourceFile)
 Determines whether the specified resource file references third party assemblies by checking whether a <data> element exists with a "type" attribute that does not start with "System.".

Private Attributes

string _arguments
AssemblyFileSet _assemblies = new AssemblyFileSet()
FileInfo _inputFile
const int _maxCmdLineLength = 30000
FileInfo _outputFile
string _programFileName
ResourceFileSet _resources = new ResourceFileSet()
bool _supportsAssemblyReferences
bool _supportsExternalFileReferences
string _targetExt = "resources"
DirectoryInfo _toDir
bool _useSourcePath
DirectoryInfo _workingDirectory

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

Generated by  Doxygen 1.6.0   Back to index