Merge remote-tracking branch 'origin/netcore/dev' into netcore/feature/align-infrastructure-namespaces
# Conflicts: # src/Umbraco.Infrastructure/Migrations/Expressions/Rename/Expressions/RenameColumnExpression.cs # src/Umbraco.Infrastructure/Migrations/IMigrationExpression.cs
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
using System;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Configuration;
|
||||
using System.IO;
|
||||
@@ -635,19 +635,8 @@ namespace Umbraco.Tests.LegacyXmlPublishedCache
|
||||
|
||||
private static void InitializeCacheConfig()
|
||||
{
|
||||
var value = ConfigurationManager.AppSettings[Constants.AppSettings.PublishedMediaCacheSeconds];
|
||||
int seconds;
|
||||
if (int.TryParse(value, out seconds) == false)
|
||||
seconds = PublishedMediaCacheTimespanSeconds;
|
||||
if (seconds > 0)
|
||||
{
|
||||
_publishedMediaCacheEnabled = true;
|
||||
_publishedMediaCacheTimespan = TimeSpan.FromSeconds(seconds);
|
||||
}
|
||||
else
|
||||
{
|
||||
_publishedMediaCacheEnabled = false;
|
||||
}
|
||||
_publishedMediaCacheEnabled = true;
|
||||
_publishedMediaCacheTimespan = TimeSpan.FromSeconds(PublishedMediaCacheTimespanSeconds);
|
||||
}
|
||||
|
||||
internal IPublishedContent CreateFromCacheValues(CacheValues cacheValues)
|
||||
|
||||
@@ -62,7 +62,7 @@ namespace Umbraco.Tests.TestHelpers
|
||||
|
||||
services.AddUnique<ISqlContext>(_ => SqlContext);
|
||||
|
||||
var factory = Current.Factory = composition.CreateServiceProvider();
|
||||
var factory = Current.Factory = TestHelper.CreateServiceProvider(composition);
|
||||
|
||||
var pocoMappers = new NPoco.MapperCollection { new PocoMapper() };
|
||||
var pocoDataFactory = new FluentPocoDataFactory((type, iPocoDataFactory) => new PocoDataBuilder(type, pocoMappers).Init());
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using System;
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
@@ -18,6 +18,7 @@ using Umbraco.Cms.Core.Cache;
|
||||
using Umbraco.Cms.Core.Composing;
|
||||
using Umbraco.Cms.Core.Configuration;
|
||||
using Umbraco.Cms.Core.Configuration.Models;
|
||||
using Umbraco.Cms.Core.DependencyInjection;
|
||||
using Umbraco.Cms.Core.Diagnostics;
|
||||
using Umbraco.Cms.Core.Hosting;
|
||||
using Umbraco.Cms.Core.IO;
|
||||
@@ -346,5 +347,11 @@ namespace Umbraco.Tests.TestHelpers
|
||||
}
|
||||
|
||||
public static IPublishedUrlProvider GetPublishedUrlProvider() => _testHelperInternal.GetPublishedUrlProvider();
|
||||
|
||||
public static IServiceProvider CreateServiceProvider(IUmbracoBuilder builder)
|
||||
{
|
||||
builder.Build();
|
||||
return builder.Services.BuildServiceProvider();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -241,7 +241,7 @@ namespace Umbraco.Tests.Testing
|
||||
|
||||
TestObjects = new TestObjects();
|
||||
Compose();
|
||||
Current.Factory = Factory = Builder.CreateServiceProvider();
|
||||
Current.Factory = Factory = TestHelper.CreateServiceProvider(Builder);
|
||||
Initialize();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user