run panel tabs
This commit is contained in:
@@ -34,7 +34,7 @@ public class DebuggingService
|
||||
var debugProtocolHost = new DebugProtocolHost(process.StandardInput.BaseStream, process.StandardOutput.BaseStream, false);
|
||||
debugProtocolHost.LogMessage += (sender, args) =>
|
||||
{
|
||||
Console.WriteLine($"Log message: {args.Message}");
|
||||
//Console.WriteLine($"Log message: {args.Message}");
|
||||
};
|
||||
debugProtocolHost.EventReceived += (sender, args) =>
|
||||
{
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
namespace SharpIDE.Application.Features.Events;
|
||||
using SharpIDE.Application.Features.SolutionDiscovery.VsPersistence;
|
||||
|
||||
namespace SharpIDE.Application.Features.Events;
|
||||
|
||||
public static class GlobalEvents
|
||||
{
|
||||
@@ -7,4 +9,10 @@ public static class GlobalEvents
|
||||
|
||||
public static event Func<Task> StartedRunningProject = () => Task.CompletedTask;
|
||||
public static void InvokeStartedRunningProject() => StartedRunningProject?.Invoke();
|
||||
|
||||
public static event Func<SharpIdeProjectModel, Task> ProjectStartedRunning = _ => Task.CompletedTask;
|
||||
public static void InvokeProjectStartedRunning(SharpIdeProjectModel project) => ProjectStartedRunning?.Invoke(project);
|
||||
|
||||
public static event Func<SharpIdeProjectModel, Task> ProjectStoppedRunning = _ => Task.CompletedTask;
|
||||
public static void InvokeProjectStoppedRunning(SharpIdeProjectModel project) => ProjectStoppedRunning?.Invoke(project);
|
||||
}
|
||||
|
||||
@@ -89,6 +89,7 @@ public class RunService
|
||||
project.OpenInRunPanel = true;
|
||||
GlobalEvents.InvokeProjectsRunningChanged();
|
||||
GlobalEvents.InvokeStartedRunningProject();
|
||||
GlobalEvents.InvokeProjectStartedRunning(project);
|
||||
project.InvokeProjectStartedRunning();
|
||||
await process.WaitForExitAsync().WaitAsync(project.RunningCancellationTokenSource.Token).ConfigureAwait(ConfigureAwaitOptions.SuppressThrowing);
|
||||
if (project.RunningCancellationTokenSource.IsCancellationRequested)
|
||||
@@ -118,6 +119,7 @@ public class RunService
|
||||
if (project.RunningCancellationTokenSource is null) throw new InvalidOperationException($"Project {project.Name} does not have a running cancellation token source.");
|
||||
|
||||
await project.RunningCancellationTokenSource.CancelAsync().ConfigureAwait(false);
|
||||
GlobalEvents.InvokeProjectStoppedRunning(project);
|
||||
}
|
||||
|
||||
private string GetRunArguments(SharpIdeProjectModel project)
|
||||
|
||||
Reference in New Issue
Block a user