C# Class MonoDevelop.Projects.Project

Inheritance: SolutionEntityItem
Afficher le fichier Open project: LogosBible/monodevelop Class Usage Examples

Private Properties

Свойство Type Description
NotifyFileAddedToProject void
NotifyFileChangedInProject void
NotifyFilePropertyChangedInProject void
NotifyFileRemovedFromProject void
NotifyFileRenamedInProject void
OnFileChanged void
ResolveDependencies void
UpdateDependency void
UsingMSBuildEngine bool

Méthodes publiques

Méthode Description
AddDirectory ( string relativePath ) : ProjectFile

Adds a directory to the project.

The directory is created if it doesn't exist

AddFile ( string filename ) : ProjectFile

Adds a file to the project

AddFile ( string filename, string buildAction ) : ProjectFile

Adds a file to the project

AddFile ( ProjectFile projectFile ) : void

Adds a file to the project

AddFiles ( IEnumerable files ) : IEnumerable
AddFiles ( IEnumerable files, string buildAction ) : IEnumerable
CopySupportFiles ( IProgressMonitor monitor, MonoDevelop.Projects.ConfigurationSelector configuration ) : void

Copies the support files to the output directory

Copies all support files to the output directory of the given configuration. Support files include: assembly references with the Local Copy flag, data files with the Copy to Output option, etc.

DeleteSupportFiles ( IProgressMonitor monitor, MonoDevelop.Projects.ConfigurationSelector configuration ) : void

Removes all support files from the output directory

Deletes all support files from the output directory of the given configuration. Support files include: assembly references with the Local Copy flag, data files with the Copy to Output option, etc.

Dispose ( ) : void
GetBuildActions ( ) : string[]

Gets a list of build actions supported by this project

Common actions are grouped at the top, separated by a "--" entry *IF* there are more "uncommon" actions than "common" actions

GetDefaultBuildAction ( string fileName ) : string

Gets the default build action for a file

GetOutputFileName ( MonoDevelop.Projects.ConfigurationSelector configuration ) : FilePath

Gets the absolute path to the output file generated by this project.

GetOutputFiles ( MonoDevelop.Projects.ConfigurationSelector configuration ) : List

Gets a list of files generated when building this project

Returns a list of all files that are generated when this project is built, including: the generated binary, debug information files, satellite assemblies.

GetProjectFile ( string fileName ) : ProjectFile

Gets a project file.

GetSupportFileList ( MonoDevelop.Projects.ConfigurationSelector configuration ) : FileCopySet

Gets a list of files required to use the project output

Returns a list of all files that are required to use the project output binary, for example: data files with the Copy to Output option, debug information files, generated resource files, etc.

IsCompileable ( string fileName ) : bool

Determines whether the provided file can be as part of this project

IsFileInProject ( string fileName ) : bool

Determines whether a file belongs to this project

LoadProject ( string filename, IProgressMonitor monitor ) : Project

Méthodes protégées

Méthode Description
CheckNeedsBuild ( MonoDevelop.Projects.ConfigurationSelector configuration ) : bool

Checks if the project needs to be built

DoBuild ( IProgressMonitor monitor, MonoDevelop.Projects.ConfigurationSelector configuration ) : MonoDevelop.Projects.BuildResult

Builds the project.

This method is invoked to build the project. Support files such as files with the Copy to Output flag will be copied before calling this method.

DoClean ( IProgressMonitor monitor, MonoDevelop.Projects.ConfigurationSelector configuration ) : void
DoExecute ( IProgressMonitor monitor, MonoDevelop.Projects.ExecutionContext context, MonoDevelop.Projects.ConfigurationSelector configuration ) : void

Executes the project

GetCommonBuildActions ( ) : IList

Gets a list of common build actions (common actions are shown first in the project build action list)

GetStandardBuildActions ( ) : IEnumerable

Gets a list of standard build actions.

OnBuild ( IProgressMonitor monitor, MonoDevelop.Projects.ConfigurationSelector configuration ) : MonoDevelop.Projects.BuildResult
OnClean ( IProgressMonitor monitor, MonoDevelop.Projects.ConfigurationSelector configuration ) : void
OnExecute ( IProgressMonitor monitor, MonoDevelop.Projects.ExecutionContext context, MonoDevelop.Projects.ConfigurationSelector configuration ) : void
OnFileAddedToProject ( MonoDevelop.Projects.ProjectFileEventArgs e ) : void

Raises the FileAddedToProject event.

OnFileChangedInProject ( MonoDevelop.Projects.ProjectFileEventArgs e ) : void

Raises the FileChangedInProject event.

OnFilePropertyChangedInProject ( MonoDevelop.Projects.ProjectFileEventArgs e ) : void

Raises the FilePropertyChangedInProject event.

OnFileRemovedFromProject ( MonoDevelop.Projects.ProjectFileEventArgs e ) : void

Raises the FileRemovedFromProject event.

OnFileRenamedInProject ( MonoDevelop.Projects.ProjectFileRenamedEventArgs e ) : void

Raises the FileRenamedInProject event.

OnGetItemFiles ( bool includeReferencedFiles ) : List
OnGetLastBuildTime ( MonoDevelop.Projects.ConfigurationSelector configuration ) : System.DateTime
OnGetNeedsBuilding ( MonoDevelop.Projects.ConfigurationSelector configuration ) : bool
OnItemsAdded ( IEnumerable objs ) : void
OnItemsRemoved ( IEnumerable objs ) : void
PopulateOutputFileList ( List list, MonoDevelop.Projects.ConfigurationSelector configuration ) : void

Gets a list of files retuired to use the project output

Returns a list of all files that are required to use the project output binary, for example: data files with the Copy to Output option, debug information files, generated resource files, etc.

PopulateSupportFileList ( FileCopySet list, MonoDevelop.Projects.ConfigurationSelector configuration ) : void

Gets a list of files required to use the project output

Returns a list of all files that are required to use the project output binary, for example: data files with the Copy to Output option, debug information files, generated resource files, etc.

Project ( ) : System

Private Methods

Méthode Description
NotifyFileAddedToProject ( IEnumerable objs ) : void
NotifyFileChangedInProject ( ProjectFile file ) : void
NotifyFilePropertyChangedInProject ( ProjectFile file, string property ) : void
NotifyFileRemovedFromProject ( IEnumerable objs ) : void
NotifyFileRenamedInProject ( MonoDevelop.Projects.ProjectFileRenamedEventArgs args ) : void
OnFileChanged ( object source, FileEventArgs e ) : void
ResolveDependencies ( ProjectFile file ) : void
UpdateDependency ( ProjectFile file, FilePath oldPath ) : void
UsingMSBuildEngine ( MonoDevelop.Projects.ConfigurationSelector sel ) : bool

Method Details

AddDirectory() public méthode

Adds a directory to the project.
The directory is created if it doesn't exist
public AddDirectory ( string relativePath ) : ProjectFile
relativePath string /// Relative path of the directory. ///
Résultat ProjectFile

AddFile() public méthode

Adds a file to the project
public AddFile ( string filename ) : ProjectFile
filename string /// Absolute path to the file. ///
Résultat ProjectFile

AddFile() public méthode

Adds a file to the project
public AddFile ( string filename, string buildAction ) : ProjectFile
filename string /// Absolute path to the file. ///
buildAction string /// Build action to assign to the file. ///
Résultat ProjectFile

AddFile() public méthode

Adds a file to the project
public AddFile ( ProjectFile projectFile ) : void
projectFile ProjectFile /// The file. ///
Résultat void

AddFiles() public méthode

public AddFiles ( IEnumerable files ) : IEnumerable
files IEnumerable
Résultat IEnumerable

AddFiles() public méthode

public AddFiles ( IEnumerable files, string buildAction ) : IEnumerable
files IEnumerable
buildAction string
Résultat IEnumerable

CheckNeedsBuild() protected méthode

Checks if the project needs to be built
protected CheckNeedsBuild ( MonoDevelop.Projects.ConfigurationSelector configuration ) : bool
configuration MonoDevelop.Projects.ConfigurationSelector /// Build configuration. ///
Résultat bool

CopySupportFiles() public méthode

Copies the support files to the output directory
Copies all support files to the output directory of the given configuration. Support files include: assembly references with the Local Copy flag, data files with the Copy to Output option, etc.
public CopySupportFiles ( IProgressMonitor monitor, MonoDevelop.Projects.ConfigurationSelector configuration ) : void
monitor IProgressMonitor /// Progress monitor. ///
configuration MonoDevelop.Projects.ConfigurationSelector /// Configuration for which to copy the files. ///
Résultat void

DeleteSupportFiles() public méthode

Removes all support files from the output directory
Deletes all support files from the output directory of the given configuration. Support files include: assembly references with the Local Copy flag, data files with the Copy to Output option, etc.
public DeleteSupportFiles ( IProgressMonitor monitor, MonoDevelop.Projects.ConfigurationSelector configuration ) : void
monitor IProgressMonitor /// Progress monitor. ///
configuration MonoDevelop.Projects.ConfigurationSelector /// Configuration for which to delete the files. ///
Résultat void

Dispose() public méthode

public Dispose ( ) : void
Résultat void

DoBuild() protected méthode

Builds the project.
This method is invoked to build the project. Support files such as files with the Copy to Output flag will be copied before calling this method.
protected DoBuild ( IProgressMonitor monitor, MonoDevelop.Projects.ConfigurationSelector configuration ) : MonoDevelop.Projects.BuildResult
monitor IProgressMonitor /// Progress monitor. ///
configuration MonoDevelop.Projects.ConfigurationSelector /// Configuration to build. ///
Résultat MonoDevelop.Projects.BuildResult

DoClean() protected méthode

protected DoClean ( IProgressMonitor monitor, MonoDevelop.Projects.ConfigurationSelector configuration ) : void
monitor IProgressMonitor
configuration MonoDevelop.Projects.ConfigurationSelector
Résultat void

DoExecute() protected méthode

Executes the project
protected DoExecute ( IProgressMonitor monitor, MonoDevelop.Projects.ExecutionContext context, MonoDevelop.Projects.ConfigurationSelector configuration ) : void
monitor IProgressMonitor /// Progress monitor. ///
context MonoDevelop.Projects.ExecutionContext /// Execution context. ///
configuration MonoDevelop.Projects.ConfigurationSelector /// Configuration to execute. ///
Résultat void

GetBuildActions() public méthode

Gets a list of build actions supported by this project
Common actions are grouped at the top, separated by a "--" entry *IF* there are more "uncommon" actions than "common" actions
public GetBuildActions ( ) : string[]
Résultat string[]

GetCommonBuildActions() protected méthode

Gets a list of common build actions (common actions are shown first in the project build action list)
protected GetCommonBuildActions ( ) : IList
Résultat IList

GetDefaultBuildAction() public méthode

Gets the default build action for a file
public GetDefaultBuildAction ( string fileName ) : string
fileName string /// File name. ///
Résultat string

GetOutputFileName() public méthode

Gets the absolute path to the output file generated by this project.
public GetOutputFileName ( MonoDevelop.Projects.ConfigurationSelector configuration ) : FilePath
configuration MonoDevelop.Projects.ConfigurationSelector /// Build configuration. ///
Résultat FilePath

GetOutputFiles() public méthode

Gets a list of files generated when building this project
Returns a list of all files that are generated when this project is built, including: the generated binary, debug information files, satellite assemblies.
public GetOutputFiles ( MonoDevelop.Projects.ConfigurationSelector configuration ) : List
configuration MonoDevelop.Projects.ConfigurationSelector /// Build configuration for which get the list ///
Résultat List

GetProjectFile() public méthode

Gets a project file.
public GetProjectFile ( string fileName ) : ProjectFile
fileName string /// File name. ///
Résultat ProjectFile

GetStandardBuildActions() protected méthode

Gets a list of standard build actions.
protected GetStandardBuildActions ( ) : IEnumerable
Résultat IEnumerable

GetSupportFileList() public méthode

Gets a list of files required to use the project output
Returns a list of all files that are required to use the project output binary, for example: data files with the Copy to Output option, debug information files, generated resource files, etc.
public GetSupportFileList ( MonoDevelop.Projects.ConfigurationSelector configuration ) : FileCopySet
configuration MonoDevelop.Projects.ConfigurationSelector /// Build configuration for which get the list ///
Résultat FileCopySet

IsCompileable() public méthode

Determines whether the provided file can be as part of this project
public IsCompileable ( string fileName ) : bool
fileName string /// File name ///
Résultat bool

IsFileInProject() public méthode

Determines whether a file belongs to this project
public IsFileInProject ( string fileName ) : bool
fileName string /// File name ///
Résultat bool

LoadProject() public static méthode

public static LoadProject ( string filename, IProgressMonitor monitor ) : Project
filename string
monitor IProgressMonitor
Résultat Project

OnBuild() protected méthode

protected OnBuild ( IProgressMonitor monitor, MonoDevelop.Projects.ConfigurationSelector configuration ) : MonoDevelop.Projects.BuildResult
monitor IProgressMonitor
configuration MonoDevelop.Projects.ConfigurationSelector
Résultat MonoDevelop.Projects.BuildResult

OnClean() protected méthode

protected OnClean ( IProgressMonitor monitor, MonoDevelop.Projects.ConfigurationSelector configuration ) : void
monitor IProgressMonitor
configuration MonoDevelop.Projects.ConfigurationSelector
Résultat void

OnExecute() protected méthode

protected OnExecute ( IProgressMonitor monitor, MonoDevelop.Projects.ExecutionContext context, MonoDevelop.Projects.ConfigurationSelector configuration ) : void
monitor IProgressMonitor
context MonoDevelop.Projects.ExecutionContext
configuration MonoDevelop.Projects.ConfigurationSelector
Résultat void

OnFileAddedToProject() protected méthode

Raises the FileAddedToProject event.
protected OnFileAddedToProject ( MonoDevelop.Projects.ProjectFileEventArgs e ) : void
e MonoDevelop.Projects.ProjectFileEventArgs
Résultat void

OnFileChangedInProject() protected méthode

Raises the FileChangedInProject event.
protected OnFileChangedInProject ( MonoDevelop.Projects.ProjectFileEventArgs e ) : void
e MonoDevelop.Projects.ProjectFileEventArgs
Résultat void

OnFilePropertyChangedInProject() protected méthode

Raises the FilePropertyChangedInProject event.
protected OnFilePropertyChangedInProject ( MonoDevelop.Projects.ProjectFileEventArgs e ) : void
e MonoDevelop.Projects.ProjectFileEventArgs
Résultat void

OnFileRemovedFromProject() protected méthode

Raises the FileRemovedFromProject event.
protected OnFileRemovedFromProject ( MonoDevelop.Projects.ProjectFileEventArgs e ) : void
e MonoDevelop.Projects.ProjectFileEventArgs
Résultat void

OnFileRenamedInProject() protected méthode

Raises the FileRenamedInProject event.
protected OnFileRenamedInProject ( MonoDevelop.Projects.ProjectFileRenamedEventArgs e ) : void
e MonoDevelop.Projects.ProjectFileRenamedEventArgs
Résultat void

OnGetItemFiles() protected méthode

protected OnGetItemFiles ( bool includeReferencedFiles ) : List
includeReferencedFiles bool
Résultat List

OnGetLastBuildTime() protected méthode

protected OnGetLastBuildTime ( MonoDevelop.Projects.ConfigurationSelector configuration ) : System.DateTime
configuration MonoDevelop.Projects.ConfigurationSelector
Résultat System.DateTime

OnGetNeedsBuilding() protected méthode

protected OnGetNeedsBuilding ( MonoDevelop.Projects.ConfigurationSelector configuration ) : bool
configuration MonoDevelop.Projects.ConfigurationSelector
Résultat bool

OnItemsAdded() protected méthode

protected OnItemsAdded ( IEnumerable objs ) : void
objs IEnumerable
Résultat void

OnItemsRemoved() protected méthode

protected OnItemsRemoved ( IEnumerable objs ) : void
objs IEnumerable
Résultat void

PopulateOutputFileList() protected méthode

Gets a list of files retuired to use the project output
Returns a list of all files that are required to use the project output binary, for example: data files with the Copy to Output option, debug information files, generated resource files, etc.
protected PopulateOutputFileList ( List list, MonoDevelop.Projects.ConfigurationSelector configuration ) : void
list List /// List where to add the support files. ///
configuration MonoDevelop.Projects.ConfigurationSelector /// Build configuration for which get the list ///
Résultat void

PopulateSupportFileList() protected méthode

Gets a list of files required to use the project output
Returns a list of all files that are required to use the project output binary, for example: data files with the Copy to Output option, debug information files, generated resource files, etc.
protected PopulateSupportFileList ( FileCopySet list, MonoDevelop.Projects.ConfigurationSelector configuration ) : void
list FileCopySet /// List where to add the support files. ///
configuration MonoDevelop.Projects.ConfigurationSelector /// Build configuration for which get the list ///
Résultat void

Project() protected méthode

protected Project ( ) : System
Résultat System