IVsSccProjectProviderBinding Interface

Definition

Allows a project type to force the choice of a particular source control package.

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

Remarks

Binding Process

What follows is the flow of control for various scenarios showing the interaction between the environment (otherwise known as the Source Control Stub) and this interface.

Adding a Project or Solution to Source Control
1. The Source Control Stub uses QueryInterface to get the IVsSccProjectProviderBinding from the project.
If the interface cannot be obtained, then it uses the default source control package.
2. The Source Control Stub calls the GetProviderBinding method.
If the result of the call is VSSCC_PB_STANDARD, then it uses the default source control package.
-OR-
If the result of the call is VSSCC_PB_CUSTOM_DISABLED, then the project is not added to source control.
-OR-
If the result of the call is VSSCC_PB_STANDARD_DISABLED, then the project is not added to source control at this time (the "Add to Source Control" button should have been disabled).
3. The Source Control Stub calls the GetProviderBindingOptions method to see if the project supports browsing for a source control server.
If the result of the call includes the flag VSSCC_PBO_CANBROWSESERVERPATH, then the Source Control Stub calls the BrowseServerPath method.
Otherwise, the Source Control Stub calls the GetProviderSession method to get a provider session and displays a standard Version API (VAPI) browse the dialog box using that session.
4. The Source Control Stub calls the GetProviderService method and stores the returned service GUID (SID) in the project's configuration.
5. The Source Control Stub calls the SetSccLocation method with the selected server location.
6. The Source Control Stub calls GetProviderSession to get the actual provider and initiates the Add to Source Control operation.
Opening a Project or Solution from Source Control
Because the Source Control Stub gets the project from source control, the source control package must exist at least in stub form before the project is read.

1. The Source Control Stub reads the solution from source control.
2. The Source Control Stub obtains the project information from the solution and looks for the source control package service GUID in the project's configuration.
If the project does not contain a source control package service GUID, then the Source Control Stub uses the regular enlistment process.
3. The Source Control Stub uses the SID to create a source control package session.
4. The Source Control Stub uses this provider session to create an enlistment in the project. Note: Although this may be a project-specific source control package, the project does not yet exist.

1. Once the enlistment is completed, control returns to the solution.
2. The Source Control Stub reads the project file from the solution and executes it.
3. The project calls the RegisterSccProject method using the same information passed to the SetSccLocation method when the project was added to source control.
4. The Source Control Stub uses QueryInterface on the new project to get the IVsSccProjectProviderBinding.
5. If the interface is obtained, the Source Control Stub calls the GetProviderSession method (using the just obtained interface) to get a proper source control package session for this project, replacing the "stub" version being used up until now.
6. The Source Control Stub retrieves the project's files from source control using the source control package session.
Opening an Existing Project
The project exists on the local drive at this point.

1. Once loaded, the project calls the RegisterSccProject method with the same information passed to the SetSccLocation method when the project was added to source control.
2. The Source Control Stub uses QueryInterface on the new project to get the IVsSccProjectProviderBinding.
3. If the interface is obtained, the Source Control Stub calls the GetProviderSession method to get the source control package session for the project.
Changing the Connection to the Source Control Server
1. Assuming it can get the IVsSccProjectProviderBinding interface, the Source Control Stub calls the GetProviderBindingOptions method to determine how to browse for a server location and then uses the ValidateServerPathEdit method to verify any user changes to the server path.

Notes to Implementers

This interface is implemented by a project type in order to specify a particular source control package. Unless a project type has need of a specific source control package, then there is no need to implement this interface.

Notes to Callers

This interface is called by the environment when access to a source control package is needed. If the interface does not exist or if a call to GetProviderBinding(VSSCCPROVIDERBINDING[]) specifies otherwise, the environment uses whatever source control package is currently available.

Methods

BrowseServerPath(String, String)

Displays a browse dialog box so that the user can browse for a source control server location.

GetProviderBinding(VSSCCPROVIDERBINDING[])

Determines if this project requires a specific source control package or if the project should be put under source control.

GetProviderBindingOptions(UInt32)

Retrieves the flags that control editing of the source control server path.

GetProviderService(Guid)

This method retrieves the service ID (SID) of a service object that will be used to instantiate a source control package.

GetProviderSession(Object)

Returns a session object for a Version API (VAPI)-style source control package.

TranslateEnlistmentPath(String, Int32, String)

Translates an enlistment path into a displayable path.

ValidateServerPathEdit(Int32, String, Int32)

Determines if the given source control server path is valid.

Applies to