Example #1
0
        public HubClientsProxy(string endpoint, string accessKey, string hubName, HubProxyOptions options)
        {
            if (string.IsNullOrEmpty(endpoint))
            {
                throw new ArgumentNullException(nameof(endpoint));
            }

            if (string.IsNullOrEmpty(accessKey))
            {
                throw new ArgumentNullException(nameof(accessKey));
            }

            if (string.IsNullOrEmpty(hubName))
            {
                throw new ArgumentNullException(nameof(hubName));
            }

            _endpoint  = endpoint;
            _accessKey = accessKey;
            _hubName   = hubName.ToLower();
            _options   = options ?? HubProxyOptions.DefaultHubProxyOptions;

            All = ClientProxyFactory.CreateAllClientsProxy(_endpoint, _options.ApiVersion, _accessKey, _hubName);
        }
Example #2
0
 public IClientProxy Users(IReadOnlyList <string> userIds)
 {
     return(ClientProxyFactory.CreateMultipleUserProxy(_endpoint, _options.ApiVersion, _accessKey, _hubName,
                                                       userIds));
 }
Example #3
0
 public IClientProxy User(string userId)
 {
     return(ClientProxyFactory.CreateSingleUserProxy(_endpoint, _options.ApiVersion, _accessKey, _hubName,
                                                     userId));
 }
Example #4
0
 public IClientProxy GroupExcept(string groupName, IReadOnlyList <string> excludeIds)
 {
     return(ClientProxyFactory.CreateSingleGroupExceptProxy(_endpoint, _options.ApiVersion, _accessKey, _hubName,
                                                            groupName, excludeIds));
 }
Example #5
0
 public IClientProxy Groups(IReadOnlyList <string> groupNames)
 {
     return(ClientProxyFactory.CreateMultipleGroupProxy(_endpoint, _options.ApiVersion, _accessKey, _hubName,
                                                        groupNames));
 }
Example #6
0
 public IClientProxy Group(string groupName)
 {
     return(ClientProxyFactory.CreateSingleGroupProxy(_endpoint, _options.ApiVersion, _accessKey, _hubName,
                                                      groupName));
 }
Example #7
0
 public IClientProxy Clients(IReadOnlyList <string> connectionIds)
 {
     return(ClientProxyFactory.CreateMultipleClientProxy(_endpoint, _options.ApiVersion, _accessKey, _hubName,
                                                         connectionIds));
 }
Example #8
0
 public IClientProxy Client(string connectionId)
 {
     return(ClientProxyFactory.CreateSingleClientProxy(_endpoint, _options.ApiVersion, _accessKey, _hubName,
                                                       connectionId));
 }
Example #9
0
 public IClientProxy AllExcept(IReadOnlyList <string> excludedIds)
 {
     return(ClientProxyFactory.CreateAllClientsExceptProxy(_endpoint, _options.ApiVersion, _accessKey, _hubName,
                                                           excludedIds));
 }