Microsoft.AspNetCore.SignalR.Hubs.DefaultHubManager.GetHubMethods C# (CSharp) Method

GetHubMethods() public method

public GetHubMethods ( string hubName, bool>.Func predicate ) : IEnumerable
hubName string
predicate bool>.Func
return IEnumerable
        public IEnumerable<MethodDescriptor> GetHubMethods(string hubName, Func<MethodDescriptor, bool> predicate)
        {
            HubDescriptor hub = GetHub(hubName);

            if (hub == null)
            {
                return null;
            }

            var methods = _methodProviders.SelectMany(p => p.GetMethods(hub));

            if (predicate != null)
            {
                return methods.Where(predicate);
            }

            return methods;

        }