예제 #1
0
        // A factory method invoked internally only
        internal static async Task <IDisposable> InitializeAsync(Microsoft.VisualStudio.Shell.IAsyncServiceProvider serviceProvider)
        {
            Assumes.Present(serviceProvider);

            var instance = new SolutionRestoreBuildHandler();

            await instance.SubscribeAsync(serviceProvider);

            return(instance);
        }
        // A factory method invoked internally only
        internal static async Task <IDisposable> InitializeAsync(Microsoft.VisualStudio.Shell.IAsyncServiceProvider serviceProvider)
        {
            Assumes.Present(serviceProvider);

            var instance = new SolutionRestoreBuildHandler();

            var componentModel = await serviceProvider.GetComponentModelAsync();

            componentModel.DefaultCompositionService.SatisfyImportsOnce(instance);

            await instance.SubscribeAsync(serviceProvider);

            return(instance);
        }