add some new features in data service ...
This commit is contained in:
+12
-2
@@ -1,4 +1,5 @@
|
||||
using System;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.AspNetCore.SignalR;
|
||||
using Microsoft.Extensions.Logging;
|
||||
@@ -58,11 +59,20 @@ namespace xPushService.Base
|
||||
|
||||
//
|
||||
#region Actions ...
|
||||
public async Task SendCustomAction(string actionName, string payLoad)
|
||||
public async Task SendCustomAction(
|
||||
string actionName,
|
||||
string payLoad,
|
||||
CancellationToken cancellationToken = default
|
||||
)
|
||||
{
|
||||
//
|
||||
var connectionId = Context.ConnectionId;
|
||||
await Clients.AllExcept(connectionId).SendAsync(actionName, payLoad, connectionId);
|
||||
await Clients.AllExcept(connectionId).SendAsync(
|
||||
actionName,
|
||||
payLoad,
|
||||
connectionId,
|
||||
cancellationToken
|
||||
);
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user