public static IEnumerable <MethodDescriptor> GetHubMethods(this IHubManager hubManager, string hubName) { if (hubManager == null) { throw new ArgumentNullException("hubManager"); } return(hubManager.GetHubMethods(hubName, m => true)); }
private IEnumerable <MethodDescriptor> GetMethods(HubDescriptor descriptor) { return(from method in _manager.GetHubMethods(descriptor.Name) group method by method.Name into overloads let oload = (from overload in overloads orderby overload.Parameters.Count select overload).FirstOrDefault() select oload); }
private static IEnumerable<HubMethodModel> GetHubMethodInfo(IHubManager hubManager, HubDescriptor hubDescriptor) { var hubMethodDescriptors = hubManager.GetHubMethods(hubDescriptor.Name, md => true).ToList(); if (!hubMethodDescriptors.Any()) return null; var hubMethodData = hubMethodDescriptors .Select(hubMethodDescriptor => new HubMethodModel { Name = hubMethodDescriptor.Name, ReturnType = hubMethodDescriptor.ReturnType, Parameters = GetHubMethodParametersInfo(hubMethodDescriptor) }) .ToList(); return hubMethodData; }
private static IEnumerable <HubMethodModel> GetHubMethodInfo(IHubManager hubManager, HubDescriptor hubDescriptor) { var hubMethodDescriptors = hubManager.GetHubMethods(hubDescriptor.Name, md => true).ToList(); if (!hubMethodDescriptors.Any()) { return(null); } var hubMethodData = hubMethodDescriptors .Select(hubMethodDescriptor => new HubMethodModel { Name = hubMethodDescriptor.Name, ReturnType = hubMethodDescriptor.ReturnType, Parameters = GetHubMethodParametersInfo(hubMethodDescriptor) }) .ToList(); return(hubMethodData); }