Infineon.EAF.Runtime v2.60.0

This commit is contained in:
2025-05-27 09:58:06 -07:00
parent 6e31dceb4c
commit 58ce014b10
20 changed files with 626 additions and 69 deletions

View File

@ -9,9 +9,6 @@ public class Startup
{
_ = app.UseCors(CorsOptions.AllowAll);
_ = app.UseNancy();
#if SignalR
_ = app.MapSignalR();
#endif
}
}

View File

@ -1,50 +0,0 @@
#if SignalR
using System;
#nullable enable
#pragma warning disable CA1822
namespace Adaptation.FileHandlers.Priority;
public class WeightedShortestJobFirstHub : Microsoft.AspNet.SignalR.Hub
{
// public async Task Send(int n)
// {
// await Clients.All.send(n);
// }
public void Send(string name, string message)
{
Console.WriteLine($"{name}:{message};");
Console.WriteLine(Context?.ConnectionId);
Clients.All.addMessage(name, message);
}
public void NotifyAll(Notification notification)
{
try
{
WorkItem workItem = GetWorkItem(notification);
Clients.All.updateWorkItem(notification.Page, workItem);
}
catch (Exception ex)
{ Console.WriteLine($"{ex.Message}{Environment.NewLine}{ex.StackTrace}"); }
}
private static WorkItem GetWorkItem(Notification notification)
{
WorkItem? result;
lock (FileRead.WorkItems)
{
if (!FileRead.WorkItems.TryGetValue(notification.Id, out result))
throw new Exception();
}
return result;
}
}
#endif