From ebaeb98a4ae98228009ac04c0cc27e86d250370c Mon Sep 17 00:00:00 2001 From: Stephan Date: Sat, 13 Aug 2016 16:23:44 +0200 Subject: [PATCH] Resvolution - UrlProviderResolver --- src/Umbraco.Web/Current.cs | 2 +- src/Umbraco.Web/Routing/UrlProviderCollectionBuilder.cs | 8 +------- src/Umbraco.Web/WebBootManager.cs | 3 +-- 3 files changed, 3 insertions(+), 10 deletions(-) diff --git a/src/Umbraco.Web/Current.cs b/src/Umbraco.Web/Current.cs index 9a112dbb6c..f483361151 100644 --- a/src/Umbraco.Web/Current.cs +++ b/src/Umbraco.Web/Current.cs @@ -112,7 +112,7 @@ namespace Umbraco.Web => Container.GetInstance().GetOrDefault(); public static UrlProviderCollection UrlProviders - => CoreCurrent.Container.GetInstance(); + => Container.GetInstance(); #endregion diff --git a/src/Umbraco.Web/Routing/UrlProviderCollectionBuilder.cs b/src/Umbraco.Web/Routing/UrlProviderCollectionBuilder.cs index 5e572b2a5a..577c35be8c 100644 --- a/src/Umbraco.Web/Routing/UrlProviderCollectionBuilder.cs +++ b/src/Umbraco.Web/Routing/UrlProviderCollectionBuilder.cs @@ -1,5 +1,4 @@ -using System.Collections.Generic; -using LightInject; +using LightInject; using Umbraco.Core.DependencyInjection; namespace Umbraco.Web.Routing @@ -11,10 +10,5 @@ namespace Umbraco.Web.Routing { } protected override UrlProviderCollectionBuilder This => this; - - protected override UrlProviderCollection CreateCollection(IEnumerable items) - { - return new UrlProviderCollection(items); - } } } diff --git a/src/Umbraco.Web/WebBootManager.cs b/src/Umbraco.Web/WebBootManager.cs index 34645df951..9b2af1c05a 100644 --- a/src/Umbraco.Web/WebBootManager.cs +++ b/src/Umbraco.Web/WebBootManager.cs @@ -510,8 +510,7 @@ namespace Umbraco.Web typeof (RenderControllerFactory) }); - Container.RegisterBuilderCollection(); - Container.GetInstance() + UrlProviderCollectionBuilder.Register(Container) //.Append() // not enabled by default .Append() .Append();