Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix warning CS0618: 'IHostingEnvironment.MapPathContentRoot(string)' is obsolete in Umbraco.TestData. #15076

Merged
merged 1 commit into from
Nov 2, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions tests/Umbraco.TestData/LoadTestController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Hosting;
using Umbraco.Cms.Core;
using Umbraco.Cms.Core.Extensions;
using Umbraco.Cms.Core.Models;
using Umbraco.Cms.Core.Services;
using Umbraco.Cms.Core.Strings;
Expand Down Expand Up @@ -99,7 +100,7 @@ @inject Umbraco.Cms.Core.Configuration.IUmbracoVersion _umbracoVersion
private readonly IDataTypeService _dataTypeService;
private readonly IFileService _fileService;
private readonly IHostApplicationLifetime _hostApplicationLifetime;
private readonly IHostingEnvironment _hostingEnvironment;
private readonly IHostEnvironment _hostEnvironment;
private readonly IShortStringHelper _shortStringHelper;

public LoadTestController(
Expand All @@ -108,15 +109,15 @@ public LoadTestController(
IDataTypeService dataTypeService,
IFileService fileService,
IShortStringHelper shortStringHelper,
IHostingEnvironment hostingEnvironment,
IHostEnvironment hostEnvironment,
IHostApplicationLifetime hostApplicationLifetime)
{
_contentTypeService = contentTypeService;
_contentService = contentService;
_dataTypeService = dataTypeService;
_fileService = fileService;
_shortStringHelper = shortStringHelper;
_hostingEnvironment = hostingEnvironment;
_hostEnvironment = hostEnvironment;
_hostApplicationLifetime = hostApplicationLifetime;
}

Expand Down Expand Up @@ -321,7 +322,7 @@ private void DoRestart()
public IActionResult ColdBootRestart()
{
Directory.Delete(
_hostingEnvironment.MapPathContentRoot(Path.Combine(Constants.SystemDirectories.TempData, "DistCache")),
_hostEnvironment.MapPathContentRoot(Path.Combine(Constants.SystemDirectories.TempData, "DistCache")),
true);

DoRestart();
Expand Down
Loading