Skip to content

Instantly share code, notes, and snippets.

View synhershko's full-sized avatar

Itamar Syn-Hershko synhershko

View GitHub Profile
@synhershko
synhershko / CustomBootstraper.cs
Last active December 10, 2015 02:09
Custom NancyFX IViewLocationProvider implementation to allow for loading views from a RavenDB server instance. Views loaded from RavenDB will override views which exist on the File System.
protected override NancyInternalConfiguration InternalConfiguration
{
get
{
return NancyInternalConfiguration
.WithOverrides(x => x.ViewLocationProvider = typeof (RavenViewLocationProvider))
.WithIgnoredAssembly(asm => asm.FullName.StartsWith("RavenDB", StringComparison.InvariantCulture)); // or override ConfigureApplicationContainer to set AutoRegister to false
}
}