Esempio n. 1
0
        private static void RegisterFaultHandler(IDataflowBlock block, UnconfiguredProject project, ProjectFaultSeverity severity)
        {
            IProjectFaultHandlerService faultHandlerService = project.Services.FaultHandler;

            Task faultTask = faultHandlerService.RegisterFaultHandler(block, project, severity);

            // We don't actually care about the result of reporting the fault if one occurs
            faultHandlerService.Forget(faultTask, project);
        }
Esempio n. 2
0
        public Task InitializeAsync()
        {
            // While we want make sure it's loaded before PrioritizedProjectLoadedInHost,
            // we don't want to block project factory completion on its load, so fire and forget
            Task result = _tasksService.PrioritizedProjectLoadedInHostAsync(() => _activeWorkspaceProjectContextHost.PublishAsync());

            _projectFaultHandler.Forget(result, _project, ProjectFaultSeverity.LimitedFunctionality);

            return(Task.CompletedTask);
        }
Esempio n. 3
0
        private async Task ScheduleCompilationAsync(string moniker, DesignTimeInputsItem inputs, bool waitForCompletion, bool forceCompilation)
        {
            HashSet <string> files          = GetFilesToCompile(moniker, inputs.SharedInputs);
            string           outputFileName = GetOutputFileName(inputs.OutputPath, moniker);

            if (forceCompilation || CompilationNeeded(files, outputFileName))
            {
                if (inputs.TaskSchedulers.TryGetValue(moniker, out ITaskDelayScheduler scheduler))
                {
                    if (waitForCompletion)
                    {
                        await scheduler.RunAsyncTask(token => CompileTempPEAsync(files, outputFileName, token)).Task;
                    }
                    else
                    {
                        _projectFaultHandlerService.Forget(scheduler.ScheduleAsyncTask(token => CompileTempPEAsync(files, outputFileName, token)).Task, UnconfiguredProject);
                    }
                }
            }
        }
Esempio n. 4
0
 private void LaunchSettingsFile_Changed(object sender, FileSystemEventArgs e)
 {
     _projectFaultHandler.Forget(HandleLaunchSettingsFileChangedAsync(), _project);
 }