Align namespaces in Umbraco.Web.Website

This commit is contained in:
Mole
2021-02-10 14:21:48 +01:00
parent 9dcc901395
commit eb03671b52
46 changed files with 62 additions and 104 deletions

View File

@@ -21,12 +21,11 @@ using Umbraco.Cms.Core.DependencyInjection;
using Umbraco.Cms.Core.Web;
using Umbraco.Cms.Web.BackOffice.Controllers;
using Umbraco.Cms.Web.Common.Controllers;
using Umbraco.Cms.Web.Website.Controllers;
using Umbraco.Extensions;
using Umbraco.Tests.Integration.DependencyInjection;
using Umbraco.Tests.Integration.Testing;
using Umbraco.Tests.Testing;
using Umbraco.Web.Website.Controllers;
using Umbraco.Web.Website.DependencyInjection;
using Constants = Umbraco.Cms.Core.Constants;
namespace Umbraco.Tests.Integration.TestServerTest

View File

@@ -14,6 +14,7 @@ using Umbraco.Cms.Core.Logging;
using Umbraco.Cms.Core.Routing;
using Umbraco.Cms.Core.Services;
using Umbraco.Cms.Core.Web;
using Umbraco.Cms.Web.Website.Controllers;
using Umbraco.Core.Cache;
using Umbraco.Core.Logging;
using Umbraco.Core.Persistence;
@@ -21,7 +22,6 @@ using Umbraco.Core.Services;
using Umbraco.Tests.Integration.TestServerTest;
using Umbraco.Web;
using Umbraco.Web.Routing;
using Umbraco.Web.Website.Controllers;
namespace Umbraco.Tests.Integration.Umbraco.Web.Website.Routing
{

View File

@@ -8,10 +8,10 @@ using NUnit.Framework;
using Umbraco.Cms.Core.Configuration.Models;
using Umbraco.Cms.Core.IO;
using Umbraco.Cms.Core.Web;
using Umbraco.Cms.Web.Website.Controllers;
using Umbraco.Cms.Web.Website.Models;
using Umbraco.Tests.Common;
using Umbraco.Web;
using Umbraco.Web.Website.Controllers;
using Umbraco.Web.Website.Models;
namespace Umbraco.Tests.UnitTests.Umbraco.Web.Website.Controllers
{

View File

@@ -19,6 +19,7 @@ using Umbraco.Cms.Core.Security;
using Umbraco.Cms.Core.Services;
using Umbraco.Cms.Core.Web;
using Umbraco.Cms.Web.Common.Routing;
using Umbraco.Cms.Web.Website.Controllers;
using Umbraco.Core.Cache;
using Umbraco.Core.Security;
using Umbraco.Core.Services;
@@ -28,7 +29,6 @@ using Umbraco.Tests.UnitTests.TestHelpers.Objects;
using Umbraco.Web;
using Umbraco.Web.PublishedCache;
using Umbraco.Web.Routing;
using Umbraco.Web.Website.Controllers;
using CoreConstants = Umbraco.Cms.Core.Constants;
namespace Umbraco.Tests.UnitTests.Umbraco.Web.Website.Controllers

View File

@@ -13,8 +13,8 @@ using Moq;
using NUnit.Framework;
using Umbraco.Cms.Core.Web;
using Umbraco.Cms.Web.Common.Controllers;
using Umbraco.Cms.Web.Website.Routing;
using Umbraco.Extensions;
using Umbraco.Web.Website.Routing;
using static Umbraco.Cms.Core.Constants.Web.Routing;
namespace Umbraco.Tests.UnitTests.Umbraco.Web.Website.Routing

View File

@@ -19,10 +19,10 @@ using Umbraco.Cms.Core.Services;
using Umbraco.Cms.Core.Web;
using Umbraco.Cms.Web.Common.Controllers;
using Umbraco.Cms.Web.Common.Routing;
using Umbraco.Cms.Web.Website.Controllers;
using Umbraco.Cms.Web.Website.Routing;
using Umbraco.Extensions;
using Umbraco.Tests.TestHelpers;
using Umbraco.Web.Website.Controllers;
using Umbraco.Web.Website.Routing;
using static Umbraco.Cms.Core.Constants.Web.Routing;
namespace Umbraco.Tests.UnitTests.Umbraco.Web.Website.Routing

View File

@@ -16,9 +16,9 @@ using Umbraco.Cms.Core.Services;
using Umbraco.Cms.Core.Strings;
using Umbraco.Cms.Web.Common.Controllers;
using Umbraco.Cms.Web.Common.Routing;
using Umbraco.Cms.Web.Website.Controllers;
using Umbraco.Cms.Web.Website.Routing;
using Umbraco.Extensions;
using Umbraco.Web.Website.Controllers;
using Umbraco.Web.Website.Routing;
namespace Umbraco.Tests.UnitTests.Umbraco.Web.Website.Routing
{

View File

@@ -12,11 +12,11 @@ using Umbraco.Cms.Core.Models.Security;
using Umbraco.Cms.Core.Security;
using Umbraco.Cms.Core.Services;
using Umbraco.Cms.Core.Strings;
using Umbraco.Cms.Web.Website.Security;
using Umbraco.Core.Models;
using Umbraco.Core.Security;
using Umbraco.Core.Services;
using Umbraco.Tests.Common.Builders;
using Umbraco.Web.Website.Security;
using CoreConstants = Umbraco.Cms.Core.Constants;
namespace Umbraco.Tests.UnitTests.Umbraco.Web.Website.Security

View File

@@ -6,7 +6,6 @@ using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
using Umbraco.Cms.Core.DependencyInjection;
using Umbraco.Extensions;
using Umbraco.Web.Website.DependencyInjection;
namespace Umbraco.Web.UI.NetCore
{

View File

@@ -1,7 +1,6 @@
@using Umbraco.Cms.Core.Security
@using Umbraco.Core.Security
@using Umbraco.Cms.Web.Website.Controllers
@using Umbraco.Extensions
@using Umbraco.Web.Website.Controllers
@inherits Umbraco.Cms.Web.Common.Macros.PartialViewMacroPage
@inject IUmbracoWebsiteSecurityAccessor UmbracoWebsiteSecurityAccessor

View File

@@ -1,7 +1,7 @@
@using Microsoft.AspNetCore.Http.Extensions
@using Umbraco.Cms.Core.Models.Security
@using Umbraco.Cms.Web.Website.Controllers
@using Umbraco.Extensions
@using Umbraco.Web.Website.Controllers
@inherits Umbraco.Cms.Web.Common.Macros.PartialViewMacroPage
@{

View File

@@ -1,8 +1,7 @@
@using Umbraco.Cms.Core.Models.Security
@using Umbraco.Cms.Core.Security
@using Umbraco.Core.Security
@using Umbraco.Cms.Web.Website.Controllers
@using Umbraco.Extensions
@using Umbraco.Web.Website.Controllers
@inherits Umbraco.Cms.Web.Common.Macros.PartialViewMacroPage
@inject IUmbracoWebsiteSecurityAccessor UmbracoWebsiteSecurityAccessor

View File

@@ -1,7 +1,6 @@
@using Umbraco.Cms.Core.Security
@using Umbraco.Core.Security
@using Umbraco.Cms.Web.Website.Controllers
@using Umbraco.Extensions
@using Umbraco.Web.Website.Controllers
@inherits Umbraco.Cms.Web.Common.Macros.PartialViewMacroPage
@inject IUmbracoWebsiteSecurityAccessor UmbracoWebsiteSecurityAccessor

View File

@@ -1,4 +1,4 @@
@model Umbraco.Web.Website.Models.NoNodesViewModel
@model Umbraco.Cms.Web.Website.Models.NoNodesViewModel
<!doctype html>
<html class="no-js" lang="en">
<head>

View File

@@ -10,7 +10,7 @@ using Umbraco.Cms.Core.Routing;
using Umbraco.Cms.Core.Web;
using Umbraco.Extensions;
namespace Umbraco.Web.Website.ActionResults
namespace Umbraco.Cms.Web.Website.ActionResults
{
/// <summary>
/// Redirects to an Umbraco page by Id or Entity

View File

@@ -2,10 +2,9 @@ using System;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.ViewFeatures;
using Microsoft.Extensions.DependencyInjection;
using Umbraco.Cms.Core.Web;
namespace Umbraco.Web.Website.ActionResults
namespace Umbraco.Cms.Web.Website.ActionResults
{
/// <summary>
/// Redirects to the current URL rendering an Umbraco page including it's query strings

View File

@@ -7,12 +7,10 @@ using Microsoft.AspNetCore.Mvc.ViewFeatures;
using Microsoft.Extensions.DependencyInjection;
using Umbraco.Cms.Core.Logging;
using Umbraco.Cms.Web.Common.Routing;
using Umbraco.Core.Logging;
using Umbraco.Web.Website.Controllers;
using Umbraco.Web.Website.Routing;
using Umbraco.Cms.Web.Website.Controllers;
using static Umbraco.Cms.Core.Constants.Web.Routing;
namespace Umbraco.Web.Website.ActionResults
namespace Umbraco.Cms.Web.Website.ActionResults
{
/// <summary>
/// Used by posted forms to proxy the result to the page in which the current URL matches on

View File

@@ -2,7 +2,7 @@
using System.Collections.Generic;
using Umbraco.Cms.Core.Composing;
namespace Umbraco.Web.Website.Collections
namespace Umbraco.Cms.Web.Website.Collections
{
public class SurfaceControllerTypeCollection : BuilderCollectionBase<Type>
{

View File

@@ -1,7 +1,7 @@
using Umbraco.Cms.Core.Composing;
using Umbraco.Web.Website.Controllers;
using Umbraco.Cms.Web.Website.Controllers;
namespace Umbraco.Web.Website.Collections
namespace Umbraco.Cms.Web.Website.Collections
{
public class SurfaceControllerTypeCollectionBuilder : TypeCollectionBuilderBase<SurfaceControllerTypeCollectionBuilder, SurfaceControllerTypeCollection, SurfaceController>
{

View File

@@ -1,6 +1,6 @@
using System;
namespace Umbraco.Web.Website.Controllers
namespace Umbraco.Cms.Web.Website.Controllers
{
/// <summary>
/// The defaults used for rendering Umbraco front-end pages

View File

@@ -4,9 +4,9 @@ using Microsoft.Extensions.Options;
using Umbraco.Cms.Core.Configuration.Models;
using Umbraco.Cms.Core.IO;
using Umbraco.Cms.Core.Web;
using Umbraco.Web.Website.Models;
using Umbraco.Cms.Web.Website.Models;
namespace Umbraco.Web.Website.Controllers
namespace Umbraco.Cms.Web.Website.Controllers
{
public class RenderNoContentController : Controller
{

View File

@@ -1,5 +1,4 @@
using System;
using System.Collections.Specialized;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Umbraco.Cms.Core.Cache;
@@ -10,15 +9,10 @@ using Umbraco.Cms.Core.Services;
using Umbraco.Cms.Core.Web;
using Umbraco.Cms.Web.Common.Controllers;
using Umbraco.Cms.Web.Common.Routing;
using Umbraco.Core;
using Umbraco.Core.Cache;
using Umbraco.Core.Logging;
using Umbraco.Cms.Web.Website.ActionResults;
using Umbraco.Core.Persistence;
using Umbraco.Core.Services;
using Umbraco.Web.Routing;
using Umbraco.Web.Website.ActionResults;
namespace Umbraco.Web.Website.Controllers
namespace Umbraco.Cms.Web.Website.Controllers
{
/// <summary>
/// Provides a base class for front-end add-in controllers.

View File

@@ -1,6 +1,5 @@
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;
using Umbraco.Cms.Core;
using Umbraco.Cms.Core.Cache;
using Umbraco.Cms.Core.Logging;
using Umbraco.Cms.Core.Models.Security;
@@ -12,7 +11,7 @@ using Umbraco.Cms.Web.Common.Filters;
using Umbraco.Core.Persistence;
using Umbraco.Extensions;
namespace Umbraco.Web.Website.Controllers
namespace Umbraco.Cms.Web.Website.Controllers
{
public class UmbLoginController : SurfaceController
{

View File

@@ -11,7 +11,7 @@ using Umbraco.Cms.Web.Common.Filters;
using Umbraco.Core.Persistence;
using Umbraco.Extensions;
namespace Umbraco.Web.Website.Controllers
namespace Umbraco.Cms.Web.Website.Controllers
{
[UmbracoMemberAuthorize]
public class UmbLoginStatusController : SurfaceController

View File

@@ -12,7 +12,7 @@ using Umbraco.Cms.Web.Common.Filters;
using Umbraco.Core.Persistence;
using Umbraco.Extensions;
namespace Umbraco.Web.Website.Controllers
namespace Umbraco.Cms.Web.Website.Controllers
{
[UmbracoMemberAuthorize]
public class UmbProfileController : SurfaceController

View File

@@ -12,7 +12,7 @@ using Umbraco.Cms.Web.Common.Filters;
using Umbraco.Core.Persistence;
using Umbraco.Extensions;
namespace Umbraco.Web.Website.Controllers
namespace Umbraco.Cms.Web.Website.Controllers
{
public class UmbRegisterController : SurfaceController
{

View File

@@ -1,7 +1,7 @@
using System;
using Umbraco.Cms.Web.Common.Controllers;
namespace Umbraco.Web.Website.Controllers
namespace Umbraco.Cms.Web.Website.Controllers
{
/// <summary>
/// The defaults used for rendering Umbraco front-end pages

View File

@@ -3,14 +3,13 @@ using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Options;
using Umbraco.Cms.Core.DependencyInjection;
using Umbraco.Cms.Web.Common.Routing;
using Umbraco.Extensions;
using Umbraco.Cms.Web.Website.Collections;
using Umbraco.Cms.Web.Website.Controllers;
using Umbraco.Cms.Web.Website.Routing;
using Umbraco.Cms.Web.Website.ViewEngines;
using Umbraco.Infrastructure.DependencyInjection;
using Umbraco.Web.Website.Collections;
using Umbraco.Web.Website.Controllers;
using Umbraco.Web.Website.Routing;
using Umbraco.Web.Website.ViewEngines;
namespace Umbraco.Web.Website.DependencyInjection
namespace Umbraco.Extensions
{
/// <summary>
/// <see cref="IUmbracoBuilder"/> extensions for umbraco front-end website

View File

@@ -13,7 +13,6 @@ using Microsoft.AspNetCore.Mvc.Rendering;
using Microsoft.AspNetCore.Mvc.ViewFeatures;
using Microsoft.AspNetCore.Routing;
using Microsoft.Extensions.DependencyInjection;
using Umbraco.Cms.Core;
using Umbraco.Cms.Core.Cache;
using Umbraco.Cms.Core.Configuration.Models;
using Umbraco.Cms.Core.Hosting;
@@ -24,8 +23,8 @@ using Umbraco.Cms.Core.Web.Mvc;
using Umbraco.Cms.Web.Common.Controllers;
using Umbraco.Cms.Web.Common.Mvc;
using Umbraco.Cms.Web.Common.Security;
using Umbraco.Web.Website.Collections;
using Umbraco.Web.Website.Controllers;
using Umbraco.Cms.Web.Website.Collections;
using Umbraco.Cms.Web.Website.Controllers;
namespace Umbraco.Extensions
{

View File

@@ -1,12 +1,11 @@
using System;
using System.Collections.Generic;
using System.Dynamic;
using System.Linq;
using System.Linq.Expressions;
using System.Reflection;
using Microsoft.AspNetCore.Routing;
using Umbraco.Cms.Core;
using Umbraco.Web.Website.Controllers;
using Umbraco.Cms.Web.Website.Controllers;
namespace Umbraco.Extensions
{

View File

@@ -8,10 +8,10 @@ using Umbraco.Cms.Core.Routing;
using Umbraco.Cms.Core.Services;
using Umbraco.Cms.Core.Web;
using Umbraco.Examine;
using Umbraco.Extensions;
using Umbraco.Web;
using Constants = Umbraco.Cms.Core.Constants;
namespace Umbraco.Web.Website.Extensions
namespace Umbraco.Extensions
{
public static class PublishedContentExtensions
{
@@ -101,8 +101,6 @@ namespace Umbraco.Web.Website.Extensions
#region IsSomething: equality
public static bool IsEqual(this IPublishedContent content, IPublishedContent other) => content.Id == other.Id;
/// <summary>
/// If the specified <paramref name="content" /> is equal to <paramref name="other" />, the HTML encoded <paramref name="valueIfTrue" /> will be returned; otherwise, <see cref="string.Empty" />.
/// </summary>
@@ -126,16 +124,6 @@ namespace Umbraco.Web.Website.Extensions
/// </returns>
public static IHtmlContent IsEqual(this IPublishedContent content, IPublishedContent other, string valueIfTrue, string valueIfFalse) => new HtmlString(HttpUtility.HtmlEncode(content.IsEqual(other) ? valueIfTrue : valueIfFalse));
/// <summary>
/// If the specified <paramref name="content" /> is not equal to <paramref name="other" />, true will be returned; otherwise, the result will be false />.
/// </summary>
/// <param name="content">The content.</param>
/// <param name="other">The other content.</param>
/// <returns>
/// The result from checking whether the two published content items are not equal.
/// </returns>
public static bool IsNotEqual(this IPublishedContent content, IPublishedContent other) => content.IsEqual(other) == false;
/// <summary>
/// If the specified <paramref name="content" /> is not equal to <paramref name="other" />, the HTML encoded <paramref name="valueIfTrue" /> will be returned; otherwise, <see cref="string.Empty" />.
/// </summary>

View File

@@ -2,7 +2,7 @@
using System.Collections.Generic;
using Umbraco.Cms.Core.Composing;
using Umbraco.Cms.Web.Common.Controllers;
using Umbraco.Web.Website.Controllers;
using Umbraco.Cms.Web.Website.Controllers;
namespace Umbraco.Extensions
{

View File

@@ -1,7 +1,7 @@
using System;
using Microsoft.AspNetCore.Builder;
using Microsoft.Extensions.DependencyInjection;
using Umbraco.Web.Website.Routing;
using Umbraco.Cms.Web.Website.Routing;
namespace Umbraco.Extensions
{

View File

@@ -1,4 +1,4 @@
namespace Umbraco.Web.Website.Models
namespace Umbraco.Cms.Web.Website.Models
{
public class NoNodesViewModel
{

View File

@@ -9,7 +9,7 @@ using Umbraco.Cms.Core.Composing;
using Umbraco.Cms.Web.Common.Controllers;
using static Umbraco.Cms.Core.Constants.Web.Routing;
namespace Umbraco.Web.Website.Routing
namespace Umbraco.Cms.Web.Website.Routing
{
/// <summary>
/// Used to find a controller/action in the current available routes

View File

@@ -8,10 +8,10 @@ using Umbraco.Cms.Core.Services;
using Umbraco.Cms.Core.Web.Mvc;
using Umbraco.Cms.Web.Common.Controllers;
using Umbraco.Cms.Web.Common.Routing;
using Umbraco.Cms.Web.Website.Collections;
using Umbraco.Extensions;
using Umbraco.Web.Website.Collections;
namespace Umbraco.Web.Website.Routing
namespace Umbraco.Cms.Web.Website.Routing
{
/// <summary>
/// Creates routes for surface controllers

View File

@@ -1,7 +1,7 @@
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc.Controllers;
namespace Umbraco.Web.Website.Routing
namespace Umbraco.Cms.Web.Website.Routing
{
public interface IControllerActionSearcher
{

View File

@@ -1,10 +1,8 @@
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Routing;
using Umbraco.Cms.Core.Routing;
using Umbraco.Cms.Web.Common.Routing;
using Umbraco.Web.Routing;
namespace Umbraco.Web.Website.Routing
namespace Umbraco.Cms.Web.Website.Routing
{
/// <summary>
/// Used to create <see cref="UmbracoRouteValues"/>

View File

@@ -2,7 +2,6 @@ using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Net.Http;
using System.Threading.Tasks;
using Microsoft.AspNetCore.DataProtection;
using Microsoft.AspNetCore.Http;
@@ -20,12 +19,12 @@ using Umbraco.Cms.Core.Services;
using Umbraco.Cms.Core.Web;
using Umbraco.Cms.Web.Common.Routing;
using Umbraco.Cms.Web.Common.Security;
using Umbraco.Cms.Web.Website.Controllers;
using Umbraco.Extensions;
using Umbraco.Web.Website.Controllers;
using static Umbraco.Cms.Core.Constants.Web.Routing;
using RouteDirection = Umbraco.Cms.Core.Routing.RouteDirection;
namespace Umbraco.Web.Website.Routing
namespace Umbraco.Cms.Web.Website.Routing
{
/// <summary>
/// The route value transformer for Umbraco front-end routes

View File

@@ -1,18 +1,16 @@
using System;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc.Controllers;
using Microsoft.AspNetCore.Routing;
using Umbraco.Cms.Core;
using Umbraco.Cms.Core.Features;
using Umbraco.Cms.Core.Models.PublishedContent;
using Umbraco.Cms.Core.Routing;
using Umbraco.Cms.Core.Strings;
using Umbraco.Cms.Web.Common.Controllers;
using Umbraco.Cms.Web.Common.Routing;
using Umbraco.Cms.Web.Website.Controllers;
using Umbraco.Extensions;
using Umbraco.Web.Website.Controllers;
namespace Umbraco.Web.Website.Routing
namespace Umbraco.Cms.Web.Website.Routing
{
/// <summary>
/// Used to create <see cref="UmbracoRouteValues"/>

View File

@@ -11,14 +11,9 @@ using Umbraco.Cms.Core.Models.Security;
using Umbraco.Cms.Core.Security;
using Umbraco.Cms.Core.Services;
using Umbraco.Cms.Core.Strings;
using Umbraco.Core;
using Umbraco.Core.Models;
using Umbraco.Core.Security;
using Umbraco.Core.Services;
using Umbraco.Web.Models;
using Constants = Umbraco.Cms.Core.Constants;
namespace Umbraco.Web.Website.Security
namespace Umbraco.Cms.Web.Website.Security
{
public class UmbracoWebsiteSecurity : IUmbracoWebsiteSecurity
{

View File

@@ -4,6 +4,7 @@
<TargetFramework>net5.0</TargetFramework>
<OutputType>Library</OutputType>
<LangVersion>latest</LangVersion>
<RootNamespace>Umbraco.Cms.Web.Website</RootNamespace>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'Release' ">

View File

@@ -5,7 +5,7 @@ using Microsoft.AspNetCore.Mvc.Razor;
using Microsoft.Extensions.Options;
using Umbraco.Cms.Core;
namespace Umbraco.Web.Website.ViewEngines
namespace Umbraco.Cms.Web.Website.ViewEngines
{
/// <summary>
/// Configure view engine locations for front-end rendering based on App_Plugins views

View File

@@ -1,10 +1,8 @@

using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.ViewEngines;
using Umbraco.Cms.Core.Logging;
using Umbraco.Core.Logging;
namespace Umbraco.Web.Website.ViewEngines
namespace Umbraco.Cms.Web.Website.ViewEngines
{
public class ProfilingViewEngine: IViewEngine
{

View File

@@ -5,9 +5,8 @@ using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.ViewEngines;
using Microsoft.Extensions.Options;
using Umbraco.Cms.Core.Logging;
using Umbraco.Core.Logging;
namespace Umbraco.Web.Website.ViewEngines
namespace Umbraco.Cms.Web.Website.ViewEngines
{
/// <summary>
/// Wraps all view engines with a <see cref="ProfilingViewEngine"/>

View File

@@ -4,7 +4,7 @@ using System.Linq;
using Microsoft.AspNetCore.Mvc.Razor;
using Microsoft.Extensions.Options;
namespace Umbraco.Web.Website.ViewEngines
namespace Umbraco.Cms.Web.Website.ViewEngines
{
/// <summary>
/// Configure view engine locations for front-end rendering