IProjectService Interface
Namespace: NextDesign.Core.Runtime
Description
This is a project service.
Provides project operations.
Methods
| Name | Description |
|---|---|
| CleanUpProject | Cleans up the project. |
| CloseProject | Closes the specified project. Project instances obtained with NewProject(string, string, string) or OpenProject(string, bool) should be closed by calling this method when they are no longer needed, regardless of whether they are saved or not. Failure to close the project will result in a memory leak. |
| GetModelUnits | Retrieves a list of the project's model units. |
| LoadModelUnits(IProject,IEnumerable<IModelUnit>) | Loads the specified model unit into the specified project. It is ignored if the specified unit has already been loaded. It is also ignored if the specified unit is not under project management. Note that if the target project is not saved, this method call will fail. |
| LoadModelUnits(IProject,IEnumerable<string>) | Loads the specified model unit into the specified project. It is ignored if the specified unit has already been loaded. It is also ignored if the specified unit is not under project management. Note that if the target project is not saved, this method call will fail. |
| NewProject | Creates a new project. Projects created with this method should be closed with CloseProject(IProject) when they are no longer needed, regardless of whether they are saved or not. Failure to close the project will result in a memory leak. |
| OpenProject | Opens the project at the specified path. Projects opened with this method should be closed with CloseProject(IProject) when they are no longer needed, regardless of whether they are saved or not. Failure to close the project will result in a memory leak. |
| SaveProject | Saves the specified project. Normally, this method throws an exception if the project's save location file has been overwritten from the state when the specified project was loaded. However, if the argument: forceOverwrite is set to true, this check is skipped and the project is forcibly saved. |
| SaveProjectAs | Saves the specified project under a different name. If the specified save location folder does not exist, it will be created automatically. |
| UpdateProjectOutputModelPaths | Updates the paths of the referenced models in the specified project. This is only effective if the save location for the specified project has been determined. If the save location for the project has not been determined, an exception will be thrown. If the project is unsaved, the project changes will be saved simultaneously with the path update. Furthermore, the update of the referenced model paths will only be performed on loaded and editable units among the managed units of the specified project. |