Initial commit: JDE Scoping Tool migration project
Set up repository with legacy .NET Framework 4.8 source (OLD/), new .NET 10 Blazor solution (NEW/), OpenSpec specifications, documentation, and project configuration.
This commit is contained in:
Executable
+28
@@ -0,0 +1,28 @@
|
||||
using System;
|
||||
using DataModel.Models;
|
||||
using Microsoft.AspNet.SignalR;
|
||||
|
||||
namespace WebInterface.Hubs
|
||||
{
|
||||
public class StatusHub : Hub
|
||||
{
|
||||
public static readonly Lazy<IHubContext> ContextInstance = new Lazy<IHubContext>(() => GlobalHost.ConnectionManager.GetHubContext<StatusHub>());
|
||||
|
||||
private static StatusUpdate cachedUpdate = new StatusUpdate() {Message="Unknown", Timestamp = DateTime.Now};
|
||||
public void SetStatus(StatusUpdate statusUpdate)
|
||||
{
|
||||
cachedUpdate = statusUpdate;
|
||||
Clients.All.statusUpdate(statusUpdate);
|
||||
}
|
||||
|
||||
public StatusUpdate GetCachedStatus()
|
||||
{
|
||||
return cachedUpdate;
|
||||
}
|
||||
|
||||
public void PublishSearchUpdate(SearchUpdate searchUpdate)
|
||||
{
|
||||
Clients.All.searchUpdate(searchUpdate);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user