public RouteDefinitionResolver() { _defaultUrlPolicy = new UrlPolicy(call => true, _inputPolicy); _defaultUrlPolicy.IgnoreClassSuffix("controller"); _inputPolicy.PropertyFilters.Includes += prop => prop.InputProperty.HasCustomAttribute<RouteInputAttribute>(); _inputPolicy.PropertyFilters.Includes += prop => prop.InputProperty.HasCustomAttribute<QueryStringAttribute>(); _inputPolicy.PropertyAlterations.Register(prop => prop.HasCustomAttribute<QueryStringAttribute>(), (route, prop) => route.AddQueryInput(prop)); _policies.Add(new UrlPatternAttributePolicy()); }
public RouteDefinitionResolver() { _defaultUrlPolicy = new UrlPolicy(call => true, _inputPolicy); _defaultUrlPolicy.IgnoreClassSuffix("controller"); _inputPolicy.PropertyFilters.Includes += prop => prop.InputProperty.HasAttribute <RouteInputAttribute>(); _inputPolicy.PropertyFilters.Includes += prop => prop.InputProperty.HasAttribute <QueryStringAttribute>(); _inputPolicy.PropertyAlterations.Register(prop => prop.HasAttribute <QueryStringAttribute>(), (route, prop) => route.Input.AddQueryInput(prop)); _policies.Add(new UrlPatternAttributePolicy()); }