internal async Task<bool> RouteUmbracoContentAsync(UmbracoContext umbCtx, PublishedContentRequest pcr, RouteData routeData) { //Initialize the context, this will be called a few times but the initialize logic // only executes once. There might be a nicer way to do this but the RouteContext and // other request scoped instances are not available yet. umbCtx.Initialize(pcr); //Prepare the request if it hasn't already been done if (pcr.IsPrepared == false) { if (await pcr.PrepareAsync(routeData)) { if (umbCtx.HasContent == false) return false; } } return umbCtx.HasContent; }
internal async Task <bool> RouteUmbracoContentAsync(UmbracoContext umbCtx, PublishedContentRequest pcr, RouteData routeData) { //Initialize the context, this will be called a few times but the initialize logic // only executes once. There might be a nicer way to do this but the RouteContext and // other request scoped instances are not available yet. umbCtx.Initialize(pcr); //Prepare the request if it hasn't already been done if (pcr.IsPrepared == false) { if (await pcr.PrepareAsync(routeData)) { if (umbCtx.HasContent == false) { return(false); } } } return(umbCtx.HasContent); }