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();