
Untitled
By: a guest on
May 9th, 2012 | syntax:
None | size: 1.13 KB | hits: 17 | expires: Never
public class HelloSparkRegistry : FubuRegistry
{
public HelloSparkRegistry()
{
IncludeDiagnostics(true);
Applies
.ToThisAssembly();
Actions
.IncludeClassesSuffixedWithController();
Routes
.HomeIs<AirController>(c => c.TakeABreath())
.IgnoreControllerNamespaceEntirely()
.IgnoreMethodSuffix("Command")
.IgnoreMethodSuffix("Query")
.ConstrainToHttpMethod(action => action.Method.Name.EndsWith("Command"), "POST")
.ConstrainToHttpMethod(action => action.Method.Name.StartsWith("Query"), "GET");
Policies.Add<AntiForgeryPolicy>();
this.UseSpark();
Views
.TryToAttachWithDefaultConventions()
.TryToAttachViewsInPackages();
HtmlConvention<SampleHtmlConventions>();
Services(s => s.ReplaceService<IUrlTemplatePattern, JQueryUrlTemplate>());
Output.To<SparkHtmlTagOutput>().WhenTheOutputModelIs<SparkHtmlTag>();
}
}