Skip to content

Commit

Permalink
chore: move KeepAliveIdeMessage to IDEChannelClient
Browse files Browse the repository at this point in the history
  • Loading branch information
rafael-rosa-knowcode committed Oct 17, 2024
1 parent 85e5d1e commit da8f935
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 10 deletions.
3 changes: 0 additions & 3 deletions src/Uno.UI.RemoteControl.VS/EntryPoint.cs
Original file line number Diff line number Diff line change
Expand Up @@ -426,9 +426,6 @@ private async Task OnMessageReceivedAsync(object? sender, IdeMessage devServerMe
{
switch (devServerMessage)
{
case KeepAliveIdeMessage:
_debugAction?.Invoke($"Keep alive from Dev Server");
break;
case AddMenuItemRequestIdeMessage amir:
await OnAddMenuItemRequestIdeMessageAsync(sender, amir);
break;
Expand Down
18 changes: 11 additions & 7 deletions src/Uno.UI.RemoteControl.VS/IDEChannel/IDEChannelClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -89,14 +89,18 @@ private void ProcessDevServerMessage(object sender, IdeMessageEnvelope devServer
_logger.Verbose($"IDE: IDEChannel message received {devServerMessage}");

var process = Task.CompletedTask;
if (devServerMessage is IdeMessage message)
switch (devServerMessage)
{
_logger.Verbose($"Dev Server Message {message.GetType()} requested");
process = OnMessageReceived.InvokeAsync(this, message);
}
else
{
_logger.Verbose($"Unknown message type {devServerMessage?.GetType()} from DevServer");
case KeepAliveIdeMessage:
_logger.Verbose($"Keep alive from Dev Server");
break;
case IdeMessage message:
_logger.Verbose($"Dev Server Message {message.GetType()} requested");
process = OnMessageReceived.InvokeAsync(this, message);
break;
default:
_logger.Verbose($"Unknown message type {devServerMessage?.GetType()} from DevServer");
break;
}

_ = process.ContinueWith(
Expand Down

0 comments on commit da8f935

Please sign in to comment.