初始化
This commit is contained in:
9
WebApplication1/Models/ErrorViewModel.cs
Normal file
9
WebApplication1/Models/ErrorViewModel.cs
Normal file
@@ -0,0 +1,9 @@
|
||||
namespace WebApplication1.Models
|
||||
{
|
||||
public class ErrorViewModel
|
||||
{
|
||||
public string? RequestId { get; set; }
|
||||
|
||||
public bool ShowRequestId => !string.IsNullOrEmpty(RequestId);
|
||||
}
|
||||
}
|
||||
16
WebApplication1/Models/tui.cs
Normal file
16
WebApplication1/Models/tui.cs
Normal file
@@ -0,0 +1,16 @@
|
||||
using Microsoft.AspNetCore.SignalR;
|
||||
|
||||
namespace WebApplication1.Models
|
||||
{
|
||||
public class tui : Hub
|
||||
{
|
||||
public async Task SendMessage(string user, string message)
|
||||
{
|
||||
for (int i = 0; i < 100; i++)
|
||||
{
|
||||
await Task.Delay(1500);
|
||||
await Clients.All.SendAsync("ReceiveMessage", message+$"{i}");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user