Freigeben über


IVsSccProjectEnlistmentFactory Interface

Definition

Provides a browse dialog box in which the user can select where a project under source control is to be saved.

public interface class IVsSccProjectEnlistmentFactory
public interface class IVsSccProjectEnlistmentFactory
__interface IVsSccProjectEnlistmentFactory
[System.Runtime.InteropServices.Guid("53544C4D-00F8-11D0-8E5E-00A0C911005A")]
[System.Runtime.InteropServices.InterfaceType(1)]
public interface IVsSccProjectEnlistmentFactory
[<System.Runtime.InteropServices.Guid("53544C4D-00F8-11D0-8E5E-00A0C911005A")>]
[<System.Runtime.InteropServices.InterfaceType(1)>]
type IVsSccProjectEnlistmentFactory = interface
Public Interface IVsSccProjectEnlistmentFactory
Attributes

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:

  1. The user selects the solution or project from a source control server.

  2. The environment, in the form of the Source Control Stub, brings the solution or project to the local system.

  3. The solution type starts reading the solution properties.

  4. The Source Control Stub enumerates the projects in the solution (note that the projects are not created yet).

  5. For each project in the solution, the project's source control information file is retrieved and cached locally.

  6. 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:

  7. 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).

  8. 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).

  9. The Source Control Stub records the local enlistment paths in the solution configuration.

  10. 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.

  11. 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.

  12. 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.

Methods

BrowseEnlistment(String, String, String, String)

Displays a browse dialog box allowing the user to change the enlistment choice.

GetDefaultEnlistment(String, String, String)

Retrieves the suggested enlistment path based on the specified project path.

GetEnlistmentFactoryOptions(UInt32)

Retrieves the options that control the enlistment choice selection.

OnAfterEnlistmentCreate(String, String, String)

Called by the environment after an enlistment has been completely created.

OnBeforeEnlistmentCreate(String, String, String)

Allows the project to do any special operations before the enlistment is actually created.

ValidateEnlistmentEdit(Int32, String, String, String, Int32)

Validates an enlistment choice made by the user.

Applies to