IVsSccProjectEnlistmentFactory Interface
Provides a browse dialog box in which the user can select where a project under source control is to be saved.
Namespace: Microsoft.VisualStudio.Shell.Interop
Assembly: Microsoft.VisualStudio.Shell.Interop.8.0 (in Microsoft.VisualStudio.Shell.Interop.8.0.dll)
Syntax
'宣告
<GuidAttribute("53544C4D-00F8-11D0-8E5E-00A0C911005A")> _
<InterfaceTypeAttribute()> _
Public Interface IVsSccProjectEnlistmentFactory
'用途
Dim instance As IVsSccProjectEnlistmentFactory
[GuidAttribute("53544C4D-00F8-11D0-8E5E-00A0C911005A")]
[InterfaceTypeAttribute()]
public interface IVsSccProjectEnlistmentFactory
[GuidAttribute(L"53544C4D-00F8-11D0-8E5E-00A0C911005A")]
[InterfaceTypeAttribute()]
public interface class IVsSccProjectEnlistmentFactory
[<GuidAttribute("53544C4D-00F8-11D0-8E5E-00A0C911005A")>]
[<InterfaceTypeAttribute()>]
type IVsSccProjectEnlistmentFactory = interface end
public interface IVsSccProjectEnlistmentFactory
Remarks
This interface is searched for by calling QueryInterface on the IVsProjectFactory interface.
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.