示例#1
0
 private static void populateRoute(string pattern, Type inputType, IRouteDefinition route)
 {
     parse(pattern, (propName, defaultValue) =>
     {
         PropertyInfo property = inputType.GetProperty(propName);
         if (property == null)
         {
             throw new FubuException(1002, "Url pattern \"{0}\" refers to non-existent property {1} on {2}.",
                                     pattern, propName, inputType.FullName);
         }
         var input = new RouteInput(new SingleProperty(property))
         {
             DefaultValue = defaultValue
         };
         route.AddRouteInput(input, false);
     });
 }
 private static void addPropertyInput(IRouteDefinition route, PropertyInfo property)
 {
     var input = new RouteInput(new SingleProperty(property));
     route.AddRouteInput(input, true);
 }
示例#3
0
        private static void addPropertyInput(IRouteDefinition route, PropertyInfo property)
        {
            var input = new RouteInput(new SingleProperty(property));

            route.AddRouteInput(input, true);
        }