Created an ContentStoreResolver so we can specify a custom ContentStore which means we can return a custom

IDocument. This now means we've opened up the possibility of an abstracted routing lookup system to map to a Document
stored anywhere. By default this is obviously Xml but could theoretically be anything, still internal until more review
of the API is done.
This commit is contained in:
shannon@ShandemVaio
2012-08-10 13:38:02 +06:00
parent a858712bcc
commit c522ad6e30
15 changed files with 105 additions and 64 deletions

View File

@@ -58,16 +58,14 @@ namespace Umbraco.Web
RoutesCacheResolver.Current.RoutesCache);
UmbracoContext.Current = umbracoContext;
//create a content store
var contentStore = new ContentStore(umbracoContext);
//create the nice urls
var niceUrls = new NiceUrlProvider(contentStore, umbracoContext);
var niceUrls = new NiceUrlProvider(ContentStoreResolver.Current.ContentStore, umbracoContext);
//create the RoutingContext
var routingContext = new RoutingContext(
umbracoContext,
DocumentLookupsResolver.Current.DocumentLookups,
LastChanceLookupResolver.Current.LastChanceLookup,
contentStore,
ContentStoreResolver.Current.ContentStore,
niceUrls);
//assign the routing context back to the umbraco context
umbracoContext.RoutingContext = routingContext;