Infineon.EAF.Runtime v2.60.0
This commit is contained in:
@ -9,9 +9,6 @@ public class Startup
|
||||
{
|
||||
_ = app.UseCors(CorsOptions.AllowAll);
|
||||
_ = app.UseNancy();
|
||||
#if SignalR
|
||||
_ = app.MapSignalR();
|
||||
#endif
|
||||
}
|
||||
|
||||
}
|
@ -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
|
Reference in New Issue
Block a user