Provides a browse dialog box in which the user can select where a project under source control is to be saved.
Assembly: Microsoft.VisualStudio.Shell.Interop.8.0 (in Microsoft.VisualStudio.Shell.Interop.8.0.dll)
Thetype exposes the following members.
|BrowseEnlistment||Displays a browse dialog box allowing the user to change the enlistment choice.|
|GetDefaultEnlistment||Retrieves the suggested enlistment path based on the specified project path.|
|GetEnlistmentFactoryOptions||Retrieves the options that control the enlistment choice selection.|
|OnAfterEnlistmentCreate||Called by the environment after an enlistment has been completely created.|
|OnBeforeEnlistmentCreate||Allows the project to do any special operations before the enlistment is actually created.|
|ValidateEnlistmentEdit||Validates an enlistment choice made by the user.|
This interface allows the user to override the implied location of the project (based on the solution's location) and explicitly set a new location.
The environment calls the GetEnlistmentChoice method to determine whether to use this interface at all. The environment saves the value returned by the GetEnlistmentChoice in the solution's configuration file.
The flow of control within the environment is as follows:
The user selects the solution or project from a source control server.
The environment, in the form of the Source Control Stub, brings the solution or project to the local system.
The solution type starts reading the solution properties.
The Source Control Stub enumerates the projects in the solution (note that the projects are not created yet).
For each project in the solution, the project's source control information file is retrieved and cached locally.
If any project supports enlistment choice (because the project type implements the IVsSccProjectEnlistmentChoice interface and the GetEnlistmentChoice method said the user could or must make an enlistment choice), then the Source Control Stub displays the enlistment choice dialog box by calling the following:
If the user cancels the enlistment choice, then the entire solution enlistment is canceled and the solution is removed from the local system (if it was being pulled from source control; otherwise, only the project being enlisted in would be removed).
Once all the enlistments have been determined, the Source Control Stub calls the OnBeforeEnlistmentCreate method before each enlistment is created, allowing the project type to do any special setup (such as establishing a share to the source control server).
The Source Control Stub records the local enlistment paths in the solution configuration.
The enlistments are then created, and the Source Control Stub calls the appropriate source code control provider to actually retrieve the project or solution from source control.
The Source Control Stub calls the OnAfterEnlistmentCreate method to give the project type a chance to do any post-creation operations, such as setting permissions.
After all the enlistments have been created and populated from source control, the solution type starts loading projects into memory.
The enlistment process is complete.Notes to Implementers
This interface is implemented by a project type to give the user the ability to browse for a location to put a Web-based project or solution being retrieved from source control, otherwise known as enlisting in a project.Notes to Callers
This interface is called by the environment when a project needs to be retrieved from source control and when the user may need to be given a choice of where the enlistment is to be put locally.