C# Класс MonoDevelop.Projects.Project

Наследование: SolutionEntityItem
Показать файл Открыть проект Примеры использования класса

Private Properties

Свойство Тип Описание
NotifyFileAddedToProject void
NotifyFileChangedInProject void
NotifyFilePropertyChangedInProject void
NotifyFileRemovedFromProject void
NotifyFileRenamedInProject void
OnFileChanged void
ResolveDependencies void
UpdateDependency void
UsingMSBuildEngine bool

Открытые методы

Метод Описание
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

Защищенные методы

Метод Описание
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

Приватные методы

Метод Описание
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

Описание методов

AddDirectory() публичный Метод

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. ///
Результат ProjectFile

AddFile() публичный Метод

Adds a file to the project
public AddFile ( string filename ) : ProjectFile
filename string /// Absolute path to the file. ///
Результат ProjectFile

AddFile() публичный Метод

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. ///
Результат ProjectFile

AddFile() публичный Метод

Adds a file to the project
public AddFile ( ProjectFile projectFile ) : void
projectFile ProjectFile /// The file. ///
Результат void

AddFiles() публичный Метод

public AddFiles ( IEnumerable files ) : IEnumerable
files IEnumerable
Результат IEnumerable

AddFiles() публичный Метод

public AddFiles ( IEnumerable files, string buildAction ) : IEnumerable
files IEnumerable
buildAction string
Результат IEnumerable

CheckNeedsBuild() защищенный Метод

Checks if the project needs to be built
protected CheckNeedsBuild ( MonoDevelop.Projects.ConfigurationSelector configuration ) : bool
configuration MonoDevelop.Projects.ConfigurationSelector /// Build configuration. ///
Результат bool

CopySupportFiles() публичный Метод

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. ///
Результат void

DeleteSupportFiles() публичный Метод

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. ///
Результат void

Dispose() публичный Метод

public Dispose ( ) : void
Результат void

DoBuild() защищенный Метод

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. ///
Результат MonoDevelop.Projects.BuildResult

DoClean() защищенный Метод

protected DoClean ( IProgressMonitor monitor, MonoDevelop.Projects.ConfigurationSelector configuration ) : void
monitor IProgressMonitor
configuration MonoDevelop.Projects.ConfigurationSelector
Результат void

DoExecute() защищенный Метод

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. ///
Результат void

GetBuildActions() публичный Метод

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[]
Результат string[]

GetCommonBuildActions() защищенный Метод

Gets a list of common build actions (common actions are shown first in the project build action list)
protected GetCommonBuildActions ( ) : IList
Результат IList

GetDefaultBuildAction() публичный Метод

Gets the default build action for a file
public GetDefaultBuildAction ( string fileName ) : string
fileName string /// File name. ///
Результат string

GetOutputFileName() публичный Метод

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. ///
Результат FilePath

GetOutputFiles() публичный Метод

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 ///
Результат List

GetProjectFile() публичный Метод

Gets a project file.
public GetProjectFile ( string fileName ) : ProjectFile
fileName string /// File name. ///
Результат ProjectFile

GetStandardBuildActions() защищенный Метод

Gets a list of standard build actions.
protected GetStandardBuildActions ( ) : IEnumerable
Результат IEnumerable

GetSupportFileList() публичный Метод

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 ///
Результат FileCopySet

IsCompileable() публичный Метод

Determines whether the provided file can be as part of this project
public IsCompileable ( string fileName ) : bool
fileName string /// File name ///
Результат bool

IsFileInProject() публичный Метод

Determines whether a file belongs to this project
public IsFileInProject ( string fileName ) : bool
fileName string /// File name ///
Результат bool

LoadProject() публичный статический Метод

public static LoadProject ( string filename, IProgressMonitor monitor ) : Project
filename string
monitor IProgressMonitor
Результат Project

OnBuild() защищенный Метод

protected OnBuild ( IProgressMonitor monitor, MonoDevelop.Projects.ConfigurationSelector configuration ) : MonoDevelop.Projects.BuildResult
monitor IProgressMonitor
configuration MonoDevelop.Projects.ConfigurationSelector
Результат MonoDevelop.Projects.BuildResult

OnClean() защищенный Метод

protected OnClean ( IProgressMonitor monitor, MonoDevelop.Projects.ConfigurationSelector configuration ) : void
monitor IProgressMonitor
configuration MonoDevelop.Projects.ConfigurationSelector
Результат void

OnExecute() защищенный Метод

protected OnExecute ( IProgressMonitor monitor, MonoDevelop.Projects.ExecutionContext context, MonoDevelop.Projects.ConfigurationSelector configuration ) : void
monitor IProgressMonitor
context MonoDevelop.Projects.ExecutionContext
configuration MonoDevelop.Projects.ConfigurationSelector
Результат void

OnFileAddedToProject() защищенный Метод

Raises the FileAddedToProject event.
protected OnFileAddedToProject ( MonoDevelop.Projects.ProjectFileEventArgs e ) : void
e MonoDevelop.Projects.ProjectFileEventArgs
Результат void

OnFileChangedInProject() защищенный Метод

Raises the FileChangedInProject event.
protected OnFileChangedInProject ( MonoDevelop.Projects.ProjectFileEventArgs e ) : void
e MonoDevelop.Projects.ProjectFileEventArgs
Результат void

OnFilePropertyChangedInProject() защищенный Метод

Raises the FilePropertyChangedInProject event.
protected OnFilePropertyChangedInProject ( MonoDevelop.Projects.ProjectFileEventArgs e ) : void
e MonoDevelop.Projects.ProjectFileEventArgs
Результат void

OnFileRemovedFromProject() защищенный Метод

Raises the FileRemovedFromProject event.
protected OnFileRemovedFromProject ( MonoDevelop.Projects.ProjectFileEventArgs e ) : void
e MonoDevelop.Projects.ProjectFileEventArgs
Результат void

OnFileRenamedInProject() защищенный Метод

Raises the FileRenamedInProject event.
protected OnFileRenamedInProject ( MonoDevelop.Projects.ProjectFileRenamedEventArgs e ) : void
e MonoDevelop.Projects.ProjectFileRenamedEventArgs
Результат void

OnGetItemFiles() защищенный Метод

protected OnGetItemFiles ( bool includeReferencedFiles ) : List
includeReferencedFiles bool
Результат List

OnGetLastBuildTime() защищенный Метод

protected OnGetLastBuildTime ( MonoDevelop.Projects.ConfigurationSelector configuration ) : System.DateTime
configuration MonoDevelop.Projects.ConfigurationSelector
Результат System.DateTime

OnGetNeedsBuilding() защищенный Метод

protected OnGetNeedsBuilding ( MonoDevelop.Projects.ConfigurationSelector configuration ) : bool
configuration MonoDevelop.Projects.ConfigurationSelector
Результат bool

OnItemsAdded() защищенный Метод

protected OnItemsAdded ( IEnumerable objs ) : void
objs IEnumerable
Результат void

OnItemsRemoved() защищенный Метод

protected OnItemsRemoved ( IEnumerable objs ) : void
objs IEnumerable
Результат void

PopulateOutputFileList() защищенный Метод

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 ///
Результат void

PopulateSupportFileList() защищенный Метод

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 ///
Результат void

Project() защищенный Метод

protected Project ( ) : System
Результат System