Allows a project type to force the choice of a particular source control package.
Namespace:Microsoft.VisualStudio.Shell.Interop Assembly: Microsoft.VisualStudio.Shell.Interop.8.0 (in Microsoft.VisualStudio.Shell.Interop.8.0.dll)
Syntax
<InterfaceTypeAttribute()> _
<GuidAttribute("53544C4D-02F8-11D0-8E5E-00A0C911005A")> _
Public Interface IVsSccProjectProviderBinding
Dim instance As IVsSccProjectProviderBinding
[InterfaceTypeAttribute()]
[GuidAttribute("53544C4D-02F8-11D0-8E5E-00A0C911005A")]
public interface IVsSccProjectProviderBinding
[InterfaceTypeAttribute()]
[GuidAttribute(L"53544C4D-02F8-11D0-8E5E-00A0C911005A")]
public interface class IVsSccProjectProviderBinding
public interface IVsSccProjectProviderBinding
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
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.
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).
The Source Control Stub calls the GetProviderBindingOptions method to see if the project supports browsing for a source control server.
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.
The Source Control Stub calls the GetProviderService method and stores the returned service GUID (SID) in the project's configuration.
The Source Control Stub calls the SetSccLocation method with the selected server location.
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.
The Source Control Stub reads the solution from source control.
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.
The Source Control Stub uses the SID to create a source control package session.
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.
Once the enlistment is completed, control returns to the solution.
The Source Control Stub reads the project file from the solution and executes it.
The project calls the RegisterSccProject method using the same information passed to the SetSccLocation method when the project was added to source control.
The Source Control Stub uses QueryInterface on the new project to get the IVsSccProjectProviderBinding.
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.
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.
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.
The Source Control Stub uses QueryInterface on the new project to get the IVsSccProjectProviderBinding.
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
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 specifies otherwise, the environment uses whatever source control package is currently available.