Esempio n. 1
0
        public void Configure(FubuRegistry registry)
        {
            registry.Applies
            .ToAllPackageAssemblies()
            .ToThisAssembly();

            registry.Actions
            .IncludeType <AwesomeMenuHandler>()
            .FindWith <RestfulHandlerActionSource>();

            registry.Routes
            .UrlPolicy <AwesomeCreateRoutingConvention>()
            .UrlPolicy <AwesomeEditRoutingConvention>()
            .UrlPolicy <RestfulCreateRoutingConvention>()
            .UrlPolicy <RestfulDeleteRoutingConvention>()
            .UrlPolicy <RestfulIndexRoutingConvention>()
            .UrlPolicy <RestfulPatchRoutingConvention>()
            .UrlPolicy <RestfulFindRoutingConvention>();

            registry.Models
            .BindModelsWith <EntityModelBinder>();

            registry.Output.ToJson.WhenCallMatches(x => x.HandlerType.IsGenericType);

            registry.UseSpark();

            registry.Views
            .TryToAttachWithDefaultConventions()
            .TryToAttachViewsInPackages()
            .ApplyConvention <IndexViewPolicy>()
            .ApplyConvention <CreateViewPolicy>();

            registry.HtmlConvention <AwesomeHtmlConventions>();
        }
Esempio n. 2
0
 public static void UseSpark(this FubuRegistry fubuRegistry)
 {
     fubuRegistry.UseSpark(s => { });
 }