Click or drag to resize

IVersionControl Interface

Interface for documents which can be subject to version control.

Namespace: Demo3D.Common
Assembly: Demo3D.Common (in Demo3D.Common.dll) Version: 19.00.00
Syntax
C#
public interface IVersionControl : IDisposable

The IVersionControl type exposes the following members.

Properties
 NameDescription
Public propertyDefaultEmailAddress The default Git email address to use.
Public propertyDefaultUsername The default Git user name to use.
Public propertyDocumentPath The name of this version controlled document.
Public propertyHasUncommittedChanges Whether this document currently has any uncommitted changes.
Public propertyHasUnsavedChanges Whether this document currently has any unsaved changes.
Public propertyIsVersionControlEnabled Whether version control is enabled.
Public propertyName The name of this version controlled document.
Public propertyRepositoryPath The full path of the root folder of the repository.
Top
Methods
 NameDescription
Public methodCheckoutBranchAsync Checks out a specified branch. Note that any unsaved or uncommitted changes will be lost.
Public methodCheckoutCommitAsync Checks out a specified commit, resulting in a detached HEAD. Note that any unsaved or uncommitted changes will be lost.
Public methodCommitAsync Commits all current changes.
Public methodEnableVersionControl Enables version control for this document.
Public methodMakeSubfoldersNotReadOnly Removes the read-only attribute from all subfolders. OneDrive often likes to make folders read-only, so for models/catalogs saved to OneDrive, the subfolders are often automatically read-only. This causes problems for Git, as it needs to be able to delete the folders when checking out a commit, so we need to remove the read-only attribute.
Public methodReload Reloads the current document.
Public methodRevertToCommitAsync Reverts to a specified commit by creating a new commit that reverts all more recent commits. Note that any unsaved or uncommitted changes will be lost.
Public methodSaveChanges Saves any unsaved changes.
Public methodShowCommitDifferences Shows visually the differences between two versions of a specified file.
Public methodShowLocalDifferences Shows visually the differences between the local copy and the last committed version of a file.
Public methodSuspendCommitChangedExternally Gets an IDisposable instance which will disable publishing of the CommitChangedExternally event and re-enable when disposed.
Public methodUndoLocalChangesAsync Deletes all local changes.
Top
Events
 NameDescription
Public eventCommitChangedExternally Occurs when an external version control operation results in checking out a different commit.
Public eventRepositoryModifiedExternally Occurs when something is modified in the version control repository.
Top
See Also