IVsSolutionLoadEvents.OnBeforeLoadProjectBatch Method

Fired when loading a batch of dependent projects as part of loading a solution in the background.

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

Syntax

'Declaration
Function OnBeforeLoadProjectBatch ( _
    fIsBackgroundIdleBatch As Boolean _
) As Integer
int OnBeforeLoadProjectBatch(
    bool fIsBackgroundIdleBatch
)
int OnBeforeLoadProjectBatch(
    [InAttribute] bool fIsBackgroundIdleBatch
)
abstract OnBeforeLoadProjectBatch : 
        fIsBackgroundIdleBatch:bool -> int 
function OnBeforeLoadProjectBatch(
    fIsBackgroundIdleBatch : boolean
) : int

Parameters

  • fIsBackgroundIdleBatch
    Type: System.Boolean
    true if the batch is loaded in the background, otherwise false.

Return Value

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

Remarks

Some batches may be loaded synchronously to satisfy user demand load requests; other batches are loaded in the background at idle time. Clients may request that background batch project loading be delayed if they have higher-priority idle time tasks. The OnQueryBackgroundLoadProjectBatch() event is fired only for background batches.

Examples of user demand load requests (that is, synchronous, not background batches) include:

  • The projects required to open the documents in the .suo open document list are loaded synchronously during the initial solution open operation.

  • When the user expands a "(pending)" project in the Solution Explorer, that project and all of its dependencies are opened synchronously.

  • Before building the solution, the Startup project(s) and all build dependencies are loaded.

Clients should defer expensive operations normally done during OnAfterOpenProject until they receive OnAfterLoadProjectBatch().

.NET Framework Security

See Also

Reference

IVsSolutionLoadEvents Interface

Microsoft.VisualStudio.Shell.Interop Namespace