예제 #1
0
        private IEnumerable <string> GetSignals(ClientHubInfo hubInfo, string clientId)
        {
            var clientSignals = new[] {
                hubInfo.CreateQualifiedName(clientId),
                hubInfo.CreateQualifiedName(clientId) + "." + PersistentConnection.SignalrCommand
            };

            // Create the signals for hubs
            return(hubInfo.Methods.Select(hubInfo.CreateQualifiedName)
                   .Concat(clientSignals));
        }
예제 #2
0
        private IEnumerable <string> GetSignals(ClientHubInfo hubInfo, string connectionId)
        {
            // Try to find the associated hub type
            HubDescriptor hubDescriptor = _manager.EnsureHub(hubInfo.Name,
                                                             _hubResolutionErrorsTotalCounter,
                                                             _hubResolutionErrorsPerSecCounter,
                                                             _allErrorsTotalCounter,
                                                             _allErrorsPerSecCounter);

            // Add this to the list of hub desciptors this connection is interested in
            _hubs.Add(hubDescriptor);

            // Update the name (Issue #344)
            hubInfo.Name = hubDescriptor.Name;

            // Create the signals for hubs
            // 1. The hub name e.g. MyHub
            // 2. The connection id for this hub e.g. MyHub.{guid}
            // 3. The command signal for this connection
            var clientSignals = new[] {
                hubInfo.Name,
                hubInfo.CreateQualifiedName(connectionId)
            };

            return(clientSignals);
        }
예제 #3
0
        private IEnumerable <string> GetSignals(ClientHubInfo hubInfo, string connectionId)
        {
            var clientSignals = new[] {
                hubInfo.CreateQualifiedName(connectionId),
                SignalCommand.AddCommandSuffix(hubInfo.CreateQualifiedName(connectionId))
            };

            // Try to find the associated hub type
            Type hubType = _hubTypeResolver.ResolveType(hubInfo.Name);

            if (hubType == null)
            {
                throw new InvalidOperationException(String.Format("Unable to resolve hub {0}.", hubInfo.Name));
            }

            // Set the full type name
            hubInfo.Name = hubType.FullName;

            // Create the signals for hubs
            return(hubInfo.Methods.Select(hubInfo.CreateQualifiedName)
                   .Concat(clientSignals));
        }
예제 #4
0
        private IEnumerable<string> GetSignals(ClientHubInfo hubInfo, string connectionId)
        {
            var clientSignals = new[] {
                hubInfo.CreateQualifiedName(connectionId),
                hubInfo.CreateQualifiedName(connectionId) + "." + SignalCommand.SignalrCommand
            };

            // Try to find the associated hub type
            Type hubType = _hubTypeResolver.ResolveType(hubInfo.Name);

            if (hubType == null)
            {
                throw new InvalidOperationException(String.Format("Unable to resolve hub {0}.", hubInfo.Name));
            }

            // Set the full type name
            hubInfo.Name = hubType.FullName;

            // Create the signals for hubs
            return hubInfo.Methods.Select(hubInfo.CreateQualifiedName)
                                  .Concat(clientSignals);
        }
예제 #5
0
        private IEnumerable<string> GetSignals(ClientHubInfo hubInfo, string clientId)
        {
            var clientSignals = new[] {
                hubInfo.CreateQualifiedName(clientId),
                hubInfo.CreateQualifiedName(clientId) + "." + PersistentConnection.SignalrCommand
            };

            // Create the signals for hubs
            return hubInfo.Methods.Select(hubInfo.CreateQualifiedName)
                                  .Concat(clientSignals);
        }