Model for Source Control Packages
The following model represents an example of a source control implementation. In the model, you see the interfaces that you must implement and the environment services that you must call. Like all services, you actually call the methods of a particular interface that you obtain by way of the service. The names of the classes are identified to make it easier to see how source control is carried out.
Example Source Control Project
Interfaces
You can implement source control for your new project types in Visual Studio using the list of interfaces shown in the following table.
Interface |
Use |
---|---|
Called by projects and editors before they save or change (dirty) files. This interface is accessed using the SVsQueryEditQuerySave service. |
|
Called by projects to request permission to add, remove, or rename a file or directory. This interface is also called by projects to inform the environment when an approved add, remove, or rename action is complete. It is accessed using the SVsTrackProjectDocuments service. |
|
Implemented by any entity that registers to be notified when projects add, rename, or remove a file or directory. To register for event notification, call AdviseTrackProjectDocumentsEvents. |
|
Called by projects to register with the source control package and to obtain information on source control status. This interface is accessed using the SVsSccManager service. |
|
Implemented by the project to respond to source control requests for information about files and to obtain the source control settings required for the project file. |
See Also
Reference
AdviseTrackProjectDocumentsEvents
IVsTrackProjectDocumentsEvents2