예제 #1
0
 public Task SendCoreAsync(string method, object?[] args, CancellationToken cancellationToken = default)
 {
     return(_lifetimeManager.SendAllExceptAsync(method, args, _excludedConnectionIds, cancellationToken));
 }
 public override Task SendAllExceptAsync(string methodName, object[] args, IReadOnlyList <string> excludedIds)
 {
     return(_wrappedHubLifetimeManager.SendAllExceptAsync(methodName, args, excludedIds));
 }
예제 #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 SendAllExceptAsync(string methodName, object[] args, IReadOnlyList <string> excludedConnectionIds, CancellationToken cancellationToken = default(CancellationToken))
 {
     return(_wrappedHubLifetimeManager.SendAllExceptAsync(methodName, args, excludedConnectionIds, cancellationToken));
 }
예제 #5
0
 public Task SendCoreAsync(string method, object[] args)
 {
     return(_lifetimeManager.SendAllExceptAsync(method, args, _excludedIds));
 }