Introduced a IHostingEnvironment and one implemtation for AspNetHostingEnvironment

This commit is contained in:
Bjarke Berg
2019-11-20 13:38:41 +01:00
parent 969d8fbedd
commit bec4205ef5
35 changed files with 250 additions and 155 deletions

View File

@@ -1,6 +1,7 @@
using System.IO;
using Umbraco.Core.Composing;
using Umbraco.Core.Configuration;
using Umbraco.Core.Hosting;
namespace Umbraco.Core.IO
{
@@ -9,9 +10,9 @@ namespace Umbraco.Core.IO
public static string TinyMceConfig => Constants.SystemDirectories.Config + "/tinyMceConfig.config";
// TODO: Kill this off we don't have umbraco.config XML cache we now have NuCache
public static string GetContentCacheXml(IGlobalSettings globalSettings)
public static string GetContentCacheXml(IHostingEnvironment hostingEnvironment)
{
return Path.Combine(globalSettings.LocalTempPath(Current.IOHelper), "umbraco.config");
return Path.Combine(hostingEnvironment.LocalTempPath, "umbraco.config");
}
}
}