private IEnumerable GetPossibleNames()

in src/Microsoft.Azure.SignalR.AspNet/HubHost/SignalRMessageParser.cs [192:217]


        private IEnumerable<(string hub, string name)> GetPossibleNames(string fullName)
        {
            var index = fullName.IndexOf(DotChar);
            if (index == -1)
            {
                throw new InvalidDataException($"Name {fullName} does not contain the required separator {DotChar}");
            }

            // It is rare that hubname contains '.'
            foreach (var hub in _hubNameWithDots)
            {
                if (fullName.Length > hub.Length + 1
                    && fullName[hub.Length] == DotChar
                    && hub == fullName.Substring(0, hub.Length))
                {
                    yield return (hub, fullName.Substring(hub.Length + 1));
                }
            }

            var hubName = fullName.Substring(0, index);
            if (_hubs.Contains(hubName))
            {
                var name = fullName.Substring(index + 1);
                yield return (hubName, name);
            }
        }