Share via


IVsSccProjectEnlistmentFactory.OnBeforeEnlistmentCreate Method

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

Namespace:  Microsoft.VisualStudio.Shell.Interop
Assembly:  Microsoft.VisualStudio.Shell.Interop.8.0 (in Microsoft.VisualStudio.Shell.Interop.8.0.dll)

Syntax

‘선언
Function OnBeforeEnlistmentCreate ( _
    lpszProjectPath As String, _
    lpszEnlistment As String, _
    lpszEnlistmentUNC As String _
) As Integer
‘사용 방법
Dim instance As IVsSccProjectEnlistmentFactory
Dim lpszProjectPath As String
Dim lpszEnlistment As String
Dim lpszEnlistmentUNC As String
Dim returnValue As Integer

returnValue = instance.OnBeforeEnlistmentCreate(lpszProjectPath, _
    lpszEnlistment, lpszEnlistmentUNC)
int OnBeforeEnlistmentCreate(
    string lpszProjectPath,
    string lpszEnlistment,
    string lpszEnlistmentUNC
)
int OnBeforeEnlistmentCreate(
    [InAttribute] String^ lpszProjectPath, 
    [InAttribute] String^ lpszEnlistment, 
    [InAttribute] String^ lpszEnlistmentUNC
)
abstract OnBeforeEnlistmentCreate : 
        lpszProjectPath:string * 
        lpszEnlistment:string * 
        lpszEnlistmentUNC:string -> int 
function OnBeforeEnlistmentCreate(
    lpszProjectPath : String, 
    lpszEnlistment : String, 
    lpszEnlistmentUNC : String
) : int

Parameters

  • lpszProjectPath
    Type: System.String
    [in] The original project path.
  • lpszEnlistment
    Type: System.String
    [in] The enlistment path to be used.
  • lpszEnlistmentUNC
    Type: System.String
    [in] The enlistment path as a fully qualified path (UNC-style, [drive:]\path, or file://path).

Return Value

Type: System.Int32
If the method succeeds, it returns S_OK. If it fails, it returns an error code.

참고

If this method returns an error code, the enlistment will not be created.

Remarks

COM Signature

From ivssccprojectenlistmentfactory.idl

HRESULT OnBeforeEnlistmentCreate(
   [in] LPCOLESTR lpszProjectPath,
   [in] LPCOLESTR lpszEnlistment,
   [in] LPCOLESTR lpszEnlistmentUNC
);

This method allows the project type to do any special setup required before the enlistment is created. Such setup could be creating a share to the source control server or initializing any data structures in memory that might be needed.

Any operation in this method can be reversed in the OnAfterEnlistmentCreate method, which is called after the enlistment is created.

.NET Framework Security

See Also

Reference

IVsSccProjectEnlistmentFactory Interface

IVsSccProjectEnlistmentFactory Members

Microsoft.VisualStudio.Shell.Interop Namespace