public RouteTree(JasperHttpOptions options, JasperGenerationRules rules) { foreach (var chain in options.Routes) { chain.Route.Place(this); } _options = options; _rules = rules; _assembly = new GeneratedAssembly(rules); }
public void methods_are_candidate_actions() { var httpSettings = new JasperHttpOptions(); httpSettings.MethodFilters .Matches(ReflectionHelper.GetMethod <RoutedEndpoint>(x => x.get_with_date_time(DateTime.MinValue))) .ShouldBeTrue(); httpSettings.MethodFilters.Matches(ReflectionHelper.GetMethod <RoutedEndpoint>(x => x.get_with_dateoffset_time(DateTimeOffset.MaxValue))).ShouldBeTrue(); httpSettings.MethodFilters .Matches(ReflectionHelper.GetMethod <RoutedEndpoint>(x => x.get_with_number_value(55))) .ShouldBeTrue(); }