V10: fix build warnings in Web.BackOffice (#12479)

* Run code cleanup

* Start manual run

* Finish dotnet format + manual cleanup

* Fix up after merge

* Fix substrings changed to [..]

Co-authored-by: Nikolaj Geisle <niko737@edu.ucl.dk>
Co-authored-by: Zeegaan <nge@umbraco.dk>
This commit is contained in:
Nikolaj Geisle
2022-06-20 08:37:17 +02:00
committed by GitHub
parent 7688c61621
commit e762fa91bc
234 changed files with 28037 additions and 27527 deletions

View File

@@ -1,27 +1,23 @@
using System;
using Microsoft.AspNetCore.Mvc;
using Umbraco.Cms.Core.PublishedCache;
namespace Umbraco.Cms.Web.BackOffice.Controllers
namespace Umbraco.Cms.Web.BackOffice.Controllers;
public class PublishedStatusController : UmbracoAuthorizedApiController
{
public class PublishedStatusController : UmbracoAuthorizedApiController
private readonly IPublishedSnapshotStatus _publishedSnapshotStatus;
public PublishedStatusController(IPublishedSnapshotStatus publishedSnapshotStatus) => _publishedSnapshotStatus =
publishedSnapshotStatus ?? throw new ArgumentNullException(nameof(publishedSnapshotStatus));
[HttpGet]
public string GetPublishedStatusUrl()
{
private readonly IPublishedSnapshotStatus _publishedSnapshotStatus;
public PublishedStatusController(IPublishedSnapshotStatus publishedSnapshotStatus)
if (!string.IsNullOrWhiteSpace(_publishedSnapshotStatus.StatusUrl))
{
_publishedSnapshotStatus = publishedSnapshotStatus ?? throw new ArgumentNullException(nameof(publishedSnapshotStatus));
return _publishedSnapshotStatus.StatusUrl;
}
[HttpGet]
public string GetPublishedStatusUrl()
{
if (!string.IsNullOrWhiteSpace(_publishedSnapshotStatus.StatusUrl))
{
return _publishedSnapshotStatus.StatusUrl;
}
throw new NotSupportedException("Not supported: " + _publishedSnapshotStatus.GetType().FullName);
}
throw new NotSupportedException("Not supported: " + _publishedSnapshotStatus.GetType().FullName);
}
}