Skip to main content

IScmManager.RevertUnits Method

Namespace: NextDesign.Desktop

Description

Discards changes to the specified unit in the specified project.
Nothing is done if there are no changes to the specified unit.
Nothing is done if the specified project is not integrated with the configuration management system.

Arguments

NameTypeDescription
projectIProjectProject
unitsIEnumerable<IModelUnit>Units to discard changes for
autoReloadboolWhether to automatically reload the project after discarding changes
- If true, the project will be reloaded (default behavior).
- If false, the project in the working folder will only be updated and the project will not be reloaded.

Note that if the specified project is not the current project, the autoReload setting will be ignored.
silentboolIf true is specified, the progress will not be displayed in a progress bar.
The default value is false.

Return value

  • void

Exceptions

NameException classDescription
Invalid argumentExtensionArgumentExceptionWhen a unit not managed by the project is specified as the unit to be discarded
Invalid operationExtensionInvalidOperationExceptionWhen a unit that has been added to or deleted from the project is specified as the unit to be discarded
Configuration management repository operation failedExtensionScmExceptionWhen a configuration management repository operation failed

Annotation

If the units to be discarded include units that have been added to or deleted from the project, calling this method will fail.
Discard the changes to the entire project using RevertProject().