public static IEnumerable <IActionMethodSource> ThatApplyTo( this IEnumerable <IActionMethodSource> methodSources, ActionSourceContext actionSourceContext, Configuration configuration) { return(configuration.ActionMethodSources.ThatApplyTo(methodSources, new ActionMethodSourceContext(configuration, actionSourceContext.HttpConfiguration))); }
public virtual List <ActionDescriptor> GetActions(ActionSourceContext context) { return(_actionMethodSources.ThatApplyTo(context, _configuration) .SelectMany(x => x.GetActionMethods(context)).Distinct() .SelectMany(a => _routeConventions.ThatApplyTo(a, context, _configuration) .SelectMany(rc => rc .GetRouteDescriptors(context, a) .Select(r => new ActionDescriptor(a, r, _configuration.Behaviors.ThatApplyTo(context, a, r) .Select(x => _typeCache.GetTypeDescriptor(x)).ToArray())))) .ToList()); }
public virtual bool AppliesTo(ActionSourceContext context) { return(true); }
public static List <Type> ThatApplyTo(this PluginDefinitions <IBehavior, BehaviorContext> behaviors, ActionSourceContext context, ActionMethod actionMethod, RouteDescriptor routeDescriptor) { return(behaviors.ThatApplyTo(new BehaviorContext(context.Configuration, context .HttpConfiguration, actionMethod, routeDescriptor)) .Select(x => x.Type).ToList()); }
public static IEnumerable <ActionMethod> GetActionMethods(this IActionMethodSource actionMethodSource, ActionSourceContext context) { return(actionMethodSource.GetActionMethods(new ActionMethodSourceContext(context.Configuration, context.HttpConfiguration))); }