Beispiel #1
0
 public Task SendCoreAsync(string method, object?[] args, CancellationToken cancellationToken = default)
 {
     return(_lifetimeManager.SendConnectionAsync(_connectionId, method, args, cancellationToken));
 }
 public override Task SendConnectionAsync(string connectionId, string methodName, object[] args)
 {
     return(_wrappedHubLifetimeManager.SendConnectionAsync(connectionId, methodName, args));
 }
Beispiel #3
0
        private static async Task InvokeMethod(HubLifetimeManager <TestHub> serviceLifetimeManager, string methodName)
        {
            switch (methodName)
            {
            case "SendAllAsync":
                await serviceLifetimeManager.SendAllAsync(TestMethod, TestArgs);

                break;

            case "SendAllExceptAsync":
                await serviceLifetimeManager.SendAllExceptAsync(TestMethod, TestArgs, TestConnectionIds);

                break;

            case "SendConnectionAsync":
                await serviceLifetimeManager.SendConnectionAsync(TestConnectionIds[0], TestMethod, TestArgs);

                break;

            case "SendConnectionsAsync":
                await serviceLifetimeManager.SendConnectionsAsync(TestConnectionIds, TestMethod, TestArgs);

                break;

            case "SendGroupAsync":
                await serviceLifetimeManager.SendGroupAsync(TestGroups[0], TestMethod, TestArgs);

                break;

            case "SendGroupsAsync":
                await serviceLifetimeManager.SendGroupsAsync(TestGroups, TestMethod, TestArgs);

                break;

            case "SendGroupExceptAsync":
                await serviceLifetimeManager.SendGroupExceptAsync(TestGroups[0], TestMethod, TestArgs,
                                                                  TestConnectionIds);

                break;

            case "SendUserAsync":
                await serviceLifetimeManager.SendUserAsync(TestUsers[0], TestMethod, TestArgs);

                break;

            case "SendUsersAsync":
                await serviceLifetimeManager.SendUsersAsync(TestUsers, TestMethod, TestArgs);

                break;

            case "AddToGroupAsync":
                await serviceLifetimeManager.AddToGroupAsync(TestConnectionIds[0], TestGroups[0]);

                break;

            case "RemoveFromGroupAsync":
                await serviceLifetimeManager.RemoveFromGroupAsync(TestConnectionIds[0], TestGroups[0]);

                break;

            default:
                break;
            }
        }
 public override Task SendConnectionAsync(string connectionId, string methodName, object[] args, CancellationToken cancellationToken = default(CancellationToken))
 {
     return(_wrappedHubLifetimeManager.SendConnectionAsync(connectionId, methodName, args, cancellationToken));
 }
Beispiel #5
0
 public Task SendCoreAsync(string method, object[] args)
 {
     return(_lifetimeManager.SendConnectionAsync(_connectionId, method, args));
 }