C# Class NAnt.VSNet.ProjectBase

Base class for all project classes.
Afficher le fichier Open project: skolima/NAnt Class Usage Examples

Private Properties

Свойство Type Description

Méthodes publiques

Méthode 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.

Méthodes protégées

Méthode 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 méthode

protected abstract Build ( NAnt.VSNet.Configuration solutionConfiguration ) : BuildResult
solutionConfiguration NAnt.VSNet.Configuration
Résultat BuildResult

Compile() public méthode

public Compile ( NAnt.VSNet.Configuration solutionConfiguration ) : bool
solutionConfiguration NAnt.VSNet.Configuration
Résultat bool

CopyFile() protected méthode

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.
Résultat void

CreateProjectReference() public abstract méthode

public abstract CreateProjectReference ( ProjectBase project, bool isPrivateSpecified, bool isPrivate ) : ProjectReferenceBase
project ProjectBase
isPrivateSpecified bool
isPrivate bool
Résultat ProjectReferenceBase

DetermineProductVersion() protected abstract méthode

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.
Résultat ProductVersion

ExecuteBuildEvent() protected méthode

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
Résultat bool

ExpandMacro() protected méthode

Expands the given macro.
protected ExpandMacro ( string macro ) : string
macro string The macro to expand.
Résultat string

GetAssemblyReferences() public méthode

public GetAssemblyReferences ( NAnt.VSNet.Configuration solutionConfiguration ) : StringCollection
solutionConfiguration NAnt.VSNet.Configuration
Résultat System.Collections.Specialized.StringCollection

GetConfiguration() public méthode

public GetConfiguration ( NAnt.VSNet.Configuration solutionConfiguration ) : NAnt.VSNet.ConfigurationBase
solutionConfiguration NAnt.VSNet.Configuration
Résultat NAnt.VSNet.ConfigurationBase

GetOutputFiles() public méthode

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.
Résultat void

GetOutputPath() public méthode

public GetOutputPath ( NAnt.VSNet.Configuration solutionConfiguration ) : string
solutionConfiguration NAnt.VSNet.Configuration
Résultat string

IsManaged() public abstract méthode

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.
Résultat bool

Log() protected méthode

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.
Résultat void

Prepare() protected méthode

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.
Résultat void

ProjectBase() protected méthode

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
Résultat System

VerifyProjectXml() protected abstract méthode

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.
Résultat void