feat(IAuthClientHandler): getrennte Klasse erstellt, um die Hub-Aktion von IAuthClient zu unterteilen
- ReceiveMessage-Methode zu IAuthClientHandler verschoben - StartAsync-Methode zu IAuthClient hinzugefügt
This commit is contained in:
parent
878e927be9
commit
766e4e6d27
@ -1,6 +1,6 @@
|
||||
namespace DigitalData.Auth.Abstractions;
|
||||
|
||||
public interface IAuthClient
|
||||
public interface IAuthClient : IAuthClientHandler
|
||||
{
|
||||
Task ReceiveMessage(string user, string message);
|
||||
Task StartAsync();
|
||||
}
|
||||
6
DigitalData.Auth.Abstractions/IAuthClientHandler.cs
Normal file
6
DigitalData.Auth.Abstractions/IAuthClientHandler.cs
Normal file
@ -0,0 +1,6 @@
|
||||
namespace DigitalData.Auth.Abstractions;
|
||||
|
||||
public interface IAuthClientHandler
|
||||
{
|
||||
Task ReceiveMessage(string user, string message);
|
||||
}
|
||||
@ -3,7 +3,7 @@ using Microsoft.AspNetCore.SignalR;
|
||||
|
||||
namespace DigitalData.Auth.API.Hubs;
|
||||
|
||||
public class AuthHub : Hub<IAuthClient>
|
||||
public class AuthHub : Hub<IAuthClientHandler>
|
||||
{
|
||||
public async Task SendMessage(string user, string message)
|
||||
=> await Clients.All.ReceiveMessage(user, message);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user