C# Class NAnt.VSNet.ProjectBase

Base class for all project classes.
ファイルを表示 Open project: skolima/NAnt Class Usage Examples

Private Properties

Property Type Description

Public Methods

Method Description
Compile ( NAnt.VSNet.Configuration solutionConfiguration ) : bool
CreateProjectReference ( ProjectBase project, bool isPrivateSpecified, bool isPrivate ) : ProjectReferenceBase
GetAssemblyReferences ( NAnt.VSNet.Configuration solutionConfiguration ) : StringCollection
GetConfiguration ( NAnt.VSNet.Configuration solutionConfiguration ) : NAnt.VSNet.ConfigurationBase
GetOutputFiles ( NAnt.VSNet.Configuration solutionConfiguration, Hashtable outputFiles ) : void

Gets the complete set of output files for the project configuration matching the specified solution configuration.

The key of the case-insensitive Hashtable is the full path of the output file and the value is the path relative to the output directory.

If the project is not configured to be built for the specified solution configuration, then no output files are added.

GetOutputPath ( NAnt.VSNet.Configuration solutionConfiguration ) : string
IsManaged ( NAnt.VSNet.Configuration configuration ) : bool

Gets a value indicating whether building the project for the specified build configuration results in managed output.

Protected Methods

Method Description
Build ( NAnt.VSNet.Configuration solutionConfiguration ) : BuildResult
CopyFile ( FileInfo srcFile, FileInfo destFile, NAnt.Core.Task parent ) : void

Copies the specified file if the destination file does not exist, or the source file has been modified since it was previously copied.

DetermineProductVersion ( XmlElement docElement ) : ProductVersion

Returns the Visual Studio product version of the specified project XML fragment.

ExecuteBuildEvent ( string buildEvent, string buildCommandLine, string batchFile, string workingDirectory, NAnt.VSNet.ConfigurationBase config ) : bool
ExpandMacro ( string macro ) : string

Expands the given macro.

Log ( Level messageLevel, string message ) : void

Logs a message with the given priority.

The actual logging is delegated to the underlying task.

Prepare ( NAnt.VSNet.Configuration solutionConfiguration ) : void

Prepares the project for being built.

The default implementation will ensure that none of the output files are marked read-only.

ProjectBase ( XmlElement xmlDefinition, NAnt.VSNet.Tasks.SolutionTask solutionTask, TempFileCollection temporaryFiles, GacCache gacCache, ReferencesResolver referencesResolver, DirectoryInfo outputDir ) : System

Initializes a new instance of the ProjectBase class.

VerifyProjectXml ( XmlElement docElement ) : void

Verifies whether the specified XML fragment represents a valid project that is supported by this ProjectBase.

Method Details

Build() protected abstract method

protected abstract Build ( NAnt.VSNet.Configuration solutionConfiguration ) : BuildResult
solutionConfiguration NAnt.VSNet.Configuration
return BuildResult

Compile() public method

public Compile ( NAnt.VSNet.Configuration solutionConfiguration ) : bool
solutionConfiguration NAnt.VSNet.Configuration
return bool

CopyFile() protected method

Copies the specified file if the destination file does not exist, or the source file has been modified since it was previously copied.
protected CopyFile ( FileInfo srcFile, FileInfo destFile, NAnt.Core.Task parent ) : void
srcFile System.IO.FileInfo The file to copy.
destFile System.IO.FileInfo The destination file.
parent NAnt.Core.Task The in which context the operation will be performed.
return void

CreateProjectReference() public abstract method

public abstract CreateProjectReference ( ProjectBase project, bool isPrivateSpecified, bool isPrivate ) : ProjectReferenceBase
project ProjectBase
isPrivateSpecified bool
isPrivate bool
return ProjectReferenceBase

DetermineProductVersion() protected abstract method

Returns the Visual Studio product version of the specified project XML fragment.
/// The product version could not be determined. /// -or- /// The product version is not supported. ///
protected abstract DetermineProductVersion ( XmlElement docElement ) : ProductVersion
docElement System.Xml.XmlElement XML fragment representing the project file.
return ProductVersion

ExecuteBuildEvent() protected method

protected ExecuteBuildEvent ( string buildEvent, string buildCommandLine, string batchFile, string workingDirectory, NAnt.VSNet.ConfigurationBase config ) : bool
buildEvent string
buildCommandLine string
batchFile string
workingDirectory string
config NAnt.VSNet.ConfigurationBase
return bool

ExpandMacro() protected method

Expands the given macro.
protected ExpandMacro ( string macro ) : string
macro string The macro to expand.
return string

GetAssemblyReferences() public method

public GetAssemblyReferences ( NAnt.VSNet.Configuration solutionConfiguration ) : StringCollection
solutionConfiguration NAnt.VSNet.Configuration
return System.Collections.Specialized.StringCollection

GetConfiguration() public method

public GetConfiguration ( NAnt.VSNet.Configuration solutionConfiguration ) : NAnt.VSNet.ConfigurationBase
solutionConfiguration NAnt.VSNet.Configuration
return NAnt.VSNet.ConfigurationBase

GetOutputFiles() public method

Gets the complete set of output files for the project configuration matching the specified solution configuration.

The key of the case-insensitive Hashtable is the full path of the output file and the value is the path relative to the output directory.

If the project is not configured to be built for the specified solution configuration, then no output files are added.

public GetOutputFiles ( NAnt.VSNet.Configuration solutionConfiguration, Hashtable outputFiles ) : void
solutionConfiguration NAnt.VSNet.Configuration The solution configuration that is built.
outputFiles System.Collections.Hashtable The set of output files to be updated.
return void

GetOutputPath() public method

public GetOutputPath ( NAnt.VSNet.Configuration solutionConfiguration ) : string
solutionConfiguration NAnt.VSNet.Configuration
return string

IsManaged() public abstract method

Gets a value indicating whether building the project for the specified build configuration results in managed output.
public abstract IsManaged ( NAnt.VSNet.Configuration configuration ) : bool
configuration NAnt.VSNet.Configuration The build configuration.
return bool

Log() protected method

Logs a message with the given priority.
The actual logging is delegated to the underlying task.
protected Log ( Level messageLevel, string message ) : void
messageLevel Level The message priority at which the specified message is to be logged.
message string The message to be logged.
return void

Prepare() protected method

Prepares the project for being built.
The default implementation will ensure that none of the output files are marked read-only.
protected Prepare ( NAnt.VSNet.Configuration solutionConfiguration ) : void
solutionConfiguration NAnt.VSNet.Configuration The solution configuration that is built.
return void

ProjectBase() protected method

Initializes a new instance of the ProjectBase class.
protected ProjectBase ( XmlElement xmlDefinition, NAnt.VSNet.Tasks.SolutionTask solutionTask, TempFileCollection temporaryFiles, GacCache gacCache, ReferencesResolver referencesResolver, DirectoryInfo outputDir ) : System
xmlDefinition System.Xml.XmlElement
solutionTask NAnt.VSNet.Tasks.SolutionTask
temporaryFiles System.CodeDom.Compiler.TempFileCollection
gacCache NAnt.Core.Util.GacCache
referencesResolver ReferencesResolver
outputDir System.IO.DirectoryInfo
return System

VerifyProjectXml() protected abstract method

Verifies whether the specified XML fragment represents a valid project that is supported by this ProjectBase.
/// The XML fragment is not supported by this . /// -or- /// The XML fragment does not represent a valid project (for this ). ///
protected abstract VerifyProjectXml ( XmlElement docElement ) : void
docElement System.Xml.XmlElement XML fragment representing the project file.
return void