diff --git a/build/NuSpecs/UmbracoCms.Web.nuspec b/build/NuSpecs/UmbracoCms.Web.nuspec index 1d136daf95..92cb0f065e 100644 --- a/build/NuSpecs/UmbracoCms.Web.nuspec +++ b/build/NuSpecs/UmbracoCms.Web.nuspec @@ -43,18 +43,15 @@ - - - diff --git a/build/build-bootstrap.ps1 b/build/build-bootstrap.ps1 index 645f6c7d41..4c946ba289 100644 --- a/build/build-bootstrap.ps1 +++ b/build/build-bootstrap.ps1 @@ -23,7 +23,7 @@ $cache = 4 $nuget = "$scriptTemp\nuget.exe" # ensure the correct NuGet-source is used. This one is used by Umbraco - $nugetsourceUmbraco = "https://www.myget.org/F/umbracocore/api/v3/index.json" + $nugetsourceUmbraco = "https://www.myget.org/F/umbracoprereleases/api/v3/index.json" if (-not $local) { $source = "https://dist.nuget.org/win-x86-commandline/latest/nuget.exe" diff --git a/build/build.ps1 b/build/build.ps1 index ae59874e6a..58d56fcdfe 100644 --- a/build/build.ps1 +++ b/build/build.ps1 @@ -51,12 +51,12 @@ { param ( $semver ) - $release = "" + $semver.Major + "." + $semver.Minor + "." + $semver.Patch - - Write-Host "Update IIS Express port in csproj" - $updater = New-Object "Umbraco.Build.ExpressPortUpdater" - $csproj = "$($this.SolutionRoot)\src\Umbraco.Web.UI\Umbraco.Web.UI.csproj" - $updater.Update($csproj, $release) + $port = "" + $semver.Major + $semver.Minor + ("" + $semver.Patch).PadLeft(2, '0') + Write-Host "Update port in launchSettings.json to $port" + $filePath = "$($this.SolutionRoot)\src\Umbraco.Web.UI.NetCore\Properties\launchSettings.json" + $this.ReplaceFileText($filePath, ` + "http://localhost:(\d+)?", ` + "http://localhost:$port") }) $ubuild.DefineMethod("SandboxNode", @@ -478,7 +478,7 @@ { $this.VerifyNuGetConsistency( ("UmbracoCms", "UmbracoCms.Core", "UmbracoCms.Web"), - ("Umbraco.Core", "Umbraco.Infrastructure", "Umbraco.Web.UI.NetCore", "Umbraco.Examine.Lucene", "Umbraco.PublishedCache.NuCache", "Umbraco.Web.Common", "Umbraco.Web.Website", "Umbraco.Web.BackOffice", "Umbraco.ModelsBuilder.Embedded", "Umbraco.Persistence.SqlCe")) + ("Umbraco.Core", "Umbraco.Infrastructure", "Umbraco.Web.UI.NetCore", "Umbraco.Examine.Lucene", "Umbraco.PublishedCache.NuCache", "Umbraco.Web.Common", "Umbraco.Web.Website", "Umbraco.Web.BackOffice", "Umbraco.Persistence.SqlCe")) if ($this.OnError()) { return } }) diff --git a/build/templates/UmbracoSolution/UmbracoSolution.csproj b/build/templates/UmbracoSolution/UmbracoSolution.csproj index 87271c3dd7..278720afef 100644 --- a/build/templates/UmbracoSolution/UmbracoSolution.csproj +++ b/build/templates/UmbracoSolution/UmbracoSolution.csproj @@ -26,6 +26,16 @@ + + true + PreserveNewest + Always + + + true + PreserveNewest + Always + diff --git a/src/Directory.Build.props b/src/Directory.Build.props new file mode 100644 index 0000000000..cdce38df2f --- /dev/null +++ b/src/Directory.Build.props @@ -0,0 +1,13 @@ + + + 9.0.0 + 9.0.0 + 9.0.0-beta001 + 9.0.0 + 9.0 + en-US + Umbraco CMS + Copyright © Umbraco 2021 + + + diff --git a/src/SolutionInfo.cs b/src/SolutionInfo.cs deleted file mode 100644 index 3a1f151388..0000000000 --- a/src/SolutionInfo.cs +++ /dev/null @@ -1,22 +0,0 @@ -using System.Reflection; -using System.Resources; - -[assembly: AssemblyCompany("Umbraco")] -[assembly: AssemblyCopyright("Copyright © Umbraco 2021")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -[assembly: NeutralResourcesLanguage("en-US")] - -// versions -// read https://stackoverflow.com/questions/64602/what-are-differences-between-assemblyversion-assemblyfileversion-and-assemblyin - -// note: do NOT change anything here manually, use the build scripts - -// this is the ONLY ONE the CLR cares about for compatibility -// should change ONLY when "hard" breaking compatibility (manual change) -[assembly: AssemblyVersion("0.5.0")] - -// these are FYI and changed automatically -[assembly: AssemblyFileVersion("0.5.0")] -[assembly: AssemblyInformationalVersion("0.5.0-alpha003")] diff --git a/src/Umbraco.Core/Actions/ActionAssignDomain.cs b/src/Umbraco.Core/Actions/ActionAssignDomain.cs index 7dc3668e5d..e03e2de81c 100644 --- a/src/Umbraco.Core/Actions/ActionAssignDomain.cs +++ b/src/Umbraco.Core/Actions/ActionAssignDomain.cs @@ -1,8 +1,4 @@ -using Umbraco.Core; -using Umbraco.Core.CodeAnnotations; - - -namespace Umbraco.Web.Actions +namespace Umbraco.Cms.Core.Actions { /// /// This action is invoked when a domain is being assigned to a document diff --git a/src/Umbraco.Core/Actions/ActionBrowse.cs b/src/Umbraco.Core/Actions/ActionBrowse.cs index 64882c142a..2716d17e81 100644 --- a/src/Umbraco.Core/Actions/ActionBrowse.cs +++ b/src/Umbraco.Core/Actions/ActionBrowse.cs @@ -1,8 +1,4 @@ -using Umbraco.Core; -using Umbraco.Core.CodeAnnotations; - - -namespace Umbraco.Web.Actions +namespace Umbraco.Cms.Core.Actions { /// /// This action is used as a security constraint that grants a user the ability to view nodes in a tree diff --git a/src/Umbraco.Core/Actions/ActionChangeDocType.cs b/src/Umbraco.Core/Actions/ActionChangeDocType.cs index 60f6d52d3f..9372524e13 100644 --- a/src/Umbraco.Core/Actions/ActionChangeDocType.cs +++ b/src/Umbraco.Core/Actions/ActionChangeDocType.cs @@ -1,4 +1,4 @@ -namespace Umbraco.Web.Actions +namespace Umbraco.Cms.Core.Actions { // TODO: Add this back in when we support this functionality again ///// diff --git a/src/Umbraco.Core/Actions/ActionCollection.cs b/src/Umbraco.Core/Actions/ActionCollection.cs index 1ba60317f5..3987e89305 100644 --- a/src/Umbraco.Core/Actions/ActionCollection.cs +++ b/src/Umbraco.Core/Actions/ActionCollection.cs @@ -1,11 +1,10 @@ using System.Collections.Generic; using System.Linq; -using Umbraco.Core; -using Umbraco.Core.Composing; -using Umbraco.Core.Models.Membership; +using Umbraco.Cms.Core.Composing; +using Umbraco.Cms.Core.Models.Membership; +using Umbraco.Extensions; - -namespace Umbraco.Web.Actions +namespace Umbraco.Cms.Core.Actions { public class ActionCollection : BuilderCollectionBase { diff --git a/src/Umbraco.Core/Actions/ActionCollectionBuilder.cs b/src/Umbraco.Core/Actions/ActionCollectionBuilder.cs index 1fe3008610..92ba18331a 100644 --- a/src/Umbraco.Core/Actions/ActionCollectionBuilder.cs +++ b/src/Umbraco.Core/Actions/ActionCollectionBuilder.cs @@ -1,8 +1,9 @@ using System; using System.Collections.Generic; using System.Linq; -using Umbraco.Core.Composing; -namespace Umbraco.Web.Actions +using Umbraco.Cms.Core.Composing; + +namespace Umbraco.Cms.Core.Actions { public class ActionCollectionBuilder : LazyCollectionBuilderBase { diff --git a/src/Umbraco.Core/Actions/ActionCopy.cs b/src/Umbraco.Core/Actions/ActionCopy.cs index a568d0aa37..a88d725f96 100644 --- a/src/Umbraco.Core/Actions/ActionCopy.cs +++ b/src/Umbraco.Core/Actions/ActionCopy.cs @@ -1,6 +1,4 @@ -using Umbraco.Core; - -namespace Umbraco.Web.Actions +namespace Umbraco.Cms.Core.Actions { /// /// This action is invoked when copying a document, media, member diff --git a/src/Umbraco.Core/Actions/ActionCreateBlueprintFromContent.cs b/src/Umbraco.Core/Actions/ActionCreateBlueprintFromContent.cs index 0a46393a81..7e9035d6d0 100644 --- a/src/Umbraco.Core/Actions/ActionCreateBlueprintFromContent.cs +++ b/src/Umbraco.Core/Actions/ActionCreateBlueprintFromContent.cs @@ -1,8 +1,4 @@ -using Umbraco.Core; -using Umbraco.Core.CodeAnnotations; - - -namespace Umbraco.Web.Actions +namespace Umbraco.Cms.Core.Actions { public class ActionCreateBlueprintFromContent : IAction { diff --git a/src/Umbraco.Core/Actions/ActionDelete.cs b/src/Umbraco.Core/Actions/ActionDelete.cs index 470f1453d6..4fa77d7528 100644 --- a/src/Umbraco.Core/Actions/ActionDelete.cs +++ b/src/Umbraco.Core/Actions/ActionDelete.cs @@ -1,6 +1,4 @@ -using Umbraco.Core; - -namespace Umbraco.Web.Actions +namespace Umbraco.Cms.Core.Actions { /// /// This action is invoked when a document, media, member is deleted diff --git a/src/Umbraco.Core/Actions/ActionMove.cs b/src/Umbraco.Core/Actions/ActionMove.cs index 74c783aab9..943ad98c9f 100644 --- a/src/Umbraco.Core/Actions/ActionMove.cs +++ b/src/Umbraco.Core/Actions/ActionMove.cs @@ -1,6 +1,4 @@ -using Umbraco.Core; - -namespace Umbraco.Web.Actions +namespace Umbraco.Cms.Core.Actions { /// /// This action is invoked upon creation of a document, media, member diff --git a/src/Umbraco.Core/Actions/ActionNew.cs b/src/Umbraco.Core/Actions/ActionNew.cs index ab208a79a3..2a11620483 100644 --- a/src/Umbraco.Core/Actions/ActionNew.cs +++ b/src/Umbraco.Core/Actions/ActionNew.cs @@ -1,6 +1,4 @@ -using Umbraco.Core; - -namespace Umbraco.Web.Actions +namespace Umbraco.Cms.Core.Actions { /// /// This action is invoked upon creation of a document diff --git a/src/Umbraco.Core/Actions/ActionProtect.cs b/src/Umbraco.Core/Actions/ActionProtect.cs index dc6c7ff4e7..4108853a4c 100644 --- a/src/Umbraco.Core/Actions/ActionProtect.cs +++ b/src/Umbraco.Core/Actions/ActionProtect.cs @@ -1,6 +1,4 @@ -using Umbraco.Core; - -namespace Umbraco.Web.Actions +namespace Umbraco.Cms.Core.Actions { /// /// This action is invoked when a document is protected or unprotected diff --git a/src/Umbraco.Core/Actions/ActionPublish.cs b/src/Umbraco.Core/Actions/ActionPublish.cs index 5c9ce08c35..ef2bd23cbb 100644 --- a/src/Umbraco.Core/Actions/ActionPublish.cs +++ b/src/Umbraco.Core/Actions/ActionPublish.cs @@ -1,8 +1,4 @@ -using Umbraco.Core; -using Umbraco.Core.CodeAnnotations; - - -namespace Umbraco.Web.Actions +namespace Umbraco.Cms.Core.Actions { /// /// This action is invoked when a document is being published diff --git a/src/Umbraco.Core/Actions/ActionRestore.cs b/src/Umbraco.Core/Actions/ActionRestore.cs index aa309131f2..9f90dc92f1 100644 --- a/src/Umbraco.Core/Actions/ActionRestore.cs +++ b/src/Umbraco.Core/Actions/ActionRestore.cs @@ -1,6 +1,6 @@  -namespace Umbraco.Web.Actions +namespace Umbraco.Cms.Core.Actions { /// /// This action is invoked when the content/media item is to be restored from the recycle bin diff --git a/src/Umbraco.Core/Actions/ActionRights.cs b/src/Umbraco.Core/Actions/ActionRights.cs index dd021d03c0..ed860fe2ea 100644 --- a/src/Umbraco.Core/Actions/ActionRights.cs +++ b/src/Umbraco.Core/Actions/ActionRights.cs @@ -1,6 +1,4 @@ -using Umbraco.Core; - -namespace Umbraco.Web.Actions +namespace Umbraco.Cms.Core.Actions { /// /// This action is invoked when rights are changed on a document diff --git a/src/Umbraco.Core/Actions/ActionRollback.cs b/src/Umbraco.Core/Actions/ActionRollback.cs index 18d9efdb8d..55aac4cab9 100644 --- a/src/Umbraco.Core/Actions/ActionRollback.cs +++ b/src/Umbraco.Core/Actions/ActionRollback.cs @@ -1,6 +1,4 @@ -using Umbraco.Core; - -namespace Umbraco.Web.Actions +namespace Umbraco.Cms.Core.Actions { /// /// This action is invoked when copying a document is being rolled back diff --git a/src/Umbraco.Core/Actions/ActionSort.cs b/src/Umbraco.Core/Actions/ActionSort.cs index 9c463bc18e..e4df6246b7 100644 --- a/src/Umbraco.Core/Actions/ActionSort.cs +++ b/src/Umbraco.Core/Actions/ActionSort.cs @@ -1,8 +1,4 @@ -using Umbraco.Core; -using Umbraco.Core.CodeAnnotations; - - -namespace Umbraco.Web.Actions +namespace Umbraco.Cms.Core.Actions { /// /// This action is invoked when children to a document, media, member is being sorted diff --git a/src/Umbraco.Core/Actions/ActionToPublish.cs b/src/Umbraco.Core/Actions/ActionToPublish.cs index 61475c81f5..9b263b57bf 100644 --- a/src/Umbraco.Core/Actions/ActionToPublish.cs +++ b/src/Umbraco.Core/Actions/ActionToPublish.cs @@ -1,6 +1,4 @@ -using Umbraco.Core; - -namespace Umbraco.Web.Actions +namespace Umbraco.Cms.Core.Actions { /// /// This action is invoked when children to a document is being sent to published (by an editor without publishrights) diff --git a/src/Umbraco.Core/Actions/ActionUnpublish.cs b/src/Umbraco.Core/Actions/ActionUnpublish.cs index f9270d926b..7d70b35937 100644 --- a/src/Umbraco.Core/Actions/ActionUnpublish.cs +++ b/src/Umbraco.Core/Actions/ActionUnpublish.cs @@ -1,8 +1,4 @@ -using Umbraco.Core; -using Umbraco.Core.CodeAnnotations; - - -namespace Umbraco.Web.Actions +namespace Umbraco.Cms.Core.Actions { /// diff --git a/src/Umbraco.Core/Actions/ActionUpdate.cs b/src/Umbraco.Core/Actions/ActionUpdate.cs index 2241c75955..0b77c84bdb 100644 --- a/src/Umbraco.Core/Actions/ActionUpdate.cs +++ b/src/Umbraco.Core/Actions/ActionUpdate.cs @@ -1,6 +1,4 @@ -using Umbraco.Core; - -namespace Umbraco.Web.Actions +namespace Umbraco.Cms.Core.Actions { /// /// This action is invoked when copying a document or media diff --git a/src/Umbraco.Core/Actions/IAction.cs b/src/Umbraco.Core/Actions/IAction.cs index 986ed9b509..8a68b34196 100644 --- a/src/Umbraco.Core/Actions/IAction.cs +++ b/src/Umbraco.Core/Actions/IAction.cs @@ -1,6 +1,6 @@ -using Umbraco.Core.Composing; +using Umbraco.Cms.Core.Composing; -namespace Umbraco.Web.Actions +namespace Umbraco.Cms.Core.Actions { /// /// Defines a back office action that can be permission assigned or subscribed to for notifications diff --git a/src/Umbraco.Core/Attempt.cs b/src/Umbraco.Core/Attempt.cs index d13ec6394c..eddd2c8785 100644 --- a/src/Umbraco.Core/Attempt.cs +++ b/src/Umbraco.Core/Attempt.cs @@ -1,6 +1,6 @@ using System; -namespace Umbraco.Core +namespace Umbraco.Cms.Core { /// /// Provides ways to create attempts. diff --git a/src/Umbraco.Core/AttemptOfTResult.cs b/src/Umbraco.Core/AttemptOfTResult.cs index 79fae017e2..cebabe214b 100644 --- a/src/Umbraco.Core/AttemptOfTResult.cs +++ b/src/Umbraco.Core/AttemptOfTResult.cs @@ -1,6 +1,6 @@ using System; -namespace Umbraco.Core +namespace Umbraco.Cms.Core { /// /// Represents the result of an operation attempt. diff --git a/src/Umbraco.Core/AttemptOfTResultTStatus.cs b/src/Umbraco.Core/AttemptOfTResultTStatus.cs index 8ce21e36c3..1278da86a5 100644 --- a/src/Umbraco.Core/AttemptOfTResultTStatus.cs +++ b/src/Umbraco.Core/AttemptOfTResultTStatus.cs @@ -1,6 +1,6 @@ using System; -namespace Umbraco.Core +namespace Umbraco.Cms.Core { /// /// Represents the result of an operation attempt. diff --git a/src/Umbraco.Core/Cache/AppCacheExtensions.cs b/src/Umbraco.Core/Cache/AppCacheExtensions.cs index cbefb5d5c0..7e6e115fd9 100644 --- a/src/Umbraco.Core/Cache/AppCacheExtensions.cs +++ b/src/Umbraco.Core/Cache/AppCacheExtensions.cs @@ -1,8 +1,9 @@ using System; using System.Collections.Generic; using System.Linq; +using Umbraco.Cms.Core.Cache; -namespace Umbraco.Core.Cache +namespace Umbraco.Extensions { /// /// Extensions for strongly typed access diff --git a/src/Umbraco.Core/Cache/AppCaches.cs b/src/Umbraco.Core/Cache/AppCaches.cs index 2d482756c1..974d8bd6aa 100644 --- a/src/Umbraco.Core/Cache/AppCaches.cs +++ b/src/Umbraco.Core/Cache/AppCaches.cs @@ -1,6 +1,6 @@ using System; -namespace Umbraco.Core.Cache +namespace Umbraco.Cms.Core.Cache { /// /// Represents the application caches. diff --git a/src/Umbraco.Core/Cache/AppPolicedCacheDictionary.cs b/src/Umbraco.Core/Cache/AppPolicedCacheDictionary.cs index fa13ebf088..1be1752b22 100644 --- a/src/Umbraco.Core/Cache/AppPolicedCacheDictionary.cs +++ b/src/Umbraco.Core/Cache/AppPolicedCacheDictionary.cs @@ -1,7 +1,7 @@ using System; using System.Collections.Concurrent; -namespace Umbraco.Core.Cache +namespace Umbraco.Cms.Core.Cache { /// /// Provides a base class for implementing a dictionary of . diff --git a/src/Umbraco.Core/Cache/ApplicationCacheRefresher.cs b/src/Umbraco.Core/Cache/ApplicationCacheRefresher.cs index 751b2194b7..360fd44ba8 100644 --- a/src/Umbraco.Core/Cache/ApplicationCacheRefresher.cs +++ b/src/Umbraco.Core/Cache/ApplicationCacheRefresher.cs @@ -1,7 +1,6 @@ using System; -using Umbraco.Core.Cache; -namespace Umbraco.Web.Cache +namespace Umbraco.Cms.Core.Cache { public sealed class ApplicationCacheRefresher : CacheRefresherBase { diff --git a/src/Umbraco.Core/Cache/CacheKeys.cs b/src/Umbraco.Core/Cache/CacheKeys.cs index ec57d633b9..9f082df104 100644 --- a/src/Umbraco.Core/Cache/CacheKeys.cs +++ b/src/Umbraco.Core/Cache/CacheKeys.cs @@ -1,4 +1,4 @@ -namespace Umbraco.Core.Cache +namespace Umbraco.Cms.Core.Cache { /// /// Constants storing cache keys used in caching diff --git a/src/Umbraco.Core/Cache/CacheRefresherBase.cs b/src/Umbraco.Core/Cache/CacheRefresherBase.cs index bfa16ff3fa..d3a09dbf8f 100644 --- a/src/Umbraco.Core/Cache/CacheRefresherBase.cs +++ b/src/Umbraco.Core/Cache/CacheRefresherBase.cs @@ -1,9 +1,9 @@ using System; -using Umbraco.Core.Events; -using Umbraco.Core.Models.Entities; -using Umbraco.Core.Sync; +using Umbraco.Cms.Core.Events; +using Umbraco.Cms.Core.Models.Entities; +using Umbraco.Cms.Core.Sync; -namespace Umbraco.Core.Cache +namespace Umbraco.Cms.Core.Cache { /// /// A base class for cache refreshers that handles events. diff --git a/src/Umbraco.Core/Cache/CacheRefresherCollection.cs b/src/Umbraco.Core/Cache/CacheRefresherCollection.cs index e0b3cd48fd..2c9007cbe9 100644 --- a/src/Umbraco.Core/Cache/CacheRefresherCollection.cs +++ b/src/Umbraco.Core/Cache/CacheRefresherCollection.cs @@ -1,9 +1,9 @@ using System; using System.Collections.Generic; using System.Linq; -using Umbraco.Core.Composing; +using Umbraco.Cms.Core.Composing; -namespace Umbraco.Core.Cache +namespace Umbraco.Cms.Core.Cache { public class CacheRefresherCollection : BuilderCollectionBase { diff --git a/src/Umbraco.Core/Cache/CacheRefresherCollectionBuilder.cs b/src/Umbraco.Core/Cache/CacheRefresherCollectionBuilder.cs index 8bae755149..34a274a177 100644 --- a/src/Umbraco.Core/Cache/CacheRefresherCollectionBuilder.cs +++ b/src/Umbraco.Core/Cache/CacheRefresherCollectionBuilder.cs @@ -1,6 +1,6 @@ -using Umbraco.Core.Composing; +using Umbraco.Cms.Core.Composing; -namespace Umbraco.Core.Cache +namespace Umbraco.Cms.Core.Cache { public class CacheRefresherCollectionBuilder : LazyCollectionBuilderBase { diff --git a/src/Umbraco.Core/Cache/CacheRefresherEventArgs.cs b/src/Umbraco.Core/Cache/CacheRefresherEventArgs.cs index 7dea4229ab..e1d04a7095 100644 --- a/src/Umbraco.Core/Cache/CacheRefresherEventArgs.cs +++ b/src/Umbraco.Core/Cache/CacheRefresherEventArgs.cs @@ -1,7 +1,7 @@ using System; -using Umbraco.Core.Sync; +using Umbraco.Cms.Core.Sync; -namespace Umbraco.Core.Cache +namespace Umbraco.Cms.Core.Cache { /// /// Event args for cache refresher updates diff --git a/src/Umbraco.Core/Cache/ContentCacheRefresher.cs b/src/Umbraco.Core/Cache/ContentCacheRefresher.cs index 6e04a06b95..e77fa7abef 100644 --- a/src/Umbraco.Core/Cache/ContentCacheRefresher.cs +++ b/src/Umbraco.Core/Cache/ContentCacheRefresher.cs @@ -1,16 +1,15 @@ using System; using System.Collections.Generic; using System.Linq; -using Umbraco.Core; -using Umbraco.Core.Cache; -using Umbraco.Core.Models; -using Umbraco.Core.Persistence.Repositories.Implement; -using Umbraco.Core.Serialization; -using Umbraco.Core.Services; -using Umbraco.Core.Services.Changes; -using Umbraco.Web.PublishedCache; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Core.Persistence.Repositories; +using Umbraco.Cms.Core.PublishedCache; +using Umbraco.Cms.Core.Serialization; +using Umbraco.Cms.Core.Services; +using Umbraco.Cms.Core.Services.Changes; +using Umbraco.Extensions; -namespace Umbraco.Web.Cache +namespace Umbraco.Cms.Core.Cache { public sealed class ContentCacheRefresher : PayloadCacheRefresherBase { diff --git a/src/Umbraco.Core/Cache/ContentTypeCacheRefresher.cs b/src/Umbraco.Core/Cache/ContentTypeCacheRefresher.cs index 8681f2626e..8a1ba1234e 100644 --- a/src/Umbraco.Core/Cache/ContentTypeCacheRefresher.cs +++ b/src/Umbraco.Core/Cache/ContentTypeCacheRefresher.cs @@ -1,16 +1,15 @@ using System; using System.Linq; -using Umbraco.Core; -using Umbraco.Core.Cache; -using Umbraco.Core.Models; -using Umbraco.Core.Models.PublishedContent; -using Umbraco.Core.Persistence.Repositories; -using Umbraco.Core.Serialization; -using Umbraco.Core.Services; -using Umbraco.Core.Services.Changes; -using Umbraco.Web.PublishedCache; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Core.Models.PublishedContent; +using Umbraco.Cms.Core.Persistence.Repositories; +using Umbraco.Cms.Core.PublishedCache; +using Umbraco.Cms.Core.Serialization; +using Umbraco.Cms.Core.Services; +using Umbraco.Cms.Core.Services.Changes; +using Umbraco.Extensions; -namespace Umbraco.Web.Cache +namespace Umbraco.Cms.Core.Cache { public sealed class ContentTypeCacheRefresher : PayloadCacheRefresherBase { diff --git a/src/Umbraco.Core/Cache/DataTypeCacheRefresher.cs b/src/Umbraco.Core/Cache/DataTypeCacheRefresher.cs index 7455722ef7..d5e11e17d3 100644 --- a/src/Umbraco.Core/Cache/DataTypeCacheRefresher.cs +++ b/src/Umbraco.Core/Cache/DataTypeCacheRefresher.cs @@ -1,15 +1,13 @@ using System; -using Umbraco.Core; -using Umbraco.Core.Cache; -using Umbraco.Core.Models; -using Umbraco.Core.Models.PublishedContent; -using Umbraco.Core.PropertyEditors.ValueConverters; -using Umbraco.Core.Serialization; -using Umbraco.Core.Services; -using Umbraco.Web.PublishedCache; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Core.Models.PublishedContent; +using Umbraco.Cms.Core.PropertyEditors.ValueConverters; +using Umbraco.Cms.Core.PublishedCache; +using Umbraco.Cms.Core.Serialization; +using Umbraco.Cms.Core.Services; +using Umbraco.Extensions; - -namespace Umbraco.Web.Cache +namespace Umbraco.Cms.Core.Cache { public sealed class DataTypeCacheRefresher : PayloadCacheRefresherBase { diff --git a/src/Umbraco.Core/Cache/DeepCloneAppCache.cs b/src/Umbraco.Core/Cache/DeepCloneAppCache.cs index e70b40160e..451af437b2 100644 --- a/src/Umbraco.Core/Cache/DeepCloneAppCache.cs +++ b/src/Umbraco.Core/Cache/DeepCloneAppCache.cs @@ -1,10 +1,10 @@ using System; using System.Collections.Generic; using System.Linq; -using Umbraco.Core.Models; -using Umbraco.Core.Models.Entities; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Core.Models.Entities; -namespace Umbraco.Core.Cache +namespace Umbraco.Cms.Core.Cache { /// /// Implements by wrapping an inner other diff --git a/src/Umbraco.Core/Cache/DictionaryAppCache.cs b/src/Umbraco.Core/Cache/DictionaryAppCache.cs index 04ee3e0afa..8857da0187 100644 --- a/src/Umbraco.Core/Cache/DictionaryAppCache.cs +++ b/src/Umbraco.Core/Cache/DictionaryAppCache.cs @@ -3,8 +3,9 @@ using System.Collections; using System.Collections.Concurrent; using System.Collections.Generic; using System.Text.RegularExpressions; +using Umbraco.Extensions; -namespace Umbraco.Core.Cache +namespace Umbraco.Cms.Core.Cache { /// /// Implements on top of a concurrent dictionary. diff --git a/src/Umbraco.Core/Cache/DictionaryCacheRefresher.cs b/src/Umbraco.Core/Cache/DictionaryCacheRefresher.cs index 525b4d2157..922afab8da 100644 --- a/src/Umbraco.Core/Cache/DictionaryCacheRefresher.cs +++ b/src/Umbraco.Core/Cache/DictionaryCacheRefresher.cs @@ -1,8 +1,7 @@ using System; -using Umbraco.Core.Cache; -using Umbraco.Core.Models; +using Umbraco.Cms.Core.Models; -namespace Umbraco.Web.Cache +namespace Umbraco.Cms.Core.Cache { public sealed class DictionaryCacheRefresher : CacheRefresherBase { diff --git a/src/Umbraco.Core/Cache/DistributedCache.cs b/src/Umbraco.Core/Cache/DistributedCache.cs index 7ad9f9569f..bfd1162bc4 100644 --- a/src/Umbraco.Core/Cache/DistributedCache.cs +++ b/src/Umbraco.Core/Cache/DistributedCache.cs @@ -1,11 +1,9 @@ using System; using System.Collections.Generic; using System.Linq; -using Umbraco.Core; -using Umbraco.Core.Cache; -using Umbraco.Core.Sync; +using Umbraco.Cms.Core.Sync; -namespace Umbraco.Web.Cache +namespace Umbraco.Cms.Core.Cache { /// /// Represents the entry point into Umbraco's distributed cache infrastructure. diff --git a/src/Umbraco.Core/Cache/DomainCacheRefresher.cs b/src/Umbraco.Core/Cache/DomainCacheRefresher.cs index 7958728765..2773ca2d0f 100644 --- a/src/Umbraco.Core/Cache/DomainCacheRefresher.cs +++ b/src/Umbraco.Core/Cache/DomainCacheRefresher.cs @@ -1,11 +1,10 @@ using System; -using Umbraco.Core.Cache; -using Umbraco.Core.Models; -using Umbraco.Core.Serialization; -using Umbraco.Core.Services.Changes; -using Umbraco.Web.PublishedCache; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Core.PublishedCache; +using Umbraco.Cms.Core.Serialization; +using Umbraco.Cms.Core.Services.Changes; -namespace Umbraco.Web.Cache +namespace Umbraco.Cms.Core.Cache { public sealed class DomainCacheRefresher : PayloadCacheRefresherBase { diff --git a/src/Umbraco.Core/Cache/FastDictionaryAppCache.cs b/src/Umbraco.Core/Cache/FastDictionaryAppCache.cs index 54009af465..ddd9f96c73 100644 --- a/src/Umbraco.Core/Cache/FastDictionaryAppCache.cs +++ b/src/Umbraco.Core/Cache/FastDictionaryAppCache.cs @@ -3,9 +3,9 @@ using System.Collections.Concurrent; using System.Collections.Generic; using System.Linq; using System.Text.RegularExpressions; -using Umbraco.Core.Composing; +using Umbraco.Extensions; -namespace Umbraco.Core.Cache +namespace Umbraco.Cms.Core.Cache { /// /// Implements a fast on top of a concurrent dictionary. diff --git a/src/Umbraco.Core/Cache/FastDictionaryAppCacheBase.cs b/src/Umbraco.Core/Cache/FastDictionaryAppCacheBase.cs index 4b8098e19d..7ebbcc8b63 100644 --- a/src/Umbraco.Core/Cache/FastDictionaryAppCacheBase.cs +++ b/src/Umbraco.Core/Cache/FastDictionaryAppCacheBase.cs @@ -1,11 +1,10 @@ using System; -using System.Collections; using System.Collections.Generic; using System.Linq; using System.Text.RegularExpressions; -using Umbraco.Core.Composing; +using Umbraco.Extensions; -namespace Umbraco.Core.Cache +namespace Umbraco.Cms.Core.Cache { /// /// Provides a base class to fast, dictionary-based implementations. diff --git a/src/Umbraco.Core/Cache/GenericDictionaryRequestAppCache.cs b/src/Umbraco.Core/Cache/GenericDictionaryRequestAppCache.cs index 31914eb5b0..17558a78d4 100644 --- a/src/Umbraco.Core/Cache/GenericDictionaryRequestAppCache.cs +++ b/src/Umbraco.Core/Cache/GenericDictionaryRequestAppCache.cs @@ -3,9 +3,8 @@ using System.Collections; using System.Collections.Generic; using System.Linq; using System.Threading; -using Umbraco.Core.Composing; -namespace Umbraco.Core.Cache +namespace Umbraco.Cms.Core.Cache { /// /// Implements a fast on top of HttpContext.Items. diff --git a/src/Umbraco.Core/Cache/HttpRequestAppCache.cs b/src/Umbraco.Core/Cache/HttpRequestAppCache.cs index 00d427c965..2e053c3486 100644 --- a/src/Umbraco.Core/Cache/HttpRequestAppCache.cs +++ b/src/Umbraco.Core/Cache/HttpRequestAppCache.cs @@ -4,7 +4,7 @@ using System.Collections.Generic; using System.Linq; using System.Threading; -namespace Umbraco.Core.Cache +namespace Umbraco.Cms.Core.Cache { /// /// Implements a fast on top of HttpContext.Items. diff --git a/src/Umbraco.Core/Cache/IAppCache.cs b/src/Umbraco.Core/Cache/IAppCache.cs index c84ec1135c..9b9b03af35 100644 --- a/src/Umbraco.Core/Cache/IAppCache.cs +++ b/src/Umbraco.Core/Cache/IAppCache.cs @@ -1,7 +1,7 @@ using System; using System.Collections.Generic; -namespace Umbraco.Core.Cache +namespace Umbraco.Cms.Core.Cache { /// /// Defines an application cache. diff --git a/src/Umbraco.Core/Cache/IAppPolicyCache.cs b/src/Umbraco.Core/Cache/IAppPolicyCache.cs index 9746e80804..a345ca1333 100644 --- a/src/Umbraco.Core/Cache/IAppPolicyCache.cs +++ b/src/Umbraco.Core/Cache/IAppPolicyCache.cs @@ -1,6 +1,6 @@ using System; -namespace Umbraco.Core.Cache +namespace Umbraco.Cms.Core.Cache { /// /// Defines an application cache that support cache policies. diff --git a/src/Umbraco.Core/Cache/ICacheRefresher.cs b/src/Umbraco.Core/Cache/ICacheRefresher.cs index 257d1da05a..97a3bf08eb 100644 --- a/src/Umbraco.Core/Cache/ICacheRefresher.cs +++ b/src/Umbraco.Core/Cache/ICacheRefresher.cs @@ -1,7 +1,7 @@ using System; -using Umbraco.Core.Composing; +using Umbraco.Cms.Core.Composing; -namespace Umbraco.Core.Cache +namespace Umbraco.Cms.Core.Cache { /// /// The IcacheRefresher Interface is used for load balancing. diff --git a/src/Umbraco.Core/Cache/IDistributedCacheBinder.cs b/src/Umbraco.Core/Cache/IDistributedCacheBinder.cs index cb83799f85..405e72ba06 100644 --- a/src/Umbraco.Core/Cache/IDistributedCacheBinder.cs +++ b/src/Umbraco.Core/Cache/IDistributedCacheBinder.cs @@ -1,7 +1,7 @@ using System.Collections.Generic; -using Umbraco.Core.Events; +using Umbraco.Cms.Core.Events; -namespace Umbraco.Web.Cache +namespace Umbraco.Cms.Core.Cache { /// /// Binds events to the distributed cache. diff --git a/src/Umbraco.Core/Cache/IJsonCacheRefresher.cs b/src/Umbraco.Core/Cache/IJsonCacheRefresher.cs index 005d3c5101..619fc1eb56 100644 --- a/src/Umbraco.Core/Cache/IJsonCacheRefresher.cs +++ b/src/Umbraco.Core/Cache/IJsonCacheRefresher.cs @@ -1,4 +1,4 @@ -namespace Umbraco.Core.Cache +namespace Umbraco.Cms.Core.Cache { /// /// A cache refresher that supports refreshing or removing cache based on a custom Json payload diff --git a/src/Umbraco.Core/Cache/IPayloadCacheRefresher.cs b/src/Umbraco.Core/Cache/IPayloadCacheRefresher.cs index a30245a239..21dfdd840d 100644 --- a/src/Umbraco.Core/Cache/IPayloadCacheRefresher.cs +++ b/src/Umbraco.Core/Cache/IPayloadCacheRefresher.cs @@ -1,4 +1,4 @@ -namespace Umbraco.Core.Cache +namespace Umbraco.Cms.Core.Cache { /// /// A cache refresher that supports refreshing cache based on a custom payload diff --git a/src/Umbraco.Core/Cache/IRepositoryCachePolicy.cs b/src/Umbraco.Core/Cache/IRepositoryCachePolicy.cs index a31e715383..dff547c1ce 100644 --- a/src/Umbraco.Core/Cache/IRepositoryCachePolicy.cs +++ b/src/Umbraco.Core/Cache/IRepositoryCachePolicy.cs @@ -1,9 +1,8 @@ using System; using System.Collections.Generic; -using Umbraco.Core.Models.Entities; -using Umbraco.Core.Scoping; +using Umbraco.Cms.Core.Models.Entities; -namespace Umbraco.Core.Cache +namespace Umbraco.Cms.Core.Cache { public interface IRepositoryCachePolicy where TEntity : class, IEntity diff --git a/src/Umbraco.Core/Cache/IRequestCache.cs b/src/Umbraco.Core/Cache/IRequestCache.cs index 7ed7f8251c..1da08019c0 100644 --- a/src/Umbraco.Core/Cache/IRequestCache.cs +++ b/src/Umbraco.Core/Cache/IRequestCache.cs @@ -1,6 +1,6 @@ using System.Collections.Generic; -namespace Umbraco.Core.Cache +namespace Umbraco.Cms.Core.Cache { public interface IRequestCache : IAppCache, IEnumerable> { diff --git a/src/Umbraco.Core/Cache/IsolatedCaches.cs b/src/Umbraco.Core/Cache/IsolatedCaches.cs index f070fe8b55..6d197489ca 100644 --- a/src/Umbraco.Core/Cache/IsolatedCaches.cs +++ b/src/Umbraco.Core/Cache/IsolatedCaches.cs @@ -1,6 +1,6 @@ using System; -namespace Umbraco.Core.Cache +namespace Umbraco.Cms.Core.Cache { /// /// Represents a dictionary of for types. diff --git a/src/Umbraco.Core/Cache/JsonCacheRefresherBase.cs b/src/Umbraco.Core/Cache/JsonCacheRefresherBase.cs index 6826aab6ad..3e70bc54eb 100644 --- a/src/Umbraco.Core/Cache/JsonCacheRefresherBase.cs +++ b/src/Umbraco.Core/Cache/JsonCacheRefresherBase.cs @@ -1,7 +1,7 @@ -using Umbraco.Core.Serialization; -using Umbraco.Core.Sync; +using Umbraco.Cms.Core.Serialization; +using Umbraco.Cms.Core.Sync; -namespace Umbraco.Core.Cache +namespace Umbraco.Cms.Core.Cache { /// /// A base class for "json" cache refreshers. diff --git a/src/Umbraco.Core/Cache/LanguageCacheRefresher.cs b/src/Umbraco.Core/Cache/LanguageCacheRefresher.cs index b66e35f843..b15d247ddf 100644 --- a/src/Umbraco.Core/Cache/LanguageCacheRefresher.cs +++ b/src/Umbraco.Core/Cache/LanguageCacheRefresher.cs @@ -1,14 +1,11 @@ using System; -using System.Linq; -using Umbraco.Core.Cache; -using Umbraco.Core.Models; -using Umbraco.Core.Serialization; -using Umbraco.Core.Services; -using Umbraco.Core.Services.Changes; -using Umbraco.Web.PublishedCache; -using static Umbraco.Web.Cache.LanguageCacheRefresher.JsonPayload; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Core.PublishedCache; +using Umbraco.Cms.Core.Serialization; +using Umbraco.Cms.Core.Services.Changes; +using static Umbraco.Cms.Core.Cache.LanguageCacheRefresher.JsonPayload; -namespace Umbraco.Web.Cache +namespace Umbraco.Cms.Core.Cache { public sealed class LanguageCacheRefresher : PayloadCacheRefresherBase { diff --git a/src/Umbraco.Core/Cache/MacroCacheRefresher.cs b/src/Umbraco.Core/Cache/MacroCacheRefresher.cs index 009e9f38d0..dd4c4c73de 100644 --- a/src/Umbraco.Core/Cache/MacroCacheRefresher.cs +++ b/src/Umbraco.Core/Cache/MacroCacheRefresher.cs @@ -1,11 +1,10 @@ using System; -using Umbraco.Core.Cache; -using Umbraco.Core.Models; using System.Linq; -using Umbraco.Core.Persistence.Repositories.Implement; -using Umbraco.Core.Serialization; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Core.Persistence.Repositories; +using Umbraco.Cms.Core.Serialization; -namespace Umbraco.Web.Cache +namespace Umbraco.Cms.Core.Cache { public sealed class MacroCacheRefresher : PayloadCacheRefresherBase { diff --git a/src/Umbraco.Core/Cache/MediaCacheRefresher.cs b/src/Umbraco.Core/Cache/MediaCacheRefresher.cs index 9e62ed61fe..997083b0a7 100644 --- a/src/Umbraco.Core/Cache/MediaCacheRefresher.cs +++ b/src/Umbraco.Core/Cache/MediaCacheRefresher.cs @@ -1,14 +1,13 @@ using System; -using Umbraco.Core; -using Umbraco.Core.Cache; -using Umbraco.Core.Models; -using Umbraco.Core.Persistence.Repositories.Implement; -using Umbraco.Core.Serialization; -using Umbraco.Core.Services; -using Umbraco.Core.Services.Changes; -using Umbraco.Web.PublishedCache; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Core.Persistence.Repositories; +using Umbraco.Cms.Core.PublishedCache; +using Umbraco.Cms.Core.Serialization; +using Umbraco.Cms.Core.Services; +using Umbraco.Cms.Core.Services.Changes; +using Umbraco.Extensions; -namespace Umbraco.Web.Cache +namespace Umbraco.Cms.Core.Cache { public sealed class MediaCacheRefresher : PayloadCacheRefresherBase { diff --git a/src/Umbraco.Core/Cache/MemberCacheRefresher.cs b/src/Umbraco.Core/Cache/MemberCacheRefresher.cs index a9a648acff..9fd2ed8fda 100644 --- a/src/Umbraco.Core/Cache/MemberCacheRefresher.cs +++ b/src/Umbraco.Core/Cache/MemberCacheRefresher.cs @@ -1,24 +1,22 @@ //using Newtonsoft.Json; -using System; -using Umbraco.Core; -using Umbraco.Core.Cache; -using Umbraco.Core.Models; -using Umbraco.Core.Persistence.Repositories.Implement; -using Umbraco.Core.Serialization; -using Umbraco.Core.Services; -namespace Umbraco.Web.Cache +using System; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Core.Persistence.Repositories; +using Umbraco.Cms.Core.Serialization; +using Umbraco.Cms.Core.Services; +using Umbraco.Extensions; + +namespace Umbraco.Cms.Core.Cache { public sealed class MemberCacheRefresher : PayloadCacheRefresherBase { private readonly IIdKeyMap _idKeyMap; - private readonly LegacyMemberCacheRefresher _legacyMemberRefresher; public MemberCacheRefresher(AppCaches appCaches, IJsonSerializer serializer, IIdKeyMap idKeyMap) : base(appCaches, serializer) { _idKeyMap = idKeyMap; - _legacyMemberRefresher = new LegacyMemberCacheRefresher(this, appCaches); } public class JsonPayload @@ -66,12 +64,6 @@ namespace Umbraco.Web.Cache base.Remove(id); } - [Obsolete("This is no longer used and will be removed from the codebase in the future")] - public void Refresh(IMember instance) => _legacyMemberRefresher.Refresh(instance); - - [Obsolete("This is no longer used and will be removed from the codebase in the future")] - public void Remove(IMember instance) => _legacyMemberRefresher.Remove(instance); - private void ClearCache(params JsonPayload[] payloads) { AppCaches.ClearPartialViewCache(); @@ -99,38 +91,5 @@ namespace Umbraco.Web.Cache } #endregion - - #region Backwards Compat - - // TODO: this is here purely for backwards compat but should be removed in netcore - private class LegacyMemberCacheRefresher : TypedCacheRefresherBase - { - private readonly MemberCacheRefresher _parent; - - public LegacyMemberCacheRefresher(MemberCacheRefresher parent, AppCaches appCaches) : base(appCaches) - { - _parent = parent; - } - - public override Guid RefresherUniqueId => _parent.RefresherUniqueId; - - public override string Name => _parent.Name; - - protected override MemberCacheRefresher This => _parent; - - public override void Refresh(IMember instance) - { - _parent.ClearCache(new JsonPayload(instance.Id, instance.Username)); - base.Refresh(instance.Id); - } - - public override void Remove(IMember instance) - { - _parent.ClearCache(new JsonPayload(instance.Id, instance.Username)); - base.Remove(instance); - } - } - - #endregion } } diff --git a/src/Umbraco.Core/Cache/MemberGroupCacheRefresher.cs b/src/Umbraco.Core/Cache/MemberGroupCacheRefresher.cs index 213ca11302..2db947d026 100644 --- a/src/Umbraco.Core/Cache/MemberGroupCacheRefresher.cs +++ b/src/Umbraco.Core/Cache/MemberGroupCacheRefresher.cs @@ -1,10 +1,8 @@ using System; -using System.Linq; -using Umbraco.Core.Cache; -using Umbraco.Core.Models; -using Umbraco.Core.Serialization; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Core.Serialization; -namespace Umbraco.Web.Cache +namespace Umbraco.Cms.Core.Cache { public sealed class MemberGroupCacheRefresher : PayloadCacheRefresherBase { diff --git a/src/Umbraco.Core/Cache/NoAppCache.cs b/src/Umbraco.Core/Cache/NoAppCache.cs index cae3a7381e..475e67b94a 100644 --- a/src/Umbraco.Core/Cache/NoAppCache.cs +++ b/src/Umbraco.Core/Cache/NoAppCache.cs @@ -3,7 +3,7 @@ using System.Collections; using System.Collections.Generic; using System.Linq; -namespace Umbraco.Core.Cache +namespace Umbraco.Cms.Core.Cache { /// /// Implements and do not cache. diff --git a/src/Umbraco.Core/Cache/NoCacheRepositoryCachePolicy.cs b/src/Umbraco.Core/Cache/NoCacheRepositoryCachePolicy.cs index 20b57c49ff..48aab0a5ee 100644 --- a/src/Umbraco.Core/Cache/NoCacheRepositoryCachePolicy.cs +++ b/src/Umbraco.Core/Cache/NoCacheRepositoryCachePolicy.cs @@ -1,9 +1,9 @@ using System; using System.Collections.Generic; using System.Linq; -using Umbraco.Core.Models.Entities; +using Umbraco.Cms.Core.Models.Entities; -namespace Umbraco.Core.Cache +namespace Umbraco.Cms.Core.Cache { public class NoCacheRepositoryCachePolicy : IRepositoryCachePolicy where TEntity : class, IEntity diff --git a/src/Umbraco.Core/Cache/ObjectCacheAppCache.cs b/src/Umbraco.Core/Cache/ObjectCacheAppCache.cs index dc9163affb..7096d077a2 100644 --- a/src/Umbraco.Core/Cache/ObjectCacheAppCache.cs +++ b/src/Umbraco.Core/Cache/ObjectCacheAppCache.cs @@ -4,9 +4,9 @@ using System.Linq; using System.Runtime.Caching; using System.Text.RegularExpressions; using System.Threading; -using Umbraco.Core.Composing; +using Umbraco.Extensions; -namespace Umbraco.Core.Cache +namespace Umbraco.Cms.Core.Cache { /// /// Implements on top of a . diff --git a/src/Umbraco.Core/Cache/PayloadCacheRefresherBase.cs b/src/Umbraco.Core/Cache/PayloadCacheRefresherBase.cs index 7d3fd417d4..08d3e65506 100644 --- a/src/Umbraco.Core/Cache/PayloadCacheRefresherBase.cs +++ b/src/Umbraco.Core/Cache/PayloadCacheRefresherBase.cs @@ -1,8 +1,7 @@ -using System; -using Umbraco.Core.Serialization; -using Umbraco.Core.Sync; +using Umbraco.Cms.Core.Serialization; +using Umbraco.Cms.Core.Sync; -namespace Umbraco.Core.Cache +namespace Umbraco.Cms.Core.Cache { /// /// A base class for "payload" class refreshers. diff --git a/src/Umbraco.Core/Cache/PublicAccessCacheRefresher.cs b/src/Umbraco.Core/Cache/PublicAccessCacheRefresher.cs index 59c8231ed2..19064a8031 100644 --- a/src/Umbraco.Core/Cache/PublicAccessCacheRefresher.cs +++ b/src/Umbraco.Core/Cache/PublicAccessCacheRefresher.cs @@ -1,8 +1,7 @@ using System; -using Umbraco.Core.Cache; -using Umbraco.Core.Models; +using Umbraco.Cms.Core.Models; -namespace Umbraco.Web.Cache +namespace Umbraco.Cms.Core.Cache { public sealed class PublicAccessCacheRefresher : CacheRefresherBase { diff --git a/src/Umbraco.Core/Cache/RelationTypeCacheRefresher.cs b/src/Umbraco.Core/Cache/RelationTypeCacheRefresher.cs index c9c8b47bbf..daa954b257 100644 --- a/src/Umbraco.Core/Cache/RelationTypeCacheRefresher.cs +++ b/src/Umbraco.Core/Cache/RelationTypeCacheRefresher.cs @@ -1,10 +1,8 @@ using System; -using Umbraco.Core.Cache; -using Umbraco.Core.Models; -using Umbraco.Core.Persistence.Repositories; -using Umbraco.Core.Persistence.Repositories.Implement; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Core.Persistence.Repositories; -namespace Umbraco.Web.Cache +namespace Umbraco.Cms.Core.Cache { public sealed class RelationTypeCacheRefresher : CacheRefresherBase { diff --git a/src/Umbraco.Core/Cache/RepositoryCachePolicyOptions.cs b/src/Umbraco.Core/Cache/RepositoryCachePolicyOptions.cs index 06095f058d..94c3380bfd 100644 --- a/src/Umbraco.Core/Cache/RepositoryCachePolicyOptions.cs +++ b/src/Umbraco.Core/Cache/RepositoryCachePolicyOptions.cs @@ -1,6 +1,6 @@ using System; -namespace Umbraco.Core.Cache +namespace Umbraco.Cms.Core.Cache { /// /// Specifies how a repository cache policy should cache entities. diff --git a/src/Umbraco.Core/Cache/SafeLazy.cs b/src/Umbraco.Core/Cache/SafeLazy.cs index d901a534c6..9f2ad8f114 100644 --- a/src/Umbraco.Core/Cache/SafeLazy.cs +++ b/src/Umbraco.Core/Cache/SafeLazy.cs @@ -1,7 +1,7 @@ using System; using System.Runtime.ExceptionServices; -namespace Umbraco.Core.Cache +namespace Umbraco.Cms.Core.Cache { public static class SafeLazy { diff --git a/src/Umbraco.Core/Cache/TemplateCacheRefresher.cs b/src/Umbraco.Core/Cache/TemplateCacheRefresher.cs index 27e727f73a..d02d3190eb 100644 --- a/src/Umbraco.Core/Cache/TemplateCacheRefresher.cs +++ b/src/Umbraco.Core/Cache/TemplateCacheRefresher.cs @@ -1,10 +1,9 @@ using System; -using Umbraco.Core.Cache; -using Umbraco.Core.Models; -using Umbraco.Core.Persistence.Repositories; -using Umbraco.Core.Services; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Core.Persistence.Repositories; +using Umbraco.Cms.Core.Services; -namespace Umbraco.Web.Cache +namespace Umbraco.Cms.Core.Cache { public sealed class TemplateCacheRefresher : CacheRefresherBase { diff --git a/src/Umbraco.Core/Cache/TypedCacheRefresherBase.cs b/src/Umbraco.Core/Cache/TypedCacheRefresherBase.cs deleted file mode 100644 index 0b5a04b571..0000000000 --- a/src/Umbraco.Core/Cache/TypedCacheRefresherBase.cs +++ /dev/null @@ -1,36 +0,0 @@ -using Umbraco.Core.Sync; - -namespace Umbraco.Core.Cache -{ - /// - /// A base class for "typed" cache refreshers. - /// - /// The actual cache refresher type. - /// The entity type. - /// The actual cache refresher type is used for strongly typed events. - public abstract class TypedCacheRefresherBase : CacheRefresherBase, ICacheRefresher - where TInstanceType : class, ICacheRefresher - { - /// - /// Initializes a new instance of the . - /// - /// A cache helper. - protected TypedCacheRefresherBase(AppCaches appCaches) - : base(appCaches) - { } - - #region Refresher - - public virtual void Refresh(TEntityType instance) - { - OnCacheUpdated(This, new CacheRefresherEventArgs(instance, MessageType.RefreshByInstance)); - } - - public virtual void Remove(TEntityType instance) - { - OnCacheUpdated(This, new CacheRefresherEventArgs(instance, MessageType.RemoveByInstance)); - } - - #endregion - } -} diff --git a/src/Umbraco.Core/Cache/UserCacheRefresher.cs b/src/Umbraco.Core/Cache/UserCacheRefresher.cs index 922a9df385..0e8b749e50 100644 --- a/src/Umbraco.Core/Cache/UserCacheRefresher.cs +++ b/src/Umbraco.Core/Cache/UserCacheRefresher.cs @@ -1,10 +1,8 @@ using System; -using Umbraco.Core.Cache; -using Umbraco.Core.Models.Membership; -using Umbraco.Core.Persistence.Repositories; -using Umbraco.Core.Persistence.Repositories.Implement; +using Umbraco.Cms.Core.Models.Membership; +using Umbraco.Cms.Core.Persistence.Repositories; -namespace Umbraco.Web.Cache +namespace Umbraco.Cms.Core.Cache { public sealed class UserCacheRefresher : CacheRefresherBase { diff --git a/src/Umbraco.Core/Cache/UserGroupCacheRefresher.cs b/src/Umbraco.Core/Cache/UserGroupCacheRefresher.cs index 3fd34abfcd..7519994069 100644 --- a/src/Umbraco.Core/Cache/UserGroupCacheRefresher.cs +++ b/src/Umbraco.Core/Cache/UserGroupCacheRefresher.cs @@ -1,10 +1,8 @@ using System; -using Umbraco.Core.Cache; -using Umbraco.Core.Models.Membership; -using Umbraco.Core.Persistence.Repositories; -using Umbraco.Core.Persistence.Repositories.Implement; +using Umbraco.Cms.Core.Models.Membership; +using Umbraco.Cms.Core.Persistence.Repositories; -namespace Umbraco.Web.Cache +namespace Umbraco.Cms.Core.Cache { /// /// Handles User group cache invalidation/refreshing diff --git a/src/Umbraco.Core/ClaimsIdentityExtensions.cs b/src/Umbraco.Core/ClaimsIdentityExtensions.cs deleted file mode 100644 index 2827f859b7..0000000000 --- a/src/Umbraco.Core/ClaimsIdentityExtensions.cs +++ /dev/null @@ -1,73 +0,0 @@ -using System; -using System.Security.Claims; -using System.Security.Principal; - -namespace Umbraco.Core -{ - public static class ClaimsIdentityExtensions - { - public static T GetUserId(this IIdentity identity) - { - var strId = identity.GetUserId(); - var converted = strId.TryConvertTo(); - return converted.ResultOr(default); - } - - /// - /// Returns the user id from the of either the claim type or "sub" - /// - /// - /// - /// The string value of the user id if found otherwise null - /// - public static string GetUserId(this IIdentity identity) - { - if (identity == null) throw new ArgumentNullException(nameof(identity)); - - string userId = null; - if (identity is ClaimsIdentity claimsIdentity) - { - userId = claimsIdentity.FindFirstValue(ClaimTypes.NameIdentifier) - ?? claimsIdentity.FindFirstValue("sub"); - } - - return userId; - } - - /// - /// Returns the user name from the of either the claim type or "preferred_username" - /// - /// - /// - /// The string value of the user name if found otherwise null - /// - public static string GetUserName(this IIdentity identity) - { - if (identity == null) throw new ArgumentNullException(nameof(identity)); - - string username = null; - if (identity is ClaimsIdentity claimsIdentity) - { - username = claimsIdentity.FindFirstValue(ClaimTypes.Name) - ?? claimsIdentity.FindFirstValue("preferred_username"); - } - - return username; - } - - /// - /// Returns the first claim value found in the for the given claimType - /// - /// - /// - /// - /// The string value of the claim if found otherwise null - /// - public static string FindFirstValue(this ClaimsIdentity identity, string claimType) - { - if (identity == null) throw new ArgumentNullException(nameof(identity)); - - return identity.FindFirst(claimType)?.Value; - } - } -} diff --git a/src/Umbraco.Core/CodeAnnotations/FriendlyNameAttribute.cs b/src/Umbraco.Core/CodeAnnotations/FriendlyNameAttribute.cs index 218891c635..f6ee121742 100644 --- a/src/Umbraco.Core/CodeAnnotations/FriendlyNameAttribute.cs +++ b/src/Umbraco.Core/CodeAnnotations/FriendlyNameAttribute.cs @@ -1,6 +1,6 @@ using System; -namespace Umbraco.Core.CodeAnnotations +namespace Umbraco.Cms.Core.CodeAnnotations { /// /// Attribute to add a Friendly Name string with an UmbracoObjectType enum value diff --git a/src/Umbraco.Core/CodeAnnotations/UmbracoObjectTypeAttribute.cs b/src/Umbraco.Core/CodeAnnotations/UmbracoObjectTypeAttribute.cs index e4fe2cd504..126567de02 100644 --- a/src/Umbraco.Core/CodeAnnotations/UmbracoObjectTypeAttribute.cs +++ b/src/Umbraco.Core/CodeAnnotations/UmbracoObjectTypeAttribute.cs @@ -1,6 +1,6 @@ using System; -namespace Umbraco.Core.CodeAnnotations +namespace Umbraco.Cms.Core.CodeAnnotations { /// /// Attribute to associate a GUID string and Type with an UmbracoObjectType Enum value diff --git a/src/Umbraco.Core/CodeAnnotations/UmbracoUdiTypeAttribute.cs b/src/Umbraco.Core/CodeAnnotations/UmbracoUdiTypeAttribute.cs index 72af1d9a70..5f889daa5c 100644 --- a/src/Umbraco.Core/CodeAnnotations/UmbracoUdiTypeAttribute.cs +++ b/src/Umbraco.Core/CodeAnnotations/UmbracoUdiTypeAttribute.cs @@ -1,6 +1,6 @@ using System; -namespace Umbraco.Core.CodeAnnotations +namespace Umbraco.Cms.Core.CodeAnnotations { [AttributeUsage(AttributeTargets.Field, AllowMultiple = false, Inherited = false)] public class UmbracoUdiTypeAttribute : Attribute diff --git a/src/Umbraco.Core/Collections/CompositeIntStringKey.cs b/src/Umbraco.Core/Collections/CompositeIntStringKey.cs index cafc209e08..542a6337bd 100644 --- a/src/Umbraco.Core/Collections/CompositeIntStringKey.cs +++ b/src/Umbraco.Core/Collections/CompositeIntStringKey.cs @@ -1,6 +1,6 @@ using System; -namespace Umbraco.Core.Collections +namespace Umbraco.Cms.Core.Collections { /// /// Represents a composite key of (int, string) for fast dictionaries. diff --git a/src/Umbraco.Core/Collections/CompositeNStringNStringKey.cs b/src/Umbraco.Core/Collections/CompositeNStringNStringKey.cs index a06696f6c6..f247f3b76b 100644 --- a/src/Umbraco.Core/Collections/CompositeNStringNStringKey.cs +++ b/src/Umbraco.Core/Collections/CompositeNStringNStringKey.cs @@ -1,6 +1,6 @@ using System; -namespace Umbraco.Core.Collections +namespace Umbraco.Cms.Core.Collections { /// /// Represents a composite key of (string, string) for fast dictionaries. @@ -38,4 +38,4 @@ namespace Umbraco.Core.Collections public static bool operator !=(CompositeNStringNStringKey key1, CompositeNStringNStringKey key2) => key1._key2 != key2._key2 || key1._key1 != key2._key1; } -} \ No newline at end of file +} diff --git a/src/Umbraco.Core/Collections/CompositeStringStringKey.cs b/src/Umbraco.Core/Collections/CompositeStringStringKey.cs index c053b08a22..652717cfdb 100644 --- a/src/Umbraco.Core/Collections/CompositeStringStringKey.cs +++ b/src/Umbraco.Core/Collections/CompositeStringStringKey.cs @@ -1,6 +1,6 @@ using System; -namespace Umbraco.Core.Collections +namespace Umbraco.Cms.Core.Collections { /// /// Represents a composite key of (string, string) for fast dictionaries. diff --git a/src/Umbraco.Core/Collections/CompositeTypeTypeKey.cs b/src/Umbraco.Core/Collections/CompositeTypeTypeKey.cs index e08e3305d2..321f12c592 100644 --- a/src/Umbraco.Core/Collections/CompositeTypeTypeKey.cs +++ b/src/Umbraco.Core/Collections/CompositeTypeTypeKey.cs @@ -1,6 +1,6 @@ using System; -namespace Umbraco.Core.Collections +namespace Umbraco.Cms.Core.Collections { /// /// Represents a composite key of (Type, Type) for fast dictionaries. diff --git a/src/Umbraco.Core/Collections/ConcurrentHashSet.cs b/src/Umbraco.Core/Collections/ConcurrentHashSet.cs index c4dba51acd..4cbce05f4c 100644 --- a/src/Umbraco.Core/Collections/ConcurrentHashSet.cs +++ b/src/Umbraco.Core/Collections/ConcurrentHashSet.cs @@ -4,7 +4,7 @@ using System.Collections.Generic; using System.Linq; using System.Threading; -namespace Umbraco.Core.Collections +namespace Umbraco.Cms.Core.Collections { /// /// A thread-safe representation of a . diff --git a/src/Umbraco.Core/Collections/DeepCloneableList.cs b/src/Umbraco.Core/Collections/DeepCloneableList.cs index b682e20358..ecd17aab46 100644 --- a/src/Umbraco.Core/Collections/DeepCloneableList.cs +++ b/src/Umbraco.Core/Collections/DeepCloneableList.cs @@ -2,10 +2,10 @@ using System.Collections.Generic; using System.ComponentModel; using System.Linq; -using Umbraco.Core.Models; -using Umbraco.Core.Models.Entities; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Core.Models.Entities; -namespace Umbraco.Core.Collections +namespace Umbraco.Cms.Core.Collections { /// /// A List that can be deep cloned with deep cloned elements and can reset the collection's items dirty flags @@ -153,7 +153,7 @@ namespace Umbraco.Core.Collections return Enumerable.Empty(); } - public event PropertyChangedEventHandler PropertyChanged; // noop + public event PropertyChangedEventHandler PropertyChanged; // noop #endregion } } diff --git a/src/Umbraco.Core/Collections/EventClearingObservableCollection.cs b/src/Umbraco.Core/Collections/EventClearingObservableCollection.cs index af25cc1b4a..df98fa5220 100644 --- a/src/Umbraco.Core/Collections/EventClearingObservableCollection.cs +++ b/src/Umbraco.Core/Collections/EventClearingObservableCollection.cs @@ -2,7 +2,7 @@ using System.Collections.ObjectModel; using System.Collections.Specialized; -namespace Umbraco.Core.Collections +namespace Umbraco.Cms.Core.Collections { /// /// Allows clearing all event handlers diff --git a/src/Umbraco.Core/Collections/ListCloneBehavior.cs b/src/Umbraco.Core/Collections/ListCloneBehavior.cs index 539afca21a..148141f783 100644 --- a/src/Umbraco.Core/Collections/ListCloneBehavior.cs +++ b/src/Umbraco.Core/Collections/ListCloneBehavior.cs @@ -1,4 +1,4 @@ -namespace Umbraco.Core.Collections +namespace Umbraco.Cms.Core.Collections { public enum ListCloneBehavior { diff --git a/src/Umbraco.Core/Collections/ObservableDictionary.cs b/src/Umbraco.Core/Collections/ObservableDictionary.cs index fd9e469f07..a3c705e151 100644 --- a/src/Umbraco.Core/Collections/ObservableDictionary.cs +++ b/src/Umbraco.Core/Collections/ObservableDictionary.cs @@ -2,11 +2,9 @@ using System.Collections.Generic; using System.Collections.ObjectModel; using System.Collections.Specialized; -using System.ComponentModel; using System.Linq; -using System.Runtime.Serialization; -namespace Umbraco.Core.Collections +namespace Umbraco.Cms.Core.Collections { /// diff --git a/src/Umbraco.Core/Collections/OrderedHashSet.cs b/src/Umbraco.Core/Collections/OrderedHashSet.cs index 52b37bc7f9..51ae2fea22 100644 --- a/src/Umbraco.Core/Collections/OrderedHashSet.cs +++ b/src/Umbraco.Core/Collections/OrderedHashSet.cs @@ -1,6 +1,6 @@ using System.Collections.ObjectModel; -namespace Umbraco.Core.Collections +namespace Umbraco.Cms.Core.Collections { /// /// A custom collection similar to HashSet{T} which only contains unique items, however this collection keeps items in order diff --git a/src/Umbraco.Core/Collections/TopoGraph.cs b/src/Umbraco.Core/Collections/TopoGraph.cs index 955a210465..12b0d431ea 100644 --- a/src/Umbraco.Core/Collections/TopoGraph.cs +++ b/src/Umbraco.Core/Collections/TopoGraph.cs @@ -1,7 +1,7 @@ using System; using System.Collections.Generic; -namespace Umbraco.Core.Collections +namespace Umbraco.Cms.Core.Collections { public class TopoGraph { diff --git a/src/Umbraco.Core/Collections/TypeList.cs b/src/Umbraco.Core/Collections/TypeList.cs index 43df5f1af4..96565a843c 100644 --- a/src/Umbraco.Core/Collections/TypeList.cs +++ b/src/Umbraco.Core/Collections/TypeList.cs @@ -1,7 +1,7 @@ using System; using System.Collections.Generic; -namespace Umbraco.Core.Collections +namespace Umbraco.Cms.Core.Collections { /// /// Represents a list of types. diff --git a/src/Umbraco.Core/Composing/BuilderCollectionBase.cs b/src/Umbraco.Core/Composing/BuilderCollectionBase.cs index 484a9b930f..a5bf33f9c1 100644 --- a/src/Umbraco.Core/Composing/BuilderCollectionBase.cs +++ b/src/Umbraco.Core/Composing/BuilderCollectionBase.cs @@ -2,7 +2,7 @@ using System.Collections.Generic; using System.Linq; -namespace Umbraco.Core.Composing +namespace Umbraco.Cms.Core.Composing { /// /// Provides a base class for builder collections. diff --git a/src/Umbraco.Core/Composing/CollectionBuilderBase.cs b/src/Umbraco.Core/Composing/CollectionBuilderBase.cs index 14089ba924..ab33a6ebef 100644 --- a/src/Umbraco.Core/Composing/CollectionBuilderBase.cs +++ b/src/Umbraco.Core/Composing/CollectionBuilderBase.cs @@ -2,9 +2,9 @@ using System; using System.Collections.Generic; using System.Linq; using Microsoft.Extensions.DependencyInjection; -using Umbraco.Core.DependencyInjection; +using Umbraco.Extensions; -namespace Umbraco.Core.Composing +namespace Umbraco.Cms.Core.Composing { /// /// Provides a base class for collection builders. diff --git a/src/Umbraco.Core/Composing/ComponentCollection.cs b/src/Umbraco.Core/Composing/ComponentCollection.cs index 509962599c..1cd505027b 100644 --- a/src/Umbraco.Core/Composing/ComponentCollection.cs +++ b/src/Umbraco.Core/Composing/ComponentCollection.cs @@ -2,9 +2,10 @@ using System.Collections.Generic; using System.Linq; using Microsoft.Extensions.Logging; -using Umbraco.Core.Logging; +using Umbraco.Cms.Core.Logging; +using Umbraco.Extensions; -namespace Umbraco.Core.Composing +namespace Umbraco.Cms.Core.Composing { /// /// Represents the collection of implementations. diff --git a/src/Umbraco.Core/Composing/ComponentCollectionBuilder.cs b/src/Umbraco.Core/Composing/ComponentCollectionBuilder.cs index 903e2199e7..1e21de0304 100644 --- a/src/Umbraco.Core/Composing/ComponentCollectionBuilder.cs +++ b/src/Umbraco.Core/Composing/ComponentCollectionBuilder.cs @@ -1,9 +1,9 @@ using System; using System.Collections.Generic; using Microsoft.Extensions.DependencyInjection; -using Umbraco.Core.Logging; +using Umbraco.Cms.Core.Logging; -namespace Umbraco.Core.Composing +namespace Umbraco.Cms.Core.Composing { /// /// Builds a . diff --git a/src/Umbraco.Core/Composing/ComponentComposer.cs b/src/Umbraco.Core/Composing/ComponentComposer.cs index fca0161d05..00bfb0b00f 100644 --- a/src/Umbraco.Core/Composing/ComponentComposer.cs +++ b/src/Umbraco.Core/Composing/ComponentComposer.cs @@ -1,6 +1,6 @@ -using Umbraco.Core.DependencyInjection; +using Umbraco.Cms.Core.DependencyInjection; -namespace Umbraco.Core.Composing +namespace Umbraco.Cms.Core.Composing { /// /// Provides a base class for composers which compose a component. diff --git a/src/Umbraco.Core/Composing/ComposeAfterAttribute.cs b/src/Umbraco.Core/Composing/ComposeAfterAttribute.cs index 95c39c7094..c12ddbcd3e 100644 --- a/src/Umbraco.Core/Composing/ComposeAfterAttribute.cs +++ b/src/Umbraco.Core/Composing/ComposeAfterAttribute.cs @@ -1,6 +1,6 @@ using System; -namespace Umbraco.Core.Composing +namespace Umbraco.Cms.Core.Composing { /// /// Indicates that a composer requires another composer. diff --git a/src/Umbraco.Core/Composing/ComposeBeforeAttribute.cs b/src/Umbraco.Core/Composing/ComposeBeforeAttribute.cs index f88445b0e7..382772de8d 100644 --- a/src/Umbraco.Core/Composing/ComposeBeforeAttribute.cs +++ b/src/Umbraco.Core/Composing/ComposeBeforeAttribute.cs @@ -1,6 +1,6 @@ using System; -namespace Umbraco.Core.Composing +namespace Umbraco.Cms.Core.Composing { /// /// Indicates that a component is required by another composer. diff --git a/src/Umbraco.Core/Composing/Composers.cs b/src/Umbraco.Core/Composing/Composers.cs index 91c8244324..2250d022d5 100644 --- a/src/Umbraco.Core/Composing/Composers.cs +++ b/src/Umbraco.Core/Composing/Composers.cs @@ -3,12 +3,11 @@ using System.Collections.Generic; using System.Linq; using System.Reflection; using System.Text; -using Umbraco.Core.Collections; -using Umbraco.Core.Logging; using Microsoft.Extensions.Logging; -using Umbraco.Core.DependencyInjection; +using Umbraco.Cms.Core.Collections; +using Umbraco.Cms.Core.DependencyInjection; -namespace Umbraco.Core.Composing +namespace Umbraco.Cms.Core.Composing { // note: this class is NOT thread-safe in any ways diff --git a/src/Umbraco.Core/Composing/CompositionExtensions.cs b/src/Umbraco.Core/Composing/CompositionExtensions.cs index d7b143df38..74f30b81b6 100644 --- a/src/Umbraco.Core/Composing/CompositionExtensions.cs +++ b/src/Umbraco.Core/Composing/CompositionExtensions.cs @@ -1,9 +1,8 @@ using System; -using Umbraco.Core.DependencyInjection; -using Umbraco.Core.Composing; -using Umbraco.Web.PublishedCache; +using Umbraco.Cms.Core.DependencyInjection; +using Umbraco.Cms.Core.PublishedCache; -namespace Umbraco.Infrastructure.PublishedCache +namespace Umbraco.Extensions { public static class CompositionExtensions { diff --git a/src/Umbraco.Core/Composing/DefaultUmbracoAssemblyProvider.cs b/src/Umbraco.Core/Composing/DefaultUmbracoAssemblyProvider.cs index 3e0ea9c971..516f26774a 100644 --- a/src/Umbraco.Core/Composing/DefaultUmbracoAssemblyProvider.cs +++ b/src/Umbraco.Core/Composing/DefaultUmbracoAssemblyProvider.cs @@ -1,8 +1,9 @@ -using System; +using System; using System.Collections.Generic; using System.Reflection; +using Microsoft.Extensions.Logging; -namespace Umbraco.Core.Composing +namespace Umbraco.Cms.Core.Composing { /// /// Returns a list of scannable assemblies based on an entry point assembly and it's references @@ -14,21 +15,22 @@ namespace Umbraco.Core.Composing public class DefaultUmbracoAssemblyProvider : IAssemblyProvider { private readonly Assembly _entryPointAssembly; + private readonly ILoggerFactory _loggerFactory; private static readonly string[] UmbracoCoreAssemblyNames = new[] { "Umbraco.Core", "Umbraco.Infrastructure", "Umbraco.PublishedCache.NuCache", - "Umbraco.ModelsBuilder.Embedded", "Umbraco.Examine.Lucene", "Umbraco.Web.Common", "Umbraco.Web.BackOffice", "Umbraco.Web.Website", }; - public DefaultUmbracoAssemblyProvider(Assembly entryPointAssembly) + public DefaultUmbracoAssemblyProvider(Assembly entryPointAssembly, ILoggerFactory loggerFactory) { _entryPointAssembly = entryPointAssembly ?? throw new ArgumentNullException(nameof(entryPointAssembly)); + _loggerFactory = loggerFactory; } // TODO: It would be worth investigating a netcore3 version of this which would use @@ -41,7 +43,7 @@ namespace Umbraco.Core.Composing { get { - var finder = new FindAssembliesWithReferencesTo(new[] { _entryPointAssembly }, UmbracoCoreAssemblyNames, true); + var finder = new FindAssembliesWithReferencesTo(new[] { _entryPointAssembly }, UmbracoCoreAssemblyNames, true, _loggerFactory); return finder.Find(); } } diff --git a/src/Umbraco.Core/Composing/DisableAttribute.cs b/src/Umbraco.Core/Composing/DisableAttribute.cs index e826f1c472..b3cfe59f11 100644 --- a/src/Umbraco.Core/Composing/DisableAttribute.cs +++ b/src/Umbraco.Core/Composing/DisableAttribute.cs @@ -1,7 +1,7 @@ using System; using System.Reflection; -namespace Umbraco.Core.Composing +namespace Umbraco.Cms.Core.Composing { /// /// Indicates that a composer should be disabled. diff --git a/src/Umbraco.Core/Composing/DisableComposerAttribute.cs b/src/Umbraco.Core/Composing/DisableComposerAttribute.cs index 7adc5673ec..59b36178cf 100644 --- a/src/Umbraco.Core/Composing/DisableComposerAttribute.cs +++ b/src/Umbraco.Core/Composing/DisableComposerAttribute.cs @@ -1,6 +1,6 @@ using System; -namespace Umbraco.Core.Composing +namespace Umbraco.Cms.Core.Composing { /// /// Indicates that a composer should be disabled. diff --git a/src/Umbraco.Core/Composing/EnableAttribute.cs b/src/Umbraco.Core/Composing/EnableAttribute.cs index 276a04cbec..91fdd9e7e5 100644 --- a/src/Umbraco.Core/Composing/EnableAttribute.cs +++ b/src/Umbraco.Core/Composing/EnableAttribute.cs @@ -1,6 +1,6 @@ using System; -namespace Umbraco.Core.Composing +namespace Umbraco.Cms.Core.Composing { /// /// Indicates that a composer should be enabled. diff --git a/src/Umbraco.Core/Composing/EnableComposerAttribute.cs b/src/Umbraco.Core/Composing/EnableComposerAttribute.cs index a1bc0a8123..048a19a80f 100644 --- a/src/Umbraco.Core/Composing/EnableComposerAttribute.cs +++ b/src/Umbraco.Core/Composing/EnableComposerAttribute.cs @@ -1,6 +1,6 @@ using System; -namespace Umbraco.Core.Composing +namespace Umbraco.Cms.Core.Composing { /// /// Indicates that a composer should be enabled. diff --git a/src/Umbraco.Core/Composing/FindAssembliesWithReferencesTo.cs b/src/Umbraco.Core/Composing/FindAssembliesWithReferencesTo.cs index 9378941166..5b554a5321 100644 --- a/src/Umbraco.Core/Composing/FindAssembliesWithReferencesTo.cs +++ b/src/Umbraco.Core/Composing/FindAssembliesWithReferencesTo.cs @@ -1,10 +1,10 @@ -using System; -using System.Collections.Generic; +using System.Collections.Generic; using System.IO; using System.Linq; using System.Reflection; +using Microsoft.Extensions.Logging; -namespace Umbraco.Core.Composing +namespace Umbraco.Cms.Core.Composing { /// /// Finds Assemblies from the entry point assemblies, it's dependencies and it's transitive dependencies that reference that targetAssemblyNames @@ -17,6 +17,7 @@ namespace Umbraco.Core.Composing private readonly Assembly[] _referenceAssemblies; private readonly string[] _targetAssemblies; private readonly bool _includeTargets; + private readonly ILoggerFactory _loggerFactory; /// /// Constructor @@ -24,11 +25,13 @@ namespace Umbraco.Core.Composing /// Entry point assemblies /// Used to check if the entry point or it's transitive assemblies reference these assembly names /// If true will also use the target assembly names as entry point assemblies - public FindAssembliesWithReferencesTo(Assembly[] referenceAssemblies, string[] targetAssemblyNames, bool includeTargets) + /// Logger factory for when scanning goes wrong + public FindAssembliesWithReferencesTo(Assembly[] referenceAssemblies, string[] targetAssemblyNames, bool includeTargets, ILoggerFactory loggerFactory) { _referenceAssemblies = referenceAssemblies; _targetAssemblies = targetAssemblyNames; _includeTargets = includeTargets; + _loggerFactory = loggerFactory; } public IEnumerable Find() @@ -54,7 +57,7 @@ namespace Umbraco.Core.Composing } } - var provider = new ReferenceResolver(_targetAssemblies, referenceItems); + var provider = new ReferenceResolver(_targetAssemblies, referenceItems, _loggerFactory.CreateLogger()); var assemblyNames = provider.ResolveAssemblies(); return assemblyNames.ToList(); } diff --git a/src/Umbraco.Core/Composing/HideFromTypeFinderAttribute.cs b/src/Umbraco.Core/Composing/HideFromTypeFinderAttribute.cs index 54c846b944..b985a79494 100644 --- a/src/Umbraco.Core/Composing/HideFromTypeFinderAttribute.cs +++ b/src/Umbraco.Core/Composing/HideFromTypeFinderAttribute.cs @@ -1,6 +1,6 @@ using System; -namespace Umbraco.Core.Composing +namespace Umbraco.Cms.Core.Composing { /// /// Notifies the TypeFinder that it should ignore the class marked with this attribute. diff --git a/src/Umbraco.Core/Composing/IAssemblyProvider.cs b/src/Umbraco.Core/Composing/IAssemblyProvider.cs index bde97a9556..fdc942ae24 100644 --- a/src/Umbraco.Core/Composing/IAssemblyProvider.cs +++ b/src/Umbraco.Core/Composing/IAssemblyProvider.cs @@ -1,7 +1,7 @@ using System.Collections.Generic; using System.Reflection; -namespace Umbraco.Core.Composing +namespace Umbraco.Cms.Core.Composing { /// /// Provides a list of assemblies that can be scanned diff --git a/src/Umbraco.Core/Composing/IBuilderCollection.cs b/src/Umbraco.Core/Composing/IBuilderCollection.cs index 3ce729392d..5e78cf0c2f 100644 --- a/src/Umbraco.Core/Composing/IBuilderCollection.cs +++ b/src/Umbraco.Core/Composing/IBuilderCollection.cs @@ -1,6 +1,6 @@ using System.Collections.Generic; -namespace Umbraco.Core.Composing +namespace Umbraco.Cms.Core.Composing { /// /// Represents a builder collection, ie an immutable enumeration of items. diff --git a/src/Umbraco.Core/Composing/ICollectionBuilder.cs b/src/Umbraco.Core/Composing/ICollectionBuilder.cs index a48d06d2dd..ea09558cad 100644 --- a/src/Umbraco.Core/Composing/ICollectionBuilder.cs +++ b/src/Umbraco.Core/Composing/ICollectionBuilder.cs @@ -1,7 +1,7 @@ using System; using Microsoft.Extensions.DependencyInjection; -namespace Umbraco.Core.Composing +namespace Umbraco.Cms.Core.Composing { /// /// Represents a collection builder. diff --git a/src/Umbraco.Core/Composing/IComponent.cs b/src/Umbraco.Core/Composing/IComponent.cs index dcd0365b12..8e9cf815e8 100644 --- a/src/Umbraco.Core/Composing/IComponent.cs +++ b/src/Umbraco.Core/Composing/IComponent.cs @@ -1,4 +1,4 @@ -namespace Umbraco.Core.Composing +namespace Umbraco.Cms.Core.Composing { /// /// Represents a component. diff --git a/src/Umbraco.Core/Composing/IComposer.cs b/src/Umbraco.Core/Composing/IComposer.cs index d67bb71461..6f1978ee3e 100644 --- a/src/Umbraco.Core/Composing/IComposer.cs +++ b/src/Umbraco.Core/Composing/IComposer.cs @@ -1,6 +1,6 @@ -using Umbraco.Core.DependencyInjection; +using Umbraco.Cms.Core.DependencyInjection; -namespace Umbraco.Core.Composing +namespace Umbraco.Cms.Core.Composing { /// /// Represents a composer. diff --git a/src/Umbraco.Core/Composing/ICoreComposer.cs b/src/Umbraco.Core/Composing/ICoreComposer.cs index 1e9e5fced5..24daae75b1 100644 --- a/src/Umbraco.Core/Composing/ICoreComposer.cs +++ b/src/Umbraco.Core/Composing/ICoreComposer.cs @@ -1,4 +1,4 @@ -namespace Umbraco.Core.Composing +namespace Umbraco.Cms.Core.Composing { /// /// Represents a core . diff --git a/src/Umbraco.Core/Composing/IDiscoverable.cs b/src/Umbraco.Core/Composing/IDiscoverable.cs index c7bbb57a14..153fde36b6 100644 --- a/src/Umbraco.Core/Composing/IDiscoverable.cs +++ b/src/Umbraco.Core/Composing/IDiscoverable.cs @@ -1,4 +1,4 @@ -namespace Umbraco.Core.Composing +namespace Umbraco.Cms.Core.Composing { public interface IDiscoverable { } diff --git a/src/Umbraco.Core/Composing/IRuntimeHash.cs b/src/Umbraco.Core/Composing/IRuntimeHash.cs index c2fb829cc6..b19b22a7e9 100644 --- a/src/Umbraco.Core/Composing/IRuntimeHash.cs +++ b/src/Umbraco.Core/Composing/IRuntimeHash.cs @@ -1,4 +1,4 @@ -namespace Umbraco.Core.Composing +namespace Umbraco.Cms.Core.Composing { /// /// Used to create a hash value of the current runtime diff --git a/src/Umbraco.Core/Composing/ITypeFinder.cs b/src/Umbraco.Core/Composing/ITypeFinder.cs index 7ed6084074..2cf6ca23f7 100644 --- a/src/Umbraco.Core/Composing/ITypeFinder.cs +++ b/src/Umbraco.Core/Composing/ITypeFinder.cs @@ -2,7 +2,7 @@ using System.Collections.Generic; using System.Reflection; -namespace Umbraco.Core.Composing +namespace Umbraco.Cms.Core.Composing { /// /// Used to find objects by implemented types, names and/or attributes diff --git a/src/Umbraco.Core/Composing/IUserComposer.cs b/src/Umbraco.Core/Composing/IUserComposer.cs index 96f6b38189..52ed4fdf5c 100644 --- a/src/Umbraco.Core/Composing/IUserComposer.cs +++ b/src/Umbraco.Core/Composing/IUserComposer.cs @@ -1,4 +1,4 @@ -namespace Umbraco.Core.Composing +namespace Umbraco.Cms.Core.Composing { /// /// Represents a user . diff --git a/src/Umbraco.Core/Composing/LazyCollectionBuilderBase.cs b/src/Umbraco.Core/Composing/LazyCollectionBuilderBase.cs index 46b06daf7d..d8721b0d19 100644 --- a/src/Umbraco.Core/Composing/LazyCollectionBuilderBase.cs +++ b/src/Umbraco.Core/Composing/LazyCollectionBuilderBase.cs @@ -2,7 +2,7 @@ using System.Collections.Generic; using System.Linq; -namespace Umbraco.Core.Composing +namespace Umbraco.Cms.Core.Composing { /// /// Implements a lazy collection builder. diff --git a/src/Umbraco.Core/Composing/LazyResolve.cs b/src/Umbraco.Core/Composing/LazyResolve.cs index 5a60b54d87..afa22f74b6 100644 --- a/src/Umbraco.Core/Composing/LazyResolve.cs +++ b/src/Umbraco.Core/Composing/LazyResolve.cs @@ -1,7 +1,7 @@ using System; using Microsoft.Extensions.DependencyInjection; -namespace Umbraco.Core.Composing +namespace Umbraco.Cms.Core.Composing { public class LazyResolve : Lazy where T : class diff --git a/src/Umbraco.Core/Composing/OrderedCollectionBuilderBase.cs b/src/Umbraco.Core/Composing/OrderedCollectionBuilderBase.cs index 2bd4c0d434..939561f557 100644 --- a/src/Umbraco.Core/Composing/OrderedCollectionBuilderBase.cs +++ b/src/Umbraco.Core/Composing/OrderedCollectionBuilderBase.cs @@ -1,7 +1,7 @@ using System; using System.Collections.Generic; -namespace Umbraco.Core.Composing +namespace Umbraco.Cms.Core.Composing { /// /// Implements an ordered collection builder. diff --git a/src/Umbraco.Core/Composing/ReferenceResolver.cs b/src/Umbraco.Core/Composing/ReferenceResolver.cs index 8c110dbeea..6ecd425ac1 100644 --- a/src/Umbraco.Core/Composing/ReferenceResolver.cs +++ b/src/Umbraco.Core/Composing/ReferenceResolver.cs @@ -4,8 +4,10 @@ using System.Diagnostics; using System.IO; using System.Linq; using System.Reflection; +using System.Security; +using Microsoft.Extensions.Logging; -namespace Umbraco.Core.Composing +namespace Umbraco.Cms.Core.Composing { /// /// Resolves assemblies that reference one of the specified "targetAssemblies" either directly or transitively. @@ -19,11 +21,12 @@ namespace Umbraco.Core.Composing private readonly IReadOnlyList _assemblies; private readonly Dictionary _classifications; private readonly List _lookup = new List(); - - public ReferenceResolver(IReadOnlyList targetAssemblies, IReadOnlyList entryPointAssemblies) + private readonly ILogger _logger; + public ReferenceResolver(IReadOnlyList targetAssemblies, IReadOnlyList entryPointAssemblies, ILogger logger) { _umbracoAssemblies = new HashSet(targetAssemblies, StringComparer.Ordinal); _assemblies = entryPointAssemblies; + _logger = logger; _classifications = new Dictionary(); foreach (var item in entryPointAssemblies) @@ -54,19 +57,39 @@ namespace Umbraco.Core.Composing { foreach(var dll in Directory.EnumerateFiles(dir, "*.dll")) { - var assemblyName = AssemblyName.GetAssemblyName(dll); + AssemblyName assemblyName = null; + try + { + assemblyName = AssemblyName.GetAssemblyName(dll); + } + catch (BadImageFormatException e) + { + _logger.LogDebug(e, "Could not load {dll} for type scanning, skipping", dll); + } + catch (SecurityException e) + { + _logger.LogError(e, "Could not access {dll} for type scanning due to a security problem", dll); + } + catch (Exception e) + { + _logger.LogInformation(e, "Error: could not load {dll} for type scanning", dll); + } - // don't include if this is excluded - if (TypeFinder.KnownAssemblyExclusionFilter.Any(f => assemblyName.FullName.StartsWith(f, StringComparison.InvariantCultureIgnoreCase))) - continue; + if (assemblyName != null) + { + // don't include if this is excluded + if (TypeFinder.KnownAssemblyExclusionFilter.Any(f => + assemblyName.FullName.StartsWith(f, StringComparison.InvariantCultureIgnoreCase))) + continue; - // don't include this item if it's Umbraco - // TODO: We should maybe pass an explicit list of these names in? - if (assemblyName.FullName.StartsWith("Umbraco.") || assemblyName.Name.EndsWith(".Views")) - continue; + // don't include this item if it's Umbraco + // TODO: We should maybe pass an explicit list of these names in? + if (assemblyName.FullName.StartsWith("Umbraco.") || assemblyName.Name.EndsWith(".Views")) + continue; - var assembly = Assembly.Load(assemblyName); - assemblies.Add(assembly); + var assembly = Assembly.Load(assemblyName); + assemblies.Add(assembly); + } } } diff --git a/src/Umbraco.Core/Composing/RuntimeHash.cs b/src/Umbraco.Core/Composing/RuntimeHash.cs index 16665384c6..ae13b49915 100644 --- a/src/Umbraco.Core/Composing/RuntimeHash.cs +++ b/src/Umbraco.Core/Composing/RuntimeHash.cs @@ -1,9 +1,9 @@ using System.Collections.Generic; using System.IO; using System.Linq; -using Umbraco.Core.Logging; +using Umbraco.Cms.Core.Logging; -namespace Umbraco.Core.Composing +namespace Umbraco.Cms.Core.Composing { /// /// Determines the runtime hash based on file system paths to scan diff --git a/src/Umbraco.Core/Composing/RuntimeHashPaths.cs b/src/Umbraco.Core/Composing/RuntimeHashPaths.cs index c5a994c9a6..12a878ee94 100644 --- a/src/Umbraco.Core/Composing/RuntimeHashPaths.cs +++ b/src/Umbraco.Core/Composing/RuntimeHashPaths.cs @@ -1,7 +1,7 @@ using System.Collections.Generic; using System.IO; -namespace Umbraco.Core.Composing +namespace Umbraco.Cms.Core.Composing { /// /// Paths used to determine the diff --git a/src/Umbraco.Core/Composing/SetCollectionBuilderBase.cs b/src/Umbraco.Core/Composing/SetCollectionBuilderBase.cs index 9261423bbc..358aab75dd 100644 --- a/src/Umbraco.Core/Composing/SetCollectionBuilderBase.cs +++ b/src/Umbraco.Core/Composing/SetCollectionBuilderBase.cs @@ -1,7 +1,7 @@ using System; using System.Collections.Generic; -namespace Umbraco.Core.Composing +namespace Umbraco.Cms.Core.Composing { /// /// Implements an un-ordered collection builder. diff --git a/src/Umbraco.Core/Composing/TypeCollectionBuilderBase.cs b/src/Umbraco.Core/Composing/TypeCollectionBuilderBase.cs index 9229a95cc3..0bebf8bf8b 100644 --- a/src/Umbraco.Core/Composing/TypeCollectionBuilderBase.cs +++ b/src/Umbraco.Core/Composing/TypeCollectionBuilderBase.cs @@ -1,9 +1,9 @@ using System; using System.Collections.Generic; using Microsoft.Extensions.DependencyInjection; -using Umbraco.Core.DependencyInjection; +using Umbraco.Extensions; -namespace Umbraco.Core.Composing +namespace Umbraco.Cms.Core.Composing { /// /// Provides a base class for collections of types. diff --git a/src/Umbraco.Core/Composing/TypeFinder.cs b/src/Umbraco.Core/Composing/TypeFinder.cs index 4cfcd9090c..4ec46bbda0 100644 --- a/src/Umbraco.Core/Composing/TypeFinder.cs +++ b/src/Umbraco.Core/Composing/TypeFinder.cs @@ -5,10 +5,11 @@ using System.Linq; using System.Reflection; using System.Security; using System.Text; -using Umbraco.Core.Configuration.UmbracoSettings; using Microsoft.Extensions.Logging; +using Umbraco.Cms.Core.Configuration.UmbracoSettings; +using Umbraco.Extensions; -namespace Umbraco.Core.Composing +namespace Umbraco.Cms.Core.Composing { /// diff --git a/src/Umbraco.Core/Composing/TypeFinderConfig.cs b/src/Umbraco.Core/Composing/TypeFinderConfig.cs index ef862fd49d..7940773231 100644 --- a/src/Umbraco.Core/Composing/TypeFinderConfig.cs +++ b/src/Umbraco.Core/Composing/TypeFinderConfig.cs @@ -2,10 +2,10 @@ using System.Collections.Generic; using System.Linq; using Microsoft.Extensions.Options; -using Umbraco.Core.Configuration.Models; -using Umbraco.Core.Configuration.UmbracoSettings; +using Umbraco.Cms.Core.Configuration.Models; +using Umbraco.Cms.Core.Configuration.UmbracoSettings; -namespace Umbraco.Core.Composing +namespace Umbraco.Cms.Core.Composing { /// /// TypeFinder config via appSettings diff --git a/src/Umbraco.Core/Composing/TypeFinderExtensions.cs b/src/Umbraco.Core/Composing/TypeFinderExtensions.cs index e364790556..cad92aa17b 100644 --- a/src/Umbraco.Core/Composing/TypeFinderExtensions.cs +++ b/src/Umbraco.Core/Composing/TypeFinderExtensions.cs @@ -1,8 +1,9 @@ using System; using System.Collections.Generic; using System.Reflection; +using Umbraco.Cms.Core.Composing; -namespace Umbraco.Core.Composing +namespace Umbraco.Extensions { public static class TypeFinderExtensions { diff --git a/src/Umbraco.Core/Composing/TypeHelper.cs b/src/Umbraco.Core/Composing/TypeHelper.cs index 1987a4059c..d683e313be 100644 --- a/src/Umbraco.Core/Composing/TypeHelper.cs +++ b/src/Umbraco.Core/Composing/TypeHelper.cs @@ -5,10 +5,11 @@ using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; using System.Reflection; +using Umbraco.Extensions; -namespace Umbraco.Core.Composing +namespace Umbraco.Cms.Core.Composing { - + /// /// A utility class for type checking, this provides internal caching so that calls to these methods will be faster /// than doing a manual type check in c# @@ -19,10 +20,10 @@ namespace Umbraco.Core.Composing = new ConcurrentDictionary, PropertyInfo[]>(); private static readonly ConcurrentDictionary GetFieldsCache = new ConcurrentDictionary(); - + private static readonly Assembly[] EmptyAssemblies = new Assembly[0]; - + /// /// Based on a type we'll check if it is IEnumerable{T} (or similar) and if so we'll return a List{T}, this will also deal with array types and return List{T} for those too. diff --git a/src/Umbraco.Core/Composing/TypeLoader.cs b/src/Umbraco.Core/Composing/TypeLoader.cs index c7bac236a6..759647482f 100644 --- a/src/Umbraco.Core/Composing/TypeLoader.cs +++ b/src/Umbraco.Core/Composing/TypeLoader.cs @@ -6,14 +6,14 @@ using System.Reflection; using System.Runtime.Serialization; using System.Text; using System.Threading; -using Umbraco.Core.Cache; -using Umbraco.Core.Collections; -using Umbraco.Core.IO; -using Umbraco.Core.Logging; -using File = System.IO.File; using Microsoft.Extensions.Logging; +using Umbraco.Cms.Core.Cache; +using Umbraco.Cms.Core.Collections; +using Umbraco.Cms.Core.Logging; +using Umbraco.Extensions; +using File = System.IO.File; -namespace Umbraco.Core.Composing +namespace Umbraco.Cms.Core.Composing { /// /// Provides methods to find and instantiate types. diff --git a/src/Umbraco.Core/Composing/VaryingRuntimeHash.cs b/src/Umbraco.Core/Composing/VaryingRuntimeHash.cs index 034af3b80c..eec2adc637 100644 --- a/src/Umbraco.Core/Composing/VaryingRuntimeHash.cs +++ b/src/Umbraco.Core/Composing/VaryingRuntimeHash.cs @@ -1,6 +1,6 @@ using System; -namespace Umbraco.Core.Composing +namespace Umbraco.Cms.Core.Composing { /// /// A runtime hash this is always different on each app startup diff --git a/src/Umbraco.Core/Composing/WeightAttribute.cs b/src/Umbraco.Core/Composing/WeightAttribute.cs index ec652ba9a3..1225abca0c 100644 --- a/src/Umbraco.Core/Composing/WeightAttribute.cs +++ b/src/Umbraco.Core/Composing/WeightAttribute.cs @@ -1,6 +1,6 @@ using System; -namespace Umbraco.Core.Composing +namespace Umbraco.Cms.Core.Composing { /// /// Specifies the weight of pretty much anything. diff --git a/src/Umbraco.Core/Composing/WeightedCollectionBuilderBase.cs b/src/Umbraco.Core/Composing/WeightedCollectionBuilderBase.cs index 88eb61de76..e15df52039 100644 --- a/src/Umbraco.Core/Composing/WeightedCollectionBuilderBase.cs +++ b/src/Umbraco.Core/Composing/WeightedCollectionBuilderBase.cs @@ -2,7 +2,7 @@ using System.Collections.Generic; using System.Linq; -namespace Umbraco.Core.Composing +namespace Umbraco.Cms.Core.Composing { /// /// Implements a weighted collection builder. diff --git a/src/Umbraco.Core/Configuration/ConfigConnectionString.cs b/src/Umbraco.Core/Configuration/ConfigConnectionString.cs index 72408e212c..dab615da51 100644 --- a/src/Umbraco.Core/Configuration/ConfigConnectionString.cs +++ b/src/Umbraco.Core/Configuration/ConfigConnectionString.cs @@ -1,7 +1,7 @@ using System; using System.Data.Common; -namespace Umbraco.Core.Configuration +namespace Umbraco.Cms.Core.Configuration { public class ConfigConnectionString { @@ -35,7 +35,7 @@ namespace Umbraco.Core.Configuration { if (dataSource.EndsWith(".sdf")) { - return Constants.DbProviderNames.SqlCe; + return Umbraco.Cms.Core.Constants.DbProviderNames.SqlCe; } } @@ -44,17 +44,17 @@ namespace Umbraco.Core.Configuration { if (builder.TryGetValue("Database", out var db) && db is string database && !string.IsNullOrEmpty(database)) { - return Constants.DbProviderNames.SqlServer; + return Umbraco.Cms.Core.Constants.DbProviderNames.SqlServer; } if (builder.TryGetValue("AttachDbFileName", out var a) && a is string attachDbFileName && !string.IsNullOrEmpty(attachDbFileName)) { - return Constants.DbProviderNames.SqlServer; + return Umbraco.Cms.Core.Constants.DbProviderNames.SqlServer; } if (builder.TryGetValue("Initial Catalog", out var i) && i is string initialCatalog && !string.IsNullOrEmpty(initialCatalog)) { - return Constants.DbProviderNames.SqlServer; + return Umbraco.Cms.Core.Constants.DbProviderNames.SqlServer; } } diff --git a/src/Umbraco.Core/Configuration/ContentSettingsExtensions.cs b/src/Umbraco.Core/Configuration/ContentSettingsExtensions.cs index 31f4373fd2..ac4e6b0864 100644 --- a/src/Umbraco.Core/Configuration/ContentSettingsExtensions.cs +++ b/src/Umbraco.Core/Configuration/ContentSettingsExtensions.cs @@ -1,8 +1,7 @@ using System.Linq; -using Umbraco.Core.Configuration.Models; -using Umbraco.Core.Configuration.UmbracoSettings; +using Umbraco.Cms.Core.Configuration.Models; -namespace Umbraco.Core.Configuration +namespace Umbraco.Extensions { public static class ContentSettingsExtensions { diff --git a/src/Umbraco.Core/Configuration/Extensions/HealthCheckSettingsExtensions.cs b/src/Umbraco.Core/Configuration/Extensions/HealthCheckSettingsExtensions.cs index ae842cb040..7655252981 100644 --- a/src/Umbraco.Core/Configuration/Extensions/HealthCheckSettingsExtensions.cs +++ b/src/Umbraco.Core/Configuration/Extensions/HealthCheckSettingsExtensions.cs @@ -1,7 +1,8 @@ using System; -using Umbraco.Core.Configuration.Models; +using Umbraco.Cms.Core.Configuration; +using Umbraco.Cms.Core.Configuration.Models; -namespace Umbraco.Core.Configuration.Extensions +namespace Umbraco.Extensions { public static class HealthCheckSettingsExtensions { diff --git a/src/Umbraco.Core/Configuration/GlobalSettingsExtensions.cs b/src/Umbraco.Core/Configuration/GlobalSettingsExtensions.cs index f9b2362e14..a0fd308490 100644 --- a/src/Umbraco.Core/Configuration/GlobalSettingsExtensions.cs +++ b/src/Umbraco.Core/Configuration/GlobalSettingsExtensions.cs @@ -1,8 +1,8 @@ using System; -using Umbraco.Core.Configuration.Models; -using Umbraco.Core.Hosting; +using Umbraco.Cms.Core.Configuration.Models; +using Umbraco.Cms.Core.Hosting; -namespace Umbraco.Core.Configuration +namespace Umbraco.Extensions { public static class GlobalSettingsExtensions { diff --git a/src/Umbraco.Core/Configuration/Grid/GridConfig.cs b/src/Umbraco.Core/Configuration/Grid/GridConfig.cs index d9816101fd..27d6820399 100644 --- a/src/Umbraco.Core/Configuration/Grid/GridConfig.cs +++ b/src/Umbraco.Core/Configuration/Grid/GridConfig.cs @@ -1,10 +1,10 @@ using Microsoft.Extensions.Logging; -using Umbraco.Core.Cache; -using Umbraco.Core.Hosting; -using Umbraco.Core.Manifest; -using Umbraco.Core.Serialization; +using Umbraco.Cms.Core.Cache; +using Umbraco.Cms.Core.Hosting; +using Umbraco.Cms.Core.Manifest; +using Umbraco.Cms.Core.Serialization; -namespace Umbraco.Core.Configuration.Grid +namespace Umbraco.Cms.Core.Configuration.Grid { public class GridConfig : IGridConfig { diff --git a/src/Umbraco.Core/Configuration/Grid/GridEditorsConfig.cs b/src/Umbraco.Core/Configuration/Grid/GridEditorsConfig.cs index 6ee72f1d04..680c47590e 100644 --- a/src/Umbraco.Core/Configuration/Grid/GridEditorsConfig.cs +++ b/src/Umbraco.Core/Configuration/Grid/GridEditorsConfig.cs @@ -2,13 +2,14 @@ using System.Collections.Generic; using System.IO; using Microsoft.Extensions.Logging; -using Umbraco.Core.Cache; -using Umbraco.Core.Hosting; -using Umbraco.Core.Manifest; -using Umbraco.Core.PropertyEditors; -using Umbraco.Core.Serialization; +using Umbraco.Cms.Core.Cache; +using Umbraco.Cms.Core.Hosting; +using Umbraco.Cms.Core.Manifest; +using Umbraco.Cms.Core.PropertyEditors; +using Umbraco.Cms.Core.Serialization; +using Umbraco.Extensions; -namespace Umbraco.Core.Configuration.Grid +namespace Umbraco.Cms.Core.Configuration.Grid { internal class GridEditorsConfig : IGridEditorsConfig { diff --git a/src/Umbraco.Core/Configuration/Grid/IGridConfig.cs b/src/Umbraco.Core/Configuration/Grid/IGridConfig.cs index a1170c136e..d009eddd25 100644 --- a/src/Umbraco.Core/Configuration/Grid/IGridConfig.cs +++ b/src/Umbraco.Core/Configuration/Grid/IGridConfig.cs @@ -1,9 +1,4 @@ -using System; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace Umbraco.Core.Configuration.Grid +namespace Umbraco.Cms.Core.Configuration.Grid { public interface IGridConfig { diff --git a/src/Umbraco.Core/Configuration/Grid/IGridEditorConfig.cs b/src/Umbraco.Core/Configuration/Grid/IGridEditorConfig.cs index 0edd2f10c5..4bd75042ca 100644 --- a/src/Umbraco.Core/Configuration/Grid/IGridEditorConfig.cs +++ b/src/Umbraco.Core/Configuration/Grid/IGridEditorConfig.cs @@ -1,6 +1,6 @@ using System.Collections.Generic; -namespace Umbraco.Core.Configuration.Grid +namespace Umbraco.Cms.Core.Configuration.Grid { public interface IGridEditorConfig { diff --git a/src/Umbraco.Core/Configuration/Grid/IGridEditorsConfig.cs b/src/Umbraco.Core/Configuration/Grid/IGridEditorsConfig.cs index 418d9b9560..a49ae41d6c 100644 --- a/src/Umbraco.Core/Configuration/Grid/IGridEditorsConfig.cs +++ b/src/Umbraco.Core/Configuration/Grid/IGridEditorsConfig.cs @@ -1,6 +1,6 @@ using System.Collections.Generic; -namespace Umbraco.Core.Configuration.Grid +namespace Umbraco.Cms.Core.Configuration.Grid { public interface IGridEditorsConfig { diff --git a/src/Umbraco.Core/Configuration/IConfigManipulator.cs b/src/Umbraco.Core/Configuration/IConfigManipulator.cs index 16c5a509f2..f0f4bcde63 100644 --- a/src/Umbraco.Core/Configuration/IConfigManipulator.cs +++ b/src/Umbraco.Core/Configuration/IConfigManipulator.cs @@ -1,4 +1,4 @@ -namespace Umbraco.Core.Configuration +namespace Umbraco.Cms.Core.Configuration { public interface IConfigManipulator { diff --git a/src/Umbraco.Core/Configuration/ICronTabParser.cs b/src/Umbraco.Core/Configuration/ICronTabParser.cs index 7124a098b3..565d9fa47b 100644 --- a/src/Umbraco.Core/Configuration/ICronTabParser.cs +++ b/src/Umbraco.Core/Configuration/ICronTabParser.cs @@ -3,7 +3,7 @@ using System; -namespace Umbraco.Core.Configuration +namespace Umbraco.Cms.Core.Configuration { /// /// Defines the contract for that allows the parsing of chrontab expressions. diff --git a/src/Umbraco.Core/Configuration/IMemberPasswordConfiguration.cs b/src/Umbraco.Core/Configuration/IMemberPasswordConfiguration.cs index a7c956a337..7bd8ab9ef2 100644 --- a/src/Umbraco.Core/Configuration/IMemberPasswordConfiguration.cs +++ b/src/Umbraco.Core/Configuration/IMemberPasswordConfiguration.cs @@ -1,4 +1,4 @@ -namespace Umbraco.Core.Configuration +namespace Umbraco.Cms.Core.Configuration { /// /// The password configuration for members diff --git a/src/Umbraco.Core/Configuration/IPasswordConfiguration.cs b/src/Umbraco.Core/Configuration/IPasswordConfiguration.cs index 0c143f22e6..4d042d9270 100644 --- a/src/Umbraco.Core/Configuration/IPasswordConfiguration.cs +++ b/src/Umbraco.Core/Configuration/IPasswordConfiguration.cs @@ -1,7 +1,7 @@ // Copyright (c) Umbraco. // See LICENSE for more details. -namespace Umbraco.Core.Configuration +namespace Umbraco.Cms.Core.Configuration { /// /// Password configuration diff --git a/src/Umbraco.Core/Configuration/ITypeFinderSettings.cs b/src/Umbraco.Core/Configuration/ITypeFinderSettings.cs index 15e72a1f40..9dc5805423 100644 --- a/src/Umbraco.Core/Configuration/ITypeFinderSettings.cs +++ b/src/Umbraco.Core/Configuration/ITypeFinderSettings.cs @@ -1,4 +1,4 @@ -namespace Umbraco.Core.Configuration +namespace Umbraco.Cms.Core.Configuration { public interface ITypeFinderSettings { diff --git a/src/Umbraco.Core/Configuration/IUmbracoConfigurationSection.cs b/src/Umbraco.Core/Configuration/IUmbracoConfigurationSection.cs index 2cf4049c3b..4a1e65f13f 100644 --- a/src/Umbraco.Core/Configuration/IUmbracoConfigurationSection.cs +++ b/src/Umbraco.Core/Configuration/IUmbracoConfigurationSection.cs @@ -1,4 +1,4 @@ -namespace Umbraco.Core.Configuration +namespace Umbraco.Cms.Core.Configuration { /// /// Represents an Umbraco configuration section which can be used to pass to UmbracoConfiguration.For{T} @@ -7,4 +7,4 @@ { } -} \ No newline at end of file +} diff --git a/src/Umbraco.Core/Configuration/IUmbracoVersion.cs b/src/Umbraco.Core/Configuration/IUmbracoVersion.cs index 665979189d..a7aae5e0cf 100644 --- a/src/Umbraco.Core/Configuration/IUmbracoVersion.cs +++ b/src/Umbraco.Core/Configuration/IUmbracoVersion.cs @@ -1,14 +1,14 @@ using System; -using Semver; +using Umbraco.Cms.Core.Semver; -namespace Umbraco.Core.Configuration +namespace Umbraco.Cms.Core.Configuration { public interface IUmbracoVersion { /// /// Gets the non-semantic version of the Umbraco code. /// - Version Current { get; } + Version Version { get; } /// /// Gets the semantic version comments of the Umbraco code. diff --git a/src/Umbraco.Core/Configuration/IUserPasswordConfiguration.cs b/src/Umbraco.Core/Configuration/IUserPasswordConfiguration.cs index ca9a7f3271..db27103a67 100644 --- a/src/Umbraco.Core/Configuration/IUserPasswordConfiguration.cs +++ b/src/Umbraco.Core/Configuration/IUserPasswordConfiguration.cs @@ -1,4 +1,4 @@ -namespace Umbraco.Core.Configuration +namespace Umbraco.Cms.Core.Configuration { /// /// The password configuration for back office users diff --git a/src/Umbraco.Core/Configuration/LocalTempStorage.cs b/src/Umbraco.Core/Configuration/LocalTempStorage.cs index 50eab639d0..696ec7900e 100644 --- a/src/Umbraco.Core/Configuration/LocalTempStorage.cs +++ b/src/Umbraco.Core/Configuration/LocalTempStorage.cs @@ -1,4 +1,4 @@ -namespace Umbraco.Core.Configuration +namespace Umbraco.Cms.Core.Configuration { public enum LocalTempStorage { diff --git a/src/Umbraco.Core/Configuration/MemberPasswordConfiguration.cs b/src/Umbraco.Core/Configuration/MemberPasswordConfiguration.cs index b56a6e7272..c7ce20454f 100644 --- a/src/Umbraco.Core/Configuration/MemberPasswordConfiguration.cs +++ b/src/Umbraco.Core/Configuration/MemberPasswordConfiguration.cs @@ -1,6 +1,4 @@ -using Umbraco.Core.Configuration.UmbracoSettings; - -namespace Umbraco.Core.Configuration +namespace Umbraco.Cms.Core.Configuration { /// /// The password configuration for members diff --git a/src/Umbraco.Core/Configuration/Models/ActiveDirectorySettings.cs b/src/Umbraco.Core/Configuration/Models/ActiveDirectorySettings.cs index 135b8b763c..700e3fe3e1 100644 --- a/src/Umbraco.Core/Configuration/Models/ActiveDirectorySettings.cs +++ b/src/Umbraco.Core/Configuration/Models/ActiveDirectorySettings.cs @@ -1,7 +1,7 @@ // Copyright (c) Umbraco. // See LICENSE for more details. -namespace Umbraco.Core.Configuration.Models +namespace Umbraco.Cms.Core.Configuration.Models { /// /// Typed configuration options for active directory settings. diff --git a/src/Umbraco.Core/Configuration/Models/ConnectionStrings.cs b/src/Umbraco.Core/Configuration/Models/ConnectionStrings.cs index 52b8a02478..9e6ab4cff1 100644 --- a/src/Umbraco.Core/Configuration/Models/ConnectionStrings.cs +++ b/src/Umbraco.Core/Configuration/Models/ConnectionStrings.cs @@ -1,7 +1,7 @@ // Copyright (c) Umbraco. // See LICENSE for more details. -namespace Umbraco.Core.Configuration.Models +namespace Umbraco.Cms.Core.Configuration.Models { /// /// Typed configuration options for connection strings. diff --git a/src/Umbraco.Core/Configuration/Models/ContentErrorPage.cs b/src/Umbraco.Core/Configuration/Models/ContentErrorPage.cs index 842b2e6fb7..53bc96bbf5 100644 --- a/src/Umbraco.Core/Configuration/Models/ContentErrorPage.cs +++ b/src/Umbraco.Core/Configuration/Models/ContentErrorPage.cs @@ -3,9 +3,9 @@ using System; using System.ComponentModel.DataAnnotations; -using Umbraco.Core.Configuration.Models.Validation; +using Umbraco.Cms.Core.Configuration.Models.Validation; -namespace Umbraco.Core.Configuration.Models +namespace Umbraco.Cms.Core.Configuration.Models { /// /// Typed configuration for a content error page. diff --git a/src/Umbraco.Core/Configuration/Models/ContentImagingSettings.cs b/src/Umbraco.Core/Configuration/Models/ContentImagingSettings.cs index d31c5cb6d7..ee21484dab 100644 --- a/src/Umbraco.Core/Configuration/Models/ContentImagingSettings.cs +++ b/src/Umbraco.Core/Configuration/Models/ContentImagingSettings.cs @@ -1,7 +1,7 @@ // Copyright (c) Umbraco. // See LICENSE for more details. -namespace Umbraco.Core.Configuration.Models +namespace Umbraco.Cms.Core.Configuration.Models { /// /// Typed configuration options for content imaging settings. diff --git a/src/Umbraco.Core/Configuration/Models/ContentNotificationSettings.cs b/src/Umbraco.Core/Configuration/Models/ContentNotificationSettings.cs index 48a131adfa..2fa92eb4b5 100644 --- a/src/Umbraco.Core/Configuration/Models/ContentNotificationSettings.cs +++ b/src/Umbraco.Core/Configuration/Models/ContentNotificationSettings.cs @@ -1,7 +1,7 @@ // Copyright (c) Umbraco. // See LICENSE for more details. -namespace Umbraco.Core.Configuration.Models +namespace Umbraco.Cms.Core.Configuration.Models { /// /// Typed configuration options for content notification settings. diff --git a/src/Umbraco.Core/Configuration/Models/ContentSettings.cs b/src/Umbraco.Core/Configuration/Models/ContentSettings.cs index 01ffffa190..6738956686 100644 --- a/src/Umbraco.Core/Configuration/Models/ContentSettings.cs +++ b/src/Umbraco.Core/Configuration/Models/ContentSettings.cs @@ -3,9 +3,9 @@ using System; using System.Collections.Generic; -using Umbraco.Core.Macros; +using Umbraco.Cms.Core.Macros; -namespace Umbraco.Core.Configuration.Models +namespace Umbraco.Cms.Core.Configuration.Models { /// /// Typed configuration options for content settings. diff --git a/src/Umbraco.Core/Configuration/Models/CoreDebugSettings.cs b/src/Umbraco.Core/Configuration/Models/CoreDebugSettings.cs index a263fb648a..1978e02f18 100644 --- a/src/Umbraco.Core/Configuration/Models/CoreDebugSettings.cs +++ b/src/Umbraco.Core/Configuration/Models/CoreDebugSettings.cs @@ -1,7 +1,7 @@ // Copyright (c) Umbraco. // See LICENSE for more details. -namespace Umbraco.Core.Configuration.Models +namespace Umbraco.Cms.Core.Configuration.Models { /// /// Typed configuration options for core debug settings. diff --git a/src/Umbraco.Core/Configuration/Models/DatabaseServerMessengerSettings.cs b/src/Umbraco.Core/Configuration/Models/DatabaseServerMessengerSettings.cs index 8ad87bbb4e..d2afea19e7 100644 --- a/src/Umbraco.Core/Configuration/Models/DatabaseServerMessengerSettings.cs +++ b/src/Umbraco.Core/Configuration/Models/DatabaseServerMessengerSettings.cs @@ -3,7 +3,7 @@ using System; -namespace Umbraco.Core.Configuration.Models +namespace Umbraco.Cms.Core.Configuration.Models { /// /// Typed configuration options for database server messaging settings. diff --git a/src/Umbraco.Core/Configuration/Models/DatabaseServerRegistrarSettings.cs b/src/Umbraco.Core/Configuration/Models/DatabaseServerRegistrarSettings.cs index ae2502d8af..66d35f6a36 100644 --- a/src/Umbraco.Core/Configuration/Models/DatabaseServerRegistrarSettings.cs +++ b/src/Umbraco.Core/Configuration/Models/DatabaseServerRegistrarSettings.cs @@ -3,7 +3,7 @@ using System; -namespace Umbraco.Core.Configuration.Models +namespace Umbraco.Cms.Core.Configuration.Models { /// /// Typed configuration options for database server registrar settings. diff --git a/src/Umbraco.Core/Configuration/Models/DisabledHealthCheckSettings.cs b/src/Umbraco.Core/Configuration/Models/DisabledHealthCheckSettings.cs index 38c71fd83f..a24ec5b923 100644 --- a/src/Umbraco.Core/Configuration/Models/DisabledHealthCheckSettings.cs +++ b/src/Umbraco.Core/Configuration/Models/DisabledHealthCheckSettings.cs @@ -3,7 +3,7 @@ using System; -namespace Umbraco.Core.Configuration.Models +namespace Umbraco.Cms.Core.Configuration.Models { /// /// Typed configuration options for disabled healthcheck settings. diff --git a/src/Umbraco.Core/Configuration/Models/ExceptionFilterSettings.cs b/src/Umbraco.Core/Configuration/Models/ExceptionFilterSettings.cs index 1a1362ff21..0a6bc32351 100644 --- a/src/Umbraco.Core/Configuration/Models/ExceptionFilterSettings.cs +++ b/src/Umbraco.Core/Configuration/Models/ExceptionFilterSettings.cs @@ -1,7 +1,7 @@ // Copyright (c) Umbraco. // See LICENSE for more details. -namespace Umbraco.Core.Configuration.Models +namespace Umbraco.Cms.Core.Configuration.Models { /// /// Typed configuration options for exception filter settings. diff --git a/src/Umbraco.Core/Configuration/Models/GlobalSettings.cs b/src/Umbraco.Core/Configuration/Models/GlobalSettings.cs index c6e5d92794..45abc39268 100644 --- a/src/Umbraco.Core/Configuration/Models/GlobalSettings.cs +++ b/src/Umbraco.Core/Configuration/Models/GlobalSettings.cs @@ -1,7 +1,7 @@ // Copyright (c) Umbraco. // See LICENSE for more details. -namespace Umbraco.Core.Configuration.Models +namespace Umbraco.Cms.Core.Configuration.Models { /// /// Typed configuration options for global settings. @@ -24,15 +24,6 @@ namespace Umbraco.Core.Configuration.Models /// public string ReservedPaths { get; set; } = StaticReservedPaths; - /// - /// Gets or sets a value for the configuration status. - /// - /// - /// TODO: https://github.com/umbraco/Umbraco-CMS/issues/4238 - stop having version in web.config appSettings - /// TODO: previously this would throw on set, but presumably we can't do that if we do still want this in config. - /// - public string ConfigurationStatus { get; set; } - /// /// Gets or sets a value for the timeout in minutes. /// diff --git a/src/Umbraco.Core/Configuration/Models/HealthChecksNotificationMethodSettings.cs b/src/Umbraco.Core/Configuration/Models/HealthChecksNotificationMethodSettings.cs index 03293180db..0ca03d6cc0 100644 --- a/src/Umbraco.Core/Configuration/Models/HealthChecksNotificationMethodSettings.cs +++ b/src/Umbraco.Core/Configuration/Models/HealthChecksNotificationMethodSettings.cs @@ -2,9 +2,9 @@ // See LICENSE for more details. using System.Collections.Generic; -using Umbraco.Core.HealthChecks; +using Umbraco.Cms.Core.HealthChecks; -namespace Umbraco.Core.Configuration.Models +namespace Umbraco.Cms.Core.Configuration.Models { /// /// Typed configuration options for healthcheck notification method settings. diff --git a/src/Umbraco.Core/Configuration/Models/HealthChecksNotificationSettings.cs b/src/Umbraco.Core/Configuration/Models/HealthChecksNotificationSettings.cs index 3e52a70b29..316b494a19 100644 --- a/src/Umbraco.Core/Configuration/Models/HealthChecksNotificationSettings.cs +++ b/src/Umbraco.Core/Configuration/Models/HealthChecksNotificationSettings.cs @@ -5,7 +5,7 @@ using System; using System.Collections.Generic; using System.Linq; -namespace Umbraco.Core.Configuration.Models +namespace Umbraco.Cms.Core.Configuration.Models { /// /// Typed configuration options for healthcheck notification settings. diff --git a/src/Umbraco.Core/Configuration/Models/HealthChecksSettings.cs b/src/Umbraco.Core/Configuration/Models/HealthChecksSettings.cs index e3ae9a3f96..ba7ccf1371 100644 --- a/src/Umbraco.Core/Configuration/Models/HealthChecksSettings.cs +++ b/src/Umbraco.Core/Configuration/Models/HealthChecksSettings.cs @@ -4,7 +4,7 @@ using System.Collections.Generic; using System.Linq; -namespace Umbraco.Core.Configuration.Models +namespace Umbraco.Cms.Core.Configuration.Models { /// /// Typed configuration options for healthchecks settings. diff --git a/src/Umbraco.Core/Configuration/Models/HostingSettings.cs b/src/Umbraco.Core/Configuration/Models/HostingSettings.cs index 0478e9b7e1..981cf8a6db 100644 --- a/src/Umbraco.Core/Configuration/Models/HostingSettings.cs +++ b/src/Umbraco.Core/Configuration/Models/HostingSettings.cs @@ -1,7 +1,7 @@ // Copyright (c) Umbraco. // See LICENSE for more details. -namespace Umbraco.Core.Configuration.Models +namespace Umbraco.Cms.Core.Configuration.Models { /// /// Typed configuration options for hosting settings. diff --git a/src/Umbraco.Core/Configuration/Models/ImagingAutoFillUploadField.cs b/src/Umbraco.Core/Configuration/Models/ImagingAutoFillUploadField.cs index 999bcf2dff..462a90c351 100644 --- a/src/Umbraco.Core/Configuration/Models/ImagingAutoFillUploadField.cs +++ b/src/Umbraco.Core/Configuration/Models/ImagingAutoFillUploadField.cs @@ -2,9 +2,9 @@ // See LICENSE for more details. using System.ComponentModel.DataAnnotations; -using Umbraco.Core.Configuration.Models.Validation; +using Umbraco.Cms.Core.Configuration.Models.Validation; -namespace Umbraco.Core.Configuration.Models +namespace Umbraco.Cms.Core.Configuration.Models { /// /// Typed configuration options for image autofill upload settings. diff --git a/src/Umbraco.Core/Configuration/Models/ImagingCacheSettings.cs b/src/Umbraco.Core/Configuration/Models/ImagingCacheSettings.cs index 0a3e723722..e9bdd77545 100644 --- a/src/Umbraco.Core/Configuration/Models/ImagingCacheSettings.cs +++ b/src/Umbraco.Core/Configuration/Models/ImagingCacheSettings.cs @@ -4,7 +4,7 @@ using System; using System.IO; -namespace Umbraco.Core.Configuration.Models +namespace Umbraco.Cms.Core.Configuration.Models { /// /// Typed configuration options for image cache settings. diff --git a/src/Umbraco.Core/Configuration/Models/ImagingResizeSettings.cs b/src/Umbraco.Core/Configuration/Models/ImagingResizeSettings.cs index c95aad52ad..e71ed4f2e4 100644 --- a/src/Umbraco.Core/Configuration/Models/ImagingResizeSettings.cs +++ b/src/Umbraco.Core/Configuration/Models/ImagingResizeSettings.cs @@ -1,7 +1,7 @@ // Copyright (c) Umbraco. // See LICENSE for more details. -namespace Umbraco.Core.Configuration.Models +namespace Umbraco.Cms.Core.Configuration.Models { /// /// Typed configuration options for image resize settings. diff --git a/src/Umbraco.Core/Configuration/Models/ImagingSettings.cs b/src/Umbraco.Core/Configuration/Models/ImagingSettings.cs index 343e2a040f..273e53f384 100644 --- a/src/Umbraco.Core/Configuration/Models/ImagingSettings.cs +++ b/src/Umbraco.Core/Configuration/Models/ImagingSettings.cs @@ -1,7 +1,7 @@ // Copyright (c) Umbraco. // See LICENSE for more details. -namespace Umbraco.Core.Configuration.Models +namespace Umbraco.Cms.Core.Configuration.Models { /// /// Typed configuration options for imaging settings. diff --git a/src/Umbraco.Core/Configuration/Models/IndexCreatorSettings.cs b/src/Umbraco.Core/Configuration/Models/IndexCreatorSettings.cs index 9ea7348211..5ae43f8d39 100644 --- a/src/Umbraco.Core/Configuration/Models/IndexCreatorSettings.cs +++ b/src/Umbraco.Core/Configuration/Models/IndexCreatorSettings.cs @@ -1,7 +1,7 @@ // Copyright (c) Umbraco. // See LICENSE for more details. -namespace Umbraco.Core.Configuration.Models +namespace Umbraco.Cms.Core.Configuration.Models { /// /// Typed configuration options for index creator settings. diff --git a/src/Umbraco.Core/Configuration/Models/KeepAliveSettings.cs b/src/Umbraco.Core/Configuration/Models/KeepAliveSettings.cs index 57336d35ac..831ad8d84d 100644 --- a/src/Umbraco.Core/Configuration/Models/KeepAliveSettings.cs +++ b/src/Umbraco.Core/Configuration/Models/KeepAliveSettings.cs @@ -1,7 +1,7 @@ // Copyright (c) Umbraco. // See LICENSE for more details. -namespace Umbraco.Core.Configuration.Models +namespace Umbraco.Cms.Core.Configuration.Models { /// /// Typed configuration options for keep alive settings. diff --git a/src/Umbraco.Core/Configuration/Models/LoggingSettings.cs b/src/Umbraco.Core/Configuration/Models/LoggingSettings.cs index 49f2517f8f..3f762e7577 100644 --- a/src/Umbraco.Core/Configuration/Models/LoggingSettings.cs +++ b/src/Umbraco.Core/Configuration/Models/LoggingSettings.cs @@ -3,7 +3,7 @@ using System; -namespace Umbraco.Core.Configuration.Models +namespace Umbraco.Cms.Core.Configuration.Models { /// /// Typed configuration options for logging settings. diff --git a/src/Umbraco.Core/Configuration/Models/MemberPasswordConfigurationSettings.cs b/src/Umbraco.Core/Configuration/Models/MemberPasswordConfigurationSettings.cs index abd12ae023..33afc51db4 100644 --- a/src/Umbraco.Core/Configuration/Models/MemberPasswordConfigurationSettings.cs +++ b/src/Umbraco.Core/Configuration/Models/MemberPasswordConfigurationSettings.cs @@ -1,7 +1,7 @@ // Copyright (c) Umbraco. // See LICENSE for more details. -namespace Umbraco.Core.Configuration.Models +namespace Umbraco.Cms.Core.Configuration.Models { /// /// Typed configuration options for member password settings. diff --git a/src/Umbraco.Core/Configuration/Models/ModelsBuilderSettings.cs b/src/Umbraco.Core/Configuration/Models/ModelsBuilderSettings.cs index 4f5916822e..33d5bf534d 100644 --- a/src/Umbraco.Core/Configuration/Models/ModelsBuilderSettings.cs +++ b/src/Umbraco.Core/Configuration/Models/ModelsBuilderSettings.cs @@ -1,9 +1,9 @@ // Copyright (c) Umbraco. // See LICENSE for more details. -using Umbraco.Configuration; +using Umbraco.Extensions; -namespace Umbraco.Core.Configuration.Models +namespace Umbraco.Cms.Core.Configuration.Models { /// /// Typed configuration options for models builder settings. diff --git a/src/Umbraco.Core/Configuration/Models/NuCacheSettings.cs b/src/Umbraco.Core/Configuration/Models/NuCacheSettings.cs index f98b1f422e..aa67038702 100644 --- a/src/Umbraco.Core/Configuration/Models/NuCacheSettings.cs +++ b/src/Umbraco.Core/Configuration/Models/NuCacheSettings.cs @@ -1,7 +1,7 @@ // Copyright (c) Umbraco. // See LICENSE for more details. -namespace Umbraco.Core.Configuration.Models +namespace Umbraco.Cms.Core.Configuration.Models { /// /// Typed configuration options for NuCache settings. diff --git a/src/Umbraco.Core/Configuration/Models/RequestHandlerSettings.cs b/src/Umbraco.Core/Configuration/Models/RequestHandlerSettings.cs index ceea0f9038..5f5032f7c3 100644 --- a/src/Umbraco.Core/Configuration/Models/RequestHandlerSettings.cs +++ b/src/Umbraco.Core/Configuration/Models/RequestHandlerSettings.cs @@ -2,9 +2,10 @@ // See LICENSE for more details. using System.Collections.Generic; -using Umbraco.Core.Configuration.UmbracoSettings; +using Umbraco.Cms.Core.Configuration.UmbracoSettings; +using Umbraco.Extensions; -namespace Umbraco.Core.Configuration.Models +namespace Umbraco.Cms.Core.Configuration.Models { /// /// Typed configuration options for request handler settings. diff --git a/src/Umbraco.Core/Configuration/Models/RuntimeSettings.cs b/src/Umbraco.Core/Configuration/Models/RuntimeSettings.cs index 97af22ea8a..c598dfb86b 100644 --- a/src/Umbraco.Core/Configuration/Models/RuntimeSettings.cs +++ b/src/Umbraco.Core/Configuration/Models/RuntimeSettings.cs @@ -1,7 +1,7 @@ // Copyright (c) Umbraco. // See LICENSE for more details. -namespace Umbraco.Core.Configuration.Models +namespace Umbraco.Cms.Core.Configuration.Models { /// /// Typed configuration options for runtime settings. diff --git a/src/Umbraco.Core/Configuration/Models/SecuritySettings.cs b/src/Umbraco.Core/Configuration/Models/SecuritySettings.cs index 25bbbb645d..a20e42ed08 100644 --- a/src/Umbraco.Core/Configuration/Models/SecuritySettings.cs +++ b/src/Umbraco.Core/Configuration/Models/SecuritySettings.cs @@ -1,7 +1,7 @@ // Copyright (c) Umbraco. // See LICENSE for more details. -namespace Umbraco.Core.Configuration.Models +namespace Umbraco.Cms.Core.Configuration.Models { /// /// Typed configuration options for security settings. diff --git a/src/Umbraco.Core/Configuration/Models/SmtpSettings.cs b/src/Umbraco.Core/Configuration/Models/SmtpSettings.cs index fb4462f76d..9ad22abaeb 100644 --- a/src/Umbraco.Core/Configuration/Models/SmtpSettings.cs +++ b/src/Umbraco.Core/Configuration/Models/SmtpSettings.cs @@ -3,9 +3,9 @@ using System.ComponentModel.DataAnnotations; using System.Net.Mail; -using Umbraco.Core.Configuration.Models.Validation; +using Umbraco.Cms.Core.Configuration.Models.Validation; -namespace Umbraco.Core.Configuration.Models +namespace Umbraco.Cms.Core.Configuration.Models { /// /// Matches MailKit.Security.SecureSocketOptions and defined locally to avoid having to take diff --git a/src/Umbraco.Core/Configuration/Models/TourSettings.cs b/src/Umbraco.Core/Configuration/Models/TourSettings.cs index 25c06b9975..c61c2316b7 100644 --- a/src/Umbraco.Core/Configuration/Models/TourSettings.cs +++ b/src/Umbraco.Core/Configuration/Models/TourSettings.cs @@ -1,7 +1,7 @@ // Copyright (c) Umbraco. // See LICENSE for more details. -namespace Umbraco.Core.Configuration.Models +namespace Umbraco.Cms.Core.Configuration.Models { /// /// Typed configuration options for tour settings. diff --git a/src/Umbraco.Core/Configuration/Models/TypeFinderSettings.cs b/src/Umbraco.Core/Configuration/Models/TypeFinderSettings.cs index 63295c7259..9c8fc2b9d3 100644 --- a/src/Umbraco.Core/Configuration/Models/TypeFinderSettings.cs +++ b/src/Umbraco.Core/Configuration/Models/TypeFinderSettings.cs @@ -1,7 +1,7 @@ // Copyright (c) Umbraco. // See LICENSE for more details. -namespace Umbraco.Core.Configuration.Models +namespace Umbraco.Cms.Core.Configuration.Models { /// /// Typed configuration options for type finder settings. diff --git a/src/Umbraco.Core/Configuration/Models/UmbracoPluginSettings.cs b/src/Umbraco.Core/Configuration/Models/UmbracoPluginSettings.cs index 907b29490d..6dcad67ce2 100644 --- a/src/Umbraco.Core/Configuration/Models/UmbracoPluginSettings.cs +++ b/src/Umbraco.Core/Configuration/Models/UmbracoPluginSettings.cs @@ -3,7 +3,7 @@ using System.Collections.Generic; -namespace Umbraco.Core.Configuration.Models +namespace Umbraco.Cms.Core.Configuration.Models { /// /// Typed configuration options for the plugins. diff --git a/src/Umbraco.Core/Configuration/Models/UserPasswordConfigurationSettings.cs b/src/Umbraco.Core/Configuration/Models/UserPasswordConfigurationSettings.cs index 09b9200760..f609181460 100644 --- a/src/Umbraco.Core/Configuration/Models/UserPasswordConfigurationSettings.cs +++ b/src/Umbraco.Core/Configuration/Models/UserPasswordConfigurationSettings.cs @@ -1,7 +1,7 @@ // Copyright (c) Umbraco. // See LICENSE for more details. -namespace Umbraco.Core.Configuration.Models +namespace Umbraco.Cms.Core.Configuration.Models { /// /// Typed configuration options for user password settings. diff --git a/src/Umbraco.Core/Configuration/Models/Validation/ConfigurationValidatorBase.cs b/src/Umbraco.Core/Configuration/Models/Validation/ConfigurationValidatorBase.cs index 348c809a91..9f0a23467d 100644 --- a/src/Umbraco.Core/Configuration/Models/Validation/ConfigurationValidatorBase.cs +++ b/src/Umbraco.Core/Configuration/Models/Validation/ConfigurationValidatorBase.cs @@ -3,8 +3,9 @@ using System.Collections.Generic; using System.Linq; +using Umbraco.Extensions; -namespace Umbraco.Core.Configuration.Models.Validation +namespace Umbraco.Cms.Core.Configuration.Models.Validation { /// /// Base class for configuration validators. diff --git a/src/Umbraco.Core/Configuration/Models/Validation/ContentSettingsValidator.cs b/src/Umbraco.Core/Configuration/Models/Validation/ContentSettingsValidator.cs index fdfd6de59c..d21d6277bf 100644 --- a/src/Umbraco.Core/Configuration/Models/Validation/ContentSettingsValidator.cs +++ b/src/Umbraco.Core/Configuration/Models/Validation/ContentSettingsValidator.cs @@ -4,7 +4,7 @@ using System.Collections.Generic; using Microsoft.Extensions.Options; -namespace Umbraco.Core.Configuration.Models.Validation +namespace Umbraco.Cms.Core.Configuration.Models.Validation { /// /// Validator for configuration representated as . diff --git a/src/Umbraco.Core/Configuration/Models/Validation/GlobalSettingsValidator.cs b/src/Umbraco.Core/Configuration/Models/Validation/GlobalSettingsValidator.cs index 6bc9dc0a6f..b963bddc06 100644 --- a/src/Umbraco.Core/Configuration/Models/Validation/GlobalSettingsValidator.cs +++ b/src/Umbraco.Core/Configuration/Models/Validation/GlobalSettingsValidator.cs @@ -3,7 +3,7 @@ using Microsoft.Extensions.Options; -namespace Umbraco.Core.Configuration.Models.Validation +namespace Umbraco.Cms.Core.Configuration.Models.Validation { /// /// Validator for configuration representated as . diff --git a/src/Umbraco.Core/Configuration/Models/Validation/HealthChecksSettingsValidator.cs b/src/Umbraco.Core/Configuration/Models/Validation/HealthChecksSettingsValidator.cs index 449415c37f..a8b63f39a0 100644 --- a/src/Umbraco.Core/Configuration/Models/Validation/HealthChecksSettingsValidator.cs +++ b/src/Umbraco.Core/Configuration/Models/Validation/HealthChecksSettingsValidator.cs @@ -3,7 +3,7 @@ using Microsoft.Extensions.Options; -namespace Umbraco.Core.Configuration.Models.Validation +namespace Umbraco.Cms.Core.Configuration.Models.Validation { /// /// Validator for configuration representated as . diff --git a/src/Umbraco.Core/Configuration/Models/Validation/RequestHandlerSettingsValidator.cs b/src/Umbraco.Core/Configuration/Models/Validation/RequestHandlerSettingsValidator.cs index 647c7438c6..6260341c18 100644 --- a/src/Umbraco.Core/Configuration/Models/Validation/RequestHandlerSettingsValidator.cs +++ b/src/Umbraco.Core/Configuration/Models/Validation/RequestHandlerSettingsValidator.cs @@ -3,7 +3,7 @@ using Microsoft.Extensions.Options; -namespace Umbraco.Core.Configuration.Models.Validation +namespace Umbraco.Cms.Core.Configuration.Models.Validation { /// /// Validator for configuration representated as . diff --git a/src/Umbraco.Core/Configuration/Models/Validation/ValidatableEntryBase.cs b/src/Umbraco.Core/Configuration/Models/Validation/ValidatableEntryBase.cs index 37380eb9a6..970146a27e 100644 --- a/src/Umbraco.Core/Configuration/Models/Validation/ValidatableEntryBase.cs +++ b/src/Umbraco.Core/Configuration/Models/Validation/ValidatableEntryBase.cs @@ -4,7 +4,7 @@ using System.Collections.Generic; using System.ComponentModel.DataAnnotations; -namespace Umbraco.Core.Configuration.Models.Validation +namespace Umbraco.Cms.Core.Configuration.Models.Validation { /// /// Provides a base class for configuration models that can be validated based on data annotations. diff --git a/src/Umbraco.Core/Configuration/Models/WebRoutingSettings.cs b/src/Umbraco.Core/Configuration/Models/WebRoutingSettings.cs index d94fdd8496..2fe33603ca 100644 --- a/src/Umbraco.Core/Configuration/Models/WebRoutingSettings.cs +++ b/src/Umbraco.Core/Configuration/Models/WebRoutingSettings.cs @@ -1,9 +1,9 @@ // Copyright (c) Umbraco. // See LICENSE for more details. -using Umbraco.Core.Models.PublishedContent; +using Umbraco.Cms.Core.Models.PublishedContent; -namespace Umbraco.Core.Configuration.Models +namespace Umbraco.Cms.Core.Configuration.Models { /// /// Typed configuration options for web routing settings. diff --git a/src/Umbraco.Core/Configuration/ModelsBuilderConfigExtensions.cs b/src/Umbraco.Core/Configuration/ModelsBuilderConfigExtensions.cs index ef80796c8b..3d620ee9e5 100644 --- a/src/Umbraco.Core/Configuration/ModelsBuilderConfigExtensions.cs +++ b/src/Umbraco.Core/Configuration/ModelsBuilderConfigExtensions.cs @@ -1,10 +1,9 @@ using System.Configuration; using System.IO; -using Umbraco.Core.Hosting; -using Umbraco.Core.Configuration.Models; -using Umbraco.Core.IO; +using Umbraco.Cms.Core.Configuration.Models; +using Umbraco.Cms.Core.Hosting; -namespace Umbraco.Core.Configuration +namespace Umbraco.Extensions { public static class ModelsBuilderConfigExtensions { diff --git a/src/Umbraco.Core/Configuration/ModelsMode.cs b/src/Umbraco.Core/Configuration/ModelsMode.cs index c3b32b1cab..1917f2b4cd 100644 --- a/src/Umbraco.Core/Configuration/ModelsMode.cs +++ b/src/Umbraco.Core/Configuration/ModelsMode.cs @@ -1,4 +1,4 @@ -namespace Umbraco.Core.Configuration +namespace Umbraco.Cms.Core.Configuration { /// /// Defines the models generation modes. diff --git a/src/Umbraco.Core/Configuration/ModelsModeExtensions.cs b/src/Umbraco.Core/Configuration/ModelsModeExtensions.cs index 6aae79ff8a..f5f4e9e09c 100644 --- a/src/Umbraco.Core/Configuration/ModelsModeExtensions.cs +++ b/src/Umbraco.Core/Configuration/ModelsModeExtensions.cs @@ -1,6 +1,6 @@ -using Umbraco.Core.Configuration; +using Umbraco.Cms.Core.Configuration; -namespace Umbraco.Configuration +namespace Umbraco.Extensions { /// /// Provides extensions for the enumeration. diff --git a/src/Umbraco.Core/Configuration/PasswordConfiguration.cs b/src/Umbraco.Core/Configuration/PasswordConfiguration.cs index 0c5ed9adb0..506821df6d 100644 --- a/src/Umbraco.Core/Configuration/PasswordConfiguration.cs +++ b/src/Umbraco.Core/Configuration/PasswordConfiguration.cs @@ -1,7 +1,6 @@ using System; -using Umbraco.Core.Configuration.UmbracoSettings; -namespace Umbraco.Core.Configuration +namespace Umbraco.Cms.Core.Configuration { public abstract class PasswordConfiguration : IPasswordConfiguration { diff --git a/src/Umbraco.Core/Configuration/UmbracoSettings/IChar.cs b/src/Umbraco.Core/Configuration/UmbracoSettings/IChar.cs index bd33472ea9..4073a12149 100644 --- a/src/Umbraco.Core/Configuration/UmbracoSettings/IChar.cs +++ b/src/Umbraco.Core/Configuration/UmbracoSettings/IChar.cs @@ -1,4 +1,4 @@ -namespace Umbraco.Core.Configuration.UmbracoSettings +namespace Umbraco.Cms.Core.Configuration.UmbracoSettings { public interface IChar { diff --git a/src/Umbraco.Core/Configuration/UmbracoSettings/IImagingAutoFillUploadField.cs b/src/Umbraco.Core/Configuration/UmbracoSettings/IImagingAutoFillUploadField.cs index 11b5e42e78..c7d91a6d0a 100644 --- a/src/Umbraco.Core/Configuration/UmbracoSettings/IImagingAutoFillUploadField.cs +++ b/src/Umbraco.Core/Configuration/UmbracoSettings/IImagingAutoFillUploadField.cs @@ -1,4 +1,4 @@ -namespace Umbraco.Core.Configuration.UmbracoSettings +namespace Umbraco.Cms.Core.Configuration.UmbracoSettings { public interface IImagingAutoFillUploadField { diff --git a/src/Umbraco.Core/Configuration/UmbracoSettings/IPasswordConfigurationSection.cs b/src/Umbraco.Core/Configuration/UmbracoSettings/IPasswordConfigurationSection.cs index a561b7808e..d79d8940c3 100644 --- a/src/Umbraco.Core/Configuration/UmbracoSettings/IPasswordConfigurationSection.cs +++ b/src/Umbraco.Core/Configuration/UmbracoSettings/IPasswordConfigurationSection.cs @@ -1,4 +1,4 @@ -namespace Umbraco.Core.Configuration.UmbracoSettings +namespace Umbraco.Cms.Core.Configuration.UmbracoSettings { public interface IPasswordConfigurationSection : IUmbracoConfigurationSection { diff --git a/src/Umbraco.Core/Configuration/UmbracoSettings/ITypeFinderConfig.cs b/src/Umbraco.Core/Configuration/UmbracoSettings/ITypeFinderConfig.cs index a290c26d15..903f21f21a 100644 --- a/src/Umbraco.Core/Configuration/UmbracoSettings/ITypeFinderConfig.cs +++ b/src/Umbraco.Core/Configuration/UmbracoSettings/ITypeFinderConfig.cs @@ -1,6 +1,6 @@ using System.Collections.Generic; -namespace Umbraco.Core.Configuration.UmbracoSettings +namespace Umbraco.Cms.Core.Configuration.UmbracoSettings { public interface ITypeFinderConfig { diff --git a/src/Umbraco.Core/Configuration/UmbracoVersion.cs b/src/Umbraco.Core/Configuration/UmbracoVersion.cs index 2e45be6cc6..2c0ba395ef 100644 --- a/src/Umbraco.Core/Configuration/UmbracoVersion.cs +++ b/src/Umbraco.Core/Configuration/UmbracoVersion.cs @@ -1,8 +1,9 @@ -using System; +using System; using System.Reflection; -using Semver; +using Umbraco.Cms.Core.Semver; +using Umbraco.Extensions; -namespace Umbraco.Core.Configuration +namespace Umbraco.Cms.Core.Configuration { /// /// Represents the version of the executing code. @@ -24,14 +25,13 @@ namespace Umbraco.Core.Configuration SemanticVersion = SemVersion.Parse(umbracoCoreAssembly.GetCustomAttribute().InformationalVersion); // gets the non-semantic version - Current = SemanticVersion.GetVersion(3); + Version = SemanticVersion.GetVersion(3); } /// /// Gets the non-semantic version of the Umbraco code. /// - // TODO: rename to Version - public Version Current { get; } + public Version Version { get; } /// /// Gets the semantic version comments of the Umbraco code. diff --git a/src/Umbraco.Core/Configuration/UserPasswordConfiguration.cs b/src/Umbraco.Core/Configuration/UserPasswordConfiguration.cs index 07e6603cee..6c30fbba71 100644 --- a/src/Umbraco.Core/Configuration/UserPasswordConfiguration.cs +++ b/src/Umbraco.Core/Configuration/UserPasswordConfiguration.cs @@ -1,6 +1,4 @@ -using Umbraco.Core.Configuration.UmbracoSettings; - -namespace Umbraco.Core.Configuration +namespace Umbraco.Cms.Core.Configuration { /// /// The password configuration for back office users diff --git a/src/Umbraco.Core/Constants-AppSettings.cs b/src/Umbraco.Core/Constants-AppSettings.cs deleted file mode 100644 index 594be2966a..0000000000 --- a/src/Umbraco.Core/Constants-AppSettings.cs +++ /dev/null @@ -1,152 +0,0 @@ -using System; - -namespace Umbraco.Core -{ - public static partial class Constants - { - /// - /// Specific web.config AppSetting keys for Umbraco.Core application - /// - public static class AppSettings - { - // TODO: Are these all obsolete in netcore now? - - public const string MainDomLock = "Umbraco.Core.MainDom.Lock"; - - // TODO: Kill me - still used in Umbraco.Core.IO.SystemFiles:27 - [Obsolete("We need to kill this appsetting as we do not use XML content cache umbraco.config anymore due to NuCache")] - public const string ContentXML = "Umbraco.Core.ContentXML"; //umbracoContentXML - - /// - /// TODO: FILL ME IN - /// - public const string RegisterType = "Umbraco.Core.RegisterType"; - - /// - /// This is used for a unit test in PublishedMediaCache - /// - public const string PublishedMediaCacheSeconds = "Umbraco.Core.PublishedMediaCacheSeconds"; - - /// - /// TODO: FILL ME IN - /// - public const string AssembliesAcceptingLoadExceptions = "Umbraco.Core.AssembliesAcceptingLoadExceptions"; - - /// - /// This will return the version number of the currently installed umbraco instance - /// - /// - /// Umbraco will automatically set & modify this value when installing & upgrading - /// - public const string ConfigurationStatus = "Umbraco.Core.ConfigurationStatus"; - - /// - /// The path to umbraco's root directory (/umbraco by default). - /// - public const string UmbracoPath = "Umbraco.Core.Path"; - - /// - /// Gets the path to umbraco's icons directory (/umbraco/assets/icons by default). - /// - public const string IconsPath = "Umbraco.Icons.Path"; - - /// - /// The reserved urls from web.config. - /// - public const string ReservedUrls = "Umbraco.Core.ReservedUrls"; - - /// - /// The path of the stylesheet folder. - /// - public const string UmbracoCssPath = "Umbraco.Web.CssPath"; - - /// - /// The path of script folder. - /// - public const string UmbracoScriptsPath = "Umbraco.Core.ScriptsPath"; - - /// - /// The path of media folder. - /// - public const string UmbracoMediaPath = "Umbraco.Core.MediaPath"; - - /// - /// The reserved paths from web.config - /// - public const string ReservedPaths = "Umbraco.Core.ReservedPaths"; - - /// - /// Set the timeout for the Umbraco backoffice in minutes - /// - public const string TimeOutInMinutes = "Umbraco.Core.TimeOutInMinutes"; - - /// - /// The number of days to check for a new version of Umbraco - /// - /// - /// Default is set to 7. Setting this to 0 will never check - /// This is used to help track statistics - /// - public const string VersionCheckPeriod = "Umbraco.Core.VersionCheckPeriod"; - - /// - /// This is the location type to store temporary files such as cache files or other localized files for a given machine - /// - /// - /// Currently used for the xml cache file and the plugin cache files - /// - public const string LocalTempStorage = "Umbraco.Core.LocalTempStorage"; - - /// - /// The default UI language of the backoffice such as 'en-US' - /// - public const string DefaultUILanguage = "Umbraco.Core.DefaultUILanguage"; - - /// - /// A true/false value indicating whether umbraco should hide top level nodes from generated URLs. - /// - public const string HideTopLevelNodeFromPath = "Umbraco.Core.HideTopLevelNodeFromPath"; - - /// - /// A true or false indicating whether umbraco should force a secure (https) connection to the backoffice. - /// - public const string UseHttps = "Umbraco.Core.UseHttps"; - - /// - /// TODO: FILL ME IN - /// - public const string DisableElectionForSingleServer = "Umbraco.Core.DisableElectionForSingleServer"; - - /// - /// Gets the path to the razor file used when no published content is available. - /// - public const string NoNodesViewPath = "Umbraco.Core.NoNodesViewPath"; - - /// - /// Debug specific web.config AppSetting keys for Umbraco - /// - /// - /// Do not use these keys in a production environment - /// - public static class Debug - { - /// - /// When set to true, Scope logs the stack trace for any scope that gets disposed without being completed. - /// this helps troubleshooting rogue scopes that we forget to complete - /// - public const string LogUncompletedScopes = "Umbraco.Core.Debug.LogUncompletedScopes"; - - /// - /// When set to true, the Logger creates a mini dump of w3wp in ~/App_Data/MiniDump whenever it logs - /// an error due to a ThreadAbortException that is due to a timeout. - /// - public const string DumpOnTimeoutThreadAbort = "Umbraco.Core.Debug.DumpOnTimeoutThreadAbort"; - - /// - /// TODO: FILL ME IN - /// - public const string DatabaseFactoryServerVersion = "Umbraco.Core.Debug.DatabaseFactoryServerVersion"; - } - } - } -} diff --git a/src/Umbraco.Core/Constants-Applications.cs b/src/Umbraco.Core/Constants-Applications.cs index cf4f80d87b..da945731af 100644 --- a/src/Umbraco.Core/Constants-Applications.cs +++ b/src/Umbraco.Core/Constants-Applications.cs @@ -1,4 +1,4 @@ -namespace Umbraco.Core +namespace Umbraco.Cms.Core { public static partial class Constants { diff --git a/src/Umbraco.Core/Constants-Composing.cs b/src/Umbraco.Core/Constants-Composing.cs index e65629a278..a92f71ee04 100644 --- a/src/Umbraco.Core/Constants-Composing.cs +++ b/src/Umbraco.Core/Constants-Composing.cs @@ -1,4 +1,4 @@ -namespace Umbraco.Core +namespace Umbraco.Cms.Core { /// /// Defines constants. diff --git a/src/Umbraco.Core/Constants-Configuration.cs b/src/Umbraco.Core/Constants-Configuration.cs index 451ac5d438..6ad3e0fda0 100644 --- a/src/Umbraco.Core/Constants-Configuration.cs +++ b/src/Umbraco.Core/Constants-Configuration.cs @@ -1,4 +1,4 @@ -namespace Umbraco.Core +namespace Umbraco.Cms.Core { public static partial class Constants { diff --git a/src/Umbraco.Core/Constants-Conventions.cs b/src/Umbraco.Core/Constants-Conventions.cs index 0bfb890abd..92b1113ad0 100644 --- a/src/Umbraco.Core/Constants-Conventions.cs +++ b/src/Umbraco.Core/Constants-Conventions.cs @@ -1,8 +1,4 @@ -using System; -using System.Collections.Generic; -using Umbraco.Core.Models; - -namespace Umbraco.Core +namespace Umbraco.Cms.Core { public static partial class Constants { diff --git a/src/Umbraco.Core/Constants-DataTypes.cs b/src/Umbraco.Core/Constants-DataTypes.cs index c6f6c6478e..2cbc254e28 100644 --- a/src/Umbraco.Core/Constants-DataTypes.cs +++ b/src/Umbraco.Core/Constants-DataTypes.cs @@ -1,6 +1,6 @@ using System; -namespace Umbraco.Core +namespace Umbraco.Cms.Core { public static partial class Constants { diff --git a/src/Umbraco.Core/Constants-DatabaseProviders.cs b/src/Umbraco.Core/Constants-DatabaseProviders.cs index e93e524bbc..da82746445 100644 --- a/src/Umbraco.Core/Constants-DatabaseProviders.cs +++ b/src/Umbraco.Core/Constants-DatabaseProviders.cs @@ -1,4 +1,4 @@ -namespace Umbraco.Core +namespace Umbraco.Cms.Core { public static partial class Constants { diff --git a/src/Umbraco.Core/Constants-DeploySelector.cs b/src/Umbraco.Core/Constants-DeploySelector.cs index f6f3f5fbae..30daacf42b 100644 --- a/src/Umbraco.Core/Constants-DeploySelector.cs +++ b/src/Umbraco.Core/Constants-DeploySelector.cs @@ -1,4 +1,4 @@ -namespace Umbraco.Core +namespace Umbraco.Cms.Core { public static partial class Constants { diff --git a/src/Umbraco.Core/Constants-HealthChecks.cs b/src/Umbraco.Core/Constants-HealthChecks.cs index c582e8ac34..5770bd07e4 100644 --- a/src/Umbraco.Core/Constants-HealthChecks.cs +++ b/src/Umbraco.Core/Constants-HealthChecks.cs @@ -1,4 +1,4 @@ -namespace Umbraco.Core +namespace Umbraco.Cms.Core { /// /// Defines constants. diff --git a/src/Umbraco.Core/Constants-Icons.cs b/src/Umbraco.Core/Constants-Icons.cs index 05213ed1c4..73051f5e95 100644 --- a/src/Umbraco.Core/Constants-Icons.cs +++ b/src/Umbraco.Core/Constants-Icons.cs @@ -1,4 +1,4 @@ -namespace Umbraco.Core +namespace Umbraco.Cms.Core { public static partial class Constants { diff --git a/src/Umbraco.Core/Constants-Indexes.cs b/src/Umbraco.Core/Constants-Indexes.cs index 1add0f721b..8384faa08d 100644 --- a/src/Umbraco.Core/Constants-Indexes.cs +++ b/src/Umbraco.Core/Constants-Indexes.cs @@ -1,4 +1,4 @@ -namespace Umbraco.Core +namespace Umbraco.Cms.Core { public static partial class Constants { diff --git a/src/Umbraco.Core/Constants-ModelsBuilder.cs b/src/Umbraco.Core/Constants-ModelsBuilder.cs index 28e70ed383..289c0355a8 100644 --- a/src/Umbraco.Core/Constants-ModelsBuilder.cs +++ b/src/Umbraco.Core/Constants-ModelsBuilder.cs @@ -1,4 +1,4 @@ -namespace Umbraco.Core +namespace Umbraco.Cms.Core { /// /// Defines constants. @@ -10,8 +10,7 @@ /// public static class ModelsBuilder { - - public const string DefaultModelsNamespace = "Umbraco.Web.PublishedModels"; + public const string DefaultModelsNamespace = "Umbraco.Cms.Web.Common.PublishedModels"; } } } diff --git a/src/Umbraco.Core/Constants-ObjectTypes.cs b/src/Umbraco.Core/Constants-ObjectTypes.cs index dacd7d9fc5..0a9847b848 100644 --- a/src/Umbraco.Core/Constants-ObjectTypes.cs +++ b/src/Umbraco.Core/Constants-ObjectTypes.cs @@ -1,6 +1,6 @@ using System; -namespace Umbraco.Core +namespace Umbraco.Cms.Core { public static partial class Constants { diff --git a/src/Umbraco.Core/Constants-PackageRepository.cs b/src/Umbraco.Core/Constants-PackageRepository.cs index 42cf61f982..96ef39b7c1 100644 --- a/src/Umbraco.Core/Constants-PackageRepository.cs +++ b/src/Umbraco.Core/Constants-PackageRepository.cs @@ -1,4 +1,4 @@ -namespace Umbraco.Core +namespace Umbraco.Cms.Core { public static partial class Constants { diff --git a/src/Umbraco.Core/Constants-PropertyEditors.cs b/src/Umbraco.Core/Constants-PropertyEditors.cs index eb24cf4229..815f85b3a6 100644 --- a/src/Umbraco.Core/Constants-PropertyEditors.cs +++ b/src/Umbraco.Core/Constants-PropertyEditors.cs @@ -1,6 +1,6 @@ -using Umbraco.Core.PropertyEditors; +using Umbraco.Cms.Core.PropertyEditors; -namespace Umbraco.Core +namespace Umbraco.Cms.Core { public static partial class Constants { diff --git a/src/Umbraco.Core/Constants-PropertyTypeGroups.cs b/src/Umbraco.Core/Constants-PropertyTypeGroups.cs index d3402e69f8..a8dc3c84f8 100644 --- a/src/Umbraco.Core/Constants-PropertyTypeGroups.cs +++ b/src/Umbraco.Core/Constants-PropertyTypeGroups.cs @@ -1,4 +1,4 @@ -namespace Umbraco.Core +namespace Umbraco.Cms.Core { public static partial class Constants { diff --git a/src/Umbraco.Core/Constants-Security.cs b/src/Umbraco.Core/Constants-Security.cs index ccb0109ebd..ba0f1e0a37 100644 --- a/src/Umbraco.Core/Constants-Security.cs +++ b/src/Umbraco.Core/Constants-Security.cs @@ -1,4 +1,4 @@ -namespace Umbraco.Core +namespace Umbraco.Cms.Core { public static partial class Constants { diff --git a/src/Umbraco.Core/Constants-SqlTemplates.cs b/src/Umbraco.Core/Constants-SqlTemplates.cs index 5a78b62f5b..116f04925e 100644 --- a/src/Umbraco.Core/Constants-SqlTemplates.cs +++ b/src/Umbraco.Core/Constants-SqlTemplates.cs @@ -1,4 +1,4 @@ -namespace Umbraco.Core +namespace Umbraco.Cms.Core { public static partial class Constants { diff --git a/src/Umbraco.Core/Constants-SvgSanitizer.cs b/src/Umbraco.Core/Constants-SvgSanitizer.cs index c92b9f56c7..048bf404d4 100644 --- a/src/Umbraco.Core/Constants-SvgSanitizer.cs +++ b/src/Umbraco.Core/Constants-SvgSanitizer.cs @@ -1,6 +1,6 @@ using System.Collections.Generic; -namespace Umbraco.Core +namespace Umbraco.Cms.Core { public static partial class Constants { diff --git a/src/Umbraco.Core/Constants-System.cs b/src/Umbraco.Core/Constants-System.cs index 837db01b63..44ee99c420 100644 --- a/src/Umbraco.Core/Constants-System.cs +++ b/src/Umbraco.Core/Constants-System.cs @@ -1,4 +1,4 @@ - namespace Umbraco.Core + namespace Umbraco.Cms.Core { public static partial class Constants { diff --git a/src/Umbraco.Core/Constants-SystemDirectories.cs b/src/Umbraco.Core/Constants-SystemDirectories.cs index 464896edd9..46eab35343 100644 --- a/src/Umbraco.Core/Constants-SystemDirectories.cs +++ b/src/Umbraco.Core/Constants-SystemDirectories.cs @@ -1,4 +1,4 @@ -namespace Umbraco.Core +namespace Umbraco.Cms.Core { public static partial class Constants { diff --git a/src/Umbraco.Core/Constants-UdiEntityType.cs b/src/Umbraco.Core/Constants-UdiEntityType.cs index aaaa47d4b2..01e9ca213d 100644 --- a/src/Umbraco.Core/Constants-UdiEntityType.cs +++ b/src/Umbraco.Core/Constants-UdiEntityType.cs @@ -1,4 +1,4 @@ -namespace Umbraco.Core +namespace Umbraco.Cms.Core { public static partial class Constants { diff --git a/src/Umbraco.Core/Constants-Web.cs b/src/Umbraco.Core/Constants-Web.cs index d63106daf6..13cd7d7ad3 100644 --- a/src/Umbraco.Core/Constants-Web.cs +++ b/src/Umbraco.Core/Constants-Web.cs @@ -1,4 +1,4 @@ -namespace Umbraco.Core +namespace Umbraco.Cms.Core { public static partial class Constants { diff --git a/src/Umbraco.Core/ContentApps/ContentAppFactoryCollection.cs b/src/Umbraco.Core/ContentApps/ContentAppFactoryCollection.cs index 738da5ef60..d8b3e04772 100644 --- a/src/Umbraco.Core/ContentApps/ContentAppFactoryCollection.cs +++ b/src/Umbraco.Core/ContentApps/ContentAppFactoryCollection.cs @@ -1,13 +1,13 @@ using System.Collections.Generic; using System.Linq; using Microsoft.Extensions.Logging; -using Umbraco.Core; -using Umbraco.Core.Composing; -using Umbraco.Core.Models.ContentEditing; -using Umbraco.Core.Models.Membership; -using Umbraco.Core.Security; +using Umbraco.Cms.Core.Composing; +using Umbraco.Cms.Core.Models.ContentEditing; +using Umbraco.Cms.Core.Models.Membership; +using Umbraco.Cms.Core.Security; +using Umbraco.Extensions; -namespace Umbraco.Web.ContentApps +namespace Umbraco.Cms.Core.ContentApps { public class ContentAppFactoryCollection : BuilderCollectionBase { diff --git a/src/Umbraco.Core/ContentApps/ContentAppFactoryCollectionBuilder.cs b/src/Umbraco.Core/ContentApps/ContentAppFactoryCollectionBuilder.cs index 138c426043..3c35054e9b 100644 --- a/src/Umbraco.Core/ContentApps/ContentAppFactoryCollectionBuilder.cs +++ b/src/Umbraco.Core/ContentApps/ContentAppFactoryCollectionBuilder.cs @@ -3,15 +3,13 @@ using System.Collections.Generic; using System.Linq; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Logging; -using Umbraco.Core; -using Umbraco.Core.Composing; -using Umbraco.Core.IO; -using Umbraco.Core.Manifest; -using Umbraco.Core.Models.ContentEditing; -using Umbraco.Core.Models.Identity; -using Umbraco.Core.Security; +using Umbraco.Cms.Core.Composing; +using Umbraco.Cms.Core.IO; +using Umbraco.Cms.Core.Manifest; +using Umbraco.Cms.Core.Models.ContentEditing; +using Umbraco.Cms.Core.Security; -namespace Umbraco.Web.ContentApps +namespace Umbraco.Cms.Core.ContentApps { public class ContentAppFactoryCollectionBuilder : OrderedCollectionBuilderBase { diff --git a/src/Umbraco.Core/ContentApps/ContentEditorContentAppFactory.cs b/src/Umbraco.Core/ContentApps/ContentEditorContentAppFactory.cs index 34652744ee..44cd9d5bbe 100644 --- a/src/Umbraco.Core/ContentApps/ContentEditorContentAppFactory.cs +++ b/src/Umbraco.Core/ContentApps/ContentEditorContentAppFactory.cs @@ -1,11 +1,9 @@ -using System; -using System.Collections.Generic; -using Umbraco.Core; -using Umbraco.Core.Models; -using Umbraco.Core.Models.ContentEditing; -using Umbraco.Core.Models.Membership; +using System.Collections.Generic; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Core.Models.ContentEditing; +using Umbraco.Cms.Core.Models.Membership; -namespace Umbraco.Web.ContentApps +namespace Umbraco.Cms.Core.ContentApps { public class ContentEditorContentAppFactory : IContentAppFactory { diff --git a/src/Umbraco.Core/ContentApps/ContentInfoContentAppFactory.cs b/src/Umbraco.Core/ContentApps/ContentInfoContentAppFactory.cs index abad7f4bf8..865218b134 100644 --- a/src/Umbraco.Core/ContentApps/ContentInfoContentAppFactory.cs +++ b/src/Umbraco.Core/ContentApps/ContentInfoContentAppFactory.cs @@ -1,10 +1,9 @@ -using System; -using System.Collections.Generic; -using Umbraco.Core.Models; -using Umbraco.Core.Models.ContentEditing; -using Umbraco.Core.Models.Membership; +using System.Collections.Generic; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Core.Models.ContentEditing; +using Umbraco.Cms.Core.Models.Membership; -namespace Umbraco.Web.ContentApps +namespace Umbraco.Cms.Core.ContentApps { public class ContentInfoContentAppFactory : IContentAppFactory { diff --git a/src/Umbraco.Core/ContentApps/ContentTypeDesignContentAppFactory.cs b/src/Umbraco.Core/ContentApps/ContentTypeDesignContentAppFactory.cs index 361d59a5d5..dd9502ae63 100644 --- a/src/Umbraco.Core/ContentApps/ContentTypeDesignContentAppFactory.cs +++ b/src/Umbraco.Core/ContentApps/ContentTypeDesignContentAppFactory.cs @@ -1,10 +1,9 @@ -using System; -using System.Collections.Generic; -using Umbraco.Core.Models; -using Umbraco.Core.Models.ContentEditing; -using Umbraco.Core.Models.Membership; +using System.Collections.Generic; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Core.Models.ContentEditing; +using Umbraco.Cms.Core.Models.Membership; -namespace Umbraco.Web.ContentApps +namespace Umbraco.Cms.Core.ContentApps { public class ContentTypeDesignContentAppFactory : IContentAppFactory { diff --git a/src/Umbraco.Core/ContentApps/ContentTypeListViewContentAppFactory.cs b/src/Umbraco.Core/ContentApps/ContentTypeListViewContentAppFactory.cs index a04ab04668..079f639acf 100644 --- a/src/Umbraco.Core/ContentApps/ContentTypeListViewContentAppFactory.cs +++ b/src/Umbraco.Core/ContentApps/ContentTypeListViewContentAppFactory.cs @@ -1,10 +1,9 @@ -using System; -using System.Collections.Generic; -using Umbraco.Core.Models; -using Umbraco.Core.Models.ContentEditing; -using Umbraco.Core.Models.Membership; +using System.Collections.Generic; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Core.Models.ContentEditing; +using Umbraco.Cms.Core.Models.Membership; -namespace Umbraco.Web.ContentApps +namespace Umbraco.Cms.Core.ContentApps { public class ContentTypeListViewContentAppFactory : IContentAppFactory { diff --git a/src/Umbraco.Core/ContentApps/ContentTypePermissionsContentAppFactory.cs b/src/Umbraco.Core/ContentApps/ContentTypePermissionsContentAppFactory.cs index a86c4327fd..872bebda62 100644 --- a/src/Umbraco.Core/ContentApps/ContentTypePermissionsContentAppFactory.cs +++ b/src/Umbraco.Core/ContentApps/ContentTypePermissionsContentAppFactory.cs @@ -1,10 +1,9 @@ -using System; -using System.Collections.Generic; -using Umbraco.Core.Models; -using Umbraco.Core.Models.ContentEditing; -using Umbraco.Core.Models.Membership; +using System.Collections.Generic; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Core.Models.ContentEditing; +using Umbraco.Cms.Core.Models.Membership; -namespace Umbraco.Web.ContentApps +namespace Umbraco.Cms.Core.ContentApps { public class ContentTypePermissionsContentAppFactory : IContentAppFactory { diff --git a/src/Umbraco.Core/ContentApps/ContentTypeTemplatesContentAppFactory.cs b/src/Umbraco.Core/ContentApps/ContentTypeTemplatesContentAppFactory.cs index e20e2ef9c5..38a8fd388e 100644 --- a/src/Umbraco.Core/ContentApps/ContentTypeTemplatesContentAppFactory.cs +++ b/src/Umbraco.Core/ContentApps/ContentTypeTemplatesContentAppFactory.cs @@ -1,10 +1,9 @@ -using System; -using System.Collections.Generic; -using Umbraco.Core.Models; -using Umbraco.Core.Models.ContentEditing; -using Umbraco.Core.Models.Membership; +using System.Collections.Generic; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Core.Models.ContentEditing; +using Umbraco.Cms.Core.Models.Membership; -namespace Umbraco.Web.ContentApps +namespace Umbraco.Cms.Core.ContentApps { public class ContentTypeTemplatesContentAppFactory : IContentAppFactory { diff --git a/src/Umbraco.Core/ContentApps/ListViewContentAppFactory.cs b/src/Umbraco.Core/ContentApps/ListViewContentAppFactory.cs index ada6bb6cd7..e945f7ffd4 100644 --- a/src/Umbraco.Core/ContentApps/ListViewContentAppFactory.cs +++ b/src/Umbraco.Core/ContentApps/ListViewContentAppFactory.cs @@ -1,14 +1,13 @@ using System; using System.Collections.Generic; -using Umbraco.Core; -using Umbraco.Core.Models; -using Umbraco.Core.Models.ContentEditing; -using Umbraco.Core.Models.Membership; -using Umbraco.Core.PropertyEditors; -using Umbraco.Core.Services; -using Umbraco.Web.Models.ContentEditing; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Core.Models.ContentEditing; +using Umbraco.Cms.Core.Models.Membership; +using Umbraco.Cms.Core.PropertyEditors; +using Umbraco.Cms.Core.Services; +using Umbraco.Extensions; -namespace Umbraco.Web.ContentApps +namespace Umbraco.Cms.Core.ContentApps { public class ListViewContentAppFactory : IContentAppFactory { @@ -36,14 +35,14 @@ namespace Umbraco.Web.ContentApps case IContent content: contentTypeAlias = content.ContentType.Alias; entityType = "content"; - dtdId = Core.Constants.DataTypes.DefaultContentListView; + dtdId = Constants.DataTypes.DefaultContentListView; break; - case IMedia media when !media.ContentType.IsContainer && media.ContentType.Alias != Core.Constants.Conventions.MediaTypes.Folder: + case IMedia media when !media.ContentType.IsContainer && media.ContentType.Alias != Constants.Conventions.MediaTypes.Folder: return null; case IMedia media: contentTypeAlias = media.ContentType.Alias; entityType = "media"; - dtdId = Core.Constants.DataTypes.DefaultMediaListView; + dtdId = Constants.DataTypes.DefaultMediaListView; break; default: return null; @@ -72,7 +71,7 @@ namespace Umbraco.Web.ContentApps Weight = Weight }; - var customDtdName = Core.Constants.Conventions.DataTypes.ListViewPrefix + contentTypeAlias; + var customDtdName = Constants.Conventions.DataTypes.ListViewPrefix + contentTypeAlias; //first try to get the custom one if there is one var dt = dataTypeService.GetDataType(customDtdName) @@ -121,7 +120,7 @@ namespace Umbraco.Web.ContentApps { new ContentPropertyDisplay { - Alias = $"{Core.Constants.PropertyEditors.InternalGenericPropertiesPrefix}containerView", + Alias = $"{Constants.PropertyEditors.InternalGenericPropertiesPrefix}containerView", Label = "", Value = null, View = editor.GetValueEditor().View, diff --git a/src/Umbraco.Core/ConventionsHelper.cs b/src/Umbraco.Core/ConventionsHelper.cs index d4b784875b..f5e0b168b9 100644 --- a/src/Umbraco.Core/ConventionsHelper.cs +++ b/src/Umbraco.Core/ConventionsHelper.cs @@ -1,8 +1,8 @@ using System.Collections.Generic; -using Umbraco.Core.Models; -using Umbraco.Core.Strings; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Core.Strings; -namespace Umbraco.Core +namespace Umbraco.Cms.Core { public static class ConventionsHelper { diff --git a/src/Umbraco.Core/CustomBooleanTypeConverter.cs b/src/Umbraco.Core/CustomBooleanTypeConverter.cs index dc4c5472e1..e528b9638d 100644 --- a/src/Umbraco.Core/CustomBooleanTypeConverter.cs +++ b/src/Umbraco.Core/CustomBooleanTypeConverter.cs @@ -1,7 +1,7 @@ using System; using System.ComponentModel; -namespace Umbraco.Core +namespace Umbraco.Cms.Core { /// /// Allows for converting string representations of 0 and 1 to boolean diff --git a/src/Umbraco.Core/Dashboards/AccessRule.cs b/src/Umbraco.Core/Dashboards/AccessRule.cs index 4f725e32f0..b1b5c37bd6 100644 --- a/src/Umbraco.Core/Dashboards/AccessRule.cs +++ b/src/Umbraco.Core/Dashboards/AccessRule.cs @@ -1,4 +1,4 @@ -namespace Umbraco.Core.Dashboards +namespace Umbraco.Cms.Core.Dashboards { /// /// Implements . diff --git a/src/Umbraco.Core/Dashboards/AccessRuleType.cs b/src/Umbraco.Core/Dashboards/AccessRuleType.cs index efed361f6c..103d944de8 100644 --- a/src/Umbraco.Core/Dashboards/AccessRuleType.cs +++ b/src/Umbraco.Core/Dashboards/AccessRuleType.cs @@ -1,4 +1,4 @@ -namespace Umbraco.Core.Dashboards +namespace Umbraco.Cms.Core.Dashboards { /// /// Defines dashboard access rules type. diff --git a/src/Umbraco.Core/Dashboards/ContentDashboard.cs b/src/Umbraco.Core/Dashboards/ContentDashboard.cs index 0cd96f738c..b959851cc7 100644 --- a/src/Umbraco.Core/Dashboards/ContentDashboard.cs +++ b/src/Umbraco.Core/Dashboards/ContentDashboard.cs @@ -1,8 +1,6 @@ -using Umbraco.Core; -using Umbraco.Core.Composing; -using Umbraco.Core.Dashboards; +using Umbraco.Cms.Core.Composing; -namespace Umbraco.Web.Dashboards +namespace Umbraco.Cms.Core.Dashboards { [Weight(10)] public class ContentDashboard : IDashboard diff --git a/src/Umbraco.Core/Dashboards/DashboardCollection.cs b/src/Umbraco.Core/Dashboards/DashboardCollection.cs index 616a2cc8cc..9fa13f1d3d 100644 --- a/src/Umbraco.Core/Dashboards/DashboardCollection.cs +++ b/src/Umbraco.Core/Dashboards/DashboardCollection.cs @@ -1,8 +1,7 @@ using System.Collections.Generic; -using Umbraco.Core.Composing; -using Umbraco.Core.Dashboards; +using Umbraco.Cms.Core.Composing; -namespace Umbraco.Web.Dashboards +namespace Umbraco.Cms.Core.Dashboards { public class DashboardCollection : BuilderCollectionBase { diff --git a/src/Umbraco.Core/Dashboards/DashboardCollectionBuilder.cs b/src/Umbraco.Core/Dashboards/DashboardCollectionBuilder.cs index 7ed241b819..9fc60ce111 100644 --- a/src/Umbraco.Core/Dashboards/DashboardCollectionBuilder.cs +++ b/src/Umbraco.Core/Dashboards/DashboardCollectionBuilder.cs @@ -2,12 +2,11 @@ using System.Collections.Generic; using System.Linq; using Microsoft.Extensions.DependencyInjection; -using Umbraco.Core; -using Umbraco.Core.Composing; -using Umbraco.Core.Dashboards; -using Umbraco.Core.Manifest; +using Umbraco.Cms.Core.Composing; +using Umbraco.Cms.Core.Manifest; +using Umbraco.Extensions; -namespace Umbraco.Web.Dashboards +namespace Umbraco.Cms.Core.Dashboards { public class DashboardCollectionBuilder : WeightedCollectionBuilderBase { diff --git a/src/Umbraco.Core/Dashboards/DashboardSlim.cs b/src/Umbraco.Core/Dashboards/DashboardSlim.cs index a2869a90a2..2b39c91100 100644 --- a/src/Umbraco.Core/Dashboards/DashboardSlim.cs +++ b/src/Umbraco.Core/Dashboards/DashboardSlim.cs @@ -1,6 +1,6 @@ using System.Runtime.Serialization; -namespace Umbraco.Core.Dashboards +namespace Umbraco.Cms.Core.Dashboards { [DataContract(IsReference = true)] public class DashboardSlim : IDashboardSlim diff --git a/src/Umbraco.Core/Dashboards/ExamineDashboard.cs b/src/Umbraco.Core/Dashboards/ExamineDashboard.cs index 47cf97ca3b..5411f1d3ce 100644 --- a/src/Umbraco.Core/Dashboards/ExamineDashboard.cs +++ b/src/Umbraco.Core/Dashboards/ExamineDashboard.cs @@ -1,8 +1,7 @@ using System; -using Umbraco.Core.Composing; -using Umbraco.Core.Dashboards; +using Umbraco.Cms.Core.Composing; -namespace Umbraco.Web.Dashboards +namespace Umbraco.Cms.Core.Dashboards { [Weight(20)] public class ExamineDashboard : IDashboard diff --git a/src/Umbraco.Core/Dashboards/FormsDashboard.cs b/src/Umbraco.Core/Dashboards/FormsDashboard.cs index 867e8af3aa..c56ad7c51a 100644 --- a/src/Umbraco.Core/Dashboards/FormsDashboard.cs +++ b/src/Umbraco.Core/Dashboards/FormsDashboard.cs @@ -1,9 +1,7 @@ using System; -using Umbraco.Core; -using Umbraco.Core.Composing; -using Umbraco.Core.Dashboards; +using Umbraco.Cms.Core.Composing; -namespace Umbraco.Web.Dashboards +namespace Umbraco.Cms.Core.Dashboards { [Weight(10)] public class FormsDashboard : IDashboard diff --git a/src/Umbraco.Core/Dashboards/HealthCheckDashboard.cs b/src/Umbraco.Core/Dashboards/HealthCheckDashboard.cs index 746dd04439..24b4efaf6d 100644 --- a/src/Umbraco.Core/Dashboards/HealthCheckDashboard.cs +++ b/src/Umbraco.Core/Dashboards/HealthCheckDashboard.cs @@ -1,8 +1,7 @@ using System; -using Umbraco.Core.Composing; -using Umbraco.Core.Dashboards; +using Umbraco.Cms.Core.Composing; -namespace Umbraco.Web.Dashboards +namespace Umbraco.Cms.Core.Dashboards { [Weight(50)] public class HealthCheckDashboard : IDashboard diff --git a/src/Umbraco.Core/Dashboards/IAccessRule.cs b/src/Umbraco.Core/Dashboards/IAccessRule.cs index f44a846248..13d118e195 100644 --- a/src/Umbraco.Core/Dashboards/IAccessRule.cs +++ b/src/Umbraco.Core/Dashboards/IAccessRule.cs @@ -1,4 +1,4 @@ -namespace Umbraco.Core.Dashboards +namespace Umbraco.Cms.Core.Dashboards { /// /// Represents an access rule. diff --git a/src/Umbraco.Core/Dashboards/IDashboard.cs b/src/Umbraco.Core/Dashboards/IDashboard.cs index 6e429d9b40..41a60cb518 100644 --- a/src/Umbraco.Core/Dashboards/IDashboard.cs +++ b/src/Umbraco.Core/Dashboards/IDashboard.cs @@ -1,7 +1,6 @@ using System.Runtime.Serialization; -using Umbraco.Core.Composing; -namespace Umbraco.Core.Dashboards +namespace Umbraco.Cms.Core.Dashboards { /// /// Represents a dashboard. diff --git a/src/Umbraco.Core/Dashboards/IDashboardSlim.cs b/src/Umbraco.Core/Dashboards/IDashboardSlim.cs index 655f56dfd9..c85b969b83 100644 --- a/src/Umbraco.Core/Dashboards/IDashboardSlim.cs +++ b/src/Umbraco.Core/Dashboards/IDashboardSlim.cs @@ -1,6 +1,6 @@ using System.Runtime.Serialization; -namespace Umbraco.Core.Dashboards +namespace Umbraco.Cms.Core.Dashboards { /// /// Represents a dashboard with only minimal data. @@ -19,4 +19,4 @@ namespace Umbraco.Core.Dashboards [DataMember(Name = "view")] string View { get; } } -} \ No newline at end of file +} diff --git a/src/Umbraco.Core/Dashboards/MediaDashboard.cs b/src/Umbraco.Core/Dashboards/MediaDashboard.cs index c97ae298f3..acbad0bc2a 100644 --- a/src/Umbraco.Core/Dashboards/MediaDashboard.cs +++ b/src/Umbraco.Core/Dashboards/MediaDashboard.cs @@ -1,8 +1,7 @@ using System; -using Umbraco.Core.Composing; -using Umbraco.Core.Dashboards; +using Umbraco.Cms.Core.Composing; -namespace Umbraco.Web.Dashboards +namespace Umbraco.Cms.Core.Dashboards { [Weight(10)] public class MediaDashboard : IDashboard diff --git a/src/Umbraco.Core/Dashboards/MembersDashboard.cs b/src/Umbraco.Core/Dashboards/MembersDashboard.cs index 473722dce1..3023d63b8a 100644 --- a/src/Umbraco.Core/Dashboards/MembersDashboard.cs +++ b/src/Umbraco.Core/Dashboards/MembersDashboard.cs @@ -1,8 +1,7 @@ using System; -using Umbraco.Core.Composing; -using Umbraco.Core.Dashboards; +using Umbraco.Cms.Core.Composing; -namespace Umbraco.Web.Dashboards +namespace Umbraco.Cms.Core.Dashboards { [Weight(10)] public class MembersDashboard : IDashboard diff --git a/src/Umbraco.ModelsBuilder.Embedded/ModelsBuilderDashboard.cs b/src/Umbraco.Core/Dashboards/ModelsBuilderDashboard.cs similarity index 78% rename from src/Umbraco.ModelsBuilder.Embedded/ModelsBuilderDashboard.cs rename to src/Umbraco.Core/Dashboards/ModelsBuilderDashboard.cs index 867b22d14b..9ba5c9dd0c 100644 --- a/src/Umbraco.ModelsBuilder.Embedded/ModelsBuilderDashboard.cs +++ b/src/Umbraco.Core/Dashboards/ModelsBuilderDashboard.cs @@ -1,8 +1,7 @@ using System; -using Umbraco.Core.Composing; -using Umbraco.Core.Dashboards; +using Umbraco.Cms.Core.Composing; -namespace Umbraco.ModelsBuilder.Embedded +namespace Umbraco.Cms.Core.Dashboards { [Weight(40)] public class ModelsBuilderDashboard : IDashboard diff --git a/src/Umbraco.Core/Dashboards/ProfilerDashboard.cs b/src/Umbraco.Core/Dashboards/ProfilerDashboard.cs index 98cd7fcc92..7a3829209f 100644 --- a/src/Umbraco.Core/Dashboards/ProfilerDashboard.cs +++ b/src/Umbraco.Core/Dashboards/ProfilerDashboard.cs @@ -1,8 +1,7 @@ using System; -using Umbraco.Core.Composing; -using Umbraco.Core.Dashboards; +using Umbraco.Cms.Core.Composing; -namespace Umbraco.Web.Dashboards +namespace Umbraco.Cms.Core.Dashboards { [Weight(60)] public class ProfilerDashboard : IDashboard diff --git a/src/Umbraco.Core/Dashboards/PublishedStatusDashboard.cs b/src/Umbraco.Core/Dashboards/PublishedStatusDashboard.cs index 66faa20b55..5cae4594f7 100644 --- a/src/Umbraco.Core/Dashboards/PublishedStatusDashboard.cs +++ b/src/Umbraco.Core/Dashboards/PublishedStatusDashboard.cs @@ -1,8 +1,7 @@ using System; -using Umbraco.Core.Composing; -using Umbraco.Core.Dashboards; +using Umbraco.Cms.Core.Composing; -namespace Umbraco.Web.Dashboards +namespace Umbraco.Cms.Core.Dashboards { [Weight(30)] public class PublishedStatusDashboard : IDashboard diff --git a/src/Umbraco.Core/Dashboards/RedirectUrlDashboard.cs b/src/Umbraco.Core/Dashboards/RedirectUrlDashboard.cs index f538cbc122..15eb883697 100644 --- a/src/Umbraco.Core/Dashboards/RedirectUrlDashboard.cs +++ b/src/Umbraco.Core/Dashboards/RedirectUrlDashboard.cs @@ -1,8 +1,7 @@ using System; -using Umbraco.Core.Composing; -using Umbraco.Core.Dashboards; +using Umbraco.Cms.Core.Composing; -namespace Umbraco.Web.Dashboards +namespace Umbraco.Cms.Core.Dashboards { [Weight(20)] public class RedirectUrlDashboard : IDashboard diff --git a/src/Umbraco.Core/Dashboards/SettingsDashboards.cs b/src/Umbraco.Core/Dashboards/SettingsDashboards.cs index 5cd92e4c3f..e5f37fd5a3 100644 --- a/src/Umbraco.Core/Dashboards/SettingsDashboards.cs +++ b/src/Umbraco.Core/Dashboards/SettingsDashboards.cs @@ -1,8 +1,7 @@ using System; -using Umbraco.Core.Composing; -using Umbraco.Core.Dashboards; +using Umbraco.Cms.Core.Composing; -namespace Umbraco.Web.Dashboards +namespace Umbraco.Cms.Core.Dashboards { [Weight(10)] public class SettingsDashboard : IDashboard diff --git a/src/Umbraco.Core/DefaultEventMessagesFactory.cs b/src/Umbraco.Core/DefaultEventMessagesFactory.cs index 0d53645b5e..b795045f32 100644 --- a/src/Umbraco.Core/DefaultEventMessagesFactory.cs +++ b/src/Umbraco.Core/DefaultEventMessagesFactory.cs @@ -1,7 +1,7 @@ using System; -using Umbraco.Core.Events; +using Umbraco.Cms.Core.Events; -namespace Umbraco.Web +namespace Umbraco.Cms.Core { public class DefaultEventMessagesFactory : IEventMessagesFactory { diff --git a/src/Umbraco.Core/DelegateEqualityComparer.cs b/src/Umbraco.Core/DelegateEqualityComparer.cs index dae990c635..6aabbf62f4 100644 --- a/src/Umbraco.Core/DelegateEqualityComparer.cs +++ b/src/Umbraco.Core/DelegateEqualityComparer.cs @@ -1,7 +1,7 @@ using System; using System.Collections.Generic; -namespace Umbraco.Core +namespace Umbraco.Cms.Core { /// /// A custom equality comparer that excepts a delegate to do the comparison operation diff --git a/src/Umbraco.Core/DependencyInjection/IUmbracoBuilder.cs b/src/Umbraco.Core/DependencyInjection/IUmbracoBuilder.cs index f532f8cdaa..0b65c3443c 100644 --- a/src/Umbraco.Core/DependencyInjection/IUmbracoBuilder.cs +++ b/src/Umbraco.Core/DependencyInjection/IUmbracoBuilder.cs @@ -1,9 +1,9 @@ using Microsoft.Extensions.Configuration; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Logging; -using Umbraco.Core.Composing; +using Umbraco.Cms.Core.Composing; -namespace Umbraco.Core.DependencyInjection +namespace Umbraco.Cms.Core.DependencyInjection { public interface IUmbracoBuilder { diff --git a/src/Umbraco.Core/DependencyInjection/ServiceCollectionExtensions.cs b/src/Umbraco.Core/DependencyInjection/ServiceCollectionExtensions.cs index 97e70da9be..cec1cbb4eb 100644 --- a/src/Umbraco.Core/DependencyInjection/ServiceCollectionExtensions.cs +++ b/src/Umbraco.Core/DependencyInjection/ServiceCollectionExtensions.cs @@ -1,10 +1,9 @@ using System; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.DependencyInjection.Extensions; -using Umbraco.Core; -using Umbraco.Core.Composing; +using Umbraco.Cms.Core.Composing; -namespace Umbraco.Core.DependencyInjection +namespace Umbraco.Extensions { public static class ServiceCollectionExtensions { diff --git a/src/Umbraco.Core/DependencyInjection/ServiceProviderExtensions.cs b/src/Umbraco.Core/DependencyInjection/ServiceProviderExtensions.cs index 2c17709b33..9bcc0cf7f8 100644 --- a/src/Umbraco.Core/DependencyInjection/ServiceProviderExtensions.cs +++ b/src/Umbraco.Core/DependencyInjection/ServiceProviderExtensions.cs @@ -3,10 +3,10 @@ using System.Collections.Generic; using System.ComponentModel; using System.Linq; using Microsoft.Extensions.DependencyInjection; -using Umbraco.Core.Composing; -using Umbraco.Core.Models.PublishedContent; +using Umbraco.Cms.Core.Composing; +using Umbraco.Cms.Core.Models.PublishedContent; -namespace Umbraco.Core.DependencyInjection +namespace Umbraco.Extensions { /// /// Provides extension methods to the class. diff --git a/src/Umbraco.Core/DependencyInjection/UmbracoBuilder.Collections.cs b/src/Umbraco.Core/DependencyInjection/UmbracoBuilder.Collections.cs index e964852129..61802eaddd 100644 --- a/src/Umbraco.Core/DependencyInjection/UmbracoBuilder.Collections.cs +++ b/src/Umbraco.Core/DependencyInjection/UmbracoBuilder.Collections.cs @@ -1,24 +1,24 @@ -using Umbraco.Core.Cache; -using Umbraco.Core.Composing; -using Umbraco.Core.Dashboards; -using Umbraco.Core.HealthChecks; -using Umbraco.Core.HealthChecks.NotificationMethods; -using Umbraco.Core.Manifest; -using Umbraco.Core.PackageActions; -using Umbraco.Core.PropertyEditors; -using Umbraco.Core.PropertyEditors.Validators; -using Umbraco.Core.Strings; -using Umbraco.Core.Trees; -using Umbraco.Web.Actions; -using Umbraco.Web.ContentApps; -using Umbraco.Web.Dashboards; -using Umbraco.Web.Editors; -using Umbraco.Web.Media.EmbedProviders; -using Umbraco.Web.Routing; -using Umbraco.Web.Sections; -using Umbraco.Web.Tour; +using Umbraco.Cms.Core.Actions; +using Umbraco.Cms.Core.Cache; +using Umbraco.Cms.Core.Composing; +using Umbraco.Cms.Core.ContentApps; +using Umbraco.Cms.Core.Dashboards; +using Umbraco.Cms.Core.Editors; +using Umbraco.Cms.Core.HealthChecks; +using Umbraco.Cms.Core.HealthChecks.NotificationMethods; +using Umbraco.Cms.Core.Manifest; +using Umbraco.Cms.Core.Media.EmbedProviders; +using Umbraco.Cms.Core.PackageActions; +using Umbraco.Cms.Core.PropertyEditors; +using Umbraco.Cms.Core.PropertyEditors.Validators; +using Umbraco.Cms.Core.Routing; +using Umbraco.Cms.Core.Sections; +using Umbraco.Cms.Core.Strings; +using Umbraco.Cms.Core.Tour; +using Umbraco.Cms.Core.Trees; +using Umbraco.Extensions; -namespace Umbraco.Core.DependencyInjection +namespace Umbraco.Cms.Core.DependencyInjection { /// /// Extension methods for @@ -44,7 +44,7 @@ namespace Umbraco.Core.DependencyInjection .Append(); // all built-in finders in the correct order, // devs can then modify this list on application startup - builder.ContentFinders() + builder.ContentFinders() .Append() .Append() .Append() diff --git a/src/Umbraco.Core/DependencyInjection/UmbracoBuilder.Composers.cs b/src/Umbraco.Core/DependencyInjection/UmbracoBuilder.Composers.cs index 5bd2fe9e8c..b6f9e7ae88 100644 --- a/src/Umbraco.Core/DependencyInjection/UmbracoBuilder.Composers.cs +++ b/src/Umbraco.Core/DependencyInjection/UmbracoBuilder.Composers.cs @@ -1,9 +1,9 @@ using System; using System.Collections.Generic; using Microsoft.Extensions.Logging; -using Umbraco.Core.Composing; +using Umbraco.Cms.Core.Composing; -namespace Umbraco.Core.DependencyInjection +namespace Umbraco.Cms.Core.DependencyInjection { /// /// Extension methods for diff --git a/src/Umbraco.Core/DependencyInjection/UmbracoBuilder.Configuration.cs b/src/Umbraco.Core/DependencyInjection/UmbracoBuilder.Configuration.cs index a31a44beeb..f987e29eac 100644 --- a/src/Umbraco.Core/DependencyInjection/UmbracoBuilder.Configuration.cs +++ b/src/Umbraco.Core/DependencyInjection/UmbracoBuilder.Configuration.cs @@ -1,9 +1,9 @@ using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Options; -using Umbraco.Core.Configuration.Models; -using Umbraco.Core.Configuration.Models.Validation; +using Umbraco.Cms.Core.Configuration.Models; +using Umbraco.Cms.Core.Configuration.Models.Validation; -namespace Umbraco.Core.DependencyInjection +namespace Umbraco.Cms.Core.DependencyInjection { /// /// Extension methods for @@ -22,29 +22,29 @@ namespace Umbraco.Core.DependencyInjection builder.Services.AddSingleton, RequestHandlerSettingsValidator>(); // Register configuration sections. - builder.Services.Configure(builder.Config.GetSection(Core.Constants.Configuration.ConfigActiveDirectory)); + builder.Services.Configure(builder.Config.GetSection(Constants.Configuration.ConfigActiveDirectory)); builder.Services.Configure(builder.Config.GetSection("ConnectionStrings"), o => o.BindNonPublicProperties = true); - builder.Services.Configure(builder.Config.GetSection(Core.Constants.Configuration.ConfigContent)); - builder.Services.Configure(builder.Config.GetSection(Core.Constants.Configuration.ConfigCoreDebug)); - builder.Services.Configure(builder.Config.GetSection(Core.Constants.Configuration.ConfigExceptionFilter)); - builder.Services.Configure(builder.Config.GetSection(Core.Constants.Configuration.ConfigGlobal)); - builder.Services.Configure(builder.Config.GetSection(Core.Constants.Configuration.ConfigHealthChecks)); - builder.Services.Configure(builder.Config.GetSection(Core.Constants.Configuration.ConfigHosting)); - builder.Services.Configure(builder.Config.GetSection(Core.Constants.Configuration.ConfigImaging)); - builder.Services.Configure(builder.Config.GetSection(Core.Constants.Configuration.ConfigExamine)); - builder.Services.Configure(builder.Config.GetSection(Core.Constants.Configuration.ConfigKeepAlive)); - builder.Services.Configure(builder.Config.GetSection(Core.Constants.Configuration.ConfigLogging)); - builder.Services.Configure(builder.Config.GetSection(Core.Constants.Configuration.ConfigMemberPassword)); - builder.Services.Configure(builder.Config.GetSection(Core.Constants.Configuration.ConfigModelsBuilder), o => o.BindNonPublicProperties = true); - builder.Services.Configure(builder.Config.GetSection(Core.Constants.Configuration.ConfigNuCache)); - builder.Services.Configure(builder.Config.GetSection(Core.Constants.Configuration.ConfigRequestHandler)); - builder.Services.Configure(builder.Config.GetSection(Core.Constants.Configuration.ConfigRuntime)); - builder.Services.Configure(builder.Config.GetSection(Core.Constants.Configuration.ConfigSecurity)); - builder.Services.Configure(builder.Config.GetSection(Core.Constants.Configuration.ConfigTours)); - builder.Services.Configure(builder.Config.GetSection(Core.Constants.Configuration.ConfigTypeFinder)); - builder.Services.Configure(builder.Config.GetSection(Core.Constants.Configuration.ConfigUserPassword)); - builder.Services.Configure(builder.Config.GetSection(Core.Constants.Configuration.ConfigWebRouting)); - builder.Services.Configure(builder.Config.GetSection(Core.Constants.Configuration.ConfigPlugins)); + builder.Services.Configure(builder.Config.GetSection(Constants.Configuration.ConfigContent)); + builder.Services.Configure(builder.Config.GetSection(Constants.Configuration.ConfigCoreDebug)); + builder.Services.Configure(builder.Config.GetSection(Constants.Configuration.ConfigExceptionFilter)); + builder.Services.Configure(builder.Config.GetSection(Constants.Configuration.ConfigGlobal)); + builder.Services.Configure(builder.Config.GetSection(Constants.Configuration.ConfigHealthChecks)); + builder.Services.Configure(builder.Config.GetSection(Constants.Configuration.ConfigHosting)); + builder.Services.Configure(builder.Config.GetSection(Constants.Configuration.ConfigImaging)); + builder.Services.Configure(builder.Config.GetSection(Constants.Configuration.ConfigExamine)); + builder.Services.Configure(builder.Config.GetSection(Constants.Configuration.ConfigKeepAlive)); + builder.Services.Configure(builder.Config.GetSection(Constants.Configuration.ConfigLogging)); + builder.Services.Configure(builder.Config.GetSection(Constants.Configuration.ConfigMemberPassword)); + builder.Services.Configure(builder.Config.GetSection(Constants.Configuration.ConfigModelsBuilder), o => o.BindNonPublicProperties = true); + builder.Services.Configure(builder.Config.GetSection(Constants.Configuration.ConfigNuCache)); + builder.Services.Configure(builder.Config.GetSection(Constants.Configuration.ConfigRequestHandler)); + builder.Services.Configure(builder.Config.GetSection(Constants.Configuration.ConfigRuntime)); + builder.Services.Configure(builder.Config.GetSection(Constants.Configuration.ConfigSecurity)); + builder.Services.Configure(builder.Config.GetSection(Constants.Configuration.ConfigTours)); + builder.Services.Configure(builder.Config.GetSection(Constants.Configuration.ConfigTypeFinder)); + builder.Services.Configure(builder.Config.GetSection(Constants.Configuration.ConfigUserPassword)); + builder.Services.Configure(builder.Config.GetSection(Constants.Configuration.ConfigWebRouting)); + builder.Services.Configure(builder.Config.GetSection(Constants.Configuration.ConfigPlugins)); return builder; } diff --git a/src/Umbraco.Core/DependencyInjection/UmbracoBuilder.Events.cs b/src/Umbraco.Core/DependencyInjection/UmbracoBuilder.Events.cs index c5bdb20b40..586f1d7d99 100644 --- a/src/Umbraco.Core/DependencyInjection/UmbracoBuilder.Events.cs +++ b/src/Umbraco.Core/DependencyInjection/UmbracoBuilder.Events.cs @@ -2,9 +2,9 @@ // See LICENSE for more details. using Microsoft.Extensions.DependencyInjection; -using Umbraco.Core.Events; +using Umbraco.Cms.Core.Events; -namespace Umbraco.Core.DependencyInjection +namespace Umbraco.Cms.Core.DependencyInjection { /// diff --git a/src/Umbraco.Core/DependencyInjection/UmbracoBuilder.cs b/src/Umbraco.Core/DependencyInjection/UmbracoBuilder.cs index a31e36db69..5249676fb6 100644 --- a/src/Umbraco.Core/DependencyInjection/UmbracoBuilder.cs +++ b/src/Umbraco.Core/DependencyInjection/UmbracoBuilder.cs @@ -3,44 +3,40 @@ using System; using System.Collections.Generic; -using System.Linq; using System.Runtime.InteropServices; using Microsoft.Extensions.Configuration; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Logging; using Microsoft.Extensions.Logging.Abstractions; using Microsoft.Extensions.Options; -using Umbraco.Core.Cache; -using Umbraco.Core.Composing; -using Umbraco.Core.Configuration; -using Umbraco.Core.Configuration.Grid; -using Umbraco.Core.Configuration.Models; -using Umbraco.Core.Diagnostics; -using Umbraco.Core.Dictionary; -using Umbraco.Core.Events; -using Umbraco.Core.Hosting; -using Umbraco.Core.IO; -using Umbraco.Core.Logging; -using Umbraco.Core.Mail; -using Umbraco.Core.Manifest; -using Umbraco.Core.Models.PublishedContent; -using Umbraco.Core.PropertyEditors; -using Umbraco.Core.Routing; -using Umbraco.Core.Runtime; -using Umbraco.Core.Security; -using Umbraco.Core.Services; -using Umbraco.Core.Sync; -using Umbraco.Web; -using Umbraco.Web.Cache; -using Umbraco.Web.Editors; -using Umbraco.Web.Features; -using Umbraco.Web.Install; -using Umbraco.Web.Models.PublishedContent; -using Umbraco.Web.Routing; -using Umbraco.Web.Services; -using Umbraco.Web.Templates; +using Umbraco.Cms.Core.Cache; +using Umbraco.Cms.Core.Composing; +using Umbraco.Cms.Core.Configuration; +using Umbraco.Cms.Core.Configuration.Grid; +using Umbraco.Cms.Core.Configuration.Models; +using Umbraco.Cms.Core.Diagnostics; +using Umbraco.Cms.Core.Dictionary; +using Umbraco.Cms.Core.Editors; +using Umbraco.Cms.Core.Events; +using Umbraco.Cms.Core.Features; +using Umbraco.Cms.Core.Hosting; +using Umbraco.Cms.Core.Install; +using Umbraco.Cms.Core.IO; +using Umbraco.Cms.Core.Logging; +using Umbraco.Cms.Core.Mail; +using Umbraco.Cms.Core.Manifest; +using Umbraco.Cms.Core.Models.PublishedContent; +using Umbraco.Cms.Core.PropertyEditors; +using Umbraco.Cms.Core.Routing; +using Umbraco.Cms.Core.Runtime; +using Umbraco.Cms.Core.Security; +using Umbraco.Cms.Core.Services; +using Umbraco.Cms.Core.Sync; +using Umbraco.Cms.Core.Templates; +using Umbraco.Cms.Core.Web; +using Umbraco.Extensions; -namespace Umbraco.Core.DependencyInjection +namespace Umbraco.Cms.Core.DependencyInjection { public class UmbracoBuilder : IUmbracoBuilder { diff --git a/src/Umbraco.Core/DependencyInjection/UniqueServiceDescriptor.cs b/src/Umbraco.Core/DependencyInjection/UniqueServiceDescriptor.cs index 1d01d632a6..f0fc5b14c9 100644 --- a/src/Umbraco.Core/DependencyInjection/UniqueServiceDescriptor.cs +++ b/src/Umbraco.Core/DependencyInjection/UniqueServiceDescriptor.cs @@ -5,7 +5,7 @@ using System; using System.Collections.Generic; using Microsoft.Extensions.DependencyInjection; -namespace Umbraco.Core.DependencyInjection +namespace Umbraco.Cms.Core.DependencyInjection { /// /// A custom that supports unique checking diff --git a/src/Umbraco.Core/Deploy/ArtifactBase.cs b/src/Umbraco.Core/Deploy/ArtifactBase.cs index 432726699e..7c6f4c1814 100644 --- a/src/Umbraco.Core/Deploy/ArtifactBase.cs +++ b/src/Umbraco.Core/Deploy/ArtifactBase.cs @@ -3,7 +3,7 @@ using System.Collections.Generic; using System.Linq; using System.Runtime.Serialization; -namespace Umbraco.Core.Deploy +namespace Umbraco.Cms.Core.Deploy { /// /// Provides a base class to all artifacts. diff --git a/src/Umbraco.Core/Deploy/ArtifactDependency.cs b/src/Umbraco.Core/Deploy/ArtifactDependency.cs index 374772210c..618400e395 100644 --- a/src/Umbraco.Core/Deploy/ArtifactDependency.cs +++ b/src/Umbraco.Core/Deploy/ArtifactDependency.cs @@ -1,4 +1,4 @@ -namespace Umbraco.Core.Deploy +namespace Umbraco.Cms.Core.Deploy { /// /// Represents an artifact dependency. diff --git a/src/Umbraco.Core/Deploy/ArtifactDependencyCollection.cs b/src/Umbraco.Core/Deploy/ArtifactDependencyCollection.cs index c447dbcde2..a5fff53800 100644 --- a/src/Umbraco.Core/Deploy/ArtifactDependencyCollection.cs +++ b/src/Umbraco.Core/Deploy/ArtifactDependencyCollection.cs @@ -2,7 +2,7 @@ using System.Collections; using System.Collections.Generic; -namespace Umbraco.Core.Deploy +namespace Umbraco.Cms.Core.Deploy { /// /// Represents a collection of distinct . diff --git a/src/Umbraco.Core/Deploy/ArtifactDependencyMode.cs b/src/Umbraco.Core/Deploy/ArtifactDependencyMode.cs index c285a5f9fb..7a2d108a13 100644 --- a/src/Umbraco.Core/Deploy/ArtifactDependencyMode.cs +++ b/src/Umbraco.Core/Deploy/ArtifactDependencyMode.cs @@ -1,4 +1,4 @@ -namespace Umbraco.Core.Deploy +namespace Umbraco.Cms.Core.Deploy { /// /// Indicates the mode of the dependency. diff --git a/src/Umbraco.Core/Deploy/ArtifactDeployState.cs b/src/Umbraco.Core/Deploy/ArtifactDeployState.cs index ede6801953..edd958c346 100644 --- a/src/Umbraco.Core/Deploy/ArtifactDeployState.cs +++ b/src/Umbraco.Core/Deploy/ArtifactDeployState.cs @@ -1,4 +1,4 @@ -namespace Umbraco.Core.Deploy +namespace Umbraco.Cms.Core.Deploy { /// /// Represent the state of an artifact being deployed. diff --git a/src/Umbraco.Core/Deploy/ArtifactDeployStateOfTArtifactTEntity.cs b/src/Umbraco.Core/Deploy/ArtifactDeployStateOfTArtifactTEntity.cs index 6d7a51b383..b0d7dd56b8 100644 --- a/src/Umbraco.Core/Deploy/ArtifactDeployStateOfTArtifactTEntity.cs +++ b/src/Umbraco.Core/Deploy/ArtifactDeployStateOfTArtifactTEntity.cs @@ -1,4 +1,4 @@ -namespace Umbraco.Core.Deploy +namespace Umbraco.Cms.Core.Deploy { /// /// Represent the state of an artifact being deployed. diff --git a/src/Umbraco.Core/Deploy/ArtifactSignature.cs b/src/Umbraco.Core/Deploy/ArtifactSignature.cs index 219e27140e..e0e4dab1ac 100644 --- a/src/Umbraco.Core/Deploy/ArtifactSignature.cs +++ b/src/Umbraco.Core/Deploy/ArtifactSignature.cs @@ -1,7 +1,7 @@ using System.Collections.Generic; using System.Linq; -namespace Umbraco.Core.Deploy +namespace Umbraco.Cms.Core.Deploy { public sealed class ArtifactSignature : IArtifactSignature { diff --git a/src/Umbraco.Core/Deploy/Difference.cs b/src/Umbraco.Core/Deploy/Difference.cs index 05d7c66013..f45f14f8e6 100644 --- a/src/Umbraco.Core/Deploy/Difference.cs +++ b/src/Umbraco.Core/Deploy/Difference.cs @@ -1,4 +1,4 @@ -namespace Umbraco.Core.Deploy +namespace Umbraco.Cms.Core.Deploy { public class Difference { diff --git a/src/Umbraco.Core/Deploy/Direction.cs b/src/Umbraco.Core/Deploy/Direction.cs index 4d87afa3a0..7a6ee5ae09 100644 --- a/src/Umbraco.Core/Deploy/Direction.cs +++ b/src/Umbraco.Core/Deploy/Direction.cs @@ -1,4 +1,4 @@ -namespace Umbraco.Core.Deploy +namespace Umbraco.Cms.Core.Deploy { public enum Direction { diff --git a/src/Umbraco.Core/Deploy/IArtifact.cs b/src/Umbraco.Core/Deploy/IArtifact.cs index 0668047fea..7712e53afa 100644 --- a/src/Umbraco.Core/Deploy/IArtifact.cs +++ b/src/Umbraco.Core/Deploy/IArtifact.cs @@ -1,4 +1,4 @@ -namespace Umbraco.Core.Deploy +namespace Umbraco.Cms.Core.Deploy { /// /// Represents an artifact ie an object that can be transfered between environments. diff --git a/src/Umbraco.Core/Deploy/IArtifactSignature.cs b/src/Umbraco.Core/Deploy/IArtifactSignature.cs index 287b70a8f4..ae856866d9 100644 --- a/src/Umbraco.Core/Deploy/IArtifactSignature.cs +++ b/src/Umbraco.Core/Deploy/IArtifactSignature.cs @@ -1,6 +1,6 @@ using System.Collections.Generic; -namespace Umbraco.Core.Deploy +namespace Umbraco.Cms.Core.Deploy { /// /// Represents the signature of an artifact. diff --git a/src/Umbraco.Core/Deploy/IDataTypeConfigurationConnector.cs b/src/Umbraco.Core/Deploy/IDataTypeConfigurationConnector.cs index 3a673e92a2..548a6d80f1 100644 --- a/src/Umbraco.Core/Deploy/IDataTypeConfigurationConnector.cs +++ b/src/Umbraco.Core/Deploy/IDataTypeConfigurationConnector.cs @@ -1,8 +1,8 @@ using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; -using Umbraco.Core.Models; +using Umbraco.Cms.Core.Models; -namespace Umbraco.Core.Deploy +namespace Umbraco.Cms.Core.Deploy { /// /// Defines methods that can convert data type configuration to / from an environment-agnostic string. diff --git a/src/Umbraco.Core/Deploy/IDeployContext.cs b/src/Umbraco.Core/Deploy/IDeployContext.cs index 01d1a8e98c..c2a3a39d1e 100644 --- a/src/Umbraco.Core/Deploy/IDeployContext.cs +++ b/src/Umbraco.Core/Deploy/IDeployContext.cs @@ -1,8 +1,7 @@ using System; using System.Collections.Generic; -using System.Threading; -namespace Umbraco.Core.Deploy +namespace Umbraco.Cms.Core.Deploy { /// /// Represents a deployment context. diff --git a/src/Umbraco.Core/Deploy/IFileSource.cs b/src/Umbraco.Core/Deploy/IFileSource.cs index e789e0bf24..6e582803a2 100644 --- a/src/Umbraco.Core/Deploy/IFileSource.cs +++ b/src/Umbraco.Core/Deploy/IFileSource.cs @@ -3,7 +3,7 @@ using System.IO; using System.Threading; using System.Threading.Tasks; -namespace Umbraco.Core.Deploy +namespace Umbraco.Cms.Core.Deploy { /// /// Represents a file source, ie a mean for a target environment involved in a diff --git a/src/Umbraco.Core/Deploy/IFileType.cs b/src/Umbraco.Core/Deploy/IFileType.cs index f7ab22ffae..ef6c44e1e6 100644 --- a/src/Umbraco.Core/Deploy/IFileType.cs +++ b/src/Umbraco.Core/Deploy/IFileType.cs @@ -2,7 +2,7 @@ using System.Threading; using System.Threading.Tasks; -namespace Umbraco.Core.Deploy +namespace Umbraco.Cms.Core.Deploy { public interface IFileType { diff --git a/src/Umbraco.Core/Deploy/IFileTypeCollection.cs b/src/Umbraco.Core/Deploy/IFileTypeCollection.cs index 9e2ab137d1..d19d2ad64a 100644 --- a/src/Umbraco.Core/Deploy/IFileTypeCollection.cs +++ b/src/Umbraco.Core/Deploy/IFileTypeCollection.cs @@ -1,4 +1,4 @@ -namespace Umbraco.Core.Deploy +namespace Umbraco.Cms.Core.Deploy { public interface IFileTypeCollection { diff --git a/src/Umbraco.Core/Deploy/IImageSourceParser.cs b/src/Umbraco.Core/Deploy/IImageSourceParser.cs index 061125955c..a15b45f40b 100644 --- a/src/Umbraco.Core/Deploy/IImageSourceParser.cs +++ b/src/Umbraco.Core/Deploy/IImageSourceParser.cs @@ -1,6 +1,6 @@ using System.Collections.Generic; -namespace Umbraco.Core.Deploy +namespace Umbraco.Cms.Core.Deploy { /// /// Provides methods to parse image tag sources in property values. diff --git a/src/Umbraco.Core/Deploy/ILocalLinkParser.cs b/src/Umbraco.Core/Deploy/ILocalLinkParser.cs index d6d68ed81d..f807b9604f 100644 --- a/src/Umbraco.Core/Deploy/ILocalLinkParser.cs +++ b/src/Umbraco.Core/Deploy/ILocalLinkParser.cs @@ -1,6 +1,6 @@ using System.Collections.Generic; -namespace Umbraco.Core.Deploy +namespace Umbraco.Cms.Core.Deploy { /// /// Provides methods to parse local link tags in property values. diff --git a/src/Umbraco.Core/Deploy/IMacroParser.cs b/src/Umbraco.Core/Deploy/IMacroParser.cs index 725cd6c88e..622a4abc1b 100644 --- a/src/Umbraco.Core/Deploy/IMacroParser.cs +++ b/src/Umbraco.Core/Deploy/IMacroParser.cs @@ -1,6 +1,6 @@ using System.Collections.Generic; -namespace Umbraco.Core.Deploy +namespace Umbraco.Cms.Core.Deploy { public interface IMacroParser { diff --git a/src/Umbraco.Core/Deploy/IServiceConnector.cs b/src/Umbraco.Core/Deploy/IServiceConnector.cs index a0fc274236..3a57f722cf 100644 --- a/src/Umbraco.Core/Deploy/IServiceConnector.cs +++ b/src/Umbraco.Core/Deploy/IServiceConnector.cs @@ -1,7 +1,7 @@ using System.Collections.Generic; -using Umbraco.Core.Composing; +using Umbraco.Cms.Core.Composing; -namespace Umbraco.Core.Deploy +namespace Umbraco.Cms.Core.Deploy { /// /// Connects to an Umbraco service. diff --git a/src/Umbraco.Core/Deploy/IUniqueIdentifyingServiceConnector.cs b/src/Umbraco.Core/Deploy/IUniqueIdentifyingServiceConnector.cs index a657ba78b6..66364a08f3 100644 --- a/src/Umbraco.Core/Deploy/IUniqueIdentifyingServiceConnector.cs +++ b/src/Umbraco.Core/Deploy/IUniqueIdentifyingServiceConnector.cs @@ -1,4 +1,4 @@ -namespace Umbraco.Core.Deploy +namespace Umbraco.Cms.Core.Deploy { /// /// Provides a method to retrieve an artifact's unique identifier. diff --git a/src/Umbraco.Core/Deploy/IValueConnector.cs b/src/Umbraco.Core/Deploy/IValueConnector.cs index 5329725663..b7ba2e4096 100644 --- a/src/Umbraco.Core/Deploy/IValueConnector.cs +++ b/src/Umbraco.Core/Deploy/IValueConnector.cs @@ -1,7 +1,7 @@ using System.Collections.Generic; -using Umbraco.Core.Models; +using Umbraco.Cms.Core.Models; -namespace Umbraco.Core.Deploy +namespace Umbraco.Cms.Core.Deploy { /// /// Defines methods that can convert a property value to / from an environment-agnostic string. diff --git a/src/Umbraco.Core/Diagnostics/IMarchal.cs b/src/Umbraco.Core/Diagnostics/IMarchal.cs index cde4592b1b..988eaca78c 100644 --- a/src/Umbraco.Core/Diagnostics/IMarchal.cs +++ b/src/Umbraco.Core/Diagnostics/IMarchal.cs @@ -1,6 +1,6 @@ using System; -namespace Umbraco.Core.Diagnostics +namespace Umbraco.Cms.Core.Diagnostics { /// /// Provides a collection of methods for allocating unmanaged memory, copying unmanaged memory blocks, and converting managed to unmanaged types, as well as other miscellaneous methods used when interacting with unmanaged code. diff --git a/src/Umbraco.Core/Diagnostics/MiniDump.cs b/src/Umbraco.Core/Diagnostics/MiniDump.cs index 51f595bfb2..da5a729148 100644 --- a/src/Umbraco.Core/Diagnostics/MiniDump.cs +++ b/src/Umbraco.Core/Diagnostics/MiniDump.cs @@ -2,9 +2,9 @@ using System; using System.Diagnostics; using System.IO; using System.Runtime.InteropServices; -using Umbraco.Core.Hosting; +using Umbraco.Cms.Core.Hosting; -namespace Umbraco.Core.Diagnostics +namespace Umbraco.Cms.Core.Diagnostics { // taken from https://blogs.msdn.microsoft.com/dondu/2010/10/24/writing-minidumps-in-c/ // and https://blogs.msdn.microsoft.com/dondu/2010/10/31/writing-minidumps-from-exceptions-in-c/ diff --git a/src/Umbraco.Core/Diagnostics/NoopMarchal.cs b/src/Umbraco.Core/Diagnostics/NoopMarchal.cs index 09629f9595..273a4fb32c 100644 --- a/src/Umbraco.Core/Diagnostics/NoopMarchal.cs +++ b/src/Umbraco.Core/Diagnostics/NoopMarchal.cs @@ -1,6 +1,6 @@ using System; -namespace Umbraco.Core.Diagnostics +namespace Umbraco.Cms.Core.Diagnostics { internal class NoopMarchal : IMarchal { diff --git a/src/Umbraco.Core/Dictionary/ICultureDictionary.cs b/src/Umbraco.Core/Dictionary/ICultureDictionary.cs index d03a5dfa73..9a6898c18d 100644 --- a/src/Umbraco.Core/Dictionary/ICultureDictionary.cs +++ b/src/Umbraco.Core/Dictionary/ICultureDictionary.cs @@ -1,8 +1,7 @@ -using System; -using System.Collections.Generic; +using System.Collections.Generic; using System.Globalization; -namespace Umbraco.Core.Dictionary +namespace Umbraco.Cms.Core.Dictionary { /// /// Represents a dictionary based on a specific culture diff --git a/src/Umbraco.Core/Dictionary/ICultureDictionaryFactory.cs b/src/Umbraco.Core/Dictionary/ICultureDictionaryFactory.cs index 8f94de4394..40fbb1bad8 100644 --- a/src/Umbraco.Core/Dictionary/ICultureDictionaryFactory.cs +++ b/src/Umbraco.Core/Dictionary/ICultureDictionaryFactory.cs @@ -1,4 +1,4 @@ -namespace Umbraco.Core.Dictionary +namespace Umbraco.Cms.Core.Dictionary { public interface ICultureDictionaryFactory { diff --git a/src/Umbraco.Core/Dictionary/UmbracoCultureDictionary.cs b/src/Umbraco.Core/Dictionary/UmbracoCultureDictionary.cs index 1f23ec645c..d06989b6f8 100644 --- a/src/Umbraco.Core/Dictionary/UmbracoCultureDictionary.cs +++ b/src/Umbraco.Core/Dictionary/UmbracoCultureDictionary.cs @@ -2,13 +2,13 @@ using System.Collections.Generic; using System.Globalization; using System.Linq; -using Umbraco.Core.Cache; -using Umbraco.Core.Models; -using Umbraco.Core.Services; +using Umbraco.Cms.Core.Cache; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Core.Services; +using Umbraco.Extensions; -namespace Umbraco.Core.Dictionary +namespace Umbraco.Cms.Core.Dictionary { - /// /// A culture dictionary that uses the Umbraco ILocalizationService /// diff --git a/src/Umbraco.Core/Dictionary/UmbracoCultureDictionaryFactory.cs b/src/Umbraco.Core/Dictionary/UmbracoCultureDictionaryFactory.cs index e2e30f3d76..8713e338ea 100644 --- a/src/Umbraco.Core/Dictionary/UmbracoCultureDictionaryFactory.cs +++ b/src/Umbraco.Core/Dictionary/UmbracoCultureDictionaryFactory.cs @@ -1,7 +1,7 @@ -using Umbraco.Core.Cache; -using Umbraco.Core.Services; +using Umbraco.Cms.Core.Cache; +using Umbraco.Cms.Core.Services; -namespace Umbraco.Core.Dictionary +namespace Umbraco.Cms.Core.Dictionary { /// /// A culture dictionary factory used to create an Umbraco.Core.Dictionary.ICultureDictionary. diff --git a/src/Umbraco.Core/Direction.cs b/src/Umbraco.Core/Direction.cs index 7d3906ffd0..152a3663fd 100644 --- a/src/Umbraco.Core/Direction.cs +++ b/src/Umbraco.Core/Direction.cs @@ -1,4 +1,4 @@ -namespace Umbraco.Core +namespace Umbraco.Cms.Core { public enum Direction { diff --git a/src/Umbraco.Core/DisposableObjectSlim.cs b/src/Umbraco.Core/DisposableObjectSlim.cs index 6874ad8001..4304098324 100644 --- a/src/Umbraco.Core/DisposableObjectSlim.cs +++ b/src/Umbraco.Core/DisposableObjectSlim.cs @@ -1,6 +1,6 @@ using System; -namespace Umbraco.Core +namespace Umbraco.Cms.Core { /// /// Abstract implementation of managed IDisposable. diff --git a/src/Umbraco.Core/Editors/BackOfficePreviewModel.cs b/src/Umbraco.Core/Editors/BackOfficePreviewModel.cs index 40d145afb0..74cc590e83 100644 --- a/src/Umbraco.Core/Editors/BackOfficePreviewModel.cs +++ b/src/Umbraco.Core/Editors/BackOfficePreviewModel.cs @@ -1,8 +1,8 @@ using System.Collections.Generic; -using Umbraco.Core.Models; -using Umbraco.Web.Features; +using Umbraco.Cms.Core.Features; +using Umbraco.Cms.Core.Models; -namespace Umbraco.Web.Editors +namespace Umbraco.Cms.Core.Editors { public class BackOfficePreviewModel { diff --git a/src/Umbraco.Core/Editors/EditorModelEventArgs.cs b/src/Umbraco.Core/Editors/EditorModelEventArgs.cs index 24ee1a3d85..da7f0ba9cb 100644 --- a/src/Umbraco.Core/Editors/EditorModelEventArgs.cs +++ b/src/Umbraco.Core/Editors/EditorModelEventArgs.cs @@ -1,6 +1,7 @@ using System; +using Umbraco.Cms.Core.Web; -namespace Umbraco.Web.Editors +namespace Umbraco.Cms.Core.Editors { public sealed class EditorModelEventArgs : EditorModelEventArgs { diff --git a/src/Umbraco.Core/Editors/EditorValidatorCollection.cs b/src/Umbraco.Core/Editors/EditorValidatorCollection.cs index 0e42b0027c..3b07be5553 100644 --- a/src/Umbraco.Core/Editors/EditorValidatorCollection.cs +++ b/src/Umbraco.Core/Editors/EditorValidatorCollection.cs @@ -1,10 +1,7 @@ using System.Collections.Generic; -using System.ComponentModel.DataAnnotations; -using System.Linq; -using Umbraco.Core; -using Umbraco.Core.Composing; +using Umbraco.Cms.Core.Composing; -namespace Umbraco.Web.Editors +namespace Umbraco.Cms.Core.Editors { public class EditorValidatorCollection : BuilderCollectionBase { diff --git a/src/Umbraco.Core/Editors/EditorValidatorCollectionBuilder.cs b/src/Umbraco.Core/Editors/EditorValidatorCollectionBuilder.cs index 994a813cf4..223778b79d 100644 --- a/src/Umbraco.Core/Editors/EditorValidatorCollectionBuilder.cs +++ b/src/Umbraco.Core/Editors/EditorValidatorCollectionBuilder.cs @@ -1,6 +1,6 @@ -using Umbraco.Core.Composing; +using Umbraco.Cms.Core.Composing; -namespace Umbraco.Web.Editors +namespace Umbraco.Cms.Core.Editors { public class EditorValidatorCollectionBuilder : LazyCollectionBuilderBase { diff --git a/src/Umbraco.Core/Editors/EditorValidatorOfT.cs b/src/Umbraco.Core/Editors/EditorValidatorOfT.cs index 715a49179e..a70509237a 100644 --- a/src/Umbraco.Core/Editors/EditorValidatorOfT.cs +++ b/src/Umbraco.Core/Editors/EditorValidatorOfT.cs @@ -2,7 +2,7 @@ using System.Collections.Generic; using System.ComponentModel.DataAnnotations; -namespace Umbraco.Web.Editors +namespace Umbraco.Cms.Core.Editors { /// /// Provides a base class for implementations. diff --git a/src/Umbraco.Core/Editors/IEditorValidator.cs b/src/Umbraco.Core/Editors/IEditorValidator.cs index 2d655e3506..17bb195e4b 100644 --- a/src/Umbraco.Core/Editors/IEditorValidator.cs +++ b/src/Umbraco.Core/Editors/IEditorValidator.cs @@ -1,9 +1,9 @@ using System; using System.Collections.Generic; using System.ComponentModel.DataAnnotations; -using Umbraco.Core.Composing; +using Umbraco.Cms.Core.Composing; -namespace Umbraco.Web.Editors +namespace Umbraco.Cms.Core.Editors { // note - about IEditorValidator // diff --git a/src/Umbraco.Core/Editors/UserEditorAuthorizationHelper.cs b/src/Umbraco.Core/Editors/UserEditorAuthorizationHelper.cs index d8a5f675b2..0ecbdbd4ab 100644 --- a/src/Umbraco.Core/Editors/UserEditorAuthorizationHelper.cs +++ b/src/Umbraco.Core/Editors/UserEditorAuthorizationHelper.cs @@ -1,12 +1,15 @@ -using System.Collections.Generic; -using System.Linq; -using Umbraco.Core; -using Umbraco.Core.Models; -using Umbraco.Core.Models.Membership; -using Umbraco.Core.Security; -using Umbraco.Core.Services; +// Copyright (c) Umbraco. +// See LICENSE for more details. -namespace Umbraco.Web.Editors +using System.Collections.Generic; +using System.Linq; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Core.Models.Membership; +using Umbraco.Cms.Core.Security; +using Umbraco.Cms.Core.Services; +using Umbraco.Extensions; + +namespace Umbraco.Cms.Core.Editors { public class UserEditorAuthorizationHelper { diff --git a/src/Umbraco.Core/Enum.cs b/src/Umbraco.Core/Enum.cs index 36fa3898cb..8e2beca025 100644 --- a/src/Umbraco.Core/Enum.cs +++ b/src/Umbraco.Core/Enum.cs @@ -2,7 +2,7 @@ using System.Collections.Generic; using System.Linq; -namespace Umbraco.Core +namespace Umbraco.Cms.Core { /// /// Provides utility methods for handling enumerations. diff --git a/src/Umbraco.Core/Events/CancellableEnumerableObjectEventArgs.cs b/src/Umbraco.Core/Events/CancellableEnumerableObjectEventArgs.cs index 1d52d0d847..e70338b3bc 100644 --- a/src/Umbraco.Core/Events/CancellableEnumerableObjectEventArgs.cs +++ b/src/Umbraco.Core/Events/CancellableEnumerableObjectEventArgs.cs @@ -2,7 +2,7 @@ using System.Collections.Generic; using System.Linq; -namespace Umbraco.Core.Events +namespace Umbraco.Cms.Core.Events { /// /// Represents event data, for events that support cancellation, and expose impacted objects. diff --git a/src/Umbraco.Core/Events/CancellableEventArgs.cs b/src/Umbraco.Core/Events/CancellableEventArgs.cs index 2aa693147d..a6be7fa3e8 100644 --- a/src/Umbraco.Core/Events/CancellableEventArgs.cs +++ b/src/Umbraco.Core/Events/CancellableEventArgs.cs @@ -2,7 +2,7 @@ using System.Collections.Generic; using System.Collections.ObjectModel; -namespace Umbraco.Core.Events +namespace Umbraco.Cms.Core.Events { /// /// Represents event data for events that support cancellation. diff --git a/src/Umbraco.Core/Events/CancellableObjectEventArgs.cs b/src/Umbraco.Core/Events/CancellableObjectEventArgs.cs index 1d47e9fd95..9c96732888 100644 --- a/src/Umbraco.Core/Events/CancellableObjectEventArgs.cs +++ b/src/Umbraco.Core/Events/CancellableObjectEventArgs.cs @@ -1,6 +1,6 @@ using System.Collections.Generic; -namespace Umbraco.Core.Events +namespace Umbraco.Cms.Core.Events { /// /// Provides a base class for classes representing event data, for events that support cancellation, and expose an impacted object. diff --git a/src/Umbraco.Core/Events/CancellableObjectEventArgsOfTEventObject.cs b/src/Umbraco.Core/Events/CancellableObjectEventArgsOfTEventObject.cs index ace2ce0a4f..1d90effe2a 100644 --- a/src/Umbraco.Core/Events/CancellableObjectEventArgsOfTEventObject.cs +++ b/src/Umbraco.Core/Events/CancellableObjectEventArgsOfTEventObject.cs @@ -1,7 +1,7 @@ using System; using System.Collections.Generic; -namespace Umbraco.Core.Events +namespace Umbraco.Cms.Core.Events { /// /// Represent event data, for events that support cancellation, and expose an impacted object. diff --git a/src/Umbraco.Core/Events/ContentCacheEventArgs.cs b/src/Umbraco.Core/Events/ContentCacheEventArgs.cs index fd0adb4570..78f714f754 100644 --- a/src/Umbraco.Core/Events/ContentCacheEventArgs.cs +++ b/src/Umbraco.Core/Events/ContentCacheEventArgs.cs @@ -1,4 +1,4 @@ -namespace Umbraco.Core.Events +namespace Umbraco.Cms.Core.Events { public class ContentCacheEventArgs : System.ComponentModel.CancelEventArgs { } } diff --git a/src/Umbraco.Core/Events/ContentPublishedEventArgs.cs b/src/Umbraco.Core/Events/ContentPublishedEventArgs.cs index 8c0690d591..ceec857c64 100644 --- a/src/Umbraco.Core/Events/ContentPublishedEventArgs.cs +++ b/src/Umbraco.Core/Events/ContentPublishedEventArgs.cs @@ -1,7 +1,7 @@ using System.Collections.Generic; -using Umbraco.Core.Models; +using Umbraco.Cms.Core.Models; -namespace Umbraco.Core.Events +namespace Umbraco.Cms.Core.Events { /// /// Represents event data for the Published event. @@ -25,6 +25,6 @@ namespace Umbraco.Core.Events /// Determines whether a culture has been unpublished, during a Published event. /// public bool HasUnpublishedCulture(IContent content, string culture) - => content.WasPropertyDirty(ContentBase.ChangeTrackingPrefix.UnpublishedCulture + culture); + => content.WasPropertyDirty(ContentBase.ChangeTrackingPrefix.UnpublishedCulture + culture); } } diff --git a/src/Umbraco.Core/Events/ContentPublishingEventArgs.cs b/src/Umbraco.Core/Events/ContentPublishingEventArgs.cs index b64bb19def..e7893ea195 100644 --- a/src/Umbraco.Core/Events/ContentPublishingEventArgs.cs +++ b/src/Umbraco.Core/Events/ContentPublishingEventArgs.cs @@ -1,7 +1,7 @@ using System.Collections.Generic; -using Umbraco.Core.Models; +using Umbraco.Cms.Core.Models; -namespace Umbraco.Core.Events +namespace Umbraco.Cms.Core.Events { /// /// Represents event data for the Publishing event. diff --git a/src/Umbraco.Core/Events/ContentSavedEventArgs.cs b/src/Umbraco.Core/Events/ContentSavedEventArgs.cs index e2d8c25dd1..554330563a 100644 --- a/src/Umbraco.Core/Events/ContentSavedEventArgs.cs +++ b/src/Umbraco.Core/Events/ContentSavedEventArgs.cs @@ -1,7 +1,7 @@ using System.Collections.Generic; -using Umbraco.Core.Models; +using Umbraco.Cms.Core.Models; -namespace Umbraco.Core.Events +namespace Umbraco.Cms.Core.Events { /// /// Represents event data for the Saved event. diff --git a/src/Umbraco.Core/Events/ContentSavingEventArgs.cs b/src/Umbraco.Core/Events/ContentSavingEventArgs.cs index 384353ee2e..b1cded2eb4 100644 --- a/src/Umbraco.Core/Events/ContentSavingEventArgs.cs +++ b/src/Umbraco.Core/Events/ContentSavingEventArgs.cs @@ -1,7 +1,7 @@ using System.Collections.Generic; -using Umbraco.Core.Models; +using Umbraco.Cms.Core.Models; -namespace Umbraco.Core.Events +namespace Umbraco.Cms.Core.Events { /// /// Represent event data for the Saving event. diff --git a/src/Umbraco.Core/Events/CopyEventArgs.cs b/src/Umbraco.Core/Events/CopyEventArgs.cs index d2d39e0ba9..c4985513cb 100644 --- a/src/Umbraco.Core/Events/CopyEventArgs.cs +++ b/src/Umbraco.Core/Events/CopyEventArgs.cs @@ -1,7 +1,7 @@ using System; using System.Collections.Generic; -namespace Umbraco.Core.Events +namespace Umbraco.Cms.Core.Events { public class CopyEventArgs : CancellableObjectEventArgs, IEquatable> { diff --git a/src/Umbraco.Core/Events/DatabaseCreationEventArgs.cs b/src/Umbraco.Core/Events/DatabaseCreationEventArgs.cs index 514ca68d41..15e36f21e7 100644 --- a/src/Umbraco.Core/Events/DatabaseCreationEventArgs.cs +++ b/src/Umbraco.Core/Events/DatabaseCreationEventArgs.cs @@ -1,4 +1,4 @@ -namespace Umbraco.Core.Events +namespace Umbraco.Cms.Core.Events { public class DatabaseCreationEventArgs : System.ComponentModel.CancelEventArgs{} } diff --git a/src/Umbraco.Core/Events/DeleteEventArgs.cs b/src/Umbraco.Core/Events/DeleteEventArgs.cs index 5be669886e..0a3f76eeb8 100644 --- a/src/Umbraco.Core/Events/DeleteEventArgs.cs +++ b/src/Umbraco.Core/Events/DeleteEventArgs.cs @@ -2,7 +2,7 @@ using System.Collections.Generic; using System.Linq; -namespace Umbraco.Core.Events +namespace Umbraco.Cms.Core.Events { [SupersedeEvent(typeof(SaveEventArgs<>))] [SupersedeEvent(typeof(PublishEventArgs<>))] diff --git a/src/Umbraco.Core/Events/DeleteRevisionsEventArgs.cs b/src/Umbraco.Core/Events/DeleteRevisionsEventArgs.cs index 46fdfc6f93..a7eb48107e 100644 --- a/src/Umbraco.Core/Events/DeleteRevisionsEventArgs.cs +++ b/src/Umbraco.Core/Events/DeleteRevisionsEventArgs.cs @@ -1,6 +1,6 @@ using System; -namespace Umbraco.Core.Events +namespace Umbraco.Cms.Core.Events { public class DeleteRevisionsEventArgs : DeleteEventArgs, IEquatable { diff --git a/src/Umbraco.Core/Events/EventAggregator.Notifications.cs b/src/Umbraco.Core/Events/EventAggregator.Notifications.cs index faadc2fc59..859edd4997 100644 --- a/src/Umbraco.Core/Events/EventAggregator.Notifications.cs +++ b/src/Umbraco.Core/Events/EventAggregator.Notifications.cs @@ -8,7 +8,7 @@ using System.Linq; using System.Threading; using System.Threading.Tasks; -namespace Umbraco.Core.Events +namespace Umbraco.Cms.Core.Events { /// /// Contains types and methods that allow publishing general notifications. diff --git a/src/Umbraco.Core/Events/EventAggregator.cs b/src/Umbraco.Core/Events/EventAggregator.cs index 33c8c3aa4f..edb97c1672 100644 --- a/src/Umbraco.Core/Events/EventAggregator.cs +++ b/src/Umbraco.Core/Events/EventAggregator.cs @@ -6,7 +6,7 @@ using System.Collections.Generic; using System.Threading; using System.Threading.Tasks; -namespace Umbraco.Core.Events +namespace Umbraco.Cms.Core.Events { /// /// A factory method used to resolve all services. diff --git a/src/Umbraco.Core/Events/EventDefinition.cs b/src/Umbraco.Core/Events/EventDefinition.cs index e8da5aec3d..9502fac332 100644 --- a/src/Umbraco.Core/Events/EventDefinition.cs +++ b/src/Umbraco.Core/Events/EventDefinition.cs @@ -1,6 +1,6 @@ using System; -namespace Umbraco.Core.Events +namespace Umbraco.Cms.Core.Events { public class EventDefinition : EventDefinitionBase { diff --git a/src/Umbraco.Core/Events/EventDefinitionBase.cs b/src/Umbraco.Core/Events/EventDefinitionBase.cs index b61d00d75f..3fc6040c71 100644 --- a/src/Umbraco.Core/Events/EventDefinitionBase.cs +++ b/src/Umbraco.Core/Events/EventDefinitionBase.cs @@ -1,7 +1,8 @@ using System; using System.Reflection; +using Umbraco.Extensions; -namespace Umbraco.Core.Events +namespace Umbraco.Cms.Core.Events { public abstract class EventDefinitionBase : IEventDefinition, IEquatable { diff --git a/src/Umbraco.Core/Events/EventDefinitionFilter.cs b/src/Umbraco.Core/Events/EventDefinitionFilter.cs index 36838a1e3c..47b0f9a44e 100644 --- a/src/Umbraco.Core/Events/EventDefinitionFilter.cs +++ b/src/Umbraco.Core/Events/EventDefinitionFilter.cs @@ -1,4 +1,4 @@ -namespace Umbraco.Core.Events +namespace Umbraco.Cms.Core.Events { /// /// The filter used in the GetEvents method which determines diff --git a/src/Umbraco.Core/Events/EventExtensions.cs b/src/Umbraco.Core/Events/EventExtensions.cs index d1c8dde5fb..4d98cbbcca 100644 --- a/src/Umbraco.Core/Events/EventExtensions.cs +++ b/src/Umbraco.Core/Events/EventExtensions.cs @@ -1,6 +1,6 @@ using System; -namespace Umbraco.Core.Events +namespace Umbraco.Cms.Core.Events { /// /// Extension methods for cancellable event operations diff --git a/src/Umbraco.Core/Events/EventMessage.cs b/src/Umbraco.Core/Events/EventMessage.cs index e3bf0a6f66..eef0985c23 100644 --- a/src/Umbraco.Core/Events/EventMessage.cs +++ b/src/Umbraco.Core/Events/EventMessage.cs @@ -1,4 +1,4 @@ -namespace Umbraco.Core.Events +namespace Umbraco.Cms.Core.Events { /// /// An event message diff --git a/src/Umbraco.Core/Events/EventMessageType.cs b/src/Umbraco.Core/Events/EventMessageType.cs index c112312ee6..afbed0d590 100644 --- a/src/Umbraco.Core/Events/EventMessageType.cs +++ b/src/Umbraco.Core/Events/EventMessageType.cs @@ -1,4 +1,4 @@ -namespace Umbraco.Core.Events +namespace Umbraco.Cms.Core.Events { /// /// The type of event message diff --git a/src/Umbraco.Core/Events/EventMessages.cs b/src/Umbraco.Core/Events/EventMessages.cs index 6f2bf5b736..23b40118c7 100644 --- a/src/Umbraco.Core/Events/EventMessages.cs +++ b/src/Umbraco.Core/Events/EventMessages.cs @@ -1,6 +1,6 @@ using System.Collections.Generic; -namespace Umbraco.Core.Events +namespace Umbraco.Cms.Core.Events { /// /// Event messages collection diff --git a/src/Umbraco.Core/Events/EventNameExtractor.cs b/src/Umbraco.Core/Events/EventNameExtractor.cs index b8274d4c70..cbff67d491 100644 --- a/src/Umbraco.Core/Events/EventNameExtractor.cs +++ b/src/Umbraco.Core/Events/EventNameExtractor.cs @@ -4,7 +4,7 @@ using System.Linq; using System.Reflection; using System.Text.RegularExpressions; -namespace Umbraco.Core.Events +namespace Umbraco.Cms.Core.Events { /// /// There is actually no way to discover an event name in c# at the time of raising the event. It is possible diff --git a/src/Umbraco.Core/Events/EventNameExtractorError.cs b/src/Umbraco.Core/Events/EventNameExtractorError.cs index c39029fc72..8a506f9071 100644 --- a/src/Umbraco.Core/Events/EventNameExtractorError.cs +++ b/src/Umbraco.Core/Events/EventNameExtractorError.cs @@ -1,4 +1,4 @@ -namespace Umbraco.Core.Events +namespace Umbraco.Cms.Core.Events { public enum EventNameExtractorError { diff --git a/src/Umbraco.Core/Events/EventNameExtractorResult.cs b/src/Umbraco.Core/Events/EventNameExtractorResult.cs index 70be9966c0..bdfd884401 100644 --- a/src/Umbraco.Core/Events/EventNameExtractorResult.cs +++ b/src/Umbraco.Core/Events/EventNameExtractorResult.cs @@ -1,4 +1,4 @@ -namespace Umbraco.Core.Events +namespace Umbraco.Cms.Core.Events { public class EventNameExtractorResult { diff --git a/src/Umbraco.Core/Events/ExportedMemberEventArgs.cs b/src/Umbraco.Core/Events/ExportedMemberEventArgs.cs index 45b4366677..2026f41ff3 100644 --- a/src/Umbraco.Core/Events/ExportedMemberEventArgs.cs +++ b/src/Umbraco.Core/Events/ExportedMemberEventArgs.cs @@ -1,8 +1,8 @@ using System; -using Umbraco.Core.Models; -using Umbraco.Core.Models.Membership; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Core.Models.Membership; -namespace Umbraco.Core.Events +namespace Umbraco.Cms.Core.Events { public class ExportedMemberEventArgs : EventArgs { diff --git a/src/Umbraco.Core/Events/IDeletingMediaFilesEventArgs.cs b/src/Umbraco.Core/Events/IDeletingMediaFilesEventArgs.cs index b221e9d447..9a6a4357e0 100644 --- a/src/Umbraco.Core/Events/IDeletingMediaFilesEventArgs.cs +++ b/src/Umbraco.Core/Events/IDeletingMediaFilesEventArgs.cs @@ -1,6 +1,6 @@ using System.Collections.Generic; -namespace Umbraco.Core.Events +namespace Umbraco.Cms.Core.Events { public interface IDeletingMediaFilesEventArgs { diff --git a/src/Umbraco.Core/Events/IEventAggregator.cs b/src/Umbraco.Core/Events/IEventAggregator.cs index 0d8905dd62..82cc1a68ca 100644 --- a/src/Umbraco.Core/Events/IEventAggregator.cs +++ b/src/Umbraco.Core/Events/IEventAggregator.cs @@ -4,7 +4,7 @@ using System.Threading; using System.Threading.Tasks; -namespace Umbraco.Core.Events +namespace Umbraco.Cms.Core.Events { /// /// Defines an object that channels events from multiple objects into a single object diff --git a/src/Umbraco.Core/Events/IEventDefinition.cs b/src/Umbraco.Core/Events/IEventDefinition.cs index 2afab1ee0f..09985f833a 100644 --- a/src/Umbraco.Core/Events/IEventDefinition.cs +++ b/src/Umbraco.Core/Events/IEventDefinition.cs @@ -1,6 +1,4 @@ -using System; - -namespace Umbraco.Core.Events +namespace Umbraco.Cms.Core.Events { public interface IEventDefinition { diff --git a/src/Umbraco.Core/Events/IEventDispatcher.cs b/src/Umbraco.Core/Events/IEventDispatcher.cs index 9d2c12ceac..84e522761c 100644 --- a/src/Umbraco.Core/Events/IEventDispatcher.cs +++ b/src/Umbraco.Core/Events/IEventDispatcher.cs @@ -1,7 +1,7 @@ using System; using System.Collections.Generic; -namespace Umbraco.Core.Events +namespace Umbraco.Cms.Core.Events { /// /// Dispatches events from within a scope. diff --git a/src/Umbraco.Core/Events/IEventMessagesAccessor.cs b/src/Umbraco.Core/Events/IEventMessagesAccessor.cs index be4603a285..7d95ae1cb5 100644 --- a/src/Umbraco.Core/Events/IEventMessagesAccessor.cs +++ b/src/Umbraco.Core/Events/IEventMessagesAccessor.cs @@ -1,4 +1,4 @@ -namespace Umbraco.Core.Events +namespace Umbraco.Cms.Core.Events { public interface IEventMessagesAccessor { diff --git a/src/Umbraco.Core/Events/IEventMessagesFactory.cs b/src/Umbraco.Core/Events/IEventMessagesFactory.cs index c35539b658..6b3e4fe0af 100644 --- a/src/Umbraco.Core/Events/IEventMessagesFactory.cs +++ b/src/Umbraco.Core/Events/IEventMessagesFactory.cs @@ -1,6 +1,4 @@ -using System.Collections.Generic; - -namespace Umbraco.Core.Events +namespace Umbraco.Cms.Core.Events { /// /// Event messages factory diff --git a/src/Umbraco.Core/Events/INotification.cs b/src/Umbraco.Core/Events/INotification.cs index 3030b0836f..734e9343cf 100644 --- a/src/Umbraco.Core/Events/INotification.cs +++ b/src/Umbraco.Core/Events/INotification.cs @@ -1,7 +1,7 @@ // Copyright (c) Umbraco. // See LICENSE for more details. -namespace Umbraco.Core.Events +namespace Umbraco.Cms.Core.Events { /// /// A marker interface to represent a notification. diff --git a/src/Umbraco.Core/Events/INotificationHandler.cs b/src/Umbraco.Core/Events/INotificationHandler.cs index 4cfe52e005..25aea986c6 100644 --- a/src/Umbraco.Core/Events/INotificationHandler.cs +++ b/src/Umbraco.Core/Events/INotificationHandler.cs @@ -4,7 +4,7 @@ using System.Threading; using System.Threading.Tasks; -namespace Umbraco.Core.Events +namespace Umbraco.Cms.Core.Events { /// /// Defines a handler for a notification. diff --git a/src/Umbraco.Core/Events/ImportPackageEventArgs.cs b/src/Umbraco.Core/Events/ImportPackageEventArgs.cs index a044cd71b3..5b04bff318 100644 --- a/src/Umbraco.Core/Events/ImportPackageEventArgs.cs +++ b/src/Umbraco.Core/Events/ImportPackageEventArgs.cs @@ -1,9 +1,8 @@ using System; using System.Collections.Generic; -using System.ComponentModel; -using Umbraco.Core.Models.Packaging; +using Umbraco.Cms.Core.Models.Packaging; -namespace Umbraco.Core.Events +namespace Umbraco.Cms.Core.Events { public class ImportPackageEventArgs : CancellableEnumerableObjectEventArgs, IEquatable> { @@ -16,7 +15,7 @@ namespace Umbraco.Core.Events public ImportPackageEventArgs(TEntity eventObject, IPackageInfo packageMetaData) : this(eventObject, packageMetaData, true) { - + } public IPackageInfo PackageMetaData { get; } diff --git a/src/Umbraco.Core/Events/MacroErrorEventArgs.cs b/src/Umbraco.Core/Events/MacroErrorEventArgs.cs index afabec4d98..b1558482a8 100644 --- a/src/Umbraco.Core/Events/MacroErrorEventArgs.cs +++ b/src/Umbraco.Core/Events/MacroErrorEventArgs.cs @@ -1,7 +1,7 @@ using System; -using Umbraco.Core.Macros; +using Umbraco.Cms.Core.Macros; -namespace Umbraco.Core.Events +namespace Umbraco.Cms.Core.Events { // Provides information on the macro that caused an error public class MacroErrorEventArgs : EventArgs diff --git a/src/Umbraco.Core/Events/MoveEventArgs.cs b/src/Umbraco.Core/Events/MoveEventArgs.cs index f1b09917d8..dfb42fcc96 100644 --- a/src/Umbraco.Core/Events/MoveEventArgs.cs +++ b/src/Umbraco.Core/Events/MoveEventArgs.cs @@ -2,7 +2,7 @@ using System.Collections.Generic; using System.Linq; -namespace Umbraco.Core.Events +namespace Umbraco.Cms.Core.Events { public class MoveEventArgs : CancellableObjectEventArgs, IEquatable> { diff --git a/src/Umbraco.Core/Events/MoveEventInfo.cs b/src/Umbraco.Core/Events/MoveEventInfo.cs index 0b6702611b..9abcbd2c68 100644 --- a/src/Umbraco.Core/Events/MoveEventInfo.cs +++ b/src/Umbraco.Core/Events/MoveEventInfo.cs @@ -1,7 +1,7 @@ using System; using System.Collections.Generic; -namespace Umbraco.Core.Events +namespace Umbraco.Cms.Core.Events { public class MoveEventInfo : IEquatable> { diff --git a/src/Umbraco.Core/Events/NewEventArgs.cs b/src/Umbraco.Core/Events/NewEventArgs.cs index 3969f17b8c..a659787547 100644 --- a/src/Umbraco.Core/Events/NewEventArgs.cs +++ b/src/Umbraco.Core/Events/NewEventArgs.cs @@ -1,8 +1,7 @@ using System; using System.Collections.Generic; -using Umbraco.Core.Models; -namespace Umbraco.Core.Events +namespace Umbraco.Cms.Core.Events { public class NewEventArgs : CancellableObjectEventArgs, IEquatable> { diff --git a/src/Umbraco.Core/Events/PassThroughEventDispatcher.cs b/src/Umbraco.Core/Events/PassThroughEventDispatcher.cs index dec3a62a88..0b2e72cc7f 100644 --- a/src/Umbraco.Core/Events/PassThroughEventDispatcher.cs +++ b/src/Umbraco.Core/Events/PassThroughEventDispatcher.cs @@ -2,7 +2,7 @@ using System.Collections.Generic; using System.Linq; -namespace Umbraco.Core.Events +namespace Umbraco.Cms.Core.Events { /// /// An IEventDispatcher that immediately raise all events. diff --git a/src/Umbraco.Core/Events/PublishEventArgs.cs b/src/Umbraco.Core/Events/PublishEventArgs.cs index 4be655873e..101458b897 100644 --- a/src/Umbraco.Core/Events/PublishEventArgs.cs +++ b/src/Umbraco.Core/Events/PublishEventArgs.cs @@ -1,7 +1,7 @@ using System; using System.Collections.Generic; -namespace Umbraco.Core.Events +namespace Umbraco.Cms.Core.Events { public class PublishEventArgs : CancellableEnumerableObjectEventArgs, IEquatable> { diff --git a/src/Umbraco.Infrastructure/Events/QueuingEventDispatcher.cs b/src/Umbraco.Core/Events/QueuingEventDispatcher.cs similarity index 91% rename from src/Umbraco.Infrastructure/Events/QueuingEventDispatcher.cs rename to src/Umbraco.Core/Events/QueuingEventDispatcher.cs index d9adf93eb5..de82fc1f24 100644 --- a/src/Umbraco.Infrastructure/Events/QueuingEventDispatcher.cs +++ b/src/Umbraco.Core/Events/QueuingEventDispatcher.cs @@ -1,7 +1,9 @@ -using Umbraco.Core.Composing; -using Umbraco.Core.IO; +// Copyright (c) Umbraco. +// See LICENSE for more details. -namespace Umbraco.Core.Events +using Umbraco.Cms.Core.IO; + +namespace Umbraco.Cms.Core.Events { /// /// An IEventDispatcher that queues events, and raise them when the scope diff --git a/src/Umbraco.Core/Events/QueuingEventDispatcherBase.cs b/src/Umbraco.Core/Events/QueuingEventDispatcherBase.cs index b4dc6187fa..784390ebe7 100644 --- a/src/Umbraco.Core/Events/QueuingEventDispatcherBase.cs +++ b/src/Umbraco.Core/Events/QueuingEventDispatcherBase.cs @@ -1,11 +1,12 @@ using System; using System.Collections.Generic; using System.Linq; -using Umbraco.Core.Collections; -using Umbraco.Core.Composing; -using Umbraco.Core.Models.Entities; +using Umbraco.Cms.Core.Collections; +using Umbraco.Cms.Core.Composing; +using Umbraco.Cms.Core.Models.Entities; +using Umbraco.Extensions; -namespace Umbraco.Core.Events +namespace Umbraco.Cms.Core.Events { /// /// An IEventDispatcher that queues events. diff --git a/src/Umbraco.Core/Events/RecycleBinEventArgs.cs b/src/Umbraco.Core/Events/RecycleBinEventArgs.cs index 3f0f3784a2..a1791618bc 100644 --- a/src/Umbraco.Core/Events/RecycleBinEventArgs.cs +++ b/src/Umbraco.Core/Events/RecycleBinEventArgs.cs @@ -1,6 +1,6 @@ using System; -namespace Umbraco.Core.Events +namespace Umbraco.Cms.Core.Events { public class RecycleBinEventArgs : CancellableEventArgs, IEquatable { diff --git a/src/Umbraco.Core/Events/RefreshContentEventArgs.cs b/src/Umbraco.Core/Events/RefreshContentEventArgs.cs index c92633fcef..c41043a039 100644 --- a/src/Umbraco.Core/Events/RefreshContentEventArgs.cs +++ b/src/Umbraco.Core/Events/RefreshContentEventArgs.cs @@ -1,4 +1,4 @@ -namespace Umbraco.Core.Events +namespace Umbraco.Cms.Core.Events { //public class RefreshContentEventArgs : System.ComponentModel.CancelEventArgs { } } diff --git a/src/Umbraco.Core/Events/RolesEventArgs.cs b/src/Umbraco.Core/Events/RolesEventArgs.cs index 3104412f99..a4fb6c3d18 100644 --- a/src/Umbraco.Core/Events/RolesEventArgs.cs +++ b/src/Umbraco.Core/Events/RolesEventArgs.cs @@ -1,6 +1,6 @@ using System; -namespace Umbraco.Core.Events +namespace Umbraco.Cms.Core.Events { public class RolesEventArgs : EventArgs { diff --git a/src/Umbraco.Core/Events/RollbackEventArgs.cs b/src/Umbraco.Core/Events/RollbackEventArgs.cs index 9ebdb20e64..c83b209e05 100644 --- a/src/Umbraco.Core/Events/RollbackEventArgs.cs +++ b/src/Umbraco.Core/Events/RollbackEventArgs.cs @@ -1,4 +1,4 @@ -namespace Umbraco.Core.Events +namespace Umbraco.Cms.Core.Events { public class RollbackEventArgs : CancellableObjectEventArgs { diff --git a/src/Umbraco.Core/Events/SaveEventArgs.cs b/src/Umbraco.Core/Events/SaveEventArgs.cs index 0b061c2227..173c9fe2d6 100644 --- a/src/Umbraco.Core/Events/SaveEventArgs.cs +++ b/src/Umbraco.Core/Events/SaveEventArgs.cs @@ -1,6 +1,6 @@ using System.Collections.Generic; -namespace Umbraco.Core.Events +namespace Umbraco.Cms.Core.Events { public class SaveEventArgs : CancellableEnumerableObjectEventArgs { diff --git a/src/Umbraco.Core/Events/SendEmailEventArgs.cs b/src/Umbraco.Core/Events/SendEmailEventArgs.cs index 7ee9469b57..720f125d9c 100644 --- a/src/Umbraco.Core/Events/SendEmailEventArgs.cs +++ b/src/Umbraco.Core/Events/SendEmailEventArgs.cs @@ -1,7 +1,7 @@ using System; -using Umbraco.Core.Models; +using Umbraco.Cms.Core.Models; -namespace Umbraco.Core.Events +namespace Umbraco.Cms.Core.Events { public class SendEmailEventArgs : EventArgs { diff --git a/src/Umbraco.Core/Events/SendToPublishEventArgs.cs b/src/Umbraco.Core/Events/SendToPublishEventArgs.cs index 21e9276e43..b74c0846f0 100644 --- a/src/Umbraco.Core/Events/SendToPublishEventArgs.cs +++ b/src/Umbraco.Core/Events/SendToPublishEventArgs.cs @@ -1,4 +1,4 @@ -namespace Umbraco.Core.Events +namespace Umbraco.Cms.Core.Events { public class SendToPublishEventArgs : CancellableObjectEventArgs { diff --git a/src/Umbraco.Core/Events/SupersedeEventAttribute.cs b/src/Umbraco.Core/Events/SupersedeEventAttribute.cs index d7198ea117..d733f0706a 100644 --- a/src/Umbraco.Core/Events/SupersedeEventAttribute.cs +++ b/src/Umbraco.Core/Events/SupersedeEventAttribute.cs @@ -1,6 +1,6 @@ using System; -namespace Umbraco.Core.Events +namespace Umbraco.Cms.Core.Events { /// /// This is used to know if the event arg attributed should supersede another event arg type when diff --git a/src/Umbraco.Core/Events/TransientEventMessagesFactory.cs b/src/Umbraco.Core/Events/TransientEventMessagesFactory.cs index 7a0947c990..1179a6316e 100644 --- a/src/Umbraco.Core/Events/TransientEventMessagesFactory.cs +++ b/src/Umbraco.Core/Events/TransientEventMessagesFactory.cs @@ -1,4 +1,4 @@ -namespace Umbraco.Core.Events +namespace Umbraco.Cms.Core.Events { /// /// A simple/default transient messages factory diff --git a/src/Umbraco.Core/Events/TypedEventHandler.cs b/src/Umbraco.Core/Events/TypedEventHandler.cs index 84bac77ca0..11301448e0 100644 --- a/src/Umbraco.Core/Events/TypedEventHandler.cs +++ b/src/Umbraco.Core/Events/TypedEventHandler.cs @@ -1,6 +1,6 @@ using System; -namespace Umbraco.Core.Events +namespace Umbraco.Cms.Core.Events { [Serializable] public delegate void TypedEventHandler(TSender sender, TEventArgs e); diff --git a/src/Umbraco.Core/Events/UmbracoApplicationStarting.cs b/src/Umbraco.Core/Events/UmbracoApplicationStarting.cs index e78a6e4608..2e7d8c768c 100644 --- a/src/Umbraco.Core/Events/UmbracoApplicationStarting.cs +++ b/src/Umbraco.Core/Events/UmbracoApplicationStarting.cs @@ -1,7 +1,7 @@ // Copyright (c) Umbraco. // See LICENSE for more details. -namespace Umbraco.Core.Events +namespace Umbraco.Cms.Core.Events { public class UmbracoApplicationStarting : INotification diff --git a/src/Umbraco.Core/Events/UmbracoApplicationStopping.cs b/src/Umbraco.Core/Events/UmbracoApplicationStopping.cs index bef6f0de19..54ce079012 100644 --- a/src/Umbraco.Core/Events/UmbracoApplicationStopping.cs +++ b/src/Umbraco.Core/Events/UmbracoApplicationStopping.cs @@ -1,4 +1,4 @@ -namespace Umbraco.Core.Events +namespace Umbraco.Cms.Core.Events { public class UmbracoApplicationStopping : INotification { } } diff --git a/src/Umbraco.Core/Events/UmbracoRequestBegin.cs b/src/Umbraco.Core/Events/UmbracoRequestBegin.cs index c72ddc904d..ffb55938b3 100644 --- a/src/Umbraco.Core/Events/UmbracoRequestBegin.cs +++ b/src/Umbraco.Core/Events/UmbracoRequestBegin.cs @@ -1,9 +1,9 @@ // Copyright (c) Umbraco. // See LICENSE for more details. -using Umbraco.Web; +using Umbraco.Cms.Core.Web; -namespace Umbraco.Core.Events +namespace Umbraco.Cms.Core.Events { /// /// Notification raised on each request begin. diff --git a/src/Umbraco.Core/Events/UmbracoRequestEnd.cs b/src/Umbraco.Core/Events/UmbracoRequestEnd.cs index 1988a2dd50..b4e0f26b81 100644 --- a/src/Umbraco.Core/Events/UmbracoRequestEnd.cs +++ b/src/Umbraco.Core/Events/UmbracoRequestEnd.cs @@ -1,9 +1,9 @@ // Copyright (c) Umbraco. // See LICENSE for more details. -using Umbraco.Web; +using Umbraco.Cms.Core.Web; -namespace Umbraco.Core.Events +namespace Umbraco.Cms.Core.Events { /// /// Notification raised on each request end. diff --git a/src/Umbraco.Core/Events/UninstallPackageEventArgs.cs b/src/Umbraco.Core/Events/UninstallPackageEventArgs.cs index 63c5ceaba0..e83210b3a0 100644 --- a/src/Umbraco.Core/Events/UninstallPackageEventArgs.cs +++ b/src/Umbraco.Core/Events/UninstallPackageEventArgs.cs @@ -1,7 +1,7 @@ using System.Collections.Generic; -using Umbraco.Core.Models.Packaging; +using Umbraco.Cms.Core.Packaging; -namespace Umbraco.Core.Events +namespace Umbraco.Cms.Core.Events { public class UninstallPackageEventArgs: CancellableObjectEventArgs> { diff --git a/src/Umbraco.Core/Events/UserGroupWithUsers.cs b/src/Umbraco.Core/Events/UserGroupWithUsers.cs index 7d456a22ea..17946a781f 100644 --- a/src/Umbraco.Core/Events/UserGroupWithUsers.cs +++ b/src/Umbraco.Core/Events/UserGroupWithUsers.cs @@ -1,7 +1,6 @@ -using System; -using Umbraco.Core.Models.Membership; +using Umbraco.Cms.Core.Models.Membership; -namespace Umbraco.Core.Events +namespace Umbraco.Cms.Core.Events { public class UserGroupWithUsers { diff --git a/src/Umbraco.Core/Exceptions/AuthorizationException.cs b/src/Umbraco.Core/Exceptions/AuthorizationException.cs index b87a8da8b8..fa2399fc5c 100644 --- a/src/Umbraco.Core/Exceptions/AuthorizationException.cs +++ b/src/Umbraco.Core/Exceptions/AuthorizationException.cs @@ -1,7 +1,7 @@ using System; using System.Runtime.Serialization; -namespace Umbraco.Core.Exceptions +namespace Umbraco.Cms.Core.Exceptions { /// /// The exception that is thrown when authorization failed. diff --git a/src/Umbraco.Core/Exceptions/BootFailedException.cs b/src/Umbraco.Core/Exceptions/BootFailedException.cs index e8ffe1d2e9..5f546c7b9d 100644 --- a/src/Umbraco.Core/Exceptions/BootFailedException.cs +++ b/src/Umbraco.Core/Exceptions/BootFailedException.cs @@ -2,7 +2,7 @@ using System.Runtime.Serialization; using System.Text; -namespace Umbraco.Core.Exceptions +namespace Umbraco.Cms.Core.Exceptions { /// /// An exception that is thrown if the Umbraco application cannot boot. @@ -53,7 +53,7 @@ namespace Umbraco.Core.Exceptions /// Rethrows a captured . /// /// The boot failed exception. - /// + /// /// /// /// The exception can be null, in which case a default message is used. diff --git a/src/Umbraco.Core/Exceptions/DataOperationException.cs b/src/Umbraco.Core/Exceptions/DataOperationException.cs index a48fdbc721..f4146758bd 100644 --- a/src/Umbraco.Core/Exceptions/DataOperationException.cs +++ b/src/Umbraco.Core/Exceptions/DataOperationException.cs @@ -1,7 +1,7 @@ using System; using System.Runtime.Serialization; -namespace Umbraco.Core.Exceptions +namespace Umbraco.Cms.Core.Exceptions { /// /// diff --git a/src/Umbraco.Core/Exceptions/InvalidCompositionException.cs b/src/Umbraco.Core/Exceptions/InvalidCompositionException.cs index 684e23b020..90e1d03490 100644 --- a/src/Umbraco.Core/Exceptions/InvalidCompositionException.cs +++ b/src/Umbraco.Core/Exceptions/InvalidCompositionException.cs @@ -1,7 +1,8 @@ using System; using System.Runtime.Serialization; +using Umbraco.Extensions; -namespace Umbraco.Core.Exceptions +namespace Umbraco.Cms.Core.Exceptions { /// /// The exception that is thrown when a composition is invalid. diff --git a/src/Umbraco.Core/Exceptions/PanicException.cs b/src/Umbraco.Core/Exceptions/PanicException.cs index 75edf7fd73..9ba1311e84 100644 --- a/src/Umbraco.Core/Exceptions/PanicException.cs +++ b/src/Umbraco.Core/Exceptions/PanicException.cs @@ -1,7 +1,7 @@ using System; using System.Runtime.Serialization; -namespace Umbraco.Core.Exceptions +namespace Umbraco.Cms.Core.Exceptions { /// /// Represents an internal exception that in theory should never been thrown, it is only thrown in circumstances that should never happen. diff --git a/src/Umbraco.Core/Exceptions/UnattendedInstallException.cs b/src/Umbraco.Core/Exceptions/UnattendedInstallException.cs index 6f672d17cd..2a2b97b23d 100644 --- a/src/Umbraco.Core/Exceptions/UnattendedInstallException.cs +++ b/src/Umbraco.Core/Exceptions/UnattendedInstallException.cs @@ -1,7 +1,7 @@ using System; using System.Runtime.Serialization; -namespace Umbraco.Core.Exceptions +namespace Umbraco.Cms.Core.Exceptions { /// /// An exception that is thrown if an unattended installation occurs. diff --git a/src/Umbraco.Core/ExpressionHelper.cs b/src/Umbraco.Core/ExpressionHelper.cs index 93598fe97e..bb59605a46 100644 --- a/src/Umbraco.Core/ExpressionHelper.cs +++ b/src/Umbraco.Core/ExpressionHelper.cs @@ -4,9 +4,9 @@ using System.Collections.Generic; using System.Linq; using System.Linq.Expressions; using System.Reflection; -using Umbraco.Core.Persistence; +using Umbraco.Cms.Core.Persistence; -namespace Umbraco.Core +namespace Umbraco.Cms.Core { /// /// A set of helper methods for dealing with expressions diff --git a/src/Umbraco.Core/AssemblyExtensions.cs b/src/Umbraco.Core/Extensions/AssemblyExtensions.cs similarity index 96% rename from src/Umbraco.Core/AssemblyExtensions.cs rename to src/Umbraco.Core/Extensions/AssemblyExtensions.cs index 19162e5934..cefaae5b86 100644 --- a/src/Umbraco.Core/AssemblyExtensions.cs +++ b/src/Umbraco.Core/Extensions/AssemblyExtensions.cs @@ -1,8 +1,11 @@ -using System; +// Copyright (c) Umbraco. +// See LICENSE for more details. + +using System; using System.IO; using System.Reflection; -namespace Umbraco.Core +namespace Umbraco.Extensions { public static class AssemblyExtensions { diff --git a/src/Umbraco.Core/Extensions/ClaimsIdentityExtensions.cs b/src/Umbraco.Core/Extensions/ClaimsIdentityExtensions.cs new file mode 100644 index 0000000000..7569b64cb7 --- /dev/null +++ b/src/Umbraco.Core/Extensions/ClaimsIdentityExtensions.cs @@ -0,0 +1,345 @@ +// Copyright (c) Umbraco. +// See LICENSE for more details. + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Security.Claims; +using System.Security.Principal; +using Umbraco.Cms.Core; + +namespace Umbraco.Extensions +{ + public static class ClaimsIdentityExtensions + { + public static T GetUserId(this IIdentity identity) + { + var strId = identity.GetUserId(); + var converted = strId.TryConvertTo(); + return converted.ResultOr(default); + } + + /// + /// Returns the user id from the of either the claim type or "sub" + /// + /// + /// + /// The string value of the user id if found otherwise null + /// + public static string GetUserId(this IIdentity identity) + { + if (identity == null) throw new ArgumentNullException(nameof(identity)); + + string userId = null; + if (identity is ClaimsIdentity claimsIdentity) + { + userId = claimsIdentity.FindFirstValue(ClaimTypes.NameIdentifier) + ?? claimsIdentity.FindFirstValue("sub"); + } + + return userId; + } + + /// + /// Returns the user name from the of either the claim type or "preferred_username" + /// + /// + /// + /// The string value of the user name if found otherwise null + /// + public static string GetUserName(this IIdentity identity) + { + if (identity == null) throw new ArgumentNullException(nameof(identity)); + + string username = null; + if (identity is ClaimsIdentity claimsIdentity) + { + username = claimsIdentity.FindFirstValue(ClaimTypes.Name) + ?? claimsIdentity.FindFirstValue("preferred_username"); + } + + return username; + } + + /// + /// Returns the first claim value found in the for the given claimType + /// + /// + /// + /// + /// The string value of the claim if found otherwise null + /// + public static string FindFirstValue(this ClaimsIdentity identity, string claimType) + { + if (identity == null) throw new ArgumentNullException(nameof(identity)); + + return identity.FindFirst(claimType)?.Value; + } + + /// + /// Returns the required claim types for a back office identity + /// + /// + /// This does not include the role claim type or allowed apps type since that is a collection and in theory could be empty + /// + public static IEnumerable RequiredBackOfficeClaimTypes => new[] + { + ClaimTypes.NameIdentifier, //id + ClaimTypes.Name, //username + ClaimTypes.GivenName, + // Constants.Security.StartContentNodeIdClaimType, These seem to be able to be null... + // Constants.Security.StartMediaNodeIdClaimType, + ClaimTypes.Locality, + Constants.Security.SecurityStampClaimType + }; + + /// + /// Verify that a ClaimsIdentity has all the required claim types + /// + /// + /// Verified identity wrapped in a ClaimsIdentity with BackOfficeAuthentication type + /// True if ClaimsIdentity + public static bool VerifyBackOfficeIdentity(this ClaimsIdentity identity, out ClaimsIdentity verifiedIdentity) + { + // Validate that all required claims exist + foreach (var claimType in RequiredBackOfficeClaimTypes) + { + if (identity.HasClaim(x => x.Type == claimType) == false || + identity.HasClaim(x => x.Type == claimType && x.Value.IsNullOrWhiteSpace())) + { + verifiedIdentity = null; + return false; + } + } + + verifiedIdentity = new ClaimsIdentity(identity.Claims, Constants.Security.BackOfficeAuthenticationType); + return true; + } + + /// + /// Add the required claims to be a BackOffice ClaimsIdentity + /// + /// this + /// The users Id + /// Username + /// Real name + /// Start content nodes + /// Start media nodes + /// The locality of the user + /// Security stamp + /// Allowed apps + /// Roles + public static void AddRequiredClaims(this ClaimsIdentity identity, string userId, string username, + string realName, IEnumerable startContentNodes, IEnumerable startMediaNodes, string culture, + string securityStamp, IEnumerable allowedApps, IEnumerable roles) + { + //This is the id that 'identity' uses to check for the user id + if (identity.HasClaim(x => x.Type == ClaimTypes.NameIdentifier) == false) + { + identity.AddClaim(new Claim( + ClaimTypes.NameIdentifier, + userId, + ClaimValueTypes.String, + Constants.Security.BackOfficeAuthenticationType, + Constants.Security.BackOfficeAuthenticationType, + identity)); + } + + if (identity.HasClaim(x => x.Type == ClaimTypes.Name) == false) + { + identity.AddClaim(new Claim( + ClaimTypes.Name, + username, + ClaimValueTypes.String, + Constants.Security.BackOfficeAuthenticationType, + Constants.Security.BackOfficeAuthenticationType, + identity)); + } + + if (identity.HasClaim(x => x.Type == ClaimTypes.GivenName) == false) + { + identity.AddClaim(new Claim( + ClaimTypes.GivenName, + realName, + ClaimValueTypes.String, + Constants.Security.BackOfficeAuthenticationType, + Constants.Security.BackOfficeAuthenticationType, + identity)); + } + + if (identity.HasClaim(x => x.Type == Constants.Security.StartContentNodeIdClaimType) == false && + startContentNodes != null) + { + foreach (var startContentNode in startContentNodes) + { + identity.AddClaim(new Claim( + Constants.Security.StartContentNodeIdClaimType, + startContentNode.ToInvariantString(), + ClaimValueTypes.Integer32, + Constants.Security.BackOfficeAuthenticationType, + Constants.Security.BackOfficeAuthenticationType, + identity)); + } + } + + if (identity.HasClaim(x => x.Type == Constants.Security.StartMediaNodeIdClaimType) == false && + startMediaNodes != null) + { + foreach (var startMediaNode in startMediaNodes) + { + identity.AddClaim(new Claim( + Constants.Security.StartMediaNodeIdClaimType, + startMediaNode.ToInvariantString(), + ClaimValueTypes.Integer32, + Constants.Security.BackOfficeAuthenticationType, + Constants.Security.BackOfficeAuthenticationType, + identity)); + } + } + + if (identity.HasClaim(x => x.Type == ClaimTypes.Locality) == false) + { + identity.AddClaim(new Claim( + ClaimTypes.Locality, + culture, + ClaimValueTypes.String, + Constants.Security.BackOfficeAuthenticationType, + Constants.Security.BackOfficeAuthenticationType, + identity)); + } + + // The security stamp claim is also required + if (identity.HasClaim(x => x.Type == Constants.Security.SecurityStampClaimType) == false) + { + identity.AddClaim(new Claim( + Constants.Security.SecurityStampClaimType, + securityStamp, + ClaimValueTypes.String, + Constants.Security.BackOfficeAuthenticationType, + Constants.Security.BackOfficeAuthenticationType, + identity)); + } + + // Add each app as a separate claim + if (identity.HasClaim(x => x.Type == Constants.Security.AllowedApplicationsClaimType) == false && + allowedApps != null) + { + foreach (var application in allowedApps) + { + identity.AddClaim(new Claim( + Constants.Security.AllowedApplicationsClaimType, + application, + ClaimValueTypes.String, + Constants.Security.BackOfficeAuthenticationType, + Constants.Security.BackOfficeAuthenticationType, + identity)); + } + } + + // Claims are added by the ClaimsIdentityFactory because our UserStore supports roles, however this identity might + // not be made with that factory if it was created with a different ticket so perform the check + if (identity.HasClaim(x => x.Type == ClaimsIdentity.DefaultRoleClaimType) == false && roles != null) + { + // Manually add them + foreach (var roleName in roles) + { + identity.AddClaim(new Claim( + identity.RoleClaimType, + roleName, + ClaimValueTypes.String, + Constants.Security.BackOfficeAuthenticationType, + Constants.Security.BackOfficeAuthenticationType, + identity)); + } + } + } + + /// + /// Get the start content nodes from a ClaimsIdentity + /// + /// + /// Array of start content nodes + public static int[] GetStartContentNodes(this ClaimsIdentity identity) => + identity.FindAll(x => x.Type == Constants.Security.StartContentNodeIdClaimType) + .Select(node => int.TryParse(node.Value, out var i) ? i : default) + .Where(x => x != default).ToArray(); + + /// + /// Get the start media nodes from a ClaimsIdentity + /// + /// + /// Array of start media nodes + public static int[] GetStartMediaNodes(this ClaimsIdentity identity) => + identity.FindAll(x => x.Type == Constants.Security.StartMediaNodeIdClaimType) + .Select(node => int.TryParse(node.Value, out var i) ? i : default) + .Where(x => x != default).ToArray(); + + /// + /// Get the allowed applications from a ClaimsIdentity + /// + /// + /// + public static string[] GetAllowedApplications(this ClaimsIdentity identity) => identity + .FindAll(x => x.Type == Constants.Security.AllowedApplicationsClaimType).Select(app => app.Value).ToArray(); + + /// + /// Get the user ID from a ClaimsIdentity + /// + /// + /// User ID as integer + public static int GetId(this ClaimsIdentity identity) => int.Parse(identity.FindFirstValue(ClaimTypes.NameIdentifier)); + + /// + /// Get the real name belonging to the user from a ClaimsIdentity + /// + /// + /// Real name of the user + public static string GetRealName(this ClaimsIdentity identity) => identity.FindFirstValue(ClaimTypes.GivenName); + + /// + /// Get the username of the user from a ClaimsIdentity + /// + /// + /// Username of the user + public static string GetUsername(this ClaimsIdentity identity) => identity.FindFirstValue(ClaimTypes.Name); + + /// + /// Get the culture string from a ClaimsIdentity + /// + /// + /// Culture string + public static string GetCultureString(this ClaimsIdentity identity) => identity.FindFirstValue(ClaimTypes.Locality); + + /// + /// Get the security stamp from a ClaimsIdentity + /// + /// + /// Security stamp + public static string GetSecurityStamp(this ClaimsIdentity identity) => identity.FindFirstValue(Constants.Security.SecurityStampClaimType); + + /// + /// Get the roles assigned to a user from a ClaimsIdentity + /// + /// + /// Array of roles + public static string[] GetRoles(this ClaimsIdentity identity) => identity + .FindAll(x => x.Type == ClaimsIdentity.DefaultRoleClaimType).Select(role => role.Value).ToArray(); + + + /// + /// Adds or updates and existing claim. + /// + public static void AddOrUpdateClaim(this ClaimsIdentity identity, Claim claim) + { + if (identity == null) + { + throw new ArgumentNullException(nameof(identity)); + } + + Claim existingClaim = identity.Claims.FirstOrDefault(x => x.Type == claim.Type); + identity.TryRemoveClaim(existingClaim); + + identity.AddClaim(claim); + } + } +} diff --git a/src/Umbraco.Core/ConfigConnectionStringExtensions.cs b/src/Umbraco.Core/Extensions/ConfigConnectionStringExtensions.cs similarity index 89% rename from src/Umbraco.Core/ConfigConnectionStringExtensions.cs rename to src/Umbraco.Core/Extensions/ConfigConnectionStringExtensions.cs index 8047af88c5..c1b788c0b9 100644 --- a/src/Umbraco.Core/ConfigConnectionStringExtensions.cs +++ b/src/Umbraco.Core/Extensions/ConfigConnectionStringExtensions.cs @@ -1,9 +1,13 @@ +// Copyright (c) Umbraco. +// See LICENSE for more details. + using System; using System.IO; using System.Linq; -using Umbraco.Core.Configuration; +using Umbraco.Cms.Core; +using Umbraco.Cms.Core.Configuration; -namespace Umbraco.Core +namespace Umbraco.Extensions { public static class ConfigConnectionStringExtensions { @@ -11,7 +15,10 @@ namespace Umbraco.Core { var dbIsSqlCe = false; if (databaseSettings?.ProviderName != null) + { dbIsSqlCe = databaseSettings.ProviderName == Constants.DbProviderNames.SqlCe; + } + var sqlCeDatabaseExists = false; if (dbIsSqlCe) { diff --git a/src/Umbraco.Core/ContentExtensions.cs b/src/Umbraco.Core/Extensions/ContentExtensions.cs similarity index 98% rename from src/Umbraco.Core/ContentExtensions.cs rename to src/Umbraco.Core/Extensions/ContentExtensions.cs index 42f47ff604..7794d60b15 100644 --- a/src/Umbraco.Core/ContentExtensions.cs +++ b/src/Umbraco.Core/Extensions/ContentExtensions.cs @@ -1,16 +1,19 @@ +// Copyright (c) Umbraco. +// See LICENSE for more details. + using System; using System.Collections.Generic; using System.IO; using System.Linq; using System.Xml.Linq; -using Umbraco.Core.IO; -using Umbraco.Core.Models; -using Umbraco.Core.Models.Membership; -using Umbraco.Core.Serialization; -using Umbraco.Core.Services; -using Umbraco.Core.Strings; +using Umbraco.Cms.Core.IO; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Core.Models.Membership; +using Umbraco.Cms.Core.Serialization; +using Umbraco.Cms.Core.Services; +using Umbraco.Cms.Core.Strings; -namespace Umbraco.Core +namespace Umbraco.Extensions { public static class ContentExtensions { diff --git a/src/Umbraco.Core/ContentVariationExtensions.cs b/src/Umbraco.Core/Extensions/ContentVariationExtensions.cs similarity index 98% rename from src/Umbraco.Core/ContentVariationExtensions.cs rename to src/Umbraco.Core/Extensions/ContentVariationExtensions.cs index 1c34a61c3a..c6d6b2c557 100644 --- a/src/Umbraco.Core/ContentVariationExtensions.cs +++ b/src/Umbraco.Core/Extensions/ContentVariationExtensions.cs @@ -1,8 +1,11 @@ -using System; -using Umbraco.Core.Models; -using Umbraco.Core.Models.PublishedContent; +// Copyright (c) Umbraco. +// See LICENSE for more details. -namespace Umbraco.Core +using System; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Core.Models.PublishedContent; + +namespace Umbraco.Extensions { /// /// Provides extension methods for content variations. diff --git a/src/Umbraco.Core/CacheHelperExtensions.cs b/src/Umbraco.Core/Extensions/CoreCacheHelperExtensions.cs similarity index 74% rename from src/Umbraco.Core/CacheHelperExtensions.cs rename to src/Umbraco.Core/Extensions/CoreCacheHelperExtensions.cs index 2b01ae1028..8dfec45c7e 100644 --- a/src/Umbraco.Core/CacheHelperExtensions.cs +++ b/src/Umbraco.Core/Extensions/CoreCacheHelperExtensions.cs @@ -1,14 +1,15 @@ -using Umbraco.Core.Cache; +// Copyright (c) Umbraco. +// See LICENSE for more details. -namespace Umbraco.Core +using Umbraco.Cms.Core.Cache; + +namespace Umbraco.Extensions { - /// /// Extension methods for the cache helper /// - public static class CacheHelperExtensions + public static class CoreCacheHelperExtensions { - public const string PartialViewCacheKey = "Umbraco.Web.PartialViewCacheKey"; /// diff --git a/src/Umbraco.Core/DataTableExtensions.cs b/src/Umbraco.Core/Extensions/DataTableExtensions.cs similarity index 97% rename from src/Umbraco.Core/DataTableExtensions.cs rename to src/Umbraco.Core/Extensions/DataTableExtensions.cs index 63b2671d09..5221fff3fa 100644 --- a/src/Umbraco.Core/DataTableExtensions.cs +++ b/src/Umbraco.Core/Extensions/DataTableExtensions.cs @@ -1,9 +1,12 @@ -using System; +// Copyright (c) Umbraco. +// See LICENSE for more details. + +using System; using System.Collections.Generic; using System.Data; using System.Linq; -namespace Umbraco.Core +namespace Umbraco.Extensions { /// /// Static and extension methods for the DataTable object diff --git a/src/Umbraco.Core/DateTimeExtensions.cs b/src/Umbraco.Core/Extensions/DateTimeExtensions.cs similarity index 92% rename from src/Umbraco.Core/DateTimeExtensions.cs rename to src/Umbraco.Core/Extensions/DateTimeExtensions.cs index 378d06a637..e500cf86b0 100644 --- a/src/Umbraco.Core/DateTimeExtensions.cs +++ b/src/Umbraco.Core/Extensions/DateTimeExtensions.cs @@ -1,14 +1,13 @@ -using System; -using System.Collections.Generic; -using System.Globalization; -using System.Linq; -using System.Text; +// Copyright (c) Umbraco. +// See LICENSE for more details. -namespace Umbraco.Core +using System; +using System.Globalization; + +namespace Umbraco.Extensions { public static class DateTimeExtensions { - /// /// Returns the DateTime as an ISO formatted string that is globally expectable /// diff --git a/src/Umbraco.Core/DecimalExtensions.cs b/src/Umbraco.Core/Extensions/DecimalExtensions.cs similarity index 89% rename from src/Umbraco.Core/DecimalExtensions.cs rename to src/Umbraco.Core/Extensions/DecimalExtensions.cs index 8b3218d88c..fa62805841 100644 --- a/src/Umbraco.Core/DecimalExtensions.cs +++ b/src/Umbraco.Core/Extensions/DecimalExtensions.cs @@ -1,4 +1,7 @@ -namespace Umbraco.Core +// Copyright (c) Umbraco. +// See LICENSE for more details. + +namespace Umbraco.Extensions { /// /// Provides extension methods for System.Decimal. diff --git a/src/Umbraco.Core/DelegateExtensions.cs b/src/Umbraco.Core/Extensions/DelegateExtensions.cs similarity index 91% rename from src/Umbraco.Core/DelegateExtensions.cs rename to src/Umbraco.Core/Extensions/DelegateExtensions.cs index c9b2e681c5..43e3c8947b 100644 --- a/src/Umbraco.Core/DelegateExtensions.cs +++ b/src/Umbraco.Core/Extensions/DelegateExtensions.cs @@ -1,8 +1,12 @@ -using System; +// Copyright (c) Umbraco. +// See LICENSE for more details. + +using System; using System.Diagnostics; using System.Threading; +using Umbraco.Cms.Core; -namespace Umbraco.Core +namespace Umbraco.Extensions { public static class DelegateExtensions { diff --git a/src/Umbraco.Core/DictionaryExtensions.cs b/src/Umbraco.Core/Extensions/DictionaryExtensions.cs similarity index 99% rename from src/Umbraco.Core/DictionaryExtensions.cs rename to src/Umbraco.Core/Extensions/DictionaryExtensions.cs index b44e9b68c0..12e8de726f 100644 --- a/src/Umbraco.Core/DictionaryExtensions.cs +++ b/src/Umbraco.Core/Extensions/DictionaryExtensions.cs @@ -1,4 +1,7 @@ -using System; +// Copyright (c) Umbraco. +// See LICENSE for more details. + +using System; using System.Collections; using System.Collections.Concurrent; using System.Collections.Generic; @@ -8,7 +11,7 @@ using System.Net; using System.Text; using System.Threading.Tasks; -namespace Umbraco.Core +namespace Umbraco.Extensions { /// /// Extension methods for Dictionary & ConcurrentDictionary diff --git a/src/Umbraco.Core/EnumExtensions.cs b/src/Umbraco.Core/Extensions/EnumExtensions.cs similarity index 93% rename from src/Umbraco.Core/EnumExtensions.cs rename to src/Umbraco.Core/Extensions/EnumExtensions.cs index 9097432f64..e13467ef32 100644 --- a/src/Umbraco.Core/EnumExtensions.cs +++ b/src/Umbraco.Core/Extensions/EnumExtensions.cs @@ -1,6 +1,9 @@ -using System; +// Copyright (c) Umbraco. +// See LICENSE for more details. -namespace Umbraco.Core +using System; + +namespace Umbraco.Extensions { /// /// Provides extension methods to . diff --git a/src/Umbraco.Core/EnumerableExtensions.cs b/src/Umbraco.Core/Extensions/EnumerableExtensions.cs similarity index 98% rename from src/Umbraco.Core/EnumerableExtensions.cs rename to src/Umbraco.Core/Extensions/EnumerableExtensions.cs index a055cdb08e..895a423ea2 100644 --- a/src/Umbraco.Core/EnumerableExtensions.cs +++ b/src/Umbraco.Core/Extensions/EnumerableExtensions.cs @@ -1,12 +1,16 @@ -using System; +// Copyright (c) Umbraco. +// See LICENSE for more details. + +using System; using System.Collections.Generic; using System.Linq; +using Umbraco.Cms.Core; -namespace Umbraco.Core +namespace Umbraco.Extensions { - /// + /// /// Extensions for enumerable sources - /// + /// public static class EnumerableExtensions { public static bool IsCollectionEmpty(this IReadOnlyCollection list) => list == null || list.Count == 0; diff --git a/src/Umbraco.Core/ExpressionExtensions.cs b/src/Umbraco.Core/Extensions/ExpressionExtensions.cs similarity index 89% rename from src/Umbraco.Core/ExpressionExtensions.cs rename to src/Umbraco.Core/Extensions/ExpressionExtensions.cs index 04642c02d2..d76f39a8de 100644 --- a/src/Umbraco.Core/ExpressionExtensions.cs +++ b/src/Umbraco.Core/Extensions/ExpressionExtensions.cs @@ -1,7 +1,10 @@ -using System; +// Copyright (c) Umbraco. +// See LICENSE for more details. + +using System; using System.Linq.Expressions; -namespace Umbraco.Core +namespace Umbraco.Cms.Core { internal static class ExpressionExtensions { diff --git a/src/Umbraco.Core/IfExtensions.cs b/src/Umbraco.Core/Extensions/IfExtensions.cs similarity index 95% rename from src/Umbraco.Core/IfExtensions.cs rename to src/Umbraco.Core/Extensions/IfExtensions.cs index 2f87e0c08c..a9de084d08 100644 --- a/src/Umbraco.Core/IfExtensions.cs +++ b/src/Umbraco.Core/Extensions/IfExtensions.cs @@ -1,17 +1,15 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; +// Copyright (c) Umbraco. +// See LICENSE for more details. -namespace Umbraco.Core +using System; + +namespace Umbraco.Extensions { - /// /// Extension methods for 'If' checking like checking If something is null or not null /// public static class IfExtensions { - /// The if not null. /// The item. /// The action. diff --git a/src/Umbraco.Core/IntExtensions.cs b/src/Umbraco.Core/Extensions/IntExtensions.cs similarity index 88% rename from src/Umbraco.Core/IntExtensions.cs rename to src/Umbraco.Core/Extensions/IntExtensions.cs index d50490e939..4f79baa3f5 100644 --- a/src/Umbraco.Core/IntExtensions.cs +++ b/src/Umbraco.Core/Extensions/IntExtensions.cs @@ -1,6 +1,9 @@ -using System; +// Copyright (c) Umbraco. +// See LICENSE for more details. -namespace Umbraco.Core +using System; + +namespace Umbraco.Extensions { public static class IntExtensions { diff --git a/src/Umbraco.Core/KeyValuePairExtensions.cs b/src/Umbraco.Core/Extensions/KeyValuePairExtensions.cs similarity index 81% rename from src/Umbraco.Core/KeyValuePairExtensions.cs rename to src/Umbraco.Core/Extensions/KeyValuePairExtensions.cs index 30fd3fee50..73927f7a41 100644 --- a/src/Umbraco.Core/KeyValuePairExtensions.cs +++ b/src/Umbraco.Core/Extensions/KeyValuePairExtensions.cs @@ -1,6 +1,9 @@ -using System.Collections.Generic; +// Copyright (c) Umbraco. +// See LICENSE for more details. -namespace Umbraco.Core +using System.Collections.Generic; + +namespace Umbraco.Extensions { /// /// Provides extension methods for the struct. diff --git a/src/Umbraco.Core/MediaTypeExtensions.cs b/src/Umbraco.Core/Extensions/MediaTypeExtensions.cs similarity index 70% rename from src/Umbraco.Core/MediaTypeExtensions.cs rename to src/Umbraco.Core/Extensions/MediaTypeExtensions.cs index 3a2a3ba6e2..2c46271964 100644 --- a/src/Umbraco.Core/MediaTypeExtensions.cs +++ b/src/Umbraco.Core/Extensions/MediaTypeExtensions.cs @@ -1,4 +1,10 @@ -namespace Umbraco.Core.Models +// Copyright (c) Umbraco. +// See LICENSE for more details. + +using Umbraco.Cms.Core; +using Umbraco.Cms.Core.Models; + +namespace Umbraco.Extensions { public static class MediaTypeExtensions { diff --git a/src/Umbraco.Core/NameValueCollectionExtensions.cs b/src/Umbraco.Core/Extensions/NameValueCollectionExtensions.cs similarity index 92% rename from src/Umbraco.Core/NameValueCollectionExtensions.cs rename to src/Umbraco.Core/Extensions/NameValueCollectionExtensions.cs index b7272c042d..1d9b093ef1 100644 --- a/src/Umbraco.Core/NameValueCollectionExtensions.cs +++ b/src/Umbraco.Core/Extensions/NameValueCollectionExtensions.cs @@ -1,10 +1,11 @@ -using System; +// Copyright (c) Umbraco. +// See LICENSE for more details. + using System.Collections.Generic; using System.Collections.Specialized; using System.Linq; -using System.Text; -namespace Umbraco.Core +namespace Umbraco.Extensions { public static class NameValueCollectionExtensions { diff --git a/src/Umbraco.Core/ObjectExtensions.cs b/src/Umbraco.Core/Extensions/ObjectExtensions.cs similarity index 99% rename from src/Umbraco.Core/ObjectExtensions.cs rename to src/Umbraco.Core/Extensions/ObjectExtensions.cs index 29b19364a4..e2cb09c978 100644 --- a/src/Umbraco.Core/ObjectExtensions.cs +++ b/src/Umbraco.Core/Extensions/ObjectExtensions.cs @@ -1,4 +1,7 @@ -using System; +// Copyright (c) Umbraco. +// See LICENSE for more details. + +using System; using System.Collections; using System.Collections.Concurrent; using System.Collections.Generic; @@ -8,16 +11,16 @@ using System.Linq.Expressions; using System.Reflection; using System.Runtime.CompilerServices; using System.Xml; -using Umbraco.Core.Collections; +using Umbraco.Cms.Core; +using Umbraco.Cms.Core.Collections; -namespace Umbraco.Core +namespace Umbraco.Extensions { /// /// Provides object extension methods. /// public static class ObjectExtensions { - private static readonly ConcurrentDictionary NullableGenericCache = new ConcurrentDictionary(); private static readonly ConcurrentDictionary InputTypeConverterCache = new ConcurrentDictionary(); private static readonly ConcurrentDictionary DestinationTypeConverterCache = new ConcurrentDictionary(); diff --git a/src/Umbraco.Core/PasswordConfigurationExtensions.cs b/src/Umbraco.Core/Extensions/PasswordConfigurationExtensions.cs similarity index 90% rename from src/Umbraco.Core/PasswordConfigurationExtensions.cs rename to src/Umbraco.Core/Extensions/PasswordConfigurationExtensions.cs index be13b574ed..a16a6f30a1 100644 --- a/src/Umbraco.Core/PasswordConfigurationExtensions.cs +++ b/src/Umbraco.Core/Extensions/PasswordConfigurationExtensions.cs @@ -1,9 +1,10 @@ -using System.Collections.Generic; -using Umbraco.Core.Configuration; -using Umbraco.Core.Security; -using Umbraco.Core.Services; +// Copyright (c) Umbraco. +// See LICENSE for more details. -namespace Umbraco.Web +using System.Collections.Generic; +using Umbraco.Cms.Core.Configuration; + +namespace Umbraco.Extensions { public static class PasswordConfigurationExtensions { diff --git a/src/Umbraco.Core/PublishedContentExtensions.cs b/src/Umbraco.Core/Extensions/PublishedContentExtensions.cs similarity index 99% rename from src/Umbraco.Core/PublishedContentExtensions.cs rename to src/Umbraco.Core/Extensions/PublishedContentExtensions.cs index 0a917a6d86..f609123370 100644 --- a/src/Umbraco.Core/PublishedContentExtensions.cs +++ b/src/Umbraco.Core/Extensions/PublishedContentExtensions.cs @@ -1,15 +1,19 @@ +// Copyright (c) Umbraco. +// See LICENSE for more details. + using System; using System.Collections.Generic; using System.Data; using System.Linq; -using Umbraco.Core.Configuration.Models; -using Umbraco.Core.Models; -using Umbraco.Core.Models.PublishedContent; -using Umbraco.Core.Services; -using Umbraco.Web.PublishedCache; -using Umbraco.Web.Routing; +using Umbraco.Cms.Core; +using Umbraco.Cms.Core.Configuration.Models; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Core.Models.PublishedContent; +using Umbraco.Cms.Core.PublishedCache; +using Umbraco.Cms.Core.Routing; +using Umbraco.Cms.Core.Services; -namespace Umbraco.Core +namespace Umbraco.Extensions { public static class PublishedContentExtensions { @@ -1168,7 +1172,7 @@ namespace Umbraco.Core return new DataTable(); //no children found //use new utility class to create table so that we don't have to maintain code in many places, just one - var dt = Core.DataTableExtensions.GenerateDataTable( + var dt = DataTableExtensions.GenerateDataTable( //pass in the alias of the first child node since this is the node type we're rendering headers for firstNode.ContentType.Alias, //pass in the callback to extract the Dictionary of all defined aliases to their names @@ -1177,7 +1181,7 @@ namespace Umbraco.Core () => { //create all row data - var tableData = Core.DataTableExtensions.CreateTableData(); + var tableData = DataTableExtensions.CreateTableData(); //loop through each child and create row data for it foreach (var n in content.Children(variationContextAccessor).OrderBy(x => x.SortOrder)) { @@ -1206,7 +1210,7 @@ namespace Umbraco.Core userVals[p.Alias] = p.GetValue(); } //add the row data - Core.DataTableExtensions.AddRowData(tableData, standardVals, userVals); + DataTableExtensions.AddRowData(tableData, standardVals, userVals); } return tableData; diff --git a/src/Umbraco.Core/PublishedElementExtensions.cs b/src/Umbraco.Core/Extensions/PublishedElementExtensions.cs similarity index 97% rename from src/Umbraco.Core/PublishedElementExtensions.cs rename to src/Umbraco.Core/Extensions/PublishedElementExtensions.cs index a5eaef2df9..265a2aae77 100644 --- a/src/Umbraco.Core/PublishedElementExtensions.cs +++ b/src/Umbraco.Core/Extensions/PublishedElementExtensions.cs @@ -1,10 +1,14 @@ -using System; +// Copyright (c) Umbraco. +// See LICENSE for more details. + +using System; using System.Collections.Generic; using System.Linq; -using Umbraco.Core.Models.PublishedContent; -using Umbraco.Web.Routing; +using Umbraco.Cms.Core; +using Umbraco.Cms.Core.Models.PublishedContent; +using Umbraco.Cms.Core.Routing; -namespace Umbraco.Core +namespace Umbraco.Extensions { /// /// Provides extension methods for IPublishedElement. diff --git a/src/Umbraco.Core/PublishedModelFactoryExtensions.cs b/src/Umbraco.Core/Extensions/PublishedModelFactoryExtensions.cs similarity index 92% rename from src/Umbraco.Core/PublishedModelFactoryExtensions.cs rename to src/Umbraco.Core/Extensions/PublishedModelFactoryExtensions.cs index 3794bc6954..f10c22ef08 100644 --- a/src/Umbraco.Core/PublishedModelFactoryExtensions.cs +++ b/src/Umbraco.Core/Extensions/PublishedModelFactoryExtensions.cs @@ -1,9 +1,10 @@ -using System; -using System.Collections.Generic; -using System.ComponentModel; -using Umbraco.Core.Models.PublishedContent; +// Copyright (c) Umbraco. +// See LICENSE for more details. -namespace Umbraco.Core +using System; +using Umbraco.Cms.Core.Models.PublishedContent; + +namespace Umbraco.Extensions { /// /// Provides extension methods for . diff --git a/src/Umbraco.Core/PublishedPropertyExtension.cs b/src/Umbraco.Core/Extensions/PublishedPropertyExtension.cs similarity index 94% rename from src/Umbraco.Core/PublishedPropertyExtension.cs rename to src/Umbraco.Core/Extensions/PublishedPropertyExtension.cs index 259a2714d3..e95322b32a 100644 --- a/src/Umbraco.Core/PublishedPropertyExtension.cs +++ b/src/Umbraco.Core/Extensions/PublishedPropertyExtension.cs @@ -1,6 +1,9 @@ -using Umbraco.Core.Models.PublishedContent; +// Copyright (c) Umbraco. +// See LICENSE for more details. -namespace Umbraco.Core +using Umbraco.Cms.Core.Models.PublishedContent; + +namespace Umbraco.Extensions { /// /// Provides extension methods for IPublishedProperty. diff --git a/src/Umbraco.Core/SemVersionExtensions.cs b/src/Umbraco.Core/Extensions/SemVersionExtensions.cs similarity index 65% rename from src/Umbraco.Core/SemVersionExtensions.cs rename to src/Umbraco.Core/Extensions/SemVersionExtensions.cs index e96b6fae45..85e4892a09 100644 --- a/src/Umbraco.Core/SemVersionExtensions.cs +++ b/src/Umbraco.Core/Extensions/SemVersionExtensions.cs @@ -1,6 +1,9 @@ -using Semver; +// Copyright (c) Umbraco. +// See LICENSE for more details. -namespace Umbraco.Core +using Umbraco.Cms.Core.Semver; + +namespace Umbraco.Extensions { public static class SemVersionExtensions { diff --git a/src/Umbraco.Core/StringExtensions.cs b/src/Umbraco.Core/Extensions/StringExtensions.cs similarity index 96% rename from src/Umbraco.Core/StringExtensions.cs rename to src/Umbraco.Core/Extensions/StringExtensions.cs index 0dc48b2229..70c959d09f 100644 --- a/src/Umbraco.Core/StringExtensions.cs +++ b/src/Umbraco.Core/Extensions/StringExtensions.cs @@ -1,4 +1,7 @@ -using System; +// Copyright (c) Umbraco. +// See LICENSE for more details. + +using System; using System.Collections.Generic; using System.ComponentModel; using System.Diagnostics.CodeAnalysis; @@ -8,10 +11,11 @@ using System.Linq; using System.Security.Cryptography; using System.Text; using System.Text.RegularExpressions; -using Umbraco.Core.IO; -using Umbraco.Core.Strings; +using Umbraco.Cms.Core; +using Umbraco.Cms.Core.IO; +using Umbraco.Cms.Core.Strings; -namespace Umbraco.Core +namespace Umbraco.Extensions { /// /// String extension methods @@ -1255,51 +1259,6 @@ namespace Umbraco.Core && Path.GetPathRoot(path).Equals(Path.DirectorySeparatorChar.ToString(), StringComparison.Ordinal) == false; } - /// - /// Based on the input string, this will detect if the string is a JS path or a JS snippet. - /// If a path cannot be determined, then it is assumed to be a snippet the original text is returned - /// with an invalid attempt, otherwise a valid attempt is returned with the resolved path - /// - /// - /// - /// - /// This is only used for legacy purposes for the Action.JsSource stuff and shouldn't be needed in v8 - /// - internal static Attempt DetectIsJavaScriptPath(this string input, IIOHelper ioHelper) - { - //validate that this is a url, if it is not, we'll assume that it is a text block and render it as a text - //block instead. - var isValid = true; - - if (Uri.IsWellFormedUriString(input, UriKind.RelativeOrAbsolute)) - { - //ok it validates, but so does alert('hello'); ! so we need to do more checks - - //here are the valid chars in a url without escaping - if (Regex.IsMatch(input, @"[^a-zA-Z0-9-._~:/?#\[\]@!$&'\(\)*\+,%;=]")) - isValid = false; - - //we'll have to be smarter and just check for certain js patterns now too! - var jsPatterns = new[] { @"\+\s*\=", @"\);", @"function\s*\(", @"!=", @"==" }; - if (jsPatterns.Any(p => Regex.IsMatch(input, p))) - isValid = false; - - if (isValid) - { - var resolvedUrlResult = ioHelper.TryResolveUrl(input); - //if the resolution was success, return it, otherwise just return the path, we've detected - // it's a path but maybe it's relative and resolution has failed, etc... in which case we're just - // returning what was given to us. - return resolvedUrlResult.Success - ? resolvedUrlResult - : Attempt.Succeed(input); - } - } - - return Attempt.Fail(input); - } - - // FORMAT STRINGS /// diff --git a/src/Umbraco.Core/ThreadExtensions.cs b/src/Umbraco.Core/Extensions/ThreadExtensions.cs similarity index 95% rename from src/Umbraco.Core/ThreadExtensions.cs rename to src/Umbraco.Core/Extensions/ThreadExtensions.cs index 3c9001ac48..1c585a2de8 100644 --- a/src/Umbraco.Core/ThreadExtensions.cs +++ b/src/Umbraco.Core/Extensions/ThreadExtensions.cs @@ -1,7 +1,10 @@ -using System.Globalization; +// Copyright (c) Umbraco. +// See LICENSE for more details. + +using System.Globalization; using System.Threading; -namespace Umbraco.Core +namespace Umbraco.Extensions { public static class ThreadExtensions { diff --git a/src/Umbraco.Core/TypeExtensions.cs b/src/Umbraco.Core/Extensions/TypeExtensions.cs similarity index 99% rename from src/Umbraco.Core/TypeExtensions.cs rename to src/Umbraco.Core/Extensions/TypeExtensions.cs index 70639d7ff1..67a6dd1dce 100644 --- a/src/Umbraco.Core/TypeExtensions.cs +++ b/src/Umbraco.Core/Extensions/TypeExtensions.cs @@ -1,13 +1,17 @@ +// Copyright (c) Umbraco. +// See LICENSE for more details. + using System; using System.Collections; using System.Collections.Generic; using System.Linq; using System.Reflection; using System.Runtime.CompilerServices; -using Umbraco.Core.Composing; -using Umbraco.Core.Strings; +using Umbraco.Cms.Core; +using Umbraco.Cms.Core.Composing; +using Umbraco.Cms.Core.Strings; -namespace Umbraco.Core +namespace Umbraco.Extensions { public static class TypeExtensions { @@ -17,6 +21,7 @@ namespace Umbraco.Core ? Activator.CreateInstance(t) : null; } + internal static MethodInfo GetGenericMethod(this Type type, string name, params Type[] parameterTypes) { var methods = type.GetMethods().Where(method => method.Name == name); diff --git a/src/Umbraco.Core/TypeLoaderExtensions.cs b/src/Umbraco.Core/Extensions/TypeLoaderExtensions.cs similarity index 77% rename from src/Umbraco.Core/TypeLoaderExtensions.cs rename to src/Umbraco.Core/Extensions/TypeLoaderExtensions.cs index 9c086ab8b9..515a1d2018 100644 --- a/src/Umbraco.Core/TypeLoaderExtensions.cs +++ b/src/Umbraco.Core/Extensions/TypeLoaderExtensions.cs @@ -1,11 +1,14 @@ -using System; -using System.Collections.Generic; -using Umbraco.Core.Cache; -using Umbraco.Core.Composing; -using Umbraco.Core.PackageActions; -using Umbraco.Core.PropertyEditors; +// Copyright (c) Umbraco. +// See LICENSE for more details. -namespace Umbraco.Core +using System; +using System.Collections.Generic; +using Umbraco.Cms.Core.Cache; +using Umbraco.Cms.Core.Composing; +using Umbraco.Cms.Core.PackageActions; +using Umbraco.Cms.Core.PropertyEditors; + +namespace Umbraco.Extensions { public static class TypeLoaderExtensions { diff --git a/src/Umbraco.Core/UdiGetterExtensions.cs b/src/Umbraco.Core/Extensions/UdiGetterExtensions.cs similarity index 98% rename from src/Umbraco.Core/UdiGetterExtensions.cs rename to src/Umbraco.Core/Extensions/UdiGetterExtensions.cs index 958e2c13a2..b164effdd6 100644 --- a/src/Umbraco.Core/UdiGetterExtensions.cs +++ b/src/Umbraco.Core/Extensions/UdiGetterExtensions.cs @@ -1,8 +1,12 @@ -using System; -using Umbraco.Core.Models; -using Umbraco.Core.Models.Entities; +// Copyright (c) Umbraco. +// See LICENSE for more details. -namespace Umbraco.Core +using System; +using Umbraco.Cms.Core; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Core.Models.Entities; + +namespace Umbraco.Extensions { /// /// Provides extension methods that return udis for Umbraco entities. diff --git a/src/Umbraco.Core/UmbracoContextAccessorExtensions.cs b/src/Umbraco.Core/Extensions/UmbracoContextAccessorExtensions.cs similarity index 82% rename from src/Umbraco.Core/UmbracoContextAccessorExtensions.cs rename to src/Umbraco.Core/Extensions/UmbracoContextAccessorExtensions.cs index a8521762c6..33bed3eda5 100644 --- a/src/Umbraco.Core/UmbracoContextAccessorExtensions.cs +++ b/src/Umbraco.Core/Extensions/UmbracoContextAccessorExtensions.cs @@ -1,9 +1,11 @@ +// Copyright (c) Umbraco. +// See LICENSE for more details. + using System; -using Umbraco.Web; +using Umbraco.Cms.Core.Web; -namespace Umbraco.Core +namespace Umbraco.Extensions { - public static class UmbracoContextAccessorExtensions { public static IUmbracoContext GetRequiredUmbracoContext(this IUmbracoContextAccessor umbracoContextAccessor) diff --git a/src/Umbraco.Core/UmbracoContextExtensions.cs b/src/Umbraco.Core/Extensions/UmbracoContextExtensions.cs similarity index 74% rename from src/Umbraco.Core/UmbracoContextExtensions.cs rename to src/Umbraco.Core/Extensions/UmbracoContextExtensions.cs index 06ae2aa497..7d0e31f285 100644 --- a/src/Umbraco.Core/UmbracoContextExtensions.cs +++ b/src/Umbraco.Core/Extensions/UmbracoContextExtensions.cs @@ -1,6 +1,9 @@ -using Umbraco.Web; +// Copyright (c) Umbraco. +// See LICENSE for more details. -namespace Umbraco.Core +using Umbraco.Cms.Core.Web; + +namespace Umbraco.Extensions { public static class UmbracoContextExtensions { diff --git a/src/Umbraco.Core/UriExtensions.cs b/src/Umbraco.Core/Extensions/UriExtensions.cs similarity index 97% rename from src/Umbraco.Core/UriExtensions.cs rename to src/Umbraco.Core/Extensions/UriExtensions.cs index 26580fab84..5527fc890e 100644 --- a/src/Umbraco.Core/UriExtensions.cs +++ b/src/Umbraco.Core/Extensions/UriExtensions.cs @@ -1,12 +1,9 @@ -using System; -using System.IO; -using System.Linq; -using Microsoft.Extensions.Logging; -using Umbraco.Core.Configuration; -using Umbraco.Core.Configuration.Models; -using Umbraco.Core.Hosting; +// Copyright (c) Umbraco. +// See LICENSE for more details. -namespace Umbraco.Core +using System; + +namespace Umbraco.Extensions { /// /// Provides extension methods to . diff --git a/src/Umbraco.Core/VersionExtensions.cs b/src/Umbraco.Core/Extensions/VersionExtensions.cs similarity index 94% rename from src/Umbraco.Core/VersionExtensions.cs rename to src/Umbraco.Core/Extensions/VersionExtensions.cs index e6f8dea7f4..06451ce8a0 100644 --- a/src/Umbraco.Core/VersionExtensions.cs +++ b/src/Umbraco.Core/Extensions/VersionExtensions.cs @@ -1,9 +1,11 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using Semver; +// Copyright (c) Umbraco. +// See LICENSE for more details. -namespace Umbraco.Core +using System; +using System.Collections.Generic; +using Umbraco.Cms.Core.Semver; + +namespace Umbraco.Extensions { public static class VersionExtensions { diff --git a/src/Umbraco.Core/WaitHandleExtensions.cs b/src/Umbraco.Core/Extensions/WaitHandleExtensions.cs similarity index 94% rename from src/Umbraco.Core/WaitHandleExtensions.cs rename to src/Umbraco.Core/Extensions/WaitHandleExtensions.cs index 96f179e7ed..6058ef2974 100644 --- a/src/Umbraco.Core/WaitHandleExtensions.cs +++ b/src/Umbraco.Core/Extensions/WaitHandleExtensions.cs @@ -1,11 +1,13 @@ -using System.Threading; +// Copyright (c) Umbraco. +// See LICENSE for more details. + +using System.Threading; using System.Threading.Tasks; -namespace Umbraco.Core +namespace Umbraco.Extensions { public static class WaitHandleExtensions { - // http://stackoverflow.com/questions/25382583/waiting-on-a-named-semaphore-with-waitone100-vs-waitone0-task-delay100 // http://blog.nerdbank.net/2011/07/c-await-for-waithandle.html // F# has a AwaitWaitHandle method that accepts a time out... and seems pretty complex... diff --git a/src/Umbraco.Core/XmlExtensions.cs b/src/Umbraco.Core/Extensions/XmlExtensions.cs similarity index 99% rename from src/Umbraco.Core/XmlExtensions.cs rename to src/Umbraco.Core/Extensions/XmlExtensions.cs index ef0132dd69..a5356e07f6 100644 --- a/src/Umbraco.Core/XmlExtensions.cs +++ b/src/Umbraco.Core/Extensions/XmlExtensions.cs @@ -1,15 +1,16 @@ -using System; +// Copyright (c) Umbraco. +// See LICENSE for more details. + +using System; using System.Collections.Generic; -using System.IO; using System.Linq; using System.Text; -using System.Threading.Tasks; using System.Xml; using System.Xml.Linq; using System.Xml.XPath; -using Umbraco.Core.Xml; +using Umbraco.Cms.Core.Xml; -namespace Umbraco.Core +namespace Umbraco.Extensions { /// /// Extension methods for xml objects diff --git a/src/Umbraco.Core/Features/DisabledFeatures.cs b/src/Umbraco.Core/Features/DisabledFeatures.cs index 1b54691365..e572818baf 100644 --- a/src/Umbraco.Core/Features/DisabledFeatures.cs +++ b/src/Umbraco.Core/Features/DisabledFeatures.cs @@ -1,6 +1,6 @@ -using Umbraco.Core.Collections; +using Umbraco.Cms.Core.Collections; -namespace Umbraco.Web.Features +namespace Umbraco.Cms.Core.Features { /// /// Represents disabled features. diff --git a/src/Umbraco.Core/Features/EnabledFeatures.cs b/src/Umbraco.Core/Features/EnabledFeatures.cs index fe9c496298..9645f94cdf 100644 --- a/src/Umbraco.Core/Features/EnabledFeatures.cs +++ b/src/Umbraco.Core/Features/EnabledFeatures.cs @@ -1,4 +1,4 @@ -namespace Umbraco.Web.Features +namespace Umbraco.Cms.Core.Features { /// /// Represents enabled features. diff --git a/src/Umbraco.Core/Features/IUmbracoFeature.cs b/src/Umbraco.Core/Features/IUmbracoFeature.cs index ccb80b0a9f..efb5337a00 100644 --- a/src/Umbraco.Core/Features/IUmbracoFeature.cs +++ b/src/Umbraco.Core/Features/IUmbracoFeature.cs @@ -1,4 +1,4 @@ -namespace Umbraco.Web.Features +namespace Umbraco.Cms.Core.Features { /// /// This is a marker interface to allow controllers to be disabled if also marked with FeatureAuthorizeAttribute. diff --git a/src/Umbraco.Core/Features/UmbracoFeatures.cs b/src/Umbraco.Core/Features/UmbracoFeatures.cs index 1dacf01494..8f08d25357 100644 --- a/src/Umbraco.Core/Features/UmbracoFeatures.cs +++ b/src/Umbraco.Core/Features/UmbracoFeatures.cs @@ -1,6 +1,6 @@ using System; -namespace Umbraco.Web.Features +namespace Umbraco.Cms.Core.Features { /// /// Represents the Umbraco features. diff --git a/src/Umbraco.Core/GuidUdi.cs b/src/Umbraco.Core/GuidUdi.cs index 08dad39f12..904d6140f2 100644 --- a/src/Umbraco.Core/GuidUdi.cs +++ b/src/Umbraco.Core/GuidUdi.cs @@ -1,7 +1,7 @@ using System; using System.ComponentModel; -namespace Umbraco.Core +namespace Umbraco.Cms.Core { /// /// Represents a guid-based entity identifier. diff --git a/src/Umbraco.Core/GuidUtils.cs b/src/Umbraco.Core/GuidUtils.cs index ba07d09236..6a8938dcf0 100644 --- a/src/Umbraco.Core/GuidUtils.cs +++ b/src/Umbraco.Core/GuidUtils.cs @@ -2,7 +2,7 @@ using System.Runtime.CompilerServices; using System.Runtime.InteropServices; -namespace Umbraco.Core +namespace Umbraco.Cms.Core { /// /// Utility methods for the struct. diff --git a/src/Umbraco.Core/HashCodeCombiner.cs b/src/Umbraco.Core/HashCodeCombiner.cs index 9e968cacbb..d8c1ac2a07 100644 --- a/src/Umbraco.Core/HashCodeCombiner.cs +++ b/src/Umbraco.Core/HashCodeCombiner.cs @@ -2,7 +2,7 @@ using System.Globalization; using System.IO; -namespace Umbraco.Core +namespace Umbraco.Cms.Core { /// /// Used to create a .NET HashCode from multiple objects. diff --git a/src/Umbraco.Core/HashCodeHelper.cs b/src/Umbraco.Core/HashCodeHelper.cs index dd9d5c89dc..9324450cf6 100644 --- a/src/Umbraco.Core/HashCodeHelper.cs +++ b/src/Umbraco.Core/HashCodeHelper.cs @@ -1,6 +1,6 @@ using System.Collections.Generic; -namespace Umbraco.Core +namespace Umbraco.Cms.Core { /// /// Borrowed from http://stackoverflow.com/a/2575444/694494 diff --git a/src/Umbraco.Core/HashGenerator.cs b/src/Umbraco.Core/HashGenerator.cs index c7fad08089..255cf381af 100644 --- a/src/Umbraco.Core/HashGenerator.cs +++ b/src/Umbraco.Core/HashGenerator.cs @@ -1,10 +1,9 @@ using System; -using System.Globalization; using System.IO; using System.Security.Cryptography; using System.Text; -namespace Umbraco.Core +namespace Umbraco.Cms.Core { /// /// Used to generate a string hash using crypto libraries over multiple objects diff --git a/src/Umbraco.Core/HealthChecks/AcceptableConfiguration.cs b/src/Umbraco.Core/HealthChecks/AcceptableConfiguration.cs index f0f20fd4a2..043850203e 100644 --- a/src/Umbraco.Core/HealthChecks/AcceptableConfiguration.cs +++ b/src/Umbraco.Core/HealthChecks/AcceptableConfiguration.cs @@ -1,4 +1,4 @@ -namespace Umbraco.Core.HealthChecks +namespace Umbraco.Cms.Core.HealthChecks { public class AcceptableConfiguration { diff --git a/src/Umbraco.Core/HealthChecks/Checks/AbstractSettingsCheck.cs b/src/Umbraco.Core/HealthChecks/Checks/AbstractSettingsCheck.cs index 0869e7c8ec..d51ba38e34 100644 --- a/src/Umbraco.Core/HealthChecks/Checks/AbstractSettingsCheck.cs +++ b/src/Umbraco.Core/HealthChecks/Checks/AbstractSettingsCheck.cs @@ -5,9 +5,10 @@ using System; using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; -using Umbraco.Core.Services; +using Umbraco.Cms.Core.Services; +using Umbraco.Extensions; -namespace Umbraco.Core.HealthChecks.Checks +namespace Umbraco.Cms.Core.HealthChecks.Checks { /// /// Provides a base class for health checks of configuration values. diff --git a/src/Umbraco.Core/HealthChecks/Checks/Configuration/MacroErrorsCheck.cs b/src/Umbraco.Core/HealthChecks/Checks/Configuration/MacroErrorsCheck.cs index 9ce0ae1404..3237879a03 100644 --- a/src/Umbraco.Core/HealthChecks/Checks/Configuration/MacroErrorsCheck.cs +++ b/src/Umbraco.Core/HealthChecks/Checks/Configuration/MacroErrorsCheck.cs @@ -4,10 +4,11 @@ using System.Collections.Generic; using System.Linq; using Microsoft.Extensions.Options; -using Umbraco.Core.Configuration.Models; -using Umbraco.Core.Services; +using Umbraco.Cms.Core.Configuration.Models; +using Umbraco.Cms.Core.Services; +using Umbraco.Extensions; -namespace Umbraco.Core.HealthChecks.Checks.Configuration +namespace Umbraco.Cms.Core.HealthChecks.Checks.Configuration { /// /// Health check for the recommended production configuration for Macro Errors. diff --git a/src/Umbraco.Core/HealthChecks/Checks/Configuration/NotificationEmailCheck.cs b/src/Umbraco.Core/HealthChecks/Checks/Configuration/NotificationEmailCheck.cs index be0793635f..2a4fb1553c 100644 --- a/src/Umbraco.Core/HealthChecks/Checks/Configuration/NotificationEmailCheck.cs +++ b/src/Umbraco.Core/HealthChecks/Checks/Configuration/NotificationEmailCheck.cs @@ -3,10 +3,11 @@ using System.Collections.Generic; using Microsoft.Extensions.Options; -using Umbraco.Core.Configuration.Models; -using Umbraco.Core.Services; +using Umbraco.Cms.Core.Configuration.Models; +using Umbraco.Cms.Core.Services; +using Umbraco.Extensions; -namespace Umbraco.Core.HealthChecks.Checks.Configuration +namespace Umbraco.Cms.Core.HealthChecks.Checks.Configuration { /// /// Health check for the recommended production configuration for Notification Email. diff --git a/src/Umbraco.Core/HealthChecks/Checks/Data/DatabaseIntegrityCheck.cs b/src/Umbraco.Core/HealthChecks/Checks/Data/DatabaseIntegrityCheck.cs index a826d4dd45..dda7fb2e6e 100644 --- a/src/Umbraco.Core/HealthChecks/Checks/Data/DatabaseIntegrityCheck.cs +++ b/src/Umbraco.Core/HealthChecks/Checks/Data/DatabaseIntegrityCheck.cs @@ -6,10 +6,10 @@ using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; -using Umbraco.Core.Models; -using Umbraco.Core.Services; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Core.Services; -namespace Umbraco.Core.HealthChecks.Checks.Data +namespace Umbraco.Cms.Core.HealthChecks.Checks.Data { /// /// Health check for the integrity of the data in the database. diff --git a/src/Umbraco.Core/HealthChecks/Checks/LiveEnvironment/CompilationDebugCheck.cs b/src/Umbraco.Core/HealthChecks/Checks/LiveEnvironment/CompilationDebugCheck.cs index e134dcd413..ff37807f27 100644 --- a/src/Umbraco.Core/HealthChecks/Checks/LiveEnvironment/CompilationDebugCheck.cs +++ b/src/Umbraco.Core/HealthChecks/Checks/LiveEnvironment/CompilationDebugCheck.cs @@ -3,10 +3,11 @@ using System.Collections.Generic; using Microsoft.Extensions.Options; -using Umbraco.Core.Configuration.Models; -using Umbraco.Core.Services; +using Umbraco.Cms.Core.Configuration.Models; +using Umbraco.Cms.Core.Services; +using Umbraco.Extensions; -namespace Umbraco.Core.HealthChecks.Checks.LiveEnvironment +namespace Umbraco.Cms.Core.HealthChecks.Checks.LiveEnvironment { /// /// Health check for the configuration of debug-flag. diff --git a/src/Umbraco.Core/HealthChecks/Checks/Permissions/FolderAndFilePermissionsCheck.cs b/src/Umbraco.Core/HealthChecks/Checks/Permissions/FolderAndFilePermissionsCheck.cs index 0bb7c56486..03d7dd45f6 100644 --- a/src/Umbraco.Core/HealthChecks/Checks/Permissions/FolderAndFilePermissionsCheck.cs +++ b/src/Umbraco.Core/HealthChecks/Checks/Permissions/FolderAndFilePermissionsCheck.cs @@ -6,10 +6,11 @@ using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; -using Umbraco.Core.Install; -using Umbraco.Core.Services; +using Umbraco.Cms.Core.Install; +using Umbraco.Cms.Core.Services; +using Umbraco.Extensions; -namespace Umbraco.Core.HealthChecks.Checks.Permissions +namespace Umbraco.Cms.Core.HealthChecks.Checks.Permissions { /// /// Health check for the folder and file permissions. diff --git a/src/Umbraco.Core/HealthChecks/Checks/Security/BaseHttpHeaderCheck.cs b/src/Umbraco.Core/HealthChecks/Checks/Security/BaseHttpHeaderCheck.cs index d8869e12fa..f9dccbc585 100644 --- a/src/Umbraco.Core/HealthChecks/Checks/Security/BaseHttpHeaderCheck.cs +++ b/src/Umbraco.Core/HealthChecks/Checks/Security/BaseHttpHeaderCheck.cs @@ -8,10 +8,11 @@ using System.Linq; using System.Net.Http; using System.Text.RegularExpressions; using System.Threading.Tasks; -using Umbraco.Core.Hosting; -using Umbraco.Core.Services; +using Umbraco.Cms.Core.Hosting; +using Umbraco.Cms.Core.Services; +using Umbraco.Extensions; -namespace Umbraco.Core.HealthChecks.Checks.Security +namespace Umbraco.Cms.Core.HealthChecks.Checks.Security { /// /// Provides a base class for health checks of http header values. diff --git a/src/Umbraco.Core/HealthChecks/Checks/Security/ClickJackingCheck.cs b/src/Umbraco.Core/HealthChecks/Checks/Security/ClickJackingCheck.cs index 6bb92e4176..957ee0b715 100644 --- a/src/Umbraco.Core/HealthChecks/Checks/Security/ClickJackingCheck.cs +++ b/src/Umbraco.Core/HealthChecks/Checks/Security/ClickJackingCheck.cs @@ -1,10 +1,10 @@ // Copyright (c) Umbraco. // See LICENSE for more details. -using Umbraco.Core.Hosting; -using Umbraco.Core.Services; +using Umbraco.Cms.Core.Hosting; +using Umbraco.Cms.Core.Services; -namespace Umbraco.Core.HealthChecks.Checks.Security +namespace Umbraco.Cms.Core.HealthChecks.Checks.Security { /// /// Health check for the recommended production setup regarding the X-Frame-Options header. diff --git a/src/Umbraco.Core/HealthChecks/Checks/Security/ExcessiveHeadersCheck.cs b/src/Umbraco.Core/HealthChecks/Checks/Security/ExcessiveHeadersCheck.cs index 000c14f93d..aa38e8afed 100644 --- a/src/Umbraco.Core/HealthChecks/Checks/Security/ExcessiveHeadersCheck.cs +++ b/src/Umbraco.Core/HealthChecks/Checks/Security/ExcessiveHeadersCheck.cs @@ -6,10 +6,11 @@ using System.Collections.Generic; using System.Linq; using System.Net.Http; using System.Threading.Tasks; -using Umbraco.Core.Hosting; -using Umbraco.Core.Services; +using Umbraco.Cms.Core.Hosting; +using Umbraco.Cms.Core.Services; +using Umbraco.Extensions; -namespace Umbraco.Core.HealthChecks.Checks.Security +namespace Umbraco.Cms.Core.HealthChecks.Checks.Security { /// /// Health check for the recommended production setup regarding unnecessary headers. diff --git a/src/Umbraco.Core/HealthChecks/Checks/Security/HstsCheck.cs b/src/Umbraco.Core/HealthChecks/Checks/Security/HstsCheck.cs index 828d2d2470..b2166b88bd 100644 --- a/src/Umbraco.Core/HealthChecks/Checks/Security/HstsCheck.cs +++ b/src/Umbraco.Core/HealthChecks/Checks/Security/HstsCheck.cs @@ -1,10 +1,10 @@ // Copyright (c) Umbraco. // See LICENSE for more details. -using Umbraco.Core.Hosting; -using Umbraco.Core.Services; +using Umbraco.Cms.Core.Hosting; +using Umbraco.Cms.Core.Services; -namespace Umbraco.Core.HealthChecks.Checks.Security +namespace Umbraco.Cms.Core.HealthChecks.Checks.Security { /// /// Health check for the recommended production setup regarding the Strict-Transport-Security header. diff --git a/src/Umbraco.Core/HealthChecks/Checks/Security/HttpsCheck.cs b/src/Umbraco.Core/HealthChecks/Checks/Security/HttpsCheck.cs index 5916c48b82..01638366d1 100644 --- a/src/Umbraco.Core/HealthChecks/Checks/Security/HttpsCheck.cs +++ b/src/Umbraco.Core/HealthChecks/Checks/Security/HttpsCheck.cs @@ -9,11 +9,12 @@ using System.Net.Security; using System.Security.Cryptography.X509Certificates; using System.Threading.Tasks; using Microsoft.Extensions.Options; -using Umbraco.Core.Configuration.Models; -using Umbraco.Core.Hosting; -using Umbraco.Core.Services; +using Umbraco.Cms.Core.Configuration.Models; +using Umbraco.Cms.Core.Hosting; +using Umbraco.Cms.Core.Services; +using Umbraco.Extensions; -namespace Umbraco.Core.HealthChecks.Checks.Security +namespace Umbraco.Cms.Core.HealthChecks.Checks.Security { /// /// Health checks for the recommended production setup regarding https. diff --git a/src/Umbraco.Core/HealthChecks/Checks/Security/NoSniffCheck.cs b/src/Umbraco.Core/HealthChecks/Checks/Security/NoSniffCheck.cs index 0722f4cf64..035733e4ee 100644 --- a/src/Umbraco.Core/HealthChecks/Checks/Security/NoSniffCheck.cs +++ b/src/Umbraco.Core/HealthChecks/Checks/Security/NoSniffCheck.cs @@ -1,10 +1,10 @@ // Copyright (c) Umbraco. // See LICENSE for more details. -using Umbraco.Core.Hosting; -using Umbraco.Core.Services; +using Umbraco.Cms.Core.Hosting; +using Umbraco.Cms.Core.Services; -namespace Umbraco.Core.HealthChecks.Checks.Security +namespace Umbraco.Cms.Core.HealthChecks.Checks.Security { /// /// Health check for the recommended production setup regarding the X-Content-Type-Options header. diff --git a/src/Umbraco.Core/HealthChecks/Checks/Security/XssProtectionCheck.cs b/src/Umbraco.Core/HealthChecks/Checks/Security/XssProtectionCheck.cs index 5a1973d05b..6c05c39f46 100644 --- a/src/Umbraco.Core/HealthChecks/Checks/Security/XssProtectionCheck.cs +++ b/src/Umbraco.Core/HealthChecks/Checks/Security/XssProtectionCheck.cs @@ -1,10 +1,10 @@ // Copyright (c) Umbraco. // See LICENSE for more details. -using Umbraco.Core.Hosting; -using Umbraco.Core.Services; +using Umbraco.Cms.Core.Hosting; +using Umbraco.Cms.Core.Services; -namespace Umbraco.Core.HealthChecks.Checks.Security +namespace Umbraco.Cms.Core.HealthChecks.Checks.Security { /// /// Health check for the recommended production setup regarding the X-XSS-Protection header. diff --git a/src/Umbraco.Core/HealthChecks/Checks/Services/SmtpCheck.cs b/src/Umbraco.Core/HealthChecks/Checks/Services/SmtpCheck.cs index f4e150fbed..618b44b9b3 100644 --- a/src/Umbraco.Core/HealthChecks/Checks/Services/SmtpCheck.cs +++ b/src/Umbraco.Core/HealthChecks/Checks/Services/SmtpCheck.cs @@ -7,10 +7,11 @@ using System.IO; using System.Net.Sockets; using System.Threading.Tasks; using Microsoft.Extensions.Options; -using Umbraco.Core.Configuration.Models; -using Umbraco.Core.Services; +using Umbraco.Cms.Core.Configuration.Models; +using Umbraco.Cms.Core.Services; +using Umbraco.Extensions; -namespace Umbraco.Core.HealthChecks.Checks.Services +namespace Umbraco.Cms.Core.HealthChecks.Checks.Services { /// /// Health check for the recommended setup regarding SMTP. diff --git a/src/Umbraco.Core/HealthChecks/ConfigurationServiceResult.cs b/src/Umbraco.Core/HealthChecks/ConfigurationServiceResult.cs index 114f1d9ed2..79cd61bced 100644 --- a/src/Umbraco.Core/HealthChecks/ConfigurationServiceResult.cs +++ b/src/Umbraco.Core/HealthChecks/ConfigurationServiceResult.cs @@ -1,4 +1,4 @@ -namespace Umbraco.Core.HealthChecks +namespace Umbraco.Cms.Core.HealthChecks { public class ConfigurationServiceResult { diff --git a/src/Umbraco.Core/HealthChecks/HealthCheck.cs b/src/Umbraco.Core/HealthChecks/HealthCheck.cs index 36c60e5164..fb006d7fcf 100644 --- a/src/Umbraco.Core/HealthChecks/HealthCheck.cs +++ b/src/Umbraco.Core/HealthChecks/HealthCheck.cs @@ -2,9 +2,10 @@ using System.Collections.Generic; using System.Runtime.Serialization; using System.Threading.Tasks; -using Umbraco.Core.Composing; +using Umbraco.Cms.Core.Composing; +using Umbraco.Extensions; -namespace Umbraco.Core.HealthChecks +namespace Umbraco.Cms.Core.HealthChecks { /// /// Provides a base class for health checks, filling in the healthcheck metadata on construction diff --git a/src/Umbraco.Core/HealthChecks/HealthCheckAction.cs b/src/Umbraco.Core/HealthChecks/HealthCheckAction.cs index a89f6b73ad..52ccc28ee0 100644 --- a/src/Umbraco.Core/HealthChecks/HealthCheckAction.cs +++ b/src/Umbraco.Core/HealthChecks/HealthCheckAction.cs @@ -2,7 +2,7 @@ using System.Collections.Generic; using System.Runtime.Serialization; -namespace Umbraco.Core.HealthChecks +namespace Umbraco.Cms.Core.HealthChecks { [DataContract(Name = "healthCheckAction", Namespace = "")] public class HealthCheckAction diff --git a/src/Umbraco.Core/HealthChecks/HealthCheckAttribute.cs b/src/Umbraco.Core/HealthChecks/HealthCheckAttribute.cs index 9a265a2e03..596d41c372 100644 --- a/src/Umbraco.Core/HealthChecks/HealthCheckAttribute.cs +++ b/src/Umbraco.Core/HealthChecks/HealthCheckAttribute.cs @@ -1,6 +1,6 @@ using System; -namespace Umbraco.Core.HealthChecks +namespace Umbraco.Cms.Core.HealthChecks { /// /// Metadata attribute for Health checks diff --git a/src/Umbraco.Core/HealthChecks/HealthCheckCollection.cs b/src/Umbraco.Core/HealthChecks/HealthCheckCollection.cs index 88fadee5ec..2987ff1112 100644 --- a/src/Umbraco.Core/HealthChecks/HealthCheckCollection.cs +++ b/src/Umbraco.Core/HealthChecks/HealthCheckCollection.cs @@ -1,7 +1,7 @@ using System.Collections.Generic; -using Umbraco.Core.Composing; +using Umbraco.Cms.Core.Composing; -namespace Umbraco.Core.HealthChecks +namespace Umbraco.Cms.Core.HealthChecks { public class HealthCheckCollection : BuilderCollectionBase { diff --git a/src/Umbraco.Core/HealthChecks/HealthCheckGroup.cs b/src/Umbraco.Core/HealthChecks/HealthCheckGroup.cs index 71b0013d8e..17d585f256 100644 --- a/src/Umbraco.Core/HealthChecks/HealthCheckGroup.cs +++ b/src/Umbraco.Core/HealthChecks/HealthCheckGroup.cs @@ -1,7 +1,7 @@ using System.Collections.Generic; using System.Runtime.Serialization; -namespace Umbraco.Core.HealthChecks +namespace Umbraco.Cms.Core.HealthChecks { [DataContract(Name = "healthCheckGroup", Namespace = "")] public class HealthCheckGroup diff --git a/src/Umbraco.Core/HealthChecks/HealthCheckNotificationMethodAttribute.cs b/src/Umbraco.Core/HealthChecks/HealthCheckNotificationMethodAttribute.cs index 7e5223772f..6dd6df4b8b 100644 --- a/src/Umbraco.Core/HealthChecks/HealthCheckNotificationMethodAttribute.cs +++ b/src/Umbraco.Core/HealthChecks/HealthCheckNotificationMethodAttribute.cs @@ -1,6 +1,6 @@ using System; -namespace Umbraco.Core.HealthChecks +namespace Umbraco.Cms.Core.HealthChecks { /// /// Metadata attribute for health check notification methods diff --git a/src/Umbraco.Core/HealthChecks/HealthCheckNotificationMethodCollection.cs b/src/Umbraco.Core/HealthChecks/HealthCheckNotificationMethodCollection.cs index bcf197aa39..7fa8486df6 100644 --- a/src/Umbraco.Core/HealthChecks/HealthCheckNotificationMethodCollection.cs +++ b/src/Umbraco.Core/HealthChecks/HealthCheckNotificationMethodCollection.cs @@ -1,8 +1,8 @@ using System.Collections.Generic; -using Umbraco.Core.Composing; -using Umbraco.Core.HealthChecks.NotificationMethods; +using Umbraco.Cms.Core.Composing; +using Umbraco.Cms.Core.HealthChecks.NotificationMethods; -namespace Umbraco.Core.HealthChecks +namespace Umbraco.Cms.Core.HealthChecks { public class HealthCheckNotificationMethodCollection : BuilderCollectionBase { diff --git a/src/Umbraco.Core/HealthChecks/HealthCheckNotificationMethodCollectionBuilder.cs b/src/Umbraco.Core/HealthChecks/HealthCheckNotificationMethodCollectionBuilder.cs index e5d91432f5..48f2629e2a 100644 --- a/src/Umbraco.Core/HealthChecks/HealthCheckNotificationMethodCollectionBuilder.cs +++ b/src/Umbraco.Core/HealthChecks/HealthCheckNotificationMethodCollectionBuilder.cs @@ -1,7 +1,7 @@ -using Umbraco.Core.Composing; -using Umbraco.Core.HealthChecks.NotificationMethods; +using Umbraco.Cms.Core.Composing; +using Umbraco.Cms.Core.HealthChecks.NotificationMethods; -namespace Umbraco.Core.HealthChecks +namespace Umbraco.Cms.Core.HealthChecks { public class HealthCheckNotificationMethodCollectionBuilder : LazyCollectionBuilderBase { diff --git a/src/Umbraco.Core/HealthChecks/HealthCheckNotificationVerbosity.cs b/src/Umbraco.Core/HealthChecks/HealthCheckNotificationVerbosity.cs index e79b1e627c..cba8ab5c0f 100644 --- a/src/Umbraco.Core/HealthChecks/HealthCheckNotificationVerbosity.cs +++ b/src/Umbraco.Core/HealthChecks/HealthCheckNotificationVerbosity.cs @@ -1,4 +1,4 @@ -namespace Umbraco.Core.HealthChecks +namespace Umbraco.Cms.Core.HealthChecks { public enum HealthCheckNotificationVerbosity { diff --git a/src/Umbraco.Core/HealthChecks/HealthCheckResults.cs b/src/Umbraco.Core/HealthChecks/HealthCheckResults.cs index 904649deb1..dd073f32f5 100644 --- a/src/Umbraco.Core/HealthChecks/HealthCheckResults.cs +++ b/src/Umbraco.Core/HealthChecks/HealthCheckResults.cs @@ -4,8 +4,9 @@ using System.Linq; using System.Text; using System.Threading.Tasks; using Microsoft.Extensions.Logging; +using Umbraco.Extensions; -namespace Umbraco.Core.HealthChecks +namespace Umbraco.Cms.Core.HealthChecks { public class HealthCheckResults { diff --git a/src/Umbraco.Core/HealthChecks/HealthCheckStatus.cs b/src/Umbraco.Core/HealthChecks/HealthCheckStatus.cs index 84e3933133..fc787803d2 100644 --- a/src/Umbraco.Core/HealthChecks/HealthCheckStatus.cs +++ b/src/Umbraco.Core/HealthChecks/HealthCheckStatus.cs @@ -2,7 +2,7 @@ using System.Linq; using System.Runtime.Serialization; -namespace Umbraco.Core.HealthChecks +namespace Umbraco.Cms.Core.HealthChecks { /// /// The status returned for a health check when it performs it check diff --git a/src/Umbraco.Core/HealthChecks/HeathCheckCollectionBuilder.cs b/src/Umbraco.Core/HealthChecks/HeathCheckCollectionBuilder.cs index 57d89b00d9..495fc42cf1 100644 --- a/src/Umbraco.Core/HealthChecks/HeathCheckCollectionBuilder.cs +++ b/src/Umbraco.Core/HealthChecks/HeathCheckCollectionBuilder.cs @@ -1,7 +1,7 @@ using Microsoft.Extensions.DependencyInjection; -using Umbraco.Core.Composing; +using Umbraco.Cms.Core.Composing; -namespace Umbraco.Core.HealthChecks +namespace Umbraco.Cms.Core.HealthChecks { public class HealthCheckCollectionBuilder : LazyCollectionBuilderBase { diff --git a/src/Umbraco.Core/HealthChecks/NotificationMethods/EmailNotificationMethod.cs b/src/Umbraco.Core/HealthChecks/NotificationMethods/EmailNotificationMethod.cs index 97ef86d205..51e31b1811 100644 --- a/src/Umbraco.Core/HealthChecks/NotificationMethods/EmailNotificationMethod.cs +++ b/src/Umbraco.Core/HealthChecks/NotificationMethods/EmailNotificationMethod.cs @@ -1,13 +1,14 @@ using System; using System.Threading.Tasks; using Microsoft.Extensions.Options; -using Umbraco.Core.Configuration.Models; -using Umbraco.Core.Hosting; -using Umbraco.Core.Mail; -using Umbraco.Core.Models; -using Umbraco.Core.Services; +using Umbraco.Cms.Core.Configuration.Models; +using Umbraco.Cms.Core.Hosting; +using Umbraco.Cms.Core.Mail; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Core.Services; +using Umbraco.Extensions; -namespace Umbraco.Core.HealthChecks.NotificationMethods +namespace Umbraco.Cms.Core.HealthChecks.NotificationMethods { [HealthCheckNotificationMethod("email")] public class EmailNotificationMethod : NotificationMethodBase diff --git a/src/Umbraco.Core/HealthChecks/NotificationMethods/IHealthCheckNotificationMethod.cs b/src/Umbraco.Core/HealthChecks/NotificationMethods/IHealthCheckNotificationMethod.cs index 1bed571e14..1bce4a5a63 100644 --- a/src/Umbraco.Core/HealthChecks/NotificationMethods/IHealthCheckNotificationMethod.cs +++ b/src/Umbraco.Core/HealthChecks/NotificationMethods/IHealthCheckNotificationMethod.cs @@ -1,7 +1,7 @@ using System.Threading.Tasks; -using Umbraco.Core.Composing; +using Umbraco.Cms.Core.Composing; -namespace Umbraco.Core.HealthChecks.NotificationMethods +namespace Umbraco.Cms.Core.HealthChecks.NotificationMethods { public interface IHealthCheckNotificationMethod : IDiscoverable { diff --git a/src/Umbraco.Core/HealthChecks/NotificationMethods/IMarkdownToHtmlConverter.cs b/src/Umbraco.Core/HealthChecks/NotificationMethods/IMarkdownToHtmlConverter.cs index 0ab33eb6d2..3961d4d25f 100644 --- a/src/Umbraco.Core/HealthChecks/NotificationMethods/IMarkdownToHtmlConverter.cs +++ b/src/Umbraco.Core/HealthChecks/NotificationMethods/IMarkdownToHtmlConverter.cs @@ -1,4 +1,4 @@ -namespace Umbraco.Core.HealthChecks.NotificationMethods +namespace Umbraco.Cms.Core.HealthChecks.NotificationMethods { public interface IMarkdownToHtmlConverter { diff --git a/src/Umbraco.Core/HealthChecks/NotificationMethods/NotificationMethodBase.cs b/src/Umbraco.Core/HealthChecks/NotificationMethods/NotificationMethodBase.cs index f491e26ae9..10af1de106 100644 --- a/src/Umbraco.Core/HealthChecks/NotificationMethods/NotificationMethodBase.cs +++ b/src/Umbraco.Core/HealthChecks/NotificationMethods/NotificationMethodBase.cs @@ -2,9 +2,9 @@ using System.Reflection; using System.Threading.Tasks; using Microsoft.Extensions.Options; -using Umbraco.Core.Configuration.Models; +using Umbraco.Cms.Core.Configuration.Models; -namespace Umbraco.Core.HealthChecks.NotificationMethods +namespace Umbraco.Cms.Core.HealthChecks.NotificationMethods { public abstract class NotificationMethodBase : IHealthCheckNotificationMethod { diff --git a/src/Umbraco.Core/HealthChecks/StatusResultType.cs b/src/Umbraco.Core/HealthChecks/StatusResultType.cs index ce91080267..b06322a267 100644 --- a/src/Umbraco.Core/HealthChecks/StatusResultType.cs +++ b/src/Umbraco.Core/HealthChecks/StatusResultType.cs @@ -1,4 +1,4 @@ -namespace Umbraco.Core.HealthChecks +namespace Umbraco.Cms.Core.HealthChecks { public enum StatusResultType { diff --git a/src/Umbraco.Core/HealthChecks/ValueComparisonType.cs b/src/Umbraco.Core/HealthChecks/ValueComparisonType.cs index 905c92e7ce..254a53c6fb 100644 --- a/src/Umbraco.Core/HealthChecks/ValueComparisonType.cs +++ b/src/Umbraco.Core/HealthChecks/ValueComparisonType.cs @@ -1,4 +1,4 @@ -namespace Umbraco.Core.HealthChecks +namespace Umbraco.Cms.Core.HealthChecks { public enum ValueComparisonType { diff --git a/src/Umbraco.Core/HexEncoder.cs b/src/Umbraco.Core/HexEncoder.cs index ec0e4492ac..ce4df997ab 100644 --- a/src/Umbraco.Core/HexEncoder.cs +++ b/src/Umbraco.Core/HexEncoder.cs @@ -1,7 +1,7 @@ using System.Linq; using System.Runtime.CompilerServices; -namespace Umbraco.Core +namespace Umbraco.Cms.Core { /// /// Provides methods for encoding byte arrays into hexadecimal strings. diff --git a/src/Umbraco.Core/Hosting/IApplicationShutdownRegistry.cs b/src/Umbraco.Core/Hosting/IApplicationShutdownRegistry.cs index 93441f1a47..2d1336ab90 100644 --- a/src/Umbraco.Core/Hosting/IApplicationShutdownRegistry.cs +++ b/src/Umbraco.Core/Hosting/IApplicationShutdownRegistry.cs @@ -1,4 +1,4 @@ -namespace Umbraco.Core.Hosting +namespace Umbraco.Cms.Core.Hosting { public interface IApplicationShutdownRegistry { diff --git a/src/Umbraco.Core/Hosting/IHostingEnvironment.cs b/src/Umbraco.Core/Hosting/IHostingEnvironment.cs index e01435422d..311d7559d0 100644 --- a/src/Umbraco.Core/Hosting/IHostingEnvironment.cs +++ b/src/Umbraco.Core/Hosting/IHostingEnvironment.cs @@ -1,6 +1,6 @@ using System; -namespace Umbraco.Core.Hosting +namespace Umbraco.Cms.Core.Hosting { public interface IHostingEnvironment { diff --git a/src/Umbraco.Core/Hosting/IUmbracoApplicationLifetime.cs b/src/Umbraco.Core/Hosting/IUmbracoApplicationLifetime.cs index 50b7727ecf..f55040f96a 100644 --- a/src/Umbraco.Core/Hosting/IUmbracoApplicationLifetime.cs +++ b/src/Umbraco.Core/Hosting/IUmbracoApplicationLifetime.cs @@ -1,4 +1,4 @@ -namespace Umbraco.Core.Hosting +namespace Umbraco.Cms.Core.Hosting { public interface IUmbracoApplicationLifetime { diff --git a/src/Umbraco.Core/Hosting/NoopApplicationShutdownRegistry.cs b/src/Umbraco.Core/Hosting/NoopApplicationShutdownRegistry.cs index 3ffef04410..15b08d1ac6 100644 --- a/src/Umbraco.Core/Hosting/NoopApplicationShutdownRegistry.cs +++ b/src/Umbraco.Core/Hosting/NoopApplicationShutdownRegistry.cs @@ -1,4 +1,4 @@ -namespace Umbraco.Core.Hosting +namespace Umbraco.Cms.Core.Hosting { internal class NoopApplicationShutdownRegistry : IApplicationShutdownRegistry { diff --git a/src/Umbraco.Core/HybridAccessorBase.cs b/src/Umbraco.Core/HybridAccessorBase.cs index ad33fbf067..ae3b4471e9 100644 --- a/src/Umbraco.Core/HybridAccessorBase.cs +++ b/src/Umbraco.Core/HybridAccessorBase.cs @@ -1,9 +1,8 @@ using System; -using Umbraco.Core; -using Umbraco.Core.Cache; -using Umbraco.Core.Scoping; +using Umbraco.Cms.Core.Cache; +using Umbraco.Cms.Core.Scoping; -namespace Umbraco.Web +namespace Umbraco.Cms.Core { /// /// Provides a base class for hybrid accessors. diff --git a/src/Umbraco.Core/HybridEventMessagesAccessor.cs b/src/Umbraco.Core/HybridEventMessagesAccessor.cs index 82e784e093..6f4d33a307 100644 --- a/src/Umbraco.Core/HybridEventMessagesAccessor.cs +++ b/src/Umbraco.Core/HybridEventMessagesAccessor.cs @@ -1,7 +1,7 @@ -using Umbraco.Core.Cache; -using Umbraco.Core.Events; +using Umbraco.Cms.Core.Cache; +using Umbraco.Cms.Core.Events; -namespace Umbraco.Web +namespace Umbraco.Cms.Core { public class HybridEventMessagesAccessor : HybridAccessorBase, IEventMessagesAccessor { diff --git a/src/Umbraco.Core/IBackOfficeInfo.cs b/src/Umbraco.Core/IBackOfficeInfo.cs index 936fb73382..66f5d97bd9 100644 --- a/src/Umbraco.Core/IBackOfficeInfo.cs +++ b/src/Umbraco.Core/IBackOfficeInfo.cs @@ -1,4 +1,4 @@ -namespace Umbraco.Core +namespace Umbraco.Cms.Core { public interface IBackOfficeInfo { diff --git a/src/Umbraco.Core/IBackofficeSecurityFactory.cs b/src/Umbraco.Core/IBackofficeSecurityFactory.cs index 5176682e61..ac7c875f16 100644 --- a/src/Umbraco.Core/IBackofficeSecurityFactory.cs +++ b/src/Umbraco.Core/IBackofficeSecurityFactory.cs @@ -1,6 +1,4 @@ -using Umbraco.Web.Security; - -namespace Umbraco.Core +namespace Umbraco.Cms.Core { /// /// Creates and manages instances. diff --git a/src/Umbraco.Core/ICompletable.cs b/src/Umbraco.Core/ICompletable.cs index 594d82b0ae..2061723575 100644 --- a/src/Umbraco.Core/ICompletable.cs +++ b/src/Umbraco.Core/ICompletable.cs @@ -1,6 +1,6 @@ using System; -namespace Umbraco.Core +namespace Umbraco.Cms.Core { public interface ICompletable : IDisposable { diff --git a/src/Umbraco.Core/IDisposeOnRequestEnd.cs b/src/Umbraco.Core/IDisposeOnRequestEnd.cs index cf1ec3a177..97df5793b9 100644 --- a/src/Umbraco.Core/IDisposeOnRequestEnd.cs +++ b/src/Umbraco.Core/IDisposeOnRequestEnd.cs @@ -1,9 +1,6 @@ using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -namespace Umbraco.Core +namespace Umbraco.Cms.Core { /// /// Any class implementing this interface that is added to the httpcontext.items keys or values will be disposed of at the end of the request. diff --git a/src/Umbraco.Core/IO/CleanFolderResult.cs b/src/Umbraco.Core/IO/CleanFolderResult.cs index 547157daff..a49c9a5b0c 100644 --- a/src/Umbraco.Core/IO/CleanFolderResult.cs +++ b/src/Umbraco.Core/IO/CleanFolderResult.cs @@ -2,7 +2,7 @@ using System.Collections.Generic; using System.IO; -namespace Umbraco.Core.IO +namespace Umbraco.Cms.Core.IO { public class CleanFolderResult { diff --git a/src/Umbraco.Core/IO/CleanFolderResultStatus.cs b/src/Umbraco.Core/IO/CleanFolderResultStatus.cs index 41bd56d53d..3180677acb 100644 --- a/src/Umbraco.Core/IO/CleanFolderResultStatus.cs +++ b/src/Umbraco.Core/IO/CleanFolderResultStatus.cs @@ -1,4 +1,4 @@ -namespace Umbraco.Core.IO +namespace Umbraco.Cms.Core.IO { public enum CleanFolderResultStatus { diff --git a/src/Umbraco.Core/IO/FileSystemExtensions.cs b/src/Umbraco.Core/IO/FileSystemExtensions.cs index 444f312153..e688ca22da 100644 --- a/src/Umbraco.Core/IO/FileSystemExtensions.cs +++ b/src/Umbraco.Core/IO/FileSystemExtensions.cs @@ -1,8 +1,9 @@ using System; using System.IO; using System.Threading; +using Umbraco.Cms.Core.IO; -namespace Umbraco.Core.IO +namespace Umbraco.Extensions { public static class FileSystemExtensions { diff --git a/src/Umbraco.Core/IO/FileSystemWrapper.cs b/src/Umbraco.Core/IO/FileSystemWrapper.cs index 14d028c16d..5802c327d5 100644 --- a/src/Umbraco.Core/IO/FileSystemWrapper.cs +++ b/src/Umbraco.Core/IO/FileSystemWrapper.cs @@ -2,7 +2,7 @@ using System.Collections.Generic; using System.IO; -namespace Umbraco.Core.IO +namespace Umbraco.Cms.Core.IO { /// /// All custom file systems that are based upon another IFileSystem should inherit from FileSystemWrapper diff --git a/src/Umbraco.Core/IO/FileSystems.cs b/src/Umbraco.Core/IO/FileSystems.cs index 62f46edce4..52ee2fe0d3 100644 --- a/src/Umbraco.Core/IO/FileSystems.cs +++ b/src/Umbraco.Core/IO/FileSystems.cs @@ -3,12 +3,12 @@ using System.Collections.Concurrent; using System.Collections.Generic; using System.Threading; using Microsoft.Extensions.Logging; -using Umbraco.Core.Hosting; -using Umbraco.Core.Configuration.Models; using Microsoft.Extensions.Options; -using Umbraco.Core.DependencyInjection; +using Umbraco.Cms.Core.Configuration.Models; +using Umbraco.Cms.Core.Hosting; +using Umbraco.Extensions; -namespace Umbraco.Core.IO +namespace Umbraco.Cms.Core.IO { public class FileSystems : IFileSystems { diff --git a/src/Umbraco.Core/IO/IFileSystem.cs b/src/Umbraco.Core/IO/IFileSystem.cs index 9de1ea40f2..281ffd0e14 100644 --- a/src/Umbraco.Core/IO/IFileSystem.cs +++ b/src/Umbraco.Core/IO/IFileSystem.cs @@ -2,7 +2,7 @@ using System.Collections.Generic; using System.IO; -namespace Umbraco.Core.IO +namespace Umbraco.Cms.Core.IO { /// /// Provides methods allowing the manipulation of files. diff --git a/src/Umbraco.Core/IO/IFileSystems.cs b/src/Umbraco.Core/IO/IFileSystems.cs index f7d35058e3..3a169e33a3 100644 --- a/src/Umbraco.Core/IO/IFileSystems.cs +++ b/src/Umbraco.Core/IO/IFileSystems.cs @@ -1,4 +1,4 @@ -namespace Umbraco.Core.IO +namespace Umbraco.Cms.Core.IO { /// /// Provides the system filesystems. diff --git a/src/Umbraco.Core/IO/IIOHelper.cs b/src/Umbraco.Core/IO/IIOHelper.cs index a342192612..5a814ab386 100644 --- a/src/Umbraco.Core/IO/IIOHelper.cs +++ b/src/Umbraco.Core/IO/IIOHelper.cs @@ -1,19 +1,16 @@ using System; using System.Collections.Generic; using System.IO; -using Umbraco.Core.Hosting; -namespace Umbraco.Core.IO +namespace Umbraco.Cms.Core.IO { public interface IIOHelper { string FindFile(string virtualPath); - // TODO: This is the same as IHostingEnvironment.ToAbsolute + [Obsolete("Use IHostingEnvironment.ToAbsolute instead")] string ResolveUrl(string virtualPath); - Attempt TryResolveUrl(string virtualPath); - /// /// Maps a virtual path to a physical path in the content root folder (i.e. www) /// @@ -22,14 +19,6 @@ namespace Umbraco.Core.IO [Obsolete("Use IHostingEnvironment.MapPathContentRoot or IHostingEnvironment.MapPathWebRoot instead")] string MapPath(string path); - /// - /// Returns true if the path has a root, and is considered fully qualified for the OS it is on - /// See https://github.com/dotnet/runtime/blob/30769e8f31b20be10ca26e27ec279cd4e79412b9/src/libraries/System.Private.CoreLib/src/System/IO/Path.cs#L281 for the .NET Standard 2.1 version of this - /// - /// The path to check - /// True if the path is fully qualified, false otherwise - bool IsPathFullyQualified(string path); - /// /// Verifies that the current filepath matches a directory where the user is allowed to edit a file. /// diff --git a/src/Umbraco.Core/IO/IMediaFileSystem.cs b/src/Umbraco.Core/IO/IMediaFileSystem.cs index 8ed0ba60ca..eced74482e 100644 --- a/src/Umbraco.Core/IO/IMediaFileSystem.cs +++ b/src/Umbraco.Core/IO/IMediaFileSystem.cs @@ -1,9 +1,9 @@ using System; using System.Collections.Generic; using System.IO; -using Umbraco.Core.Models; +using Umbraco.Cms.Core.Models; -namespace Umbraco.Core.IO +namespace Umbraco.Cms.Core.IO { /// /// Provides methods allowing the manipulation of media files. diff --git a/src/Umbraco.Core/IO/IMediaPathScheme.cs b/src/Umbraco.Core/IO/IMediaPathScheme.cs index 9a38cdc74f..bd48b21a16 100644 --- a/src/Umbraco.Core/IO/IMediaPathScheme.cs +++ b/src/Umbraco.Core/IO/IMediaPathScheme.cs @@ -1,6 +1,6 @@ using System; -namespace Umbraco.Core.IO +namespace Umbraco.Cms.Core.IO { /// /// Represents a media file path scheme. diff --git a/src/Umbraco.Core/IO/IOHelper.cs b/src/Umbraco.Core/IO/IOHelper.cs index 903b6e4a5c..e799bbdbe8 100644 --- a/src/Umbraco.Core/IO/IOHelper.cs +++ b/src/Umbraco.Core/IO/IOHelper.cs @@ -1,15 +1,14 @@ -using System; +using System; using System.Collections.Generic; -using System.Diagnostics; using System.Globalization; using System.IO; using System.Linq; using System.Reflection; -using System.Runtime.InteropServices; -using Umbraco.Core.Hosting; -using Umbraco.Core.Strings; +using Umbraco.Cms.Core.Hosting; +using Umbraco.Cms.Core.Strings; +using Umbraco.Extensions; -namespace Umbraco.Core.IO +namespace Umbraco.Cms.Core.IO { public abstract class IOHelper : IIOHelper { @@ -37,7 +36,7 @@ namespace Umbraco.Core.IO return retval; } - // TODO: This is the same as IHostingEnvironment.ToAbsolute + // TODO: This is the same as IHostingEnvironment.ToAbsolute - marked as obsolete in IIOHelper for now public string ResolveUrl(string virtualPath) { if (string.IsNullOrWhiteSpace(virtualPath)) return virtualPath; @@ -45,23 +44,6 @@ namespace Umbraco.Core.IO } - public Attempt TryResolveUrl(string virtualPath) - { - try - { - if (virtualPath.StartsWith("~")) - return Attempt.Succeed(virtualPath.Replace("~", _hostingEnvironment.ApplicationVirtualPath).Replace("//", "/")); - if (Uri.IsWellFormedUriString(virtualPath, UriKind.Absolute)) - return Attempt.Succeed(virtualPath); - - return Attempt.Succeed(_hostingEnvironment.ToAbsolute(virtualPath)); - } - catch (Exception ex) - { - return Attempt.Fail(virtualPath, ex); - } - } - public string MapPath(string path) { if (path == null) throw new ArgumentNullException(nameof(path)); diff --git a/src/Umbraco.Core/IO/IOHelperExtensions.cs b/src/Umbraco.Core/IO/IOHelperExtensions.cs index 6912974196..d50c779f81 100644 --- a/src/Umbraco.Core/IO/IOHelperExtensions.cs +++ b/src/Umbraco.Core/IO/IOHelperExtensions.cs @@ -1,7 +1,8 @@ using System; using System.IO; +using Umbraco.Cms.Core.IO; -namespace Umbraco.Core.IO +namespace Umbraco.Extensions { public static class IOHelperExtensions { @@ -49,6 +50,6 @@ namespace Umbraco.Core.IO return "umbraco-test." + Guid.NewGuid().ToString("N").Substring(0, 8); } - + } } diff --git a/src/Umbraco.Core/IO/IOHelperLinux.cs b/src/Umbraco.Core/IO/IOHelperLinux.cs index 2c2e778740..116a7200b3 100644 --- a/src/Umbraco.Core/IO/IOHelperLinux.cs +++ b/src/Umbraco.Core/IO/IOHelperLinux.cs @@ -1,9 +1,9 @@ using System; using System.IO; using System.Linq; -using Umbraco.Core.Hosting; +using Umbraco.Cms.Core.Hosting; -namespace Umbraco.Core.IO +namespace Umbraco.Cms.Core.IO { public class IOHelperLinux : IOHelper { diff --git a/src/Umbraco.Core/IO/IOHelperOSX.cs b/src/Umbraco.Core/IO/IOHelperOSX.cs index 90d96998c3..53b9cb4dc0 100644 --- a/src/Umbraco.Core/IO/IOHelperOSX.cs +++ b/src/Umbraco.Core/IO/IOHelperOSX.cs @@ -1,10 +1,9 @@ using System; using System.IO; using System.Linq; -using Umbraco.Core.Hosting; +using Umbraco.Cms.Core.Hosting; - -namespace Umbraco.Core.IO +namespace Umbraco.Cms.Core.IO { public class IOHelperOSX : IOHelper { diff --git a/src/Umbraco.Core/IO/IOHelperWindows.cs b/src/Umbraco.Core/IO/IOHelperWindows.cs index 3cffc27751..cb60f164dc 100644 --- a/src/Umbraco.Core/IO/IOHelperWindows.cs +++ b/src/Umbraco.Core/IO/IOHelperWindows.cs @@ -1,10 +1,9 @@ using System; using System.IO; using System.Linq; -using Umbraco.Core.Hosting; +using Umbraco.Cms.Core.Hosting; - -namespace Umbraco.Core.IO +namespace Umbraco.Cms.Core.IO { public class IOHelperWindows : IOHelper { diff --git a/src/Umbraco.Core/IO/MediaFileSystem.cs b/src/Umbraco.Core/IO/MediaFileSystem.cs index 5e5a3f3e97..6d598941c5 100644 --- a/src/Umbraco.Core/IO/MediaFileSystem.cs +++ b/src/Umbraco.Core/IO/MediaFileSystem.cs @@ -4,10 +4,11 @@ using System.IO; using System.Linq; using System.Threading.Tasks; using Microsoft.Extensions.Logging; -using Umbraco.Core.Models; -using Umbraco.Core.Strings; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Core.Strings; +using Umbraco.Extensions; -namespace Umbraco.Core.IO +namespace Umbraco.Cms.Core.IO { /// /// A custom file system provider for media diff --git a/src/Umbraco.Core/IO/MediaPathSchemes/CombinedGuidsMediaPathScheme.cs b/src/Umbraco.Core/IO/MediaPathSchemes/CombinedGuidsMediaPathScheme.cs index 49fe3dc05e..a23468d5ac 100644 --- a/src/Umbraco.Core/IO/MediaPathSchemes/CombinedGuidsMediaPathScheme.cs +++ b/src/Umbraco.Core/IO/MediaPathSchemes/CombinedGuidsMediaPathScheme.cs @@ -1,7 +1,7 @@ using System; using System.IO; -namespace Umbraco.Core.IO.MediaPathSchemes +namespace Umbraco.Cms.Core.IO.MediaPathSchemes { /// /// Implements a combined-guids media path scheme. diff --git a/src/Umbraco.Core/IO/MediaPathSchemes/OriginalMediaPathScheme.cs b/src/Umbraco.Core/IO/MediaPathSchemes/OriginalMediaPathScheme.cs index 52f84e9901..ea23bf0145 100644 --- a/src/Umbraco.Core/IO/MediaPathSchemes/OriginalMediaPathScheme.cs +++ b/src/Umbraco.Core/IO/MediaPathSchemes/OriginalMediaPathScheme.cs @@ -2,10 +2,8 @@ using System.Globalization; using System.IO; using System.Threading; -using Umbraco.Core.Composing; -using Umbraco.Core.Configuration; -namespace Umbraco.Core.IO.MediaPathSchemes +namespace Umbraco.Cms.Core.IO.MediaPathSchemes { /// /// Implements the original media path scheme. diff --git a/src/Umbraco.Core/IO/MediaPathSchemes/TwoGuidsMediaPathScheme.cs b/src/Umbraco.Core/IO/MediaPathSchemes/TwoGuidsMediaPathScheme.cs index 3c06e295e6..2fffd4e7d6 100644 --- a/src/Umbraco.Core/IO/MediaPathSchemes/TwoGuidsMediaPathScheme.cs +++ b/src/Umbraco.Core/IO/MediaPathSchemes/TwoGuidsMediaPathScheme.cs @@ -1,7 +1,7 @@ using System; using System.IO; -namespace Umbraco.Core.IO.MediaPathSchemes +namespace Umbraco.Cms.Core.IO.MediaPathSchemes { /// /// Implements a two-guids media path scheme. diff --git a/src/Umbraco.Core/IO/MediaPathSchemes/UniqueMediaPathScheme.cs b/src/Umbraco.Core/IO/MediaPathSchemes/UniqueMediaPathScheme.cs index b8f1356041..faf94fb6e6 100644 --- a/src/Umbraco.Core/IO/MediaPathSchemes/UniqueMediaPathScheme.cs +++ b/src/Umbraco.Core/IO/MediaPathSchemes/UniqueMediaPathScheme.cs @@ -1,7 +1,7 @@ using System; using System.IO; -namespace Umbraco.Core.IO.MediaPathSchemes +namespace Umbraco.Cms.Core.IO.MediaPathSchemes { /// /// Implements a unique directory media path scheme. diff --git a/src/Umbraco.Core/IO/PhysicalFileSystem.cs b/src/Umbraco.Core/IO/PhysicalFileSystem.cs index c8d49e0c19..898a7f0ce4 100644 --- a/src/Umbraco.Core/IO/PhysicalFileSystem.cs +++ b/src/Umbraco.Core/IO/PhysicalFileSystem.cs @@ -4,9 +4,10 @@ using System.IO; using System.Linq; using System.Threading; using Microsoft.Extensions.Logging; -using Umbraco.Core.Hosting; +using Umbraco.Cms.Core.Hosting; +using Umbraco.Extensions; -namespace Umbraco.Core.IO +namespace Umbraco.Cms.Core.IO { public interface IPhysicalFileSystem : IFileSystem {} public class PhysicalFileSystem : IPhysicalFileSystem diff --git a/src/Umbraco.Core/IO/ShadowFileSystem.cs b/src/Umbraco.Core/IO/ShadowFileSystem.cs index 84ff1b428b..97f2cac668 100644 --- a/src/Umbraco.Core/IO/ShadowFileSystem.cs +++ b/src/Umbraco.Core/IO/ShadowFileSystem.cs @@ -4,7 +4,7 @@ using System.IO; using System.Linq; using System.Text.RegularExpressions; -namespace Umbraco.Core.IO +namespace Umbraco.Cms.Core.IO { internal class ShadowFileSystem : IFileSystem { diff --git a/src/Umbraco.Core/IO/ShadowFileSystems.cs b/src/Umbraco.Core/IO/ShadowFileSystems.cs index daec6e8dc5..413cc73d8a 100644 --- a/src/Umbraco.Core/IO/ShadowFileSystems.cs +++ b/src/Umbraco.Core/IO/ShadowFileSystems.cs @@ -1,6 +1,4 @@ -using System; - -namespace Umbraco.Core.IO +namespace Umbraco.Cms.Core.IO { // shadow filesystems is definitively ... too convoluted diff --git a/src/Umbraco.Core/IO/ShadowWrapper.cs b/src/Umbraco.Core/IO/ShadowWrapper.cs index 1683fb5b4e..cda61cf7b5 100644 --- a/src/Umbraco.Core/IO/ShadowWrapper.cs +++ b/src/Umbraco.Core/IO/ShadowWrapper.cs @@ -3,9 +3,10 @@ using System.Collections.Generic; using System.IO; using System.Linq; using Microsoft.Extensions.Logging; -using Umbraco.Core.Hosting; +using Umbraco.Cms.Core.Hosting; +using Umbraco.Extensions; -namespace Umbraco.Core.IO +namespace Umbraco.Cms.Core.IO { internal class ShadowWrapper : IFileSystem { diff --git a/src/Umbraco.Core/IO/SystemFiles.cs b/src/Umbraco.Core/IO/SystemFiles.cs index 92e9156f2f..64199a1c51 100644 --- a/src/Umbraco.Core/IO/SystemFiles.cs +++ b/src/Umbraco.Core/IO/SystemFiles.cs @@ -1,9 +1,7 @@ using System.IO; -using Umbraco.Core.Composing; -using Umbraco.Core.Configuration; -using Umbraco.Core.Hosting; +using Umbraco.Cms.Core.Hosting; -namespace Umbraco.Core.IO +namespace Umbraco.Cms.Core.IO { public class SystemFiles { diff --git a/src/Umbraco.Core/IO/ViewHelper.cs b/src/Umbraco.Core/IO/ViewHelper.cs index 569d8cdfc9..258c4a7f64 100644 --- a/src/Umbraco.Core/IO/ViewHelper.cs +++ b/src/Umbraco.Core/IO/ViewHelper.cs @@ -1,10 +1,11 @@ -using System; +using System; using System.IO; using System.Linq; using System.Text; -using Umbraco.Core.Models; +using Umbraco.Cms.Core.Models; +using Umbraco.Extensions; -namespace Umbraco.Core.IO +namespace Umbraco.Cms.Core.IO { public class ViewHelper { @@ -69,8 +70,8 @@ namespace Umbraco.Core.IO // either // @inherits Umbraco.Web.Mvc.UmbracoViewPage // @inherits Umbraco.Web.Mvc.UmbracoViewPage - content.AppendLine("@using Umbraco.Web.PublishedModels;"); - content.Append("@inherits Umbraco.Web.Common.AspNetCore.UmbracoViewPage"); + content.AppendLine("@using Umbraco.Cms.Web.Common.PublishedModels;"); + content.Append("@inherits Umbraco.Cms.Web.Common.Views.UmbracoViewPage"); if (modelClassName.IsNullOrWhiteSpace() == false) { content.Append("<"); diff --git a/src/Umbraco.Core/IRegisteredObject.cs b/src/Umbraco.Core/IRegisteredObject.cs index abe52e2350..54ac6e1a57 100644 --- a/src/Umbraco.Core/IRegisteredObject.cs +++ b/src/Umbraco.Core/IRegisteredObject.cs @@ -1,4 +1,4 @@ -namespace Umbraco.Core +namespace Umbraco.Cms.Core { public interface IRegisteredObject { diff --git a/src/Umbraco.Core/Install/FilePermissionTest.cs b/src/Umbraco.Core/Install/FilePermissionTest.cs index fe714ca8fa..f84d9a0a7b 100644 --- a/src/Umbraco.Core/Install/FilePermissionTest.cs +++ b/src/Umbraco.Core/Install/FilePermissionTest.cs @@ -1,4 +1,4 @@ -namespace Umbraco.Core.Install +namespace Umbraco.Cms.Core.Install { public enum FilePermissionTest { diff --git a/src/Umbraco.Core/Install/IFilePermissionHelper.cs b/src/Umbraco.Core/Install/IFilePermissionHelper.cs index 6bddd02db4..cfda3a396d 100644 --- a/src/Umbraco.Core/Install/IFilePermissionHelper.cs +++ b/src/Umbraco.Core/Install/IFilePermissionHelper.cs @@ -3,7 +3,7 @@ using System.Collections.Generic; -namespace Umbraco.Core.Install +namespace Umbraco.Cms.Core.Install { /// /// Helper to test File and folder permissions diff --git a/src/Umbraco.Core/Install/InstallException.cs b/src/Umbraco.Core/Install/InstallException.cs index 3dc297e6b2..c21359e953 100644 --- a/src/Umbraco.Core/Install/InstallException.cs +++ b/src/Umbraco.Core/Install/InstallException.cs @@ -1,7 +1,7 @@ using System; using System.Runtime.Serialization; -namespace Umbraco.Web.Install +namespace Umbraco.Cms.Core.Install { /// /// Used for steps to be able to return a JSON structure back to the UI. diff --git a/src/Umbraco.Core/Install/InstallStatusTracker.cs b/src/Umbraco.Core/Install/InstallStatusTracker.cs index 4260fa189d..66b05d0fe1 100644 --- a/src/Umbraco.Core/Install/InstallStatusTracker.cs +++ b/src/Umbraco.Core/Install/InstallStatusTracker.cs @@ -2,13 +2,13 @@ using System.Collections.Generic; using System.IO; using System.Linq; -using Umbraco.Core; -using Umbraco.Core.Collections; -using Umbraco.Core.Hosting; -using Umbraco.Core.Serialization; -using Umbraco.Web.Install.Models; +using Umbraco.Cms.Core.Collections; +using Umbraco.Cms.Core.Hosting; +using Umbraco.Cms.Core.Install.Models; +using Umbraco.Cms.Core.Serialization; +using Umbraco.Extensions; -namespace Umbraco.Web.Install +namespace Umbraco.Cms.Core.Install { /// /// An internal in-memory status tracker for the current installation diff --git a/src/Umbraco.Core/Install/InstallSteps/FilePermissionsStep.cs b/src/Umbraco.Core/Install/InstallSteps/FilePermissionsStep.cs index d2c2c84339..5b7d91468f 100644 --- a/src/Umbraco.Core/Install/InstallSteps/FilePermissionsStep.cs +++ b/src/Umbraco.Core/Install/InstallSteps/FilePermissionsStep.cs @@ -4,11 +4,11 @@ using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; -using Umbraco.Core.Services; -using Umbraco.Web.Install; -using Umbraco.Web.Install.Models; +using Umbraco.Cms.Core.Install.Models; +using Umbraco.Cms.Core.Services; +using Umbraco.Extensions; -namespace Umbraco.Core.Install.InstallSteps +namespace Umbraco.Cms.Core.Install.InstallSteps { /// /// Represents a step in the installation that ensure all the required permissions on files and folders are correct. diff --git a/src/Umbraco.Core/Install/InstallSteps/StarterKitCleanupStep.cs b/src/Umbraco.Core/Install/InstallSteps/StarterKitCleanupStep.cs index 94407bee8d..1370158eff 100644 --- a/src/Umbraco.Core/Install/InstallSteps/StarterKitCleanupStep.cs +++ b/src/Umbraco.Core/Install/InstallSteps/StarterKitCleanupStep.cs @@ -3,10 +3,10 @@ using System.IO; using System.Linq; using System.Net; using System.Threading.Tasks; -using Umbraco.Core.Hosting; -using Umbraco.Web.Install.Models; +using Umbraco.Cms.Core.Hosting; +using Umbraco.Cms.Core.Install.Models; -namespace Umbraco.Web.Install.InstallSteps +namespace Umbraco.Cms.Core.Install.InstallSteps { [InstallSetupStep(InstallationType.NewInstall, "StarterKitCleanup", 32, "Almost done")] @@ -33,7 +33,7 @@ namespace Umbraco.Web.Install.InstallSteps private void CleanupInstallation(int packageId, string packageFile) { - var zipFile = new FileInfo(Path.Combine(_hostingEnvironment.MapPathContentRoot(Core.Constants.SystemDirectories.Packages), WebUtility.UrlDecode(packageFile))); + var zipFile = new FileInfo(Path.Combine(_hostingEnvironment.MapPathContentRoot(Constants.SystemDirectories.Packages), WebUtility.UrlDecode(packageFile))); if (zipFile.Exists) zipFile.Delete(); diff --git a/src/Umbraco.Core/Install/InstallSteps/StarterKitInstallStep.cs b/src/Umbraco.Core/Install/InstallSteps/StarterKitInstallStep.cs index 4866c472e6..00b2ab33e4 100644 --- a/src/Umbraco.Core/Install/InstallSteps/StarterKitInstallStep.cs +++ b/src/Umbraco.Core/Install/InstallSteps/StarterKitInstallStep.cs @@ -2,12 +2,12 @@ using System.IO; using System.Linq; using System.Threading.Tasks; -using Umbraco.Core.Hosting; -using Umbraco.Core.Security; -using Umbraco.Core.Services; -using Umbraco.Web.Install.Models; +using Umbraco.Cms.Core.Hosting; +using Umbraco.Cms.Core.Install.Models; +using Umbraco.Cms.Core.Security; +using Umbraco.Cms.Core.Services; -namespace Umbraco.Web.Install.InstallSteps +namespace Umbraco.Cms.Core.Install.InstallSteps { [InstallSetupStep(InstallationType.NewInstall, "StarterKitInstall", 31, "", diff --git a/src/Umbraco.Core/Install/InstallSteps/TelemetryIdentifierStep.cs b/src/Umbraco.Core/Install/InstallSteps/TelemetryIdentifierStep.cs index 01d8e428c7..37769afc53 100644 --- a/src/Umbraco.Core/Install/InstallSteps/TelemetryIdentifierStep.cs +++ b/src/Umbraco.Core/Install/InstallSteps/TelemetryIdentifierStep.cs @@ -2,11 +2,11 @@ using System.Threading.Tasks; using Microsoft.Extensions.Logging; using Microsoft.Extensions.Options; -using Umbraco.Core.Configuration; -using Umbraco.Core.Configuration.Models; -using Umbraco.Web.Install.Models; +using Umbraco.Cms.Core.Configuration; +using Umbraco.Cms.Core.Configuration.Models; +using Umbraco.Cms.Core.Install.Models; -namespace Umbraco.Web.Install.InstallSteps +namespace Umbraco.Cms.Core.Install.InstallSteps { [InstallSetupStep(InstallationType.NewInstall | InstallationType.Upgrade, "TelemetryIdConfiguration", 0, "", diff --git a/src/Umbraco.Core/Install/InstallSteps/UpgradeStep.cs b/src/Umbraco.Core/Install/InstallSteps/UpgradeStep.cs index 5637d84a89..2666d81310 100644 --- a/src/Umbraco.Core/Install/InstallSteps/UpgradeStep.cs +++ b/src/Umbraco.Core/Install/InstallSteps/UpgradeStep.cs @@ -1,11 +1,11 @@ using System; using System.Threading.Tasks; -using Semver; -using Umbraco.Core; -using Umbraco.Core.Configuration; -using Umbraco.Web.Install.Models; +using Umbraco.Cms.Core.Configuration; +using Umbraco.Cms.Core.Install.Models; +using Umbraco.Cms.Core.Semver; +using Umbraco.Cms.Core.Services; -namespace Umbraco.Web.Install.InstallSteps +namespace Umbraco.Cms.Core.Install.InstallSteps { /// /// This step is purely here to show the button to commence the upgrade diff --git a/src/Umbraco.Core/Install/Models/DatabaseModel.cs b/src/Umbraco.Core/Install/Models/DatabaseModel.cs index 4b09534f39..c7f4ce0aab 100644 --- a/src/Umbraco.Core/Install/Models/DatabaseModel.cs +++ b/src/Umbraco.Core/Install/Models/DatabaseModel.cs @@ -1,6 +1,6 @@ using System.Runtime.Serialization; -namespace Umbraco.Web.Install.Models +namespace Umbraco.Cms.Core.Install.Models { [DataContract(Name = "database", Namespace = "")] public class DatabaseModel diff --git a/src/Umbraco.Core/Install/Models/DatabaseType.cs b/src/Umbraco.Core/Install/Models/DatabaseType.cs index a8b98a7de5..5eef471562 100644 --- a/src/Umbraco.Core/Install/Models/DatabaseType.cs +++ b/src/Umbraco.Core/Install/Models/DatabaseType.cs @@ -1,4 +1,4 @@ -namespace Umbraco.Web.Install.Models +namespace Umbraco.Cms.Core.Install.Models { public enum DatabaseType { diff --git a/src/Umbraco.Core/Install/Models/InstallInstructions.cs b/src/Umbraco.Core/Install/Models/InstallInstructions.cs index 159edda9e6..41ef0bacc4 100644 --- a/src/Umbraco.Core/Install/Models/InstallInstructions.cs +++ b/src/Umbraco.Core/Install/Models/InstallInstructions.cs @@ -2,7 +2,7 @@ using System.Collections.Generic; using System.Runtime.Serialization; -namespace Umbraco.Web.Install.Models +namespace Umbraco.Cms.Core.Install.Models { [DataContract(Name = "installInstructions", Namespace = "")] public class InstallInstructions diff --git a/src/Umbraco.Core/Install/Models/InstallProgressResultModel.cs b/src/Umbraco.Core/Install/Models/InstallProgressResultModel.cs index 7ea3b3375b..02f1d9b482 100644 --- a/src/Umbraco.Core/Install/Models/InstallProgressResultModel.cs +++ b/src/Umbraco.Core/Install/Models/InstallProgressResultModel.cs @@ -1,6 +1,6 @@ using System.Runtime.Serialization; -namespace Umbraco.Web.Install.Models +namespace Umbraco.Cms.Core.Install.Models { /// diff --git a/src/Umbraco.Core/Install/Models/InstallSetup.cs b/src/Umbraco.Core/Install/Models/InstallSetup.cs index f61e301a09..358bd92234 100644 --- a/src/Umbraco.Core/Install/Models/InstallSetup.cs +++ b/src/Umbraco.Core/Install/Models/InstallSetup.cs @@ -2,7 +2,7 @@ using System.Collections.Generic; using System.Runtime.Serialization; -namespace Umbraco.Web.Install.Models +namespace Umbraco.Cms.Core.Install.Models { /// /// Model containing all the install steps for setting up the UI diff --git a/src/Umbraco.Core/Install/Models/InstallSetupResult.cs b/src/Umbraco.Core/Install/Models/InstallSetupResult.cs index 4ef4b70f51..071857193f 100644 --- a/src/Umbraco.Core/Install/Models/InstallSetupResult.cs +++ b/src/Umbraco.Core/Install/Models/InstallSetupResult.cs @@ -1,6 +1,6 @@ using System.Collections.Generic; -namespace Umbraco.Web.Install.Models +namespace Umbraco.Cms.Core.Install.Models { /// /// The object returned from each installation step diff --git a/src/Umbraco.Core/Install/Models/InstallSetupStep.cs b/src/Umbraco.Core/Install/Models/InstallSetupStep.cs index fd50d7855c..8bfe1d75ec 100644 --- a/src/Umbraco.Core/Install/Models/InstallSetupStep.cs +++ b/src/Umbraco.Core/Install/Models/InstallSetupStep.cs @@ -1,9 +1,9 @@ using System; using System.Runtime.Serialization; using System.Threading.Tasks; -using Umbraco.Core; +using Umbraco.Extensions; -namespace Umbraco.Web.Install.Models +namespace Umbraco.Cms.Core.Install.Models { /// /// Model to give to the front-end to collect the information for each step @@ -82,6 +82,6 @@ namespace Umbraco.Web.Install.Models /// [IgnoreDataMember] public abstract Type StepType { get; } - + } } diff --git a/src/Umbraco.Core/Install/Models/InstallSetupStepAttribute.cs b/src/Umbraco.Core/Install/Models/InstallSetupStepAttribute.cs index 9cecdacf99..7feaced052 100644 --- a/src/Umbraco.Core/Install/Models/InstallSetupStepAttribute.cs +++ b/src/Umbraco.Core/Install/Models/InstallSetupStepAttribute.cs @@ -1,7 +1,6 @@ using System; -using System.Text.RegularExpressions; -namespace Umbraco.Web.Install.Models +namespace Umbraco.Cms.Core.Install.Models { public sealed class InstallSetupStepAttribute : Attribute { diff --git a/src/Umbraco.Core/Install/Models/InstallTrackingItem.cs b/src/Umbraco.Core/Install/Models/InstallTrackingItem.cs index 9bc8201ba9..48ad91abed 100644 --- a/src/Umbraco.Core/Install/Models/InstallTrackingItem.cs +++ b/src/Umbraco.Core/Install/Models/InstallTrackingItem.cs @@ -1,7 +1,6 @@ using System.Collections.Generic; -using System.Runtime.Serialization; -namespace Umbraco.Web.Install.Models +namespace Umbraco.Cms.Core.Install.Models { public class InstallTrackingItem { diff --git a/src/Umbraco.Core/Install/Models/InstallationType.cs b/src/Umbraco.Core/Install/Models/InstallationType.cs index b0202a4c3a..99ecf8ce1f 100644 --- a/src/Umbraco.Core/Install/Models/InstallationType.cs +++ b/src/Umbraco.Core/Install/Models/InstallationType.cs @@ -1,6 +1,6 @@ using System; -namespace Umbraco.Web.Install.Models +namespace Umbraco.Cms.Core.Install.Models { [Flags] public enum InstallationType diff --git a/src/Umbraco.Core/Install/Models/Package.cs b/src/Umbraco.Core/Install/Models/Package.cs index c30e0db16f..60676e9564 100644 --- a/src/Umbraco.Core/Install/Models/Package.cs +++ b/src/Umbraco.Core/Install/Models/Package.cs @@ -1,11 +1,7 @@ using System; -using System.Collections.Generic; -using System.Linq; using System.Runtime.Serialization; -using System.Text; -using System.Threading.Tasks; -namespace Umbraco.Web.Install.Models +namespace Umbraco.Cms.Core.Install.Models { [DataContract(Name = "package")] public class Package diff --git a/src/Umbraco.Core/Install/Models/UserModel.cs b/src/Umbraco.Core/Install/Models/UserModel.cs index aed397a7d9..1c36b711d4 100644 --- a/src/Umbraco.Core/Install/Models/UserModel.cs +++ b/src/Umbraco.Core/Install/Models/UserModel.cs @@ -1,6 +1,6 @@ using System.Runtime.Serialization; -namespace Umbraco.Web.Install.Models +namespace Umbraco.Cms.Core.Install.Models { [DataContract(Name = "user", Namespace = "")] public class UserModel diff --git a/src/Umbraco.Core/InstallLog.cs b/src/Umbraco.Core/InstallLog.cs index cb14ebd650..245e917771 100644 --- a/src/Umbraco.Core/InstallLog.cs +++ b/src/Umbraco.Core/InstallLog.cs @@ -1,10 +1,6 @@ using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -namespace Umbraco.Core.Models +namespace Umbraco.Cms.Core { public class InstallLog { diff --git a/src/Umbraco.Core/LambdaExpressionCacheKey.cs b/src/Umbraco.Core/LambdaExpressionCacheKey.cs index c191732acc..72fd9b3c6d 100644 --- a/src/Umbraco.Core/LambdaExpressionCacheKey.cs +++ b/src/Umbraco.Core/LambdaExpressionCacheKey.cs @@ -3,7 +3,7 @@ using System.Collections.Generic; using System.Linq; using System.Linq.Expressions; -namespace Umbraco.Core +namespace Umbraco.Cms.Core { /// /// Represents a simple in a form which is suitable for using as a dictionary key diff --git a/src/Umbraco.Core/Logging/DisposableTimer.cs b/src/Umbraco.Core/Logging/DisposableTimer.cs index 9fdb93c057..50bfd537cd 100644 --- a/src/Umbraco.Core/Logging/DisposableTimer.cs +++ b/src/Umbraco.Core/Logging/DisposableTimer.cs @@ -2,7 +2,7 @@ using System.Diagnostics; using Microsoft.Extensions.Logging; -namespace Umbraco.Core.Logging +namespace Umbraco.Cms.Core.Logging { /// /// Starts the timer and invokes a callback upon disposal. Provides a simple way of timing an operation by wrapping it in a using (C#) statement. diff --git a/src/Umbraco.Core/Logging/ILoggingConfiguration.cs b/src/Umbraco.Core/Logging/ILoggingConfiguration.cs index 6590f9fc65..34e4d702c6 100644 --- a/src/Umbraco.Core/Logging/ILoggingConfiguration.cs +++ b/src/Umbraco.Core/Logging/ILoggingConfiguration.cs @@ -1,4 +1,4 @@ -namespace Umbraco.Core.Logging +namespace Umbraco.Cms.Core.Logging { public interface ILoggingConfiguration diff --git a/src/Umbraco.Core/Logging/IMessageTemplates.cs b/src/Umbraco.Core/Logging/IMessageTemplates.cs index b455e4af21..99d88ce926 100644 --- a/src/Umbraco.Core/Logging/IMessageTemplates.cs +++ b/src/Umbraco.Core/Logging/IMessageTemplates.cs @@ -1,4 +1,4 @@ -namespace Umbraco.Core.Logging +namespace Umbraco.Cms.Core.Logging { /// /// Provides tools to support message templates. diff --git a/src/Umbraco.Core/Logging/IProfiler.cs b/src/Umbraco.Core/Logging/IProfiler.cs index d855612c95..d64cb49362 100644 --- a/src/Umbraco.Core/Logging/IProfiler.cs +++ b/src/Umbraco.Core/Logging/IProfiler.cs @@ -1,6 +1,6 @@ using System; -namespace Umbraco.Core.Logging +namespace Umbraco.Cms.Core.Logging { /// diff --git a/src/Umbraco.Core/Logging/IProfilerHtml.cs b/src/Umbraco.Core/Logging/IProfilerHtml.cs index 4f9ee62e0b..30812fc156 100644 --- a/src/Umbraco.Core/Logging/IProfilerHtml.cs +++ b/src/Umbraco.Core/Logging/IProfilerHtml.cs @@ -1,4 +1,4 @@ -namespace Umbraco.Core.Logging +namespace Umbraco.Cms.Core.Logging { /// /// Used to render a profiler in a web page diff --git a/src/Umbraco.Core/Logging/IProfilingLogger.cs b/src/Umbraco.Core/Logging/IProfilingLogger.cs index 019b43d61e..fd51bd2da3 100644 --- a/src/Umbraco.Core/Logging/IProfilingLogger.cs +++ b/src/Umbraco.Core/Logging/IProfilingLogger.cs @@ -1,6 +1,6 @@ using System; -namespace Umbraco.Core.Logging +namespace Umbraco.Cms.Core.Logging { /// /// Defines the profiling logging service. diff --git a/src/Umbraco.Infrastructure/Logging/LogHttpRequest.cs b/src/Umbraco.Core/Logging/LogHttpRequestExtension.cs similarity index 90% rename from src/Umbraco.Infrastructure/Logging/LogHttpRequest.cs rename to src/Umbraco.Core/Logging/LogHttpRequestExtension.cs index 7e1ec38491..d6d5af9802 100644 --- a/src/Umbraco.Infrastructure/Logging/LogHttpRequest.cs +++ b/src/Umbraco.Core/Logging/LogHttpRequestExtension.cs @@ -1,8 +1,7 @@ using System; -using Umbraco.Core.Cache; -using Umbraco.Core.Composing; +using Umbraco.Cms.Core.Cache; -namespace Umbraco.Core.Logging +namespace Umbraco.Extensions { public static class LogHttpRequest { diff --git a/src/Umbraco.Core/Logging/LogLevel.cs b/src/Umbraco.Core/Logging/LogLevel.cs index f1b65499d6..9e12002324 100644 --- a/src/Umbraco.Core/Logging/LogLevel.cs +++ b/src/Umbraco.Core/Logging/LogLevel.cs @@ -1,4 +1,4 @@ -namespace Umbraco.Core.Logging +namespace Umbraco.Cms.Core.Logging { /// /// Specifies the level of a log event. diff --git a/src/Umbraco.Core/Logging/LogProfiler.cs b/src/Umbraco.Core/Logging/LogProfiler.cs index 047331fd3a..1f4b4bbe90 100644 --- a/src/Umbraco.Core/Logging/LogProfiler.cs +++ b/src/Umbraco.Core/Logging/LogProfiler.cs @@ -2,7 +2,7 @@ using System.Diagnostics; using Microsoft.Extensions.Logging; -namespace Umbraco.Core.Logging +namespace Umbraco.Cms.Core.Logging { /// /// Implements by writing profiling results to an . diff --git a/src/Umbraco.Core/Logging/LoggingConfiguration.cs b/src/Umbraco.Core/Logging/LoggingConfiguration.cs index ecd806211c..f191af3023 100644 --- a/src/Umbraco.Core/Logging/LoggingConfiguration.cs +++ b/src/Umbraco.Core/Logging/LoggingConfiguration.cs @@ -1,6 +1,6 @@ using System; -namespace Umbraco.Core.Logging +namespace Umbraco.Cms.Core.Logging { public class LoggingConfiguration : ILoggingConfiguration { diff --git a/src/Umbraco.Core/Logging/LoggingTaskExtension.cs b/src/Umbraco.Core/Logging/LoggingTaskExtension.cs index 2e3aa0a883..5a6f995dfa 100644 --- a/src/Umbraco.Core/Logging/LoggingTaskExtension.cs +++ b/src/Umbraco.Core/Logging/LoggingTaskExtension.cs @@ -2,7 +2,7 @@ using System.Threading; using System.Threading.Tasks; -namespace Umbraco.Core.Logging +namespace Umbraco.Cms.Core.Logging { internal static class LoggingTaskExtension { diff --git a/src/Umbraco.Core/Logging/NoopProfiler.cs b/src/Umbraco.Core/Logging/NoopProfiler.cs index e7b43e5e2d..89a0307515 100644 --- a/src/Umbraco.Core/Logging/NoopProfiler.cs +++ b/src/Umbraco.Core/Logging/NoopProfiler.cs @@ -1,6 +1,6 @@ using System; -namespace Umbraco.Core.Logging +namespace Umbraco.Cms.Core.Logging { public class NoopProfiler : IProfiler { diff --git a/src/Umbraco.Core/Logging/ProfilerExtensions.cs b/src/Umbraco.Core/Logging/ProfilerExtensions.cs index 533837b08b..f3c18a0231 100644 --- a/src/Umbraco.Core/Logging/ProfilerExtensions.cs +++ b/src/Umbraco.Core/Logging/ProfilerExtensions.cs @@ -1,6 +1,6 @@ using System; -namespace Umbraco.Core.Logging +namespace Umbraco.Cms.Core.Logging { internal static class ProfilerExtensions { diff --git a/src/Umbraco.Core/Logging/ProfilingLogger.cs b/src/Umbraco.Core/Logging/ProfilingLogger.cs index 520e14e17d..3abb3d348f 100644 --- a/src/Umbraco.Core/Logging/ProfilingLogger.cs +++ b/src/Umbraco.Core/Logging/ProfilingLogger.cs @@ -1,9 +1,7 @@ using System; using Microsoft.Extensions.Logging; -using Umbraco.Core.Models; - -namespace Umbraco.Core.Logging +namespace Umbraco.Cms.Core.Logging { /// /// Provides logging and profiling services. diff --git a/src/Umbraco.Core/Macros/IMacroRenderer.cs b/src/Umbraco.Core/Macros/IMacroRenderer.cs index d858315403..a969946340 100644 --- a/src/Umbraco.Core/Macros/IMacroRenderer.cs +++ b/src/Umbraco.Core/Macros/IMacroRenderer.cs @@ -1,7 +1,7 @@ using System.Collections.Generic; -using Umbraco.Core.Models.PublishedContent; +using Umbraco.Cms.Core.Models.PublishedContent; -namespace Umbraco.Web.Macros +namespace Umbraco.Cms.Core.Macros { /// /// Renders a macro diff --git a/src/Umbraco.Core/Macros/MacroContent.cs b/src/Umbraco.Core/Macros/MacroContent.cs index 60dfb9210d..a7f8b003b4 100644 --- a/src/Umbraco.Core/Macros/MacroContent.cs +++ b/src/Umbraco.Core/Macros/MacroContent.cs @@ -1,6 +1,6 @@ using System; -namespace Umbraco.Web.Macros +namespace Umbraco.Cms.Core.Macros { // represents the content of a macro public class MacroContent diff --git a/src/Umbraco.Core/Macros/MacroErrorBehaviour.cs b/src/Umbraco.Core/Macros/MacroErrorBehaviour.cs index dd3d506b23..b3c505682a 100644 --- a/src/Umbraco.Core/Macros/MacroErrorBehaviour.cs +++ b/src/Umbraco.Core/Macros/MacroErrorBehaviour.cs @@ -1,4 +1,4 @@ -namespace Umbraco.Core.Macros +namespace Umbraco.Cms.Core.Macros { public enum MacroErrorBehaviour { diff --git a/src/Umbraco.Core/Macros/MacroModel.cs b/src/Umbraco.Core/Macros/MacroModel.cs index 6b5013115a..08f52c0f53 100644 --- a/src/Umbraco.Core/Macros/MacroModel.cs +++ b/src/Umbraco.Core/Macros/MacroModel.cs @@ -1,7 +1,7 @@ using System.Collections.Generic; -using Umbraco.Core.Models; +using Umbraco.Cms.Core.Models; -namespace Umbraco.Web.Macros +namespace Umbraco.Cms.Core.Macros { public class MacroModel { diff --git a/src/Umbraco.Core/Macros/MacroPropertyModel.cs b/src/Umbraco.Core/Macros/MacroPropertyModel.cs index 0621155be7..78683a323d 100644 --- a/src/Umbraco.Core/Macros/MacroPropertyModel.cs +++ b/src/Umbraco.Core/Macros/MacroPropertyModel.cs @@ -1,4 +1,4 @@ -namespace Umbraco.Web.Macros +namespace Umbraco.Cms.Core.Macros { public class MacroPropertyModel { diff --git a/src/Umbraco.Core/Mail/IEmailSender.cs b/src/Umbraco.Core/Mail/IEmailSender.cs index 3862d0e717..b5b353455d 100644 --- a/src/Umbraco.Core/Mail/IEmailSender.cs +++ b/src/Umbraco.Core/Mail/IEmailSender.cs @@ -1,7 +1,7 @@ using System.Threading.Tasks; -using Umbraco.Core.Models; +using Umbraco.Cms.Core.Models; -namespace Umbraco.Core.Mail +namespace Umbraco.Cms.Core.Mail { /// /// Simple abstraction to send an email message diff --git a/src/Umbraco.Core/Mail/ISmsSender.cs b/src/Umbraco.Core/Mail/ISmsSender.cs index a2ff054c48..885ad89da2 100644 --- a/src/Umbraco.Core/Mail/ISmsSender.cs +++ b/src/Umbraco.Core/Mail/ISmsSender.cs @@ -1,6 +1,6 @@ using System.Threading.Tasks; -namespace Umbraco.Core.Mail +namespace Umbraco.Cms.Core.Mail { /// /// Service to send an SMS diff --git a/src/Umbraco.Core/Mail/NotImplementedEmailSender.cs b/src/Umbraco.Core/Mail/NotImplementedEmailSender.cs index bb8d787cbf..45e7925764 100644 --- a/src/Umbraco.Core/Mail/NotImplementedEmailSender.cs +++ b/src/Umbraco.Core/Mail/NotImplementedEmailSender.cs @@ -1,8 +1,8 @@ using System; using System.Threading.Tasks; -using Umbraco.Core.Models; +using Umbraco.Cms.Core.Models; -namespace Umbraco.Core.Mail +namespace Umbraco.Cms.Core.Mail { internal class NotImplementedEmailSender : IEmailSender { diff --git a/src/Umbraco.Core/Mail/NotImplementedSmsSender.cs b/src/Umbraco.Core/Mail/NotImplementedSmsSender.cs index 16c3d04711..0cb5016a1b 100644 --- a/src/Umbraco.Core/Mail/NotImplementedSmsSender.cs +++ b/src/Umbraco.Core/Mail/NotImplementedSmsSender.cs @@ -1,7 +1,7 @@ using System; using System.Threading.Tasks; -namespace Umbraco.Core.Mail +namespace Umbraco.Cms.Core.Mail { /// /// An that throws diff --git a/src/Umbraco.Core/Manifest/IManifestFilter.cs b/src/Umbraco.Core/Manifest/IManifestFilter.cs index 88e00a3966..0984f1a889 100644 --- a/src/Umbraco.Core/Manifest/IManifestFilter.cs +++ b/src/Umbraco.Core/Manifest/IManifestFilter.cs @@ -1,7 +1,6 @@ using System.Collections.Generic; - -namespace Umbraco.Core.Manifest +namespace Umbraco.Cms.Core.Manifest { /// /// Provides filtering for package manifests. diff --git a/src/Umbraco.Core/Manifest/IManifestParser.cs b/src/Umbraco.Core/Manifest/IManifestParser.cs index 3eec7007b3..371ec54dae 100644 --- a/src/Umbraco.Core/Manifest/IManifestParser.cs +++ b/src/Umbraco.Core/Manifest/IManifestParser.cs @@ -1,7 +1,4 @@ -using System.Collections.Generic; -using Umbraco.Core.PropertyEditors; - -namespace Umbraco.Core.Manifest +namespace Umbraco.Cms.Core.Manifest { public interface IManifestParser { diff --git a/src/Umbraco.Core/Manifest/IPackageManifest.cs b/src/Umbraco.Core/Manifest/IPackageManifest.cs index 01b0be70db..39e4878233 100644 --- a/src/Umbraco.Core/Manifest/IPackageManifest.cs +++ b/src/Umbraco.Core/Manifest/IPackageManifest.cs @@ -1,7 +1,7 @@ using System.Runtime.Serialization; -using Umbraco.Core.PropertyEditors; +using Umbraco.Cms.Core.PropertyEditors; -namespace Umbraco.Core.Manifest +namespace Umbraco.Cms.Core.Manifest { public interface IPackageManifest { diff --git a/src/Umbraco.Core/Manifest/ManifestContentAppDefinition.cs b/src/Umbraco.Core/Manifest/ManifestContentAppDefinition.cs index 35293a6377..d3f915603d 100644 --- a/src/Umbraco.Core/Manifest/ManifestContentAppDefinition.cs +++ b/src/Umbraco.Core/Manifest/ManifestContentAppDefinition.cs @@ -1,7 +1,7 @@ using System; using System.Runtime.Serialization; -namespace Umbraco.Core.Manifest +namespace Umbraco.Cms.Core.Manifest { // contentApps: [ // { diff --git a/src/Umbraco.Core/Manifest/ManifestContentAppFactory.cs b/src/Umbraco.Core/Manifest/ManifestContentAppFactory.cs index e407ac7013..d865bb01aa 100644 --- a/src/Umbraco.Core/Manifest/ManifestContentAppFactory.cs +++ b/src/Umbraco.Core/Manifest/ManifestContentAppFactory.cs @@ -2,12 +2,13 @@ using System.Collections.Generic; using System.Linq; using System.Text.RegularExpressions; -using Umbraco.Core.IO; -using Umbraco.Core.Models; -using Umbraco.Core.Models.ContentEditing; -using Umbraco.Core.Models.Membership; +using Umbraco.Cms.Core.IO; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Core.Models.ContentEditing; +using Umbraco.Cms.Core.Models.Membership; +using Umbraco.Extensions; -namespace Umbraco.Core.Manifest +namespace Umbraco.Cms.Core.Manifest { // contentApps: [ // { diff --git a/src/Umbraco.Core/Manifest/ManifestDashboard.cs b/src/Umbraco.Core/Manifest/ManifestDashboard.cs index 2d6f96b5c2..50df4bb15e 100644 --- a/src/Umbraco.Core/Manifest/ManifestDashboard.cs +++ b/src/Umbraco.Core/Manifest/ManifestDashboard.cs @@ -1,9 +1,8 @@ using System; -using System.ComponentModel; using System.Runtime.Serialization; -using Umbraco.Core.Dashboards; +using Umbraco.Cms.Core.Dashboards; -namespace Umbraco.Core.Manifest +namespace Umbraco.Cms.Core.Manifest { [DataContract] public class ManifestDashboard : IDashboard diff --git a/src/Umbraco.Core/Manifest/ManifestFilterCollection.cs b/src/Umbraco.Core/Manifest/ManifestFilterCollection.cs index febdb7e356..20a3468c36 100644 --- a/src/Umbraco.Core/Manifest/ManifestFilterCollection.cs +++ b/src/Umbraco.Core/Manifest/ManifestFilterCollection.cs @@ -1,7 +1,7 @@ using System.Collections.Generic; -using Umbraco.Core.Composing; +using Umbraco.Cms.Core.Composing; -namespace Umbraco.Core.Manifest +namespace Umbraco.Cms.Core.Manifest { /// /// Contains the manifest filters. diff --git a/src/Umbraco.Core/Manifest/ManifestFilterCollectionBuilder.cs b/src/Umbraco.Core/Manifest/ManifestFilterCollectionBuilder.cs index 47593c2548..00ac3609dd 100644 --- a/src/Umbraco.Core/Manifest/ManifestFilterCollectionBuilder.cs +++ b/src/Umbraco.Core/Manifest/ManifestFilterCollectionBuilder.cs @@ -1,7 +1,7 @@ using Microsoft.Extensions.DependencyInjection; -using Umbraco.Core.Composing; +using Umbraco.Cms.Core.Composing; -namespace Umbraco.Core.Manifest +namespace Umbraco.Cms.Core.Manifest { public class ManifestFilterCollectionBuilder : OrderedCollectionBuilderBase { diff --git a/src/Umbraco.Core/Manifest/ManifestSection.cs b/src/Umbraco.Core/Manifest/ManifestSection.cs index 584e2a157b..0422d6c5b6 100644 --- a/src/Umbraco.Core/Manifest/ManifestSection.cs +++ b/src/Umbraco.Core/Manifest/ManifestSection.cs @@ -1,7 +1,7 @@ using System.Runtime.Serialization; -using Umbraco.Core.Models.Sections; +using Umbraco.Cms.Core.Sections; -namespace Umbraco.Core.Manifest +namespace Umbraco.Cms.Core.Manifest { [DataContract(Name = "section", Namespace = "")] public class ManifestSection : ISection diff --git a/src/Umbraco.Core/Manifest/ManifestWatcher.cs b/src/Umbraco.Core/Manifest/ManifestWatcher.cs index b6cd82b31f..26c54a8b5e 100644 --- a/src/Umbraco.Core/Manifest/ManifestWatcher.cs +++ b/src/Umbraco.Core/Manifest/ManifestWatcher.cs @@ -3,9 +3,10 @@ using System.Collections.Generic; using System.IO; using System.Linq; using Microsoft.Extensions.Logging; -using Umbraco.Core.Hosting; +using Umbraco.Cms.Core.Hosting; +using Umbraco.Extensions; -namespace Umbraco.Core.Manifest +namespace Umbraco.Cms.Core.Manifest { public class ManifestWatcher : IDisposable { diff --git a/src/Umbraco.Core/Manifest/PackageManifest.cs b/src/Umbraco.Core/Manifest/PackageManifest.cs index 5e10030693..1a533b1f24 100644 --- a/src/Umbraco.Core/Manifest/PackageManifest.cs +++ b/src/Umbraco.Core/Manifest/PackageManifest.cs @@ -1,8 +1,8 @@ using System; using System.Runtime.Serialization; -using Umbraco.Core.PropertyEditors; +using Umbraco.Cms.Core.PropertyEditors; -namespace Umbraco.Core.Manifest +namespace Umbraco.Cms.Core.Manifest { /// /// Represents the content of a package manifest. diff --git a/src/Umbraco.Core/Mapping/IMapDefinition.cs b/src/Umbraco.Core/Mapping/IMapDefinition.cs index ffea07c3eb..c90896ebc7 100644 --- a/src/Umbraco.Core/Mapping/IMapDefinition.cs +++ b/src/Umbraco.Core/Mapping/IMapDefinition.cs @@ -1,4 +1,4 @@ -namespace Umbraco.Core.Mapping +namespace Umbraco.Cms.Core.Mapping { /// /// Defines maps for . diff --git a/src/Umbraco.Core/Mapping/MapDefinitionCollection.cs b/src/Umbraco.Core/Mapping/MapDefinitionCollection.cs index e2438515f0..d9cc08ad43 100644 --- a/src/Umbraco.Core/Mapping/MapDefinitionCollection.cs +++ b/src/Umbraco.Core/Mapping/MapDefinitionCollection.cs @@ -1,7 +1,7 @@ using System.Collections.Generic; -using Umbraco.Core.Composing; +using Umbraco.Cms.Core.Composing; -namespace Umbraco.Core.Mapping +namespace Umbraco.Cms.Core.Mapping { public class MapDefinitionCollection : BuilderCollectionBase { diff --git a/src/Umbraco.Core/Mapping/MapDefinitionCollectionBuilder.cs b/src/Umbraco.Core/Mapping/MapDefinitionCollectionBuilder.cs index 6cccde9525..698dce1648 100644 --- a/src/Umbraco.Core/Mapping/MapDefinitionCollectionBuilder.cs +++ b/src/Umbraco.Core/Mapping/MapDefinitionCollectionBuilder.cs @@ -1,7 +1,7 @@ using Microsoft.Extensions.DependencyInjection; -using Umbraco.Core.Composing; +using Umbraco.Cms.Core.Composing; -namespace Umbraco.Core.Mapping +namespace Umbraco.Cms.Core.Mapping { public class MapDefinitionCollectionBuilder : SetCollectionBuilderBase { diff --git a/src/Umbraco.Core/Mapping/MapperContext.cs b/src/Umbraco.Core/Mapping/MapperContext.cs index a7044a05b9..f44cae2253 100644 --- a/src/Umbraco.Core/Mapping/MapperContext.cs +++ b/src/Umbraco.Core/Mapping/MapperContext.cs @@ -1,8 +1,7 @@ -using System; -using System.Collections.Generic; +using System.Collections.Generic; using System.Linq; -namespace Umbraco.Core.Mapping +namespace Umbraco.Cms.Core.Mapping { /// /// Represents a mapper context. diff --git a/src/Umbraco.Core/Mapping/UmbracoMapper.cs b/src/Umbraco.Core/Mapping/UmbracoMapper.cs index e62825101c..42efa9b007 100644 --- a/src/Umbraco.Core/Mapping/UmbracoMapper.cs +++ b/src/Umbraco.Core/Mapping/UmbracoMapper.cs @@ -3,9 +3,10 @@ using System.Collections; using System.Collections.Concurrent; using System.Collections.Generic; using System.Linq; -using Umbraco.Core.Exceptions; +using Umbraco.Cms.Core.Exceptions; +using Umbraco.Extensions; -namespace Umbraco.Core.Mapping +namespace Umbraco.Cms.Core.Mapping { // notes: // AutoMapper maps null to empty arrays, lists, etc diff --git a/src/Umbraco.Core/Media/EmbedProviders/DailyMotion.cs b/src/Umbraco.Core/Media/EmbedProviders/DailyMotion.cs index f56a29c2d5..e5fc553ea8 100644 --- a/src/Umbraco.Core/Media/EmbedProviders/DailyMotion.cs +++ b/src/Umbraco.Core/Media/EmbedProviders/DailyMotion.cs @@ -1,7 +1,7 @@ using System.Collections.Generic; -using Umbraco.Core.Serialization; +using Umbraco.Cms.Core.Serialization; -namespace Umbraco.Web.Media.EmbedProviders +namespace Umbraco.Cms.Core.Media.EmbedProviders { public class DailyMotion : EmbedProviderBase { diff --git a/src/Umbraco.Core/Media/EmbedProviders/EmbedProviderBase.cs b/src/Umbraco.Core/Media/EmbedProviders/EmbedProviderBase.cs index cc7f5d2349..bbc690ce97 100644 --- a/src/Umbraco.Core/Media/EmbedProviders/EmbedProviderBase.cs +++ b/src/Umbraco.Core/Media/EmbedProviders/EmbedProviderBase.cs @@ -4,10 +4,9 @@ using System.Net; using System.Net.Http; using System.Text; using System.Xml; -using Umbraco.Core.Media; -using Umbraco.Core.Serialization; +using Umbraco.Cms.Core.Serialization; -namespace Umbraco.Web.Media.EmbedProviders +namespace Umbraco.Cms.Core.Media.EmbedProviders { public abstract class EmbedProviderBase : IEmbedProvider { diff --git a/src/Umbraco.Core/Media/EmbedProviders/EmbedProvidersCollection.cs b/src/Umbraco.Core/Media/EmbedProviders/EmbedProvidersCollection.cs index 88a317c545..490ff64357 100644 --- a/src/Umbraco.Core/Media/EmbedProviders/EmbedProvidersCollection.cs +++ b/src/Umbraco.Core/Media/EmbedProviders/EmbedProvidersCollection.cs @@ -1,8 +1,7 @@ using System.Collections.Generic; -using Umbraco.Core.Composing; -using Umbraco.Core.Media; +using Umbraco.Cms.Core.Composing; -namespace Umbraco.Web.Media.EmbedProviders +namespace Umbraco.Cms.Core.Media.EmbedProviders { public class EmbedProvidersCollection : BuilderCollectionBase { diff --git a/src/Umbraco.Core/Media/EmbedProviders/EmbedProvidersCollectionBuilder.cs b/src/Umbraco.Core/Media/EmbedProviders/EmbedProvidersCollectionBuilder.cs index 0c6ea7a3e3..f79880b61f 100644 --- a/src/Umbraco.Core/Media/EmbedProviders/EmbedProvidersCollectionBuilder.cs +++ b/src/Umbraco.Core/Media/EmbedProviders/EmbedProvidersCollectionBuilder.cs @@ -1,7 +1,6 @@ -using Umbraco.Core.Composing; -using Umbraco.Core.Media; +using Umbraco.Cms.Core.Composing; -namespace Umbraco.Web.Media.EmbedProviders +namespace Umbraco.Cms.Core.Media.EmbedProviders { public class EmbedProvidersCollectionBuilder : OrderedCollectionBuilderBase { diff --git a/src/Umbraco.Core/Media/EmbedProviders/Flickr.cs b/src/Umbraco.Core/Media/EmbedProviders/Flickr.cs index a6ead2df3a..48d4be06dc 100644 --- a/src/Umbraco.Core/Media/EmbedProviders/Flickr.cs +++ b/src/Umbraco.Core/Media/EmbedProviders/Flickr.cs @@ -1,8 +1,8 @@ using System.Collections.Generic; using System.Net; -using Umbraco.Core.Serialization; +using Umbraco.Cms.Core.Serialization; -namespace Umbraco.Web.Media.EmbedProviders +namespace Umbraco.Cms.Core.Media.EmbedProviders { public class Flickr : EmbedProviderBase { diff --git a/src/Umbraco.Core/Media/EmbedProviders/GettyImages.cs b/src/Umbraco.Core/Media/EmbedProviders/GettyImages.cs index 0db0a97b8e..3dbe44a9e2 100644 --- a/src/Umbraco.Core/Media/EmbedProviders/GettyImages.cs +++ b/src/Umbraco.Core/Media/EmbedProviders/GettyImages.cs @@ -1,7 +1,7 @@ using System.Collections.Generic; -using Umbraco.Core.Serialization; +using Umbraco.Cms.Core.Serialization; -namespace Umbraco.Web.Media.EmbedProviders +namespace Umbraco.Cms.Core.Media.EmbedProviders { public class GettyImages : EmbedProviderBase { diff --git a/src/Umbraco.Core/Media/EmbedProviders/Giphy.cs b/src/Umbraco.Core/Media/EmbedProviders/Giphy.cs index 319afda5b6..ae39b04123 100644 --- a/src/Umbraco.Core/Media/EmbedProviders/Giphy.cs +++ b/src/Umbraco.Core/Media/EmbedProviders/Giphy.cs @@ -1,7 +1,7 @@ using System.Collections.Generic; -using Umbraco.Core.Serialization; +using Umbraco.Cms.Core.Serialization; -namespace Umbraco.Web.Media.EmbedProviders +namespace Umbraco.Cms.Core.Media.EmbedProviders { /// /// Embed Provider for Giphy.com the popular online GIFs and animated sticker provider. diff --git a/src/Umbraco.Core/Media/EmbedProviders/Hulu.cs b/src/Umbraco.Core/Media/EmbedProviders/Hulu.cs index 4deea8c23d..305d69d497 100644 --- a/src/Umbraco.Core/Media/EmbedProviders/Hulu.cs +++ b/src/Umbraco.Core/Media/EmbedProviders/Hulu.cs @@ -1,7 +1,7 @@ using System.Collections.Generic; -using Umbraco.Core.Serialization; +using Umbraco.Cms.Core.Serialization; -namespace Umbraco.Web.Media.EmbedProviders +namespace Umbraco.Cms.Core.Media.EmbedProviders { public class Hulu : EmbedProviderBase { diff --git a/src/Umbraco.Core/Media/EmbedProviders/Issuu.cs b/src/Umbraco.Core/Media/EmbedProviders/Issuu.cs index 3baaf7ea35..50ff03d880 100644 --- a/src/Umbraco.Core/Media/EmbedProviders/Issuu.cs +++ b/src/Umbraco.Core/Media/EmbedProviders/Issuu.cs @@ -1,7 +1,7 @@ using System.Collections.Generic; -using Umbraco.Core.Serialization; +using Umbraco.Cms.Core.Serialization; -namespace Umbraco.Web.Media.EmbedProviders +namespace Umbraco.Cms.Core.Media.EmbedProviders { public class Issuu : EmbedProviderBase { diff --git a/src/Umbraco.Core/Media/EmbedProviders/Kickstarter.cs b/src/Umbraco.Core/Media/EmbedProviders/Kickstarter.cs index ef75b6ebe8..b3527a82a1 100644 --- a/src/Umbraco.Core/Media/EmbedProviders/Kickstarter.cs +++ b/src/Umbraco.Core/Media/EmbedProviders/Kickstarter.cs @@ -1,7 +1,7 @@ using System.Collections.Generic; -using Umbraco.Core.Serialization; +using Umbraco.Cms.Core.Serialization; -namespace Umbraco.Web.Media.EmbedProviders +namespace Umbraco.Cms.Core.Media.EmbedProviders { public class Kickstarter : EmbedProviderBase { diff --git a/src/Umbraco.Core/Media/EmbedProviders/OEmbedResponse.cs b/src/Umbraco.Core/Media/EmbedProviders/OEmbedResponse.cs index 0719f2ed20..33710d49d0 100644 --- a/src/Umbraco.Core/Media/EmbedProviders/OEmbedResponse.cs +++ b/src/Umbraco.Core/Media/EmbedProviders/OEmbedResponse.cs @@ -1,7 +1,7 @@ using System.Net; using System.Runtime.Serialization; -namespace Umbraco.Web.Media.EmbedProviders +namespace Umbraco.Cms.Core.Media.EmbedProviders { /// /// Wrapper class for OEmbed response diff --git a/src/Umbraco.Core/Media/EmbedProviders/Slideshare.cs b/src/Umbraco.Core/Media/EmbedProviders/Slideshare.cs index 7fa149d145..1517886458 100644 --- a/src/Umbraco.Core/Media/EmbedProviders/Slideshare.cs +++ b/src/Umbraco.Core/Media/EmbedProviders/Slideshare.cs @@ -1,7 +1,7 @@ using System.Collections.Generic; -using Umbraco.Core.Serialization; +using Umbraco.Cms.Core.Serialization; -namespace Umbraco.Web.Media.EmbedProviders +namespace Umbraco.Cms.Core.Media.EmbedProviders { public class Slideshare : EmbedProviderBase { diff --git a/src/Umbraco.Core/Media/EmbedProviders/SoundCloud.cs b/src/Umbraco.Core/Media/EmbedProviders/SoundCloud.cs index 43cc92b0b4..36426b8625 100644 --- a/src/Umbraco.Core/Media/EmbedProviders/SoundCloud.cs +++ b/src/Umbraco.Core/Media/EmbedProviders/SoundCloud.cs @@ -1,7 +1,7 @@ using System.Collections.Generic; -using Umbraco.Core.Serialization; +using Umbraco.Cms.Core.Serialization; -namespace Umbraco.Web.Media.EmbedProviders +namespace Umbraco.Cms.Core.Media.EmbedProviders { public class Soundcloud : EmbedProviderBase { diff --git a/src/Umbraco.Core/Media/EmbedProviders/Ted.cs b/src/Umbraco.Core/Media/EmbedProviders/Ted.cs index cd4b78d065..a50681adf7 100644 --- a/src/Umbraco.Core/Media/EmbedProviders/Ted.cs +++ b/src/Umbraco.Core/Media/EmbedProviders/Ted.cs @@ -1,7 +1,7 @@ using System.Collections.Generic; -using Umbraco.Core.Serialization; +using Umbraco.Cms.Core.Serialization; -namespace Umbraco.Web.Media.EmbedProviders +namespace Umbraco.Cms.Core.Media.EmbedProviders { public class Ted : EmbedProviderBase { diff --git a/src/Umbraco.Core/Media/EmbedProviders/Twitter.cs b/src/Umbraco.Core/Media/EmbedProviders/Twitter.cs index 2bb4203411..1504fb931c 100644 --- a/src/Umbraco.Core/Media/EmbedProviders/Twitter.cs +++ b/src/Umbraco.Core/Media/EmbedProviders/Twitter.cs @@ -1,7 +1,7 @@ using System.Collections.Generic; -using Umbraco.Core.Serialization; +using Umbraco.Cms.Core.Serialization; -namespace Umbraco.Web.Media.EmbedProviders +namespace Umbraco.Cms.Core.Media.EmbedProviders { public class Twitter : EmbedProviderBase { diff --git a/src/Umbraco.Core/Media/EmbedProviders/Vimeo.cs b/src/Umbraco.Core/Media/EmbedProviders/Vimeo.cs index 709ba61b3b..e745ba50c0 100644 --- a/src/Umbraco.Core/Media/EmbedProviders/Vimeo.cs +++ b/src/Umbraco.Core/Media/EmbedProviders/Vimeo.cs @@ -1,7 +1,7 @@ using System.Collections.Generic; -using Umbraco.Core.Serialization; +using Umbraco.Cms.Core.Serialization; -namespace Umbraco.Web.Media.EmbedProviders +namespace Umbraco.Cms.Core.Media.EmbedProviders { public class Vimeo : EmbedProviderBase { diff --git a/src/Umbraco.Core/Media/EmbedProviders/Youtube.cs b/src/Umbraco.Core/Media/EmbedProviders/Youtube.cs index 30b83caa88..9a8a28bf00 100644 --- a/src/Umbraco.Core/Media/EmbedProviders/Youtube.cs +++ b/src/Umbraco.Core/Media/EmbedProviders/Youtube.cs @@ -1,7 +1,7 @@ using System.Collections.Generic; -using Umbraco.Core.Serialization; +using Umbraco.Cms.Core.Serialization; -namespace Umbraco.Web.Media.EmbedProviders +namespace Umbraco.Cms.Core.Media.EmbedProviders { public class YouTube : EmbedProviderBase { diff --git a/src/Umbraco.Core/Media/Exif/BitConverterEx.cs b/src/Umbraco.Core/Media/Exif/BitConverterEx.cs index 9850efa907..6afc6e4308 100644 --- a/src/Umbraco.Core/Media/Exif/BitConverterEx.cs +++ b/src/Umbraco.Core/Media/Exif/BitConverterEx.cs @@ -1,6 +1,6 @@ using System; -namespace Umbraco.Web.Media.Exif +namespace Umbraco.Cms.Core.Media.Exif { /// /// An endian-aware converter for converting between base data types diff --git a/src/Umbraco.Core/Media/Exif/ExifBitConverter.cs b/src/Umbraco.Core/Media/Exif/ExifBitConverter.cs index 1dcae62acd..900c9b1b43 100644 --- a/src/Umbraco.Core/Media/Exif/ExifBitConverter.cs +++ b/src/Umbraco.Core/Media/Exif/ExifBitConverter.cs @@ -1,7 +1,7 @@ using System; using System.Text; -namespace Umbraco.Web.Media.Exif +namespace Umbraco.Cms.Core.Media.Exif { /// /// Converts between exif data types and array of bytes. diff --git a/src/Umbraco.Core/Media/Exif/ExifEnums.cs b/src/Umbraco.Core/Media/Exif/ExifEnums.cs index 5ba5b1d704..1ce0ec4891 100644 --- a/src/Umbraco.Core/Media/Exif/ExifEnums.cs +++ b/src/Umbraco.Core/Media/Exif/ExifEnums.cs @@ -1,6 +1,6 @@ using System; -namespace Umbraco.Web.Media.Exif +namespace Umbraco.Cms.Core.Media.Exif { internal enum Compression : ushort { diff --git a/src/Umbraco.Core/Media/Exif/ExifExceptions.cs b/src/Umbraco.Core/Media/Exif/ExifExceptions.cs index 3d2ce61e9e..3d0472c100 100644 --- a/src/Umbraco.Core/Media/Exif/ExifExceptions.cs +++ b/src/Umbraco.Core/Media/Exif/ExifExceptions.cs @@ -1,7 +1,7 @@ using System; using System.Runtime.Serialization; -namespace Umbraco.Web.Media.Exif +namespace Umbraco.Cms.Core.Media.Exif { /// /// The exception that is thrown when the format of the JPEG/EXIF file could not be understood. diff --git a/src/Umbraco.Core/Media/Exif/ExifExtendedProperty.cs b/src/Umbraco.Core/Media/Exif/ExifExtendedProperty.cs index 8889a13e1d..662390c065 100644 --- a/src/Umbraco.Core/Media/Exif/ExifExtendedProperty.cs +++ b/src/Umbraco.Core/Media/Exif/ExifExtendedProperty.cs @@ -1,7 +1,7 @@ using System; using System.Text; -namespace Umbraco.Web.Media.Exif +namespace Umbraco.Cms.Core.Media.Exif { /// /// Represents an enumerated value. diff --git a/src/Umbraco.Core/Media/Exif/ExifFileTypeDescriptor.cs b/src/Umbraco.Core/Media/Exif/ExifFileTypeDescriptor.cs index 4eba0e5686..a4c001935b 100644 --- a/src/Umbraco.Core/Media/Exif/ExifFileTypeDescriptor.cs +++ b/src/Umbraco.Core/Media/Exif/ExifFileTypeDescriptor.cs @@ -2,7 +2,7 @@ using System.Collections.Generic; using System.ComponentModel; -namespace Umbraco.Web.Media.Exif +namespace Umbraco.Cms.Core.Media.Exif { /// /// Provides a custom type descriptor for an ExifFile instance. diff --git a/src/Umbraco.Core/Media/Exif/ExifInterOperability.cs b/src/Umbraco.Core/Media/Exif/ExifInterOperability.cs index e7d8813767..160ee38636 100644 --- a/src/Umbraco.Core/Media/Exif/ExifInterOperability.cs +++ b/src/Umbraco.Core/Media/Exif/ExifInterOperability.cs @@ -1,4 +1,4 @@ -namespace Umbraco.Web.Media.Exif +namespace Umbraco.Cms.Core.Media.Exif { /// /// Represents interoperability data for an exif tag in the platform byte order. diff --git a/src/Umbraco.Core/Media/Exif/ExifProperty.cs b/src/Umbraco.Core/Media/Exif/ExifProperty.cs index 588d3d9f92..d530e494b0 100644 --- a/src/Umbraco.Core/Media/Exif/ExifProperty.cs +++ b/src/Umbraco.Core/Media/Exif/ExifProperty.cs @@ -1,7 +1,7 @@ using System; using System.Text; -namespace Umbraco.Web.Media.Exif +namespace Umbraco.Cms.Core.Media.Exif { /// /// Represents the abstract base class for an Exif property. diff --git a/src/Umbraco.Core/Media/Exif/ExifPropertyCollection.cs b/src/Umbraco.Core/Media/Exif/ExifPropertyCollection.cs index 7f6258cbca..f26a409695 100644 --- a/src/Umbraco.Core/Media/Exif/ExifPropertyCollection.cs +++ b/src/Umbraco.Core/Media/Exif/ExifPropertyCollection.cs @@ -2,7 +2,7 @@ using System.Collections.Generic; using System.Text; -namespace Umbraco.Web.Media.Exif +namespace Umbraco.Cms.Core.Media.Exif { /// /// Represents a collection of objects. diff --git a/src/Umbraco.Core/Media/Exif/ExifPropertyFactory.cs b/src/Umbraco.Core/Media/Exif/ExifPropertyFactory.cs index 68769eb1f3..8d1b1af490 100644 --- a/src/Umbraco.Core/Media/Exif/ExifPropertyFactory.cs +++ b/src/Umbraco.Core/Media/Exif/ExifPropertyFactory.cs @@ -1,7 +1,7 @@ using System; using System.Text; -namespace Umbraco.Web.Media.Exif +namespace Umbraco.Cms.Core.Media.Exif { /// /// Creates exif properties from interoperability parameters. diff --git a/src/Umbraco.Core/Media/Exif/ExifTag.cs b/src/Umbraco.Core/Media/Exif/ExifTag.cs index 5c85b9558d..22215044b2 100644 --- a/src/Umbraco.Core/Media/Exif/ExifTag.cs +++ b/src/Umbraco.Core/Media/Exif/ExifTag.cs @@ -1,5 +1,5 @@  -namespace Umbraco.Web.Media.Exif +namespace Umbraco.Cms.Core.Media.Exif { /// /// Represents the tags associated with exif fields. diff --git a/src/Umbraco.Core/Media/Exif/ExifTagFactory.cs b/src/Umbraco.Core/Media/Exif/ExifTagFactory.cs index a9f1896fe7..a66cee1b36 100644 --- a/src/Umbraco.Core/Media/Exif/ExifTagFactory.cs +++ b/src/Umbraco.Core/Media/Exif/ExifTagFactory.cs @@ -1,6 +1,6 @@ using System; -namespace Umbraco.Web.Media.Exif +namespace Umbraco.Cms.Core.Media.Exif { internal static class ExifTagFactory { diff --git a/src/Umbraco.Core/Media/Exif/IFD.cs b/src/Umbraco.Core/Media/Exif/IFD.cs index c73a7ed97a..e275e8d52a 100644 --- a/src/Umbraco.Core/Media/Exif/IFD.cs +++ b/src/Umbraco.Core/Media/Exif/IFD.cs @@ -1,4 +1,4 @@ -namespace Umbraco.Web.Media.Exif +namespace Umbraco.Cms.Core.Media.Exif { /// /// Represents the IFD section containing tags. diff --git a/src/Umbraco.Core/Media/Exif/ImageFile.cs b/src/Umbraco.Core/Media/Exif/ImageFile.cs index f59f9dc73f..f2190b3e1c 100644 --- a/src/Umbraco.Core/Media/Exif/ImageFile.cs +++ b/src/Umbraco.Core/Media/Exif/ImageFile.cs @@ -1,9 +1,9 @@ using System.ComponentModel; using System.IO; using System.Text; -using Umbraco.Web.Media.TypeDetector; +using Umbraco.Cms.Core.Media.TypeDetector; -namespace Umbraco.Web.Media.Exif +namespace Umbraco.Cms.Core.Media.Exif { /// /// Represents the base class for image files. diff --git a/src/Umbraco.Core/Media/Exif/ImageFileDirectory.cs b/src/Umbraco.Core/Media/Exif/ImageFileDirectory.cs index 7b2c134f52..ed4564a486 100644 --- a/src/Umbraco.Core/Media/Exif/ImageFileDirectory.cs +++ b/src/Umbraco.Core/Media/Exif/ImageFileDirectory.cs @@ -1,7 +1,7 @@ using System; using System.Collections.Generic; -namespace Umbraco.Web.Media.Exif +namespace Umbraco.Cms.Core.Media.Exif { /// /// Represents an image file directory. diff --git a/src/Umbraco.Core/Media/Exif/ImageFileDirectoryEntry.cs b/src/Umbraco.Core/Media/Exif/ImageFileDirectoryEntry.cs index 2d364c4d0c..7d1568afb3 100644 --- a/src/Umbraco.Core/Media/Exif/ImageFileDirectoryEntry.cs +++ b/src/Umbraco.Core/Media/Exif/ImageFileDirectoryEntry.cs @@ -1,6 +1,6 @@ using System; -namespace Umbraco.Web.Media.Exif +namespace Umbraco.Cms.Core.Media.Exif { /// /// Represents an entry in the image file directory. diff --git a/src/Umbraco.Core/Media/Exif/ImageFileFormat.cs b/src/Umbraco.Core/Media/Exif/ImageFileFormat.cs index 364877f7da..09cfcce589 100644 --- a/src/Umbraco.Core/Media/Exif/ImageFileFormat.cs +++ b/src/Umbraco.Core/Media/Exif/ImageFileFormat.cs @@ -1,4 +1,4 @@ -namespace Umbraco.Web.Media.Exif +namespace Umbraco.Cms.Core.Media.Exif { /// /// Represents the format of the . diff --git a/src/Umbraco.Core/Media/Exif/JFIFEnums.cs b/src/Umbraco.Core/Media/Exif/JFIFEnums.cs index d3a55eec79..ff6b0463ed 100644 --- a/src/Umbraco.Core/Media/Exif/JFIFEnums.cs +++ b/src/Umbraco.Core/Media/Exif/JFIFEnums.cs @@ -1,4 +1,4 @@ -namespace Umbraco.Web.Media.Exif +namespace Umbraco.Cms.Core.Media.Exif { /// /// Represents the units for the X and Y densities diff --git a/src/Umbraco.Core/Media/Exif/JFIFExtendedProperty.cs b/src/Umbraco.Core/Media/Exif/JFIFExtendedProperty.cs index 24b3ac74be..d3a0e7fb46 100644 --- a/src/Umbraco.Core/Media/Exif/JFIFExtendedProperty.cs +++ b/src/Umbraco.Core/Media/Exif/JFIFExtendedProperty.cs @@ -1,6 +1,6 @@ using System; -namespace Umbraco.Web.Media.Exif +namespace Umbraco.Cms.Core.Media.Exif { /// /// Represents the JFIF version as a 16 bit unsigned integer. (EXIF Specification: SHORT) diff --git a/src/Umbraco.Core/Media/Exif/JFIFThumbnail.cs b/src/Umbraco.Core/Media/Exif/JFIFThumbnail.cs index e7fc5fd51a..de9fe8f76f 100644 --- a/src/Umbraco.Core/Media/Exif/JFIFThumbnail.cs +++ b/src/Umbraco.Core/Media/Exif/JFIFThumbnail.cs @@ -1,4 +1,4 @@ -namespace Umbraco.Web.Media.Exif +namespace Umbraco.Cms.Core.Media.Exif { /// /// Represents a JFIF thumbnail. diff --git a/src/Umbraco.Core/Media/Exif/JPEGExceptions.cs b/src/Umbraco.Core/Media/Exif/JPEGExceptions.cs index 40fd9f3be8..dde0326f99 100644 --- a/src/Umbraco.Core/Media/Exif/JPEGExceptions.cs +++ b/src/Umbraco.Core/Media/Exif/JPEGExceptions.cs @@ -1,7 +1,7 @@ using System; using System.Runtime.Serialization; -namespace Umbraco.Web.Media.Exif +namespace Umbraco.Cms.Core.Media.Exif { diff --git a/src/Umbraco.Core/Media/Exif/JPEGFile.cs b/src/Umbraco.Core/Media/Exif/JPEGFile.cs index 83e6a81eec..373dfbc377 100644 --- a/src/Umbraco.Core/Media/Exif/JPEGFile.cs +++ b/src/Umbraco.Core/Media/Exif/JPEGFile.cs @@ -3,7 +3,7 @@ using System.Collections.Generic; using System.IO; using System.Text; -namespace Umbraco.Web.Media.Exif +namespace Umbraco.Cms.Core.Media.Exif { /// /// Represents the binary view of a JPEG compressed file. diff --git a/src/Umbraco.Core/Media/Exif/JPEGMarker.cs b/src/Umbraco.Core/Media/Exif/JPEGMarker.cs index 3fb04dff28..a7a3b4a9b1 100644 --- a/src/Umbraco.Core/Media/Exif/JPEGMarker.cs +++ b/src/Umbraco.Core/Media/Exif/JPEGMarker.cs @@ -1,4 +1,4 @@ -namespace Umbraco.Web.Media.Exif +namespace Umbraco.Cms.Core.Media.Exif { /// /// Represents a JPEG marker byte. diff --git a/src/Umbraco.Core/Media/Exif/JPEGSection.cs b/src/Umbraco.Core/Media/Exif/JPEGSection.cs index 78565d2bfa..07dd488384 100644 --- a/src/Umbraco.Core/Media/Exif/JPEGSection.cs +++ b/src/Umbraco.Core/Media/Exif/JPEGSection.cs @@ -1,4 +1,4 @@ -namespace Umbraco.Web.Media.Exif +namespace Umbraco.Cms.Core.Media.Exif { /// /// Represents the memory view of a JPEG section. diff --git a/src/Umbraco.Core/Media/Exif/MathEx.cs b/src/Umbraco.Core/Media/Exif/MathEx.cs index 94cbccfbda..8cac15f5b4 100644 --- a/src/Umbraco.Core/Media/Exif/MathEx.cs +++ b/src/Umbraco.Core/Media/Exif/MathEx.cs @@ -1,7 +1,7 @@ using System; using System.Text; -namespace Umbraco.Web.Media.Exif +namespace Umbraco.Cms.Core.Media.Exif { /// /// Contains extended Math functions. diff --git a/src/Umbraco.Core/Media/Exif/SvgFile.cs b/src/Umbraco.Core/Media/Exif/SvgFile.cs index 1213bb513f..00516eecb8 100644 --- a/src/Umbraco.Core/Media/Exif/SvgFile.cs +++ b/src/Umbraco.Core/Media/Exif/SvgFile.cs @@ -2,7 +2,7 @@ using System.Linq; using System.Xml.Linq; -namespace Umbraco.Web.Media.Exif +namespace Umbraco.Cms.Core.Media.Exif { internal class SvgFile : ImageFile { @@ -16,9 +16,9 @@ namespace Umbraco.Web.Media.Exif var height = document.Root?.Attributes().Where(x => x.Name == "height").Select(x => x.Value).FirstOrDefault(); Properties.Add(new ExifSInt(ExifTag.PixelYDimension, - height == null ? Core.Constants.Conventions.Media.DefaultSize : int.Parse(height))); + height == null ? Constants.Conventions.Media.DefaultSize : int.Parse(height))); Properties.Add(new ExifSInt(ExifTag.PixelXDimension, - width == null ? Core.Constants.Conventions.Media.DefaultSize : int.Parse(width))); + width == null ? Constants.Conventions.Media.DefaultSize : int.Parse(width))); Format = ImageFileFormat.SVG; } diff --git a/src/Umbraco.Core/Media/Exif/TIFFFile.cs b/src/Umbraco.Core/Media/Exif/TIFFFile.cs index 19575eaff2..8841e8337b 100644 --- a/src/Umbraco.Core/Media/Exif/TIFFFile.cs +++ b/src/Umbraco.Core/Media/Exif/TIFFFile.cs @@ -2,7 +2,7 @@ using System.Collections.Generic; using System.IO; -namespace Umbraco.Web.Media.Exif +namespace Umbraco.Cms.Core.Media.Exif { /// /// Represents the binary view of a TIFF file. diff --git a/src/Umbraco.Core/Media/Exif/TIFFHeader.cs b/src/Umbraco.Core/Media/Exif/TIFFHeader.cs index 339525ef2c..ac7c503d0c 100644 --- a/src/Umbraco.Core/Media/Exif/TIFFHeader.cs +++ b/src/Umbraco.Core/Media/Exif/TIFFHeader.cs @@ -1,4 +1,4 @@ -namespace Umbraco.Web.Media.Exif +namespace Umbraco.Cms.Core.Media.Exif { /// /// Represents a TIFF Header. diff --git a/src/Umbraco.Core/Media/Exif/TIFFStrip.cs b/src/Umbraco.Core/Media/Exif/TIFFStrip.cs index 8207eb64e8..9930961e20 100644 --- a/src/Umbraco.Core/Media/Exif/TIFFStrip.cs +++ b/src/Umbraco.Core/Media/Exif/TIFFStrip.cs @@ -1,6 +1,6 @@ using System; -namespace Umbraco.Web.Media.Exif +namespace Umbraco.Cms.Core.Media.Exif { /// /// Represents a strip of compressed image data in a TIFF file. diff --git a/src/Umbraco.Core/Media/Exif/Utility.cs b/src/Umbraco.Core/Media/Exif/Utility.cs index d2daa3b632..033b97ecc7 100644 --- a/src/Umbraco.Core/Media/Exif/Utility.cs +++ b/src/Umbraco.Core/Media/Exif/Utility.cs @@ -1,6 +1,6 @@ using System.IO; -namespace Umbraco.Web.Media.Exif +namespace Umbraco.Cms.Core.Media.Exif { /// /// Contains utility functions. diff --git a/src/Umbraco.Core/Media/ExifImageDimensionExtractor.cs b/src/Umbraco.Core/Media/ExifImageDimensionExtractor.cs index 441d2d6170..8987b60fee 100644 --- a/src/Umbraco.Core/Media/ExifImageDimensionExtractor.cs +++ b/src/Umbraco.Core/Media/ExifImageDimensionExtractor.cs @@ -1,8 +1,8 @@ using System; using System.IO; -using Umbraco.Web.Media.Exif; +using Umbraco.Cms.Core.Media.Exif; -namespace Umbraco.Core.Media +namespace Umbraco.Cms.Core.Media { public static class ExifImageDimensionExtractor { @@ -19,7 +19,7 @@ namespace Umbraco.Core.Media height = Convert.ToInt32(jpgInfo.Properties[ExifTag.PixelYDimension].Value); width = Convert.ToInt32(jpgInfo.Properties[ExifTag.PixelXDimension].Value); } - + return height > 0 && width > 0; } } diff --git a/src/Umbraco.Core/Media/IEmbedProvider.cs b/src/Umbraco.Core/Media/IEmbedProvider.cs index 39da6fae0d..55b5e4a53a 100644 --- a/src/Umbraco.Core/Media/IEmbedProvider.cs +++ b/src/Umbraco.Core/Media/IEmbedProvider.cs @@ -1,6 +1,6 @@ using System.Collections.Generic; -namespace Umbraco.Core.Media +namespace Umbraco.Cms.Core.Media { public interface IEmbedProvider { diff --git a/src/Umbraco.Core/Media/IImageDimensionExtractor.cs b/src/Umbraco.Core/Media/IImageDimensionExtractor.cs index 3da7f37393..c31260a9ce 100644 --- a/src/Umbraco.Core/Media/IImageDimensionExtractor.cs +++ b/src/Umbraco.Core/Media/IImageDimensionExtractor.cs @@ -1,6 +1,6 @@ using System.IO; -namespace Umbraco.Web.Media +namespace Umbraco.Cms.Core.Media { public interface IImageDimensionExtractor { diff --git a/src/Umbraco.Core/Media/IImageUrlGenerator.cs b/src/Umbraco.Core/Media/IImageUrlGenerator.cs index 7c77a34388..c8628f3147 100644 --- a/src/Umbraco.Core/Media/IImageUrlGenerator.cs +++ b/src/Umbraco.Core/Media/IImageUrlGenerator.cs @@ -1,7 +1,7 @@ using System.Collections.Generic; -using Umbraco.Core.Models; +using Umbraco.Cms.Core.Models; -namespace Umbraco.Core.Media +namespace Umbraco.Cms.Core.Media { public interface IImageUrlGenerator { diff --git a/src/Umbraco.Core/Media/ImageSize.cs b/src/Umbraco.Core/Media/ImageSize.cs index 6d073ac196..9acef58836 100644 --- a/src/Umbraco.Core/Media/ImageSize.cs +++ b/src/Umbraco.Core/Media/ImageSize.cs @@ -1,4 +1,4 @@ -namespace Umbraco.Web.Media +namespace Umbraco.Cms.Core.Media { public struct ImageSize { diff --git a/src/Umbraco.Core/Media/ImageUrlGeneratorExtensions.cs b/src/Umbraco.Core/Media/ImageUrlGeneratorExtensions.cs index 902f84331b..5b7be5ef0e 100644 --- a/src/Umbraco.Core/Media/ImageUrlGeneratorExtensions.cs +++ b/src/Umbraco.Core/Media/ImageUrlGeneratorExtensions.cs @@ -1,6 +1,7 @@ using System; +using Umbraco.Cms.Core.Media; -namespace Umbraco.Core.Media +namespace Umbraco.Extensions { public static class ImageUrlGeneratorExtensions { diff --git a/src/Umbraco.Core/Media/OEmbedResult.cs b/src/Umbraco.Core/Media/OEmbedResult.cs index bed07d9b5e..fd2c5ff421 100644 --- a/src/Umbraco.Core/Media/OEmbedResult.cs +++ b/src/Umbraco.Core/Media/OEmbedResult.cs @@ -1,4 +1,4 @@ -namespace Umbraco.Core.Media +namespace Umbraco.Cms.Core.Media { public class OEmbedResult { diff --git a/src/Umbraco.Core/Media/OEmbedStatus.cs b/src/Umbraco.Core/Media/OEmbedStatus.cs index 0f1f22b0e2..268fc1cd0d 100644 --- a/src/Umbraco.Core/Media/OEmbedStatus.cs +++ b/src/Umbraco.Core/Media/OEmbedStatus.cs @@ -1,4 +1,4 @@ -namespace Umbraco.Core.Media +namespace Umbraco.Cms.Core.Media { public enum OEmbedStatus { diff --git a/src/Umbraco.Core/Media/TypeDetector/JpegDetector.cs b/src/Umbraco.Core/Media/TypeDetector/JpegDetector.cs index d06671f667..0481323a4a 100644 --- a/src/Umbraco.Core/Media/TypeDetector/JpegDetector.cs +++ b/src/Umbraco.Core/Media/TypeDetector/JpegDetector.cs @@ -1,6 +1,6 @@ using System.IO; -namespace Umbraco.Web.Media.TypeDetector +namespace Umbraco.Cms.Core.Media.TypeDetector { public class JpegDetector : RasterizedTypeDetector { diff --git a/src/Umbraco.Core/Media/TypeDetector/RasterizedTypeDetector.cs b/src/Umbraco.Core/Media/TypeDetector/RasterizedTypeDetector.cs index a4ded5f8c4..4089842a00 100644 --- a/src/Umbraco.Core/Media/TypeDetector/RasterizedTypeDetector.cs +++ b/src/Umbraco.Core/Media/TypeDetector/RasterizedTypeDetector.cs @@ -1,6 +1,6 @@ using System.IO; -namespace Umbraco.Web.Media.TypeDetector +namespace Umbraco.Cms.Core.Media.TypeDetector { public abstract class RasterizedTypeDetector { diff --git a/src/Umbraco.Core/Media/TypeDetector/SvgDetector.cs b/src/Umbraco.Core/Media/TypeDetector/SvgDetector.cs index fbd1b2c74c..81f13b199d 100644 --- a/src/Umbraco.Core/Media/TypeDetector/SvgDetector.cs +++ b/src/Umbraco.Core/Media/TypeDetector/SvgDetector.cs @@ -1,7 +1,7 @@ using System.IO; using System.Xml.Linq; -namespace Umbraco.Web.Media.TypeDetector +namespace Umbraco.Cms.Core.Media.TypeDetector { public class SvgDetector { diff --git a/src/Umbraco.Core/Media/TypeDetector/TIFFDetector.cs b/src/Umbraco.Core/Media/TypeDetector/TIFFDetector.cs index 7adb1cd9de..61a1a46c9c 100644 --- a/src/Umbraco.Core/Media/TypeDetector/TIFFDetector.cs +++ b/src/Umbraco.Core/Media/TypeDetector/TIFFDetector.cs @@ -1,7 +1,7 @@ using System.IO; using System.Text; -namespace Umbraco.Web.Media.TypeDetector +namespace Umbraco.Cms.Core.Media.TypeDetector { public class TIFFDetector { diff --git a/src/Umbraco.Core/Media/UploadAutoFillProperties.cs b/src/Umbraco.Core/Media/UploadAutoFillProperties.cs index 44d5f5c8c3..105b0ce074 100644 --- a/src/Umbraco.Core/Media/UploadAutoFillProperties.cs +++ b/src/Umbraco.Core/Media/UploadAutoFillProperties.cs @@ -1,13 +1,12 @@ using System; using System.IO; using Microsoft.Extensions.Logging; -using Umbraco.Core; -using Umbraco.Core.Configuration.Models; -using Umbraco.Core.IO; -using Umbraco.Core.Media; -using Umbraco.Core.Models; +using Umbraco.Cms.Core.Configuration.Models; +using Umbraco.Cms.Core.IO; +using Umbraco.Cms.Core.Models; +using Umbraco.Extensions; -namespace Umbraco.Web.Media +namespace Umbraco.Cms.Core.Media { /// /// Provides methods to manage auto-fill properties for upload fields. diff --git a/src/Umbraco.Core/Migrations/IMigration.cs b/src/Umbraco.Core/Migrations/IMigration.cs index c929234f77..059ab4f2f5 100644 --- a/src/Umbraco.Core/Migrations/IMigration.cs +++ b/src/Umbraco.Core/Migrations/IMigration.cs @@ -1,6 +1,6 @@ -using Umbraco.Core.Composing; +using Umbraco.Cms.Core.Composing; -namespace Umbraco.Core.Migrations +namespace Umbraco.Cms.Core.Migrations { /// /// Represents a migration. diff --git a/src/Umbraco.Core/Migrations/IncompleteMigrationExpressionException.cs b/src/Umbraco.Core/Migrations/IncompleteMigrationExpressionException.cs index 3c81e2f0e2..bebed7ab50 100644 --- a/src/Umbraco.Core/Migrations/IncompleteMigrationExpressionException.cs +++ b/src/Umbraco.Core/Migrations/IncompleteMigrationExpressionException.cs @@ -1,7 +1,7 @@ using System; using System.Runtime.Serialization; -namespace Umbraco.Core.Migrations +namespace Umbraco.Cms.Core.Migrations { /// /// The exception that is thrown when a migration expression is not executed. diff --git a/src/Umbraco.Core/Migrations/NoopMigration.cs b/src/Umbraco.Core/Migrations/NoopMigration.cs index 7a2a7d5875..9156c8cd09 100644 --- a/src/Umbraco.Core/Migrations/NoopMigration.cs +++ b/src/Umbraco.Core/Migrations/NoopMigration.cs @@ -1,4 +1,4 @@ -namespace Umbraco.Core.Migrations +namespace Umbraco.Cms.Core.Migrations { public class NoopMigration : IMigration { diff --git a/src/Umbraco.Core/Models/AnchorsModel.cs b/src/Umbraco.Core/Models/AnchorsModel.cs index 9edcf3466b..6033f092f8 100644 --- a/src/Umbraco.Core/Models/AnchorsModel.cs +++ b/src/Umbraco.Core/Models/AnchorsModel.cs @@ -1,4 +1,4 @@ -namespace Umbraco.Web.Models +namespace Umbraco.Cms.Core.Models { public class AnchorsModel { diff --git a/src/Umbraco.Core/Models/AuditEntry.cs b/src/Umbraco.Core/Models/AuditEntry.cs index 5399e399c0..b89979e08f 100644 --- a/src/Umbraco.Core/Models/AuditEntry.cs +++ b/src/Umbraco.Core/Models/AuditEntry.cs @@ -1,8 +1,8 @@ using System; using System.Runtime.Serialization; -using Umbraco.Core.Models.Entities; +using Umbraco.Cms.Core.Models.Entities; -namespace Umbraco.Core.Models +namespace Umbraco.Cms.Core.Models { /// /// Represents an audited event. diff --git a/src/Umbraco.Core/Models/AuditItem.cs b/src/Umbraco.Core/Models/AuditItem.cs index 5fbde7f362..13b6ff1264 100644 --- a/src/Umbraco.Core/Models/AuditItem.cs +++ b/src/Umbraco.Core/Models/AuditItem.cs @@ -1,6 +1,6 @@ -using Umbraco.Core.Models.Entities; +using Umbraco.Cms.Core.Models.Entities; -namespace Umbraco.Core.Models +namespace Umbraco.Cms.Core.Models { public sealed class AuditItem : EntityBase, IAuditItem { diff --git a/src/Umbraco.Core/Models/AuditType.cs b/src/Umbraco.Core/Models/AuditType.cs index 8a57948805..cea6c7ccf2 100644 --- a/src/Umbraco.Core/Models/AuditType.cs +++ b/src/Umbraco.Core/Models/AuditType.cs @@ -1,4 +1,4 @@ -namespace Umbraco.Core.Models +namespace Umbraco.Cms.Core.Models { /// /// Defines audit types. @@ -47,7 +47,7 @@ /// /// Variant(s) being sent to publishing. - /// + /// SendToPublishVariant, /// @@ -109,7 +109,7 @@ /// Package being uninstalled. /// PackagerUninstall, - + /// /// Custom audit message. /// diff --git a/src/Umbraco.Core/Models/BackOfficeTour.cs b/src/Umbraco.Core/Models/BackOfficeTour.cs index 7ebc2392f6..4889fb5dde 100644 --- a/src/Umbraco.Core/Models/BackOfficeTour.cs +++ b/src/Umbraco.Core/Models/BackOfficeTour.cs @@ -1,7 +1,7 @@ using System.Collections.Generic; using System.Runtime.Serialization; -namespace Umbraco.Web.Models +namespace Umbraco.Cms.Core.Models { /// /// A model representing a tour. diff --git a/src/Umbraco.Core/Models/BackOfficeTourFile.cs b/src/Umbraco.Core/Models/BackOfficeTourFile.cs index 6840171f48..3229a736d8 100644 --- a/src/Umbraco.Core/Models/BackOfficeTourFile.cs +++ b/src/Umbraco.Core/Models/BackOfficeTourFile.cs @@ -1,7 +1,7 @@ using System.Collections.Generic; using System.Runtime.Serialization; -namespace Umbraco.Web.Models +namespace Umbraco.Cms.Core.Models { /// /// A model representing the file used to load a tour. diff --git a/src/Umbraco.Core/Models/BackOfficeTourStep.cs b/src/Umbraco.Core/Models/BackOfficeTourStep.cs index 9c216b95fe..4c56be29fc 100644 --- a/src/Umbraco.Core/Models/BackOfficeTourStep.cs +++ b/src/Umbraco.Core/Models/BackOfficeTourStep.cs @@ -1,6 +1,6 @@ using System.Runtime.Serialization; -namespace Umbraco.Web.Models +namespace Umbraco.Cms.Core.Models { /// /// A model representing a step in a tour. diff --git a/src/Umbraco.Core/Models/Blocks/BlockListItem.cs b/src/Umbraco.Core/Models/Blocks/BlockListItem.cs index 620c3d9fe0..400649ff05 100644 --- a/src/Umbraco.Core/Models/Blocks/BlockListItem.cs +++ b/src/Umbraco.Core/Models/Blocks/BlockListItem.cs @@ -1,8 +1,8 @@ using System; using System.Runtime.Serialization; -using Umbraco.Core.Models.PublishedContent; +using Umbraco.Cms.Core.Models.PublishedContent; -namespace Umbraco.Core.Models.Blocks +namespace Umbraco.Cms.Core.Models.Blocks { /// /// Represents a layout item for the Block List editor. diff --git a/src/Umbraco.Core/Models/Blocks/BlockListModel.cs b/src/Umbraco.Core/Models/Blocks/BlockListModel.cs index 92a426c3d4..f2e556e004 100644 --- a/src/Umbraco.Core/Models/Blocks/BlockListModel.cs +++ b/src/Umbraco.Core/Models/Blocks/BlockListModel.cs @@ -4,7 +4,7 @@ using System.Collections.ObjectModel; using System.Linq; using System.Runtime.Serialization; -namespace Umbraco.Core.Models.Blocks +namespace Umbraco.Cms.Core.Models.Blocks { /// /// The strongly typed model for the Block List editor. diff --git a/src/Umbraco.Core/Models/Blocks/ContentAndSettingsReference.cs b/src/Umbraco.Core/Models/Blocks/ContentAndSettingsReference.cs index f7222fe140..48d93ec985 100644 --- a/src/Umbraco.Core/Models/Blocks/ContentAndSettingsReference.cs +++ b/src/Umbraco.Core/Models/Blocks/ContentAndSettingsReference.cs @@ -1,7 +1,7 @@ using System; using System.Collections.Generic; -namespace Umbraco.Core.Models.Blocks +namespace Umbraco.Cms.Core.Models.Blocks { public struct ContentAndSettingsReference : IEquatable { diff --git a/src/Umbraco.Core/Models/Blocks/IBlockReference.cs b/src/Umbraco.Core/Models/Blocks/IBlockReference.cs index 7f5c835b3c..48c2b85637 100644 --- a/src/Umbraco.Core/Models/Blocks/IBlockReference.cs +++ b/src/Umbraco.Core/Models/Blocks/IBlockReference.cs @@ -1,4 +1,4 @@ -namespace Umbraco.Core.Models.Blocks +namespace Umbraco.Cms.Core.Models.Blocks { /// /// Represents a data item reference for a Block Editor implementation. diff --git a/src/Umbraco.Core/Models/ChangingPasswordModel.cs b/src/Umbraco.Core/Models/ChangingPasswordModel.cs index c668475275..37dad33eb3 100644 --- a/src/Umbraco.Core/Models/ChangingPasswordModel.cs +++ b/src/Umbraco.Core/Models/ChangingPasswordModel.cs @@ -1,6 +1,6 @@ using System.Runtime.Serialization; -namespace Umbraco.Core.Models +namespace Umbraco.Cms.Core.Models { /// /// A model representing the data required to set a member/user password depending on the provider installed. diff --git a/src/Umbraco.Core/Models/Consent.cs b/src/Umbraco.Core/Models/Consent.cs index 10b7208abb..5bbb5e4607 100644 --- a/src/Umbraco.Core/Models/Consent.cs +++ b/src/Umbraco.Core/Models/Consent.cs @@ -1,9 +1,9 @@ using System; using System.Collections.Generic; using System.Runtime.Serialization; -using Umbraco.Core.Models.Entities; +using Umbraco.Cms.Core.Models.Entities; -namespace Umbraco.Core.Models +namespace Umbraco.Cms.Core.Models { /// /// Represents a consent. diff --git a/src/Umbraco.Core/Models/ConsentExtensions.cs b/src/Umbraco.Core/Models/ConsentExtensions.cs index fabeaf5809..b95c7b66f9 100644 --- a/src/Umbraco.Core/Models/ConsentExtensions.cs +++ b/src/Umbraco.Core/Models/ConsentExtensions.cs @@ -1,4 +1,6 @@ -namespace Umbraco.Core.Models +using Umbraco.Cms.Core.Models; + +namespace Umbraco.Extensions { /// /// Provides extension methods for the interface. diff --git a/src/Umbraco.Core/Models/ConsentState.cs b/src/Umbraco.Core/Models/ConsentState.cs index ed370823f3..0828561ff8 100644 --- a/src/Umbraco.Core/Models/ConsentState.cs +++ b/src/Umbraco.Core/Models/ConsentState.cs @@ -1,6 +1,6 @@ using System; -namespace Umbraco.Core.Models +namespace Umbraco.Cms.Core.Models { /// /// Represents the state of a consent. diff --git a/src/Umbraco.Core/Models/Content.cs b/src/Umbraco.Core/Models/Content.cs index 04f49e704e..276219aae3 100644 --- a/src/Umbraco.Core/Models/Content.cs +++ b/src/Umbraco.Core/Models/Content.cs @@ -1,11 +1,11 @@ -using System; +using System; using System.Collections.Generic; using System.Collections.Specialized; using System.Linq; using System.Runtime.Serialization; -using Umbraco.Core.Exceptions; +using Umbraco.Extensions; -namespace Umbraco.Core.Models +namespace Umbraco.Cms.Core.Models { /// /// Represents a Content object @@ -39,6 +39,21 @@ namespace Umbraco.Core.Models : this(name, parent, contentType, new PropertyCollection(), culture) { } + /// + /// Constructor for creating a Content object + /// + /// Name of the content + /// Parent object + /// ContentType for the current Content object + /// The identifier of the user creating the Content object + /// An optional culture. + public Content(string name, IContent parent, IContentType contentType, int userId, string culture = null) + : this(name, parent, contentType, new PropertyCollection(), culture) + { + CreatorId = userId; + WriterId = userId; + } + /// /// Constructor for creating a Content object /// @@ -66,6 +81,21 @@ namespace Umbraco.Core.Models : this(name, parentId, contentType, new PropertyCollection(), culture) { } + /// + /// Constructor for creating a Content object + /// + /// Name of the content + /// Id of the Parent content + /// ContentType for the current Content object + /// The identifier of the user creating the Content object + /// An optional culture. + public Content(string name, int parentId, IContentType contentType, int userId, string culture = null) + : this(name, parentId, contentType, new PropertyCollection(), culture) + { + CreatorId = userId; + WriterId = userId; + } + /// /// Constructor for creating a Content object /// @@ -101,12 +131,12 @@ namespace Umbraco.Core.Models { _schedule.ClearCollectionChangedEvents(); } - + SetPropertyValueAndDetectChanges(value, ref _schedule, nameof(ContentSchedule)); if (_schedule != null) { _schedule.CollectionChanged += ScheduleCollectionChanged; - } + } } } @@ -237,7 +267,7 @@ namespace Umbraco.Core.Models if (_publishInfos != null) { _publishInfos.CollectionChanged += PublishNamesCollectionChanged; - } + } } } diff --git a/src/Umbraco.Core/Models/ContentBase.cs b/src/Umbraco.Core/Models/ContentBase.cs index 1e71da34c4..139cfca1ee 100644 --- a/src/Umbraco.Core/Models/ContentBase.cs +++ b/src/Umbraco.Core/Models/ContentBase.cs @@ -4,9 +4,10 @@ using System.Collections.Specialized; using System.Diagnostics; using System.Linq; using System.Runtime.Serialization; -using Umbraco.Core.Models.Entities; +using Umbraco.Cms.Core.Models.Entities; +using Umbraco.Extensions; -namespace Umbraco.Core.Models +namespace Umbraco.Cms.Core.Models { /// /// Represents an abstract class for base Content properties and methods diff --git a/src/Umbraco.Core/Models/ContentBaseExtensions.cs b/src/Umbraco.Core/Models/ContentBaseExtensions.cs index 2b9a246573..45fe9e41d9 100644 --- a/src/Umbraco.Core/Models/ContentBaseExtensions.cs +++ b/src/Umbraco.Core/Models/ContentBaseExtensions.cs @@ -1,9 +1,10 @@ using System; using System.Collections.Generic; using System.Linq; -using Umbraco.Core.Models; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Core.Strings; -namespace Umbraco.Core.Strings +namespace Umbraco.Extensions { /// /// Provides extension methods to IContentBase to get URL segments. diff --git a/src/Umbraco.Core/Models/ContentCultureInfos.cs b/src/Umbraco.Core/Models/ContentCultureInfos.cs index 2f9c08b985..ab7a0a8e37 100644 --- a/src/Umbraco.Core/Models/ContentCultureInfos.cs +++ b/src/Umbraco.Core/Models/ContentCultureInfos.cs @@ -1,8 +1,8 @@ using System; using System.Collections.Generic; -using Umbraco.Core.Models.Entities; +using Umbraco.Cms.Core.Models.Entities; -namespace Umbraco.Core.Models +namespace Umbraco.Cms.Core.Models { /// /// The name of a content variant for a given culture diff --git a/src/Umbraco.Core/Models/ContentCultureInfosCollection.cs b/src/Umbraco.Core/Models/ContentCultureInfosCollection.cs index 07ee661497..03dde33a1a 100644 --- a/src/Umbraco.Core/Models/ContentCultureInfosCollection.cs +++ b/src/Umbraco.Core/Models/ContentCultureInfosCollection.cs @@ -1,8 +1,8 @@ using System; using System.Collections.Specialized; -using Umbraco.Core.Collections; +using Umbraco.Cms.Core.Collections; -namespace Umbraco.Core.Models +namespace Umbraco.Cms.Core.Models { /// /// The culture names of a content's variants diff --git a/src/Umbraco.Core/Models/ContentDataIntegrityReport.cs b/src/Umbraco.Core/Models/ContentDataIntegrityReport.cs index 9f0f147083..8a13a26e40 100644 --- a/src/Umbraco.Core/Models/ContentDataIntegrityReport.cs +++ b/src/Umbraco.Core/Models/ContentDataIntegrityReport.cs @@ -1,7 +1,7 @@ using System.Collections.Generic; using System.Linq; -namespace Umbraco.Core.Models +namespace Umbraco.Cms.Core.Models { public class ContentDataIntegrityReport { diff --git a/src/Umbraco.Core/Models/ContentDataIntegrityReportEntry.cs b/src/Umbraco.Core/Models/ContentDataIntegrityReportEntry.cs index 517b9e80dc..e6138addbc 100644 --- a/src/Umbraco.Core/Models/ContentDataIntegrityReportEntry.cs +++ b/src/Umbraco.Core/Models/ContentDataIntegrityReportEntry.cs @@ -1,4 +1,4 @@ -namespace Umbraco.Core.Models +namespace Umbraco.Cms.Core.Models { public class ContentDataIntegrityReportEntry { diff --git a/src/Umbraco.Core/Models/ContentDataIntegrityReportOptions.cs b/src/Umbraco.Core/Models/ContentDataIntegrityReportOptions.cs index c4689467c1..52ea3d4032 100644 --- a/src/Umbraco.Core/Models/ContentDataIntegrityReportOptions.cs +++ b/src/Umbraco.Core/Models/ContentDataIntegrityReportOptions.cs @@ -1,4 +1,4 @@ -namespace Umbraco.Core.Models +namespace Umbraco.Cms.Core.Models { public class ContentDataIntegrityReportOptions { @@ -8,6 +8,6 @@ public bool FixIssues { get; set; } // TODO: We could define all sorts of options for the data integrity check like what to check for, what to fix, etc... - // things like Tag data consistency, etc... + // things like Tag data consistency, etc... } } diff --git a/src/Umbraco.Core/Models/ContentEditing/AssignedContentPermissions.cs b/src/Umbraco.Core/Models/ContentEditing/AssignedContentPermissions.cs index 655a984da0..8b727d65d4 100644 --- a/src/Umbraco.Core/Models/ContentEditing/AssignedContentPermissions.cs +++ b/src/Umbraco.Core/Models/ContentEditing/AssignedContentPermissions.cs @@ -1,7 +1,7 @@ using System.Collections.Generic; using System.Runtime.Serialization; -namespace Umbraco.Web.Models.ContentEditing +namespace Umbraco.Cms.Core.Models.ContentEditing { /// /// The permissions assigned to a content node diff --git a/src/Umbraco.Core/Models/ContentEditing/AssignedUserGroupPermissions.cs b/src/Umbraco.Core/Models/ContentEditing/AssignedUserGroupPermissions.cs index 13366a9596..afd19af028 100644 --- a/src/Umbraco.Core/Models/ContentEditing/AssignedUserGroupPermissions.cs +++ b/src/Umbraco.Core/Models/ContentEditing/AssignedUserGroupPermissions.cs @@ -2,7 +2,7 @@ using System.Linq; using System.Runtime.Serialization; -namespace Umbraco.Web.Models.ContentEditing +namespace Umbraco.Cms.Core.Models.ContentEditing { /// /// The user group permissions assigned to a content node diff --git a/src/Umbraco.Core/Models/ContentEditing/AuditLog.cs b/src/Umbraco.Core/Models/ContentEditing/AuditLog.cs index 9074accdfe..3ade6e864d 100644 --- a/src/Umbraco.Core/Models/ContentEditing/AuditLog.cs +++ b/src/Umbraco.Core/Models/ContentEditing/AuditLog.cs @@ -1,7 +1,7 @@ using System; using System.Runtime.Serialization; -namespace Umbraco.Web.Models.ContentEditing +namespace Umbraco.Cms.Core.Models.ContentEditing { [DataContract(Name = "auditLog", Namespace = "")] public class AuditLog @@ -13,7 +13,7 @@ namespace Umbraco.Web.Models.ContentEditing public string UserName { get; set; } [DataMember(Name = "userAvatars")] - public string[] UserAvatars { get; set; } + public string[] UserAvatars { get; set; } [DataMember(Name = "nodeId")] public int NodeId { get; set; } diff --git a/src/Umbraco.Core/Models/ContentEditing/BackOfficeNotification.cs b/src/Umbraco.Core/Models/ContentEditing/BackOfficeNotification.cs index ffdd26d960..22d97b8a22 100644 --- a/src/Umbraco.Core/Models/ContentEditing/BackOfficeNotification.cs +++ b/src/Umbraco.Core/Models/ContentEditing/BackOfficeNotification.cs @@ -1,6 +1,6 @@ using System.Runtime.Serialization; -namespace Umbraco.Web.Models.ContentEditing +namespace Umbraco.Cms.Core.Models.ContentEditing { [DataContract(Name = "notification", Namespace = "")] public class BackOfficeNotification diff --git a/src/Umbraco.Core/Models/ContentEditing/CodeFileDisplay.cs b/src/Umbraco.Core/Models/ContentEditing/CodeFileDisplay.cs index 2dc50f1936..49dfa9dd22 100644 --- a/src/Umbraco.Core/Models/ContentEditing/CodeFileDisplay.cs +++ b/src/Umbraco.Core/Models/ContentEditing/CodeFileDisplay.cs @@ -2,9 +2,9 @@ using System.ComponentModel; using System.ComponentModel.DataAnnotations; using System.Runtime.Serialization; -using Umbraco.Core; +using Umbraco.Extensions; -namespace Umbraco.Web.Models.ContentEditing +namespace Umbraco.Cms.Core.Models.ContentEditing { [DataContract(Name = "scriptFile", Namespace = "")] public class CodeFileDisplay : INotificationModel, IValidatableObject diff --git a/src/Umbraco.Core/Models/ContentEditing/ContentApp.cs b/src/Umbraco.Core/Models/ContentEditing/ContentApp.cs index 64e4b41186..e40e126c96 100644 --- a/src/Umbraco.Core/Models/ContentEditing/ContentApp.cs +++ b/src/Umbraco.Core/Models/ContentEditing/ContentApp.cs @@ -1,6 +1,6 @@ using System.Runtime.Serialization; -namespace Umbraco.Core.Models.ContentEditing +namespace Umbraco.Cms.Core.Models.ContentEditing { /// /// Represents a content app. diff --git a/src/Umbraco.Core/Models/ContentEditing/ContentAppBadge.cs b/src/Umbraco.Core/Models/ContentEditing/ContentAppBadge.cs index 19dbd2b8e7..4e1089c97b 100644 --- a/src/Umbraco.Core/Models/ContentEditing/ContentAppBadge.cs +++ b/src/Umbraco.Core/Models/ContentEditing/ContentAppBadge.cs @@ -1,6 +1,6 @@ using System.Runtime.Serialization; -namespace Umbraco.Core.Models.ContentEditing +namespace Umbraco.Cms.Core.Models.ContentEditing { /// /// Represents a content app badge diff --git a/src/Umbraco.Core/Models/ContentEditing/ContentAppBadgeType.cs b/src/Umbraco.Core/Models/ContentEditing/ContentAppBadgeType.cs index a46fa7d3a9..9bcadd1383 100644 --- a/src/Umbraco.Core/Models/ContentEditing/ContentAppBadgeType.cs +++ b/src/Umbraco.Core/Models/ContentEditing/ContentAppBadgeType.cs @@ -1,6 +1,6 @@ using System.Runtime.Serialization; -namespace Umbraco.Core.Models.ContentEditing +namespace Umbraco.Cms.Core.Models.ContentEditing { // TODO: This was marked with `[StringEnumConverter]` to inform the serializer // to serialize the values to string instead of INT (which is the default) diff --git a/src/Umbraco.Core/Models/ContentEditing/ContentBaseSave.cs b/src/Umbraco.Core/Models/ContentEditing/ContentBaseSave.cs index a949aa2bd3..b1bebf1731 100644 --- a/src/Umbraco.Core/Models/ContentEditing/ContentBaseSave.cs +++ b/src/Umbraco.Core/Models/ContentEditing/ContentBaseSave.cs @@ -1,10 +1,9 @@ using System.Collections.Generic; using System.ComponentModel.DataAnnotations; using System.Runtime.Serialization; -using Umbraco.Core.Models; -using Umbraco.Core.Models.Editors; +using Umbraco.Cms.Core.Models.Editors; -namespace Umbraco.Web.Models.ContentEditing +namespace Umbraco.Cms.Core.Models.ContentEditing { /// /// A model representing a content item to be saved diff --git a/src/Umbraco.Core/Models/ContentEditing/ContentDomainsAndCulture.cs b/src/Umbraco.Core/Models/ContentEditing/ContentDomainsAndCulture.cs index dfd2cd2344..2b08a340f0 100644 --- a/src/Umbraco.Core/Models/ContentEditing/ContentDomainsAndCulture.cs +++ b/src/Umbraco.Core/Models/ContentEditing/ContentDomainsAndCulture.cs @@ -1,7 +1,7 @@ using System.Collections.Generic; using System.Runtime.Serialization; -namespace Umbraco.Web.Models.ContentEditing +namespace Umbraco.Cms.Core.Models.ContentEditing { [DataContract(Name = "ContentDomainsAndCulture")] public class ContentDomainsAndCulture diff --git a/src/Umbraco.Core/Models/ContentEditing/ContentItemBasic.cs b/src/Umbraco.Core/Models/ContentEditing/ContentItemBasic.cs index 5f5bc3cebd..12dab25a9e 100644 --- a/src/Umbraco.Core/Models/ContentEditing/ContentItemBasic.cs +++ b/src/Umbraco.Core/Models/ContentEditing/ContentItemBasic.cs @@ -4,7 +4,7 @@ using System.ComponentModel.DataAnnotations; using System.Linq; using System.Runtime.Serialization; -namespace Umbraco.Web.Models.ContentEditing +namespace Umbraco.Cms.Core.Models.ContentEditing { /// /// A model representing a basic content item diff --git a/src/Umbraco.Core/Models/ContentEditing/ContentItemDisplay.cs b/src/Umbraco.Core/Models/ContentEditing/ContentItemDisplay.cs index 5840a4df19..7a3f441e0a 100644 --- a/src/Umbraco.Core/Models/ContentEditing/ContentItemDisplay.cs +++ b/src/Umbraco.Core/Models/ContentEditing/ContentItemDisplay.cs @@ -3,12 +3,9 @@ using System.Collections.Generic; using System.ComponentModel; using System.ComponentModel.DataAnnotations; using System.Runtime.Serialization; -using Umbraco.Core; -using Umbraco.Core.Models; -using Umbraco.Core.Models.ContentEditing; -using Umbraco.Web.Routing; +using Umbraco.Cms.Core.Routing; -namespace Umbraco.Web.Models.ContentEditing +namespace Umbraco.Cms.Core.Models.ContentEditing { /// /// A model representing a content item to be displayed in the back office diff --git a/src/Umbraco.Core/Models/ContentEditing/ContentItemDisplayBase.cs b/src/Umbraco.Core/Models/ContentEditing/ContentItemDisplayBase.cs index 98f898aeea..d992e3da9a 100644 --- a/src/Umbraco.Core/Models/ContentEditing/ContentItemDisplayBase.cs +++ b/src/Umbraco.Core/Models/ContentEditing/ContentItemDisplayBase.cs @@ -2,7 +2,7 @@ using System.ComponentModel; using System.Runtime.Serialization; -namespace Umbraco.Web.Models.ContentEditing +namespace Umbraco.Cms.Core.Models.ContentEditing { public abstract class ContentItemDisplayBase : TabbedContentItem, INotificationModel, IErrorModel where T : ContentPropertyBasic diff --git a/src/Umbraco.Core/Models/ContentEditing/ContentItemSave.cs b/src/Umbraco.Core/Models/ContentEditing/ContentItemSave.cs index 0dc1fa5c27..9207a70a0a 100644 --- a/src/Umbraco.Core/Models/ContentEditing/ContentItemSave.cs +++ b/src/Umbraco.Core/Models/ContentEditing/ContentItemSave.cs @@ -1,10 +1,9 @@ using System.Collections.Generic; using System.ComponentModel.DataAnnotations; using System.Runtime.Serialization; -using Umbraco.Core.Models; -using Umbraco.Core.Models.Editors; +using Umbraco.Cms.Core.Models.Editors; -namespace Umbraco.Web.Models.ContentEditing +namespace Umbraco.Cms.Core.Models.ContentEditing { /// /// A model representing a content item to be saved diff --git a/src/Umbraco.Core/Models/ContentEditing/ContentPropertyBasic.cs b/src/Umbraco.Core/Models/ContentEditing/ContentPropertyBasic.cs index 73845f8461..85581dc2e1 100644 --- a/src/Umbraco.Core/Models/ContentEditing/ContentPropertyBasic.cs +++ b/src/Umbraco.Core/Models/ContentEditing/ContentPropertyBasic.cs @@ -2,9 +2,9 @@ using System.ComponentModel; using System.ComponentModel.DataAnnotations; using System.Runtime.Serialization; -using Umbraco.Core.PropertyEditors; +using Umbraco.Cms.Core.PropertyEditors; -namespace Umbraco.Web.Models.ContentEditing +namespace Umbraco.Cms.Core.Models.ContentEditing { /// /// Represents a content property to be saved diff --git a/src/Umbraco.Core/Models/ContentEditing/ContentPropertyCollectionDto.cs b/src/Umbraco.Core/Models/ContentEditing/ContentPropertyCollectionDto.cs index d4c94410fe..3c772c0866 100644 --- a/src/Umbraco.Core/Models/ContentEditing/ContentPropertyCollectionDto.cs +++ b/src/Umbraco.Core/Models/ContentEditing/ContentPropertyCollectionDto.cs @@ -1,7 +1,7 @@ using System.Collections.Generic; using System.Linq; -namespace Umbraco.Web.Models.ContentEditing +namespace Umbraco.Cms.Core.Models.ContentEditing { /// /// Used to map property values when saving content/media/members diff --git a/src/Umbraco.Core/Models/ContentEditing/ContentPropertyDisplay.cs b/src/Umbraco.Core/Models/ContentEditing/ContentPropertyDisplay.cs index 9a07d29a02..fe953850b0 100644 --- a/src/Umbraco.Core/Models/ContentEditing/ContentPropertyDisplay.cs +++ b/src/Umbraco.Core/Models/ContentEditing/ContentPropertyDisplay.cs @@ -2,7 +2,7 @@ using System.ComponentModel.DataAnnotations; using System.Runtime.Serialization; -namespace Umbraco.Web.Models.ContentEditing +namespace Umbraco.Cms.Core.Models.ContentEditing { /// /// Represents a content property that is displayed in the UI diff --git a/src/Umbraco.Core/Models/ContentEditing/ContentPropertyDto.cs b/src/Umbraco.Core/Models/ContentEditing/ContentPropertyDto.cs index 2bf1603bb2..fd24964f27 100644 --- a/src/Umbraco.Core/Models/ContentEditing/ContentPropertyDto.cs +++ b/src/Umbraco.Core/Models/ContentEditing/ContentPropertyDto.cs @@ -1,6 +1,4 @@ -using Umbraco.Core.Models; - -namespace Umbraco.Web.Models.ContentEditing +namespace Umbraco.Cms.Core.Models.ContentEditing { /// /// Represents a content property from the database diff --git a/src/Umbraco.Core/Models/ContentEditing/ContentRedirectUrl.cs b/src/Umbraco.Core/Models/ContentEditing/ContentRedirectUrl.cs index 41fcb98c31..e509ff5db1 100644 --- a/src/Umbraco.Core/Models/ContentEditing/ContentRedirectUrl.cs +++ b/src/Umbraco.Core/Models/ContentEditing/ContentRedirectUrl.cs @@ -1,7 +1,7 @@ using System; using System.Runtime.Serialization; -namespace Umbraco.Web.Models.ContentEditing +namespace Umbraco.Cms.Core.Models.ContentEditing { [DataContract(Name = "contentRedirectUrl", Namespace = "")] public class ContentRedirectUrl diff --git a/src/Umbraco.Core/Models/ContentEditing/ContentSaveAction.cs b/src/Umbraco.Core/Models/ContentEditing/ContentSaveAction.cs index ad5bfe0192..3beb970564 100644 --- a/src/Umbraco.Core/Models/ContentEditing/ContentSaveAction.cs +++ b/src/Umbraco.Core/Models/ContentEditing/ContentSaveAction.cs @@ -1,4 +1,4 @@ -namespace Umbraco.Web.Models.ContentEditing +namespace Umbraco.Cms.Core.Models.ContentEditing { /// /// The action associated with saving a content item diff --git a/src/Umbraco.Core/Models/ContentEditing/ContentSavedState.cs b/src/Umbraco.Core/Models/ContentEditing/ContentSavedState.cs index 2ceb682a13..00fce177b4 100644 --- a/src/Umbraco.Core/Models/ContentEditing/ContentSavedState.cs +++ b/src/Umbraco.Core/Models/ContentEditing/ContentSavedState.cs @@ -1,4 +1,4 @@ -namespace Umbraco.Web.Models.ContentEditing +namespace Umbraco.Cms.Core.Models.ContentEditing { /// /// The saved state of a content item diff --git a/src/Umbraco.Core/Models/ContentEditing/ContentSortOrder.cs b/src/Umbraco.Core/Models/ContentEditing/ContentSortOrder.cs index 86b30652bb..bde99ef661 100644 --- a/src/Umbraco.Core/Models/ContentEditing/ContentSortOrder.cs +++ b/src/Umbraco.Core/Models/ContentEditing/ContentSortOrder.cs @@ -1,11 +1,7 @@ -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations; -using System.Linq; +using System.ComponentModel.DataAnnotations; using System.Runtime.Serialization; -using System.Text; -namespace Umbraco.Web.Models.ContentEditing +namespace Umbraco.Cms.Core.Models.ContentEditing { /// /// A model representing a new sort order for a content/media item diff --git a/src/Umbraco.Core/Models/ContentEditing/ContentTypeBasic.cs b/src/Umbraco.Core/Models/ContentEditing/ContentTypeBasic.cs index f9d633ebea..dc3e455fb0 100644 --- a/src/Umbraco.Core/Models/ContentEditing/ContentTypeBasic.cs +++ b/src/Umbraco.Core/Models/ContentEditing/ContentTypeBasic.cs @@ -3,9 +3,9 @@ using System.Collections.Generic; using System.ComponentModel; using System.ComponentModel.DataAnnotations; using System.Runtime.Serialization; -using Umbraco.Core; +using Umbraco.Extensions; -namespace Umbraco.Web.Models.ContentEditing +namespace Umbraco.Cms.Core.Models.ContentEditing { /// /// A basic version of a content type diff --git a/src/Umbraco.Core/Models/ContentEditing/ContentTypeCompositionDisplay.cs b/src/Umbraco.Core/Models/ContentEditing/ContentTypeCompositionDisplay.cs index 77b5f53b24..0ff43178c9 100644 --- a/src/Umbraco.Core/Models/ContentEditing/ContentTypeCompositionDisplay.cs +++ b/src/Umbraco.Core/Models/ContentEditing/ContentTypeCompositionDisplay.cs @@ -2,7 +2,7 @@ using System.ComponentModel; using System.Runtime.Serialization; -namespace Umbraco.Web.Models.ContentEditing +namespace Umbraco.Cms.Core.Models.ContentEditing { public abstract class ContentTypeCompositionDisplay : ContentTypeBasic, INotificationModel { diff --git a/src/Umbraco.Core/Models/ContentEditing/ContentTypeSave.cs b/src/Umbraco.Core/Models/ContentEditing/ContentTypeSave.cs index 005e3c96a6..a45c4ac4f6 100644 --- a/src/Umbraco.Core/Models/ContentEditing/ContentTypeSave.cs +++ b/src/Umbraco.Core/Models/ContentEditing/ContentTypeSave.cs @@ -2,9 +2,9 @@ using System.ComponentModel.DataAnnotations; using System.Linq; using System.Runtime.Serialization; -using Umbraco.Core; +using Umbraco.Extensions; -namespace Umbraco.Web.Models.ContentEditing +namespace Umbraco.Cms.Core.Models.ContentEditing { /// /// Abstract model used to save content types diff --git a/src/Umbraco.Core/Models/ContentEditing/ContentVariantSave.cs b/src/Umbraco.Core/Models/ContentEditing/ContentVariantSave.cs index 45c30bcd25..cc8e8b9493 100644 --- a/src/Umbraco.Core/Models/ContentEditing/ContentVariantSave.cs +++ b/src/Umbraco.Core/Models/ContentEditing/ContentVariantSave.cs @@ -2,10 +2,9 @@ using System.Collections.Generic; using System.ComponentModel.DataAnnotations; using System.Runtime.Serialization; -using Umbraco.Core.Models; -using Umbraco.Core.Models.Validation; +using Umbraco.Cms.Core.Models.Validation; -namespace Umbraco.Web.Models.ContentEditing +namespace Umbraco.Cms.Core.Models.ContentEditing { [DataContract(Name = "contentVariant", Namespace = "")] public class ContentVariantSave : IContentProperties diff --git a/src/Umbraco.Core/Models/ContentEditing/ContentVariationDisplay.cs b/src/Umbraco.Core/Models/ContentEditing/ContentVariationDisplay.cs index 64491e2270..b1d53c2059 100644 --- a/src/Umbraco.Core/Models/ContentEditing/ContentVariationDisplay.cs +++ b/src/Umbraco.Core/Models/ContentEditing/ContentVariationDisplay.cs @@ -4,7 +4,7 @@ using System.ComponentModel; using System.Linq; using System.Runtime.Serialization; -namespace Umbraco.Web.Models.ContentEditing +namespace Umbraco.Cms.Core.Models.ContentEditing { /// /// Represents the variant info for a content item diff --git a/src/Umbraco.Core/Models/ContentEditing/CreatedDocumentTypeCollectionResult.cs b/src/Umbraco.Core/Models/ContentEditing/CreatedDocumentTypeCollectionResult.cs index cbf23743ba..b1db2759f0 100644 --- a/src/Umbraco.Core/Models/ContentEditing/CreatedDocumentTypeCollectionResult.cs +++ b/src/Umbraco.Core/Models/ContentEditing/CreatedDocumentTypeCollectionResult.cs @@ -1,11 +1,6 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Runtime.Serialization; -using System.Text; -using System.Threading.Tasks; +using System.Runtime.Serialization; -namespace Umbraco.Web.Models.ContentEditing +namespace Umbraco.Cms.Core.Models.ContentEditing { /// /// The result of creating a content type collection in the UI diff --git a/src/Umbraco.Core/Models/ContentEditing/DataTypeBasic.cs b/src/Umbraco.Core/Models/ContentEditing/DataTypeBasic.cs index f5d38f61e6..eb6047103a 100644 --- a/src/Umbraco.Core/Models/ContentEditing/DataTypeBasic.cs +++ b/src/Umbraco.Core/Models/ContentEditing/DataTypeBasic.cs @@ -1,7 +1,7 @@ using System.ComponentModel; using System.Runtime.Serialization; -namespace Umbraco.Web.Models.ContentEditing +namespace Umbraco.Cms.Core.Models.ContentEditing { /// /// The basic data type information diff --git a/src/Umbraco.Core/Models/ContentEditing/DataTypeConfigurationFieldDisplay.cs b/src/Umbraco.Core/Models/ContentEditing/DataTypeConfigurationFieldDisplay.cs index 26d650b02b..72afedb407 100644 --- a/src/Umbraco.Core/Models/ContentEditing/DataTypeConfigurationFieldDisplay.cs +++ b/src/Umbraco.Core/Models/ContentEditing/DataTypeConfigurationFieldDisplay.cs @@ -1,7 +1,7 @@ using System.Collections.Generic; using System.Runtime.Serialization; -namespace Umbraco.Web.Models.ContentEditing +namespace Umbraco.Cms.Core.Models.ContentEditing { /// /// Represents a datatype configuration field model for editing. diff --git a/src/Umbraco.Core/Models/ContentEditing/DataTypeConfigurationFieldSave.cs b/src/Umbraco.Core/Models/ContentEditing/DataTypeConfigurationFieldSave.cs index d480f4c4b7..7f88a7c1f9 100644 --- a/src/Umbraco.Core/Models/ContentEditing/DataTypeConfigurationFieldSave.cs +++ b/src/Umbraco.Core/Models/ContentEditing/DataTypeConfigurationFieldSave.cs @@ -1,6 +1,6 @@ using System.Runtime.Serialization; -namespace Umbraco.Web.Models.ContentEditing +namespace Umbraco.Cms.Core.Models.ContentEditing { /// /// Represents a datatype configuration field model for editing. diff --git a/src/Umbraco.Core/Models/ContentEditing/DataTypeDisplay.cs b/src/Umbraco.Core/Models/ContentEditing/DataTypeDisplay.cs index 65ece0f6aa..a30490582f 100644 --- a/src/Umbraco.Core/Models/ContentEditing/DataTypeDisplay.cs +++ b/src/Umbraco.Core/Models/ContentEditing/DataTypeDisplay.cs @@ -2,7 +2,7 @@ using System.ComponentModel.DataAnnotations; using System.Runtime.Serialization; -namespace Umbraco.Web.Models.ContentEditing +namespace Umbraco.Cms.Core.Models.ContentEditing { /// /// Represents a data type that is being edited diff --git a/src/Umbraco.Core/Models/ContentEditing/DataTypeReferences.cs b/src/Umbraco.Core/Models/ContentEditing/DataTypeReferences.cs index d9cd93e7c8..420b5b5679 100644 --- a/src/Umbraco.Core/Models/ContentEditing/DataTypeReferences.cs +++ b/src/Umbraco.Core/Models/ContentEditing/DataTypeReferences.cs @@ -2,7 +2,7 @@ using System.Linq; using System.Runtime.Serialization; -namespace Umbraco.Web.Models.ContentEditing +namespace Umbraco.Cms.Core.Models.ContentEditing { [DataContract(Name = "dataTypeReferences", Namespace = "")] public class DataTypeReferences diff --git a/src/Umbraco.Core/Models/ContentEditing/DataTypeSave.cs b/src/Umbraco.Core/Models/ContentEditing/DataTypeSave.cs index aa916c7566..b25fa7caa8 100644 --- a/src/Umbraco.Core/Models/ContentEditing/DataTypeSave.cs +++ b/src/Umbraco.Core/Models/ContentEditing/DataTypeSave.cs @@ -1,10 +1,9 @@ using System.Collections.Generic; using System.ComponentModel.DataAnnotations; using System.Runtime.Serialization; -using Umbraco.Core.Models; -using Umbraco.Core.PropertyEditors; +using Umbraco.Cms.Core.PropertyEditors; -namespace Umbraco.Web.Models.ContentEditing +namespace Umbraco.Cms.Core.Models.ContentEditing { /// /// Represents a datatype model for editing. diff --git a/src/Umbraco.Core/Models/ContentEditing/DictionaryDisplay.cs b/src/Umbraco.Core/Models/ContentEditing/DictionaryDisplay.cs index 8b8f53c21a..41e49ba34d 100644 --- a/src/Umbraco.Core/Models/ContentEditing/DictionaryDisplay.cs +++ b/src/Umbraco.Core/Models/ContentEditing/DictionaryDisplay.cs @@ -2,7 +2,7 @@ using System.Collections.Generic; using System.Runtime.Serialization; -namespace Umbraco.Web.Models.ContentEditing +namespace Umbraco.Cms.Core.Models.ContentEditing { /// /// The dictionary display model diff --git a/src/Umbraco.Core/Models/ContentEditing/DictionaryOverviewDisplay.cs b/src/Umbraco.Core/Models/ContentEditing/DictionaryOverviewDisplay.cs index 7941b0ac44..f67163d7a1 100644 --- a/src/Umbraco.Core/Models/ContentEditing/DictionaryOverviewDisplay.cs +++ b/src/Umbraco.Core/Models/ContentEditing/DictionaryOverviewDisplay.cs @@ -1,7 +1,7 @@ using System.Collections.Generic; using System.Runtime.Serialization; -namespace Umbraco.Web.Models.ContentEditing +namespace Umbraco.Cms.Core.Models.ContentEditing { /// /// The dictionary overview display. @@ -28,7 +28,7 @@ namespace Umbraco.Web.Models.ContentEditing /// [DataMember(Name = "id")] public int Id { get; set; } - + /// /// Gets or sets the level. /// diff --git a/src/Umbraco.Core/Models/ContentEditing/DictionaryOverviewTranslationDisplay.cs b/src/Umbraco.Core/Models/ContentEditing/DictionaryOverviewTranslationDisplay.cs index 9f08617921..e5948ecf4a 100644 --- a/src/Umbraco.Core/Models/ContentEditing/DictionaryOverviewTranslationDisplay.cs +++ b/src/Umbraco.Core/Models/ContentEditing/DictionaryOverviewTranslationDisplay.cs @@ -1,6 +1,6 @@ using System.Runtime.Serialization; -namespace Umbraco.Web.Models.ContentEditing +namespace Umbraco.Cms.Core.Models.ContentEditing { /// /// The dictionary translation overview display. diff --git a/src/Umbraco.Core/Models/ContentEditing/DictionarySave.cs b/src/Umbraco.Core/Models/ContentEditing/DictionarySave.cs index e99abd1f80..0e652e7160 100644 --- a/src/Umbraco.Core/Models/ContentEditing/DictionarySave.cs +++ b/src/Umbraco.Core/Models/ContentEditing/DictionarySave.cs @@ -2,7 +2,7 @@ using System.Collections.Generic; using System.Runtime.Serialization; -namespace Umbraco.Web.Models.ContentEditing +namespace Umbraco.Cms.Core.Models.ContentEditing { /// /// Dictionary Save model diff --git a/src/Umbraco.Core/Models/ContentEditing/DictionaryTranslationDisplay.cs b/src/Umbraco.Core/Models/ContentEditing/DictionaryTranslationDisplay.cs index 2437de6ffd..901afaa3bc 100644 --- a/src/Umbraco.Core/Models/ContentEditing/DictionaryTranslationDisplay.cs +++ b/src/Umbraco.Core/Models/ContentEditing/DictionaryTranslationDisplay.cs @@ -1,6 +1,6 @@ using System.Runtime.Serialization; -namespace Umbraco.Web.Models.ContentEditing +namespace Umbraco.Cms.Core.Models.ContentEditing { /// /// @@ -13,6 +13,6 @@ namespace Umbraco.Web.Models.ContentEditing /// Gets or sets the display name. /// [DataMember(Name = "displayName")] - public string DisplayName { get; set; } + public string DisplayName { get; set; } } } diff --git a/src/Umbraco.Core/Models/ContentEditing/DictionaryTranslationSave.cs b/src/Umbraco.Core/Models/ContentEditing/DictionaryTranslationSave.cs index 72a28f633f..00332248e6 100644 --- a/src/Umbraco.Core/Models/ContentEditing/DictionaryTranslationSave.cs +++ b/src/Umbraco.Core/Models/ContentEditing/DictionaryTranslationSave.cs @@ -1,6 +1,6 @@ using System.Runtime.Serialization; -namespace Umbraco.Web.Models.ContentEditing +namespace Umbraco.Cms.Core.Models.ContentEditing { /// /// The dictionary translation save model @@ -11,7 +11,7 @@ namespace Umbraco.Web.Models.ContentEditing /// /// Gets or sets the ISO code. /// - [DataMember(Name = "isoCode")] + [DataMember(Name = "isoCode")] public string IsoCode { get; set; } /// @@ -19,7 +19,7 @@ namespace Umbraco.Web.Models.ContentEditing /// [DataMember(Name = "translation")] public string Translation { get; set; } - + /// /// Gets or sets the language id. /// diff --git a/src/Umbraco.Core/Models/ContentEditing/DocumentTypeDisplay.cs b/src/Umbraco.Core/Models/ContentEditing/DocumentTypeDisplay.cs index dd5818626a..7d45c46600 100644 --- a/src/Umbraco.Core/Models/ContentEditing/DocumentTypeDisplay.cs +++ b/src/Umbraco.Core/Models/ContentEditing/DocumentTypeDisplay.cs @@ -1,8 +1,7 @@ using System.Collections.Generic; using System.Runtime.Serialization; -using Umbraco.Core.Models.ContentEditing; -namespace Umbraco.Web.Models.ContentEditing +namespace Umbraco.Cms.Core.Models.ContentEditing { [DataContract(Name = "contentType", Namespace = "")] public class DocumentTypeDisplay : ContentTypeCompositionDisplay diff --git a/src/Umbraco.Core/Models/ContentEditing/DocumentTypeSave.cs b/src/Umbraco.Core/Models/ContentEditing/DocumentTypeSave.cs index 21164b493b..d446c19273 100644 --- a/src/Umbraco.Core/Models/ContentEditing/DocumentTypeSave.cs +++ b/src/Umbraco.Core/Models/ContentEditing/DocumentTypeSave.cs @@ -2,9 +2,9 @@ using System.ComponentModel.DataAnnotations; using System.Linq; using System.Runtime.Serialization; -using Umbraco.Core; +using Umbraco.Extensions; -namespace Umbraco.Web.Models.ContentEditing +namespace Umbraco.Cms.Core.Models.ContentEditing { /// /// Model used to save a document type diff --git a/src/Umbraco.Core/Models/ContentEditing/DomainDisplay.cs b/src/Umbraco.Core/Models/ContentEditing/DomainDisplay.cs index ea3ea509c9..49ed898f3b 100644 --- a/src/Umbraco.Core/Models/ContentEditing/DomainDisplay.cs +++ b/src/Umbraco.Core/Models/ContentEditing/DomainDisplay.cs @@ -1,10 +1,10 @@ using System.Runtime.Serialization; -namespace Umbraco.Web.Models.ContentEditing +namespace Umbraco.Cms.Core.Models.ContentEditing { [DataContract(Name = "DomainDisplay")] public class DomainDisplay - { + { public DomainDisplay(string name, int lang) { Name = name; diff --git a/src/Umbraco.Core/Models/ContentEditing/DomainSave.cs b/src/Umbraco.Core/Models/ContentEditing/DomainSave.cs index 6853762af3..3f8d836aba 100644 --- a/src/Umbraco.Core/Models/ContentEditing/DomainSave.cs +++ b/src/Umbraco.Core/Models/ContentEditing/DomainSave.cs @@ -1,6 +1,6 @@ using System.Runtime.Serialization; -namespace Umbraco.Web.Models.ContentEditing +namespace Umbraco.Cms.Core.Models.ContentEditing { [DataContract(Name = "DomainSave")] public class DomainSave diff --git a/src/Umbraco.Core/Models/ContentEditing/EditorNavigation.cs b/src/Umbraco.Core/Models/ContentEditing/EditorNavigation.cs index 007c3267cd..a789012fc7 100644 --- a/src/Umbraco.Core/Models/ContentEditing/EditorNavigation.cs +++ b/src/Umbraco.Core/Models/ContentEditing/EditorNavigation.cs @@ -1,6 +1,6 @@ using System.Runtime.Serialization; -namespace Umbraco.Web.Models.ContentEditing +namespace Umbraco.Cms.Core.Models.ContentEditing { /// /// A model representing the navigation ("apps") inside an editor in the back office diff --git a/src/Umbraco.Core/Models/ContentEditing/EntityBasic.cs b/src/Umbraco.Core/Models/ContentEditing/EntityBasic.cs index 946fd2102a..b923beabaf 100644 --- a/src/Umbraco.Core/Models/ContentEditing/EntityBasic.cs +++ b/src/Umbraco.Core/Models/ContentEditing/EntityBasic.cs @@ -3,10 +3,9 @@ using System.Collections.Generic; using System.ComponentModel; using System.ComponentModel.DataAnnotations; using System.Runtime.Serialization; -using Umbraco.Core; -using Umbraco.Core.Models.Validation; +using Umbraco.Cms.Core.Models.Validation; -namespace Umbraco.Web.Models.ContentEditing +namespace Umbraco.Cms.Core.Models.ContentEditing { [DataContract(Name = "entity", Namespace = "")] public class EntityBasic diff --git a/src/Umbraco.Core/Models/ContentEditing/GetAvailableCompositionsFilter.cs b/src/Umbraco.Core/Models/ContentEditing/GetAvailableCompositionsFilter.cs index b1528db697..96ab35d54f 100644 --- a/src/Umbraco.Core/Models/ContentEditing/GetAvailableCompositionsFilter.cs +++ b/src/Umbraco.Core/Models/ContentEditing/GetAvailableCompositionsFilter.cs @@ -1,4 +1,4 @@ -namespace Umbraco.Web.Models.ContentEditing +namespace Umbraco.Cms.Core.Models.ContentEditing { public class GetAvailableCompositionsFilter { diff --git a/src/Umbraco.Core/Models/ContentEditing/IContentAppFactory.cs b/src/Umbraco.Core/Models/ContentEditing/IContentAppFactory.cs index 6b8d90d418..3c0def3c1f 100644 --- a/src/Umbraco.Core/Models/ContentEditing/IContentAppFactory.cs +++ b/src/Umbraco.Core/Models/ContentEditing/IContentAppFactory.cs @@ -1,7 +1,7 @@ using System.Collections.Generic; -using Umbraco.Core.Models.Membership; +using Umbraco.Cms.Core.Models.Membership; -namespace Umbraco.Core.Models.ContentEditing +namespace Umbraco.Cms.Core.Models.ContentEditing { /// /// Represents a content app factory. diff --git a/src/Umbraco.Core/Models/ContentEditing/IContentProperties.cs b/src/Umbraco.Core/Models/ContentEditing/IContentProperties.cs index f57be4a896..ca8b2439c2 100644 --- a/src/Umbraco.Core/Models/ContentEditing/IContentProperties.cs +++ b/src/Umbraco.Core/Models/ContentEditing/IContentProperties.cs @@ -1,7 +1,6 @@ using System.Collections.Generic; -using Umbraco.Core.Models; -namespace Umbraco.Web.Models.ContentEditing +namespace Umbraco.Cms.Core.Models.ContentEditing { public interface IContentProperties diff --git a/src/Umbraco.Core/Models/ContentEditing/IContentSave.cs b/src/Umbraco.Core/Models/ContentEditing/IContentSave.cs index 789b44dadf..dfaf183479 100644 --- a/src/Umbraco.Core/Models/ContentEditing/IContentSave.cs +++ b/src/Umbraco.Core/Models/ContentEditing/IContentSave.cs @@ -1,6 +1,4 @@ -using Umbraco.Core.Models; - -namespace Umbraco.Web.Models.ContentEditing +namespace Umbraco.Cms.Core.Models.ContentEditing { /// /// An interface exposes the shared parts of content, media, members that we use during model binding in order to share logic diff --git a/src/Umbraco.Core/Models/ContentEditing/IErrorModel.cs b/src/Umbraco.Core/Models/ContentEditing/IErrorModel.cs index 606856095f..4352771cac 100644 --- a/src/Umbraco.Core/Models/ContentEditing/IErrorModel.cs +++ b/src/Umbraco.Core/Models/ContentEditing/IErrorModel.cs @@ -1,6 +1,6 @@ using System.Collections.Generic; -namespace Umbraco.Web.Models.ContentEditing +namespace Umbraco.Cms.Core.Models.ContentEditing { public interface IErrorModel { diff --git a/src/Umbraco.Core/Models/ContentEditing/IHaveUploadedFiles.cs b/src/Umbraco.Core/Models/ContentEditing/IHaveUploadedFiles.cs index d8df23b2e6..a1d4198427 100644 --- a/src/Umbraco.Core/Models/ContentEditing/IHaveUploadedFiles.cs +++ b/src/Umbraco.Core/Models/ContentEditing/IHaveUploadedFiles.cs @@ -1,7 +1,7 @@ using System.Collections.Generic; -using Umbraco.Core.Models.Editors; +using Umbraco.Cms.Core.Models.Editors; -namespace Umbraco.Web.Models.ContentEditing +namespace Umbraco.Cms.Core.Models.ContentEditing { public interface IHaveUploadedFiles { diff --git a/src/Umbraco.Core/Models/ContentEditing/INotificationModel.cs b/src/Umbraco.Core/Models/ContentEditing/INotificationModel.cs index 910d47a221..5bc9996f6b 100644 --- a/src/Umbraco.Core/Models/ContentEditing/INotificationModel.cs +++ b/src/Umbraco.Core/Models/ContentEditing/INotificationModel.cs @@ -1,7 +1,7 @@ using System.Collections.Generic; using System.Runtime.Serialization; -namespace Umbraco.Web.Models.ContentEditing +namespace Umbraco.Cms.Core.Models.ContentEditing { public interface INotificationModel { diff --git a/src/Umbraco.Core/Models/ContentEditing/ITabbedContent.cs b/src/Umbraco.Core/Models/ContentEditing/ITabbedContent.cs index 229ca3678d..3f1d847151 100644 --- a/src/Umbraco.Core/Models/ContentEditing/ITabbedContent.cs +++ b/src/Umbraco.Core/Models/ContentEditing/ITabbedContent.cs @@ -1,6 +1,6 @@ using System.Collections.Generic; -namespace Umbraco.Web.Models.ContentEditing +namespace Umbraco.Cms.Core.Models.ContentEditing { public interface ITabbedContent diff --git a/src/Umbraco.Core/Models/ContentEditing/Language.cs b/src/Umbraco.Core/Models/ContentEditing/Language.cs index 75dd07bf09..617b18bb6e 100644 --- a/src/Umbraco.Core/Models/ContentEditing/Language.cs +++ b/src/Umbraco.Core/Models/ContentEditing/Language.cs @@ -2,7 +2,7 @@ using System.ComponentModel.DataAnnotations; using System.Runtime.Serialization; -namespace Umbraco.Web.Models.ContentEditing +namespace Umbraco.Cms.Core.Models.ContentEditing { [DataContract(Name = "language", Namespace = "")] public class Language diff --git a/src/Umbraco.Core/Models/ContentEditing/LinkDisplay.cs b/src/Umbraco.Core/Models/ContentEditing/LinkDisplay.cs index 5b6379288f..69bbd91edc 100644 --- a/src/Umbraco.Core/Models/ContentEditing/LinkDisplay.cs +++ b/src/Umbraco.Core/Models/ContentEditing/LinkDisplay.cs @@ -1,7 +1,6 @@ using System.Runtime.Serialization; -using Umbraco.Core; -namespace Umbraco.Web.Models.ContentEditing +namespace Umbraco.Cms.Core.Models.ContentEditing { [DataContract(Name = "link", Namespace = "")] public class LinkDisplay diff --git a/src/Umbraco.Core/Models/ContentEditing/ListViewAwareContentItemDisplayBase.cs b/src/Umbraco.Core/Models/ContentEditing/ListViewAwareContentItemDisplayBase.cs index 250ec3f633..d3817f9875 100644 --- a/src/Umbraco.Core/Models/ContentEditing/ListViewAwareContentItemDisplayBase.cs +++ b/src/Umbraco.Core/Models/ContentEditing/ListViewAwareContentItemDisplayBase.cs @@ -1,6 +1,6 @@ using System.Runtime.Serialization; -namespace Umbraco.Web.Models.ContentEditing +namespace Umbraco.Cms.Core.Models.ContentEditing { /// /// An abstract model representing a content item that can be contained in a list view diff --git a/src/Umbraco.Core/Models/ContentEditing/MacroDisplay.cs b/src/Umbraco.Core/Models/ContentEditing/MacroDisplay.cs index 55f0d5b89d..d5d363057f 100644 --- a/src/Umbraco.Core/Models/ContentEditing/MacroDisplay.cs +++ b/src/Umbraco.Core/Models/ContentEditing/MacroDisplay.cs @@ -1,7 +1,7 @@ using System.Collections.Generic; using System.Runtime.Serialization; -namespace Umbraco.Web.Models.ContentEditing +namespace Umbraco.Cms.Core.Models.ContentEditing { /// /// The macro display model @@ -46,7 +46,7 @@ namespace Umbraco.Web.Models.ContentEditing [DataMember(Name = "cacheByPage")] public bool CacheByPage { get; set; } - /// + /// /// Gets or sets a value indicating whether the macro should be cached by user /// [DataMember(Name = "cacheByUser")] diff --git a/src/Umbraco.Core/Models/ContentEditing/MacroParameter.cs b/src/Umbraco.Core/Models/ContentEditing/MacroParameter.cs index ed3551449c..19949e9d68 100644 --- a/src/Umbraco.Core/Models/ContentEditing/MacroParameter.cs +++ b/src/Umbraco.Core/Models/ContentEditing/MacroParameter.cs @@ -2,7 +2,7 @@ using System.ComponentModel.DataAnnotations; using System.Runtime.Serialization; -namespace Umbraco.Web.Models.ContentEditing +namespace Umbraco.Cms.Core.Models.ContentEditing { /// /// Represents a macro parameter with an editor diff --git a/src/Umbraco.Core/Models/ContentEditing/MacroParameterDisplay.cs b/src/Umbraco.Core/Models/ContentEditing/MacroParameterDisplay.cs index 866e631dc4..daf793e3c1 100644 --- a/src/Umbraco.Core/Models/ContentEditing/MacroParameterDisplay.cs +++ b/src/Umbraco.Core/Models/ContentEditing/MacroParameterDisplay.cs @@ -1,6 +1,6 @@ using System.Runtime.Serialization; -namespace Umbraco.Web.Models.ContentEditing +namespace Umbraco.Cms.Core.Models.ContentEditing { /// /// The macro parameter display. diff --git a/src/Umbraco.Core/Models/ContentEditing/MediaItemDisplay.cs b/src/Umbraco.Core/Models/ContentEditing/MediaItemDisplay.cs index a1d2a3696f..c20337f68d 100644 --- a/src/Umbraco.Core/Models/ContentEditing/MediaItemDisplay.cs +++ b/src/Umbraco.Core/Models/ContentEditing/MediaItemDisplay.cs @@ -1,8 +1,7 @@ using System.Collections.Generic; using System.Runtime.Serialization; -using Umbraco.Core.Models.ContentEditing; -namespace Umbraco.Web.Models.ContentEditing +namespace Umbraco.Cms.Core.Models.ContentEditing { /// /// A model representing a media item to be displayed in the back office diff --git a/src/Umbraco.Core/Models/ContentEditing/MediaItemSave.cs b/src/Umbraco.Core/Models/ContentEditing/MediaItemSave.cs index d983077fa2..06c201ab67 100644 --- a/src/Umbraco.Core/Models/ContentEditing/MediaItemSave.cs +++ b/src/Umbraco.Core/Models/ContentEditing/MediaItemSave.cs @@ -1,7 +1,6 @@ using System.Runtime.Serialization; -using Umbraco.Core.Models; -namespace Umbraco.Web.Models.ContentEditing +namespace Umbraco.Cms.Core.Models.ContentEditing { /// /// A model representing a media item to be saved diff --git a/src/Umbraco.Core/Models/ContentEditing/MediaTypeDisplay.cs b/src/Umbraco.Core/Models/ContentEditing/MediaTypeDisplay.cs index ea0393336c..2c7c50550d 100644 --- a/src/Umbraco.Core/Models/ContentEditing/MediaTypeDisplay.cs +++ b/src/Umbraco.Core/Models/ContentEditing/MediaTypeDisplay.cs @@ -1,6 +1,6 @@ using System.Runtime.Serialization; -namespace Umbraco.Web.Models.ContentEditing +namespace Umbraco.Cms.Core.Models.ContentEditing { [DataContract(Name = "contentType", Namespace = "")] public class MediaTypeDisplay : ContentTypeCompositionDisplay diff --git a/src/Umbraco.Core/Models/ContentEditing/MediaTypeSave.cs b/src/Umbraco.Core/Models/ContentEditing/MediaTypeSave.cs index 3e3a64740b..1ef2a1988b 100644 --- a/src/Umbraco.Core/Models/ContentEditing/MediaTypeSave.cs +++ b/src/Umbraco.Core/Models/ContentEditing/MediaTypeSave.cs @@ -1,6 +1,6 @@ using System.Runtime.Serialization; -namespace Umbraco.Web.Models.ContentEditing +namespace Umbraco.Cms.Core.Models.ContentEditing { /// /// Model used to save a media type diff --git a/src/Umbraco.Core/Models/ContentEditing/MemberBasic.cs b/src/Umbraco.Core/Models/ContentEditing/MemberBasic.cs index 2352fd46ca..376e758573 100644 --- a/src/Umbraco.Core/Models/ContentEditing/MemberBasic.cs +++ b/src/Umbraco.Core/Models/ContentEditing/MemberBasic.cs @@ -1,7 +1,7 @@ using System.Collections.Generic; using System.Runtime.Serialization; -namespace Umbraco.Web.Models.ContentEditing +namespace Umbraco.Cms.Core.Models.ContentEditing { /// /// Used for basic member information diff --git a/src/Umbraco.Core/Models/ContentEditing/MemberDisplay.cs b/src/Umbraco.Core/Models/ContentEditing/MemberDisplay.cs index 0a5caeccc7..c422b226e3 100644 --- a/src/Umbraco.Core/Models/ContentEditing/MemberDisplay.cs +++ b/src/Umbraco.Core/Models/ContentEditing/MemberDisplay.cs @@ -1,8 +1,7 @@ using System.Collections.Generic; using System.Runtime.Serialization; -using Umbraco.Core.Models.ContentEditing; -namespace Umbraco.Web.Models.ContentEditing +namespace Umbraco.Cms.Core.Models.ContentEditing { /// /// A model representing a member to be displayed in the back office diff --git a/src/Umbraco.Core/Models/ContentEditing/MemberGroupDisplay.cs b/src/Umbraco.Core/Models/ContentEditing/MemberGroupDisplay.cs index 55239700a4..2d930727aa 100644 --- a/src/Umbraco.Core/Models/ContentEditing/MemberGroupDisplay.cs +++ b/src/Umbraco.Core/Models/ContentEditing/MemberGroupDisplay.cs @@ -1,7 +1,7 @@ using System.Collections.Generic; using System.Runtime.Serialization; -namespace Umbraco.Web.Models.ContentEditing +namespace Umbraco.Cms.Core.Models.ContentEditing { [DataContract(Name = "memberGroup", Namespace = "")] public class MemberGroupDisplay : EntityBasic, INotificationModel diff --git a/src/Umbraco.Core/Models/ContentEditing/MemberGroupSave.cs b/src/Umbraco.Core/Models/ContentEditing/MemberGroupSave.cs index ed5c8de40f..2b863a758d 100644 --- a/src/Umbraco.Core/Models/ContentEditing/MemberGroupSave.cs +++ b/src/Umbraco.Core/Models/ContentEditing/MemberGroupSave.cs @@ -1,6 +1,6 @@ using System.Runtime.Serialization; -namespace Umbraco.Web.Models.ContentEditing +namespace Umbraco.Cms.Core.Models.ContentEditing { [DataContract(Name = "memberGroup", Namespace = "")] public class MemberGroupSave : EntityBasic diff --git a/src/Umbraco.Core/Models/ContentEditing/MemberListDisplay.cs b/src/Umbraco.Core/Models/ContentEditing/MemberListDisplay.cs index 4783e2b992..cad4fa9af9 100644 --- a/src/Umbraco.Core/Models/ContentEditing/MemberListDisplay.cs +++ b/src/Umbraco.Core/Models/ContentEditing/MemberListDisplay.cs @@ -1,8 +1,7 @@ using System.Collections.Generic; using System.Runtime.Serialization; -using Umbraco.Core.Models.ContentEditing; -namespace Umbraco.Web.Models.ContentEditing +namespace Umbraco.Cms.Core.Models.ContentEditing { /// /// A model representing a member list to be displayed in the back office diff --git a/src/Umbraco.Core/Models/ContentEditing/MemberPropertyTypeBasic.cs b/src/Umbraco.Core/Models/ContentEditing/MemberPropertyTypeBasic.cs index f3fe7a262c..b25f2ae5c8 100644 --- a/src/Umbraco.Core/Models/ContentEditing/MemberPropertyTypeBasic.cs +++ b/src/Umbraco.Core/Models/ContentEditing/MemberPropertyTypeBasic.cs @@ -1,6 +1,6 @@ using System.Runtime.Serialization; -namespace Umbraco.Web.Models.ContentEditing +namespace Umbraco.Cms.Core.Models.ContentEditing { /// /// Basic member property type diff --git a/src/Umbraco.Core/Models/ContentEditing/MemberPropertyTypeDisplay.cs b/src/Umbraco.Core/Models/ContentEditing/MemberPropertyTypeDisplay.cs index e5612f5247..873883c8db 100644 --- a/src/Umbraco.Core/Models/ContentEditing/MemberPropertyTypeDisplay.cs +++ b/src/Umbraco.Core/Models/ContentEditing/MemberPropertyTypeDisplay.cs @@ -1,6 +1,6 @@ using System.Runtime.Serialization; -namespace Umbraco.Web.Models.ContentEditing +namespace Umbraco.Cms.Core.Models.ContentEditing { [DataContract(Name = "propertyType")] public class MemberPropertyTypeDisplay : PropertyTypeDisplay diff --git a/src/Umbraco.Core/Models/ContentEditing/MemberSave.cs b/src/Umbraco.Core/Models/ContentEditing/MemberSave.cs index 8bba20f7bd..6b5c0096a0 100644 --- a/src/Umbraco.Core/Models/ContentEditing/MemberSave.cs +++ b/src/Umbraco.Core/Models/ContentEditing/MemberSave.cs @@ -2,11 +2,10 @@ using System.ComponentModel.DataAnnotations; using System.Linq; using System.Runtime.Serialization; -using Umbraco.Core; -using Umbraco.Core.Models; -using Umbraco.Core.Models.Validation; +using Umbraco.Cms.Core.Models.Validation; +using Umbraco.Extensions; -namespace Umbraco.Web.Models.ContentEditing +namespace Umbraco.Cms.Core.Models.ContentEditing { /// public class MemberSave : ContentBaseSave diff --git a/src/Umbraco.Core/Models/ContentEditing/MemberTypeDisplay.cs b/src/Umbraco.Core/Models/ContentEditing/MemberTypeDisplay.cs index fdecbce57f..67e390f378 100644 --- a/src/Umbraco.Core/Models/ContentEditing/MemberTypeDisplay.cs +++ b/src/Umbraco.Core/Models/ContentEditing/MemberTypeDisplay.cs @@ -1,6 +1,6 @@ using System.Runtime.Serialization; -namespace Umbraco.Web.Models.ContentEditing +namespace Umbraco.Cms.Core.Models.ContentEditing { [DataContract(Name = "contentType", Namespace = "")] public class MemberTypeDisplay : ContentTypeCompositionDisplay diff --git a/src/Umbraco.Core/Models/ContentEditing/MemberTypeSave.cs b/src/Umbraco.Core/Models/ContentEditing/MemberTypeSave.cs index b7def40e11..80ac46ae09 100644 --- a/src/Umbraco.Core/Models/ContentEditing/MemberTypeSave.cs +++ b/src/Umbraco.Core/Models/ContentEditing/MemberTypeSave.cs @@ -1,4 +1,4 @@ -namespace Umbraco.Web.Models.ContentEditing +namespace Umbraco.Cms.Core.Models.ContentEditing { /// /// Model used to save a member type diff --git a/src/Umbraco.Core/Models/ContentEditing/MessagesExtensions.cs b/src/Umbraco.Core/Models/ContentEditing/MessagesExtensions.cs index 0f9a1dc500..0026dcc21e 100644 --- a/src/Umbraco.Core/Models/ContentEditing/MessagesExtensions.cs +++ b/src/Umbraco.Core/Models/ContentEditing/MessagesExtensions.cs @@ -1,7 +1,7 @@ using System.Linq; -using Umbraco.Core; +using Umbraco.Cms.Core.Models.ContentEditing; -namespace Umbraco.Web.Models.ContentEditing +namespace Umbraco.Extensions { public static class MessagesExtensions { diff --git a/src/Umbraco.Core/Models/ContentEditing/ModelWithNotifications.cs b/src/Umbraco.Core/Models/ContentEditing/ModelWithNotifications.cs index 2cf34e029d..d79be81725 100644 --- a/src/Umbraco.Core/Models/ContentEditing/ModelWithNotifications.cs +++ b/src/Umbraco.Core/Models/ContentEditing/ModelWithNotifications.cs @@ -1,7 +1,7 @@ using System.Collections.Generic; using System.Runtime.Serialization; -namespace Umbraco.Web.Models.ContentEditing +namespace Umbraco.Cms.Core.Models.ContentEditing { /// /// A generic model supporting notifications, this is useful for returning any model type to include notifications from api controllers diff --git a/src/Umbraco.Core/Models/ContentEditing/MoveOrCopy.cs b/src/Umbraco.Core/Models/ContentEditing/MoveOrCopy.cs index a36e2f37be..c27cf70ccf 100644 --- a/src/Umbraco.Core/Models/ContentEditing/MoveOrCopy.cs +++ b/src/Umbraco.Core/Models/ContentEditing/MoveOrCopy.cs @@ -1,10 +1,7 @@ -using System; -using System.ComponentModel.DataAnnotations; -using System.Linq; +using System.ComponentModel.DataAnnotations; using System.Runtime.Serialization; -using System.Text; -namespace Umbraco.Web.Models.ContentEditing +namespace Umbraco.Cms.Core.Models.ContentEditing { /// /// A model representing a model for moving or copying diff --git a/src/Umbraco.Core/Models/ContentEditing/NotificationStyle.cs b/src/Umbraco.Core/Models/ContentEditing/NotificationStyle.cs index ade66a2888..aeda314f4c 100644 --- a/src/Umbraco.Core/Models/ContentEditing/NotificationStyle.cs +++ b/src/Umbraco.Core/Models/ContentEditing/NotificationStyle.cs @@ -1,4 +1,4 @@ -namespace Umbraco.Web.Models.ContentEditing +namespace Umbraco.Cms.Core.Models.ContentEditing { public enum NotificationStyle { diff --git a/src/Umbraco.Core/Models/ContentEditing/NotifySetting.cs b/src/Umbraco.Core/Models/ContentEditing/NotifySetting.cs index 14e4c1cf0d..11ddfc0ca0 100644 --- a/src/Umbraco.Core/Models/ContentEditing/NotifySetting.cs +++ b/src/Umbraco.Core/Models/ContentEditing/NotifySetting.cs @@ -1,5 +1,6 @@ using System.Runtime.Serialization; -namespace Umbraco.Web.Models.ContentEditing + +namespace Umbraco.Cms.Core.Models.ContentEditing { [DataContract(Name = "notifySetting", Namespace = "")] public class NotifySetting diff --git a/src/Umbraco.Core/Models/ContentEditing/ObjectType.cs b/src/Umbraco.Core/Models/ContentEditing/ObjectType.cs index 522b0c666b..6b7192ad68 100644 --- a/src/Umbraco.Core/Models/ContentEditing/ObjectType.cs +++ b/src/Umbraco.Core/Models/ContentEditing/ObjectType.cs @@ -1,7 +1,7 @@ using System; using System.Runtime.Serialization; -namespace Umbraco.Web.Models.ContentEditing +namespace Umbraco.Cms.Core.Models.ContentEditing { [DataContract(Name = "objectType", Namespace = "")] public class ObjectType diff --git a/src/Umbraco.Core/Models/ContentEditing/Permission.cs b/src/Umbraco.Core/Models/ContentEditing/Permission.cs index 2bb905200a..90bfd86bd2 100644 --- a/src/Umbraco.Core/Models/ContentEditing/Permission.cs +++ b/src/Umbraco.Core/Models/ContentEditing/Permission.cs @@ -1,7 +1,7 @@ using System; using System.Runtime.Serialization; -namespace Umbraco.Web.Models.ContentEditing +namespace Umbraco.Cms.Core.Models.ContentEditing { [DataContract(Name = "permission", Namespace = "")] public class Permission : ICloneable diff --git a/src/Umbraco.Core/Models/ContentEditing/PostedFiles.cs b/src/Umbraco.Core/Models/ContentEditing/PostedFiles.cs index e0ec347b45..69029c961a 100644 --- a/src/Umbraco.Core/Models/ContentEditing/PostedFiles.cs +++ b/src/Umbraco.Core/Models/ContentEditing/PostedFiles.cs @@ -1,8 +1,8 @@ using System.Collections.Generic; using System.Runtime.Serialization; -using Umbraco.Core.Models.Editors; +using Umbraco.Cms.Core.Models.Editors; -namespace Umbraco.Web.Models.ContentEditing +namespace Umbraco.Cms.Core.Models.ContentEditing { /// /// This is used for the response of PostAddFile so that we can analyze the response in a filter and remove the diff --git a/src/Umbraco.Core/Models/ContentEditing/PostedFolder.cs b/src/Umbraco.Core/Models/ContentEditing/PostedFolder.cs index 35cd908787..ea5217c1a8 100644 --- a/src/Umbraco.Core/Models/ContentEditing/PostedFolder.cs +++ b/src/Umbraco.Core/Models/ContentEditing/PostedFolder.cs @@ -1,6 +1,6 @@ using System.Runtime.Serialization; -namespace Umbraco.Web.Models.ContentEditing +namespace Umbraco.Cms.Core.Models.ContentEditing { /// /// Used to create a folder with the MediaController @@ -14,4 +14,4 @@ namespace Umbraco.Web.Models.ContentEditing [DataMember(Name = "name")] public string Name { get; set; } } -} \ No newline at end of file +} diff --git a/src/Umbraco.Core/Models/ContentEditing/PropertyEditorBasic.cs b/src/Umbraco.Core/Models/ContentEditing/PropertyEditorBasic.cs index 241af35819..7c71cb4a63 100644 --- a/src/Umbraco.Core/Models/ContentEditing/PropertyEditorBasic.cs +++ b/src/Umbraco.Core/Models/ContentEditing/PropertyEditorBasic.cs @@ -1,7 +1,6 @@ -using System; -using System.Runtime.Serialization; +using System.Runtime.Serialization; -namespace Umbraco.Web.Models.ContentEditing +namespace Umbraco.Cms.Core.Models.ContentEditing { /// /// Defines an available property editor to be able to select for a data type diff --git a/src/Umbraco.Core/Models/ContentEditing/PropertyGroupBasic.cs b/src/Umbraco.Core/Models/ContentEditing/PropertyGroupBasic.cs index a516dbd1d5..0bea10a476 100644 --- a/src/Umbraco.Core/Models/ContentEditing/PropertyGroupBasic.cs +++ b/src/Umbraco.Core/Models/ContentEditing/PropertyGroupBasic.cs @@ -2,7 +2,7 @@ using System.ComponentModel.DataAnnotations; using System.Runtime.Serialization; -namespace Umbraco.Web.Models.ContentEditing +namespace Umbraco.Cms.Core.Models.ContentEditing { [DataContract(Name = "propertyGroup", Namespace = "")] public abstract class PropertyGroupBasic diff --git a/src/Umbraco.Core/Models/ContentEditing/PropertyGroupDisplay.cs b/src/Umbraco.Core/Models/ContentEditing/PropertyGroupDisplay.cs index 1523daacda..6c4d234abe 100644 --- a/src/Umbraco.Core/Models/ContentEditing/PropertyGroupDisplay.cs +++ b/src/Umbraco.Core/Models/ContentEditing/PropertyGroupDisplay.cs @@ -2,7 +2,7 @@ using System.ComponentModel; using System.Runtime.Serialization; -namespace Umbraco.Web.Models.ContentEditing +namespace Umbraco.Cms.Core.Models.ContentEditing { [DataContract(Name = "propertyGroup", Namespace = "")] public class PropertyGroupDisplay : PropertyGroupBasic diff --git a/src/Umbraco.Core/Models/ContentEditing/PropertyTypeBasic.cs b/src/Umbraco.Core/Models/ContentEditing/PropertyTypeBasic.cs index 793e4e391d..3b2a3aa37b 100644 --- a/src/Umbraco.Core/Models/ContentEditing/PropertyTypeBasic.cs +++ b/src/Umbraco.Core/Models/ContentEditing/PropertyTypeBasic.cs @@ -3,7 +3,7 @@ using System.ComponentModel; using System.ComponentModel.DataAnnotations; using System.Runtime.Serialization; -namespace Umbraco.Web.Models.ContentEditing +namespace Umbraco.Cms.Core.Models.ContentEditing { [DataContract(Name = "propertyType")] public class PropertyTypeBasic diff --git a/src/Umbraco.Core/Models/ContentEditing/PropertyTypeDisplay.cs b/src/Umbraco.Core/Models/ContentEditing/PropertyTypeDisplay.cs index d3878bfeba..20a8cbe2e8 100644 --- a/src/Umbraco.Core/Models/ContentEditing/PropertyTypeDisplay.cs +++ b/src/Umbraco.Core/Models/ContentEditing/PropertyTypeDisplay.cs @@ -2,7 +2,7 @@ using System.ComponentModel; using System.Runtime.Serialization; -namespace Umbraco.Web.Models.ContentEditing +namespace Umbraco.Cms.Core.Models.ContentEditing { [DataContract(Name = "propertyType")] public class PropertyTypeDisplay : PropertyTypeBasic diff --git a/src/Umbraco.Core/Models/ContentEditing/PropertyTypeValidation.cs b/src/Umbraco.Core/Models/ContentEditing/PropertyTypeValidation.cs index a45af12341..17c71eb479 100644 --- a/src/Umbraco.Core/Models/ContentEditing/PropertyTypeValidation.cs +++ b/src/Umbraco.Core/Models/ContentEditing/PropertyTypeValidation.cs @@ -1,6 +1,6 @@ using System.Runtime.Serialization; -namespace Umbraco.Web.Models.ContentEditing +namespace Umbraco.Cms.Core.Models.ContentEditing { /// /// An object representing the property type validation settings diff --git a/src/Umbraco.Core/Models/ContentEditing/PublicAccess.cs b/src/Umbraco.Core/Models/ContentEditing/PublicAccess.cs index dcf2dcae92..c0678ea9d9 100644 --- a/src/Umbraco.Core/Models/ContentEditing/PublicAccess.cs +++ b/src/Umbraco.Core/Models/ContentEditing/PublicAccess.cs @@ -1,6 +1,6 @@ using System.Runtime.Serialization; -namespace Umbraco.Web.Models.ContentEditing +namespace Umbraco.Cms.Core.Models.ContentEditing { [DataContract(Name = "publicAccess", Namespace = "")] public class PublicAccess diff --git a/src/Umbraco.Core/Models/ContentEditing/RedirectUrlSearchResults.cs b/src/Umbraco.Core/Models/ContentEditing/RedirectUrlSearchResults.cs index 8833bfdbf6..ba5616371b 100644 --- a/src/Umbraco.Core/Models/ContentEditing/RedirectUrlSearchResults.cs +++ b/src/Umbraco.Core/Models/ContentEditing/RedirectUrlSearchResults.cs @@ -1,8 +1,7 @@ using System.Collections.Generic; using System.Runtime.Serialization; -using Umbraco.Core.Models; -namespace Umbraco.Web.Models.ContentEditing +namespace Umbraco.Cms.Core.Models.ContentEditing { [DataContract(Name = "redirectUrlSearchResult", Namespace = "")] public class RedirectUrlSearchResult diff --git a/src/Umbraco.Core/Models/ContentEditing/RelationDisplay.cs b/src/Umbraco.Core/Models/ContentEditing/RelationDisplay.cs index 24ebabc615..61b9b3f39b 100644 --- a/src/Umbraco.Core/Models/ContentEditing/RelationDisplay.cs +++ b/src/Umbraco.Core/Models/ContentEditing/RelationDisplay.cs @@ -2,7 +2,7 @@ using System.ComponentModel; using System.Runtime.Serialization; -namespace Umbraco.Web.Models.ContentEditing +namespace Umbraco.Cms.Core.Models.ContentEditing { [DataContract(Name = "relation", Namespace = "")] public class RelationDisplay diff --git a/src/Umbraco.Core/Models/ContentEditing/RelationTypeDisplay.cs b/src/Umbraco.Core/Models/ContentEditing/RelationTypeDisplay.cs index 1d31f8a0de..27f0f525df 100644 --- a/src/Umbraco.Core/Models/ContentEditing/RelationTypeDisplay.cs +++ b/src/Umbraco.Core/Models/ContentEditing/RelationTypeDisplay.cs @@ -3,7 +3,7 @@ using System.Collections.Generic; using System.ComponentModel; using System.Runtime.Serialization; -namespace Umbraco.Web.Models.ContentEditing +namespace Umbraco.Cms.Core.Models.ContentEditing { [DataContract(Name = "relationType", Namespace = "")] public class RelationTypeDisplay : EntityBasic, INotificationModel diff --git a/src/Umbraco.Core/Models/ContentEditing/RelationTypeSave.cs b/src/Umbraco.Core/Models/ContentEditing/RelationTypeSave.cs index 434cf1de89..b72a03eec4 100644 --- a/src/Umbraco.Core/Models/ContentEditing/RelationTypeSave.cs +++ b/src/Umbraco.Core/Models/ContentEditing/RelationTypeSave.cs @@ -1,7 +1,7 @@ using System; using System.Runtime.Serialization; -namespace Umbraco.Web.Models.ContentEditing +namespace Umbraco.Cms.Core.Models.ContentEditing { [DataContract(Name = "relationType", Namespace = "")] public class RelationTypeSave : EntityBasic diff --git a/src/Umbraco.Core/Models/ContentEditing/RichTextEditorCommand.cs b/src/Umbraco.Core/Models/ContentEditing/RichTextEditorCommand.cs index 9eb7b57bba..f5c757ad9d 100644 --- a/src/Umbraco.Core/Models/ContentEditing/RichTextEditorCommand.cs +++ b/src/Umbraco.Core/Models/ContentEditing/RichTextEditorCommand.cs @@ -1,13 +1,13 @@ using System.Runtime.Serialization; -namespace Umbraco.Web.Models.ContentEditing +namespace Umbraco.Cms.Core.Models.ContentEditing { [DataContract(Name = "richtexteditorcommand", Namespace = "")] public class RichTextEditorCommand { [DataMember(Name = "name")] public string Name { get; set; } - + [DataMember(Name = "alias")] public string Alias { get; set; } diff --git a/src/Umbraco.Core/Models/ContentEditing/RichTextEditorConfiguration.cs b/src/Umbraco.Core/Models/ContentEditing/RichTextEditorConfiguration.cs index 65ed5a2f7a..c239d5e70c 100644 --- a/src/Umbraco.Core/Models/ContentEditing/RichTextEditorConfiguration.cs +++ b/src/Umbraco.Core/Models/ContentEditing/RichTextEditorConfiguration.cs @@ -1,7 +1,7 @@ using System.Collections.Generic; using System.Runtime.Serialization; -namespace Umbraco.Web.Models.ContentEditing +namespace Umbraco.Cms.Core.Models.ContentEditing { [DataContract(Name = "richtexteditorconfiguration", Namespace = "")] public class RichTextEditorConfiguration diff --git a/src/Umbraco.Core/Models/ContentEditing/RichTextEditorPlugin.cs b/src/Umbraco.Core/Models/ContentEditing/RichTextEditorPlugin.cs index a3ce9e508c..4e8fde56df 100644 --- a/src/Umbraco.Core/Models/ContentEditing/RichTextEditorPlugin.cs +++ b/src/Umbraco.Core/Models/ContentEditing/RichTextEditorPlugin.cs @@ -1,11 +1,6 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Runtime.Serialization; -using System.Text; -using System.Threading.Tasks; +using System.Runtime.Serialization; -namespace Umbraco.Web.Models.ContentEditing +namespace Umbraco.Cms.Core.Models.ContentEditing { [DataContract(Name = "richtexteditorplugin", Namespace = "")] public class RichTextEditorPlugin diff --git a/src/Umbraco.Core/Models/ContentEditing/RollbackVersion.cs b/src/Umbraco.Core/Models/ContentEditing/RollbackVersion.cs index dad1341a8c..3b7342a67b 100644 --- a/src/Umbraco.Core/Models/ContentEditing/RollbackVersion.cs +++ b/src/Umbraco.Core/Models/ContentEditing/RollbackVersion.cs @@ -1,7 +1,7 @@ using System; using System.Runtime.Serialization; -namespace Umbraco.Web.Models.ContentEditing +namespace Umbraco.Cms.Core.Models.ContentEditing { [DataContract(Name = "rollbackVersion", Namespace = "")] public class RollbackVersion diff --git a/src/Umbraco.Core/Models/ContentEditing/SearchResult.cs b/src/Umbraco.Core/Models/ContentEditing/SearchResult.cs index 1cdd539165..d7de53baeb 100644 --- a/src/Umbraco.Core/Models/ContentEditing/SearchResult.cs +++ b/src/Umbraco.Core/Models/ContentEditing/SearchResult.cs @@ -1,7 +1,7 @@ using System.Collections.Generic; using System.Runtime.Serialization; -namespace Umbraco.Web.Models.ContentEditing +namespace Umbraco.Cms.Core.Models.ContentEditing { [DataContract(Name = "result", Namespace = "")] public class SearchResult diff --git a/src/Umbraco.Core/Models/ContentEditing/SearchResultEntity.cs b/src/Umbraco.Core/Models/ContentEditing/SearchResultEntity.cs index 45360d9464..5307e06e67 100644 --- a/src/Umbraco.Core/Models/ContentEditing/SearchResultEntity.cs +++ b/src/Umbraco.Core/Models/ContentEditing/SearchResultEntity.cs @@ -1,6 +1,6 @@ using System.Runtime.Serialization; -namespace Umbraco.Web.Models.ContentEditing +namespace Umbraco.Cms.Core.Models.ContentEditing { [DataContract(Name = "searchResult", Namespace = "")] public class SearchResultEntity : EntityBasic diff --git a/src/Umbraco.Core/Models/ContentEditing/SearchResults.cs b/src/Umbraco.Core/Models/ContentEditing/SearchResults.cs index f791d55cab..4c76fff108 100644 --- a/src/Umbraco.Core/Models/ContentEditing/SearchResults.cs +++ b/src/Umbraco.Core/Models/ContentEditing/SearchResults.cs @@ -2,7 +2,7 @@ using System.Linq; using System.Runtime.Serialization; -namespace Umbraco.Web.Models.ContentEditing +namespace Umbraco.Cms.Core.Models.ContentEditing { [DataContract(Name = "results", Namespace = "")] public class SearchResults diff --git a/src/Umbraco.Core/Models/ContentEditing/Section.cs b/src/Umbraco.Core/Models/ContentEditing/Section.cs index b51bbf249f..d62125ade8 100644 --- a/src/Umbraco.Core/Models/ContentEditing/Section.cs +++ b/src/Umbraco.Core/Models/ContentEditing/Section.cs @@ -1,6 +1,6 @@ using System.Runtime.Serialization; -namespace Umbraco.Web.Models.ContentEditing +namespace Umbraco.Cms.Core.Models.ContentEditing { /// /// Represents a section (application) in the back office diff --git a/src/Umbraco.Core/Models/ContentEditing/SimpleNotificationModel.cs b/src/Umbraco.Core/Models/ContentEditing/SimpleNotificationModel.cs index 6b74ba5e0a..1c01a3153c 100644 --- a/src/Umbraco.Core/Models/ContentEditing/SimpleNotificationModel.cs +++ b/src/Umbraco.Core/Models/ContentEditing/SimpleNotificationModel.cs @@ -1,7 +1,7 @@ using System.Collections.Generic; using System.Runtime.Serialization; -namespace Umbraco.Web.Models.ContentEditing +namespace Umbraco.Cms.Core.Models.ContentEditing { [DataContract(Name = "notificationModel", Namespace = "")] public class SimpleNotificationModel : INotificationModel diff --git a/src/Umbraco.Core/Models/ContentEditing/SnippetDisplay.cs b/src/Umbraco.Core/Models/ContentEditing/SnippetDisplay.cs index e05f8c5c89..db24cef2ad 100644 --- a/src/Umbraco.Core/Models/ContentEditing/SnippetDisplay.cs +++ b/src/Umbraco.Core/Models/ContentEditing/SnippetDisplay.cs @@ -1,6 +1,6 @@ using System.Runtime.Serialization; -namespace Umbraco.Web.Models.ContentEditing +namespace Umbraco.Cms.Core.Models.ContentEditing { [DataContract(Name = "scriptFile", Namespace = "")] public class SnippetDisplay diff --git a/src/Umbraco.Core/Models/ContentEditing/StyleSheet.cs b/src/Umbraco.Core/Models/ContentEditing/StyleSheet.cs index 3daf8d8323..c4794e5536 100644 --- a/src/Umbraco.Core/Models/ContentEditing/StyleSheet.cs +++ b/src/Umbraco.Core/Models/ContentEditing/StyleSheet.cs @@ -1,10 +1,6 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Runtime.Serialization; -using System.Text; +using System.Runtime.Serialization; -namespace Umbraco.Web.Models.ContentEditing +namespace Umbraco.Cms.Core.Models.ContentEditing { [DataContract(Name = "stylesheet", Namespace = "")] public class Stylesheet diff --git a/src/Umbraco.Core/Models/ContentEditing/StylesheetRule.cs b/src/Umbraco.Core/Models/ContentEditing/StylesheetRule.cs index b3212445ae..81f7c0fcea 100644 --- a/src/Umbraco.Core/Models/ContentEditing/StylesheetRule.cs +++ b/src/Umbraco.Core/Models/ContentEditing/StylesheetRule.cs @@ -1,11 +1,6 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Runtime.Serialization; -using System.Text; -using System.Threading.Tasks; +using System.Runtime.Serialization; -namespace Umbraco.Web.Models.ContentEditing +namespace Umbraco.Cms.Core.Models.ContentEditing { [DataContract(Name = "stylesheetRule", Namespace = "")] public class StylesheetRule diff --git a/src/Umbraco.Core/Models/ContentEditing/Tab.cs b/src/Umbraco.Core/Models/ContentEditing/Tab.cs index 758317606c..5971162575 100644 --- a/src/Umbraco.Core/Models/ContentEditing/Tab.cs +++ b/src/Umbraco.Core/Models/ContentEditing/Tab.cs @@ -1,7 +1,7 @@ using System.Collections.Generic; using System.Runtime.Serialization; -namespace Umbraco.Web.Models.ContentEditing +namespace Umbraco.Cms.Core.Models.ContentEditing { /// /// Represents a tab in the UI diff --git a/src/Umbraco.Core/Models/ContentEditing/TabbedContentItem.cs b/src/Umbraco.Core/Models/ContentEditing/TabbedContentItem.cs index 60b282ecac..2695d01c7a 100644 --- a/src/Umbraco.Core/Models/ContentEditing/TabbedContentItem.cs +++ b/src/Umbraco.Core/Models/ContentEditing/TabbedContentItem.cs @@ -3,7 +3,7 @@ using System.Collections.Generic; using System.Linq; using System.Runtime.Serialization; -namespace Umbraco.Web.Models.ContentEditing +namespace Umbraco.Cms.Core.Models.ContentEditing { public abstract class TabbedContentItem : ContentItemBasic, ITabbedContent where T : ContentPropertyBasic { diff --git a/src/Umbraco.Core/Models/ContentEditing/TemplateDisplay.cs b/src/Umbraco.Core/Models/ContentEditing/TemplateDisplay.cs index b752aa1af2..e73f36c189 100644 --- a/src/Umbraco.Core/Models/ContentEditing/TemplateDisplay.cs +++ b/src/Umbraco.Core/Models/ContentEditing/TemplateDisplay.cs @@ -3,7 +3,7 @@ using System.Collections.Generic; using System.ComponentModel.DataAnnotations; using System.Runtime.Serialization; -namespace Umbraco.Web.Models.ContentEditing +namespace Umbraco.Cms.Core.Models.ContentEditing { [DataContract(Name = "template", Namespace = "")] public class TemplateDisplay : INotificationModel diff --git a/src/Umbraco.Core/Models/ContentEditing/TreeSearchResult.cs b/src/Umbraco.Core/Models/ContentEditing/TreeSearchResult.cs index 820f3bae70..e5b21ce893 100644 --- a/src/Umbraco.Core/Models/ContentEditing/TreeSearchResult.cs +++ b/src/Umbraco.Core/Models/ContentEditing/TreeSearchResult.cs @@ -1,7 +1,7 @@ using System.Collections.Generic; using System.Runtime.Serialization; -namespace Umbraco.Web.Models.ContentEditing +namespace Umbraco.Cms.Core.Models.ContentEditing { /// /// Represents a search result by entity type diff --git a/src/Umbraco.Core/Models/ContentEditing/UmbracoEntityTypes.cs b/src/Umbraco.Core/Models/ContentEditing/UmbracoEntityTypes.cs index fcf7271673..7e8cf39ffd 100644 --- a/src/Umbraco.Core/Models/ContentEditing/UmbracoEntityTypes.cs +++ b/src/Umbraco.Core/Models/ContentEditing/UmbracoEntityTypes.cs @@ -1,7 +1,4 @@ -using System; -using System.ComponentModel; - -namespace Umbraco.Web.Models.ContentEditing +namespace Umbraco.Cms.Core.Models.ContentEditing { /// /// Represents the type's of Umbraco entities that can be resolved from the EntityController @@ -52,7 +49,7 @@ namespace Umbraco.Web.Models.ContentEditing /// Member Group /// MemberGroup, - + /// /// "Media Type /// diff --git a/src/Umbraco.Core/Models/ContentEditing/UnpublishContent.cs b/src/Umbraco.Core/Models/ContentEditing/UnpublishContent.cs index 22cb43f467..0dff38eefd 100644 --- a/src/Umbraco.Core/Models/ContentEditing/UnpublishContent.cs +++ b/src/Umbraco.Core/Models/ContentEditing/UnpublishContent.cs @@ -1,11 +1,6 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Runtime.Serialization; -using System.Text; -using System.Threading.Tasks; +using System.Runtime.Serialization; -namespace Umbraco.Web.Models.ContentEditing +namespace Umbraco.Cms.Core.Models.ContentEditing { /// /// Used to unpublish content and variants diff --git a/src/Umbraco.Core/Models/ContentEditing/UrlAndAnchors.cs b/src/Umbraco.Core/Models/ContentEditing/UrlAndAnchors.cs index 86642a8d65..0e8c711e83 100644 --- a/src/Umbraco.Core/Models/ContentEditing/UrlAndAnchors.cs +++ b/src/Umbraco.Core/Models/ContentEditing/UrlAndAnchors.cs @@ -1,7 +1,7 @@ using System.Collections.Generic; using System.Runtime.Serialization; -namespace Umbraco.Web.Models.ContentEditing +namespace Umbraco.Cms.Core.Models.ContentEditing { [DataContract(Name = "urlAndAnchors", Namespace = "")] public class UrlAndAnchors diff --git a/src/Umbraco.Core/Models/ContentEditing/UserBasic.cs b/src/Umbraco.Core/Models/ContentEditing/UserBasic.cs index 9a48a8243e..e67d3bae6e 100644 --- a/src/Umbraco.Core/Models/ContentEditing/UserBasic.cs +++ b/src/Umbraco.Core/Models/ContentEditing/UserBasic.cs @@ -2,9 +2,9 @@ using System.Collections.Generic; using System.ComponentModel; using System.Runtime.Serialization; -using Umbraco.Core.Models.Membership; +using Umbraco.Cms.Core.Models.Membership; -namespace Umbraco.Web.Models.ContentEditing +namespace Umbraco.Cms.Core.Models.ContentEditing { /// /// The user model used for paging and listing users in the UI diff --git a/src/Umbraco.Core/Models/ContentEditing/UserDetail.cs b/src/Umbraco.Core/Models/ContentEditing/UserDetail.cs index 3bcff43fa2..c655ba1875 100644 --- a/src/Umbraco.Core/Models/ContentEditing/UserDetail.cs +++ b/src/Umbraco.Core/Models/ContentEditing/UserDetail.cs @@ -3,7 +3,7 @@ using System.ComponentModel; using System.ComponentModel.DataAnnotations; using System.Runtime.Serialization; -namespace Umbraco.Web.Models.ContentEditing +namespace Umbraco.Cms.Core.Models.ContentEditing { /// /// Represents information for the current user diff --git a/src/Umbraco.Core/Models/ContentEditing/UserDisplay.cs b/src/Umbraco.Core/Models/ContentEditing/UserDisplay.cs index 312095e1d1..f16ad854e6 100644 --- a/src/Umbraco.Core/Models/ContentEditing/UserDisplay.cs +++ b/src/Umbraco.Core/Models/ContentEditing/UserDisplay.cs @@ -3,7 +3,7 @@ using System.Collections.Generic; using System.ComponentModel; using System.Runtime.Serialization; -namespace Umbraco.Web.Models.ContentEditing +namespace Umbraco.Cms.Core.Models.ContentEditing { /// /// Represents a user that is being edited diff --git a/src/Umbraco.Core/Models/ContentEditing/UserGroupBasic.cs b/src/Umbraco.Core/Models/ContentEditing/UserGroupBasic.cs index 3d959e0d32..e4c76b699e 100644 --- a/src/Umbraco.Core/Models/ContentEditing/UserGroupBasic.cs +++ b/src/Umbraco.Core/Models/ContentEditing/UserGroupBasic.cs @@ -2,7 +2,7 @@ using System.Linq; using System.Runtime.Serialization; -namespace Umbraco.Web.Models.ContentEditing +namespace Umbraco.Cms.Core.Models.ContentEditing { [DataContract(Name = "userGroup", Namespace = "")] public class UserGroupBasic : EntityBasic, INotificationModel diff --git a/src/Umbraco.Core/Models/ContentEditing/UserGroupDisplay.cs b/src/Umbraco.Core/Models/ContentEditing/UserGroupDisplay.cs index 62f1df305b..2e570df9dd 100644 --- a/src/Umbraco.Core/Models/ContentEditing/UserGroupDisplay.cs +++ b/src/Umbraco.Core/Models/ContentEditing/UserGroupDisplay.cs @@ -2,7 +2,7 @@ using System.Linq; using System.Runtime.Serialization; -namespace Umbraco.Web.Models.ContentEditing +namespace Umbraco.Cms.Core.Models.ContentEditing { [DataContract(Name = "userGroup", Namespace = "")] public class UserGroupDisplay : UserGroupBasic diff --git a/src/Umbraco.Core/Models/ContentEditing/UserGroupPermissionsSave.cs b/src/Umbraco.Core/Models/ContentEditing/UserGroupPermissionsSave.cs index 4c9a751573..ae5b4805a7 100644 --- a/src/Umbraco.Core/Models/ContentEditing/UserGroupPermissionsSave.cs +++ b/src/Umbraco.Core/Models/ContentEditing/UserGroupPermissionsSave.cs @@ -2,9 +2,9 @@ using System.ComponentModel.DataAnnotations; using System.Linq; using System.Runtime.Serialization; -using Umbraco.Core; +using Umbraco.Extensions; -namespace Umbraco.Web.Models.ContentEditing +namespace Umbraco.Cms.Core.Models.ContentEditing { /// /// Used to assign user group permissions to a content node diff --git a/src/Umbraco.Core/Models/ContentEditing/UserGroupSave.cs b/src/Umbraco.Core/Models/ContentEditing/UserGroupSave.cs index 1b2bb710a2..7d24378494 100644 --- a/src/Umbraco.Core/Models/ContentEditing/UserGroupSave.cs +++ b/src/Umbraco.Core/Models/ContentEditing/UserGroupSave.cs @@ -2,10 +2,10 @@ using System.ComponentModel.DataAnnotations; using System.Linq; using System.Runtime.Serialization; -using Umbraco.Core; -using Umbraco.Core.Models.Membership; +using Umbraco.Cms.Core.Models.Membership; +using Umbraco.Extensions; -namespace Umbraco.Web.Models.ContentEditing +namespace Umbraco.Cms.Core.Models.ContentEditing { [DataContract(Name = "userGroup", Namespace = "")] public class UserGroupSave : EntityBasic, IValidatableObject diff --git a/src/Umbraco.Core/Models/ContentEditing/UserInvite.cs b/src/Umbraco.Core/Models/ContentEditing/UserInvite.cs index bf2a84fbbe..6eb5c12ddf 100644 --- a/src/Umbraco.Core/Models/ContentEditing/UserInvite.cs +++ b/src/Umbraco.Core/Models/ContentEditing/UserInvite.cs @@ -4,10 +4,10 @@ using System.Linq; using System.Runtime.Serialization; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Options; -using Umbraco.Core; -using Umbraco.Core.Configuration.Models; +using Umbraco.Cms.Core.Configuration.Models; +using Umbraco.Extensions; -namespace Umbraco.Web.Models.ContentEditing +namespace Umbraco.Cms.Core.Models.ContentEditing { /// /// Represents the data used to invite a user diff --git a/src/Umbraco.Core/Models/ContentEditing/UserProfile.cs b/src/Umbraco.Core/Models/ContentEditing/UserProfile.cs index 18981ece64..314e0cfc09 100644 --- a/src/Umbraco.Core/Models/ContentEditing/UserProfile.cs +++ b/src/Umbraco.Core/Models/ContentEditing/UserProfile.cs @@ -2,7 +2,7 @@ using System.ComponentModel.DataAnnotations; using System.Runtime.Serialization; -namespace Umbraco.Web.Models.ContentEditing +namespace Umbraco.Cms.Core.Models.ContentEditing { /// /// A bare minimum structure that represents a user, usually attached to other objects diff --git a/src/Umbraco.Core/Models/ContentEditing/UserSave.cs b/src/Umbraco.Core/Models/ContentEditing/UserSave.cs index 427340700d..ad8ef40a17 100644 --- a/src/Umbraco.Core/Models/ContentEditing/UserSave.cs +++ b/src/Umbraco.Core/Models/ContentEditing/UserSave.cs @@ -2,9 +2,8 @@ using System.Collections.Generic; using System.ComponentModel.DataAnnotations; using System.Linq; using System.Runtime.Serialization; -using Umbraco.Core.Models; -namespace Umbraco.Web.Models.ContentEditing +namespace Umbraco.Cms.Core.Models.ContentEditing { /// /// Represents the data used to persist a user diff --git a/src/Umbraco.Core/Models/ContentModel.cs b/src/Umbraco.Core/Models/ContentModel.cs index 9e4a9a3024..e62f51fd16 100644 --- a/src/Umbraco.Core/Models/ContentModel.cs +++ b/src/Umbraco.Core/Models/ContentModel.cs @@ -1,7 +1,7 @@ -using System; -using Umbraco.Core.Models.PublishedContent; +using System; +using Umbraco.Cms.Core.Models.PublishedContent; -namespace Umbraco.Web.Models +namespace Umbraco.Cms.Core.Models { /// /// Represents the model for the current Umbraco view. @@ -11,12 +11,7 @@ namespace Umbraco.Web.Models /// /// Initializes a new instance of the class with a content. /// - /// - public ContentModel(IPublishedContent content) - { - if (content == null) throw new ArgumentNullException(nameof(content)); - Content = content; - } + public ContentModel(IPublishedContent content) => Content = content ?? throw new ArgumentNullException(nameof(content)); /// /// Gets the content. diff --git a/src/Umbraco.Core/Models/ContentModelOfTContent.cs b/src/Umbraco.Core/Models/ContentModelOfTContent.cs index bf4d81dbf3..ab882342b5 100644 --- a/src/Umbraco.Core/Models/ContentModelOfTContent.cs +++ b/src/Umbraco.Core/Models/ContentModelOfTContent.cs @@ -1,6 +1,6 @@ -using Umbraco.Core.Models.PublishedContent; +using Umbraco.Cms.Core.Models.PublishedContent; -namespace Umbraco.Web.Models +namespace Umbraco.Cms.Core.Models { public class ContentModel : ContentModel where TContent : IPublishedContent @@ -8,12 +8,8 @@ namespace Umbraco.Web.Models /// /// Initializes a new instance of the class with a content. /// - /// public ContentModel(TContent content) - : base(content) - { - Content = content; - } + : base(content) => Content = content; /// /// Gets the content. diff --git a/src/Umbraco.Core/Models/ContentRepositoryExtensions.cs b/src/Umbraco.Core/Models/ContentRepositoryExtensions.cs index b94a3e9610..a50890bee0 100644 --- a/src/Umbraco.Core/Models/ContentRepositoryExtensions.cs +++ b/src/Umbraco.Core/Models/ContentRepositoryExtensions.cs @@ -1,8 +1,9 @@ using System; using System.Collections.Generic; using System.Linq; +using Umbraco.Cms.Core.Models; -namespace Umbraco.Core.Models +namespace Umbraco.Extensions { /// /// Extension methods used to manipulate content variations by the document repository diff --git a/src/Umbraco.Core/Models/ContentSchedule.cs b/src/Umbraco.Core/Models/ContentSchedule.cs index 4dba0456b0..ce4686a7b1 100644 --- a/src/Umbraco.Core/Models/ContentSchedule.cs +++ b/src/Umbraco.Core/Models/ContentSchedule.cs @@ -1,7 +1,8 @@ using System; using System.Runtime.Serialization; +using Umbraco.Extensions; -namespace Umbraco.Core.Models +namespace Umbraco.Cms.Core.Models { /// /// Represents a scheduled action for a document. diff --git a/src/Umbraco.Core/Models/ContentScheduleAction.cs b/src/Umbraco.Core/Models/ContentScheduleAction.cs index 0816f17731..03be526814 100644 --- a/src/Umbraco.Core/Models/ContentScheduleAction.cs +++ b/src/Umbraco.Core/Models/ContentScheduleAction.cs @@ -1,4 +1,4 @@ -namespace Umbraco.Core.Models +namespace Umbraco.Cms.Core.Models { /// /// Defines scheduled actions for documents. diff --git a/src/Umbraco.Core/Models/ContentScheduleCollection.cs b/src/Umbraco.Core/Models/ContentScheduleCollection.cs index 0ebcc0fe4b..34e1dcea3f 100644 --- a/src/Umbraco.Core/Models/ContentScheduleCollection.cs +++ b/src/Umbraco.Core/Models/ContentScheduleCollection.cs @@ -1,10 +1,10 @@ using System; -using System.Linq; using System.Collections.Generic; -using System.Collections.ObjectModel; using System.Collections.Specialized; +using System.Linq; +using Umbraco.Extensions; -namespace Umbraco.Core.Models +namespace Umbraco.Cms.Core.Models { public class ContentScheduleCollection : INotifyCollectionChanged, IDeepCloneable, IEquatable { diff --git a/src/Umbraco.Core/Models/ContentStatus.cs b/src/Umbraco.Core/Models/ContentStatus.cs index 1d35844874..15d5d59861 100644 --- a/src/Umbraco.Core/Models/ContentStatus.cs +++ b/src/Umbraco.Core/Models/ContentStatus.cs @@ -1,7 +1,7 @@ using System; using System.Runtime.Serialization; -namespace Umbraco.Core.Models +namespace Umbraco.Cms.Core.Models { /// /// Describes the states of a document, with regard to (schedule) publishing. @@ -14,7 +14,7 @@ namespace Umbraco.Core.Models // Unpublished (add release date)-> AwaitingRelease (release)-> Published (expire)-> Expired /// - /// The document is not trashed, and not published. + /// The document is not trashed, and not published. /// [EnumMember] Unpublished, diff --git a/src/Umbraco.Core/Models/ContentTagsExtensions.cs b/src/Umbraco.Core/Models/ContentTagsExtensions.cs index 60f0cc69fb..ed9d1fad12 100644 --- a/src/Umbraco.Core/Models/ContentTagsExtensions.cs +++ b/src/Umbraco.Core/Models/ContentTagsExtensions.cs @@ -1,10 +1,11 @@ using System; using System.Collections.Generic; -using Umbraco.Core.PropertyEditors; -using Umbraco.Core.Serialization; -using Umbraco.Core.Services; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Core.PropertyEditors; +using Umbraco.Cms.Core.Serialization; +using Umbraco.Cms.Core.Services; -namespace Umbraco.Core.Models +namespace Umbraco.Extensions { /// /// Provides extension methods for the class, to manage tags. diff --git a/src/Umbraco.Core/Models/ContentType.cs b/src/Umbraco.Core/Models/ContentType.cs index 364544e464..9a0e1a6854 100644 --- a/src/Umbraco.Core/Models/ContentType.cs +++ b/src/Umbraco.Core/Models/ContentType.cs @@ -1,11 +1,11 @@ using System; using System.Collections.Generic; using System.Linq; -using System.Reflection; using System.Runtime.Serialization; -using Umbraco.Core.Strings; +using Umbraco.Cms.Core.Strings; +using Umbraco.Extensions; -namespace Umbraco.Core.Models +namespace Umbraco.Cms.Core.Models { /// /// Represents the content type that a object is based on @@ -65,7 +65,7 @@ namespace Umbraco.Core.Models get { return AllowedTemplates.FirstOrDefault(x => x != null && x.Id == DefaultTemplateId); } } - + [DataMember] public int DefaultTemplateId { diff --git a/src/Umbraco.Core/Models/ContentTypeAvailableCompositionsResult.cs b/src/Umbraco.Core/Models/ContentTypeAvailableCompositionsResult.cs index 6bf1f28907..529ae0bbe6 100644 --- a/src/Umbraco.Core/Models/ContentTypeAvailableCompositionsResult.cs +++ b/src/Umbraco.Core/Models/ContentTypeAvailableCompositionsResult.cs @@ -1,4 +1,4 @@ -namespace Umbraco.Core.Models +namespace Umbraco.Cms.Core.Models { /// /// Used when determining available compositions for a given content type diff --git a/src/Umbraco.Core/Models/ContentTypeAvailableCompositionsResults.cs b/src/Umbraco.Core/Models/ContentTypeAvailableCompositionsResults.cs index 3d863d83c1..180552cd74 100644 --- a/src/Umbraco.Core/Models/ContentTypeAvailableCompositionsResults.cs +++ b/src/Umbraco.Core/Models/ContentTypeAvailableCompositionsResults.cs @@ -1,7 +1,7 @@ using System.Collections.Generic; using System.Linq; -namespace Umbraco.Core.Models +namespace Umbraco.Cms.Core.Models { /// /// Used when determining available compositions for a given content type diff --git a/src/Umbraco.Core/Models/ContentTypeBase.cs b/src/Umbraco.Core/Models/ContentTypeBase.cs index cb1531d739..2bda8d5751 100644 --- a/src/Umbraco.Core/Models/ContentTypeBase.cs +++ b/src/Umbraco.Core/Models/ContentTypeBase.cs @@ -4,10 +4,11 @@ using System.Collections.Specialized; using System.Diagnostics; using System.Linq; using System.Runtime.Serialization; -using Umbraco.Core.Models.Entities; -using Umbraco.Core.Strings; +using Umbraco.Cms.Core.Models.Entities; +using Umbraco.Cms.Core.Strings; +using Umbraco.Extensions; -namespace Umbraco.Core.Models +namespace Umbraco.Cms.Core.Models { /// /// Represents an abstract class for base ContentType properties and methods diff --git a/src/Umbraco.Core/Models/ContentTypeBaseExtensions.cs b/src/Umbraco.Core/Models/ContentTypeBaseExtensions.cs index 35c7b8e164..d771efa12b 100644 --- a/src/Umbraco.Core/Models/ContentTypeBaseExtensions.cs +++ b/src/Umbraco.Core/Models/ContentTypeBaseExtensions.cs @@ -1,10 +1,9 @@ -using System; -using System.Collections.Generic; +using System.Collections.Generic; using System.Linq; -using Umbraco.Core.Models.Entities; -using Umbraco.Core.Models.PublishedContent; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Core.Models.PublishedContent; -namespace Umbraco.Core.Models +namespace Umbraco.Extensions { /// /// Provides extensions methods for . diff --git a/src/Umbraco.Core/Models/ContentTypeCompositionBase.cs b/src/Umbraco.Core/Models/ContentTypeCompositionBase.cs index 0f37b2ecab..bfe6bae659 100644 --- a/src/Umbraco.Core/Models/ContentTypeCompositionBase.cs +++ b/src/Umbraco.Core/Models/ContentTypeCompositionBase.cs @@ -2,10 +2,10 @@ using System.Collections.Generic; using System.Linq; using System.Runtime.Serialization; -using Umbraco.Core.Exceptions; -using Umbraco.Core.Strings; +using Umbraco.Cms.Core.Exceptions; +using Umbraco.Cms.Core.Strings; -namespace Umbraco.Core.Models +namespace Umbraco.Cms.Core.Models { /// /// Represents an abstract class for composition specific ContentType properties and methods diff --git a/src/Umbraco.Core/Models/ContentTypeImportModel.cs b/src/Umbraco.Core/Models/ContentTypeImportModel.cs index f6f7988ba7..46f091f039 100644 --- a/src/Umbraco.Core/Models/ContentTypeImportModel.cs +++ b/src/Umbraco.Core/Models/ContentTypeImportModel.cs @@ -1,8 +1,8 @@ using System.Collections.Generic; using System.Runtime.Serialization; -using Umbraco.Web.Models.ContentEditing; +using Umbraco.Cms.Core.Models.ContentEditing; -namespace Umbraco.Web.Models +namespace Umbraco.Cms.Core.Models { [DataContract(Name = "contentTypeImportModel")] public class ContentTypeImportModel : INotificationModel diff --git a/src/Umbraco.Core/Models/ContentTypeSort.cs b/src/Umbraco.Core/Models/ContentTypeSort.cs index d5b58084b1..fb595ef43f 100644 --- a/src/Umbraco.Core/Models/ContentTypeSort.cs +++ b/src/Umbraco.Core/Models/ContentTypeSort.cs @@ -1,7 +1,7 @@ using System; -using Umbraco.Core.Models.Entities; +using Umbraco.Cms.Core.Models.Entities; -namespace Umbraco.Core.Models +namespace Umbraco.Cms.Core.Models { /// /// Represents a POCO for setting sort order on a ContentType reference diff --git a/src/Umbraco.Core/Models/ContentVariation.cs b/src/Umbraco.Core/Models/ContentVariation.cs index 486f0e54f2..00c7f197a8 100644 --- a/src/Umbraco.Core/Models/ContentVariation.cs +++ b/src/Umbraco.Core/Models/ContentVariation.cs @@ -1,6 +1,6 @@ using System; -namespace Umbraco.Core.Models +namespace Umbraco.Cms.Core.Models { /// /// Indicates how values can vary. diff --git a/src/Umbraco.Core/Models/CultureImpact.cs b/src/Umbraco.Core/Models/CultureImpact.cs index eeb7fa82a3..1f8e938c63 100644 --- a/src/Umbraco.Core/Models/CultureImpact.cs +++ b/src/Umbraco.Core/Models/CultureImpact.cs @@ -1,7 +1,8 @@ using System; using System.Linq; +using Umbraco.Extensions; -namespace Umbraco.Core.Models +namespace Umbraco.Cms.Core.Models { /// /// Represents the impact of a culture set. diff --git a/src/Umbraco.Core/Models/DataType.cs b/src/Umbraco.Core/Models/DataType.cs index b9fe055d4d..b60c3b85fb 100644 --- a/src/Umbraco.Core/Models/DataType.cs +++ b/src/Umbraco.Core/Models/DataType.cs @@ -1,11 +1,11 @@ using System; using System.Collections.Generic; using System.Runtime.Serialization; -using Umbraco.Core.Models.Entities; -using Umbraco.Core.PropertyEditors; -using Umbraco.Core.Serialization; +using Umbraco.Cms.Core.Models.Entities; +using Umbraco.Cms.Core.PropertyEditors; +using Umbraco.Cms.Core.Serialization; -namespace Umbraco.Core.Models +namespace Umbraco.Cms.Core.Models { /// /// Implements . diff --git a/src/Umbraco.Core/Models/DataTypeExtensions.cs b/src/Umbraco.Core/Models/DataTypeExtensions.cs index 4f4bd4d6c3..a7bef7b9a9 100644 --- a/src/Umbraco.Core/Models/DataTypeExtensions.cs +++ b/src/Umbraco.Core/Models/DataTypeExtensions.cs @@ -1,10 +1,9 @@ using System; using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; +using Umbraco.Cms.Core; +using Umbraco.Cms.Core.Models; -namespace Umbraco.Core.Models +namespace Umbraco.Extensions { /// /// Provides extensions methods for . diff --git a/src/Umbraco.Core/Models/DeepCloneHelper.cs b/src/Umbraco.Core/Models/DeepCloneHelper.cs index 453b455d4b..ab8f323e7d 100644 --- a/src/Umbraco.Core/Models/DeepCloneHelper.cs +++ b/src/Umbraco.Core/Models/DeepCloneHelper.cs @@ -4,9 +4,9 @@ using System.Collections.Concurrent; using System.Collections.Generic; using System.Linq; using System.Reflection; -using Umbraco.Core.Composing; +using Umbraco.Cms.Core.Composing; -namespace Umbraco.Core.Models +namespace Umbraco.Cms.Core.Models { public static class DeepCloneHelper { diff --git a/src/Umbraco.Core/Models/DictionaryItem.cs b/src/Umbraco.Core/Models/DictionaryItem.cs index c23e8f86a4..2bd4d3db6f 100644 --- a/src/Umbraco.Core/Models/DictionaryItem.cs +++ b/src/Umbraco.Core/Models/DictionaryItem.cs @@ -2,9 +2,10 @@ using System.Collections.Generic; using System.Linq; using System.Runtime.Serialization; -using Umbraco.Core.Models.Entities; +using Umbraco.Cms.Core.Models.Entities; +using Umbraco.Extensions; -namespace Umbraco.Core.Models +namespace Umbraco.Cms.Core.Models { /// /// Represents a Dictionary Item diff --git a/src/Umbraco.Core/Models/DictionaryItemExtensions.cs b/src/Umbraco.Core/Models/DictionaryItemExtensions.cs index edcf15dd88..ba0a655c75 100644 --- a/src/Umbraco.Core/Models/DictionaryItemExtensions.cs +++ b/src/Umbraco.Core/Models/DictionaryItemExtensions.cs @@ -1,6 +1,7 @@ using System.Linq; +using Umbraco.Cms.Core.Models; -namespace Umbraco.Core.Models +namespace Umbraco.Extensions { public static class DictionaryItemExtensions { diff --git a/src/Umbraco.Core/Models/DictionaryTranslation.cs b/src/Umbraco.Core/Models/DictionaryTranslation.cs index a00f9e887f..22833882f7 100644 --- a/src/Umbraco.Core/Models/DictionaryTranslation.cs +++ b/src/Umbraco.Core/Models/DictionaryTranslation.cs @@ -1,8 +1,8 @@ using System; using System.Runtime.Serialization; -using Umbraco.Core.Models.Entities; +using Umbraco.Cms.Core.Models.Entities; -namespace Umbraco.Core.Models +namespace Umbraco.Cms.Core.Models { /// /// Represents a translation for a diff --git a/src/Umbraco.Core/Models/DoNotCloneAttribute.cs b/src/Umbraco.Core/Models/DoNotCloneAttribute.cs index 5cce9777cb..39a7bcd900 100644 --- a/src/Umbraco.Core/Models/DoNotCloneAttribute.cs +++ b/src/Umbraco.Core/Models/DoNotCloneAttribute.cs @@ -1,6 +1,6 @@ using System; -namespace Umbraco.Core.Models +namespace Umbraco.Cms.Core.Models { /// /// Used to attribute properties that have a setter and are a reference type diff --git a/src/Umbraco.Core/Models/Editors/ContentPropertyData.cs b/src/Umbraco.Core/Models/Editors/ContentPropertyData.cs index c51b1c4f51..548691ab50 100644 --- a/src/Umbraco.Core/Models/Editors/ContentPropertyData.cs +++ b/src/Umbraco.Core/Models/Editors/ContentPropertyData.cs @@ -1,6 +1,6 @@ using System; -namespace Umbraco.Core.Models.Editors +namespace Umbraco.Cms.Core.Models.Editors { /// /// Represents data that has been submitted to be saved for a content property diff --git a/src/Umbraco.Core/Models/Editors/ContentPropertyFile.cs b/src/Umbraco.Core/Models/Editors/ContentPropertyFile.cs index f27feba8cf..9c1806cf08 100644 --- a/src/Umbraco.Core/Models/Editors/ContentPropertyFile.cs +++ b/src/Umbraco.Core/Models/Editors/ContentPropertyFile.cs @@ -1,4 +1,4 @@ -namespace Umbraco.Core.Models.Editors +namespace Umbraco.Cms.Core.Models.Editors { /// @@ -22,7 +22,7 @@ public string Segment { get; set; } /// - /// An array of metadata that is parsed out from the file info posted to the server which is set on the client. + /// An array of metadata that is parsed out from the file info posted to the server which is set on the client. /// /// /// This can be used for property types like Nested Content that need to have special unique identifiers for each file since there might be multiple files diff --git a/src/Umbraco.Core/Models/Editors/UmbracoEntityReference.cs b/src/Umbraco.Core/Models/Editors/UmbracoEntityReference.cs index fa7fb398f0..acd56f5642 100644 --- a/src/Umbraco.Core/Models/Editors/UmbracoEntityReference.cs +++ b/src/Umbraco.Core/Models/Editors/UmbracoEntityReference.cs @@ -1,7 +1,7 @@ using System; using System.Collections.Generic; -namespace Umbraco.Core.Models.Editors +namespace Umbraco.Cms.Core.Models.Editors { /// /// Used to track reference to other entities in a property value diff --git a/src/Umbraco.Core/Models/EmailMessage.cs b/src/Umbraco.Core/Models/EmailMessage.cs index 11483e1b20..964e6e81ec 100644 --- a/src/Umbraco.Core/Models/EmailMessage.cs +++ b/src/Umbraco.Core/Models/EmailMessage.cs @@ -1,6 +1,6 @@ using System; -namespace Umbraco.Core.Models +namespace Umbraco.Cms.Core.Models { public class EmailMessage { diff --git a/src/Umbraco.Core/Models/Entities/BeingDirty.cs b/src/Umbraco.Core/Models/Entities/BeingDirty.cs index 92b4ab5c4b..7128e0ca65 100644 --- a/src/Umbraco.Core/Models/Entities/BeingDirty.cs +++ b/src/Umbraco.Core/Models/Entities/BeingDirty.cs @@ -1,6 +1,6 @@ using System.Collections.Generic; -namespace Umbraco.Core.Models.Entities +namespace Umbraco.Cms.Core.Models.Entities { /// /// Provides a concrete implementation of . diff --git a/src/Umbraco.Core/Models/Entities/BeingDirtyBase.cs b/src/Umbraco.Core/Models/Entities/BeingDirtyBase.cs index a1f4bad9a1..45f1ad1a4f 100644 --- a/src/Umbraco.Core/Models/Entities/BeingDirtyBase.cs +++ b/src/Umbraco.Core/Models/Entities/BeingDirtyBase.cs @@ -5,7 +5,7 @@ using System.ComponentModel; using System.Linq; using System.Runtime.Serialization; -namespace Umbraco.Core.Models.Entities +namespace Umbraco.Cms.Core.Models.Entities { /// /// Provides a base implementation of and . diff --git a/src/Umbraco.Core/Models/Entities/ContentEntitySlim.cs b/src/Umbraco.Core/Models/Entities/ContentEntitySlim.cs index 6eeed53a89..45d23d26d4 100644 --- a/src/Umbraco.Core/Models/Entities/ContentEntitySlim.cs +++ b/src/Umbraco.Core/Models/Entities/ContentEntitySlim.cs @@ -1,4 +1,4 @@ -namespace Umbraco.Core.Models.Entities +namespace Umbraco.Cms.Core.Models.Entities { /// /// Implements . @@ -14,4 +14,4 @@ /// public string ContentTypeThumbnail { get; set; } } -} \ No newline at end of file +} diff --git a/src/Umbraco.Core/Models/Entities/DocumentEntitySlim.cs b/src/Umbraco.Core/Models/Entities/DocumentEntitySlim.cs index 8536b1ded3..b5aca80087 100644 --- a/src/Umbraco.Core/Models/Entities/DocumentEntitySlim.cs +++ b/src/Umbraco.Core/Models/Entities/DocumentEntitySlim.cs @@ -1,7 +1,7 @@ using System.Collections.Generic; using System.Linq; -namespace Umbraco.Core.Models.Entities +namespace Umbraco.Cms.Core.Models.Entities { /// @@ -43,6 +43,6 @@ namespace Umbraco.Core.Models.Entities /// public bool Edited { get; set; } - + } } diff --git a/src/Umbraco.Core/Models/Entities/EntityBase.cs b/src/Umbraco.Core/Models/Entities/EntityBase.cs index d848d3f404..77c497c68a 100644 --- a/src/Umbraco.Core/Models/Entities/EntityBase.cs +++ b/src/Umbraco.Core/Models/Entities/EntityBase.cs @@ -2,7 +2,7 @@ using System.Diagnostics; using System.Runtime.Serialization; -namespace Umbraco.Core.Models.Entities +namespace Umbraco.Cms.Core.Models.Entities { /// /// Provides a base class for entities. @@ -80,7 +80,7 @@ namespace Umbraco.Core.Models.Entities _id = default; _key = Guid.Empty; _hasIdentity = false; - } + } public virtual bool Equals(EntityBase other) { diff --git a/src/Umbraco.Core/Models/Entities/EntityExtensions.cs b/src/Umbraco.Core/Models/Entities/EntityExtensions.cs index 2df08f207d..ba3421349d 100644 --- a/src/Umbraco.Core/Models/Entities/EntityExtensions.cs +++ b/src/Umbraco.Core/Models/Entities/EntityExtensions.cs @@ -1,6 +1,10 @@ -using System; +// Copyright (c) Umbraco. +// See LICENSE for more details. -namespace Umbraco.Core.Models.Entities +using System; +using Umbraco.Cms.Core.Models.Entities; + +namespace Umbraco.Extensions { public static class EntityExtensions { diff --git a/src/Umbraco.Core/Models/Entities/EntitySlim.cs b/src/Umbraco.Core/Models/Entities/EntitySlim.cs index 489601cf66..3bf91bc5be 100644 --- a/src/Umbraco.Core/Models/Entities/EntitySlim.cs +++ b/src/Umbraco.Core/Models/Entities/EntitySlim.cs @@ -1,11 +1,8 @@ using System; using System.Collections.Generic; -using System.ComponentModel; -using System.Linq; using System.Runtime.Serialization; -using Umbraco.Core.Exceptions; -namespace Umbraco.Core.Models.Entities +namespace Umbraco.Cms.Core.Models.Entities { /// /// Implementation of for internal use. diff --git a/src/Umbraco.Core/Models/Entities/ICanBeDirty.cs b/src/Umbraco.Core/Models/Entities/ICanBeDirty.cs index 03e2f19c70..d8644431d5 100644 --- a/src/Umbraco.Core/Models/Entities/ICanBeDirty.cs +++ b/src/Umbraco.Core/Models/Entities/ICanBeDirty.cs @@ -1,7 +1,7 @@ using System.Collections.Generic; using System.ComponentModel; -namespace Umbraco.Core.Models.Entities +namespace Umbraco.Cms.Core.Models.Entities { /// /// Defines an entity that tracks property changes and can be dirty. diff --git a/src/Umbraco.Core/Models/Entities/IContentEntitySlim.cs b/src/Umbraco.Core/Models/Entities/IContentEntitySlim.cs index 9ab557b02c..43de032894 100644 --- a/src/Umbraco.Core/Models/Entities/IContentEntitySlim.cs +++ b/src/Umbraco.Core/Models/Entities/IContentEntitySlim.cs @@ -1,4 +1,4 @@ -namespace Umbraco.Core.Models.Entities +namespace Umbraco.Cms.Core.Models.Entities { /// /// Represents a lightweight content entity, managed by the entity service. diff --git a/src/Umbraco.Core/Models/Entities/IDocumentEntitySlim.cs b/src/Umbraco.Core/Models/Entities/IDocumentEntitySlim.cs index 0258d49114..d160e144bb 100644 --- a/src/Umbraco.Core/Models/Entities/IDocumentEntitySlim.cs +++ b/src/Umbraco.Core/Models/Entities/IDocumentEntitySlim.cs @@ -1,6 +1,6 @@ using System.Collections.Generic; -namespace Umbraco.Core.Models.Entities +namespace Umbraco.Cms.Core.Models.Entities { /// diff --git a/src/Umbraco.Core/Models/Entities/IEntity.cs b/src/Umbraco.Core/Models/Entities/IEntity.cs index 7aafcbeccb..6aeea58553 100644 --- a/src/Umbraco.Core/Models/Entities/IEntity.cs +++ b/src/Umbraco.Core/Models/Entities/IEntity.cs @@ -1,6 +1,6 @@ using System; -namespace Umbraco.Core.Models.Entities +namespace Umbraco.Cms.Core.Models.Entities { /// /// Defines an entity. diff --git a/src/Umbraco.Core/Models/Entities/IEntitySlim.cs b/src/Umbraco.Core/Models/Entities/IEntitySlim.cs index 116d5c2b44..dfdb00edaa 100644 --- a/src/Umbraco.Core/Models/Entities/IEntitySlim.cs +++ b/src/Umbraco.Core/Models/Entities/IEntitySlim.cs @@ -1,7 +1,6 @@ using System; -using System.Collections.Generic; -namespace Umbraco.Core.Models.Entities +namespace Umbraco.Cms.Core.Models.Entities { /// /// Represents a lightweight entity, managed by the entity service. diff --git a/src/Umbraco.Core/Models/Entities/IHaveAdditionalData.cs b/src/Umbraco.Core/Models/Entities/IHaveAdditionalData.cs index 597856b86d..d36d190706 100644 --- a/src/Umbraco.Core/Models/Entities/IHaveAdditionalData.cs +++ b/src/Umbraco.Core/Models/Entities/IHaveAdditionalData.cs @@ -1,10 +1,6 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; +using System.Collections.Generic; -namespace Umbraco.Core.Models.Entities +namespace Umbraco.Cms.Core.Models.Entities { /// /// Provides support for additional data. diff --git a/src/Umbraco.Core/Models/Entities/IMediaEntitySlim.cs b/src/Umbraco.Core/Models/Entities/IMediaEntitySlim.cs index f7daf79ec9..15060e3a45 100644 --- a/src/Umbraco.Core/Models/Entities/IMediaEntitySlim.cs +++ b/src/Umbraco.Core/Models/Entities/IMediaEntitySlim.cs @@ -1,4 +1,4 @@ -namespace Umbraco.Core.Models.Entities +namespace Umbraco.Cms.Core.Models.Entities { /// /// Represents a lightweight media entity, managed by the entity service. diff --git a/src/Umbraco.Core/Models/Entities/IMemberEntitySlim.cs b/src/Umbraco.Core/Models/Entities/IMemberEntitySlim.cs index 050a999cc2..a43607fda7 100644 --- a/src/Umbraco.Core/Models/Entities/IMemberEntitySlim.cs +++ b/src/Umbraco.Core/Models/Entities/IMemberEntitySlim.cs @@ -1,4 +1,4 @@ -namespace Umbraco.Core.Models.Entities +namespace Umbraco.Cms.Core.Models.Entities { public interface IMemberEntitySlim : IContentEntitySlim { diff --git a/src/Umbraco.Core/Models/Entities/IRememberBeingDirty.cs b/src/Umbraco.Core/Models/Entities/IRememberBeingDirty.cs index e679b98b93..618bab2698 100644 --- a/src/Umbraco.Core/Models/Entities/IRememberBeingDirty.cs +++ b/src/Umbraco.Core/Models/Entities/IRememberBeingDirty.cs @@ -1,6 +1,6 @@ using System.Collections.Generic; -namespace Umbraco.Core.Models.Entities +namespace Umbraco.Cms.Core.Models.Entities { /// /// Defines an entity that tracks property changes and can be dirty, and remembers diff --git a/src/Umbraco.Core/Models/Entities/ITreeEntity.cs b/src/Umbraco.Core/Models/Entities/ITreeEntity.cs index ab63e1e1d8..b970f46726 100644 --- a/src/Umbraco.Core/Models/Entities/ITreeEntity.cs +++ b/src/Umbraco.Core/Models/Entities/ITreeEntity.cs @@ -1,4 +1,4 @@ -namespace Umbraco.Core.Models.Entities +namespace Umbraco.Cms.Core.Models.Entities { /// /// Defines an entity that belongs to a tree. diff --git a/src/Umbraco.Core/Models/Entities/IUmbracoEntity.cs b/src/Umbraco.Core/Models/Entities/IUmbracoEntity.cs index f76ec2438a..d89e5d9312 100644 --- a/src/Umbraco.Core/Models/Entities/IUmbracoEntity.cs +++ b/src/Umbraco.Core/Models/Entities/IUmbracoEntity.cs @@ -1,6 +1,4 @@ -using System.Collections.Generic; - -namespace Umbraco.Core.Models.Entities +namespace Umbraco.Cms.Core.Models.Entities { /// diff --git a/src/Umbraco.Core/Models/Entities/IValueObject.cs b/src/Umbraco.Core/Models/Entities/IValueObject.cs index 2d2e69e7ae..e1b7ea01a6 100644 --- a/src/Umbraco.Core/Models/Entities/IValueObject.cs +++ b/src/Umbraco.Core/Models/Entities/IValueObject.cs @@ -1,4 +1,4 @@ -namespace Umbraco.Core.Models.Entities +namespace Umbraco.Cms.Core.Models.Entities { /// /// Marker interface for value object, eg. objects without diff --git a/src/Umbraco.Core/Models/Entities/MediaEntitySlim.cs b/src/Umbraco.Core/Models/Entities/MediaEntitySlim.cs index 6292a5a35a..41d024de3b 100644 --- a/src/Umbraco.Core/Models/Entities/MediaEntitySlim.cs +++ b/src/Umbraco.Core/Models/Entities/MediaEntitySlim.cs @@ -1,4 +1,4 @@ -namespace Umbraco.Core.Models.Entities +namespace Umbraco.Cms.Core.Models.Entities { /// /// Implements . diff --git a/src/Umbraco.Core/Models/Entities/MemberEntitySlim.cs b/src/Umbraco.Core/Models/Entities/MemberEntitySlim.cs index 338f363856..66e3650fc5 100644 --- a/src/Umbraco.Core/Models/Entities/MemberEntitySlim.cs +++ b/src/Umbraco.Core/Models/Entities/MemberEntitySlim.cs @@ -1,4 +1,4 @@ -namespace Umbraco.Core.Models.Entities +namespace Umbraco.Cms.Core.Models.Entities { public class MemberEntitySlim : ContentEntitySlim, IMemberEntitySlim { diff --git a/src/Umbraco.Core/Models/Entities/TreeEntityBase.cs b/src/Umbraco.Core/Models/Entities/TreeEntityBase.cs index 937d7ab0fc..629e01a706 100644 --- a/src/Umbraco.Core/Models/Entities/TreeEntityBase.cs +++ b/src/Umbraco.Core/Models/Entities/TreeEntityBase.cs @@ -1,7 +1,7 @@ using System; using System.Runtime.Serialization; -namespace Umbraco.Core.Models.Entities +namespace Umbraco.Cms.Core.Models.Entities { /// /// Provides a base class for tree entities. diff --git a/src/Umbraco.Core/Models/Entities/TreeEntityPath.cs b/src/Umbraco.Core/Models/Entities/TreeEntityPath.cs index 54142a7527..a9a1e339df 100644 --- a/src/Umbraco.Core/Models/Entities/TreeEntityPath.cs +++ b/src/Umbraco.Core/Models/Entities/TreeEntityPath.cs @@ -1,4 +1,4 @@ -namespace Umbraco.Core.Models.Entities +namespace Umbraco.Cms.Core.Models.Entities { /// /// Represents the path of a tree entity. diff --git a/src/Umbraco.Core/Models/EntityContainer.cs b/src/Umbraco.Core/Models/EntityContainer.cs index 5c2ada7149..31a72356db 100644 --- a/src/Umbraco.Core/Models/EntityContainer.cs +++ b/src/Umbraco.Core/Models/EntityContainer.cs @@ -1,9 +1,9 @@ using System; using System.Collections.Generic; using System.Linq; -using Umbraco.Core.Models.Entities; +using Umbraco.Cms.Core.Models.Entities; -namespace Umbraco.Core.Models +namespace Umbraco.Cms.Core.Models { /// /// Represents a folder for organizing entities such as content types and data types. diff --git a/src/Umbraco.Core/Models/File.cs b/src/Umbraco.Core/Models/File.cs index b2be44d020..7c7031a027 100644 --- a/src/Umbraco.Core/Models/File.cs +++ b/src/Umbraco.Core/Models/File.cs @@ -1,8 +1,8 @@ using System; using System.Runtime.Serialization; -using Umbraco.Core.Models.Entities; +using Umbraco.Cms.Core.Models.Entities; -namespace Umbraco.Core.Models +namespace Umbraco.Cms.Core.Models { /// /// Represents an abstract file which provides basic functionality for a File with an Alias and Name diff --git a/src/Umbraco.Core/Models/Folder.cs b/src/Umbraco.Core/Models/Folder.cs index 9889726fdc..810bcaf3b3 100644 --- a/src/Umbraco.Core/Models/Folder.cs +++ b/src/Umbraco.Core/Models/Folder.cs @@ -1,6 +1,6 @@ -using Umbraco.Core.Models.Entities; +using Umbraco.Cms.Core.Models.Entities; -namespace Umbraco.Core.Models +namespace Umbraco.Cms.Core.Models { public sealed class Folder : EntityBase { diff --git a/src/Umbraco.Core/Models/EntityExtensions.cs b/src/Umbraco.Core/Models/HaveAdditionalDataExtensions.cs similarity index 72% rename from src/Umbraco.Core/Models/EntityExtensions.cs rename to src/Umbraco.Core/Models/HaveAdditionalDataExtensions.cs index 5ef68e99ea..033bb26d26 100644 --- a/src/Umbraco.Core/Models/EntityExtensions.cs +++ b/src/Umbraco.Core/Models/HaveAdditionalDataExtensions.cs @@ -1,8 +1,11 @@ -using Umbraco.Core.Models.Entities; +// Copyright (c) Umbraco. +// See LICENSE for more details. -namespace Umbraco.Core.Models +using Umbraco.Cms.Core.Models.Entities; + +namespace Umbraco.Extensions { - public static class EntityExtensions + public static class HaveAdditionalDataExtensions { /// /// Gets additional data. diff --git a/src/Umbraco.Core/Models/IAuditEntry.cs b/src/Umbraco.Core/Models/IAuditEntry.cs index c097f84752..c756a80004 100644 --- a/src/Umbraco.Core/Models/IAuditEntry.cs +++ b/src/Umbraco.Core/Models/IAuditEntry.cs @@ -1,7 +1,7 @@ using System; -using Umbraco.Core.Models.Entities; +using Umbraco.Cms.Core.Models.Entities; -namespace Umbraco.Core.Models +namespace Umbraco.Cms.Core.Models { /// /// Represents an audited event. diff --git a/src/Umbraco.Core/Models/IAuditItem.cs b/src/Umbraco.Core/Models/IAuditItem.cs index ed70ada8ad..4189b49410 100644 --- a/src/Umbraco.Core/Models/IAuditItem.cs +++ b/src/Umbraco.Core/Models/IAuditItem.cs @@ -1,6 +1,6 @@ -using Umbraco.Core.Models.Entities; +using Umbraco.Cms.Core.Models.Entities; -namespace Umbraco.Core.Models +namespace Umbraco.Cms.Core.Models { /// /// Represents an audit item. diff --git a/src/Umbraco.Core/Models/IConsent.cs b/src/Umbraco.Core/Models/IConsent.cs index 7e0156fd6e..b02cd42282 100644 --- a/src/Umbraco.Core/Models/IConsent.cs +++ b/src/Umbraco.Core/Models/IConsent.cs @@ -1,7 +1,7 @@ using System.Collections.Generic; -using Umbraco.Core.Models.Entities; +using Umbraco.Cms.Core.Models.Entities; -namespace Umbraco.Core.Models +namespace Umbraco.Cms.Core.Models { /// /// Represents a consent state. diff --git a/src/Umbraco.Core/Models/IContent.cs b/src/Umbraco.Core/Models/IContent.cs index 7a4fc83253..516d82b7bb 100644 --- a/src/Umbraco.Core/Models/IContent.cs +++ b/src/Umbraco.Core/Models/IContent.cs @@ -1,7 +1,7 @@ using System; using System.Collections.Generic; -namespace Umbraco.Core.Models +namespace Umbraco.Cms.Core.Models { /// diff --git a/src/Umbraco.Core/Models/IContentBase.cs b/src/Umbraco.Core/Models/IContentBase.cs index 1aade803b8..4900ab00e1 100644 --- a/src/Umbraco.Core/Models/IContentBase.cs +++ b/src/Umbraco.Core/Models/IContentBase.cs @@ -1,8 +1,8 @@ using System; using System.Collections.Generic; -using Umbraco.Core.Models.Entities; +using Umbraco.Cms.Core.Models.Entities; -namespace Umbraco.Core.Models +namespace Umbraco.Cms.Core.Models { /// /// Provides a base class for content items. diff --git a/src/Umbraco.Core/Models/IContentModel.cs b/src/Umbraco.Core/Models/IContentModel.cs index 692547aa3e..8aa8c18306 100644 --- a/src/Umbraco.Core/Models/IContentModel.cs +++ b/src/Umbraco.Core/Models/IContentModel.cs @@ -1,7 +1,6 @@ -using Umbraco.Core.Models; -using Umbraco.Core.Models.PublishedContent; +using Umbraco.Cms.Core.Models.PublishedContent; -namespace Umbraco.Web.Models +namespace Umbraco.Cms.Core.Models { /// /// The basic view model returned for front-end Umbraco controllers diff --git a/src/Umbraco.Core/Models/IContentType.cs b/src/Umbraco.Core/Models/IContentType.cs index e071bd7c82..f04a73d5e0 100644 --- a/src/Umbraco.Core/Models/IContentType.cs +++ b/src/Umbraco.Core/Models/IContentType.cs @@ -1,6 +1,6 @@ using System.Collections.Generic; -namespace Umbraco.Core.Models +namespace Umbraco.Cms.Core.Models { /// /// Defines a ContentType, which Content is based on diff --git a/src/Umbraco.Core/Models/IContentTypeBase.cs b/src/Umbraco.Core/Models/IContentTypeBase.cs index d65e2dcdfb..d0dc798eca 100644 --- a/src/Umbraco.Core/Models/IContentTypeBase.cs +++ b/src/Umbraco.Core/Models/IContentTypeBase.cs @@ -1,8 +1,7 @@ -using System; -using System.Collections.Generic; -using Umbraco.Core.Models.Entities; +using System.Collections.Generic; +using Umbraco.Cms.Core.Models.Entities; -namespace Umbraco.Core.Models +namespace Umbraco.Cms.Core.Models { /// /// Defines the base for a ContentType with properties that diff --git a/src/Umbraco.Core/Models/IContentTypeComposition.cs b/src/Umbraco.Core/Models/IContentTypeComposition.cs index cf60b121af..296cd58781 100644 --- a/src/Umbraco.Core/Models/IContentTypeComposition.cs +++ b/src/Umbraco.Core/Models/IContentTypeComposition.cs @@ -1,6 +1,6 @@ using System.Collections.Generic; -namespace Umbraco.Core.Models +namespace Umbraco.Cms.Core.Models { /// /// Defines the Composition of a ContentType diff --git a/src/Umbraco.Core/Models/IDataType.cs b/src/Umbraco.Core/Models/IDataType.cs index 39278abdc1..4c6d0a3e31 100644 --- a/src/Umbraco.Core/Models/IDataType.cs +++ b/src/Umbraco.Core/Models/IDataType.cs @@ -1,7 +1,7 @@ -using Umbraco.Core.Models.Entities; -using Umbraco.Core.PropertyEditors; +using Umbraco.Cms.Core.Models.Entities; +using Umbraco.Cms.Core.PropertyEditors; -namespace Umbraco.Core.Models +namespace Umbraco.Cms.Core.Models { /// /// Represents a data type. diff --git a/src/Umbraco.Core/Models/IDataValueEditor.cs b/src/Umbraco.Core/Models/IDataValueEditor.cs index 0ac61b92ce..aef9fcf94b 100644 --- a/src/Umbraco.Core/Models/IDataValueEditor.cs +++ b/src/Umbraco.Core/Models/IDataValueEditor.cs @@ -1,11 +1,11 @@ using System.Collections.Generic; using System.ComponentModel.DataAnnotations; using System.Xml.Linq; -using Umbraco.Core.Models; -using Umbraco.Core.Models.Editors; -using Umbraco.Core.Services; +using Umbraco.Cms.Core.Models.Editors; +using Umbraco.Cms.Core.PropertyEditors; +using Umbraco.Cms.Core.Services; -namespace Umbraco.Core.PropertyEditors +namespace Umbraco.Cms.Core.Models { /// diff --git a/src/Umbraco.Core/Models/IDeepCloneable.cs b/src/Umbraco.Core/Models/IDeepCloneable.cs index 057326b3c7..a7568b7e81 100644 --- a/src/Umbraco.Core/Models/IDeepCloneable.cs +++ b/src/Umbraco.Core/Models/IDeepCloneable.cs @@ -1,4 +1,4 @@ -namespace Umbraco.Core.Models +namespace Umbraco.Cms.Core.Models { /// /// Provides a mean to deep-clone an object. diff --git a/src/Umbraco.Core/Models/IDictionaryItem.cs b/src/Umbraco.Core/Models/IDictionaryItem.cs index 1176eb3833..f299ce2ac5 100644 --- a/src/Umbraco.Core/Models/IDictionaryItem.cs +++ b/src/Umbraco.Core/Models/IDictionaryItem.cs @@ -1,9 +1,9 @@ using System; using System.Collections.Generic; using System.Runtime.Serialization; -using Umbraco.Core.Models.Entities; +using Umbraco.Cms.Core.Models.Entities; -namespace Umbraco.Core.Models +namespace Umbraco.Cms.Core.Models { public interface IDictionaryItem : IEntity, IRememberBeingDirty { diff --git a/src/Umbraco.Core/Models/IDictionaryTranslation.cs b/src/Umbraco.Core/Models/IDictionaryTranslation.cs index 8510e5c520..c80318d073 100644 --- a/src/Umbraco.Core/Models/IDictionaryTranslation.cs +++ b/src/Umbraco.Core/Models/IDictionaryTranslation.cs @@ -1,7 +1,7 @@ using System.Runtime.Serialization; -using Umbraco.Core.Models.Entities; +using Umbraco.Cms.Core.Models.Entities; -namespace Umbraco.Core.Models +namespace Umbraco.Cms.Core.Models { public interface IDictionaryTranslation : IEntity, IRememberBeingDirty { diff --git a/src/Umbraco.Core/Models/IDomain.cs b/src/Umbraco.Core/Models/IDomain.cs index 55d5bc88c2..d855c5aa1b 100644 --- a/src/Umbraco.Core/Models/IDomain.cs +++ b/src/Umbraco.Core/Models/IDomain.cs @@ -1,6 +1,6 @@ -using Umbraco.Core.Models.Entities; +using Umbraco.Cms.Core.Models.Entities; -namespace Umbraco.Core.Models +namespace Umbraco.Cms.Core.Models { public interface IDomain : IEntity, IRememberBeingDirty { diff --git a/src/Umbraco.Core/Models/IFile.cs b/src/Umbraco.Core/Models/IFile.cs index 835c9bf434..48a2e234b6 100644 --- a/src/Umbraco.Core/Models/IFile.cs +++ b/src/Umbraco.Core/Models/IFile.cs @@ -1,7 +1,6 @@ -using System; -using Umbraco.Core.Models.Entities; +using Umbraco.Cms.Core.Models.Entities; -namespace Umbraco.Core.Models +namespace Umbraco.Cms.Core.Models { /// /// Defines a File @@ -43,6 +42,6 @@ namespace Umbraco.Core.Models /// Gets or sets the file's virtual path (i.e. the file path relative to the root of the website) /// string VirtualPath { get; set; } - + } } diff --git a/src/Umbraco.Core/Models/IKeyValue.cs b/src/Umbraco.Core/Models/IKeyValue.cs index 6025d4d37b..52c1f5c568 100644 --- a/src/Umbraco.Core/Models/IKeyValue.cs +++ b/src/Umbraco.Core/Models/IKeyValue.cs @@ -1,7 +1,6 @@ -using System; -using Umbraco.Core.Models.Entities; +using Umbraco.Cms.Core.Models.Entities; -namespace Umbraco.Core.Models +namespace Umbraco.Cms.Core.Models { public interface IKeyValue : IEntity { diff --git a/src/Umbraco.Core/Models/ILanguage.cs b/src/Umbraco.Core/Models/ILanguage.cs index c0d2fed839..363f8df138 100644 --- a/src/Umbraco.Core/Models/ILanguage.cs +++ b/src/Umbraco.Core/Models/ILanguage.cs @@ -1,8 +1,8 @@ using System.Globalization; using System.Runtime.Serialization; -using Umbraco.Core.Models.Entities; +using Umbraco.Cms.Core.Models.Entities; -namespace Umbraco.Core.Models +namespace Umbraco.Cms.Core.Models { /// /// Represents a language. diff --git a/src/Umbraco.Core/Models/IMacro.cs b/src/Umbraco.Core/Models/IMacro.cs index 9d1c47154c..e91da77774 100644 --- a/src/Umbraco.Core/Models/IMacro.cs +++ b/src/Umbraco.Core/Models/IMacro.cs @@ -1,9 +1,7 @@ -using System; -using System.Collections.Generic; -using System.Runtime.Serialization; -using Umbraco.Core.Models.Entities; +using System.Runtime.Serialization; +using Umbraco.Cms.Core.Models.Entities; -namespace Umbraco.Core.Models +namespace Umbraco.Cms.Core.Models { /// /// Defines a Macro @@ -51,7 +49,7 @@ namespace Umbraco.Core.Models /// [DataMember] bool DontRender { get; set; } - + /// /// Gets or set the path to the macro source to render /// diff --git a/src/Umbraco.Core/Models/IMacroProperty.cs b/src/Umbraco.Core/Models/IMacroProperty.cs index a414c285c7..609c1bf044 100644 --- a/src/Umbraco.Core/Models/IMacroProperty.cs +++ b/src/Umbraco.Core/Models/IMacroProperty.cs @@ -1,8 +1,8 @@ using System; using System.Runtime.Serialization; -using Umbraco.Core.Models.Entities; +using Umbraco.Cms.Core.Models.Entities; -namespace Umbraco.Core.Models +namespace Umbraco.Cms.Core.Models { /// /// Defines a Property for a Macro diff --git a/src/Umbraco.Core/Models/IMedia.cs b/src/Umbraco.Core/Models/IMedia.cs index 75e94d66e7..cbb80fdd59 100644 --- a/src/Umbraco.Core/Models/IMedia.cs +++ b/src/Umbraco.Core/Models/IMedia.cs @@ -1,4 +1,4 @@ -namespace Umbraco.Core.Models +namespace Umbraco.Cms.Core.Models { public interface IMedia : IContentBase { } diff --git a/src/Umbraco.Core/Models/IMediaType.cs b/src/Umbraco.Core/Models/IMediaType.cs index 90fdc97ad7..13655f0f55 100644 --- a/src/Umbraco.Core/Models/IMediaType.cs +++ b/src/Umbraco.Core/Models/IMediaType.cs @@ -1,4 +1,4 @@ -namespace Umbraco.Core.Models +namespace Umbraco.Cms.Core.Models { /// /// Defines a ContentType, which Media is based on diff --git a/src/Umbraco.Core/Models/IMediaUrlGenerator.cs b/src/Umbraco.Core/Models/IMediaUrlGenerator.cs index 41e1be8d6c..5d649ecd8a 100644 --- a/src/Umbraco.Core/Models/IMediaUrlGenerator.cs +++ b/src/Umbraco.Core/Models/IMediaUrlGenerator.cs @@ -1,4 +1,4 @@ -namespace Umbraco.Core.PropertyEditors +namespace Umbraco.Cms.Core.Models { /// /// Used to generate paths to media items for a specified property editor alias @@ -6,7 +6,7 @@ public interface IMediaUrlGenerator { /// - /// Tries to get a media path for a given property editor alias + /// Tries to get a media path for a given property editor alias /// /// The property editor alias /// The value of the property diff --git a/src/Umbraco.Core/Models/IMember.cs b/src/Umbraco.Core/Models/IMember.cs index c46eb512c5..c78d1012a9 100644 --- a/src/Umbraco.Core/Models/IMember.cs +++ b/src/Umbraco.Core/Models/IMember.cs @@ -1,9 +1,9 @@ using System; using System.ComponentModel; -using Umbraco.Core.Models.Entities; -using Umbraco.Core.Models.Membership; +using Umbraco.Cms.Core.Models.Entities; +using Umbraco.Cms.Core.Models.Membership; -namespace Umbraco.Core.Models +namespace Umbraco.Cms.Core.Models { public interface IMember : IContentBase, IMembershipUser, IHaveAdditionalData { @@ -13,7 +13,7 @@ namespace Umbraco.Core.Models string ContentTypeAlias { get; } /// - /// Internal/Experimental - only used for mapping queries. + /// Internal/Experimental - only used for mapping queries. /// /// /// Adding these to have first level properties instead of the Properties collection. @@ -21,7 +21,7 @@ namespace Umbraco.Core.Models [EditorBrowsable(EditorBrowsableState.Never)] string LongStringPropertyValue { get; set; } /// - /// Internal/Experimental - only used for mapping queries. + /// Internal/Experimental - only used for mapping queries. /// /// /// Adding these to have first level properties instead of the Properties collection. @@ -29,7 +29,7 @@ namespace Umbraco.Core.Models [EditorBrowsable(EditorBrowsableState.Never)] string ShortStringPropertyValue { get; set; } /// - /// Internal/Experimental - only used for mapping queries. + /// Internal/Experimental - only used for mapping queries. /// /// /// Adding these to have first level properties instead of the Properties collection. @@ -37,7 +37,7 @@ namespace Umbraco.Core.Models [EditorBrowsable(EditorBrowsableState.Never)] int IntegerPropertyValue { get; set; } /// - /// Internal/Experimental - only used for mapping queries. + /// Internal/Experimental - only used for mapping queries. /// /// /// Adding these to have first level properties instead of the Properties collection. @@ -45,7 +45,7 @@ namespace Umbraco.Core.Models [EditorBrowsable(EditorBrowsableState.Never)] bool BoolPropertyValue { get; set; } /// - /// Internal/Experimental - only used for mapping queries. + /// Internal/Experimental - only used for mapping queries. /// /// /// Adding these to have first level properties instead of the Properties collection. @@ -53,7 +53,7 @@ namespace Umbraco.Core.Models [EditorBrowsable(EditorBrowsableState.Never)] DateTime DateTimePropertyValue { get; set; } /// - /// Internal/Experimental - only used for mapping queries. + /// Internal/Experimental - only used for mapping queries. /// /// /// Adding these to have first level properties instead of the Properties collection. diff --git a/src/Umbraco.Core/Models/IMemberGroup.cs b/src/Umbraco.Core/Models/IMemberGroup.cs index 0b1e4a8324..ff6ba0c5b9 100644 --- a/src/Umbraco.Core/Models/IMemberGroup.cs +++ b/src/Umbraco.Core/Models/IMemberGroup.cs @@ -1,7 +1,6 @@ -using System.Collections.Generic; -using Umbraco.Core.Models.Entities; +using Umbraco.Cms.Core.Models.Entities; -namespace Umbraco.Core.Models +namespace Umbraco.Cms.Core.Models { /// /// Represents a member type diff --git a/src/Umbraco.Core/Models/IMemberType.cs b/src/Umbraco.Core/Models/IMemberType.cs index 29d78eddcb..d18b61ed98 100644 --- a/src/Umbraco.Core/Models/IMemberType.cs +++ b/src/Umbraco.Core/Models/IMemberType.cs @@ -1,4 +1,4 @@ -namespace Umbraco.Core.Models +namespace Umbraco.Cms.Core.Models { /// /// Defines a MemberType, which Member is based on diff --git a/src/Umbraco.Core/Models/IMemberUserAdapter.cs b/src/Umbraco.Core/Models/IMemberUserAdapter.cs deleted file mode 100644 index 9238ae7da3..0000000000 --- a/src/Umbraco.Core/Models/IMemberUserAdapter.cs +++ /dev/null @@ -1,10 +0,0 @@ -using System.Collections.Generic; -using Umbraco.Core.Models.Membership; - -namespace Umbraco.Core.Models -{ - public interface IMemberUserAdapter : IUser - { - IEnumerable AllowedSections { get; } - } -} diff --git a/src/Umbraco.Core/Models/IMigrationEntry.cs b/src/Umbraco.Core/Models/IMigrationEntry.cs index 5ab4853542..b5dae1981a 100644 --- a/src/Umbraco.Core/Models/IMigrationEntry.cs +++ b/src/Umbraco.Core/Models/IMigrationEntry.cs @@ -1,8 +1,7 @@ -using System; -using Semver; -using Umbraco.Core.Models.Entities; +using Umbraco.Cms.Core.Models.Entities; +using Umbraco.Cms.Core.Semver; -namespace Umbraco.Core.Models +namespace Umbraco.Cms.Core.Models { public interface IMigrationEntry : IEntity, IRememberBeingDirty { diff --git a/src/Umbraco.Core/Models/IPartialView.cs b/src/Umbraco.Core/Models/IPartialView.cs index 31099a1aae..c45b76534d 100644 --- a/src/Umbraco.Core/Models/IPartialView.cs +++ b/src/Umbraco.Core/Models/IPartialView.cs @@ -1,4 +1,4 @@ -namespace Umbraco.Core.Models +namespace Umbraco.Cms.Core.Models { public interface IPartialView : IFile { diff --git a/src/Umbraco.Core/Models/IProperty.cs b/src/Umbraco.Core/Models/IProperty.cs index 44e84d9b68..3991c7f2c6 100644 --- a/src/Umbraco.Core/Models/IProperty.cs +++ b/src/Umbraco.Core/Models/IProperty.cs @@ -1,8 +1,7 @@ -using System; using System.Collections.Generic; -using Umbraco.Core.Models.Entities; +using Umbraco.Cms.Core.Models.Entities; -namespace Umbraco.Core.Models +namespace Umbraco.Cms.Core.Models { public interface IProperty : IEntity, IRememberBeingDirty { diff --git a/src/Umbraco.Core/Models/IPropertyCollection.cs b/src/Umbraco.Core/Models/IPropertyCollection.cs index c947a5e12d..3997856ae7 100644 --- a/src/Umbraco.Core/Models/IPropertyCollection.cs +++ b/src/Umbraco.Core/Models/IPropertyCollection.cs @@ -1,7 +1,7 @@ using System.Collections.Generic; using System.Collections.Specialized; -namespace Umbraco.Core.Models +namespace Umbraco.Cms.Core.Models { public interface IPropertyCollection : IEnumerable, IDeepCloneable, INotifyCollectionChanged { diff --git a/src/Umbraco.Core/Models/IPropertyType.cs b/src/Umbraco.Core/Models/IPropertyType.cs index be52339d65..adb8e283ee 100644 --- a/src/Umbraco.Core/Models/IPropertyType.cs +++ b/src/Umbraco.Core/Models/IPropertyType.cs @@ -1,9 +1,7 @@ using System; -using System.ComponentModel; -using System.Runtime.Serialization; -using Umbraco.Core.Models.Entities; +using Umbraco.Cms.Core.Models.Entities; -namespace Umbraco.Core.Models +namespace Umbraco.Cms.Core.Models { public interface IPropertyType : IEntity, IRememberBeingDirty { diff --git a/src/Umbraco.Core/Models/IPropertyValue.cs b/src/Umbraco.Core/Models/IPropertyValue.cs index abc459a72f..1bd391625b 100644 --- a/src/Umbraco.Core/Models/IPropertyValue.cs +++ b/src/Umbraco.Core/Models/IPropertyValue.cs @@ -1,4 +1,4 @@ -namespace Umbraco.Core.Models +namespace Umbraco.Cms.Core.Models { public interface IPropertyValue { diff --git a/src/Umbraco.Core/Models/IRedirectUrl.cs b/src/Umbraco.Core/Models/IRedirectUrl.cs index 527dad57da..7e007559a5 100644 --- a/src/Umbraco.Core/Models/IRedirectUrl.cs +++ b/src/Umbraco.Core/Models/IRedirectUrl.cs @@ -1,8 +1,8 @@ using System; using System.Runtime.Serialization; -using Umbraco.Core.Models.Entities; +using Umbraco.Cms.Core.Models.Entities; -namespace Umbraco.Core.Models +namespace Umbraco.Cms.Core.Models { /// /// Represents a redirect URL. diff --git a/src/Umbraco.Core/Models/IRelation.cs b/src/Umbraco.Core/Models/IRelation.cs index 6bd348d72f..7a0fe756ed 100644 --- a/src/Umbraco.Core/Models/IRelation.cs +++ b/src/Umbraco.Core/Models/IRelation.cs @@ -1,8 +1,8 @@ using System; using System.Runtime.Serialization; -using Umbraco.Core.Models.Entities; +using Umbraco.Cms.Core.Models.Entities; -namespace Umbraco.Core.Models +namespace Umbraco.Cms.Core.Models { public interface IRelation : IEntity, IRememberBeingDirty { diff --git a/src/Umbraco.Core/Models/IRelationType.cs b/src/Umbraco.Core/Models/IRelationType.cs index 9253fae8ab..9efde4b939 100644 --- a/src/Umbraco.Core/Models/IRelationType.cs +++ b/src/Umbraco.Core/Models/IRelationType.cs @@ -1,8 +1,8 @@ using System; using System.Runtime.Serialization; -using Umbraco.Core.Models.Entities; +using Umbraco.Cms.Core.Models.Entities; -namespace Umbraco.Core.Models +namespace Umbraco.Cms.Core.Models { public interface IRelationType : IEntity, IRememberBeingDirty { diff --git a/src/Umbraco.Core/Models/IScript.cs b/src/Umbraco.Core/Models/IScript.cs index 9fdc321107..6a07d2aa25 100644 --- a/src/Umbraco.Core/Models/IScript.cs +++ b/src/Umbraco.Core/Models/IScript.cs @@ -1,4 +1,4 @@ -namespace Umbraco.Core.Models +namespace Umbraco.Cms.Core.Models { public interface IScript : IFile { diff --git a/src/Umbraco.Core/Models/IServerRegistration.cs b/src/Umbraco.Core/Models/IServerRegistration.cs index 70d3964fc5..4aba9b10c0 100644 --- a/src/Umbraco.Core/Models/IServerRegistration.cs +++ b/src/Umbraco.Core/Models/IServerRegistration.cs @@ -1,8 +1,8 @@ using System; -using Umbraco.Core.Models.Entities; -using Umbraco.Core.Sync; +using Umbraco.Cms.Core.Models.Entities; +using Umbraco.Cms.Core.Sync; -namespace Umbraco.Core.Models +namespace Umbraco.Cms.Core.Models { public interface IServerRegistration : IServerAddress, IEntity, IRememberBeingDirty { diff --git a/src/Umbraco.Core/Models/ISimpleContentType.cs b/src/Umbraco.Core/Models/ISimpleContentType.cs index 52364cfa1e..9f1ab38aca 100644 --- a/src/Umbraco.Core/Models/ISimpleContentType.cs +++ b/src/Umbraco.Core/Models/ISimpleContentType.cs @@ -1,6 +1,6 @@ using System; -namespace Umbraco.Core.Models +namespace Umbraco.Cms.Core.Models { /// /// Represents a simplified view of a content type. diff --git a/src/Umbraco.Core/Models/IStylesheet.cs b/src/Umbraco.Core/Models/IStylesheet.cs index bc2d870ea4..6ef0867d16 100644 --- a/src/Umbraco.Core/Models/IStylesheet.cs +++ b/src/Umbraco.Core/Models/IStylesheet.cs @@ -1,7 +1,6 @@ using System.Collections.Generic; -using Umbraco.Core.Models.Entities; -namespace Umbraco.Core.Models +namespace Umbraco.Cms.Core.Models { public interface IStylesheet : IFile { diff --git a/src/Umbraco.Core/Models/IStylesheetProperty.cs b/src/Umbraco.Core/Models/IStylesheetProperty.cs index c44a147d54..781fb474b2 100644 --- a/src/Umbraco.Core/Models/IStylesheetProperty.cs +++ b/src/Umbraco.Core/Models/IStylesheetProperty.cs @@ -1,6 +1,6 @@ -using Umbraco.Core.Models.Entities; +using Umbraco.Cms.Core.Models.Entities; -namespace Umbraco.Core.Models +namespace Umbraco.Cms.Core.Models { public interface IStylesheetProperty : IRememberBeingDirty { diff --git a/src/Umbraco.Core/Models/ITag.cs b/src/Umbraco.Core/Models/ITag.cs index f2c30b2644..79840481bb 100644 --- a/src/Umbraco.Core/Models/ITag.cs +++ b/src/Umbraco.Core/Models/ITag.cs @@ -1,7 +1,7 @@ using System.Runtime.Serialization; -using Umbraco.Core.Models.Entities; +using Umbraco.Cms.Core.Models.Entities; -namespace Umbraco.Core.Models +namespace Umbraco.Cms.Core.Models { /// /// Represents a tag entity. diff --git a/src/Umbraco.Core/Models/ITemplate.cs b/src/Umbraco.Core/Models/ITemplate.cs index 1a3ce30087..1c4f794c49 100644 --- a/src/Umbraco.Core/Models/ITemplate.cs +++ b/src/Umbraco.Core/Models/ITemplate.cs @@ -1,6 +1,6 @@ -using Umbraco.Core.Models.Entities; +using Umbraco.Cms.Core.Models.Entities; -namespace Umbraco.Core.Models +namespace Umbraco.Cms.Core.Models { /// /// Defines a Template File (Mvc View) diff --git a/src/Umbraco.Core/Models/IconModel.cs b/src/Umbraco.Core/Models/IconModel.cs index 12fa8884ae..75e90cf0fb 100644 --- a/src/Umbraco.Core/Models/IconModel.cs +++ b/src/Umbraco.Core/Models/IconModel.cs @@ -1,4 +1,4 @@ -namespace Umbraco.Core.Models +namespace Umbraco.Cms.Core.Models { public class IconModel { diff --git a/src/Umbraco.Core/Models/Identity/ExternalLogin.cs b/src/Umbraco.Core/Models/Identity/ExternalLogin.cs index a5de9da0cb..485ec66df4 100644 --- a/src/Umbraco.Core/Models/Identity/ExternalLogin.cs +++ b/src/Umbraco.Core/Models/Identity/ExternalLogin.cs @@ -1,6 +1,6 @@ using System; -namespace Umbraco.Core.Models.Identity +namespace Umbraco.Cms.Core.Models.Identity { /// public class ExternalLogin : IExternalLogin diff --git a/src/Umbraco.Core/Models/Identity/IExternalLogin.cs b/src/Umbraco.Core/Models/Identity/IExternalLogin.cs index 2718802324..1cc570c36f 100644 --- a/src/Umbraco.Core/Models/Identity/IExternalLogin.cs +++ b/src/Umbraco.Core/Models/Identity/IExternalLogin.cs @@ -1,4 +1,4 @@ -namespace Umbraco.Core.Models.Identity +namespace Umbraco.Cms.Core.Models.Identity { /// /// Used to persist external login data for a user diff --git a/src/Umbraco.Core/Models/Identity/IIdentityUserLogin.cs b/src/Umbraco.Core/Models/Identity/IIdentityUserLogin.cs index 05703a1b2c..89ec823875 100644 --- a/src/Umbraco.Core/Models/Identity/IIdentityUserLogin.cs +++ b/src/Umbraco.Core/Models/Identity/IIdentityUserLogin.cs @@ -1,6 +1,6 @@ -using Umbraco.Core.Models.Entities; +using Umbraco.Cms.Core.Models.Entities; -namespace Umbraco.Core.Models.Identity +namespace Umbraco.Cms.Core.Models.Identity { /// /// An external login provider linked to a user diff --git a/src/Umbraco.Core/Models/Identity/IdentityUserLogin.cs b/src/Umbraco.Core/Models/Identity/IdentityUserLogin.cs index 5974822c20..b719d9cd51 100644 --- a/src/Umbraco.Core/Models/Identity/IdentityUserLogin.cs +++ b/src/Umbraco.Core/Models/Identity/IdentityUserLogin.cs @@ -1,7 +1,7 @@ using System; -using Umbraco.Core.Models.Entities; +using Umbraco.Cms.Core.Models.Entities; -namespace Umbraco.Core.Models.Identity +namespace Umbraco.Cms.Core.Models.Identity { /// diff --git a/src/Umbraco.Core/Models/ImageCropAnchor.cs b/src/Umbraco.Core/Models/ImageCropAnchor.cs index a24b4df6fa..118f7348ae 100644 --- a/src/Umbraco.Core/Models/ImageCropAnchor.cs +++ b/src/Umbraco.Core/Models/ImageCropAnchor.cs @@ -1,4 +1,4 @@ -namespace Umbraco.Web.Models +namespace Umbraco.Cms.Core.Models { public enum ImageCropAnchor { diff --git a/src/Umbraco.Core/Models/ImageCropMode.cs b/src/Umbraco.Core/Models/ImageCropMode.cs index 1e168d03e0..1cd7294a58 100644 --- a/src/Umbraco.Core/Models/ImageCropMode.cs +++ b/src/Umbraco.Core/Models/ImageCropMode.cs @@ -1,4 +1,4 @@ -namespace Umbraco.Web.Models +namespace Umbraco.Cms.Core.Models { public enum ImageCropMode { diff --git a/src/Umbraco.Core/Models/ImageCropRatioMode.cs b/src/Umbraco.Core/Models/ImageCropRatioMode.cs index 9f63cdea77..19f69cbeac 100644 --- a/src/Umbraco.Core/Models/ImageCropRatioMode.cs +++ b/src/Umbraco.Core/Models/ImageCropRatioMode.cs @@ -1,4 +1,4 @@ -namespace Umbraco.Web.Models +namespace Umbraco.Cms.Core.Models { public enum ImageCropRatioMode { diff --git a/src/Umbraco.Core/Models/ImageUrlGenerationOptions.cs b/src/Umbraco.Core/Models/ImageUrlGenerationOptions.cs index 369ee9b25b..99f42bbefa 100644 --- a/src/Umbraco.Core/Models/ImageUrlGenerationOptions.cs +++ b/src/Umbraco.Core/Models/ImageUrlGenerationOptions.cs @@ -1,6 +1,4 @@ -using Umbraco.Web.Models; - -namespace Umbraco.Core.Models +namespace Umbraco.Cms.Core.Models { /// /// These are options that are passed to the IImageUrlGenerator implementation to determine diff --git a/src/Umbraco.Core/Models/KeyValue.cs b/src/Umbraco.Core/Models/KeyValue.cs index 2d47fcbfb3..eabb94568a 100644 --- a/src/Umbraco.Core/Models/KeyValue.cs +++ b/src/Umbraco.Core/Models/KeyValue.cs @@ -1,8 +1,8 @@ using System; using System.Runtime.Serialization; -using Umbraco.Core.Models.Entities; +using Umbraco.Cms.Core.Models.Entities; -namespace Umbraco.Core.Models +namespace Umbraco.Cms.Core.Models { /// /// Implements . diff --git a/src/Umbraco.Core/Models/Language.cs b/src/Umbraco.Core/Models/Language.cs index 0ac8526181..6be774f7d2 100644 --- a/src/Umbraco.Core/Models/Language.cs +++ b/src/Umbraco.Core/Models/Language.cs @@ -2,11 +2,10 @@ using System.Globalization; using System.Runtime.Serialization; using System.Threading; -using Umbraco.Core.Configuration; -using Umbraco.Core.Configuration.Models; -using Umbraco.Core.Models.Entities; +using Umbraco.Cms.Core.Configuration.Models; +using Umbraco.Cms.Core.Models.Entities; -namespace Umbraco.Core.Models +namespace Umbraco.Cms.Core.Models { /// /// Represents a Language. diff --git a/src/Umbraco.Core/Models/Link.cs b/src/Umbraco.Core/Models/Link.cs index 74ad4ad2af..f461eb850d 100644 --- a/src/Umbraco.Core/Models/Link.cs +++ b/src/Umbraco.Core/Models/Link.cs @@ -1,6 +1,4 @@ -using Umbraco.Core; - -namespace Umbraco.Web.Models +namespace Umbraco.Cms.Core.Models { public class Link { diff --git a/src/Umbraco.Core/Models/LinkType.cs b/src/Umbraco.Core/Models/LinkType.cs index 3db3165d7f..e4879249d8 100644 --- a/src/Umbraco.Core/Models/LinkType.cs +++ b/src/Umbraco.Core/Models/LinkType.cs @@ -1,4 +1,4 @@ -namespace Umbraco.Web.Models +namespace Umbraco.Cms.Core.Models { public enum LinkType { @@ -6,4 +6,4 @@ Media, External } -} \ No newline at end of file +} diff --git a/src/Umbraco.Core/Models/LocalPackageInstallModel.cs b/src/Umbraco.Core/Models/LocalPackageInstallModel.cs index bd32b176a5..6cd35ab3d9 100644 --- a/src/Umbraco.Core/Models/LocalPackageInstallModel.cs +++ b/src/Umbraco.Core/Models/LocalPackageInstallModel.cs @@ -1,8 +1,8 @@ using System.Collections.Generic; using System.Runtime.Serialization; -using Umbraco.Web.Models.ContentEditing; +using Umbraco.Cms.Core.Models.ContentEditing; -namespace Umbraco.Web.Models +namespace Umbraco.Cms.Core.Models { /// /// A model that represents uploading a local package diff --git a/src/Umbraco.Core/Models/Macro.cs b/src/Umbraco.Core/Models/Macro.cs index 083c288e09..7fd60b98f0 100644 --- a/src/Umbraco.Core/Models/Macro.cs +++ b/src/Umbraco.Core/Models/Macro.cs @@ -4,10 +4,11 @@ using System.Collections.Specialized; using System.ComponentModel; using System.Linq; using System.Runtime.Serialization; -using Umbraco.Core.Models.Entities; -using Umbraco.Core.Strings; +using Umbraco.Cms.Core.Models.Entities; +using Umbraco.Cms.Core.Strings; +using Umbraco.Extensions; -namespace Umbraco.Core.Models +namespace Umbraco.Cms.Core.Models { /// /// Represents a Macro diff --git a/src/Umbraco.Core/Models/MacroProperty.cs b/src/Umbraco.Core/Models/MacroProperty.cs index 6714baf17b..a8f4ece17c 100644 --- a/src/Umbraco.Core/Models/MacroProperty.cs +++ b/src/Umbraco.Core/Models/MacroProperty.cs @@ -1,8 +1,8 @@ using System; using System.Runtime.Serialization; -using Umbraco.Core.Models.Entities; +using Umbraco.Cms.Core.Models.Entities; -namespace Umbraco.Core.Models +namespace Umbraco.Cms.Core.Models { /// /// Represents a Macro Property @@ -57,7 +57,7 @@ namespace Umbraco.Core.Models private int _sortOrder; private int _id; private string _editorAlias; - + /// /// Gets or sets the Key of the Property /// diff --git a/src/Umbraco.Core/Models/MacroPropertyCollection.cs b/src/Umbraco.Core/Models/MacroPropertyCollection.cs index 1017ba8c8c..f2f0b6520f 100644 --- a/src/Umbraco.Core/Models/MacroPropertyCollection.cs +++ b/src/Umbraco.Core/Models/MacroPropertyCollection.cs @@ -1,7 +1,8 @@ using System; -using Umbraco.Core.Collections; +using Umbraco.Cms.Core.Collections; +using Umbraco.Extensions; -namespace Umbraco.Core.Models +namespace Umbraco.Cms.Core.Models { /// /// A macro's property collection diff --git a/src/Umbraco.Core/Models/Mapping/AuditMapDefinition.cs b/src/Umbraco.Core/Models/Mapping/AuditMapDefinition.cs index 51a0fed704..811e2e57a2 100644 --- a/src/Umbraco.Core/Models/Mapping/AuditMapDefinition.cs +++ b/src/Umbraco.Core/Models/Mapping/AuditMapDefinition.cs @@ -1,8 +1,7 @@ -using Umbraco.Core.Mapping; -using Umbraco.Core.Models; -using Umbraco.Web.Models.ContentEditing; +using Umbraco.Cms.Core.Mapping; +using Umbraco.Cms.Core.Models.ContentEditing; -namespace Umbraco.Web.Models.Mapping +namespace Umbraco.Cms.Core.Models.Mapping { public class AuditMapDefinition : IMapDefinition { diff --git a/src/Umbraco.Core/Models/Mapping/CodeFileMapDefinition.cs b/src/Umbraco.Core/Models/Mapping/CodeFileMapDefinition.cs index 425f057dc5..6adfcf0fc5 100644 --- a/src/Umbraco.Core/Models/Mapping/CodeFileMapDefinition.cs +++ b/src/Umbraco.Core/Models/Mapping/CodeFileMapDefinition.cs @@ -1,8 +1,7 @@ -using Umbraco.Core.Mapping; -using Umbraco.Core.Models; -using Umbraco.Web.Models.ContentEditing; +using Umbraco.Cms.Core.Mapping; +using Umbraco.Cms.Core.Models.ContentEditing; -namespace Umbraco.Web.Models.Mapping +namespace Umbraco.Cms.Core.Models.Mapping { public class CodeFileMapDefinition : IMapDefinition { diff --git a/src/Umbraco.Core/Models/Mapping/CommonMapper.cs b/src/Umbraco.Core/Models/Mapping/CommonMapper.cs index 5ee33c72fa..b6a220e04c 100644 --- a/src/Umbraco.Core/Models/Mapping/CommonMapper.cs +++ b/src/Umbraco.Core/Models/Mapping/CommonMapper.cs @@ -1,18 +1,16 @@ using System; using System.Collections.Generic; using System.Linq; -using Umbraco.Core; -using Umbraco.Core.Mapping; -using Umbraco.Core.Models; -using Umbraco.Core.Models.ContentEditing; -using Umbraco.Core.Models.Entities; -using Umbraco.Core.Models.Membership; -using Umbraco.Core.Services; -using Umbraco.Web.ContentApps; -using Umbraco.Web.Models.ContentEditing; -using UserProfile = Umbraco.Web.Models.ContentEditing.UserProfile; +using Umbraco.Cms.Core.ContentApps; +using Umbraco.Cms.Core.Mapping; +using Umbraco.Cms.Core.Models.ContentEditing; +using Umbraco.Cms.Core.Models.Entities; +using Umbraco.Cms.Core.Models.Membership; +using Umbraco.Cms.Core.Services; +using Umbraco.Extensions; +using UserProfile = Umbraco.Cms.Core.Models.ContentEditing.UserProfile; -namespace Umbraco.Web.Models.Mapping +namespace Umbraco.Cms.Core.Models.Mapping { public class CommonMapper { diff --git a/src/Umbraco.Core/Models/Mapping/ContentPropertyBasicMapper.cs b/src/Umbraco.Core/Models/Mapping/ContentPropertyBasicMapper.cs index 9742753b47..0b4ade6328 100644 --- a/src/Umbraco.Core/Models/Mapping/ContentPropertyBasicMapper.cs +++ b/src/Umbraco.Core/Models/Mapping/ContentPropertyBasicMapper.cs @@ -1,14 +1,13 @@ using System; using System.Linq; using Microsoft.Extensions.Logging; -using Umbraco.Core; -using Umbraco.Core.Mapping; -using Umbraco.Core.Models; -using Umbraco.Core.PropertyEditors; -using Umbraco.Core.Services; -using Umbraco.Web.Models.ContentEditing; +using Umbraco.Cms.Core.Mapping; +using Umbraco.Cms.Core.Models.ContentEditing; +using Umbraco.Cms.Core.PropertyEditors; +using Umbraco.Cms.Core.Services; +using Umbraco.Extensions; -namespace Umbraco.Web.Models.Mapping +namespace Umbraco.Cms.Core.Models.Mapping { /// /// Creates a base generic ContentPropertyBasic from a Property diff --git a/src/Umbraco.Core/Models/Mapping/ContentPropertyDisplayMapper.cs b/src/Umbraco.Core/Models/Mapping/ContentPropertyDisplayMapper.cs index c72f4fac7c..3957699deb 100644 --- a/src/Umbraco.Core/Models/Mapping/ContentPropertyDisplayMapper.cs +++ b/src/Umbraco.Core/Models/Mapping/ContentPropertyDisplayMapper.cs @@ -1,12 +1,15 @@ -using Microsoft.Extensions.Logging; -using Umbraco.Core.Dictionary; -using Umbraco.Core.Mapping; -using Umbraco.Core.Models; -using Umbraco.Core.PropertyEditors; -using Umbraco.Core.Services; -using Umbraco.Web.Models.ContentEditing; +// Copyright (c) Umbraco. +// See LICENSE for more details. -namespace Umbraco.Web.Models.Mapping +using Microsoft.Extensions.Logging; +using Umbraco.Cms.Core.Dictionary; +using Umbraco.Cms.Core.Mapping; +using Umbraco.Cms.Core.Models.ContentEditing; +using Umbraco.Cms.Core.PropertyEditors; +using Umbraco.Cms.Core.Services; +using Umbraco.Extensions; + +namespace Umbraco.Cms.Core.Models.Mapping { /// /// Creates a ContentPropertyDisplay from a Property diff --git a/src/Umbraco.Core/Models/Mapping/ContentPropertyDtoMapper.cs b/src/Umbraco.Core/Models/Mapping/ContentPropertyDtoMapper.cs index 456e23b68a..056fb8e619 100644 --- a/src/Umbraco.Core/Models/Mapping/ContentPropertyDtoMapper.cs +++ b/src/Umbraco.Core/Models/Mapping/ContentPropertyDtoMapper.cs @@ -1,11 +1,10 @@ using Microsoft.Extensions.Logging; -using Umbraco.Core.Mapping; -using Umbraco.Core.Models; -using Umbraco.Core.PropertyEditors; -using Umbraco.Core.Services; -using Umbraco.Web.Models.ContentEditing; +using Umbraco.Cms.Core.Mapping; +using Umbraco.Cms.Core.Models.ContentEditing; +using Umbraco.Cms.Core.PropertyEditors; +using Umbraco.Cms.Core.Services; -namespace Umbraco.Web.Models.Mapping +namespace Umbraco.Cms.Core.Models.Mapping { /// /// Creates a ContentPropertyDto from a Property diff --git a/src/Umbraco.Core/Models/Mapping/ContentPropertyMapDefinition.cs b/src/Umbraco.Core/Models/Mapping/ContentPropertyMapDefinition.cs index 7740685615..5893d1e1e5 100644 --- a/src/Umbraco.Core/Models/Mapping/ContentPropertyMapDefinition.cs +++ b/src/Umbraco.Core/Models/Mapping/ContentPropertyMapDefinition.cs @@ -1,12 +1,11 @@ using Microsoft.Extensions.Logging; -using Umbraco.Core.Dictionary; -using Umbraco.Core.Mapping; -using Umbraco.Core.Models; -using Umbraco.Core.PropertyEditors; -using Umbraco.Core.Services; -using Umbraco.Web.Models.ContentEditing; +using Umbraco.Cms.Core.Dictionary; +using Umbraco.Cms.Core.Mapping; +using Umbraco.Cms.Core.Models.ContentEditing; +using Umbraco.Cms.Core.PropertyEditors; +using Umbraco.Cms.Core.Services; -namespace Umbraco.Web.Models.Mapping +namespace Umbraco.Cms.Core.Models.Mapping { /// /// A mapper which declares how to map content properties. These mappings are shared among media (and probably members) which is diff --git a/src/Umbraco.Core/Models/Mapping/ContentSavedStateMapper.cs b/src/Umbraco.Core/Models/Mapping/ContentSavedStateMapper.cs index 82f1d4e9bb..a087ce0d3e 100644 --- a/src/Umbraco.Core/Models/Mapping/ContentSavedStateMapper.cs +++ b/src/Umbraco.Core/Models/Mapping/ContentSavedStateMapper.cs @@ -1,10 +1,9 @@ using System; -using Umbraco.Core; -using Umbraco.Core.Mapping; -using Umbraco.Core.Models; -using Umbraco.Web.Models.ContentEditing; +using Umbraco.Cms.Core.Mapping; +using Umbraco.Cms.Core.Models.ContentEditing; +using Umbraco.Extensions; -namespace Umbraco.Web.Models.Mapping +namespace Umbraco.Cms.Core.Models.Mapping { /// /// Returns the for an item diff --git a/src/Umbraco.Core/Models/Mapping/ContentTypeMapDefinition.cs b/src/Umbraco.Core/Models/Mapping/ContentTypeMapDefinition.cs index 0ed781fe10..162032216d 100644 --- a/src/Umbraco.Core/Models/Mapping/ContentTypeMapDefinition.cs +++ b/src/Umbraco.Core/Models/Mapping/ContentTypeMapDefinition.cs @@ -3,19 +3,18 @@ using System.Collections.Generic; using System.Linq; using Microsoft.Extensions.Logging; using Microsoft.Extensions.Options; -using Umbraco.Core; -using Umbraco.Core.Configuration; -using Umbraco.Core.Configuration.Models; -using Umbraco.Core.Exceptions; -using Umbraco.Core.Hosting; -using Umbraco.Core.Mapping; -using Umbraco.Core.Models; -using Umbraco.Core.PropertyEditors; -using Umbraco.Core.Services; -using Umbraco.Core.Strings; -using Umbraco.Web.Models.ContentEditing; +using Umbraco.Cms.Core.Configuration; +using Umbraco.Cms.Core.Configuration.Models; +using Umbraco.Cms.Core.Exceptions; +using Umbraco.Cms.Core.Hosting; +using Umbraco.Cms.Core.Mapping; +using Umbraco.Cms.Core.Models.ContentEditing; +using Umbraco.Cms.Core.PropertyEditors; +using Umbraco.Cms.Core.Services; +using Umbraco.Cms.Core.Strings; +using Umbraco.Extensions; -namespace Umbraco.Web.Models.Mapping +namespace Umbraco.Cms.Core.Models.Mapping { /// /// Defines mappings for content/media/members type mappings diff --git a/src/Umbraco.Core/Models/Mapping/ContentVariantMapper.cs b/src/Umbraco.Core/Models/Mapping/ContentVariantMapper.cs index 6cefd152e9..ddc7add7ed 100644 --- a/src/Umbraco.Core/Models/Mapping/ContentVariantMapper.cs +++ b/src/Umbraco.Core/Models/Mapping/ContentVariantMapper.cs @@ -1,14 +1,12 @@ using System; using System.Collections.Generic; using System.Linq; -using Umbraco.Core; -using Umbraco.Core.Mapping; -using Umbraco.Core.Models; -using Umbraco.Core.Services; -using Umbraco.Web.Models.ContentEditing; -using Language = Umbraco.Web.Models.ContentEditing.Language; +using Umbraco.Cms.Core.Mapping; +using Umbraco.Cms.Core.Models.ContentEditing; +using Umbraco.Cms.Core.Services; +using Umbraco.Extensions; -namespace Umbraco.Web.Models.Mapping +namespace Umbraco.Cms.Core.Models.Mapping { public class ContentVariantMapper { @@ -96,17 +94,17 @@ namespace Umbraco.Web.Models.Mapping return variant.Language == null || variant.Language.IsDefault; } - private IEnumerable GetLanguages(MapperContext context) + private IEnumerable GetLanguages(MapperContext context) { var allLanguages = _localizationService.GetAllLanguages().OrderBy(x => x.Id).ToList(); if (allLanguages.Count == 0) { // This should never happen - return Enumerable.Empty(); + return Enumerable.Empty(); } else { - return context.MapEnumerable(allLanguages).ToList(); + return context.MapEnumerable(allLanguages).ToList(); } } @@ -130,7 +128,7 @@ namespace Umbraco.Web.Models.Mapping return segments.Distinct(); } - private ContentVariantDisplay CreateVariantDisplay(MapperContext context, IContent content, Language language, string segment) + private ContentVariantDisplay CreateVariantDisplay(MapperContext context, IContent content, ContentEditing.Language language, string segment) { context.SetCulture(language?.IsoCode); context.SetSegment(segment); @@ -145,7 +143,7 @@ namespace Umbraco.Web.Models.Mapping return variantDisplay; } - private string GetDisplayName(Language language, string segment) + private string GetDisplayName(ContentEditing.Language language, string segment) { var isCultureVariant = language != null; var isSegmentVariant = !segment.IsNullOrWhiteSpace(); diff --git a/src/Umbraco.Core/Models/Mapping/DataTypeMapDefinition.cs b/src/Umbraco.Core/Models/Mapping/DataTypeMapDefinition.cs index 1d96d92ee4..c1b60d7d9c 100644 --- a/src/Umbraco.Core/Models/Mapping/DataTypeMapDefinition.cs +++ b/src/Umbraco.Core/Models/Mapping/DataTypeMapDefinition.cs @@ -3,15 +3,14 @@ using System.Collections.Generic; using System.Linq; using Microsoft.Extensions.Logging; using Microsoft.Extensions.Options; -using Umbraco.Core; -using Umbraco.Core.Configuration.Models; -using Umbraco.Core.Mapping; -using Umbraco.Core.Models; -using Umbraco.Core.PropertyEditors; -using Umbraco.Core.Serialization; -using Umbraco.Web.Models.ContentEditing; +using Umbraco.Cms.Core.Configuration.Models; +using Umbraco.Cms.Core.Mapping; +using Umbraco.Cms.Core.Models.ContentEditing; +using Umbraco.Cms.Core.PropertyEditors; +using Umbraco.Cms.Core.Serialization; +using Umbraco.Extensions; -namespace Umbraco.Web.Models.Mapping +namespace Umbraco.Cms.Core.Models.Mapping { public class DataTypeMapDefinition : IMapDefinition { diff --git a/src/Umbraco.Core/Models/Mapping/DictionaryMapDefinition.cs b/src/Umbraco.Core/Models/Mapping/DictionaryMapDefinition.cs index 278adc56e0..aef6473ca5 100644 --- a/src/Umbraco.Core/Models/Mapping/DictionaryMapDefinition.cs +++ b/src/Umbraco.Core/Models/Mapping/DictionaryMapDefinition.cs @@ -1,13 +1,11 @@ using System; using System.Collections.Generic; using System.Linq; -using Umbraco.Core; -using Umbraco.Core.Mapping; -using Umbraco.Core.Models; -using Umbraco.Core.Services; -using Umbraco.Web.Models.ContentEditing; +using Umbraco.Cms.Core.Mapping; +using Umbraco.Cms.Core.Models.ContentEditing; +using Umbraco.Cms.Core.Services; -namespace Umbraco.Web.Models.Mapping +namespace Umbraco.Cms.Core.Models.Mapping { /// /// diff --git a/src/Umbraco.Core/Models/Mapping/LanguageMapDefinition.cs b/src/Umbraco.Core/Models/Mapping/LanguageMapDefinition.cs index 6fcbe1a88b..fa88f958a9 100644 --- a/src/Umbraco.Core/Models/Mapping/LanguageMapDefinition.cs +++ b/src/Umbraco.Core/Models/Mapping/LanguageMapDefinition.cs @@ -1,20 +1,18 @@ using System; using System.Collections.Generic; using System.Linq; -using Umbraco.Core.Mapping; -using Umbraco.Core.Models; -using Umbraco.Web.Models.ContentEditing; -using Language = Umbraco.Web.Models.ContentEditing.Language; +using Umbraco.Cms.Core.Mapping; +using Umbraco.Cms.Core.Models.ContentEditing; -namespace Umbraco.Web.Models.Mapping +namespace Umbraco.Cms.Core.Models.Mapping { public class LanguageMapDefinition : IMapDefinition { public void DefineMaps(UmbracoMapper mapper) { mapper.Define((source, context) => new EntityBasic(), Map); - mapper.Define((source, context) => new Language(), Map); - mapper.Define, IEnumerable>((source, context) => new List(), Map); + mapper.Define((source, context) => new ContentEditing.Language(), Map); + mapper.Define, IEnumerable>((source, context) => new List(), Map); } // Umbraco.Code.MapAll -Udi -Path -Trashed -AdditionalData -Icon @@ -28,7 +26,7 @@ namespace Umbraco.Web.Models.Mapping } // Umbraco.Code.MapAll - private static void Map(ILanguage source, Language target, MapperContext context) + private static void Map(ILanguage source, ContentEditing.Language target, MapperContext context) { target.Id = source.Id; target.IsoCode = source.IsoCode; @@ -38,14 +36,14 @@ namespace Umbraco.Web.Models.Mapping target.FallbackLanguageId = source.FallbackLanguageId; } - private static void Map(IEnumerable source, IEnumerable target, MapperContext context) + private static void Map(IEnumerable source, IEnumerable target, MapperContext context) { if (target == null) throw new ArgumentNullException(nameof(target)); - if (!(target is List list)) + if (!(target is List list)) throw new NotSupportedException($"{nameof(target)} must be a List."); - var temp = context.MapEnumerable(source); + var temp = context.MapEnumerable(source); //Put the default language first in the list & then sort rest by a-z var defaultLang = temp.SingleOrDefault(x => x.IsDefault); diff --git a/src/Umbraco.Core/Models/Mapping/MacroMapDefinition.cs b/src/Umbraco.Core/Models/Mapping/MacroMapDefinition.cs index 0e003c83a2..eb5d55d0b6 100644 --- a/src/Umbraco.Core/Models/Mapping/MacroMapDefinition.cs +++ b/src/Umbraco.Core/Models/Mapping/MacroMapDefinition.cs @@ -1,12 +1,10 @@ using System.Collections.Generic; using Microsoft.Extensions.Logging; -using Umbraco.Core; -using Umbraco.Core.Mapping; -using Umbraco.Core.Models; -using Umbraco.Core.PropertyEditors; -using Umbraco.Web.Models.ContentEditing; +using Umbraco.Cms.Core.Mapping; +using Umbraco.Cms.Core.Models.ContentEditing; +using Umbraco.Cms.Core.PropertyEditors; -namespace Umbraco.Web.Models.Mapping +namespace Umbraco.Cms.Core.Models.Mapping { public class MacroMapDefinition : IMapDefinition { diff --git a/src/Umbraco.Core/Models/Mapping/MapperContextExtensions.cs b/src/Umbraco.Core/Models/Mapping/MapperContextExtensions.cs index 3133441846..e385a693cb 100644 --- a/src/Umbraco.Core/Models/Mapping/MapperContextExtensions.cs +++ b/src/Umbraco.Core/Models/Mapping/MapperContextExtensions.cs @@ -1,6 +1,6 @@ -using Umbraco.Core.Mapping; +using Umbraco.Cms.Core.Mapping; -namespace Umbraco.Web.Models.Mapping +namespace Umbraco.Extensions { /// /// Provides extension methods for the class. diff --git a/src/Umbraco.Core/Models/Mapping/MemberMapDefinition.cs b/src/Umbraco.Core/Models/Mapping/MemberMapDefinition.cs index a69d40c291..81cf573bbc 100644 --- a/src/Umbraco.Core/Models/Mapping/MemberMapDefinition.cs +++ b/src/Umbraco.Core/Models/Mapping/MemberMapDefinition.cs @@ -1,7 +1,7 @@ -using Umbraco.Core.Mapping; -using Umbraco.Web.Models.ContentEditing; +using Umbraco.Cms.Core.Mapping; +using Umbraco.Cms.Core.Models.ContentEditing; -namespace Umbraco.Core.Models.Mapping +namespace Umbraco.Cms.Core.Models.Mapping { /// public class MemberMapDefinition : IMapDefinition diff --git a/src/Umbraco.Core/Models/Mapping/MemberTabsAndPropertiesMapper.cs b/src/Umbraco.Core/Models/Mapping/MemberTabsAndPropertiesMapper.cs index faf811607e..92aab36bd4 100644 --- a/src/Umbraco.Core/Models/Mapping/MemberTabsAndPropertiesMapper.cs +++ b/src/Umbraco.Core/Models/Mapping/MemberTabsAndPropertiesMapper.cs @@ -2,17 +2,16 @@ using System; using System.Collections.Generic; using System.Linq; using Microsoft.Extensions.Options; -using Umbraco.Core; -using Umbraco.Core.Configuration.Models; -using Umbraco.Core.Dictionary; -using Umbraco.Core.Mapping; -using Umbraco.Core.Models; -using Umbraco.Core.PropertyEditors; -using Umbraco.Core.Security; -using Umbraco.Core.Services; -using Umbraco.Web.Models.ContentEditing; +using Umbraco.Cms.Core.Configuration.Models; +using Umbraco.Cms.Core.Dictionary; +using Umbraco.Cms.Core.Mapping; +using Umbraco.Cms.Core.Models.ContentEditing; +using Umbraco.Cms.Core.PropertyEditors; +using Umbraco.Cms.Core.Security; +using Umbraco.Cms.Core.Services; +using Umbraco.Extensions; -namespace Umbraco.Web.Models.Mapping +namespace Umbraco.Cms.Core.Models.Mapping { /// /// A custom tab/property resolver for members which will ensure that the built-in membership properties are or aren't displayed diff --git a/src/Umbraco.Core/Models/Mapping/PropertyTypeGroupMapper.cs b/src/Umbraco.Core/Models/Mapping/PropertyTypeGroupMapper.cs index b41f5d4b19..4545414e51 100644 --- a/src/Umbraco.Core/Models/Mapping/PropertyTypeGroupMapper.cs +++ b/src/Umbraco.Core/Models/Mapping/PropertyTypeGroupMapper.cs @@ -2,14 +2,13 @@ using System.Collections.Generic; using System.Linq; using Microsoft.Extensions.Logging; -using Umbraco.Core; -using Umbraco.Core.Models; -using Umbraco.Core.PropertyEditors; -using Umbraco.Core.Services; -using Umbraco.Core.Strings; -using Umbraco.Web.Models.ContentEditing; +using Umbraco.Cms.Core.Models.ContentEditing; +using Umbraco.Cms.Core.PropertyEditors; +using Umbraco.Cms.Core.Services; +using Umbraco.Cms.Core.Strings; +using Umbraco.Extensions; -namespace Umbraco.Web.Models.Mapping +namespace Umbraco.Cms.Core.Models.Mapping { public class PropertyTypeGroupMapper where TPropertyType : PropertyTypeDisplay, new() diff --git a/src/Umbraco.Core/Models/Mapping/RedirectUrlMapDefinition.cs b/src/Umbraco.Core/Models/Mapping/RedirectUrlMapDefinition.cs index 08c89b34f8..dda5f2a939 100644 --- a/src/Umbraco.Core/Models/Mapping/RedirectUrlMapDefinition.cs +++ b/src/Umbraco.Core/Models/Mapping/RedirectUrlMapDefinition.cs @@ -1,9 +1,8 @@ -using Umbraco.Core.Mapping; -using Umbraco.Core.Models; -using Umbraco.Web.Models.ContentEditing; -using Umbraco.Web.Routing; +using Umbraco.Cms.Core.Mapping; +using Umbraco.Cms.Core.Models.ContentEditing; +using Umbraco.Cms.Core.Routing; -namespace Umbraco.Web.Models.Mapping +namespace Umbraco.Cms.Core.Models.Mapping { public class RedirectUrlMapDefinition : IMapDefinition { diff --git a/src/Umbraco.Core/Models/Mapping/RelationMapDefinition.cs b/src/Umbraco.Core/Models/Mapping/RelationMapDefinition.cs index 9de506b5eb..cddb862d50 100644 --- a/src/Umbraco.Core/Models/Mapping/RelationMapDefinition.cs +++ b/src/Umbraco.Core/Models/Mapping/RelationMapDefinition.cs @@ -1,10 +1,9 @@ -using Umbraco.Core; -using Umbraco.Core.Mapping; -using Umbraco.Core.Models; -using Umbraco.Core.Services; -using Umbraco.Web.Models.ContentEditing; +using Umbraco.Cms.Core.Mapping; +using Umbraco.Cms.Core.Models.ContentEditing; +using Umbraco.Cms.Core.Services; +using Umbraco.Extensions; -namespace Umbraco.Web.Models.Mapping +namespace Umbraco.Cms.Core.Models.Mapping { public class RelationMapDefinition : IMapDefinition { diff --git a/src/Umbraco.Core/Models/Mapping/SectionMapDefinition.cs b/src/Umbraco.Core/Models/Mapping/SectionMapDefinition.cs index 20b1d2e05f..f3c1991a8e 100644 --- a/src/Umbraco.Core/Models/Mapping/SectionMapDefinition.cs +++ b/src/Umbraco.Core/Models/Mapping/SectionMapDefinition.cs @@ -1,11 +1,11 @@ -using Umbraco.Core.Manifest; -using Umbraco.Core.Mapping; -using Umbraco.Core.Models.Sections; -using Umbraco.Core.Services; -using Umbraco.Web.Models.ContentEditing; -using Umbraco.Web.Sections; +using Umbraco.Cms.Core.Manifest; +using Umbraco.Cms.Core.Mapping; +using Umbraco.Cms.Core.Models.ContentEditing; +using Umbraco.Cms.Core.Sections; +using Umbraco.Cms.Core.Services; +using Umbraco.Extensions; -namespace Umbraco.Web.Models.Mapping +namespace Umbraco.Cms.Core.Models.Mapping { public class SectionMapDefinition : IMapDefinition { diff --git a/src/Umbraco.Core/Models/Mapping/TabsAndPropertiesMapper.cs b/src/Umbraco.Core/Models/Mapping/TabsAndPropertiesMapper.cs index d2c8fc1303..3716767b3d 100644 --- a/src/Umbraco.Core/Models/Mapping/TabsAndPropertiesMapper.cs +++ b/src/Umbraco.Core/Models/Mapping/TabsAndPropertiesMapper.cs @@ -1,14 +1,13 @@ using System; using System.Collections.Generic; using System.Linq; -using Umbraco.Core; -using Umbraco.Core.Dictionary; -using Umbraco.Core.Mapping; -using Umbraco.Core.Models; -using Umbraco.Core.Services; -using Umbraco.Web.Models.ContentEditing; +using Umbraco.Cms.Core.Dictionary; +using Umbraco.Cms.Core.Mapping; +using Umbraco.Cms.Core.Models.ContentEditing; +using Umbraco.Cms.Core.Services; +using Umbraco.Extensions; -namespace Umbraco.Web.Models.Mapping +namespace Umbraco.Cms.Core.Models.Mapping { public abstract class TabsAndPropertiesMapper { diff --git a/src/Umbraco.Core/Models/Mapping/TagMapDefinition.cs b/src/Umbraco.Core/Models/Mapping/TagMapDefinition.cs index 32912489c2..a23ce1ed69 100644 --- a/src/Umbraco.Core/Models/Mapping/TagMapDefinition.cs +++ b/src/Umbraco.Core/Models/Mapping/TagMapDefinition.cs @@ -1,7 +1,6 @@ -using Umbraco.Core.Mapping; -using Umbraco.Core.Models; +using Umbraco.Cms.Core.Mapping; -namespace Umbraco.Web.Models.Mapping +namespace Umbraco.Cms.Core.Models.Mapping { public class TagMapDefinition : IMapDefinition { diff --git a/src/Umbraco.Core/Models/Mapping/TemplateMapDefinition.cs b/src/Umbraco.Core/Models/Mapping/TemplateMapDefinition.cs index 99b69c1fb3..8ca26244e3 100644 --- a/src/Umbraco.Core/Models/Mapping/TemplateMapDefinition.cs +++ b/src/Umbraco.Core/Models/Mapping/TemplateMapDefinition.cs @@ -1,9 +1,8 @@ -using Umbraco.Core.Mapping; -using Umbraco.Core.Models; -using Umbraco.Core.Strings; -using Umbraco.Web.Models.ContentEditing; +using Umbraco.Cms.Core.Mapping; +using Umbraco.Cms.Core.Models.ContentEditing; +using Umbraco.Cms.Core.Strings; -namespace Umbraco.Web.Models.Mapping +namespace Umbraco.Cms.Core.Models.Mapping { public class TemplateMapDefinition : IMapDefinition { diff --git a/src/Umbraco.Core/Models/Mapping/UserMapDefinition.cs b/src/Umbraco.Core/Models/Mapping/UserMapDefinition.cs index d206aac998..3631629c7b 100644 --- a/src/Umbraco.Core/Models/Mapping/UserMapDefinition.cs +++ b/src/Umbraco.Core/Models/Mapping/UserMapDefinition.cs @@ -3,23 +3,21 @@ using System.Collections.Generic; using System.Globalization; using System.Linq; using Microsoft.Extensions.Options; -using Umbraco.Core; -using Umbraco.Core.Cache; -using Umbraco.Core.Configuration.Models; -using Umbraco.Core.IO; -using Umbraco.Core.Mapping; -using Umbraco.Core.Media; -using Umbraco.Core.Models; -using Umbraco.Core.Models.Entities; -using Umbraco.Core.Models.Membership; -using Umbraco.Core.Models.Sections; -using Umbraco.Core.Services; -using Umbraco.Core.Strings; -using Umbraco.Web.Actions; -using Umbraco.Web.Models.ContentEditing; -using Umbraco.Web.Services; +using Umbraco.Cms.Core.Actions; +using Umbraco.Cms.Core.Cache; +using Umbraco.Cms.Core.Configuration.Models; +using Umbraco.Cms.Core.IO; +using Umbraco.Cms.Core.Mapping; +using Umbraco.Cms.Core.Media; +using Umbraco.Cms.Core.Models.ContentEditing; +using Umbraco.Cms.Core.Models.Entities; +using Umbraco.Cms.Core.Models.Membership; +using Umbraco.Cms.Core.Sections; +using Umbraco.Cms.Core.Services; +using Umbraco.Cms.Core.Strings; +using Umbraco.Extensions; -namespace Umbraco.Web.Models.Mapping +namespace Umbraco.Cms.Core.Models.Mapping { public class UserMapDefinition : IMapDefinition { diff --git a/src/Umbraco.Core/Models/Media.cs b/src/Umbraco.Core/Models/Media.cs index c4e841f27b..f5b3574be7 100644 --- a/src/Umbraco.Core/Models/Media.cs +++ b/src/Umbraco.Core/Models/Media.cs @@ -1,7 +1,7 @@ using System; using System.Runtime.Serialization; -namespace Umbraco.Core.Models +namespace Umbraco.Cms.Core.Models { /// /// Represents a Media object diff --git a/src/Umbraco.Core/Models/MediaExtensions.cs b/src/Umbraco.Core/Models/MediaExtensions.cs index 5b444c6af8..a7571d6317 100644 --- a/src/Umbraco.Core/Models/MediaExtensions.cs +++ b/src/Umbraco.Core/Models/MediaExtensions.cs @@ -1,8 +1,9 @@ using System.Linq; -using Umbraco.Core.Configuration.Models; -using Umbraco.Core.PropertyEditors; +using Umbraco.Cms.Core.Configuration.Models; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Core.PropertyEditors; -namespace Umbraco.Core.Models +namespace Umbraco.Extensions { public static class MediaExtensions { @@ -16,7 +17,7 @@ namespace Umbraco.Core.Models // TODO: would need to be adjusted to variations, when media become variants if (mediaUrlGenerators.TryGetMediaPath(property.PropertyType.PropertyEditorAlias, property.GetValue(), out var mediaUrl)) - { + { return mediaUrl; } diff --git a/src/Umbraco.Core/Models/MediaType.cs b/src/Umbraco.Core/Models/MediaType.cs index 0c59ba6750..dbdf1eeb15 100644 --- a/src/Umbraco.Core/Models/MediaType.cs +++ b/src/Umbraco.Core/Models/MediaType.cs @@ -1,8 +1,8 @@ using System; using System.Runtime.Serialization; -using Umbraco.Core.Strings; +using Umbraco.Cms.Core.Strings; -namespace Umbraco.Core.Models +namespace Umbraco.Cms.Core.Models { /// /// Represents the content type that a object is based on diff --git a/src/Umbraco.Core/Models/Member.cs b/src/Umbraco.Core/Models/Member.cs index 7a3b2fd20f..146f19bf36 100644 --- a/src/Umbraco.Core/Models/Member.cs +++ b/src/Umbraco.Core/Models/Member.cs @@ -3,9 +3,9 @@ using System.Collections.Generic; using System.ComponentModel; using System.Runtime.Serialization; using Microsoft.Extensions.Logging; +using Umbraco.Extensions; - -namespace Umbraco.Core.Models +namespace Umbraco.Cms.Core.Models { /// /// Represents a Member object @@ -99,6 +99,34 @@ namespace Umbraco.Core.Models /// /// /// + /// + /// + /// + public Member(string name, string email, string username, IMemberType contentType, int userId, bool isApproved = true) + : base(name, -1, contentType, new PropertyCollection()) + { + if (name == null) throw new ArgumentNullException(nameof(name)); + if (string.IsNullOrWhiteSpace(name)) throw new ArgumentException("Value can't be empty or consist only of white-space characters.", nameof(name)); + if (email == null) throw new ArgumentNullException(nameof(email)); + if (string.IsNullOrWhiteSpace(email)) throw new ArgumentException("Value can't be empty or consist only of white-space characters.", nameof(email)); + if (username == null) throw new ArgumentNullException(nameof(username)); + if (string.IsNullOrWhiteSpace(username)) throw new ArgumentException("Value can't be empty or consist only of white-space characters.", nameof(username)); + + _email = email; + _username = username; + CreatorId = userId; + IsApproved = isApproved; + + //this cannot be null but can be empty + _rawPasswordValue = ""; + } + + /// + /// Constructor for creating a Member object + /// + /// + /// + /// /// /// The password value passed in to this parameter should be the encoded/encrypted/hashed format of the member's password /// @@ -133,6 +161,28 @@ namespace Umbraco.Core.Models IsApproved = isApproved; } + /// + /// Constructor for creating a Member object + /// + /// + /// + /// + /// + /// The password value passed in to this parameter should be the encoded/encrypted/hashed format of the member's password + /// + /// + /// + /// + public Member(string name, string email, string username, string rawPasswordValue, IMemberType contentType, bool isApproved, int userId) + : base(name, -1, contentType, new PropertyCollection()) + { + _email = email; + _username = username; + _rawPasswordValue = rawPasswordValue; + IsApproved = isApproved; + CreatorId = userId; + } + /// /// Gets or sets the Username /// diff --git a/src/Umbraco.Core/Models/MemberGroup.cs b/src/Umbraco.Core/Models/MemberGroup.cs index 8c06da418d..3e712bbb61 100644 --- a/src/Umbraco.Core/Models/MemberGroup.cs +++ b/src/Umbraco.Core/Models/MemberGroup.cs @@ -1,9 +1,9 @@ using System; using System.Collections.Generic; using System.Runtime.Serialization; -using Umbraco.Core.Models.Entities; +using Umbraco.Cms.Core.Models.Entities; -namespace Umbraco.Core.Models +namespace Umbraco.Cms.Core.Models { /// /// Represents a member type diff --git a/src/Umbraco.Core/Models/MemberType.cs b/src/Umbraco.Core/Models/MemberType.cs index 00f3870ed9..b55c598cac 100644 --- a/src/Umbraco.Core/Models/MemberType.cs +++ b/src/Umbraco.Core/Models/MemberType.cs @@ -1,9 +1,10 @@ using System; using System.Collections.Generic; using System.Runtime.Serialization; -using Umbraco.Core.Strings; +using Umbraco.Cms.Core.Strings; +using Umbraco.Extensions; -namespace Umbraco.Core.Models +namespace Umbraco.Cms.Core.Models { /// /// Represents the content type that a object is based on diff --git a/src/Umbraco.Core/Models/MemberTypePropertyProfileAccess.cs b/src/Umbraco.Core/Models/MemberTypePropertyProfileAccess.cs index 0be9080841..89bf2f283d 100644 --- a/src/Umbraco.Core/Models/MemberTypePropertyProfileAccess.cs +++ b/src/Umbraco.Core/Models/MemberTypePropertyProfileAccess.cs @@ -1,4 +1,4 @@ -namespace Umbraco.Core.Models +namespace Umbraco.Cms.Core.Models { /// /// Used to track the property types that are visible/editable on member profiles diff --git a/src/Umbraco.Core/Models/MemberUserAdapter.cs b/src/Umbraco.Core/Models/MemberUserAdapter.cs deleted file mode 100644 index 3d5ee7a33a..0000000000 --- a/src/Umbraco.Core/Models/MemberUserAdapter.cs +++ /dev/null @@ -1,96 +0,0 @@ -using System; -using System.Collections.Generic; -using System.ComponentModel; -using Umbraco.Core.Models.Membership; - -namespace Umbraco.Core.Models -{ - public class MemberUserAdapter : IMemberUserAdapter - { - private readonly IMember _member; - - /// - /// Initializes a new instance of the class. - /// Member adaptor to use existing user change password functionality and other shared functions - /// - /// The member to adapt - public MemberUserAdapter(IMember member) - { - _member = member; - } - - // This is the only reason we currently need this adaptor - public IEnumerable AllowedSections => new List() - { - Constants.Applications.Users - }; - - - public UserState UserState { get; } - public string Name { get; set; } - public int SessionTimeout { get; set; } - public int[] StartContentIds { get; set; } - public int[] StartMediaIds { get; set; } - public string Language { get; set; } - public DateTime? InvitedDate { get; set; } - public IEnumerable Groups { get; } - public void RemoveGroup(string @group) => throw new NotImplementedException(); - - public void ClearGroups() => throw new NotImplementedException(); - - public void AddGroup(IReadOnlyUserGroup @group) => throw new NotImplementedException(); - - public IProfile ProfileData { get; } - public string Avatar { get; set; } - public string TourData { get; set; } - public T FromUserCache(string cacheKey) where T : class => throw new NotImplementedException(); - - public void ToUserCache(string cacheKey, T vals) where T : class => throw new NotImplementedException(); - - public object DeepClone() => throw new NotImplementedException(); - - public int Id { get; set; } - public Guid Key { get; set; } - public DateTime CreateDate { get; set; } - public DateTime UpdateDate { get; set; } - public DateTime? DeleteDate { get; set; } - public bool HasIdentity { get; } - public void ResetIdentity() => throw new NotImplementedException(); - - public string Username { get; set; } - public string Email { get; set; } - public DateTime? EmailConfirmedDate { get; set; } - public string RawPasswordValue { get; set; } - public string PasswordConfiguration { get; set; } - public string Comments { get; set; } - public bool IsApproved { get; set; } - public bool IsLockedOut { get; set; } - public DateTime LastLoginDate { get; set; } - public DateTime LastPasswordChangeDate { get; set; } - public DateTime LastLockoutDate { get; set; } - public int FailedPasswordAttempts { get; set; } - public string SecurityStamp { get; set; } - public bool IsDirty() => throw new NotImplementedException(); - - public bool IsPropertyDirty(string propName) => throw new NotImplementedException(); - - public IEnumerable GetDirtyProperties() => throw new NotImplementedException(); - - public void ResetDirtyProperties() => throw new NotImplementedException(); - - public void DisableChangeTracking() => throw new NotImplementedException(); - - public void EnableChangeTracking() => throw new NotImplementedException(); - - public event PropertyChangedEventHandler PropertyChanged; - public bool WasDirty() => throw new NotImplementedException(); - - public bool WasPropertyDirty(string propertyName) => throw new NotImplementedException(); - - public void ResetWereDirtyProperties() => throw new NotImplementedException(); - - public void ResetDirtyProperties(bool rememberDirty) => throw new NotImplementedException(); - - public IEnumerable GetWereDirtyProperties() => throw new NotImplementedException(); - } -} diff --git a/src/Umbraco.Core/Models/Membership/ContentPermissionSet.cs b/src/Umbraco.Core/Models/Membership/ContentPermissionSet.cs index fcf1228e69..9c585589fa 100644 --- a/src/Umbraco.Core/Models/Membership/ContentPermissionSet.cs +++ b/src/Umbraco.Core/Models/Membership/ContentPermissionSet.cs @@ -1,8 +1,7 @@ using System; -using System.Collections.Generic; -using Umbraco.Core.Models.Entities; +using Umbraco.Cms.Core.Models.Entities; -namespace Umbraco.Core.Models.Membership +namespace Umbraco.Cms.Core.Models.Membership { /// /// Represents an -> user group & permission key value pair collection diff --git a/src/Umbraco.Core/Models/Membership/EntityPermission.cs b/src/Umbraco.Core/Models/Membership/EntityPermission.cs index 156ab2c4bd..4fc975eb50 100644 --- a/src/Umbraco.Core/Models/Membership/EntityPermission.cs +++ b/src/Umbraco.Core/Models/Membership/EntityPermission.cs @@ -1,6 +1,6 @@ using System; -namespace Umbraco.Core.Models.Membership +namespace Umbraco.Cms.Core.Models.Membership { /// /// Represents an entity permission (defined on the user group and derived to retrieve permissions for a given user) diff --git a/src/Umbraco.Core/Models/Membership/EntityPermissionCollection.cs b/src/Umbraco.Core/Models/Membership/EntityPermissionCollection.cs index 12e874d5d7..f1fb0c2297 100644 --- a/src/Umbraco.Core/Models/Membership/EntityPermissionCollection.cs +++ b/src/Umbraco.Core/Models/Membership/EntityPermissionCollection.cs @@ -1,7 +1,7 @@ using System.Collections.Generic; using System.Linq; -namespace Umbraco.Core.Models.Membership +namespace Umbraco.Cms.Core.Models.Membership { /// /// A of diff --git a/src/Umbraco.Core/Models/Membership/EntityPermissionSet.cs b/src/Umbraco.Core/Models/Membership/EntityPermissionSet.cs index e85ab06f33..fc9afd1dc4 100644 --- a/src/Umbraco.Core/Models/Membership/EntityPermissionSet.cs +++ b/src/Umbraco.Core/Models/Membership/EntityPermissionSet.cs @@ -1,8 +1,7 @@ using System; using System.Collections.Generic; -using System.Linq; -namespace Umbraco.Core.Models.Membership +namespace Umbraco.Cms.Core.Models.Membership { /// /// Represents an entity -> user group & permission key value pair collection diff --git a/src/Umbraco.Core/Models/Membership/IMembershipUser.cs b/src/Umbraco.Core/Models/Membership/IMembershipUser.cs index c8ecc4b3c6..29a6bf4cdb 100644 --- a/src/Umbraco.Core/Models/Membership/IMembershipUser.cs +++ b/src/Umbraco.Core/Models/Membership/IMembershipUser.cs @@ -1,7 +1,7 @@ using System; -using Umbraco.Core.Models.Entities; +using Umbraco.Cms.Core.Models.Entities; -namespace Umbraco.Core.Models.Membership +namespace Umbraco.Cms.Core.Models.Membership { /// /// Defines the base contract for and diff --git a/src/Umbraco.Core/Models/Membership/IProfile.cs b/src/Umbraco.Core/Models/Membership/IProfile.cs index 7da095bb14..773b7f5607 100644 --- a/src/Umbraco.Core/Models/Membership/IProfile.cs +++ b/src/Umbraco.Core/Models/Membership/IProfile.cs @@ -1,4 +1,4 @@ -namespace Umbraco.Core.Models.Membership +namespace Umbraco.Cms.Core.Models.Membership { /// /// Defines the User Profile interface diff --git a/src/Umbraco.Core/Models/Membership/IReadOnlyUserGroup.cs b/src/Umbraco.Core/Models/Membership/IReadOnlyUserGroup.cs index 571c13cf70..f75d42d790 100644 --- a/src/Umbraco.Core/Models/Membership/IReadOnlyUserGroup.cs +++ b/src/Umbraco.Core/Models/Membership/IReadOnlyUserGroup.cs @@ -1,6 +1,6 @@ using System.Collections.Generic; -namespace Umbraco.Core.Models.Membership +namespace Umbraco.Cms.Core.Models.Membership { /// /// A readonly user group providing basic information diff --git a/src/Umbraco.Core/Models/Membership/IUser.cs b/src/Umbraco.Core/Models/Membership/IUser.cs index 1554c3cef5..a36b155da5 100644 --- a/src/Umbraco.Core/Models/Membership/IUser.cs +++ b/src/Umbraco.Core/Models/Membership/IUser.cs @@ -1,9 +1,8 @@ using System; using System.Collections.Generic; -using System.ComponentModel; -using Umbraco.Core.Models.Entities; +using Umbraco.Cms.Core.Models.Entities; -namespace Umbraco.Core.Models.Membership +namespace Umbraco.Cms.Core.Models.Membership { /// @@ -19,7 +18,7 @@ namespace Umbraco.Core.Models.Membership int[] StartContentIds { get; set; } int[] StartMediaIds { get; set; } string Language { get; set; } - + DateTime? InvitedDate { get; set; } /// diff --git a/src/Umbraco.Core/Models/Membership/IUserGroup.cs b/src/Umbraco.Core/Models/Membership/IUserGroup.cs index 508eb015ed..7278ef5ecc 100644 --- a/src/Umbraco.Core/Models/Membership/IUserGroup.cs +++ b/src/Umbraco.Core/Models/Membership/IUserGroup.cs @@ -1,7 +1,7 @@ using System.Collections.Generic; -using Umbraco.Core.Models.Entities; +using Umbraco.Cms.Core.Models.Entities; -namespace Umbraco.Core.Models.Membership +namespace Umbraco.Cms.Core.Models.Membership { public interface IUserGroup : IEntity, IRememberBeingDirty { diff --git a/src/Umbraco.Core/Models/Membership/MemberCountType.cs b/src/Umbraco.Core/Models/Membership/MemberCountType.cs index 233b5c2424..89990994e8 100644 --- a/src/Umbraco.Core/Models/Membership/MemberCountType.cs +++ b/src/Umbraco.Core/Models/Membership/MemberCountType.cs @@ -1,4 +1,4 @@ -namespace Umbraco.Core.Models.Membership +namespace Umbraco.Cms.Core.Models.Membership { /// /// The types of members to count diff --git a/src/Umbraco.Core/Models/Membership/MemberExportModel.cs b/src/Umbraco.Core/Models/Membership/MemberExportModel.cs index 7a87033ac2..b4114e154f 100644 --- a/src/Umbraco.Core/Models/Membership/MemberExportModel.cs +++ b/src/Umbraco.Core/Models/Membership/MemberExportModel.cs @@ -1,7 +1,7 @@ using System; using System.Collections.Generic; -namespace Umbraco.Core.Models.Membership +namespace Umbraco.Cms.Core.Models.Membership { public class MemberExportModel { diff --git a/src/Umbraco.Core/Models/Membership/MemberExportProperty.cs b/src/Umbraco.Core/Models/Membership/MemberExportProperty.cs index 3d20eb9123..b55ed8a866 100644 --- a/src/Umbraco.Core/Models/Membership/MemberExportProperty.cs +++ b/src/Umbraco.Core/Models/Membership/MemberExportProperty.cs @@ -1,6 +1,6 @@ using System; -namespace Umbraco.Core.Models.Membership +namespace Umbraco.Cms.Core.Models.Membership { public class MemberExportProperty { diff --git a/src/Umbraco.Core/Models/Membership/ReadOnlyUserGroup.cs b/src/Umbraco.Core/Models/Membership/ReadOnlyUserGroup.cs index 2c93664ec6..1d8457e20f 100644 --- a/src/Umbraco.Core/Models/Membership/ReadOnlyUserGroup.cs +++ b/src/Umbraco.Core/Models/Membership/ReadOnlyUserGroup.cs @@ -2,7 +2,7 @@ using System.Collections.Generic; using System.Linq; -namespace Umbraco.Core.Models.Membership +namespace Umbraco.Cms.Core.Models.Membership { public class ReadOnlyUserGroup : IReadOnlyUserGroup, IEquatable { diff --git a/src/Umbraco.Core/Models/Membership/User.cs b/src/Umbraco.Core/Models/Membership/User.cs index 7599997750..3a9dae19d2 100644 --- a/src/Umbraco.Core/Models/Membership/User.cs +++ b/src/Umbraco.Core/Models/Membership/User.cs @@ -2,12 +2,11 @@ using System.Collections.Generic; using System.Linq; using System.Runtime.Serialization; -using Umbraco.Core.Composing; -using Umbraco.Core.Configuration; -using Umbraco.Core.Configuration.Models; -using Umbraco.Core.Models.Entities; +using Umbraco.Cms.Core.Configuration.Models; +using Umbraco.Cms.Core.Models.Entities; +using Umbraco.Extensions; -namespace Umbraco.Core.Models.Membership +namespace Umbraco.Cms.Core.Models.Membership { /// /// Represents a backoffice user @@ -128,7 +127,7 @@ namespace Umbraco.Core.Models.Membership (enum1, enum2) => enum1.UnsortedSequenceEqual(enum2), enum1 => enum1.GetHashCode()); - + [DataMember] public DateTime? EmailConfirmedDate { diff --git a/src/Umbraco.Core/Models/Membership/UserGroup.cs b/src/Umbraco.Core/Models/Membership/UserGroup.cs index c66463af79..0c5f4a7d66 100644 --- a/src/Umbraco.Core/Models/Membership/UserGroup.cs +++ b/src/Umbraco.Core/Models/Membership/UserGroup.cs @@ -1,10 +1,11 @@ using System; using System.Collections.Generic; using System.Runtime.Serialization; -using Umbraco.Core.Models.Entities; -using Umbraco.Core.Strings; +using Umbraco.Cms.Core.Models.Entities; +using Umbraco.Cms.Core.Strings; +using Umbraco.Extensions; -namespace Umbraco.Core.Models.Membership +namespace Umbraco.Cms.Core.Models.Membership { /// /// Represents a Group for a Backoffice User diff --git a/src/Umbraco.Core/Models/Membership/UserGroupExtensions.cs b/src/Umbraco.Core/Models/Membership/UserGroupExtensions.cs index 0c7302b06e..1dabc044f3 100644 --- a/src/Umbraco.Core/Models/Membership/UserGroupExtensions.cs +++ b/src/Umbraco.Core/Models/Membership/UserGroupExtensions.cs @@ -1,4 +1,7 @@ -namespace Umbraco.Core.Models.Membership +using Umbraco.Cms.Core; +using Umbraco.Cms.Core.Models.Membership; + +namespace Umbraco.Extensions { public static class UserGroupExtensions { diff --git a/src/Umbraco.Core/Models/Membership/UserPasswordSettings.cs b/src/Umbraco.Core/Models/Membership/UserPasswordSettings.cs index 4ce349a1c5..b9f271be2f 100644 --- a/src/Umbraco.Core/Models/Membership/UserPasswordSettings.cs +++ b/src/Umbraco.Core/Models/Membership/UserPasswordSettings.cs @@ -1,6 +1,6 @@ using System.Runtime.Serialization; -namespace Umbraco.Core.Models.Membership +namespace Umbraco.Cms.Core.Models.Membership { /// /// The data stored against the user for their password configuration diff --git a/src/Umbraco.Core/Models/Membership/UserProfile.cs b/src/Umbraco.Core/Models/Membership/UserProfile.cs index 14b08dd3cd..edda94aa8f 100644 --- a/src/Umbraco.Core/Models/Membership/UserProfile.cs +++ b/src/Umbraco.Core/Models/Membership/UserProfile.cs @@ -1,6 +1,6 @@ using System; -namespace Umbraco.Core.Models.Membership +namespace Umbraco.Cms.Core.Models.Membership { public class UserProfile : IProfile, IEquatable { diff --git a/src/Umbraco.Core/Models/Membership/UserState.cs b/src/Umbraco.Core/Models/Membership/UserState.cs index fc277b4fa3..13d2077105 100644 --- a/src/Umbraco.Core/Models/Membership/UserState.cs +++ b/src/Umbraco.Core/Models/Membership/UserState.cs @@ -1,4 +1,4 @@ -namespace Umbraco.Core.Models.Membership +namespace Umbraco.Cms.Core.Models.Membership { /// /// The state of a user diff --git a/src/Umbraco.Core/Models/MigrationEntry.cs b/src/Umbraco.Core/Models/MigrationEntry.cs index 1af66d2978..2fc5ea5340 100644 --- a/src/Umbraco.Core/Models/MigrationEntry.cs +++ b/src/Umbraco.Core/Models/MigrationEntry.cs @@ -1,8 +1,8 @@ using System; -using Semver; -using Umbraco.Core.Models.Entities; +using Umbraco.Cms.Core.Models.Entities; +using Umbraco.Cms.Core.Semver; -namespace Umbraco.Core.Models +namespace Umbraco.Cms.Core.Models { public class MigrationEntry : EntityBase, IMigrationEntry { diff --git a/src/Umbraco.Core/Models/Notification.cs b/src/Umbraco.Core/Models/Notification.cs index 351b60039e..b65064f266 100644 --- a/src/Umbraco.Core/Models/Notification.cs +++ b/src/Umbraco.Core/Models/Notification.cs @@ -1,9 +1,6 @@ using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -namespace Umbraco.Core.Models +namespace Umbraco.Cms.Core.Models { public class Notification { diff --git a/src/Umbraco.Core/Models/NotificationEmailBodyParams.cs b/src/Umbraco.Core/Models/NotificationEmailBodyParams.cs index e85284fe5a..89d67763d1 100644 --- a/src/Umbraco.Core/Models/NotificationEmailBodyParams.cs +++ b/src/Umbraco.Core/Models/NotificationEmailBodyParams.cs @@ -1,6 +1,6 @@ using System; -namespace Umbraco.Core.Models +namespace Umbraco.Cms.Core.Models { public class NotificationEmailBodyParams { diff --git a/src/Umbraco.Core/Models/NotificationEmailSubjectParams.cs b/src/Umbraco.Core/Models/NotificationEmailSubjectParams.cs index 07b26dbcc1..fea247d6bf 100644 --- a/src/Umbraco.Core/Models/NotificationEmailSubjectParams.cs +++ b/src/Umbraco.Core/Models/NotificationEmailSubjectParams.cs @@ -1,10 +1,6 @@ using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -namespace Umbraco.Core.Models +namespace Umbraco.Cms.Core.Models { public class NotificationEmailSubjectParams diff --git a/src/Umbraco.Core/Models/ObjectTypes.cs b/src/Umbraco.Core/Models/ObjectTypes.cs index 2ddbdca77a..38211f23fa 100644 --- a/src/Umbraco.Core/Models/ObjectTypes.cs +++ b/src/Umbraco.Core/Models/ObjectTypes.cs @@ -1,9 +1,9 @@ using System; using System.Collections.Concurrent; using System.Reflection; -using Umbraco.Core.CodeAnnotations; +using Umbraco.Cms.Core.CodeAnnotations; -namespace Umbraco.Core.Models +namespace Umbraco.Cms.Core.Models { /// /// Provides utilities and extension methods to handle object types. diff --git a/src/Umbraco.Core/Models/PackageInstallModel.cs b/src/Umbraco.Core/Models/PackageInstallModel.cs index b489604261..e1f61647b5 100644 --- a/src/Umbraco.Core/Models/PackageInstallModel.cs +++ b/src/Umbraco.Core/Models/PackageInstallModel.cs @@ -1,10 +1,7 @@ using System; -using System.Linq; using System.Runtime.Serialization; -using System.Text; -using System.Threading.Tasks; -namespace Umbraco.Web.Models +namespace Umbraco.Cms.Core.Models { [DataContract(Name = "packageInstallModel")] public class PackageInstallModel diff --git a/src/Umbraco.Core/Models/PackageInstallResult.cs b/src/Umbraco.Core/Models/PackageInstallResult.cs index 91b19cda14..6e1a7c747e 100644 --- a/src/Umbraco.Core/Models/PackageInstallResult.cs +++ b/src/Umbraco.Core/Models/PackageInstallResult.cs @@ -1,7 +1,6 @@ -using System; -using System.Runtime.Serialization; +using System.Runtime.Serialization; -namespace Umbraco.Web.Models +namespace Umbraco.Cms.Core.Models { /// /// Model that is returned when a package is totally finished installing diff --git a/src/Umbraco.Core/Models/Packaging/ActionRunAt.cs b/src/Umbraco.Core/Models/Packaging/ActionRunAt.cs index 0023d4dbed..e4f3538d20 100644 --- a/src/Umbraco.Core/Models/Packaging/ActionRunAt.cs +++ b/src/Umbraco.Core/Models/Packaging/ActionRunAt.cs @@ -1,4 +1,4 @@ -namespace Umbraco.Core.Models.Packaging +namespace Umbraco.Cms.Core.Models.Packaging { public enum ActionRunAt { @@ -6,4 +6,4 @@ Install, Uninstall } -} \ No newline at end of file +} diff --git a/src/Umbraco.Core/Models/Packaging/CompiledPackage.cs b/src/Umbraco.Core/Models/Packaging/CompiledPackage.cs index cf48d6ac53..a975141205 100644 --- a/src/Umbraco.Core/Models/Packaging/CompiledPackage.cs +++ b/src/Umbraco.Core/Models/Packaging/CompiledPackage.cs @@ -3,7 +3,7 @@ using System.Collections.Generic; using System.IO; using System.Xml.Linq; -namespace Umbraco.Core.Models.Packaging +namespace Umbraco.Cms.Core.Models.Packaging { /// /// The model of the package definition within an umbraco (zip) package file diff --git a/src/Umbraco.Core/Models/Packaging/CompiledPackageContentBase.cs b/src/Umbraco.Core/Models/Packaging/CompiledPackageContentBase.cs index 7b668796a4..d1e98376aa 100644 --- a/src/Umbraco.Core/Models/Packaging/CompiledPackageContentBase.cs +++ b/src/Umbraco.Core/Models/Packaging/CompiledPackageContentBase.cs @@ -1,6 +1,7 @@ using System.Xml.Linq; +using Umbraco.Extensions; -namespace Umbraco.Core.Models.Packaging +namespace Umbraco.Cms.Core.Models.Packaging { /// /// Compiled representation of a content base (Document or Media) diff --git a/src/Umbraco.Core/Models/Packaging/CompiledPackageFile.cs b/src/Umbraco.Core/Models/Packaging/CompiledPackageFile.cs index 2cb989b42b..c8f1423cbf 100644 --- a/src/Umbraco.Core/Models/Packaging/CompiledPackageFile.cs +++ b/src/Umbraco.Core/Models/Packaging/CompiledPackageFile.cs @@ -1,7 +1,7 @@ using System; using System.Xml.Linq; -namespace Umbraco.Core.Models.Packaging +namespace Umbraco.Cms.Core.Models.Packaging { public class CompiledPackageFile { @@ -22,4 +22,4 @@ namespace Umbraco.Core.Models.Packaging public string OriginalName { get; set; } } -} \ No newline at end of file +} diff --git a/src/Umbraco.Core/Models/Packaging/IPackageInfo.cs b/src/Umbraco.Core/Models/Packaging/IPackageInfo.cs index e4e9addf76..817ef086c9 100644 --- a/src/Umbraco.Core/Models/Packaging/IPackageInfo.cs +++ b/src/Umbraco.Core/Models/Packaging/IPackageInfo.cs @@ -1,7 +1,7 @@ using System; using System.Collections.Generic; -namespace Umbraco.Core.Models.Packaging +namespace Umbraco.Cms.Core.Models.Packaging { public interface IPackageInfo { diff --git a/src/Umbraco.Core/Models/Packaging/PackageAction.cs b/src/Umbraco.Core/Models/Packaging/PackageAction.cs index ab7b120eae..25c04c0480 100644 --- a/src/Umbraco.Core/Models/Packaging/PackageAction.cs +++ b/src/Umbraco.Core/Models/Packaging/PackageAction.cs @@ -2,7 +2,7 @@ using System.Runtime.Serialization; using System.Xml.Linq; -namespace Umbraco.Core.Models.Packaging +namespace Umbraco.Cms.Core.Models.Packaging { /// /// Defines a package action declared within a package manifest diff --git a/src/Umbraco.Core/Models/Packaging/PreInstallWarnings.cs b/src/Umbraco.Core/Models/Packaging/PreInstallWarnings.cs index 69c7a5641d..646084bbdf 100644 --- a/src/Umbraco.Core/Models/Packaging/PreInstallWarnings.cs +++ b/src/Umbraco.Core/Models/Packaging/PreInstallWarnings.cs @@ -1,9 +1,7 @@ -using System; -using System.Collections.Generic; +using System.Collections.Generic; using System.Linq; -using System.Runtime.Serialization; -namespace Umbraco.Core.Models.Packaging +namespace Umbraco.Cms.Core.Models.Packaging { public class PreInstallWarnings { diff --git a/src/Umbraco.Core/Models/Packaging/RequirementsType.cs b/src/Umbraco.Core/Models/Packaging/RequirementsType.cs index 2b6894ed0f..114c95bfcb 100644 --- a/src/Umbraco.Core/Models/Packaging/RequirementsType.cs +++ b/src/Umbraco.Core/Models/Packaging/RequirementsType.cs @@ -1,4 +1,4 @@ -namespace Umbraco.Core.Models.Packaging +namespace Umbraco.Cms.Core.Models.Packaging { public enum RequirementsType { diff --git a/src/Umbraco.Core/Models/PagedResult.cs b/src/Umbraco.Core/Models/PagedResult.cs index 4119751eb3..f15768cc2d 100644 --- a/src/Umbraco.Core/Models/PagedResult.cs +++ b/src/Umbraco.Core/Models/PagedResult.cs @@ -1,7 +1,7 @@ using System; using System.Runtime.Serialization; -namespace Umbraco.Core.Models +namespace Umbraco.Cms.Core.Models { /// /// Represents a paged result for a model collection diff --git a/src/Umbraco.Core/Models/PagedResultOfT.cs b/src/Umbraco.Core/Models/PagedResultOfT.cs index efb68863dd..dc51cfdb1b 100644 --- a/src/Umbraco.Core/Models/PagedResultOfT.cs +++ b/src/Umbraco.Core/Models/PagedResultOfT.cs @@ -1,7 +1,7 @@ using System.Collections.Generic; using System.Runtime.Serialization; -namespace Umbraco.Core.Models +namespace Umbraco.Cms.Core.Models { /// /// Represents a paged result for a model collection diff --git a/src/Umbraco.Core/Models/PartialView.cs b/src/Umbraco.Core/Models/PartialView.cs index 130d240c6d..fa090305b2 100644 --- a/src/Umbraco.Core/Models/PartialView.cs +++ b/src/Umbraco.Core/Models/PartialView.cs @@ -1,7 +1,7 @@ using System; using System.Runtime.Serialization; -namespace Umbraco.Core.Models +namespace Umbraco.Cms.Core.Models { /// /// Represents a Partial View file diff --git a/src/Umbraco.Core/Models/PartialViewMacroModel.cs b/src/Umbraco.Core/Models/PartialViewMacroModel.cs index f3272644f4..1ab2078a76 100644 --- a/src/Umbraco.Core/Models/PartialViewMacroModel.cs +++ b/src/Umbraco.Core/Models/PartialViewMacroModel.cs @@ -1,7 +1,7 @@ using System.Collections.Generic; -using Umbraco.Core.Models.PublishedContent; +using Umbraco.Cms.Core.Models.PublishedContent; -namespace Umbraco.Web.Models +namespace Umbraco.Cms.Core.Models { /// /// The model used when rendering Partial View Macros @@ -21,7 +21,7 @@ namespace Umbraco.Web.Models MacroAlias = macroAlias; MacroId = macroId; } - + public IPublishedContent Content { get; } public string MacroName { get; } public string MacroAlias { get; } diff --git a/src/Umbraco.Core/Models/PartialViewMacroModelExtensions.cs b/src/Umbraco.Core/Models/PartialViewMacroModelExtensions.cs index 9a74a1db31..8ec2206d60 100644 --- a/src/Umbraco.Core/Models/PartialViewMacroModelExtensions.cs +++ b/src/Umbraco.Core/Models/PartialViewMacroModelExtensions.cs @@ -1,6 +1,6 @@ -using Umbraco.Core; +using Umbraco.Cms.Core.Models; -namespace Umbraco.Web.Models +namespace Umbraco.Extensions { /// /// Extension methods for the PartialViewMacroModel object diff --git a/src/Umbraco.Core/Models/PartialViewType.cs b/src/Umbraco.Core/Models/PartialViewType.cs index 6204b6e165..5dc6dbc59c 100644 --- a/src/Umbraco.Core/Models/PartialViewType.cs +++ b/src/Umbraco.Core/Models/PartialViewType.cs @@ -1,4 +1,4 @@ -namespace Umbraco.Core.Models +namespace Umbraco.Cms.Core.Models { public enum PartialViewType : byte { diff --git a/src/Umbraco.Core/Models/PasswordChangedModel.cs b/src/Umbraco.Core/Models/PasswordChangedModel.cs index cdebd90fc5..11696cfc08 100644 --- a/src/Umbraco.Core/Models/PasswordChangedModel.cs +++ b/src/Umbraco.Core/Models/PasswordChangedModel.cs @@ -1,6 +1,6 @@ using System.ComponentModel.DataAnnotations; -namespace Umbraco.Web.Models +namespace Umbraco.Cms.Core.Models { /// /// A model representing an attempt at changing a password diff --git a/src/Umbraco.Core/Models/Property.cs b/src/Umbraco.Core/Models/Property.cs index 798f84cf6f..00a774cc25 100644 --- a/src/Umbraco.Core/Models/Property.cs +++ b/src/Umbraco.Core/Models/Property.cs @@ -3,10 +3,11 @@ using System.Collections; using System.Collections.Generic; using System.Linq; using System.Runtime.Serialization; -using Umbraco.Core.Collections; -using Umbraco.Core.Models.Entities; +using Umbraco.Cms.Core.Collections; +using Umbraco.Cms.Core.Models.Entities; +using Umbraco.Extensions; -namespace Umbraco.Core.Models +namespace Umbraco.Cms.Core.Models { /// /// Represents a property. diff --git a/src/Umbraco.Core/Models/PropertyCollection.cs b/src/Umbraco.Core/Models/PropertyCollection.cs index 21b13d58da..593e163e03 100644 --- a/src/Umbraco.Core/Models/PropertyCollection.cs +++ b/src/Umbraco.Core/Models/PropertyCollection.cs @@ -4,8 +4,9 @@ using System.Collections.ObjectModel; using System.Collections.Specialized; using System.Linq; using System.Runtime.Serialization; +using Umbraco.Extensions; -namespace Umbraco.Core.Models +namespace Umbraco.Cms.Core.Models { /// diff --git a/src/Umbraco.Core/Models/PropertyGroup.cs b/src/Umbraco.Core/Models/PropertyGroup.cs index 022fb6ed03..e086839304 100644 --- a/src/Umbraco.Core/Models/PropertyGroup.cs +++ b/src/Umbraco.Core/Models/PropertyGroup.cs @@ -2,9 +2,10 @@ using System.Collections.Specialized; using System.Diagnostics; using System.Runtime.Serialization; -using Umbraco.Core.Models.Entities; +using Umbraco.Cms.Core.Models.Entities; +using Umbraco.Extensions; -namespace Umbraco.Core.Models +namespace Umbraco.Cms.Core.Models { /// /// A group of property types, which corresponds to the properties grouped under a Tab. @@ -69,7 +70,7 @@ namespace Umbraco.Core.Models { _propertyTypes.ClearCollectionChangedEvents(); } - + _propertyTypes = value; // since we're adding this collection to this group, diff --git a/src/Umbraco.Core/Models/PropertyGroupCollection.cs b/src/Umbraco.Core/Models/PropertyGroupCollection.cs index 11f4e470ee..a82f2278af 100644 --- a/src/Umbraco.Core/Models/PropertyGroupCollection.cs +++ b/src/Umbraco.Core/Models/PropertyGroupCollection.cs @@ -6,7 +6,7 @@ using System.Linq; using System.Runtime.Serialization; using System.Threading; -namespace Umbraco.Core.Models +namespace Umbraco.Cms.Core.Models { /// diff --git a/src/Umbraco.Core/Models/PropertyTagsExtensions.cs b/src/Umbraco.Core/Models/PropertyTagsExtensions.cs index ba33547dd6..390f644831 100644 --- a/src/Umbraco.Core/Models/PropertyTagsExtensions.cs +++ b/src/Umbraco.Core/Models/PropertyTagsExtensions.cs @@ -2,11 +2,13 @@ using System.Collections.Generic; using System.Linq; using Microsoft.Extensions.Logging; -using Umbraco.Core.PropertyEditors; -using Umbraco.Core.Serialization; -using Umbraco.Core.Services; +using Umbraco.Cms.Core; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Core.PropertyEditors; +using Umbraco.Cms.Core.Serialization; +using Umbraco.Cms.Core.Services; -namespace Umbraco.Core.Models +namespace Umbraco.Extensions { /// /// Provides extension methods for the class to manage tags. diff --git a/src/Umbraco.Core/Models/PropertyType.cs b/src/Umbraco.Core/Models/PropertyType.cs index 4ded638e44..29e3dd6f33 100644 --- a/src/Umbraco.Core/Models/PropertyType.cs +++ b/src/Umbraco.Core/Models/PropertyType.cs @@ -1,12 +1,11 @@ using System; using System.Diagnostics; -using System.Linq; using System.Runtime.Serialization; -using Umbraco.Core.Composing; -using Umbraco.Core.Models.Entities; -using Umbraco.Core.Strings; +using Umbraco.Cms.Core.Models.Entities; +using Umbraco.Cms.Core.Strings; +using Umbraco.Extensions; -namespace Umbraco.Core.Models +namespace Umbraco.Cms.Core.Models { /// /// Represents a property type. diff --git a/src/Umbraco.Core/Models/PropertyTypeCollection.cs b/src/Umbraco.Core/Models/PropertyTypeCollection.cs index 132c80e7d1..df4e3c65e7 100644 --- a/src/Umbraco.Core/Models/PropertyTypeCollection.cs +++ b/src/Umbraco.Core/Models/PropertyTypeCollection.cs @@ -6,7 +6,7 @@ using System.Linq; using System.Runtime.Serialization; using System.Threading; -namespace Umbraco.Core.Models +namespace Umbraco.Cms.Core.Models { //public interface IPropertyTypeCollection: IEnumerable @@ -84,7 +84,7 @@ namespace Umbraco.Core.Models } // 'new' keyword is required! we can explicitly implement ICollection.Add BUT since normally a concrete PropertyType type - // is passed in, the explicit implementation doesn't get called, this ensures it does get called. + // is passed in, the explicit implementation doesn't get called, this ensures it does get called. public new void Add(IPropertyType item) { item.SupportsPublishing = SupportsPublishing; @@ -165,7 +165,7 @@ namespace Umbraco.Core.Models } public event NotifyCollectionChangedEventHandler CollectionChanged; - + /// /// Clears all event handlers /// diff --git a/src/Umbraco.Core/Models/PublicAccessEntry.cs b/src/Umbraco.Core/Models/PublicAccessEntry.cs index e48e3bd711..d5bb3d95c0 100644 --- a/src/Umbraco.Core/Models/PublicAccessEntry.cs +++ b/src/Umbraco.Core/Models/PublicAccessEntry.cs @@ -1,13 +1,12 @@ using System; using System.Collections.Generic; -using System.Collections.ObjectModel; using System.Collections.Specialized; using System.Linq; using System.Runtime.Serialization; -using Umbraco.Core.Collections; -using Umbraco.Core.Models.Entities; +using Umbraco.Cms.Core.Collections; +using Umbraco.Cms.Core.Models.Entities; -namespace Umbraco.Core.Models +namespace Umbraco.Cms.Core.Models { [Serializable] [DataContract(IsReference = true)] @@ -77,7 +76,7 @@ namespace Umbraco.Core.Models } } - + public IEnumerable RemovedRules => _removedRules; public IEnumerable Rules => _ruleCollection; diff --git a/src/Umbraco.Core/Models/PublicAccessRule.cs b/src/Umbraco.Core/Models/PublicAccessRule.cs index 482ddd0638..0b66c5a289 100644 --- a/src/Umbraco.Core/Models/PublicAccessRule.cs +++ b/src/Umbraco.Core/Models/PublicAccessRule.cs @@ -1,8 +1,8 @@ using System; using System.Runtime.Serialization; -using Umbraco.Core.Models.Entities; +using Umbraco.Cms.Core.Models.Entities; -namespace Umbraco.Core.Models +namespace Umbraco.Cms.Core.Models { [Serializable] [DataContract(IsReference = true)] diff --git a/src/Umbraco.Core/Models/PublishedContent/Fallback.cs b/src/Umbraco.Core/Models/PublishedContent/Fallback.cs index 0434218555..1aaa0d9814 100644 --- a/src/Umbraco.Core/Models/PublishedContent/Fallback.cs +++ b/src/Umbraco.Core/Models/PublishedContent/Fallback.cs @@ -2,7 +2,7 @@ using System.Collections; using System.Collections.Generic; -namespace Umbraco.Core.Models.PublishedContent +namespace Umbraco.Cms.Core.Models.PublishedContent { /// /// Manages the built-in fallback policies. diff --git a/src/Umbraco.Core/Models/PublishedContent/HttpContextVariationContextAccessor.cs b/src/Umbraco.Core/Models/PublishedContent/HttpContextVariationContextAccessor.cs index 9410a4f611..47b8395897 100644 --- a/src/Umbraco.Core/Models/PublishedContent/HttpContextVariationContextAccessor.cs +++ b/src/Umbraco.Core/Models/PublishedContent/HttpContextVariationContextAccessor.cs @@ -1,7 +1,6 @@ -using Umbraco.Core.Cache; -using Umbraco.Core.Models.PublishedContent; +using Umbraco.Cms.Core.Cache; -namespace Umbraco.Web.Models.PublishedContent +namespace Umbraco.Cms.Core.Models.PublishedContent { /// /// Implements on top of . diff --git a/src/Umbraco.Core/Models/PublishedContent/HybridVariationContextAccessor.cs b/src/Umbraco.Core/Models/PublishedContent/HybridVariationContextAccessor.cs index 6f97c1dc5c..c412a4de3a 100644 --- a/src/Umbraco.Core/Models/PublishedContent/HybridVariationContextAccessor.cs +++ b/src/Umbraco.Core/Models/PublishedContent/HybridVariationContextAccessor.cs @@ -1,7 +1,6 @@ -using Umbraco.Core.Cache; -using Umbraco.Core.Models.PublishedContent; +using Umbraco.Cms.Core.Cache; -namespace Umbraco.Web.Models.PublishedContent +namespace Umbraco.Cms.Core.Models.PublishedContent { /// /// Implements a hybrid . diff --git a/src/Umbraco.Core/Models/PublishedContent/ILivePublishedModelFactory.cs b/src/Umbraco.Core/Models/PublishedContent/ILivePublishedModelFactory.cs index 091893fb72..f16fe0d3f5 100644 --- a/src/Umbraco.Core/Models/PublishedContent/ILivePublishedModelFactory.cs +++ b/src/Umbraco.Core/Models/PublishedContent/ILivePublishedModelFactory.cs @@ -1,4 +1,4 @@ -namespace Umbraco.Core.Models.PublishedContent +namespace Umbraco.Cms.Core.Models.PublishedContent { /// diff --git a/src/Umbraco.Core/Models/PublishedContent/IPublishedContent.cs b/src/Umbraco.Core/Models/PublishedContent/IPublishedContent.cs index f8784973b7..5d4eb2f74f 100644 --- a/src/Umbraco.Core/Models/PublishedContent/IPublishedContent.cs +++ b/src/Umbraco.Core/Models/PublishedContent/IPublishedContent.cs @@ -1,7 +1,7 @@ using System; using System.Collections.Generic; -namespace Umbraco.Core.Models.PublishedContent +namespace Umbraco.Cms.Core.Models.PublishedContent { /// /// diff --git a/src/Umbraco.Core/Models/PublishedContent/IPublishedContentType.cs b/src/Umbraco.Core/Models/PublishedContent/IPublishedContentType.cs index f9330176aa..866acc0c4d 100644 --- a/src/Umbraco.Core/Models/PublishedContent/IPublishedContentType.cs +++ b/src/Umbraco.Core/Models/PublishedContent/IPublishedContentType.cs @@ -1,7 +1,7 @@ using System; using System.Collections.Generic; -namespace Umbraco.Core.Models.PublishedContent +namespace Umbraco.Cms.Core.Models.PublishedContent { /// /// Represents an type. diff --git a/src/Umbraco.Core/Models/PublishedContent/IPublishedContentTypeFactory.cs b/src/Umbraco.Core/Models/PublishedContent/IPublishedContentTypeFactory.cs index cc514b791e..b1a1740b31 100644 --- a/src/Umbraco.Core/Models/PublishedContent/IPublishedContentTypeFactory.cs +++ b/src/Umbraco.Core/Models/PublishedContent/IPublishedContentTypeFactory.cs @@ -1,4 +1,4 @@ -namespace Umbraco. Core.Models.PublishedContent +namespace Umbraco.Cms.Core.Models.PublishedContent { /// diff --git a/src/Umbraco.Core/Models/PublishedContent/IPublishedElement.cs b/src/Umbraco.Core/Models/PublishedContent/IPublishedElement.cs index 4c72dc914a..f70fb9db7b 100644 --- a/src/Umbraco.Core/Models/PublishedContent/IPublishedElement.cs +++ b/src/Umbraco.Core/Models/PublishedContent/IPublishedElement.cs @@ -1,7 +1,7 @@ using System; using System.Collections.Generic; -namespace Umbraco.Core.Models.PublishedContent +namespace Umbraco.Cms.Core.Models.PublishedContent { /// /// Represents a published element. diff --git a/src/Umbraco.Core/Models/PublishedContent/IPublishedModelFactory.cs b/src/Umbraco.Core/Models/PublishedContent/IPublishedModelFactory.cs index 60fa0fe603..0d7440ff9c 100644 --- a/src/Umbraco.Core/Models/PublishedContent/IPublishedModelFactory.cs +++ b/src/Umbraco.Core/Models/PublishedContent/IPublishedModelFactory.cs @@ -1,7 +1,7 @@ using System; using System.Collections; -namespace Umbraco.Core.Models.PublishedContent +namespace Umbraco.Cms.Core.Models.PublishedContent { /// diff --git a/src/Umbraco.Core/Models/PublishedContent/IPublishedProperty.cs b/src/Umbraco.Core/Models/PublishedContent/IPublishedProperty.cs index 2ee7dcb28f..0c4bf4c4eb 100644 --- a/src/Umbraco.Core/Models/PublishedContent/IPublishedProperty.cs +++ b/src/Umbraco.Core/Models/PublishedContent/IPublishedProperty.cs @@ -1,4 +1,4 @@ -namespace Umbraco.Core.Models.PublishedContent +namespace Umbraco.Cms.Core.Models.PublishedContent { /// /// Represents a property of an IPublishedElement. diff --git a/src/Umbraco.Core/Models/PublishedContent/IPublishedPropertyType.cs b/src/Umbraco.Core/Models/PublishedContent/IPublishedPropertyType.cs index 40f2bf3df2..04d900e89f 100644 --- a/src/Umbraco.Core/Models/PublishedContent/IPublishedPropertyType.cs +++ b/src/Umbraco.Core/Models/PublishedContent/IPublishedPropertyType.cs @@ -1,7 +1,7 @@ using System; -using Umbraco.Core.PropertyEditors; +using Umbraco.Cms.Core.PropertyEditors; -namespace Umbraco.Core.Models.PublishedContent +namespace Umbraco.Cms.Core.Models.PublishedContent { /// /// Represents a published property type. @@ -105,4 +105,4 @@ namespace Umbraco.Core.Models.PublishedContent /// Type ClrType { get; } } -} \ No newline at end of file +} diff --git a/src/Umbraco.Core/Models/PublishedContent/IPublishedValueFallback.cs b/src/Umbraco.Core/Models/PublishedContent/IPublishedValueFallback.cs index 23df9e485f..4ece22ab22 100644 --- a/src/Umbraco.Core/Models/PublishedContent/IPublishedValueFallback.cs +++ b/src/Umbraco.Core/Models/PublishedContent/IPublishedValueFallback.cs @@ -1,4 +1,4 @@ -namespace Umbraco.Core.Models.PublishedContent +namespace Umbraco.Cms.Core.Models.PublishedContent { /// /// Provides a fallback strategy for getting values. diff --git a/src/Umbraco.Core/Models/PublishedContent/IVariationContextAccessor.cs b/src/Umbraco.Core/Models/PublishedContent/IVariationContextAccessor.cs index b9c416da00..39f256faf2 100644 --- a/src/Umbraco.Core/Models/PublishedContent/IVariationContextAccessor.cs +++ b/src/Umbraco.Core/Models/PublishedContent/IVariationContextAccessor.cs @@ -1,4 +1,4 @@ -namespace Umbraco.Core.Models.PublishedContent +namespace Umbraco.Cms.Core.Models.PublishedContent { /// /// Gives access to the current . diff --git a/src/Umbraco.Core/Models/PublishedContent/IndexedArrayItem.cs b/src/Umbraco.Core/Models/PublishedContent/IndexedArrayItem.cs index 4b0432ca50..7c7049c026 100644 --- a/src/Umbraco.Core/Models/PublishedContent/IndexedArrayItem.cs +++ b/src/Umbraco.Core/Models/PublishedContent/IndexedArrayItem.cs @@ -1,7 +1,7 @@ using System.Net; -using Umbraco.Core.Strings; +using Umbraco.Cms.Core.Strings; -namespace Umbraco.Core.Models.PublishedContent +namespace Umbraco.Cms.Core.Models.PublishedContent { /// /// Represents an item in an array that stores its own index and the total count. diff --git a/src/Umbraco.Core/Models/PublishedContent/ModelType.cs b/src/Umbraco.Core/Models/PublishedContent/ModelType.cs index 94e7958780..921059ff22 100644 --- a/src/Umbraco.Core/Models/PublishedContent/ModelType.cs +++ b/src/Umbraco.Core/Models/PublishedContent/ModelType.cs @@ -3,9 +3,9 @@ using System.Collections.Generic; using System.Globalization; using System.Linq; using System.Reflection; -using Umbraco.Core.Exceptions; +using Umbraco.Cms.Core.Exceptions; -namespace Umbraco.Core.Models.PublishedContent +namespace Umbraco.Cms.Core.Models.PublishedContent { /// /// diff --git a/src/Umbraco.Core/Models/PublishedContent/NoopPublishedModelFactory.cs b/src/Umbraco.Core/Models/PublishedContent/NoopPublishedModelFactory.cs index 77001f43ed..d3f97a893d 100644 --- a/src/Umbraco.Core/Models/PublishedContent/NoopPublishedModelFactory.cs +++ b/src/Umbraco.Core/Models/PublishedContent/NoopPublishedModelFactory.cs @@ -2,7 +2,7 @@ using System.Collections; using System.Collections.Generic; -namespace Umbraco.Core.Models.PublishedContent +namespace Umbraco.Cms.Core.Models.PublishedContent { /// /// Represents a no-operation factory. diff --git a/src/Umbraco.Core/Models/PublishedContent/NoopPublishedValueFallback.cs b/src/Umbraco.Core/Models/PublishedContent/NoopPublishedValueFallback.cs index 245bbd1d39..82a6b44565 100644 --- a/src/Umbraco.Core/Models/PublishedContent/NoopPublishedValueFallback.cs +++ b/src/Umbraco.Core/Models/PublishedContent/NoopPublishedValueFallback.cs @@ -1,4 +1,4 @@ -namespace Umbraco.Core.Models.PublishedContent +namespace Umbraco.Cms.Core.Models.PublishedContent { /// /// Provides a noop implementation for . diff --git a/src/Umbraco.Core/Models/PublishedContent/PublishedContentBase.cs b/src/Umbraco.Core/Models/PublishedContent/PublishedContentBase.cs index 02912a6f8e..7c57b8281f 100644 --- a/src/Umbraco.Core/Models/PublishedContent/PublishedContentBase.cs +++ b/src/Umbraco.Core/Models/PublishedContent/PublishedContentBase.cs @@ -1,10 +1,9 @@ using System; using System.Collections.Generic; using System.Diagnostics; -using Umbraco.Core; -using Umbraco.Core.Models.PublishedContent; +using Umbraco.Extensions; -namespace Umbraco.Web.Models +namespace Umbraco.Cms.Core.Models.PublishedContent { /// /// Provide an abstract base class for IPublishedContent implementations. diff --git a/src/Umbraco.Core/Models/PublishedContent/PublishedContentExtensionsForModels.cs b/src/Umbraco.Core/Models/PublishedContent/PublishedContentExtensionsForModels.cs index 5739f559a6..2990c5969f 100644 --- a/src/Umbraco.Core/Models/PublishedContent/PublishedContentExtensionsForModels.cs +++ b/src/Umbraco.Core/Models/PublishedContent/PublishedContentExtensionsForModels.cs @@ -1,8 +1,8 @@ using System; +using Umbraco.Cms.Core.Models.PublishedContent; -namespace Umbraco.Core.Models.PublishedContent +namespace Umbraco.Extensions { - /// /// Provides strongly typed published content models services. /// diff --git a/src/Umbraco.Core/Models/PublishedContent/PublishedContentModel.cs b/src/Umbraco.Core/Models/PublishedContent/PublishedContentModel.cs index 43f6160250..ee92ae2d39 100644 --- a/src/Umbraco.Core/Models/PublishedContent/PublishedContentModel.cs +++ b/src/Umbraco.Core/Models/PublishedContent/PublishedContentModel.cs @@ -1,4 +1,4 @@ -namespace Umbraco.Core.Models.PublishedContent +namespace Umbraco.Cms.Core.Models.PublishedContent { /// /// Represents a strongly-typed published content. diff --git a/src/Umbraco.Core/Models/PublishedContent/PublishedContentType.cs b/src/Umbraco.Core/Models/PublishedContent/PublishedContentType.cs index daf75f5c50..b48c13f21f 100644 --- a/src/Umbraco.Core/Models/PublishedContent/PublishedContentType.cs +++ b/src/Umbraco.Core/Models/PublishedContent/PublishedContentType.cs @@ -1,8 +1,9 @@ using System; using System.Collections.Generic; using System.Linq; +using Umbraco.Extensions; -namespace Umbraco.Core.Models.PublishedContent +namespace Umbraco.Cms.Core.Models.PublishedContent { /// /// Represents an type. @@ -76,7 +77,7 @@ namespace Umbraco.Core.Models.PublishedContent InitializeIndexes(); } - + [Obsolete("Use the overload specifying a key instead")] public PublishedContentType(int id, string alias, PublishedItemType itemType, IEnumerable compositionAliases, Func> propertyTypes, ContentVariation variations, bool isElement = false) : this(Guid.Empty, id, alias, itemType, compositionAliases, variations, isElement) diff --git a/src/Umbraco.Core/Models/PublishedContent/PublishedContentTypeConverter.cs b/src/Umbraco.Core/Models/PublishedContent/PublishedContentTypeConverter.cs index 094f481db9..9c57fe29a9 100644 --- a/src/Umbraco.Core/Models/PublishedContent/PublishedContentTypeConverter.cs +++ b/src/Umbraco.Core/Models/PublishedContent/PublishedContentTypeConverter.cs @@ -3,7 +3,7 @@ using System.ComponentModel; using System.Globalization; using System.Linq; -namespace Umbraco.Core.Models.PublishedContent +namespace Umbraco.Cms.Core.Models.PublishedContent { internal class PublishedContentTypeConverter : TypeConverter { diff --git a/src/Umbraco.Core/Models/PublishedContent/PublishedContentTypeFactory.cs b/src/Umbraco.Core/Models/PublishedContent/PublishedContentTypeFactory.cs index 1d32feba16..d93049abeb 100644 --- a/src/Umbraco.Core/Models/PublishedContent/PublishedContentTypeFactory.cs +++ b/src/Umbraco.Core/Models/PublishedContent/PublishedContentTypeFactory.cs @@ -1,10 +1,10 @@ using System; using System.Collections.Generic; using System.Linq; -using Umbraco.Core.PropertyEditors; -using Umbraco.Core.Services; +using Umbraco.Cms.Core.PropertyEditors; +using Umbraco.Cms.Core.Services; -namespace Umbraco.Core.Models.PublishedContent +namespace Umbraco.Cms.Core.Models.PublishedContent { /// /// Provides a default implementation for . diff --git a/src/Umbraco.Core/Models/PublishedContent/PublishedContentWrapped.cs b/src/Umbraco.Core/Models/PublishedContent/PublishedContentWrapped.cs index 88a904bac1..763c9e438f 100644 --- a/src/Umbraco.Core/Models/PublishedContent/PublishedContentWrapped.cs +++ b/src/Umbraco.Core/Models/PublishedContent/PublishedContentWrapped.cs @@ -1,7 +1,7 @@ using System; using System.Collections.Generic; -namespace Umbraco.Core.Models.PublishedContent +namespace Umbraco.Cms.Core.Models.PublishedContent { // // we cannot implement strongly-typed content by inheriting from some sort diff --git a/src/Umbraco.Core/Models/PublishedContent/PublishedCultureInfos.cs b/src/Umbraco.Core/Models/PublishedContent/PublishedCultureInfos.cs index 8cf159ac60..5f8d209162 100644 --- a/src/Umbraco.Core/Models/PublishedContent/PublishedCultureInfos.cs +++ b/src/Umbraco.Core/Models/PublishedContent/PublishedCultureInfos.cs @@ -1,6 +1,6 @@ using System; -namespace Umbraco.Core.Models.PublishedContent +namespace Umbraco.Cms.Core.Models.PublishedContent { /// /// Contains culture specific values for . diff --git a/src/Umbraco.Core/Models/PublishedContent/PublishedDataType.cs b/src/Umbraco.Core/Models/PublishedContent/PublishedDataType.cs index 5f8ec3d335..ecf3981c36 100644 --- a/src/Umbraco.Core/Models/PublishedContent/PublishedDataType.cs +++ b/src/Umbraco.Core/Models/PublishedContent/PublishedDataType.cs @@ -1,6 +1,6 @@ using System; -namespace Umbraco.Core.Models.PublishedContent +namespace Umbraco.Cms.Core.Models.PublishedContent { /// /// Represents a published data type. diff --git a/src/Umbraco.Core/Models/PublishedContent/PublishedElementModel.cs b/src/Umbraco.Core/Models/PublishedContent/PublishedElementModel.cs index 882109f908..2de60c5705 100644 --- a/src/Umbraco.Core/Models/PublishedContent/PublishedElementModel.cs +++ b/src/Umbraco.Core/Models/PublishedContent/PublishedElementModel.cs @@ -1,4 +1,4 @@ -namespace Umbraco.Core.Models.PublishedContent +namespace Umbraco.Cms.Core.Models.PublishedContent { /// /// diff --git a/src/Umbraco.Core/Models/PublishedContent/PublishedElementWrapped.cs b/src/Umbraco.Core/Models/PublishedContent/PublishedElementWrapped.cs index 481b9bd5d2..3feb4835e7 100644 --- a/src/Umbraco.Core/Models/PublishedContent/PublishedElementWrapped.cs +++ b/src/Umbraco.Core/Models/PublishedContent/PublishedElementWrapped.cs @@ -1,7 +1,7 @@ using System; using System.Collections.Generic; -namespace Umbraco.Core.Models.PublishedContent +namespace Umbraco.Cms.Core.Models.PublishedContent { /// /// Provides an abstract base class for IPublishedElement implementations that diff --git a/src/Umbraco.Core/Models/PublishedContent/PublishedItemType.cs b/src/Umbraco.Core/Models/PublishedContent/PublishedItemType.cs index 42e9c9538d..7d16152b6e 100644 --- a/src/Umbraco.Core/Models/PublishedContent/PublishedItemType.cs +++ b/src/Umbraco.Core/Models/PublishedContent/PublishedItemType.cs @@ -1,4 +1,4 @@ -namespace Umbraco.Core.Models.PublishedContent +namespace Umbraco.Cms.Core.Models.PublishedContent { /// /// The type of published element. diff --git a/src/Umbraco.Core/Models/PublishedContent/PublishedModelAttribute.cs b/src/Umbraco.Core/Models/PublishedContent/PublishedModelAttribute.cs index 3f2c63a78f..035c8a213a 100644 --- a/src/Umbraco.Core/Models/PublishedContent/PublishedModelAttribute.cs +++ b/src/Umbraco.Core/Models/PublishedContent/PublishedModelAttribute.cs @@ -1,6 +1,6 @@ using System; -namespace Umbraco.Core.Models.PublishedContent +namespace Umbraco.Cms.Core.Models.PublishedContent { /// /// diff --git a/src/Umbraco.Core/Models/PublishedContent/PublishedModelFactory.cs b/src/Umbraco.Core/Models/PublishedContent/PublishedModelFactory.cs index 0c6a21ddb3..23a060a3fd 100644 --- a/src/Umbraco.Core/Models/PublishedContent/PublishedModelFactory.cs +++ b/src/Umbraco.Core/Models/PublishedContent/PublishedModelFactory.cs @@ -3,7 +3,7 @@ using System.Collections; using System.Collections.Generic; using System.Reflection; -namespace Umbraco.Core.Models.PublishedContent +namespace Umbraco.Cms.Core.Models.PublishedContent { /// /// Implements a strongly typed content model factory diff --git a/src/Umbraco.Core/Models/PublishedContent/PublishedPropertyBase.cs b/src/Umbraco.Core/Models/PublishedContent/PublishedPropertyBase.cs index 33f8e94139..dd77d899ca 100644 --- a/src/Umbraco.Core/Models/PublishedContent/PublishedPropertyBase.cs +++ b/src/Umbraco.Core/Models/PublishedContent/PublishedPropertyBase.cs @@ -1,7 +1,7 @@ using System; -using Umbraco.Core.PropertyEditors; +using Umbraco.Cms.Core.PropertyEditors; -namespace Umbraco.Core.Models.PublishedContent +namespace Umbraco.Cms.Core.Models.PublishedContent { /// /// Provides a base class for IPublishedProperty implementations which converts and caches diff --git a/src/Umbraco.Core/Models/PublishedContent/PublishedPropertyType.cs b/src/Umbraco.Core/Models/PublishedContent/PublishedPropertyType.cs index b5e87ad6ff..236edc0ff0 100644 --- a/src/Umbraco.Core/Models/PublishedContent/PublishedPropertyType.cs +++ b/src/Umbraco.Core/Models/PublishedContent/PublishedPropertyType.cs @@ -1,9 +1,9 @@ using System; using System.Xml.Linq; using System.Xml.XPath; -using Umbraco.Core.PropertyEditors; +using Umbraco.Cms.Core.PropertyEditors; -namespace Umbraco.Core.Models.PublishedContent +namespace Umbraco.Cms.Core.Models.PublishedContent { /// /// Represents a published property type. diff --git a/src/Umbraco.Core/Models/PublishedContent/PublishedSearchResult.cs b/src/Umbraco.Core/Models/PublishedContent/PublishedSearchResult.cs index 6d30334415..c713d02bbe 100644 --- a/src/Umbraco.Core/Models/PublishedContent/PublishedSearchResult.cs +++ b/src/Umbraco.Core/Models/PublishedContent/PublishedSearchResult.cs @@ -1,4 +1,4 @@ -namespace Umbraco.Core.Models.PublishedContent +namespace Umbraco.Cms.Core.Models.PublishedContent { public class PublishedSearchResult { diff --git a/src/Umbraco.Core/Models/PublishedContent/PublishedValueFallback.cs b/src/Umbraco.Core/Models/PublishedContent/PublishedValueFallback.cs index 79c7f824fc..2c4ecfdb67 100644 --- a/src/Umbraco.Core/Models/PublishedContent/PublishedValueFallback.cs +++ b/src/Umbraco.Core/Models/PublishedContent/PublishedValueFallback.cs @@ -1,11 +1,9 @@ using System; using System.Collections.Generic; -using System.Linq; -using Umbraco.Core; -using Umbraco.Core.Models.PublishedContent; -using Umbraco.Core.Services; +using Umbraco.Cms.Core.Services; +using Umbraco.Extensions; -namespace Umbraco.Web.Models.PublishedContent +namespace Umbraco.Cms.Core.Models.PublishedContent { /// /// Provides a default implementation for . diff --git a/src/Umbraco.Core/Models/PublishedContent/RawValueProperty.cs b/src/Umbraco.Core/Models/PublishedContent/RawValueProperty.cs index 596840cf6a..92509015de 100644 --- a/src/Umbraco.Core/Models/PublishedContent/RawValueProperty.cs +++ b/src/Umbraco.Core/Models/PublishedContent/RawValueProperty.cs @@ -1,7 +1,7 @@ using System; -using Umbraco.Core.PropertyEditors; +using Umbraco.Cms.Core.PropertyEditors; -namespace Umbraco.Core.Models.PublishedContent +namespace Umbraco.Cms.Core.Models.PublishedContent { /// /// diff --git a/src/Umbraco.Core/Models/PublishedContent/ThreadCultureVariationContextAccessor.cs b/src/Umbraco.Core/Models/PublishedContent/ThreadCultureVariationContextAccessor.cs index 7a000c223a..a3c4cbfb70 100644 --- a/src/Umbraco.Core/Models/PublishedContent/ThreadCultureVariationContextAccessor.cs +++ b/src/Umbraco.Core/Models/PublishedContent/ThreadCultureVariationContextAccessor.cs @@ -2,7 +2,7 @@ using System.Collections.Concurrent; using System.Threading; -namespace Umbraco.Core.Models.PublishedContent +namespace Umbraco.Cms.Core.Models.PublishedContent { /// /// Provides a CurrentUICulture-based implementation of . diff --git a/src/Umbraco.Core/Models/PublishedContent/UrlMode.cs b/src/Umbraco.Core/Models/PublishedContent/UrlMode.cs index d11459bb9e..8e24f25332 100644 --- a/src/Umbraco.Core/Models/PublishedContent/UrlMode.cs +++ b/src/Umbraco.Core/Models/PublishedContent/UrlMode.cs @@ -1,4 +1,4 @@ -namespace Umbraco.Core.Models.PublishedContent +namespace Umbraco.Cms.Core.Models.PublishedContent { /// /// Specifies the type of URLs that the URL provider should produce, Auto is the default. diff --git a/src/Umbraco.Core/Models/PublishedContent/VariationContext.cs b/src/Umbraco.Core/Models/PublishedContent/VariationContext.cs index 424fc7c4a8..87b5d0f517 100644 --- a/src/Umbraco.Core/Models/PublishedContent/VariationContext.cs +++ b/src/Umbraco.Core/Models/PublishedContent/VariationContext.cs @@ -1,4 +1,4 @@ -namespace Umbraco.Core.Models.PublishedContent +namespace Umbraco.Cms.Core.Models.PublishedContent { /// /// Represents the variation context. diff --git a/src/Umbraco.Core/Models/PublishedContent/VariationContextAccessorExtensions.cs b/src/Umbraco.Core/Models/PublishedContent/VariationContextAccessorExtensions.cs index a387ea87b8..16ccd81000 100644 --- a/src/Umbraco.Core/Models/PublishedContent/VariationContextAccessorExtensions.cs +++ b/src/Umbraco.Core/Models/PublishedContent/VariationContextAccessorExtensions.cs @@ -1,4 +1,10 @@ -namespace Umbraco.Core.Models.PublishedContent +// Copyright (c) Umbraco. +// See LICENSE for more details. + +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Core.Models.PublishedContent; + +namespace Umbraco.Extensions { public static class VariationContextAccessorExtensions { @@ -14,7 +20,10 @@ // use context values var publishedVariationContext = variationContextAccessor?.VariationContext; - if (culture == null) culture = variations.VariesByCulture() ? publishedVariationContext?.Culture : ""; + if (culture == null) + { + culture = variations.VariesByCulture() ? publishedVariationContext?.Culture : ""; + } if (segment == null) { diff --git a/src/Umbraco.Core/Models/PublishedState.cs b/src/Umbraco.Core/Models/PublishedState.cs index ace7cbdebc..87c106e11e 100644 --- a/src/Umbraco.Core/Models/PublishedState.cs +++ b/src/Umbraco.Core/Models/PublishedState.cs @@ -1,6 +1,4 @@ -using System; - -namespace Umbraco.Core.Models +namespace Umbraco.Cms.Core.Models { /// diff --git a/src/Umbraco.Core/Models/Range.cs b/src/Umbraco.Core/Models/Range.cs index 108d564665..7aa4bf5ed8 100644 --- a/src/Umbraco.Core/Models/Range.cs +++ b/src/Umbraco.Core/Models/Range.cs @@ -1,7 +1,7 @@ using System; using System.Globalization; -namespace Umbraco.Core.Models +namespace Umbraco.Cms.Core.Models { /// /// Represents a range with a minimum and maximum value. diff --git a/src/Umbraco.Core/Models/ReadOnlyRelation.cs b/src/Umbraco.Core/Models/ReadOnlyRelation.cs index f2801a93ec..a57a5ba7e1 100644 --- a/src/Umbraco.Core/Models/ReadOnlyRelation.cs +++ b/src/Umbraco.Core/Models/ReadOnlyRelation.cs @@ -1,6 +1,6 @@ using System; -namespace Umbraco.Core.Models +namespace Umbraco.Cms.Core.Models { /// /// A read only relation. Can be used to bulk save witch performs better than the normal save operation, diff --git a/src/Umbraco.Core/Models/RedirectUrl.cs b/src/Umbraco.Core/Models/RedirectUrl.cs index f4eb955c64..2997ae0ffd 100644 --- a/src/Umbraco.Core/Models/RedirectUrl.cs +++ b/src/Umbraco.Core/Models/RedirectUrl.cs @@ -1,8 +1,8 @@ using System; using System.Runtime.Serialization; -using Umbraco.Core.Models.Entities; +using Umbraco.Cms.Core.Models.Entities; -namespace Umbraco.Core.Models +namespace Umbraco.Cms.Core.Models { /// /// Implements . diff --git a/src/Umbraco.Core/Models/Relation.cs b/src/Umbraco.Core/Models/Relation.cs index 7afa476226..26656593fd 100644 --- a/src/Umbraco.Core/Models/Relation.cs +++ b/src/Umbraco.Core/Models/Relation.cs @@ -1,8 +1,8 @@ using System; using System.Runtime.Serialization; -using Umbraco.Core.Models.Entities; +using Umbraco.Cms.Core.Models.Entities; -namespace Umbraco.Core.Models +namespace Umbraco.Cms.Core.Models { /// /// Represents a Relation between two items diff --git a/src/Umbraco.Core/Models/RelationType.cs b/src/Umbraco.Core/Models/RelationType.cs index f848a90cb1..2def0eb636 100644 --- a/src/Umbraco.Core/Models/RelationType.cs +++ b/src/Umbraco.Core/Models/RelationType.cs @@ -1,9 +1,8 @@ using System; using System.Runtime.Serialization; -using Umbraco.Core.Exceptions; -using Umbraco.Core.Models.Entities; +using Umbraco.Cms.Core.Models.Entities; -namespace Umbraco.Core.Models +namespace Umbraco.Cms.Core.Models { /// /// Represents a RelationType diff --git a/src/Umbraco.Core/Models/RelationTypeExtensions.cs b/src/Umbraco.Core/Models/RelationTypeExtensions.cs index 4d9d6856cb..1e7282b66b 100644 --- a/src/Umbraco.Core/Models/RelationTypeExtensions.cs +++ b/src/Umbraco.Core/Models/RelationTypeExtensions.cs @@ -1,4 +1,10 @@ -namespace Umbraco.Core.Models +// Copyright (c) Umbraco. +// See LICENSE for more details. + +using Umbraco.Cms.Core; +using Umbraco.Cms.Core.Models; + +namespace Umbraco.Extensions { public static class RelationTypeExtensions { diff --git a/src/Umbraco.Core/Models/RequestPasswordResetModel.cs b/src/Umbraco.Core/Models/RequestPasswordResetModel.cs index 0ea173bfd6..10ade8b589 100644 --- a/src/Umbraco.Core/Models/RequestPasswordResetModel.cs +++ b/src/Umbraco.Core/Models/RequestPasswordResetModel.cs @@ -1,7 +1,7 @@ using System.ComponentModel.DataAnnotations; using System.Runtime.Serialization; -namespace Umbraco.Web.Models +namespace Umbraco.Cms.Core.Models { [DataContract(Name = "requestPasswordReset", Namespace = "")] diff --git a/src/Umbraco.Core/Models/Script.cs b/src/Umbraco.Core/Models/Script.cs index be96c04ddd..3841be5598 100644 --- a/src/Umbraco.Core/Models/Script.cs +++ b/src/Umbraco.Core/Models/Script.cs @@ -1,8 +1,7 @@ using System; using System.Runtime.Serialization; - -namespace Umbraco.Core.Models +namespace Umbraco.Cms.Core.Models { /// /// Represents a Script file diff --git a/src/Umbraco.Core/Models/Security/LoginModel.cs b/src/Umbraco.Core/Models/Security/LoginModel.cs index 98c9d23cff..3a639603eb 100644 --- a/src/Umbraco.Core/Models/Security/LoginModel.cs +++ b/src/Umbraco.Core/Models/Security/LoginModel.cs @@ -1,7 +1,7 @@ using System.ComponentModel.DataAnnotations; using System.Runtime.Serialization; -namespace Umbraco.Core.Models.Security +namespace Umbraco.Cms.Core.Models.Security { public class LoginModel : PostRedirectModel { diff --git a/src/Umbraco.Core/Models/Security/LoginStatusModel.cs b/src/Umbraco.Core/Models/Security/LoginStatusModel.cs index 3978a84334..040c72187d 100644 --- a/src/Umbraco.Core/Models/Security/LoginStatusModel.cs +++ b/src/Umbraco.Core/Models/Security/LoginStatusModel.cs @@ -1,6 +1,6 @@ using System.ComponentModel.DataAnnotations; -namespace Umbraco.Core.Models.Security +namespace Umbraco.Cms.Core.Models.Security { /// /// The model representing the status of a logged in member. diff --git a/src/Umbraco.Core/Models/Security/PostRedirectModel.cs b/src/Umbraco.Core/Models/Security/PostRedirectModel.cs index 3a87cdcbe5..179b24ce0c 100644 --- a/src/Umbraco.Core/Models/Security/PostRedirectModel.cs +++ b/src/Umbraco.Core/Models/Security/PostRedirectModel.cs @@ -1,4 +1,4 @@ -namespace Umbraco.Core.Models.Security +namespace Umbraco.Cms.Core.Models.Security { /// /// A base model containing a value to indicate to Umbraco where to redirect to after Posting if diff --git a/src/Umbraco.Core/Models/Security/ProfileModel.cs b/src/Umbraco.Core/Models/Security/ProfileModel.cs index 8493a5f5a9..2a495b1264 100644 --- a/src/Umbraco.Core/Models/Security/ProfileModel.cs +++ b/src/Umbraco.Core/Models/Security/ProfileModel.cs @@ -2,9 +2,8 @@ using System.Collections.Generic; using System.ComponentModel; using System.ComponentModel.DataAnnotations; -using Umbraco.Web.Models; -namespace Umbraco.Core.Models.Security +namespace Umbraco.Cms.Core.Models.Security { /// /// A readonly member profile model diff --git a/src/Umbraco.Core/Models/Security/RegisterModel.cs b/src/Umbraco.Core/Models/Security/RegisterModel.cs index fca749703d..0cfb249fe0 100644 --- a/src/Umbraco.Core/Models/Security/RegisterModel.cs +++ b/src/Umbraco.Core/Models/Security/RegisterModel.cs @@ -1,8 +1,7 @@ using System.Collections.Generic; using System.ComponentModel.DataAnnotations; -using Umbraco.Web.Models; -namespace Umbraco.Core.Models.Security +namespace Umbraco.Cms.Core.Models.Security { public class RegisterModel : PostRedirectModel { diff --git a/src/Umbraco.Core/Models/SendCodeViewModel.cs b/src/Umbraco.Core/Models/SendCodeViewModel.cs index 32aac5d87c..2e33702932 100644 --- a/src/Umbraco.Core/Models/SendCodeViewModel.cs +++ b/src/Umbraco.Core/Models/SendCodeViewModel.cs @@ -1,9 +1,7 @@ -using System.Collections.Generic; -using System.ComponentModel; -using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations; using System.Runtime.Serialization; -namespace Umbraco.Web.Models +namespace Umbraco.Cms.Core.Models { /// /// Used for 2FA verification diff --git a/src/Umbraco.Core/Models/ServerRegistration.cs b/src/Umbraco.Core/Models/ServerRegistration.cs index a862b11c23..5aa926bdaa 100644 --- a/src/Umbraco.Core/Models/ServerRegistration.cs +++ b/src/Umbraco.Core/Models/ServerRegistration.cs @@ -1,8 +1,9 @@ using System; using System.Globalization; -using Umbraco.Core.Models.Entities; +using Umbraco.Cms.Core.Models.Entities; +using Umbraco.Extensions; -namespace Umbraco.Core.Models +namespace Umbraco.Cms.Core.Models { /// /// Represents a registered server in a multiple-servers environment. diff --git a/src/Umbraco.Core/Models/SetPasswordModel.cs b/src/Umbraco.Core/Models/SetPasswordModel.cs index d3f8cfef6f..dece266d74 100644 --- a/src/Umbraco.Core/Models/SetPasswordModel.cs +++ b/src/Umbraco.Core/Models/SetPasswordModel.cs @@ -1,7 +1,7 @@ using System.ComponentModel.DataAnnotations; using System.Runtime.Serialization; -namespace Umbraco.Web.Models +namespace Umbraco.Cms.Core.Models { [DataContract(Name = "setPassword", Namespace = "")] public class SetPasswordModel diff --git a/src/Umbraco.Core/Models/SimpleContentType.cs b/src/Umbraco.Core/Models/SimpleContentType.cs index 81195aac16..56ea073b91 100644 --- a/src/Umbraco.Core/Models/SimpleContentType.cs +++ b/src/Umbraco.Core/Models/SimpleContentType.cs @@ -1,6 +1,7 @@ using System; +using Umbraco.Extensions; -namespace Umbraco.Core.Models +namespace Umbraco.Cms.Core.Models { /// /// Implements . diff --git a/src/Umbraco.Core/Models/SimpleValidationModel.cs b/src/Umbraco.Core/Models/SimpleValidationModel.cs index cca44613fb..30efec7dfe 100644 --- a/src/Umbraco.Core/Models/SimpleValidationModel.cs +++ b/src/Umbraco.Core/Models/SimpleValidationModel.cs @@ -1,6 +1,6 @@ using System.Collections.Generic; -namespace Umbraco.Core.Models +namespace Umbraco.Cms.Core.Models { public class SimpleValidationModel { diff --git a/src/Umbraco.Core/Models/Stylesheet.cs b/src/Umbraco.Core/Models/Stylesheet.cs index 48f00a1650..6d796f66d7 100644 --- a/src/Umbraco.Core/Models/Stylesheet.cs +++ b/src/Umbraco.Core/Models/Stylesheet.cs @@ -4,9 +4,10 @@ using System.ComponentModel; using System.Data; using System.Linq; using System.Runtime.Serialization; -using Umbraco.Core.Strings.Css; +using Umbraco.Cms.Core.Strings.Css; +using Umbraco.Extensions; -namespace Umbraco.Core.Models +namespace Umbraco.Cms.Core.Models { /// /// Represents a Stylesheet file diff --git a/src/Umbraco.Core/Models/StylesheetProperty.cs b/src/Umbraco.Core/Models/StylesheetProperty.cs index bc895113bc..9a4ac93963 100644 --- a/src/Umbraco.Core/Models/StylesheetProperty.cs +++ b/src/Umbraco.Core/Models/StylesheetProperty.cs @@ -1,8 +1,8 @@ using System; using System.Runtime.Serialization; -using Umbraco.Core.Models.Entities; +using Umbraco.Cms.Core.Models.Entities; -namespace Umbraco.Core.Models +namespace Umbraco.Cms.Core.Models { /// /// Represents a Stylesheet Property diff --git a/src/Umbraco.Core/Models/Tag.cs b/src/Umbraco.Core/Models/Tag.cs index 2c14beb14a..3d47b696d5 100644 --- a/src/Umbraco.Core/Models/Tag.cs +++ b/src/Umbraco.Core/Models/Tag.cs @@ -1,8 +1,8 @@ using System; using System.Runtime.Serialization; -using Umbraco.Core.Models.Entities; +using Umbraco.Cms.Core.Models.Entities; -namespace Umbraco.Core.Models +namespace Umbraco.Cms.Core.Models { /// /// Represents a tag entity. diff --git a/src/Umbraco.Core/Models/TagModel.cs b/src/Umbraco.Core/Models/TagModel.cs index 3b6ab2d9eb..04b02cdbb8 100644 --- a/src/Umbraco.Core/Models/TagModel.cs +++ b/src/Umbraco.Core/Models/TagModel.cs @@ -1,6 +1,6 @@ using System.Runtime.Serialization; -namespace Umbraco.Web.Models +namespace Umbraco.Cms.Core.Models { [DataContract(Name = "tag", Namespace = "")] public class TagModel diff --git a/src/Umbraco.Core/Models/TaggableObjectTypes.cs b/src/Umbraco.Core/Models/TaggableObjectTypes.cs index fbd75e2100..8a9384ec74 100644 --- a/src/Umbraco.Core/Models/TaggableObjectTypes.cs +++ b/src/Umbraco.Core/Models/TaggableObjectTypes.cs @@ -1,4 +1,4 @@ -namespace Umbraco.Core.Models +namespace Umbraco.Cms.Core.Models { /// /// Enum representing the taggable object types diff --git a/src/Umbraco.Core/Models/TaggedEntity.cs b/src/Umbraco.Core/Models/TaggedEntity.cs index 8c4695555d..9bc05eae15 100644 --- a/src/Umbraco.Core/Models/TaggedEntity.cs +++ b/src/Umbraco.Core/Models/TaggedEntity.cs @@ -1,6 +1,6 @@ using System.Collections.Generic; -namespace Umbraco.Core.Models +namespace Umbraco.Cms.Core.Models { /// /// Represents a tagged entity. diff --git a/src/Umbraco.Core/Models/TaggedProperty.cs b/src/Umbraco.Core/Models/TaggedProperty.cs index 2d9fda9a4f..d2c5dc0b23 100644 --- a/src/Umbraco.Core/Models/TaggedProperty.cs +++ b/src/Umbraco.Core/Models/TaggedProperty.cs @@ -1,6 +1,6 @@ using System.Collections.Generic; -namespace Umbraco.Core.Models +namespace Umbraco.Cms.Core.Models { /// /// Represents a tagged property on an entity. diff --git a/src/Umbraco.Core/Models/TagsStorageType.cs b/src/Umbraco.Core/Models/TagsStorageType.cs index f594320e8b..7bd8ea7937 100644 --- a/src/Umbraco.Core/Models/TagsStorageType.cs +++ b/src/Umbraco.Core/Models/TagsStorageType.cs @@ -1,4 +1,4 @@ -namespace Umbraco.Core.Models +namespace Umbraco.Cms.Core.Models { /// /// Defines how tags are stored. diff --git a/src/Umbraco.Core/Models/Template.cs b/src/Umbraco.Core/Models/Template.cs index e9cfb71efd..bd90060ce7 100644 --- a/src/Umbraco.Core/Models/Template.cs +++ b/src/Umbraco.Core/Models/Template.cs @@ -1,8 +1,9 @@ using System; using System.Runtime.Serialization; -using Umbraco.Core.Strings; +using Umbraco.Cms.Core.Strings; +using Umbraco.Extensions; -namespace Umbraco.Core.Models +namespace Umbraco.Cms.Core.Models { /// /// Represents a Template file. diff --git a/src/Umbraco.Core/Models/TemplateNode.cs b/src/Umbraco.Core/Models/TemplateNode.cs index 13e5b22846..cef3d4ea79 100644 --- a/src/Umbraco.Core/Models/TemplateNode.cs +++ b/src/Umbraco.Core/Models/TemplateNode.cs @@ -1,6 +1,6 @@ using System.Collections.Generic; -namespace Umbraco.Core.Models +namespace Umbraco.Cms.Core.Models { /// /// Represents a template in a template tree diff --git a/src/Umbraco.Core/Models/TemplateOnDisk.cs b/src/Umbraco.Core/Models/TemplateOnDisk.cs index 3b571c6ffc..4ea450162c 100644 --- a/src/Umbraco.Core/Models/TemplateOnDisk.cs +++ b/src/Umbraco.Core/Models/TemplateOnDisk.cs @@ -1,8 +1,8 @@ using System; using System.Runtime.Serialization; -using Umbraco.Core.Strings; +using Umbraco.Cms.Core.Strings; -namespace Umbraco.Core.Models +namespace Umbraco.Cms.Core.Models { /// /// Represents a Template file that can have its content on disk. diff --git a/src/Umbraco.Core/Models/TemplateQuery/ContentTypeModel.cs b/src/Umbraco.Core/Models/TemplateQuery/ContentTypeModel.cs index 4974932476..e032b4ca11 100644 --- a/src/Umbraco.Core/Models/TemplateQuery/ContentTypeModel.cs +++ b/src/Umbraco.Core/Models/TemplateQuery/ContentTypeModel.cs @@ -1,10 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace Umbraco.Web.Models.TemplateQuery +namespace Umbraco.Cms.Core.Models.TemplateQuery { public class ContentTypeModel { diff --git a/src/Umbraco.Core/Models/TemplateQuery/Operator.cs b/src/Umbraco.Core/Models/TemplateQuery/Operator.cs index 135c43507e..eb3fe4be29 100644 --- a/src/Umbraco.Core/Models/TemplateQuery/Operator.cs +++ b/src/Umbraco.Core/Models/TemplateQuery/Operator.cs @@ -1,4 +1,4 @@ -namespace Umbraco.Web.Models.TemplateQuery +namespace Umbraco.Cms.Core.Models.TemplateQuery { public enum Operator { diff --git a/src/Umbraco.Core/Models/TemplateQuery/OperatorFactory.cs b/src/Umbraco.Core/Models/TemplateQuery/OperatorFactory.cs index ba9c318615..a8e3b40fef 100644 --- a/src/Umbraco.Core/Models/TemplateQuery/OperatorFactory.cs +++ b/src/Umbraco.Core/Models/TemplateQuery/OperatorFactory.cs @@ -1,6 +1,6 @@ using System; -namespace Umbraco.Web.Models.TemplateQuery +namespace Umbraco.Cms.Core.Models.TemplateQuery { public static class OperatorFactory { diff --git a/src/Umbraco.Core/Models/TemplateQuery/OperatorTerm.cs b/src/Umbraco.Core/Models/TemplateQuery/OperatorTerm.cs index 086f0ff818..ce66965c68 100644 --- a/src/Umbraco.Core/Models/TemplateQuery/OperatorTerm.cs +++ b/src/Umbraco.Core/Models/TemplateQuery/OperatorTerm.cs @@ -1,6 +1,6 @@ using System.Collections.Generic; -namespace Umbraco.Web.Models.TemplateQuery +namespace Umbraco.Cms.Core.Models.TemplateQuery { public class OperatorTerm { diff --git a/src/Umbraco.Core/Models/TemplateQuery/PropertyModel.cs b/src/Umbraco.Core/Models/TemplateQuery/PropertyModel.cs index d1bc860ea0..4270f9d48f 100644 --- a/src/Umbraco.Core/Models/TemplateQuery/PropertyModel.cs +++ b/src/Umbraco.Core/Models/TemplateQuery/PropertyModel.cs @@ -1,4 +1,4 @@ -namespace Umbraco.Web.Models.TemplateQuery +namespace Umbraco.Cms.Core.Models.TemplateQuery { public class PropertyModel { diff --git a/src/Umbraco.Core/Models/TemplateQuery/QueryCondition.cs b/src/Umbraco.Core/Models/TemplateQuery/QueryCondition.cs index 27cf901e49..c80c8c764c 100644 --- a/src/Umbraco.Core/Models/TemplateQuery/QueryCondition.cs +++ b/src/Umbraco.Core/Models/TemplateQuery/QueryCondition.cs @@ -1,7 +1,4 @@ -using System.Collections.Generic; -using Umbraco.Core.Models.PublishedContent; - -namespace Umbraco.Web.Models.TemplateQuery +namespace Umbraco.Cms.Core.Models.TemplateQuery { public class QueryCondition { diff --git a/src/Umbraco.Core/Models/TemplateQuery/QueryConditionExtensions.cs b/src/Umbraco.Core/Models/TemplateQuery/QueryConditionExtensions.cs index 089c0e13ba..2d000d4b2f 100644 --- a/src/Umbraco.Core/Models/TemplateQuery/QueryConditionExtensions.cs +++ b/src/Umbraco.Core/Models/TemplateQuery/QueryConditionExtensions.cs @@ -1,8 +1,9 @@ using System; using System.Linq.Expressions; using System.Reflection; +using Umbraco.Cms.Core.Models.TemplateQuery; -namespace Umbraco.Web.Models.TemplateQuery +namespace Umbraco.Extensions { public static class QueryConditionExtensions { diff --git a/src/Umbraco.Core/Models/TemplateQuery/QueryModel.cs b/src/Umbraco.Core/Models/TemplateQuery/QueryModel.cs index 90ee4c2452..a18d1e4021 100644 --- a/src/Umbraco.Core/Models/TemplateQuery/QueryModel.cs +++ b/src/Umbraco.Core/Models/TemplateQuery/QueryModel.cs @@ -1,6 +1,6 @@ using System.Collections.Generic; -namespace Umbraco.Web.Models.TemplateQuery +namespace Umbraco.Cms.Core.Models.TemplateQuery { public class QueryModel { diff --git a/src/Umbraco.Core/Models/TemplateQuery/QueryResultModel.cs b/src/Umbraco.Core/Models/TemplateQuery/QueryResultModel.cs index 46556dc75e..b4cd15fce4 100644 --- a/src/Umbraco.Core/Models/TemplateQuery/QueryResultModel.cs +++ b/src/Umbraco.Core/Models/TemplateQuery/QueryResultModel.cs @@ -1,6 +1,6 @@ using System.Collections.Generic; -namespace Umbraco.Web.Models.TemplateQuery +namespace Umbraco.Cms.Core.Models.TemplateQuery { public class QueryResultModel diff --git a/src/Umbraco.Core/Models/TemplateQuery/SortExpression.cs b/src/Umbraco.Core/Models/TemplateQuery/SortExpression.cs index 46f3afa308..8a66819b72 100644 --- a/src/Umbraco.Core/Models/TemplateQuery/SortExpression.cs +++ b/src/Umbraco.Core/Models/TemplateQuery/SortExpression.cs @@ -1,4 +1,4 @@ -namespace Umbraco.Web.Models.TemplateQuery +namespace Umbraco.Cms.Core.Models.TemplateQuery { public class SortExpression { diff --git a/src/Umbraco.Core/Models/TemplateQuery/SourceModel.cs b/src/Umbraco.Core/Models/TemplateQuery/SourceModel.cs index b26912f113..95e7fbc3e7 100644 --- a/src/Umbraco.Core/Models/TemplateQuery/SourceModel.cs +++ b/src/Umbraco.Core/Models/TemplateQuery/SourceModel.cs @@ -1,4 +1,4 @@ -namespace Umbraco.Web.Models.TemplateQuery +namespace Umbraco.Cms.Core.Models.TemplateQuery { public class SourceModel { diff --git a/src/Umbraco.Core/Models/TemplateQuery/TemplateQueryResult.cs b/src/Umbraco.Core/Models/TemplateQuery/TemplateQueryResult.cs index a59b0dc2d8..8519862de8 100644 --- a/src/Umbraco.Core/Models/TemplateQuery/TemplateQueryResult.cs +++ b/src/Umbraco.Core/Models/TemplateQuery/TemplateQueryResult.cs @@ -1,4 +1,4 @@ -namespace Umbraco.Web.Models.TemplateQuery +namespace Umbraco.Cms.Core.Models.TemplateQuery { public class TemplateQueryResult { diff --git a/src/Umbraco.Core/Models/Trees/ActionMenuItem.cs b/src/Umbraco.Core/Models/Trees/ActionMenuItem.cs index fe760fb94d..2f05541c19 100644 --- a/src/Umbraco.Core/Models/Trees/ActionMenuItem.cs +++ b/src/Umbraco.Core/Models/Trees/ActionMenuItem.cs @@ -1,7 +1,7 @@ -using Umbraco.Core; -using Umbraco.Core.Services; +using Umbraco.Cms.Core.Services; +using Umbraco.Extensions; -namespace Umbraco.Web.Models.Trees +namespace Umbraco.Cms.Core.Models.Trees { /// /// diff --git a/src/Umbraco.Core/Models/Trees/CreateChildEntity.cs b/src/Umbraco.Core/Models/Trees/CreateChildEntity.cs index 03bac2cfec..a8d945242e 100644 --- a/src/Umbraco.Core/Models/Trees/CreateChildEntity.cs +++ b/src/Umbraco.Core/Models/Trees/CreateChildEntity.cs @@ -1,7 +1,7 @@ -using Umbraco.Core.Services; -using Umbraco.Web.Actions; +using Umbraco.Cms.Core.Actions; +using Umbraco.Cms.Core.Services; -namespace Umbraco.Web.Models.Trees +namespace Umbraco.Cms.Core.Models.Trees { /// /// Represents the refresh node menu item diff --git a/src/Umbraco.Core/Models/Trees/ExportMember.cs b/src/Umbraco.Core/Models/Trees/ExportMember.cs index 558f7c1fa1..30f904f952 100644 --- a/src/Umbraco.Core/Models/Trees/ExportMember.cs +++ b/src/Umbraco.Core/Models/Trees/ExportMember.cs @@ -1,6 +1,6 @@ -using Umbraco.Core.Services; +using Umbraco.Cms.Core.Services; -namespace Umbraco.Web.Models.Trees +namespace Umbraco.Cms.Core.Models.Trees { /// /// Represents the export member menu item diff --git a/src/Umbraco.Core/Models/Trees/MenuItem.cs b/src/Umbraco.Core/Models/Trees/MenuItem.cs index 1b7c130a60..4c275709aa 100644 --- a/src/Umbraco.Core/Models/Trees/MenuItem.cs +++ b/src/Umbraco.Core/Models/Trees/MenuItem.cs @@ -1,13 +1,13 @@ -using System.ComponentModel.DataAnnotations; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; using System.Runtime.Serialization; -using Umbraco.Web.Trees; -using System.Collections.Generic; -using Umbraco.Core; -using Umbraco.Core.Services; -using Umbraco.Web.Actions; using System.Threading; +using Umbraco.Cms.Core.Actions; +using Umbraco.Cms.Core.Services; +using Umbraco.Cms.Core.Trees; +using Umbraco.Extensions; -namespace Umbraco.Web.Models.Trees +namespace Umbraco.Cms.Core.Models.Trees { /// /// A context menu item diff --git a/src/Umbraco.Core/Models/Trees/RefreshNode.cs b/src/Umbraco.Core/Models/Trees/RefreshNode.cs index def753140e..01eb2fa34a 100644 --- a/src/Umbraco.Core/Models/Trees/RefreshNode.cs +++ b/src/Umbraco.Core/Models/Trees/RefreshNode.cs @@ -1,6 +1,6 @@ -using Umbraco.Core.Services; +using Umbraco.Cms.Core.Services; -namespace Umbraco.Web.Models.Trees +namespace Umbraco.Cms.Core.Models.Trees { /// /// diff --git a/src/Umbraco.Core/Models/UmbracoDomain.cs b/src/Umbraco.Core/Models/UmbracoDomain.cs index c4a49de5d3..6930499783 100644 --- a/src/Umbraco.Core/Models/UmbracoDomain.cs +++ b/src/Umbraco.Core/Models/UmbracoDomain.cs @@ -1,8 +1,8 @@ using System; using System.Runtime.Serialization; -using Umbraco.Core.Models.Entities; +using Umbraco.Cms.Core.Models.Entities; -namespace Umbraco.Core.Models +namespace Umbraco.Cms.Core.Models { [Serializable] [DataContract(IsReference = true)] diff --git a/src/Umbraco.Core/Models/UmbracoObjectTypes.cs b/src/Umbraco.Core/Models/UmbracoObjectTypes.cs index f403ea6e67..00dbd490f8 100644 --- a/src/Umbraco.Core/Models/UmbracoObjectTypes.cs +++ b/src/Umbraco.Core/Models/UmbracoObjectTypes.cs @@ -1,6 +1,6 @@ -using Umbraco.Core.CodeAnnotations; +using Umbraco.Cms.Core.CodeAnnotations; -namespace Umbraco.Core.Models +namespace Umbraco.Cms.Core.Models { /// /// Enum used to represent the Umbraco Object Types and their associated GUIDs diff --git a/src/Umbraco.Core/Models/UmbracoProperty.cs b/src/Umbraco.Core/Models/UmbracoProperty.cs index 8b41141b95..bffcd43fb3 100644 --- a/src/Umbraco.Core/Models/UmbracoProperty.cs +++ b/src/Umbraco.Core/Models/UmbracoProperty.cs @@ -1,11 +1,7 @@ using System.ComponentModel; using System.ComponentModel.DataAnnotations; -using System.Xml; -using Umbraco.Core; -using Umbraco.Core.Models; -using DataType = System.ComponentModel.DataAnnotations.DataType; -namespace Umbraco.Web.Models +namespace Umbraco.Cms.Core.Models { /// /// A simple representation of an Umbraco property @@ -22,7 +18,7 @@ namespace Umbraco.Web.Models // and when we set this value on the property object that gets sent to the database we do a TryConvertTo to the // real type anyways. - [DataType(DataType.Text)] + [DataType(System.ComponentModel.DataAnnotations.DataType.Text)] public string Value { get; set; } [ReadOnly(true)] diff --git a/src/Umbraco.Core/Models/UmbracoUserExtensions.cs b/src/Umbraco.Core/Models/UmbracoUserExtensions.cs index 18684f7946..8c4a0cf59b 100644 --- a/src/Umbraco.Core/Models/UmbracoUserExtensions.cs +++ b/src/Umbraco.Core/Models/UmbracoUserExtensions.cs @@ -1,14 +1,16 @@ -using System; +// Copyright (c) Umbraco. +// See LICENSE for more details. + +using System; using System.Collections.Generic; using System.Globalization; using System.Linq; -using System.Text; -using Umbraco.Core.Configuration; -using Umbraco.Core.Configuration.Models; -using Umbraco.Core.Models.Membership; -using Umbraco.Core.Services; +using Umbraco.Cms.Core; +using Umbraco.Cms.Core.Configuration.Models; +using Umbraco.Cms.Core.Models.Membership; +using Umbraco.Cms.Core.Services; -namespace Umbraco.Core.Models +namespace Umbraco.Extensions { public static class UmbracoUserExtensions { diff --git a/src/Umbraco.Core/Models/UnLinkLoginModel.cs b/src/Umbraco.Core/Models/UnLinkLoginModel.cs index 824fadaf90..38d1901c12 100644 --- a/src/Umbraco.Core/Models/UnLinkLoginModel.cs +++ b/src/Umbraco.Core/Models/UnLinkLoginModel.cs @@ -1,7 +1,7 @@ using System.ComponentModel.DataAnnotations; using System.Runtime.Serialization; -namespace Umbraco.Web.Models +namespace Umbraco.Cms.Core.Models { public class UnLinkLoginModel { diff --git a/src/Umbraco.Core/Models/UpgradeCheckResponse.cs b/src/Umbraco.Core/Models/UpgradeCheckResponse.cs index 854f6cc4de..8ac335e6e7 100644 --- a/src/Umbraco.Core/Models/UpgradeCheckResponse.cs +++ b/src/Umbraco.Core/Models/UpgradeCheckResponse.cs @@ -1,8 +1,8 @@ -using System.Runtime.Serialization; using System.Net; -using Umbraco.Core.Configuration; +using System.Runtime.Serialization; +using Umbraco.Cms.Core.Configuration; -namespace Umbraco.Web.Models +namespace Umbraco.Cms.Core.Models { [DataContract(Name = "upgrade", Namespace = "")] public class UpgradeCheckResponse @@ -21,7 +21,7 @@ namespace Umbraco.Web.Models { Type = upgradeType; Comment = upgradeComment; - Url = upgradeUrl + "?version=" + WebUtility.UrlEncode(umbracoVersion.Current.ToString(3)); + Url = upgradeUrl + "?version=" + WebUtility.UrlEncode(umbracoVersion.Version.ToString(3)); } } } diff --git a/src/Umbraco.Core/Models/UserExtensions.cs b/src/Umbraco.Core/Models/UserExtensions.cs index 6a3ea16ff7..e944107f3f 100644 --- a/src/Umbraco.Core/Models/UserExtensions.cs +++ b/src/Umbraco.Core/Models/UserExtensions.cs @@ -3,16 +3,16 @@ using System.Collections.Generic; using System.Linq; using System.Net; using System.Security.Cryptography; -using Umbraco.Core.Cache; -using Umbraco.Core.IO; -using Umbraco.Core.Models.Entities; -using Umbraco.Core.Models.Membership; -using Umbraco.Core.Services; -using Umbraco.Core.Security; -using Umbraco.Core.Media; -using Umbraco.Web.Models; +using Umbraco.Cms.Core.Cache; +using Umbraco.Cms.Core.IO; +using Umbraco.Cms.Core.Media; +using Umbraco.Cms.Core.Models.Entities; +using Umbraco.Cms.Core.Models.Membership; +using Umbraco.Cms.Core.Security; +using Umbraco.Cms.Core.Services; +using Umbraco.Extensions; -namespace Umbraco.Core.Models +namespace Umbraco.Cms.Core.Models { public static class UserExtensions { diff --git a/src/Umbraco.Core/Models/UserTourStatus.cs b/src/Umbraco.Core/Models/UserTourStatus.cs index d1834f3d6b..6fe7b024d0 100644 --- a/src/Umbraco.Core/Models/UserTourStatus.cs +++ b/src/Umbraco.Core/Models/UserTourStatus.cs @@ -1,7 +1,7 @@ using System; using System.Runtime.Serialization; -namespace Umbraco.Web.Models +namespace Umbraco.Cms.Core.Models { /// /// A model representing the tours a user has taken/completed @@ -57,4 +57,4 @@ namespace Umbraco.Web.Models return !Equals(left, right); } } -} \ No newline at end of file +} diff --git a/src/Umbraco.Core/Models/ValidatePasswordResetCodeModel.cs b/src/Umbraco.Core/Models/ValidatePasswordResetCodeModel.cs index 152d7460fd..8f1ff2f49c 100644 --- a/src/Umbraco.Core/Models/ValidatePasswordResetCodeModel.cs +++ b/src/Umbraco.Core/Models/ValidatePasswordResetCodeModel.cs @@ -2,7 +2,7 @@ using System.ComponentModel.DataAnnotations; using System.Runtime.Serialization; -namespace Umbraco.Web.Models +namespace Umbraco.Cms.Core.Models { [Serializable] [DataContract(Name = "validatePasswordReset", Namespace = "")] diff --git a/src/Umbraco.Core/Models/Validation/RequiredForPersistenceAttribute.cs b/src/Umbraco.Core/Models/Validation/RequiredForPersistenceAttribute.cs index feb889e962..10133a7f36 100644 --- a/src/Umbraco.Core/Models/Validation/RequiredForPersistenceAttribute.cs +++ b/src/Umbraco.Core/Models/Validation/RequiredForPersistenceAttribute.cs @@ -1,9 +1,9 @@ using System.ComponentModel.DataAnnotations; using System.Linq; using System.Reflection; -using Umbraco.Core.PropertyEditors; +using Umbraco.Cms.Core.PropertyEditors; -namespace Umbraco.Core.Models.Validation +namespace Umbraco.Cms.Core.Models.Validation { /// /// Specifies that a data field value is required in order to persist an object. diff --git a/src/Umbraco.Core/Models/ValueStorageType.cs b/src/Umbraco.Core/Models/ValueStorageType.cs index abbae60dc7..cca84b72b7 100644 --- a/src/Umbraco.Core/Models/ValueStorageType.cs +++ b/src/Umbraco.Core/Models/ValueStorageType.cs @@ -1,7 +1,7 @@ using System; using System.Runtime.Serialization; -namespace Umbraco.Core.Models +namespace Umbraco.Cms.Core.Models { /// /// Represents the supported database types for storing a value. diff --git a/src/Umbraco.Core/MonitorLock.cs b/src/Umbraco.Core/MonitorLock.cs index 9d17c86be8..11651aaa6c 100644 --- a/src/Umbraco.Core/MonitorLock.cs +++ b/src/Umbraco.Core/MonitorLock.cs @@ -1,6 +1,6 @@ using System; -namespace Umbraco.Core +namespace Umbraco.Cms.Core { /// /// Provides an equivalent to the c# lock statement, to be used in a using block. diff --git a/src/Umbraco.Core/NamedUdiRange.cs b/src/Umbraco.Core/NamedUdiRange.cs index f4c4066d61..b66cdb0998 100644 --- a/src/Umbraco.Core/NamedUdiRange.cs +++ b/src/Umbraco.Core/NamedUdiRange.cs @@ -1,4 +1,4 @@ -namespace Umbraco.Core +namespace Umbraco.Cms.Core { /// /// Represents a complemented with a name. diff --git a/src/Umbraco.Core/Net/IIpResolver.cs b/src/Umbraco.Core/Net/IIpResolver.cs index 7fb6b8a793..6c7ab72dec 100644 --- a/src/Umbraco.Core/Net/IIpResolver.cs +++ b/src/Umbraco.Core/Net/IIpResolver.cs @@ -1,4 +1,4 @@ -namespace Umbraco.Net +namespace Umbraco.Cms.Core.Net { public interface IIpResolver { diff --git a/src/Umbraco.Core/Net/ISessionIdResolver.cs b/src/Umbraco.Core/Net/ISessionIdResolver.cs index 745be5a435..580c04c8e2 100644 --- a/src/Umbraco.Core/Net/ISessionIdResolver.cs +++ b/src/Umbraco.Core/Net/ISessionIdResolver.cs @@ -1,4 +1,4 @@ -namespace Umbraco.Net +namespace Umbraco.Cms.Core.Net { public interface ISessionIdResolver { diff --git a/src/Umbraco.Core/Net/IUserAgentProvider.cs b/src/Umbraco.Core/Net/IUserAgentProvider.cs index 14246ea99e..fdca8c1dbf 100644 --- a/src/Umbraco.Core/Net/IUserAgentProvider.cs +++ b/src/Umbraco.Core/Net/IUserAgentProvider.cs @@ -1,4 +1,4 @@ -namespace Umbraco.Net +namespace Umbraco.Cms.Core.Net { public interface IUserAgentProvider { diff --git a/src/Umbraco.Core/Net/NullSessionIdResolver.cs b/src/Umbraco.Core/Net/NullSessionIdResolver.cs index 6bfa578268..c7bd462aba 100644 --- a/src/Umbraco.Core/Net/NullSessionIdResolver.cs +++ b/src/Umbraco.Core/Net/NullSessionIdResolver.cs @@ -1,4 +1,4 @@ -namespace Umbraco.Net +namespace Umbraco.Cms.Core.Net { public class NullSessionIdResolver : ISessionIdResolver { diff --git a/src/Umbraco.Core/NetworkHelper.cs b/src/Umbraco.Core/NetworkHelper.cs index 1929e45ee3..8e1bfaea92 100644 --- a/src/Umbraco.Core/NetworkHelper.cs +++ b/src/Umbraco.Core/NetworkHelper.cs @@ -1,6 +1,7 @@ using System; +using Umbraco.Extensions; -namespace Umbraco.Core +namespace Umbraco.Cms.Core { /// /// Currently just used to get the machine name in med trust and to format a machine name for use with file names diff --git a/src/Umbraco.Core/PackageActions/AllowDoctype.cs b/src/Umbraco.Core/PackageActions/AllowDoctype.cs index c68d116e25..7e2bf47fab 100644 --- a/src/Umbraco.Core/PackageActions/AllowDoctype.cs +++ b/src/Umbraco.Core/PackageActions/AllowDoctype.cs @@ -1,10 +1,11 @@ using System.Collections; using System.Linq; using System.Xml.Linq; -using Umbraco.Core.Models; -using Umbraco.Core.Services; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Core.Services; +using Umbraco.Extensions; -namespace Umbraco.Core.PackageActions +namespace Umbraco.Cms.Core.PackageActions { /// /// This class implements the IPackageAction Interface, used to execute code when packages are installed. diff --git a/src/Umbraco.Core/PackageActions/IPackageAction.cs b/src/Umbraco.Core/PackageActions/IPackageAction.cs index d4dfb4079b..65db0116ea 100644 --- a/src/Umbraco.Core/PackageActions/IPackageAction.cs +++ b/src/Umbraco.Core/PackageActions/IPackageAction.cs @@ -1,7 +1,7 @@ using System.Xml.Linq; -using Umbraco.Core.Composing; +using Umbraco.Cms.Core.Composing; -namespace Umbraco.Core.PackageActions +namespace Umbraco.Cms.Core.PackageActions { public interface IPackageAction : IDiscoverable { diff --git a/src/Umbraco.Core/PackageActions/PackageActionCollection.cs b/src/Umbraco.Core/PackageActions/PackageActionCollection.cs index 813695f84c..078eb0c09f 100644 --- a/src/Umbraco.Core/PackageActions/PackageActionCollection.cs +++ b/src/Umbraco.Core/PackageActions/PackageActionCollection.cs @@ -1,7 +1,7 @@ using System.Collections.Generic; -using Umbraco.Core.Composing; +using Umbraco.Cms.Core.Composing; -namespace Umbraco.Core.PackageActions +namespace Umbraco.Cms.Core.PackageActions { public sealed class PackageActionCollection : BuilderCollectionBase { diff --git a/src/Umbraco.Core/PackageActions/PackageActionCollectionBuilder.cs b/src/Umbraco.Core/PackageActions/PackageActionCollectionBuilder.cs index d30fb92cf9..efabeeaad8 100644 --- a/src/Umbraco.Core/PackageActions/PackageActionCollectionBuilder.cs +++ b/src/Umbraco.Core/PackageActions/PackageActionCollectionBuilder.cs @@ -1,6 +1,6 @@ -using Umbraco.Core.Composing; +using Umbraco.Cms.Core.Composing; -namespace Umbraco.Core.PackageActions +namespace Umbraco.Cms.Core.PackageActions { public class PackageActionCollectionBuilder : LazyCollectionBuilderBase { diff --git a/src/Umbraco.Core/PackageActions/PublishRootDocument.cs b/src/Umbraco.Core/PackageActions/PublishRootDocument.cs index ff871142d6..8a73275e1e 100644 --- a/src/Umbraco.Core/PackageActions/PublishRootDocument.cs +++ b/src/Umbraco.Core/PackageActions/PublishRootDocument.cs @@ -1,7 +1,8 @@ using System.Xml.Linq; -using Umbraco.Core.Services; +using Umbraco.Cms.Core.Services; +using Umbraco.Extensions; -namespace Umbraco.Core.PackageActions +namespace Umbraco.Cms.Core.PackageActions { /// /// This class implements the IPackageAction Interface, used to execute code when packages are installed. diff --git a/src/Umbraco.Core/Packaging/CompiledPackageXmlParser.cs b/src/Umbraco.Core/Packaging/CompiledPackageXmlParser.cs index be3f38cb22..2838a2678d 100644 --- a/src/Umbraco.Core/Packaging/CompiledPackageXmlParser.cs +++ b/src/Umbraco.Core/Packaging/CompiledPackageXmlParser.cs @@ -4,10 +4,11 @@ using System.IO; using System.Linq; using System.Xml.Linq; using Microsoft.Extensions.Options; -using Umbraco.Core.Configuration.Models; -using Umbraco.Core.Models.Packaging; +using Umbraco.Cms.Core.Configuration.Models; +using Umbraco.Cms.Core.Models.Packaging; +using Umbraco.Extensions; -namespace Umbraco.Core.Packaging +namespace Umbraco.Cms.Core.Packaging { /// /// Parses the xml document contained in a compiled (zip) Umbraco package diff --git a/src/Umbraco.Core/Packaging/ConflictingPackageData.cs b/src/Umbraco.Core/Packaging/ConflictingPackageData.cs index 9a976bea41..27e96d8c82 100644 --- a/src/Umbraco.Core/Packaging/ConflictingPackageData.cs +++ b/src/Umbraco.Core/Packaging/ConflictingPackageData.cs @@ -2,10 +2,10 @@ using System.Collections.Generic; using System.Linq; using System.Xml.Linq; -using Umbraco.Core.Models; -using Umbraco.Core.Services; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Core.Services; -namespace Umbraco.Core.Packaging +namespace Umbraco.Cms.Core.Packaging { public class ConflictingPackageData { diff --git a/src/Umbraco.Core/Packaging/ICreatedPackagesRepository.cs b/src/Umbraco.Core/Packaging/ICreatedPackagesRepository.cs index 42606da6ef..c4d36f817f 100644 --- a/src/Umbraco.Core/Packaging/ICreatedPackagesRepository.cs +++ b/src/Umbraco.Core/Packaging/ICreatedPackagesRepository.cs @@ -1,6 +1,4 @@ -using Umbraco.Core.Models.Packaging; - -namespace Umbraco.Core.Packaging +namespace Umbraco.Cms.Core.Packaging { /// /// Manages the storage of created package definitions diff --git a/src/Umbraco.Core/Packaging/IInstalledPackagesRepository.cs b/src/Umbraco.Core/Packaging/IInstalledPackagesRepository.cs index 61f611edc5..399e79d6d3 100644 --- a/src/Umbraco.Core/Packaging/IInstalledPackagesRepository.cs +++ b/src/Umbraco.Core/Packaging/IInstalledPackagesRepository.cs @@ -1,6 +1,4 @@ -using System; - -namespace Umbraco.Core.Packaging +namespace Umbraco.Cms.Core.Packaging { /// /// Manages the storage of installed package definitions diff --git a/src/Umbraco.Core/Packaging/IPackageActionRunner.cs b/src/Umbraco.Core/Packaging/IPackageActionRunner.cs index 1f8c134364..e170ff7961 100644 --- a/src/Umbraco.Core/Packaging/IPackageActionRunner.cs +++ b/src/Umbraco.Core/Packaging/IPackageActionRunner.cs @@ -1,7 +1,7 @@ using System.Collections.Generic; using System.Xml.Linq; -namespace Umbraco.Core.Packaging +namespace Umbraco.Cms.Core.Packaging { public interface IPackageActionRunner { diff --git a/src/Umbraco.Core/Packaging/IPackageDefinitionRepository.cs b/src/Umbraco.Core/Packaging/IPackageDefinitionRepository.cs index 343a0a05ea..c074a45ae1 100644 --- a/src/Umbraco.Core/Packaging/IPackageDefinitionRepository.cs +++ b/src/Umbraco.Core/Packaging/IPackageDefinitionRepository.cs @@ -1,7 +1,6 @@ using System.Collections.Generic; -using Umbraco.Core.Models.Packaging; -namespace Umbraco.Core.Packaging +namespace Umbraco.Cms.Core.Packaging { /// /// Defines methods for persisting package definitions to storage @@ -20,4 +19,4 @@ namespace Umbraco.Core.Packaging /// bool SavePackage(PackageDefinition definition); } -} \ No newline at end of file +} diff --git a/src/Umbraco.Core/Packaging/IPackageInstallation.cs b/src/Umbraco.Core/Packaging/IPackageInstallation.cs index a9fa3c9cc7..ca2f9a9397 100644 --- a/src/Umbraco.Core/Packaging/IPackageInstallation.cs +++ b/src/Umbraco.Core/Packaging/IPackageInstallation.cs @@ -1,9 +1,8 @@ using System.Collections.Generic; using System.IO; -using System.Xml.Linq; -using Umbraco.Core.Models.Packaging; +using Umbraco.Cms.Core.Models.Packaging; -namespace Umbraco.Core.Packaging +namespace Umbraco.Cms.Core.Packaging { public interface IPackageInstallation { diff --git a/src/Umbraco.Core/Packaging/InstallationSummary.cs b/src/Umbraco.Core/Packaging/InstallationSummary.cs index abeaa82bc1..cf2efcd159 100644 --- a/src/Umbraco.Core/Packaging/InstallationSummary.cs +++ b/src/Umbraco.Core/Packaging/InstallationSummary.cs @@ -2,8 +2,10 @@ using System.Collections.Generic; using System.Linq; using System.Runtime.Serialization; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Core.Models.Packaging; -namespace Umbraco.Core.Models.Packaging +namespace Umbraco.Cms.Core.Packaging { [Serializable] [DataContract(IsReference = true)] diff --git a/src/Umbraco.Core/Packaging/PackageActionRunner.cs b/src/Umbraco.Core/Packaging/PackageActionRunner.cs index 138feadf29..8fd54fa431 100644 --- a/src/Umbraco.Core/Packaging/PackageActionRunner.cs +++ b/src/Umbraco.Core/Packaging/PackageActionRunner.cs @@ -2,9 +2,9 @@ using System.Collections.Generic; using System.Xml.Linq; using Microsoft.Extensions.Logging; -using Umbraco.Core.PackageActions; +using Umbraco.Cms.Core.PackageActions; -namespace Umbraco.Core.Packaging +namespace Umbraco.Cms.Core.Packaging { /// /// Package actions are executed on package install / uninstall. diff --git a/src/Umbraco.Core/Packaging/PackageDefinition.cs b/src/Umbraco.Core/Packaging/PackageDefinition.cs index 379b400e75..03a17d147e 100644 --- a/src/Umbraco.Core/Packaging/PackageDefinition.cs +++ b/src/Umbraco.Core/Packaging/PackageDefinition.cs @@ -4,8 +4,9 @@ using System.ComponentModel; using System.ComponentModel.DataAnnotations; using System.Linq; using System.Runtime.Serialization; +using Umbraco.Cms.Core.Models.Packaging; -namespace Umbraco.Core.Models.Packaging +namespace Umbraco.Cms.Core.Packaging { [DataContract(Name = "packageInstance")] public class PackageDefinition : IPackageInfo diff --git a/src/Umbraco.Core/Packaging/PackageDefinitionXmlParser.cs b/src/Umbraco.Core/Packaging/PackageDefinitionXmlParser.cs index d194b0ea56..14e6790f3c 100644 --- a/src/Umbraco.Core/Packaging/PackageDefinitionXmlParser.cs +++ b/src/Umbraco.Core/Packaging/PackageDefinitionXmlParser.cs @@ -1,12 +1,12 @@ -using System; +using System; using System.Collections.Generic; using System.Linq; using System.Xml.Linq; using Microsoft.Extensions.Logging; -using Umbraco.Core.Configuration; -using Umbraco.Core.Models.Packaging; +using Umbraco.Cms.Core.Configuration; +using Umbraco.Extensions; -namespace Umbraco.Core.Packaging +namespace Umbraco.Cms.Core.Packaging { /// /// Converts a to and from XML @@ -81,7 +81,7 @@ namespace Umbraco.Core.Packaging new XAttribute("name", def.Name ?? string.Empty), new XAttribute("packagePath", def.PackagePath ?? string.Empty), new XAttribute("iconUrl", def.IconUrl ?? string.Empty), - new XAttribute("umbVersion", def.UmbracoVersion ?? _umbracoVersion.Current), + new XAttribute("umbVersion", def.UmbracoVersion ?? _umbracoVersion.Version), new XAttribute("packageGuid", def.PackageId), new XAttribute("view", def.PackageView ?? string.Empty), diff --git a/src/Umbraco.Core/Packaging/PackageExtraction.cs b/src/Umbraco.Core/Packaging/PackageExtraction.cs index 4e3ba929dc..fddf9f4d1a 100644 --- a/src/Umbraco.Core/Packaging/PackageExtraction.cs +++ b/src/Umbraco.Core/Packaging/PackageExtraction.cs @@ -1,10 +1,11 @@ using System; using System.Collections.Generic; using System.IO; -using System.Linq; using System.IO.Compression; +using System.Linq; +using Umbraco.Extensions; -namespace Umbraco.Core.Packaging +namespace Umbraco.Cms.Core.Packaging { public class PackageExtraction { @@ -45,7 +46,7 @@ namespace Umbraco.Core.Packaging private static void CheckPackageExists(FileInfo packageFile) { if (packageFile == null) throw new ArgumentNullException(nameof(packageFile)); - + if (!packageFile.Exists) throw new ArgumentException($"Package file: {packageFile} could not be found"); diff --git a/src/Umbraco.Core/Packaging/PackageFileInstallation.cs b/src/Umbraco.Core/Packaging/PackageFileInstallation.cs index 884085548e..c9feccb6b5 100644 --- a/src/Umbraco.Core/Packaging/PackageFileInstallation.cs +++ b/src/Umbraco.Core/Packaging/PackageFileInstallation.cs @@ -1,13 +1,14 @@ using System.Collections.Generic; using System.IO; using System.Linq; -using Umbraco.Core.Hosting; -using Umbraco.Core.IO; -using Umbraco.Core.Logging; -using Umbraco.Core.Models.Packaging; +using Umbraco.Cms.Core.Hosting; +using Umbraco.Cms.Core.IO; +using Umbraco.Cms.Core.Logging; +using Umbraco.Cms.Core.Models.Packaging; using File = System.IO.File; +using Umbraco.Extensions; -namespace Umbraco.Core.Packaging +namespace Umbraco.Cms.Core.Packaging { /// /// Installs package files diff --git a/src/Umbraco.Core/Packaging/PackageInstallType.cs b/src/Umbraco.Core/Packaging/PackageInstallType.cs index 015b994aec..0c6abbc9f9 100644 --- a/src/Umbraco.Core/Packaging/PackageInstallType.cs +++ b/src/Umbraco.Core/Packaging/PackageInstallType.cs @@ -1,4 +1,4 @@ -namespace Umbraco.Core.Packaging +namespace Umbraco.Cms.Core.Packaging { public enum PackageInstallType { @@ -6,4 +6,4 @@ NewInstall, Upgrade } -} \ No newline at end of file +} diff --git a/src/Umbraco.Core/Packaging/PackagesRepository.cs b/src/Umbraco.Core/Packaging/PackagesRepository.cs index b89448d891..904f73ab93 100644 --- a/src/Umbraco.Core/Packaging/PackagesRepository.cs +++ b/src/Umbraco.Core/Packaging/PackagesRepository.cs @@ -7,15 +7,16 @@ using System.Linq; using System.Xml.Linq; using Microsoft.Extensions.Logging; using Microsoft.Extensions.Options; -using Umbraco.Core.Configuration; -using Umbraco.Core.Configuration.Models; -using Umbraco.Core.Hosting; -using Umbraco.Core.Models; -using Umbraco.Core.Models.Packaging; -using Umbraco.Core.Services; +using Umbraco.Cms.Core.Configuration; +using Umbraco.Cms.Core.Configuration.Models; +using Umbraco.Cms.Core.Hosting; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Core.Models.Packaging; +using Umbraco.Cms.Core.Services; +using Umbraco.Extensions; using File = System.IO.File; -namespace Umbraco.Core.Packaging +namespace Umbraco.Cms.Core.Packaging { /// /// Manages the storage of installed/created package definitions diff --git a/src/Umbraco.Core/Packaging/UninstallationSummary.cs b/src/Umbraco.Core/Packaging/UninstallationSummary.cs index fd39954f6b..b751c46c50 100644 --- a/src/Umbraco.Core/Packaging/UninstallationSummary.cs +++ b/src/Umbraco.Core/Packaging/UninstallationSummary.cs @@ -2,8 +2,10 @@ using System.Collections.Generic; using System.Linq; using System.Runtime.Serialization; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Core.Models.Packaging; -namespace Umbraco.Core.Models.Packaging +namespace Umbraco.Cms.Core.Packaging { [Serializable] [DataContract(IsReference = true)] diff --git a/src/Umbraco.Core/Persistence/Constants-DatabaseSchema.cs b/src/Umbraco.Core/Persistence/Constants-DatabaseSchema.cs index f430a8894c..73004c491d 100644 --- a/src/Umbraco.Core/Persistence/Constants-DatabaseSchema.cs +++ b/src/Umbraco.Core/Persistence/Constants-DatabaseSchema.cs @@ -1,5 +1,5 @@ // ReSharper disable once CheckNamespace -namespace Umbraco.Core +namespace Umbraco.Cms.Core { public static partial class Constants { diff --git a/src/Umbraco.Core/Persistence/Constants-DbProviderNames.cs b/src/Umbraco.Core/Persistence/Constants-DbProviderNames.cs index 8e81a5acf8..7c08189d74 100644 --- a/src/Umbraco.Core/Persistence/Constants-DbProviderNames.cs +++ b/src/Umbraco.Core/Persistence/Constants-DbProviderNames.cs @@ -1,5 +1,5 @@  // ReSharper disable once CheckNamespace -namespace Umbraco.Core +namespace Umbraco.Cms.Core { static partial class Constants { diff --git a/src/Umbraco.Core/Persistence/Constants-Locks.cs b/src/Umbraco.Core/Persistence/Constants-Locks.cs index e64f40ced7..5312bf6886 100644 --- a/src/Umbraco.Core/Persistence/Constants-Locks.cs +++ b/src/Umbraco.Core/Persistence/Constants-Locks.cs @@ -1,5 +1,8 @@ // ReSharper disable once CheckNamespace -namespace Umbraco.Core + +using Umbraco.Cms.Core.Runtime; + +namespace Umbraco.Cms.Core { static partial class Constants { diff --git a/src/Umbraco.Core/Persistence/IQueryRepository.cs b/src/Umbraco.Core/Persistence/IQueryRepository.cs index 3e23b72186..9513573908 100644 --- a/src/Umbraco.Core/Persistence/IQueryRepository.cs +++ b/src/Umbraco.Core/Persistence/IQueryRepository.cs @@ -1,7 +1,7 @@ using System.Collections.Generic; -using Umbraco.Core.Persistence.Querying; +using Umbraco.Cms.Core.Persistence.Querying; -namespace Umbraco.Core.Persistence +namespace Umbraco.Cms.Core.Persistence { /// /// Defines the base implementation of a querying repository. diff --git a/src/Umbraco.Core/Persistence/IReadRepository.cs b/src/Umbraco.Core/Persistence/IReadRepository.cs index 8b2a4c2533..ea5d24f774 100644 --- a/src/Umbraco.Core/Persistence/IReadRepository.cs +++ b/src/Umbraco.Core/Persistence/IReadRepository.cs @@ -1,6 +1,6 @@ using System.Collections.Generic; -namespace Umbraco.Core.Persistence +namespace Umbraco.Cms.Core.Persistence { /// /// Defines the base implementation of a reading repository. @@ -22,4 +22,4 @@ namespace Umbraco.Core.Persistence /// bool Exists(TId id); } -} \ No newline at end of file +} diff --git a/src/Umbraco.Core/Persistence/IReadWriteQueryRepository.cs b/src/Umbraco.Core/Persistence/IReadWriteQueryRepository.cs index aaaf276e0b..b260144de6 100644 --- a/src/Umbraco.Core/Persistence/IReadWriteQueryRepository.cs +++ b/src/Umbraco.Core/Persistence/IReadWriteQueryRepository.cs @@ -1,4 +1,4 @@ -namespace Umbraco.Core.Persistence +namespace Umbraco.Cms.Core.Persistence { /// /// Defines the base implementation of a reading, writing and querying repository. diff --git a/src/Umbraco.Core/Persistence/IRepository.cs b/src/Umbraco.Core/Persistence/IRepository.cs index 9c51a8affd..f91c4c998b 100644 --- a/src/Umbraco.Core/Persistence/IRepository.cs +++ b/src/Umbraco.Core/Persistence/IRepository.cs @@ -1,4 +1,4 @@ -namespace Umbraco.Core.Persistence +namespace Umbraco.Cms.Core.Persistence { /// /// Defines the base implementation of a repository. diff --git a/src/Umbraco.Core/Persistence/IWriteRepository.cs b/src/Umbraco.Core/Persistence/IWriteRepository.cs index 26687648b9..ff766fbe36 100644 --- a/src/Umbraco.Core/Persistence/IWriteRepository.cs +++ b/src/Umbraco.Core/Persistence/IWriteRepository.cs @@ -1,4 +1,4 @@ -namespace Umbraco.Core.Persistence +namespace Umbraco.Cms.Core.Persistence { /// /// Defines the base implementation of a writing repository. @@ -16,4 +16,4 @@ /// void Delete(TEntity entity); } -} \ No newline at end of file +} diff --git a/src/Umbraco.Core/Persistence/Querying/IQuery.cs b/src/Umbraco.Core/Persistence/Querying/IQuery.cs index d5723b6032..c55d14001d 100644 --- a/src/Umbraco.Core/Persistence/Querying/IQuery.cs +++ b/src/Umbraco.Core/Persistence/Querying/IQuery.cs @@ -3,7 +3,7 @@ using System.Collections; using System.Collections.Generic; using System.Linq.Expressions; -namespace Umbraco.Core.Persistence.Querying +namespace Umbraco.Cms.Core.Persistence.Querying { /// /// Represents a query for building Linq translatable SQL queries diff --git a/src/Umbraco.Core/Persistence/Querying/StringPropertyMatchType.cs b/src/Umbraco.Core/Persistence/Querying/StringPropertyMatchType.cs index f4c95c02b5..3e48a00d05 100644 --- a/src/Umbraco.Core/Persistence/Querying/StringPropertyMatchType.cs +++ b/src/Umbraco.Core/Persistence/Querying/StringPropertyMatchType.cs @@ -1,4 +1,4 @@ -namespace Umbraco.Core.Persistence.Querying +namespace Umbraco.Cms.Core.Persistence.Querying { /// /// Determines how to match a string property value diff --git a/src/Umbraco.Core/Persistence/Querying/ValuePropertyMatchType.cs b/src/Umbraco.Core/Persistence/Querying/ValuePropertyMatchType.cs index 14cba2bb17..58daf2e577 100644 --- a/src/Umbraco.Core/Persistence/Querying/ValuePropertyMatchType.cs +++ b/src/Umbraco.Core/Persistence/Querying/ValuePropertyMatchType.cs @@ -1,4 +1,4 @@ -namespace Umbraco.Core.Persistence.Querying +namespace Umbraco.Cms.Core.Persistence.Querying { /// /// Determine how to match a number or data value diff --git a/src/Umbraco.Core/Persistence/Repositories/IAuditEntryRepository.cs b/src/Umbraco.Core/Persistence/Repositories/IAuditEntryRepository.cs index 1d4d2fe531..159267c16e 100644 --- a/src/Umbraco.Core/Persistence/Repositories/IAuditEntryRepository.cs +++ b/src/Umbraco.Core/Persistence/Repositories/IAuditEntryRepository.cs @@ -1,7 +1,7 @@ using System.Collections.Generic; -using Umbraco.Core.Models; +using Umbraco.Cms.Core.Models; -namespace Umbraco.Core.Persistence.Repositories +namespace Umbraco.Cms.Core.Persistence.Repositories { /// /// Represents a repository for entities. diff --git a/src/Umbraco.Core/Persistence/Repositories/IAuditRepository.cs b/src/Umbraco.Core/Persistence/Repositories/IAuditRepository.cs index fbd9ec2e13..37394c9898 100644 --- a/src/Umbraco.Core/Persistence/Repositories/IAuditRepository.cs +++ b/src/Umbraco.Core/Persistence/Repositories/IAuditRepository.cs @@ -1,8 +1,8 @@ using System.Collections.Generic; -using Umbraco.Core.Models; -using Umbraco.Core.Persistence.Querying; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Core.Persistence.Querying; -namespace Umbraco.Core.Persistence.Repositories +namespace Umbraco.Cms.Core.Persistence.Repositories { public interface IAuditRepository : IReadRepository, IWriteRepository, IQueryRepository { @@ -28,7 +28,7 @@ namespace Umbraco.Core.Persistence.Repositories /// IEnumerable GetPagedResultsByQuery( IQuery query, - long pageIndex, int pageSize, out long totalRecords, + long pageIndex, int pageSize, out long totalRecords, Direction orderDirection, AuditType[] auditTypeFilter, IQuery customFilter); diff --git a/src/Umbraco.Core/Persistence/Repositories/IConsentRepository.cs b/src/Umbraco.Core/Persistence/Repositories/IConsentRepository.cs index 85cfb52ba3..a89ed56285 100644 --- a/src/Umbraco.Core/Persistence/Repositories/IConsentRepository.cs +++ b/src/Umbraco.Core/Persistence/Repositories/IConsentRepository.cs @@ -1,6 +1,6 @@ -using Umbraco.Core.Models; +using Umbraco.Cms.Core.Models; -namespace Umbraco.Core.Persistence.Repositories +namespace Umbraco.Cms.Core.Persistence.Repositories { /// /// Represents a repository for entities. diff --git a/src/Umbraco.Core/Persistence/Repositories/IContentTypeCommonRepository.cs b/src/Umbraco.Core/Persistence/Repositories/IContentTypeCommonRepository.cs index e7657ac941..955ad47a72 100644 --- a/src/Umbraco.Core/Persistence/Repositories/IContentTypeCommonRepository.cs +++ b/src/Umbraco.Core/Persistence/Repositories/IContentTypeCommonRepository.cs @@ -1,7 +1,7 @@ using System.Collections.Generic; -using Umbraco.Core.Models; +using Umbraco.Cms.Core.Models; -namespace Umbraco.Core.Persistence.Repositories +namespace Umbraco.Cms.Core.Persistence.Repositories { // TODO // this should be IContentTypeRepository, and what is IContentTypeRepository at the moment should diff --git a/src/Umbraco.Core/Persistence/Repositories/IDataTypeContainerRepository.cs b/src/Umbraco.Core/Persistence/Repositories/IDataTypeContainerRepository.cs index 57d3871e5a..3e19c08f99 100644 --- a/src/Umbraco.Core/Persistence/Repositories/IDataTypeContainerRepository.cs +++ b/src/Umbraco.Core/Persistence/Repositories/IDataTypeContainerRepository.cs @@ -1,4 +1,4 @@ -namespace Umbraco.Core.Persistence.Repositories +namespace Umbraco.Cms.Core.Persistence.Repositories { public interface IDataTypeContainerRepository : IEntityContainerRepository { } diff --git a/src/Umbraco.Core/Persistence/Repositories/IDictionaryRepository.cs b/src/Umbraco.Core/Persistence/Repositories/IDictionaryRepository.cs index 6314b01374..c448b39ce9 100644 --- a/src/Umbraco.Core/Persistence/Repositories/IDictionaryRepository.cs +++ b/src/Umbraco.Core/Persistence/Repositories/IDictionaryRepository.cs @@ -1,8 +1,8 @@ using System; using System.Collections.Generic; -using Umbraco.Core.Models; +using Umbraco.Cms.Core.Models; -namespace Umbraco.Core.Persistence.Repositories +namespace Umbraco.Cms.Core.Persistence.Repositories { public interface IDictionaryRepository : IReadWriteQueryRepository { diff --git a/src/Umbraco.Core/Persistence/Repositories/IDocumentTypeContainerRepository.cs b/src/Umbraco.Core/Persistence/Repositories/IDocumentTypeContainerRepository.cs index ec8dfb9110..53fd62fdbe 100644 --- a/src/Umbraco.Core/Persistence/Repositories/IDocumentTypeContainerRepository.cs +++ b/src/Umbraco.Core/Persistence/Repositories/IDocumentTypeContainerRepository.cs @@ -1,4 +1,4 @@ -namespace Umbraco.Core.Persistence.Repositories +namespace Umbraco.Cms.Core.Persistence.Repositories { public interface IDocumentTypeContainerRepository : IEntityContainerRepository { } diff --git a/src/Umbraco.Core/Persistence/Repositories/IDomainRepository.cs b/src/Umbraco.Core/Persistence/Repositories/IDomainRepository.cs index 1542f54801..a0827f95c1 100644 --- a/src/Umbraco.Core/Persistence/Repositories/IDomainRepository.cs +++ b/src/Umbraco.Core/Persistence/Repositories/IDomainRepository.cs @@ -1,7 +1,7 @@ using System.Collections.Generic; -using Umbraco.Core.Models; +using Umbraco.Cms.Core.Models; -namespace Umbraco.Core.Persistence.Repositories +namespace Umbraco.Cms.Core.Persistence.Repositories { public interface IDomainRepository : IReadWriteQueryRepository { diff --git a/src/Umbraco.Core/Persistence/Repositories/IEntityContainerRepository.cs b/src/Umbraco.Core/Persistence/Repositories/IEntityContainerRepository.cs index f1c8353a0d..9b76a8f965 100644 --- a/src/Umbraco.Core/Persistence/Repositories/IEntityContainerRepository.cs +++ b/src/Umbraco.Core/Persistence/Repositories/IEntityContainerRepository.cs @@ -1,6 +1,6 @@ -using Umbraco.Core.Models; +using Umbraco.Cms.Core.Models; -namespace Umbraco.Core.Persistence.Repositories +namespace Umbraco.Cms.Core.Persistence.Repositories { public interface IEntityContainerRepository : IReadRepository, IWriteRepository { } diff --git a/src/Umbraco.Core/Persistence/Repositories/IExternalLoginRepository.cs b/src/Umbraco.Core/Persistence/Repositories/IExternalLoginRepository.cs index a3455249fe..8821c332c3 100644 --- a/src/Umbraco.Core/Persistence/Repositories/IExternalLoginRepository.cs +++ b/src/Umbraco.Core/Persistence/Repositories/IExternalLoginRepository.cs @@ -1,8 +1,7 @@ -using System; using System.Collections.Generic; -using Umbraco.Core.Models.Identity; +using Umbraco.Cms.Core.Models.Identity; -namespace Umbraco.Core.Persistence.Repositories +namespace Umbraco.Cms.Core.Persistence.Repositories { public interface IExternalLoginRepository : IReadWriteQueryRepository { diff --git a/src/Umbraco.Core/Persistence/Repositories/IInstallationRepository.cs b/src/Umbraco.Core/Persistence/Repositories/IInstallationRepository.cs index fbc7d2cfbc..5dc7ab0555 100644 --- a/src/Umbraco.Core/Persistence/Repositories/IInstallationRepository.cs +++ b/src/Umbraco.Core/Persistence/Repositories/IInstallationRepository.cs @@ -1,8 +1,6 @@ -using System; -using System.Threading.Tasks; -using Umbraco.Core.Models; +using System.Threading.Tasks; -namespace Umbraco.Core.Persistence.Repositories +namespace Umbraco.Cms.Core.Persistence.Repositories { public interface IInstallationRepository { diff --git a/src/Umbraco.Core/Persistence/Repositories/IKeyValueRepository.cs b/src/Umbraco.Core/Persistence/Repositories/IKeyValueRepository.cs index 0eb2b27eb0..e9625892d4 100644 --- a/src/Umbraco.Core/Persistence/Repositories/IKeyValueRepository.cs +++ b/src/Umbraco.Core/Persistence/Repositories/IKeyValueRepository.cs @@ -1,6 +1,6 @@ -using Umbraco.Core.Models; +using Umbraco.Cms.Core.Models; -namespace Umbraco.Core.Persistence.Repositories +namespace Umbraco.Cms.Core.Persistence.Repositories { public interface IKeyValueRepository : IReadRepository, IWriteRepository { diff --git a/src/Umbraco.Core/Persistence/Repositories/ILanguageRepository.cs b/src/Umbraco.Core/Persistence/Repositories/ILanguageRepository.cs index fbcbf13651..0ea0638d9f 100644 --- a/src/Umbraco.Core/Persistence/Repositories/ILanguageRepository.cs +++ b/src/Umbraco.Core/Persistence/Repositories/ILanguageRepository.cs @@ -1,6 +1,6 @@ -using Umbraco.Core.Models; +using Umbraco.Cms.Core.Models; -namespace Umbraco.Core.Persistence.Repositories +namespace Umbraco.Cms.Core.Persistence.Repositories { public interface ILanguageRepository : IReadWriteQueryRepository { diff --git a/src/Umbraco.Core/Persistence/Repositories/IMacroRepository.cs b/src/Umbraco.Core/Persistence/Repositories/IMacroRepository.cs index 1ed08352ed..44ab86b80a 100644 --- a/src/Umbraco.Core/Persistence/Repositories/IMacroRepository.cs +++ b/src/Umbraco.Core/Persistence/Repositories/IMacroRepository.cs @@ -1,7 +1,7 @@ using System; -using Umbraco.Core.Models; +using Umbraco.Cms.Core.Models; -namespace Umbraco.Core.Persistence.Repositories +namespace Umbraco.Cms.Core.Persistence.Repositories { public interface IMacroRepository : IReadWriteQueryRepository, IReadRepository { diff --git a/src/Umbraco.Core/Persistence/Repositories/IMediaTypeContainerRepository.cs b/src/Umbraco.Core/Persistence/Repositories/IMediaTypeContainerRepository.cs index 6a133c053a..cf2c181d5f 100644 --- a/src/Umbraco.Core/Persistence/Repositories/IMediaTypeContainerRepository.cs +++ b/src/Umbraco.Core/Persistence/Repositories/IMediaTypeContainerRepository.cs @@ -1,4 +1,4 @@ -namespace Umbraco.Core.Persistence.Repositories +namespace Umbraco.Cms.Core.Persistence.Repositories { public interface IMediaTypeContainerRepository : IEntityContainerRepository { } diff --git a/src/Umbraco.Core/Persistence/Repositories/IMemberGroupRepository.cs b/src/Umbraco.Core/Persistence/Repositories/IMemberGroupRepository.cs index d63b1bb9db..74fdc4d00c 100644 --- a/src/Umbraco.Core/Persistence/Repositories/IMemberGroupRepository.cs +++ b/src/Umbraco.Core/Persistence/Repositories/IMemberGroupRepository.cs @@ -1,8 +1,8 @@ using System; using System.Collections.Generic; -using Umbraco.Core.Models; +using Umbraco.Cms.Core.Models; -namespace Umbraco.Core.Persistence.Repositories +namespace Umbraco.Cms.Core.Persistence.Repositories { public interface IMemberGroupRepository : IReadWriteQueryRepository { diff --git a/src/Umbraco.Core/Persistence/Repositories/INotificationsRepository.cs b/src/Umbraco.Core/Persistence/Repositories/INotificationsRepository.cs index d24e981085..069c31ef50 100644 --- a/src/Umbraco.Core/Persistence/Repositories/INotificationsRepository.cs +++ b/src/Umbraco.Core/Persistence/Repositories/INotificationsRepository.cs @@ -1,10 +1,10 @@ using System; using System.Collections.Generic; -using Umbraco.Core.Models; -using Umbraco.Core.Models.Entities; -using Umbraco.Core.Models.Membership; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Core.Models.Entities; +using Umbraco.Cms.Core.Models.Membership; -namespace Umbraco.Core.Persistence.Repositories +namespace Umbraco.Cms.Core.Persistence.Repositories { public interface INotificationsRepository : IRepository { diff --git a/src/Umbraco.Core/Persistence/Repositories/IPartialViewMacroRepository.cs b/src/Umbraco.Core/Persistence/Repositories/IPartialViewMacroRepository.cs index b360f9b1a5..c731d39780 100644 --- a/src/Umbraco.Core/Persistence/Repositories/IPartialViewMacroRepository.cs +++ b/src/Umbraco.Core/Persistence/Repositories/IPartialViewMacroRepository.cs @@ -1,4 +1,4 @@ -namespace Umbraco.Core.Persistence.Repositories +namespace Umbraco.Cms.Core.Persistence.Repositories { // this only exists to differentiate with IPartialViewRepository in IoC // without resorting to constants, names, whatever - and IPartialViewRepository diff --git a/src/Umbraco.Core/Persistence/Repositories/IPartialViewRepository.cs b/src/Umbraco.Core/Persistence/Repositories/IPartialViewRepository.cs index 5a7bae1ce3..b0eb7055ec 100644 --- a/src/Umbraco.Core/Persistence/Repositories/IPartialViewRepository.cs +++ b/src/Umbraco.Core/Persistence/Repositories/IPartialViewRepository.cs @@ -1,7 +1,7 @@ using System.IO; -using Umbraco.Core.Models; +using Umbraco.Cms.Core.Models; -namespace Umbraco.Core.Persistence.Repositories +namespace Umbraco.Cms.Core.Persistence.Repositories { public interface IPartialViewRepository : IReadRepository, IWriteRepository { diff --git a/src/Umbraco.Core/Persistence/Repositories/IRedirectUrlRepository.cs b/src/Umbraco.Core/Persistence/Repositories/IRedirectUrlRepository.cs index 36f885520d..3a4e5f900b 100644 --- a/src/Umbraco.Core/Persistence/Repositories/IRedirectUrlRepository.cs +++ b/src/Umbraco.Core/Persistence/Repositories/IRedirectUrlRepository.cs @@ -1,8 +1,8 @@ using System; using System.Collections.Generic; -using Umbraco.Core.Models; +using Umbraco.Cms.Core.Models; -namespace Umbraco.Core.Persistence.Repositories +namespace Umbraco.Cms.Core.Persistence.Repositories { /// /// Defines the repository. diff --git a/src/Umbraco.Core/Persistence/Repositories/IRelationRepository.cs b/src/Umbraco.Core/Persistence/Repositories/IRelationRepository.cs index ca40848138..cff64d4a79 100644 --- a/src/Umbraco.Core/Persistence/Repositories/IRelationRepository.cs +++ b/src/Umbraco.Core/Persistence/Repositories/IRelationRepository.cs @@ -1,11 +1,11 @@ using System; using System.Collections.Generic; -using Umbraco.Core.Models; -using Umbraco.Core.Models.Entities; -using Umbraco.Core.Persistence.Querying; -using Umbraco.Core.Services; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Core.Models.Entities; +using Umbraco.Cms.Core.Persistence.Querying; +using Umbraco.Cms.Core.Services; -namespace Umbraco.Core.Persistence.Repositories +namespace Umbraco.Cms.Core.Persistence.Repositories { public interface IRelationRepository : IReadWriteQueryRepository { diff --git a/src/Umbraco.Core/Persistence/Repositories/IRelationTypeRepository.cs b/src/Umbraco.Core/Persistence/Repositories/IRelationTypeRepository.cs index 393bf5a7ca..26dfe4acba 100644 --- a/src/Umbraco.Core/Persistence/Repositories/IRelationTypeRepository.cs +++ b/src/Umbraco.Core/Persistence/Repositories/IRelationTypeRepository.cs @@ -1,7 +1,7 @@ using System; -using Umbraco.Core.Models; +using Umbraco.Cms.Core.Models; -namespace Umbraco.Core.Persistence.Repositories +namespace Umbraco.Cms.Core.Persistence.Repositories { public interface IRelationTypeRepository : IReadWriteQueryRepository, IReadRepository { } diff --git a/src/Umbraco.Core/Persistence/Repositories/IScriptRepository.cs b/src/Umbraco.Core/Persistence/Repositories/IScriptRepository.cs index 70226777b5..6d2dd4bc57 100644 --- a/src/Umbraco.Core/Persistence/Repositories/IScriptRepository.cs +++ b/src/Umbraco.Core/Persistence/Repositories/IScriptRepository.cs @@ -1,7 +1,7 @@ using System.IO; -using Umbraco.Core.Models; +using Umbraco.Cms.Core.Models; -namespace Umbraco.Core.Persistence.Repositories +namespace Umbraco.Cms.Core.Persistence.Repositories { public interface IScriptRepository : IReadRepository, IWriteRepository { diff --git a/src/Umbraco.Core/Persistence/Repositories/IServerRegistrationRepository.cs b/src/Umbraco.Core/Persistence/Repositories/IServerRegistrationRepository.cs index eac90b57d2..b76b46a82a 100644 --- a/src/Umbraco.Core/Persistence/Repositories/IServerRegistrationRepository.cs +++ b/src/Umbraco.Core/Persistence/Repositories/IServerRegistrationRepository.cs @@ -1,7 +1,7 @@ using System; -using Umbraco.Core.Models; +using Umbraco.Cms.Core.Models; -namespace Umbraco.Core.Persistence.Repositories +namespace Umbraco.Cms.Core.Persistence.Repositories { public interface IServerRegistrationRepository : IReadWriteQueryRepository { diff --git a/src/Umbraco.Core/Persistence/Repositories/IStylesheetRepository.cs b/src/Umbraco.Core/Persistence/Repositories/IStylesheetRepository.cs index dbcab32dbf..445630a535 100644 --- a/src/Umbraco.Core/Persistence/Repositories/IStylesheetRepository.cs +++ b/src/Umbraco.Core/Persistence/Repositories/IStylesheetRepository.cs @@ -1,7 +1,7 @@ using System.IO; -using Umbraco.Core.Models; +using Umbraco.Cms.Core.Models; -namespace Umbraco.Core.Persistence.Repositories +namespace Umbraco.Cms.Core.Persistence.Repositories { public interface IStylesheetRepository : IReadRepository, IWriteRepository { diff --git a/src/Umbraco.Core/Persistence/Repositories/ITagRepository.cs b/src/Umbraco.Core/Persistence/Repositories/ITagRepository.cs index c3e6dc028b..d11192c32f 100644 --- a/src/Umbraco.Core/Persistence/Repositories/ITagRepository.cs +++ b/src/Umbraco.Core/Persistence/Repositories/ITagRepository.cs @@ -1,8 +1,8 @@ using System; using System.Collections.Generic; -using Umbraco.Core.Models; +using Umbraco.Cms.Core.Models; -namespace Umbraco.Core.Persistence.Repositories +namespace Umbraco.Cms.Core.Persistence.Repositories { public interface ITagRepository : IReadWriteQueryRepository { @@ -35,7 +35,7 @@ namespace Umbraco.Core.Persistence.Repositories /// /// The identifier of the content item. void RemoveAll(int contentId); - + /// /// Removes all assigned tags from a content property. /// diff --git a/src/Umbraco.Core/Persistence/Repositories/ITemplateRepository.cs b/src/Umbraco.Core/Persistence/Repositories/ITemplateRepository.cs index 2e9bdcfc4a..24c83ff29d 100644 --- a/src/Umbraco.Core/Persistence/Repositories/ITemplateRepository.cs +++ b/src/Umbraco.Core/Persistence/Repositories/ITemplateRepository.cs @@ -1,8 +1,8 @@ using System.Collections.Generic; using System.IO; -using Umbraco.Core.Models; +using Umbraco.Cms.Core.Models; -namespace Umbraco.Core.Persistence.Repositories +namespace Umbraco.Cms.Core.Persistence.Repositories { public interface ITemplateRepository : IReadWriteQueryRepository { diff --git a/src/Umbraco.Core/Persistence/Repositories/IUpgradeCheckRepository.cs b/src/Umbraco.Core/Persistence/Repositories/IUpgradeCheckRepository.cs index 6d56994781..d64f177f14 100644 --- a/src/Umbraco.Core/Persistence/Repositories/IUpgradeCheckRepository.cs +++ b/src/Umbraco.Core/Persistence/Repositories/IUpgradeCheckRepository.cs @@ -1,8 +1,7 @@ using System.Threading.Tasks; -using Semver; -using Umbraco.Core.Models; +using Umbraco.Cms.Core.Semver; -namespace Umbraco.Core.Persistence.Repositories +namespace Umbraco.Cms.Core.Persistence.Repositories { public interface IUpgradeCheckRepository { diff --git a/src/Umbraco.Core/Persistence/Repositories/IUserGroupRepository.cs b/src/Umbraco.Core/Persistence/Repositories/IUserGroupRepository.cs index 85fa8d894b..7bb42cb774 100644 --- a/src/Umbraco.Core/Persistence/Repositories/IUserGroupRepository.cs +++ b/src/Umbraco.Core/Persistence/Repositories/IUserGroupRepository.cs @@ -1,7 +1,7 @@ using System.Collections.Generic; -using Umbraco.Core.Models.Membership; +using Umbraco.Cms.Core.Models.Membership; -namespace Umbraco.Core.Persistence.Repositories +namespace Umbraco.Cms.Core.Persistence.Repositories { public interface IUserGroupRepository : IReadWriteQueryRepository { diff --git a/src/Umbraco.Core/Persistence/Repositories/IUserRepository.cs b/src/Umbraco.Core/Persistence/Repositories/IUserRepository.cs index 0d1a8764ae..799cb01963 100644 --- a/src/Umbraco.Core/Persistence/Repositories/IUserRepository.cs +++ b/src/Umbraco.Core/Persistence/Repositories/IUserRepository.cs @@ -1,10 +1,10 @@ using System; using System.Collections.Generic; using System.Linq.Expressions; -using Umbraco.Core.Models.Membership; -using Umbraco.Core.Persistence.Querying; +using Umbraco.Cms.Core.Models.Membership; +using Umbraco.Cms.Core.Persistence.Querying; -namespace Umbraco.Core.Persistence.Repositories +namespace Umbraco.Cms.Core.Persistence.Repositories { public interface IUserRepository : IReadWriteQueryRepository { diff --git a/src/Umbraco.Core/Persistence/Repositories/InstallationRepository.cs b/src/Umbraco.Core/Persistence/Repositories/InstallationRepository.cs index 01c91fe051..58ebf8f5c4 100644 --- a/src/Umbraco.Core/Persistence/Repositories/InstallationRepository.cs +++ b/src/Umbraco.Core/Persistence/Repositories/InstallationRepository.cs @@ -1,10 +1,9 @@ using System.Net.Http; using System.Text; using System.Threading.Tasks; -using Umbraco.Core.Models; -using Umbraco.Core.Serialization; +using Umbraco.Cms.Core.Serialization; -namespace Umbraco.Core.Persistence.Repositories.Implement +namespace Umbraco.Cms.Core.Persistence.Repositories { public class InstallationRepository : IInstallationRepository { diff --git a/src/Umbraco.Core/Persistence/Repositories/RepositoryCacheKeys.cs b/src/Umbraco.Core/Persistence/Repositories/RepositoryCacheKeys.cs index 693656eb65..f5388d8f95 100644 --- a/src/Umbraco.Core/Persistence/Repositories/RepositoryCacheKeys.cs +++ b/src/Umbraco.Core/Persistence/Repositories/RepositoryCacheKeys.cs @@ -1,7 +1,7 @@ using System; using System.Collections.Generic; -namespace Umbraco.Core.Persistence.Repositories.Implement +namespace Umbraco.Cms.Core.Persistence.Repositories { /// /// Provides cache keys for repositories. diff --git a/src/Umbraco.Core/Persistence/Repositories/UpgradeCheckRepository.cs b/src/Umbraco.Core/Persistence/Repositories/UpgradeCheckRepository.cs index 1babb3c1ad..2f55293a13 100644 --- a/src/Umbraco.Core/Persistence/Repositories/UpgradeCheckRepository.cs +++ b/src/Umbraco.Core/Persistence/Repositories/UpgradeCheckRepository.cs @@ -2,11 +2,10 @@ using System.Net.Http; using System.Text; using System.Threading.Tasks; -using Semver; -using Umbraco.Core.Models; -using Umbraco.Core.Serialization; +using Umbraco.Cms.Core.Semver; +using Umbraco.Cms.Core.Serialization; -namespace Umbraco.Core.Persistence.Repositories.Implement +namespace Umbraco.Cms.Core.Persistence.Repositories { public class UpgradeCheckRepository : IUpgradeCheckRepository { diff --git a/src/Umbraco.Core/Persistence/SqlExtensionsStatics.cs b/src/Umbraco.Core/Persistence/SqlExtensionsStatics.cs index 0974b8df6d..71df9a362e 100644 --- a/src/Umbraco.Core/Persistence/SqlExtensionsStatics.cs +++ b/src/Umbraco.Core/Persistence/SqlExtensionsStatics.cs @@ -1,6 +1,6 @@ using System; -namespace Umbraco.Core.Persistence +namespace Umbraco.Cms.Core.Persistence { /// /// Provides a mean to express aliases in SELECT Sql statements. diff --git a/src/Umbraco.Core/Properties/AssemblyInfo.cs b/src/Umbraco.Core/Properties/AssemblyInfo.cs index ede9e49a7d..9f49dade80 100644 --- a/src/Umbraco.Core/Properties/AssemblyInfo.cs +++ b/src/Umbraco.Core/Properties/AssemblyInfo.cs @@ -8,7 +8,6 @@ using System.Runtime.InteropServices; // Umbraco Cms [assembly: InternalsVisibleTo("Umbraco.Web")] [assembly: InternalsVisibleTo("Umbraco.Web.UI")] -[assembly: InternalsVisibleTo("Umbraco.ModelsBuilder.Embedded")] [assembly: InternalsVisibleTo("Umbraco.Tests")] [assembly: InternalsVisibleTo("Umbraco.Tests.Benchmarks")] diff --git a/src/Umbraco.Core/PropertyEditors/BlockListConfiguration.cs b/src/Umbraco.Core/PropertyEditors/BlockListConfiguration.cs index 27064e2aa7..f29511150c 100644 --- a/src/Umbraco.Core/PropertyEditors/BlockListConfiguration.cs +++ b/src/Umbraco.Core/PropertyEditors/BlockListConfiguration.cs @@ -1,8 +1,7 @@ using System; using System.Runtime.Serialization; -using Umbraco.Core.PropertyEditors; -namespace Umbraco.Web.PropertyEditors +namespace Umbraco.Cms.Core.PropertyEditors { /// /// The configuration object for the Block List editor diff --git a/src/Umbraco.Core/PropertyEditors/ColorPickerConfiguration.cs b/src/Umbraco.Core/PropertyEditors/ColorPickerConfiguration.cs index b49cdf4ae1..80350bb350 100644 --- a/src/Umbraco.Core/PropertyEditors/ColorPickerConfiguration.cs +++ b/src/Umbraco.Core/PropertyEditors/ColorPickerConfiguration.cs @@ -1,4 +1,4 @@ -namespace Umbraco.Core.PropertyEditors +namespace Umbraco.Cms.Core.PropertyEditors { /// /// Represents the configuration for the color picker value editor. diff --git a/src/Umbraco.Core/PropertyEditors/ConfigurationEditor.cs b/src/Umbraco.Core/PropertyEditors/ConfigurationEditor.cs index e40db6e3cd..d4f1d84984 100644 --- a/src/Umbraco.Core/PropertyEditors/ConfigurationEditor.cs +++ b/src/Umbraco.Core/PropertyEditors/ConfigurationEditor.cs @@ -2,9 +2,10 @@ using System.Collections.Generic; using System.Linq; using System.Runtime.Serialization; -using Umbraco.Core.Serialization; +using Umbraco.Cms.Core.Serialization; +using Umbraco.Extensions; -namespace Umbraco.Core.PropertyEditors +namespace Umbraco.Cms.Core.PropertyEditors { /// /// Represents a data type configuration editor. diff --git a/src/Umbraco.Core/PropertyEditors/ConfigurationField.cs b/src/Umbraco.Core/PropertyEditors/ConfigurationField.cs index 52df839712..8b7abfafe6 100644 --- a/src/Umbraco.Core/PropertyEditors/ConfigurationField.cs +++ b/src/Umbraco.Core/PropertyEditors/ConfigurationField.cs @@ -1,10 +1,10 @@ using System; using System.Collections.Generic; using System.Linq; -using System.Reflection; using System.Runtime.Serialization; +using Umbraco.Extensions; -namespace Umbraco.Core.PropertyEditors +namespace Umbraco.Cms.Core.PropertyEditors { /// /// Represents a datatype configuration field for editing. diff --git a/src/Umbraco.Core/PropertyEditors/ConfigurationFieldAttribute.cs b/src/Umbraco.Core/PropertyEditors/ConfigurationFieldAttribute.cs index 1852c742f0..ff32308f36 100644 --- a/src/Umbraco.Core/PropertyEditors/ConfigurationFieldAttribute.cs +++ b/src/Umbraco.Core/PropertyEditors/ConfigurationFieldAttribute.cs @@ -1,6 +1,6 @@ using System; -namespace Umbraco.Core.PropertyEditors +namespace Umbraco.Cms.Core.PropertyEditors { /// /// Marks a ConfigurationEditor property as a configuration field, and a class as a configuration field type. diff --git a/src/Umbraco.Core/PropertyEditors/ContentPickerConfiguration.cs b/src/Umbraco.Core/PropertyEditors/ContentPickerConfiguration.cs index 021d416781..1f25b6abac 100644 --- a/src/Umbraco.Core/PropertyEditors/ContentPickerConfiguration.cs +++ b/src/Umbraco.Core/PropertyEditors/ContentPickerConfiguration.cs @@ -1,7 +1,4 @@ -using Umbraco.Core; -using Umbraco.Core.PropertyEditors; - -namespace Umbraco.Web.PropertyEditors +namespace Umbraco.Cms.Core.PropertyEditors { public class ContentPickerConfiguration : IIgnoreUserStartNodesConfig { @@ -11,7 +8,7 @@ namespace Umbraco.Web.PropertyEditors [ConfigurationField("startNodeId", "Start node", "treepicker")] // + config in configuration editor ctor public Udi StartNodeId { get; set; } - [ConfigurationField(Core.Constants.DataTypes.ReservedPreValueKeys.IgnoreUserStartNodes, + [ConfigurationField(Constants.DataTypes.ReservedPreValueKeys.IgnoreUserStartNodes, "Ignore User Start Nodes", "boolean", Description = "Selecting this option allows a user to choose nodes that they normally don't have access to.")] public bool IgnoreUserStartNodes { get; set; } diff --git a/src/Umbraco.Core/PropertyEditors/DataEditor.cs b/src/Umbraco.Core/PropertyEditors/DataEditor.cs index ef533aa083..de011c6555 100644 --- a/src/Umbraco.Core/PropertyEditors/DataEditor.cs +++ b/src/Umbraco.Core/PropertyEditors/DataEditor.cs @@ -3,12 +3,14 @@ using System.Collections.Generic; using System.Diagnostics; using System.Runtime.Serialization; using Microsoft.Extensions.Logging; -using Umbraco.Core.Composing; -using Umbraco.Core.Serialization; -using Umbraco.Core.Services; -using Umbraco.Core.Strings; +using Umbraco.Cms.Core.Composing; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Core.Serialization; +using Umbraco.Cms.Core.Services; +using Umbraco.Cms.Core.Strings; +using Umbraco.Extensions; -namespace Umbraco.Core.PropertyEditors +namespace Umbraco.Cms.Core.PropertyEditors { /// /// Represents a data editor. diff --git a/src/Umbraco.Core/PropertyEditors/DataEditorAttribute.cs b/src/Umbraco.Core/PropertyEditors/DataEditorAttribute.cs index 7b3be7ea5f..f8fbc051cd 100644 --- a/src/Umbraco.Core/PropertyEditors/DataEditorAttribute.cs +++ b/src/Umbraco.Core/PropertyEditors/DataEditorAttribute.cs @@ -1,6 +1,6 @@ using System; -namespace Umbraco.Core.PropertyEditors +namespace Umbraco.Cms.Core.PropertyEditors { /// /// Marks a class that represents a data editor. diff --git a/src/Umbraco.Core/PropertyEditors/DataEditorCollection.cs b/src/Umbraco.Core/PropertyEditors/DataEditorCollection.cs index d10a34a6c6..d4ddc21827 100644 --- a/src/Umbraco.Core/PropertyEditors/DataEditorCollection.cs +++ b/src/Umbraco.Core/PropertyEditors/DataEditorCollection.cs @@ -1,7 +1,7 @@ using System.Collections.Generic; -using Umbraco.Core.Composing; +using Umbraco.Cms.Core.Composing; -namespace Umbraco.Core.PropertyEditors +namespace Umbraco.Cms.Core.PropertyEditors { public class DataEditorCollection : BuilderCollectionBase { diff --git a/src/Umbraco.Core/PropertyEditors/DataEditorCollectionBuilder.cs b/src/Umbraco.Core/PropertyEditors/DataEditorCollectionBuilder.cs index c0c0a3651e..4794d37c21 100644 --- a/src/Umbraco.Core/PropertyEditors/DataEditorCollectionBuilder.cs +++ b/src/Umbraco.Core/PropertyEditors/DataEditorCollectionBuilder.cs @@ -1,6 +1,6 @@ -using Umbraco.Core.Composing; +using Umbraco.Cms.Core.Composing; -namespace Umbraco.Core.PropertyEditors +namespace Umbraco.Cms.Core.PropertyEditors { public class DataEditorCollectionBuilder : LazyCollectionBuilderBase { diff --git a/src/Umbraco.Core/PropertyEditors/DataValueEditor.cs b/src/Umbraco.Core/PropertyEditors/DataValueEditor.cs index 237af042cf..2415f48907 100644 --- a/src/Umbraco.Core/PropertyEditors/DataValueEditor.cs +++ b/src/Umbraco.Core/PropertyEditors/DataValueEditor.cs @@ -6,14 +6,15 @@ using System.Linq; using System.Runtime.Serialization; using System.Xml.Linq; using Microsoft.Extensions.Logging; -using Umbraco.Core.Models; -using Umbraco.Core.Models.Editors; -using Umbraco.Core.PropertyEditors.Validators; -using Umbraco.Core.Serialization; -using Umbraco.Core.Services; -using Umbraco.Core.Strings; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Core.Models.Editors; +using Umbraco.Cms.Core.PropertyEditors.Validators; +using Umbraco.Cms.Core.Serialization; +using Umbraco.Cms.Core.Services; +using Umbraco.Cms.Core.Strings; +using Umbraco.Extensions; -namespace Umbraco.Core.PropertyEditors +namespace Umbraco.Cms.Core.PropertyEditors { /// /// Represents a value editor. diff --git a/src/Umbraco.Core/PropertyEditors/DataValueReferenceFactoryCollection.cs b/src/Umbraco.Core/PropertyEditors/DataValueReferenceFactoryCollection.cs index 1dadd6cf0a..9a9efa5e2c 100644 --- a/src/Umbraco.Core/PropertyEditors/DataValueReferenceFactoryCollection.cs +++ b/src/Umbraco.Core/PropertyEditors/DataValueReferenceFactoryCollection.cs @@ -1,9 +1,9 @@ using System.Collections.Generic; -using Umbraco.Core.Composing; -using Umbraco.Core.Models; -using Umbraco.Core.Models.Editors; +using Umbraco.Cms.Core.Composing; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Core.Models.Editors; -namespace Umbraco.Core.PropertyEditors +namespace Umbraco.Cms.Core.PropertyEditors { public class DataValueReferenceFactoryCollection : BuilderCollectionBase { diff --git a/src/Umbraco.Core/PropertyEditors/DataValueReferenceFactoryCollectionBuilder.cs b/src/Umbraco.Core/PropertyEditors/DataValueReferenceFactoryCollectionBuilder.cs index 2cf76712c8..b42ea74e88 100644 --- a/src/Umbraco.Core/PropertyEditors/DataValueReferenceFactoryCollectionBuilder.cs +++ b/src/Umbraco.Core/PropertyEditors/DataValueReferenceFactoryCollectionBuilder.cs @@ -1,6 +1,6 @@ -using Umbraco.Core.Composing; +using Umbraco.Cms.Core.Composing; -namespace Umbraco.Core.PropertyEditors +namespace Umbraco.Cms.Core.PropertyEditors { public class DataValueReferenceFactoryCollectionBuilder : OrderedCollectionBuilderBase { diff --git a/src/Umbraco.Core/PropertyEditors/DateTimeConfiguration.cs b/src/Umbraco.Core/PropertyEditors/DateTimeConfiguration.cs index 9801ba0271..985d58f06d 100644 --- a/src/Umbraco.Core/PropertyEditors/DateTimeConfiguration.cs +++ b/src/Umbraco.Core/PropertyEditors/DateTimeConfiguration.cs @@ -1,4 +1,4 @@ -namespace Umbraco.Core.PropertyEditors +namespace Umbraco.Cms.Core.PropertyEditors { /// /// Represents the configuration for the datetime value editor. diff --git a/src/Umbraco.Core/PropertyEditors/DateValueEditor.cs b/src/Umbraco.Core/PropertyEditors/DateValueEditor.cs index b6208197c7..2cb9c0f887 100644 --- a/src/Umbraco.Core/PropertyEditors/DateValueEditor.cs +++ b/src/Umbraco.Core/PropertyEditors/DateValueEditor.cs @@ -1,12 +1,12 @@ using System; -using Umbraco.Core; -using Umbraco.Core.Models; -using Umbraco.Core.PropertyEditors; -using Umbraco.Core.Serialization; -using Umbraco.Core.Services; -using Umbraco.Core.Strings; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Core.PropertyEditors.Validators; +using Umbraco.Cms.Core.Serialization; +using Umbraco.Cms.Core.Services; +using Umbraco.Cms.Core.Strings; +using Umbraco.Extensions; -namespace Umbraco.Web.PropertyEditors +namespace Umbraco.Cms.Core.PropertyEditors { /// /// CUstom value editor so we can serialize with the correct date format (excluding time) diff --git a/src/Umbraco.Core/PropertyEditors/DecimalConfigurationEditor.cs b/src/Umbraco.Core/PropertyEditors/DecimalConfigurationEditor.cs index efb1df1eb7..52eefbd400 100644 --- a/src/Umbraco.Core/PropertyEditors/DecimalConfigurationEditor.cs +++ b/src/Umbraco.Core/PropertyEditors/DecimalConfigurationEditor.cs @@ -1,7 +1,6 @@ -using Umbraco.Core.PropertyEditors; -using Umbraco.Core.PropertyEditors.Validators; +using Umbraco.Cms.Core.PropertyEditors.Validators; -namespace Umbraco.Web.PropertyEditors +namespace Umbraco.Cms.Core.PropertyEditors { /// /// A custom pre-value editor class to deal with the legacy way that the pre-value data is stored. diff --git a/src/Umbraco.Core/PropertyEditors/DecimalPropertyEditor.cs b/src/Umbraco.Core/PropertyEditors/DecimalPropertyEditor.cs index 4aea9f944f..01723ecea4 100644 --- a/src/Umbraco.Core/PropertyEditors/DecimalPropertyEditor.cs +++ b/src/Umbraco.Core/PropertyEditors/DecimalPropertyEditor.cs @@ -1,12 +1,11 @@ using Microsoft.Extensions.Logging; -using Umbraco.Core; -using Umbraco.Core.PropertyEditors; -using Umbraco.Core.PropertyEditors.Validators; -using Umbraco.Core.Serialization; -using Umbraco.Core.Services; -using Umbraco.Core.Strings; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Core.PropertyEditors.Validators; +using Umbraco.Cms.Core.Serialization; +using Umbraco.Cms.Core.Services; +using Umbraco.Cms.Core.Strings; -namespace Umbraco.Web.PropertyEditors +namespace Umbraco.Cms.Core.PropertyEditors { /// /// Represents a decimal property and parameter editor. diff --git a/src/Umbraco.Core/PropertyEditors/DefaultPropertyIndexValueFactory.cs b/src/Umbraco.Core/PropertyEditors/DefaultPropertyIndexValueFactory.cs index 0d06b59a9c..b70a1be851 100644 --- a/src/Umbraco.Core/PropertyEditors/DefaultPropertyIndexValueFactory.cs +++ b/src/Umbraco.Core/PropertyEditors/DefaultPropertyIndexValueFactory.cs @@ -1,7 +1,8 @@ using System.Collections.Generic; -using Umbraco.Core.Models; +using Umbraco.Cms.Core.Models; +using Umbraco.Extensions; -namespace Umbraco.Core.PropertyEditors +namespace Umbraco.Cms.Core.PropertyEditors { /// /// Provides a default implementation for , returning a single field to index containing the property value. diff --git a/src/Umbraco.Core/PropertyEditors/DefaultPropertyValueConverterAttribute.cs b/src/Umbraco.Core/PropertyEditors/DefaultPropertyValueConverterAttribute.cs index 5922457b43..a38ea29e0b 100644 --- a/src/Umbraco.Core/PropertyEditors/DefaultPropertyValueConverterAttribute.cs +++ b/src/Umbraco.Core/PropertyEditors/DefaultPropertyValueConverterAttribute.cs @@ -1,6 +1,6 @@ using System; -namespace Umbraco.Core.PropertyEditors +namespace Umbraco.Cms.Core.PropertyEditors { /// /// Indicates that this is a default property value converter (shipped with Umbraco) diff --git a/src/Umbraco.Core/PropertyEditors/DropDownFlexibleConfiguration.cs b/src/Umbraco.Core/PropertyEditors/DropDownFlexibleConfiguration.cs index 0a9d750964..4d74f4aec2 100644 --- a/src/Umbraco.Core/PropertyEditors/DropDownFlexibleConfiguration.cs +++ b/src/Umbraco.Core/PropertyEditors/DropDownFlexibleConfiguration.cs @@ -1,4 +1,4 @@ -namespace Umbraco.Core.PropertyEditors +namespace Umbraco.Cms.Core.PropertyEditors { public class DropDownFlexibleConfiguration : ValueListConfiguration { diff --git a/src/Umbraco.Core/PropertyEditors/EditorType.cs b/src/Umbraco.Core/PropertyEditors/EditorType.cs index bd53cfe81d..93d0b91b18 100644 --- a/src/Umbraco.Core/PropertyEditors/EditorType.cs +++ b/src/Umbraco.Core/PropertyEditors/EditorType.cs @@ -1,6 +1,6 @@ using System; -namespace Umbraco.Core.PropertyEditors +namespace Umbraco.Cms.Core.PropertyEditors { /// /// Represents the type of an editor. @@ -23,4 +23,4 @@ namespace Umbraco.Core.PropertyEditors /// MacroParameter = 2 } -} \ No newline at end of file +} diff --git a/src/Umbraco.Core/PropertyEditors/EmailAddressConfiguration.cs b/src/Umbraco.Core/PropertyEditors/EmailAddressConfiguration.cs index fa8eb830b0..380d54dcad 100644 --- a/src/Umbraco.Core/PropertyEditors/EmailAddressConfiguration.cs +++ b/src/Umbraco.Core/PropertyEditors/EmailAddressConfiguration.cs @@ -1,7 +1,6 @@ using System; -using Umbraco.Core.PropertyEditors; -namespace Umbraco.Web.PropertyEditors +namespace Umbraco.Cms.Core.PropertyEditors { /// /// Represents the configuration for the email address value editor. diff --git a/src/Umbraco.Core/PropertyEditors/GridEditor.cs b/src/Umbraco.Core/PropertyEditors/GridEditor.cs index 7af72cf5ea..06f32658d2 100644 --- a/src/Umbraco.Core/PropertyEditors/GridEditor.cs +++ b/src/Umbraco.Core/PropertyEditors/GridEditor.cs @@ -1,8 +1,8 @@ using System.Collections.Generic; using System.Runtime.Serialization; -using Umbraco.Core.Configuration.Grid; +using Umbraco.Cms.Core.Configuration.Grid; -namespace Umbraco.Core.PropertyEditors +namespace Umbraco.Cms.Core.PropertyEditors { [DataContract] diff --git a/src/Umbraco.Core/PropertyEditors/IConfigurationEditor.cs b/src/Umbraco.Core/PropertyEditors/IConfigurationEditor.cs index d38c594def..413f7ee24b 100644 --- a/src/Umbraco.Core/PropertyEditors/IConfigurationEditor.cs +++ b/src/Umbraco.Core/PropertyEditors/IConfigurationEditor.cs @@ -1,7 +1,7 @@ using System.Collections.Generic; -using Umbraco.Core.Serialization; +using Umbraco.Cms.Core.Serialization; -namespace Umbraco.Core.PropertyEditors +namespace Umbraco.Cms.Core.PropertyEditors { /// /// Represents an editor for editing the configuration of editors. diff --git a/src/Umbraco.Core/PropertyEditors/IConfigureValueType.cs b/src/Umbraco.Core/PropertyEditors/IConfigureValueType.cs index 69774270bd..831d5d19fd 100644 --- a/src/Umbraco.Core/PropertyEditors/IConfigureValueType.cs +++ b/src/Umbraco.Core/PropertyEditors/IConfigureValueType.cs @@ -1,6 +1,6 @@ -using Umbraco.Core.Models; +using Umbraco.Cms.Core.Models; -namespace Umbraco.Core.PropertyEditors +namespace Umbraco.Cms.Core.PropertyEditors { /// /// Represents a configuration that configures the value type. @@ -15,4 +15,4 @@ namespace Umbraco.Core.PropertyEditors /// string ValueType { get; } } -} \ No newline at end of file +} diff --git a/src/Umbraco.Core/PropertyEditors/IDataEditor.cs b/src/Umbraco.Core/PropertyEditors/IDataEditor.cs index 3685cc6494..e632172990 100644 --- a/src/Umbraco.Core/PropertyEditors/IDataEditor.cs +++ b/src/Umbraco.Core/PropertyEditors/IDataEditor.cs @@ -1,7 +1,8 @@ using System.Collections.Generic; -using Umbraco.Core.Composing; +using Umbraco.Cms.Core.Composing; +using Umbraco.Cms.Core.Models; -namespace Umbraco.Core.PropertyEditors +namespace Umbraco.Cms.Core.PropertyEditors { /// /// Represents a data editor. diff --git a/src/Umbraco.Core/PropertyEditors/IDataValueReference.cs b/src/Umbraco.Core/PropertyEditors/IDataValueReference.cs index 8c0806a4a4..af5ddb1ec8 100644 --- a/src/Umbraco.Core/PropertyEditors/IDataValueReference.cs +++ b/src/Umbraco.Core/PropertyEditors/IDataValueReference.cs @@ -1,7 +1,8 @@ using System.Collections.Generic; -using Umbraco.Core.Models.Editors; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Core.Models.Editors; -namespace Umbraco.Core.PropertyEditors +namespace Umbraco.Cms.Core.PropertyEditors { /// /// Resolve references from values diff --git a/src/Umbraco.Core/PropertyEditors/IDataValueReferenceFactory.cs b/src/Umbraco.Core/PropertyEditors/IDataValueReferenceFactory.cs index c13c1ed212..6acfccf4e7 100644 --- a/src/Umbraco.Core/PropertyEditors/IDataValueReferenceFactory.cs +++ b/src/Umbraco.Core/PropertyEditors/IDataValueReferenceFactory.cs @@ -1,4 +1,4 @@ -namespace Umbraco.Core.PropertyEditors +namespace Umbraco.Cms.Core.PropertyEditors { public interface IDataValueReferenceFactory { @@ -10,7 +10,7 @@ bool IsForEditor(IDataEditor dataEditor); /// - /// + /// /// /// IDataValueReference GetDataValueReference(); diff --git a/src/Umbraco.Core/PropertyEditors/IIgnoreUserStartNodesConfig.cs b/src/Umbraco.Core/PropertyEditors/IIgnoreUserStartNodesConfig.cs index 28ce8654c3..d6c20b9cdb 100644 --- a/src/Umbraco.Core/PropertyEditors/IIgnoreUserStartNodesConfig.cs +++ b/src/Umbraco.Core/PropertyEditors/IIgnoreUserStartNodesConfig.cs @@ -1,4 +1,4 @@ -namespace Umbraco.Core.PropertyEditors +namespace Umbraco.Cms.Core.PropertyEditors { /// /// Marker interface for any editor configuration that supports Ignoring user start nodes diff --git a/src/Umbraco.Core/PropertyEditors/IManifestValueValidator.cs b/src/Umbraco.Core/PropertyEditors/IManifestValueValidator.cs index 559ea08bb7..28cf26022f 100644 --- a/src/Umbraco.Core/PropertyEditors/IManifestValueValidator.cs +++ b/src/Umbraco.Core/PropertyEditors/IManifestValueValidator.cs @@ -1,4 +1,4 @@ -namespace Umbraco.Core.PropertyEditors +namespace Umbraco.Cms.Core.PropertyEditors { /// /// Defines a value validator that can be referenced in a manifest. @@ -11,4 +11,4 @@ /// string ValidationName { get; } } -} \ No newline at end of file +} diff --git a/src/Umbraco.Core/PropertyEditors/IPropertyIndexValueFactory.cs b/src/Umbraco.Core/PropertyEditors/IPropertyIndexValueFactory.cs index 26552afc6f..d3a8a2bac5 100644 --- a/src/Umbraco.Core/PropertyEditors/IPropertyIndexValueFactory.cs +++ b/src/Umbraco.Core/PropertyEditors/IPropertyIndexValueFactory.cs @@ -1,7 +1,7 @@ using System.Collections.Generic; -using Umbraco.Core.Models; +using Umbraco.Cms.Core.Models; -namespace Umbraco.Core.PropertyEditors +namespace Umbraco.Cms.Core.PropertyEditors { /// /// Represents a property index value factory. diff --git a/src/Umbraco.Core/PropertyEditors/IPropertyValueConverter.cs b/src/Umbraco.Core/PropertyEditors/IPropertyValueConverter.cs index 0a9cf632bc..392a133b11 100644 --- a/src/Umbraco.Core/PropertyEditors/IPropertyValueConverter.cs +++ b/src/Umbraco.Core/PropertyEditors/IPropertyValueConverter.cs @@ -1,8 +1,8 @@ using System; -using Umbraco.Core.Models.PublishedContent; -using Umbraco.Core.Composing; +using Umbraco.Cms.Core.Composing; +using Umbraco.Cms.Core.Models.PublishedContent; -namespace Umbraco.Core.PropertyEditors +namespace Umbraco.Cms.Core.PropertyEditors { /// /// Provides published content properties conversion service. diff --git a/src/Umbraco.Core/PropertyEditors/IValueFormatValidator.cs b/src/Umbraco.Core/PropertyEditors/IValueFormatValidator.cs index 9f29d65ffd..8c59d3492c 100644 --- a/src/Umbraco.Core/PropertyEditors/IValueFormatValidator.cs +++ b/src/Umbraco.Core/PropertyEditors/IValueFormatValidator.cs @@ -1,7 +1,7 @@ using System.Collections.Generic; using System.ComponentModel.DataAnnotations; -namespace Umbraco.Core.PropertyEditors +namespace Umbraco.Cms.Core.PropertyEditors { /// /// Defines a value format validator. diff --git a/src/Umbraco.Core/PropertyEditors/IValueRequiredValidator.cs b/src/Umbraco.Core/PropertyEditors/IValueRequiredValidator.cs index 1b4074c96f..2334a543ba 100644 --- a/src/Umbraco.Core/PropertyEditors/IValueRequiredValidator.cs +++ b/src/Umbraco.Core/PropertyEditors/IValueRequiredValidator.cs @@ -1,7 +1,7 @@ using System.Collections.Generic; using System.ComponentModel.DataAnnotations; -namespace Umbraco.Core.PropertyEditors +namespace Umbraco.Cms.Core.PropertyEditors { /// /// Defines a required value validator. diff --git a/src/Umbraco.Core/PropertyEditors/IValueValidator.cs b/src/Umbraco.Core/PropertyEditors/IValueValidator.cs index 5c9bae71b5..0c97f0a41b 100644 --- a/src/Umbraco.Core/PropertyEditors/IValueValidator.cs +++ b/src/Umbraco.Core/PropertyEditors/IValueValidator.cs @@ -1,7 +1,7 @@ using System.Collections.Generic; using System.ComponentModel.DataAnnotations; -namespace Umbraco.Core.PropertyEditors +namespace Umbraco.Cms.Core.PropertyEditors { /// /// Defines a value validator. diff --git a/src/Umbraco.Core/PropertyEditors/IntegerConfigurationEditor.cs b/src/Umbraco.Core/PropertyEditors/IntegerConfigurationEditor.cs index bb1f8af790..e7c2114dd2 100644 --- a/src/Umbraco.Core/PropertyEditors/IntegerConfigurationEditor.cs +++ b/src/Umbraco.Core/PropertyEditors/IntegerConfigurationEditor.cs @@ -1,7 +1,6 @@ -using Umbraco.Core.PropertyEditors; -using Umbraco.Core.PropertyEditors.Validators; +using Umbraco.Cms.Core.PropertyEditors.Validators; -namespace Umbraco.Web.PropertyEditors +namespace Umbraco.Cms.Core.PropertyEditors { /// /// A custom pre-value editor class to deal with the legacy way that the pre-value data is stored. diff --git a/src/Umbraco.Core/PropertyEditors/IntegerPropertyEditor.cs b/src/Umbraco.Core/PropertyEditors/IntegerPropertyEditor.cs index 43b988a49f..639cd4293a 100644 --- a/src/Umbraco.Core/PropertyEditors/IntegerPropertyEditor.cs +++ b/src/Umbraco.Core/PropertyEditors/IntegerPropertyEditor.cs @@ -1,12 +1,11 @@ using Microsoft.Extensions.Logging; -using Umbraco.Core; -using Umbraco.Core.PropertyEditors; -using Umbraco.Core.PropertyEditors.Validators; -using Umbraco.Core.Serialization; -using Umbraco.Core.Services; -using Umbraco.Core.Strings; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Core.PropertyEditors.Validators; +using Umbraco.Cms.Core.Serialization; +using Umbraco.Cms.Core.Services; +using Umbraco.Cms.Core.Strings; -namespace Umbraco.Web.PropertyEditors +namespace Umbraco.Cms.Core.PropertyEditors { /// /// Represents an integer property and parameter editor. diff --git a/src/Umbraco.Core/PropertyEditors/LabelConfiguration.cs b/src/Umbraco.Core/PropertyEditors/LabelConfiguration.cs index bbdd437e54..28fe05d151 100644 --- a/src/Umbraco.Core/PropertyEditors/LabelConfiguration.cs +++ b/src/Umbraco.Core/PropertyEditors/LabelConfiguration.cs @@ -1,4 +1,4 @@ -namespace Umbraco.Core.PropertyEditors +namespace Umbraco.Cms.Core.PropertyEditors { /// /// Represents the configuration for the label value editor. diff --git a/src/Umbraco.Core/PropertyEditors/ListViewConfiguration.cs b/src/Umbraco.Core/PropertyEditors/ListViewConfiguration.cs index 083e36029e..9b720e4fd8 100644 --- a/src/Umbraco.Core/PropertyEditors/ListViewConfiguration.cs +++ b/src/Umbraco.Core/PropertyEditors/ListViewConfiguration.cs @@ -1,7 +1,6 @@ using System.Runtime.Serialization; -using Umbraco.Core.PropertyEditors; -namespace Umbraco.Web.PropertyEditors +namespace Umbraco.Cms.Core.PropertyEditors { /// /// Represents the configuration for the listview value editor. diff --git a/src/Umbraco.Core/PropertyEditors/ManifestValueValidatorCollection.cs b/src/Umbraco.Core/PropertyEditors/ManifestValueValidatorCollection.cs index 0f3719dd8c..45a2dc51bb 100644 --- a/src/Umbraco.Core/PropertyEditors/ManifestValueValidatorCollection.cs +++ b/src/Umbraco.Core/PropertyEditors/ManifestValueValidatorCollection.cs @@ -1,9 +1,10 @@ using System; using System.Collections.Generic; using System.Linq; -using Umbraco.Core.Composing; +using Umbraco.Cms.Core.Composing; +using Umbraco.Extensions; -namespace Umbraco.Core.PropertyEditors +namespace Umbraco.Cms.Core.PropertyEditors { public class ManifestValueValidatorCollection : BuilderCollectionBase { diff --git a/src/Umbraco.Core/PropertyEditors/ManifestValueValidatorCollectionBuilder.cs b/src/Umbraco.Core/PropertyEditors/ManifestValueValidatorCollectionBuilder.cs index 0ebda864f6..2247d3e62f 100644 --- a/src/Umbraco.Core/PropertyEditors/ManifestValueValidatorCollectionBuilder.cs +++ b/src/Umbraco.Core/PropertyEditors/ManifestValueValidatorCollectionBuilder.cs @@ -1,6 +1,6 @@ -using Umbraco.Core.Composing; +using Umbraco.Cms.Core.Composing; -namespace Umbraco.Core.PropertyEditors +namespace Umbraco.Cms.Core.PropertyEditors { public class ManifestValueValidatorCollectionBuilder : LazyCollectionBuilderBase { diff --git a/src/Umbraco.Core/PropertyEditors/MarkdownConfiguration.cs b/src/Umbraco.Core/PropertyEditors/MarkdownConfiguration.cs index f32b3ffb44..193c916f2c 100644 --- a/src/Umbraco.Core/PropertyEditors/MarkdownConfiguration.cs +++ b/src/Umbraco.Core/PropertyEditors/MarkdownConfiguration.cs @@ -1,6 +1,4 @@ -using Umbraco.Core.PropertyEditors; - -namespace Umbraco.Web.PropertyEditors +namespace Umbraco.Cms.Core.PropertyEditors { /// /// Represents the configuration for the markdown value editor. diff --git a/src/Umbraco.Core/PropertyEditors/MediaPickerConfiguration.cs b/src/Umbraco.Core/PropertyEditors/MediaPickerConfiguration.cs index b8b9476184..06faedea0d 100644 --- a/src/Umbraco.Core/PropertyEditors/MediaPickerConfiguration.cs +++ b/src/Umbraco.Core/PropertyEditors/MediaPickerConfiguration.cs @@ -1,7 +1,4 @@ -using Umbraco.Core; -using Umbraco.Core.PropertyEditors; - -namespace Umbraco.Web.PropertyEditors +namespace Umbraco.Cms.Core.PropertyEditors { /// /// Represents the configuration for the media picker value editor. @@ -20,7 +17,7 @@ namespace Umbraco.Web.PropertyEditors [ConfigurationField("startNodeId", "Start node", "mediapicker")] public Udi StartNodeId { get; set; } - [ConfigurationField(Core.Constants.DataTypes.ReservedPreValueKeys.IgnoreUserStartNodes, + [ConfigurationField(Constants.DataTypes.ReservedPreValueKeys.IgnoreUserStartNodes, "Ignore User Start Nodes", "boolean", Description = "Selecting this option allows a user to choose nodes that they normally don't have access to.")] public bool IgnoreUserStartNodes { get; set; } diff --git a/src/Umbraco.Core/PropertyEditors/MediaUrlGeneratorCollection.cs b/src/Umbraco.Core/PropertyEditors/MediaUrlGeneratorCollection.cs index 0374ca5cd2..c3c168ed1f 100644 --- a/src/Umbraco.Core/PropertyEditors/MediaUrlGeneratorCollection.cs +++ b/src/Umbraco.Core/PropertyEditors/MediaUrlGeneratorCollection.cs @@ -1,7 +1,8 @@ using System.Collections.Generic; -using Umbraco.Core.Composing; +using Umbraco.Cms.Core.Composing; +using Umbraco.Cms.Core.Models; -namespace Umbraco.Core.PropertyEditors +namespace Umbraco.Cms.Core.PropertyEditors { public class MediaUrlGeneratorCollection : BuilderCollectionBase { diff --git a/src/Umbraco.Core/PropertyEditors/MediaUrlGeneratorCollectionBuilder.cs b/src/Umbraco.Core/PropertyEditors/MediaUrlGeneratorCollectionBuilder.cs index 40a68fd4e3..3ad03cb13c 100644 --- a/src/Umbraco.Core/PropertyEditors/MediaUrlGeneratorCollectionBuilder.cs +++ b/src/Umbraco.Core/PropertyEditors/MediaUrlGeneratorCollectionBuilder.cs @@ -1,6 +1,7 @@ -using Umbraco.Core.Composing; +using Umbraco.Cms.Core.Composing; +using Umbraco.Cms.Core.Models; -namespace Umbraco.Core.PropertyEditors +namespace Umbraco.Cms.Core.PropertyEditors { public class MediaUrlGeneratorCollectionBuilder : LazyCollectionBuilderBase { diff --git a/src/Umbraco.Core/PropertyEditors/MemberGroupPickerPropertyEditor.cs b/src/Umbraco.Core/PropertyEditors/MemberGroupPickerPropertyEditor.cs index 34448b3816..6fb2e5467d 100644 --- a/src/Umbraco.Core/PropertyEditors/MemberGroupPickerPropertyEditor.cs +++ b/src/Umbraco.Core/PropertyEditors/MemberGroupPickerPropertyEditor.cs @@ -1,11 +1,9 @@ using Microsoft.Extensions.Logging; -using Umbraco.Core; -using Umbraco.Core.PropertyEditors; -using Umbraco.Core.Serialization; -using Umbraco.Core.Services; -using Umbraco.Core.Strings; +using Umbraco.Cms.Core.Serialization; +using Umbraco.Cms.Core.Services; +using Umbraco.Cms.Core.Strings; -namespace Umbraco.Web.PropertyEditors +namespace Umbraco.Cms.Core.PropertyEditors { [DataEditor( Constants.PropertyEditors.Aliases.MemberGroupPicker, diff --git a/src/Umbraco.Core/PropertyEditors/MemberPickerConfiguration.cs b/src/Umbraco.Core/PropertyEditors/MemberPickerConfiguration.cs index ba7dea6548..6d6fb3a8b7 100644 --- a/src/Umbraco.Core/PropertyEditors/MemberPickerConfiguration.cs +++ b/src/Umbraco.Core/PropertyEditors/MemberPickerConfiguration.cs @@ -1,7 +1,6 @@ using System.Collections.Generic; -using Umbraco.Core.PropertyEditors; -namespace Umbraco.Web.PropertyEditors +namespace Umbraco.Cms.Core.PropertyEditors { public class MemberPickerConfiguration : ConfigurationEditor { diff --git a/src/Umbraco.Core/PropertyEditors/MemberPickerPropertyEditor.cs b/src/Umbraco.Core/PropertyEditors/MemberPickerPropertyEditor.cs index b572f47cfd..a2cf440b58 100644 --- a/src/Umbraco.Core/PropertyEditors/MemberPickerPropertyEditor.cs +++ b/src/Umbraco.Core/PropertyEditors/MemberPickerPropertyEditor.cs @@ -1,11 +1,9 @@ using Microsoft.Extensions.Logging; -using Umbraco.Core; -using Umbraco.Core.PropertyEditors; -using Umbraco.Core.Serialization; -using Umbraco.Core.Services; -using Umbraco.Core.Strings; +using Umbraco.Cms.Core.Serialization; +using Umbraco.Cms.Core.Services; +using Umbraco.Cms.Core.Strings; -namespace Umbraco.Web.PropertyEditors +namespace Umbraco.Cms.Core.PropertyEditors { [DataEditor( Constants.PropertyEditors.Aliases.MemberPicker, diff --git a/src/Umbraco.Core/PropertyEditors/MissingPropertyEditor.cs b/src/Umbraco.Core/PropertyEditors/MissingPropertyEditor.cs index 902aab7cc7..0bffd5fce3 100644 --- a/src/Umbraco.Core/PropertyEditors/MissingPropertyEditor.cs +++ b/src/Umbraco.Core/PropertyEditors/MissingPropertyEditor.cs @@ -1,7 +1,8 @@ using System; using System.Collections.Generic; +using Umbraco.Cms.Core.Models; -namespace Umbraco.Core.PropertyEditors +namespace Umbraco.Cms.Core.PropertyEditors { /// /// Represents a temporary representation of an editor for cases where a data type is created but not editor is available. diff --git a/src/Umbraco.Core/PropertyEditors/MultiNodePickerConfiguration.cs b/src/Umbraco.Core/PropertyEditors/MultiNodePickerConfiguration.cs index 0725971e95..54ae68550d 100644 --- a/src/Umbraco.Core/PropertyEditors/MultiNodePickerConfiguration.cs +++ b/src/Umbraco.Core/PropertyEditors/MultiNodePickerConfiguration.cs @@ -1,6 +1,4 @@ -using Umbraco.Core.PropertyEditors; - -namespace Umbraco.Web.PropertyEditors +namespace Umbraco.Cms.Core.PropertyEditors { /// /// Represents the configuration for the multinode picker value editor. @@ -22,7 +20,7 @@ namespace Umbraco.Web.PropertyEditors [ConfigurationField("showOpenButton", "Show open button", "boolean", Description = "Opens the node in a dialog")] public bool ShowOpen { get; set; } - [ConfigurationField(Core.Constants.DataTypes.ReservedPreValueKeys.IgnoreUserStartNodes, + [ConfigurationField(Constants.DataTypes.ReservedPreValueKeys.IgnoreUserStartNodes, "Ignore User Start Nodes", "boolean", Description = "Selecting this option allows a user to choose nodes that they normally don't have access to.")] public bool IgnoreUserStartNodes { get; set; } diff --git a/src/Umbraco.Core/PropertyEditors/MultiNodePickerConfigurationTreeSource.cs b/src/Umbraco.Core/PropertyEditors/MultiNodePickerConfigurationTreeSource.cs index 749f46abc5..1277ed9bc0 100644 --- a/src/Umbraco.Core/PropertyEditors/MultiNodePickerConfigurationTreeSource.cs +++ b/src/Umbraco.Core/PropertyEditors/MultiNodePickerConfigurationTreeSource.cs @@ -1,10 +1,9 @@ using System.Runtime.Serialization; -using Umbraco.Core; -namespace Umbraco.Web.PropertyEditors +namespace Umbraco.Cms.Core.PropertyEditors { /// - /// Represents the 'startNode' value for the + /// Represents the 'startNode' value for the /// [DataContract] public class MultiNodePickerConfigurationTreeSource diff --git a/src/Umbraco.Core/PropertyEditors/MultiUrlPickerConfiguration.cs b/src/Umbraco.Core/PropertyEditors/MultiUrlPickerConfiguration.cs index 239569478f..c3913fd6b8 100644 --- a/src/Umbraco.Core/PropertyEditors/MultiUrlPickerConfiguration.cs +++ b/src/Umbraco.Core/PropertyEditors/MultiUrlPickerConfiguration.cs @@ -1,6 +1,4 @@ -using Umbraco.Core.PropertyEditors; - -namespace Umbraco.Web.PropertyEditors +namespace Umbraco.Cms.Core.PropertyEditors { public class MultiUrlPickerConfiguration : IIgnoreUserStartNodesConfig @@ -11,7 +9,7 @@ namespace Umbraco.Web.PropertyEditors [ConfigurationField("maxNumber", "Maximum number of items", "number")] public int MaxNumber { get; set; } - [ConfigurationField(Core.Constants.DataTypes.ReservedPreValueKeys.IgnoreUserStartNodes, + [ConfigurationField(Constants.DataTypes.ReservedPreValueKeys.IgnoreUserStartNodes, "Ignore User Start Nodes", "boolean", Description = "Selecting this option allows a user to choose nodes that they normally don't have access to.")] public bool IgnoreUserStartNodes { get; set; } diff --git a/src/Umbraco.Core/PropertyEditors/MultipleTextStringConfiguration.cs b/src/Umbraco.Core/PropertyEditors/MultipleTextStringConfiguration.cs index 7513222ca2..506b3bebc9 100644 --- a/src/Umbraco.Core/PropertyEditors/MultipleTextStringConfiguration.cs +++ b/src/Umbraco.Core/PropertyEditors/MultipleTextStringConfiguration.cs @@ -1,4 +1,4 @@ -namespace Umbraco.Web.PropertyEditors +namespace Umbraco.Cms.Core.PropertyEditors { /// /// Represents the configuration for a multiple textstring value editor. diff --git a/src/Umbraco.Core/PropertyEditors/NestedContentConfiguration.cs b/src/Umbraco.Core/PropertyEditors/NestedContentConfiguration.cs index e75be48f36..4fd1e1e104 100644 --- a/src/Umbraco.Core/PropertyEditors/NestedContentConfiguration.cs +++ b/src/Umbraco.Core/PropertyEditors/NestedContentConfiguration.cs @@ -1,7 +1,6 @@ using System.Runtime.Serialization; -using Umbraco.Core.PropertyEditors; -namespace Umbraco.Web.PropertyEditors +namespace Umbraco.Cms.Core.PropertyEditors { /// diff --git a/src/Umbraco.Core/PropertyEditors/ParameterEditorCollection.cs b/src/Umbraco.Core/PropertyEditors/ParameterEditorCollection.cs index dacda815ec..5ad20665f4 100644 --- a/src/Umbraco.Core/PropertyEditors/ParameterEditorCollection.cs +++ b/src/Umbraco.Core/PropertyEditors/ParameterEditorCollection.cs @@ -1,8 +1,8 @@ using System.Linq; -using Umbraco.Core.Composing; -using Umbraco.Core.Manifest; +using Umbraco.Cms.Core.Composing; +using Umbraco.Cms.Core.Manifest; -namespace Umbraco.Core.PropertyEditors +namespace Umbraco.Cms.Core.PropertyEditors { public class ParameterEditorCollection : BuilderCollectionBase { diff --git a/src/Umbraco.Core/PropertyEditors/ParameterEditors/ContentTypeParameterEditor.cs b/src/Umbraco.Core/PropertyEditors/ParameterEditors/ContentTypeParameterEditor.cs index 619fd89692..dd5e0f7480 100644 --- a/src/Umbraco.Core/PropertyEditors/ParameterEditors/ContentTypeParameterEditor.cs +++ b/src/Umbraco.Core/PropertyEditors/ParameterEditors/ContentTypeParameterEditor.cs @@ -1,10 +1,9 @@ using Microsoft.Extensions.Logging; -using Umbraco.Core.PropertyEditors; -using Umbraco.Core.Serialization; -using Umbraco.Core.Services; -using Umbraco.Core.Strings; +using Umbraco.Cms.Core.Serialization; +using Umbraco.Cms.Core.Services; +using Umbraco.Cms.Core.Strings; -namespace Umbraco.Web.PropertyEditors.ParameterEditors +namespace Umbraco.Cms.Core.PropertyEditors.ParameterEditors { /// /// Represents a content type parameter editor. diff --git a/src/Umbraco.Core/PropertyEditors/ParameterEditors/MultipleContentPickerParameterEditor.cs b/src/Umbraco.Core/PropertyEditors/ParameterEditors/MultipleContentPickerParameterEditor.cs index 5110dfdc79..10019cf086 100644 --- a/src/Umbraco.Core/PropertyEditors/ParameterEditors/MultipleContentPickerParameterEditor.cs +++ b/src/Umbraco.Core/PropertyEditors/ParameterEditors/MultipleContentPickerParameterEditor.cs @@ -1,11 +1,9 @@ using Microsoft.Extensions.Logging; -using Umbraco.Core; -using Umbraco.Core.PropertyEditors; -using Umbraco.Core.Serialization; -using Umbraco.Core.Services; -using Umbraco.Core.Strings; +using Umbraco.Cms.Core.Serialization; +using Umbraco.Cms.Core.Services; +using Umbraco.Cms.Core.Strings; -namespace Umbraco.Web.PropertyEditors.ParameterEditors +namespace Umbraco.Cms.Core.PropertyEditors.ParameterEditors { /// /// Represents a parameter editor of some sort. diff --git a/src/Umbraco.Core/PropertyEditors/ParameterEditors/MultipleContentTypeParameterEditor.cs b/src/Umbraco.Core/PropertyEditors/ParameterEditors/MultipleContentTypeParameterEditor.cs index ff08420cd9..d251a66f05 100644 --- a/src/Umbraco.Core/PropertyEditors/ParameterEditors/MultipleContentTypeParameterEditor.cs +++ b/src/Umbraco.Core/PropertyEditors/ParameterEditors/MultipleContentTypeParameterEditor.cs @@ -1,10 +1,9 @@ using Microsoft.Extensions.Logging; -using Umbraco.Core.PropertyEditors; -using Umbraco.Core.Serialization; -using Umbraco.Core.Services; -using Umbraco.Core.Strings; +using Umbraco.Cms.Core.Serialization; +using Umbraco.Cms.Core.Services; +using Umbraco.Cms.Core.Strings; -namespace Umbraco.Web.PropertyEditors.ParameterEditors +namespace Umbraco.Cms.Core.PropertyEditors.ParameterEditors { [DataEditor( "contentTypeMultiple", diff --git a/src/Umbraco.Core/PropertyEditors/ParameterEditors/MultipleMediaPickerParameterEditor.cs b/src/Umbraco.Core/PropertyEditors/ParameterEditors/MultipleMediaPickerParameterEditor.cs index a2750447a8..b593994ac5 100644 --- a/src/Umbraco.Core/PropertyEditors/ParameterEditors/MultipleMediaPickerParameterEditor.cs +++ b/src/Umbraco.Core/PropertyEditors/ParameterEditors/MultipleMediaPickerParameterEditor.cs @@ -1,11 +1,9 @@ using Microsoft.Extensions.Logging; -using Umbraco.Core; -using Umbraco.Core.PropertyEditors; -using Umbraco.Core.Serialization; -using Umbraco.Core.Services; -using Umbraco.Core.Strings; +using Umbraco.Cms.Core.Serialization; +using Umbraco.Cms.Core.Services; +using Umbraco.Cms.Core.Strings; -namespace Umbraco.Web.PropertyEditors.ParameterEditors +namespace Umbraco.Cms.Core.PropertyEditors.ParameterEditors { /// /// Represents a multiple media picker macro parameter editor. diff --git a/src/Umbraco.Core/PropertyEditors/ParameterEditors/MultiplePropertyGroupParameterEditor.cs b/src/Umbraco.Core/PropertyEditors/ParameterEditors/MultiplePropertyGroupParameterEditor.cs index 22571db975..2a4369cdb8 100644 --- a/src/Umbraco.Core/PropertyEditors/ParameterEditors/MultiplePropertyGroupParameterEditor.cs +++ b/src/Umbraco.Core/PropertyEditors/ParameterEditors/MultiplePropertyGroupParameterEditor.cs @@ -1,10 +1,9 @@ using Microsoft.Extensions.Logging; -using Umbraco.Core.PropertyEditors; -using Umbraco.Core.Serialization; -using Umbraco.Core.Services; -using Umbraco.Core.Strings; +using Umbraco.Cms.Core.Serialization; +using Umbraco.Cms.Core.Services; +using Umbraco.Cms.Core.Strings; -namespace Umbraco.Web.PropertyEditors.ParameterEditors +namespace Umbraco.Cms.Core.PropertyEditors.ParameterEditors { [DataEditor( "tabPickerMultiple", diff --git a/src/Umbraco.Core/PropertyEditors/ParameterEditors/MultiplePropertyTypeParameterEditor.cs b/src/Umbraco.Core/PropertyEditors/ParameterEditors/MultiplePropertyTypeParameterEditor.cs index 251d982777..5222463964 100644 --- a/src/Umbraco.Core/PropertyEditors/ParameterEditors/MultiplePropertyTypeParameterEditor.cs +++ b/src/Umbraco.Core/PropertyEditors/ParameterEditors/MultiplePropertyTypeParameterEditor.cs @@ -1,10 +1,9 @@ using Microsoft.Extensions.Logging; -using Umbraco.Core.PropertyEditors; -using Umbraco.Core.Serialization; -using Umbraco.Core.Services; -using Umbraco.Core.Strings; +using Umbraco.Cms.Core.Serialization; +using Umbraco.Cms.Core.Services; +using Umbraco.Cms.Core.Strings; -namespace Umbraco.Web.PropertyEditors.ParameterEditors +namespace Umbraco.Cms.Core.PropertyEditors.ParameterEditors { [DataEditor( "propertyTypePickerMultiple", diff --git a/src/Umbraco.Core/PropertyEditors/ParameterEditors/PropertyGroupParameterEditor.cs b/src/Umbraco.Core/PropertyEditors/ParameterEditors/PropertyGroupParameterEditor.cs index aabef3e1b0..7e53fa79a5 100644 --- a/src/Umbraco.Core/PropertyEditors/ParameterEditors/PropertyGroupParameterEditor.cs +++ b/src/Umbraco.Core/PropertyEditors/ParameterEditors/PropertyGroupParameterEditor.cs @@ -1,10 +1,9 @@ using Microsoft.Extensions.Logging; -using Umbraco.Core.PropertyEditors; -using Umbraco.Core.Serialization; -using Umbraco.Core.Services; -using Umbraco.Core.Strings; +using Umbraco.Cms.Core.Serialization; +using Umbraco.Cms.Core.Services; +using Umbraco.Cms.Core.Strings; -namespace Umbraco.Web.PropertyEditors.ParameterEditors +namespace Umbraco.Cms.Core.PropertyEditors.ParameterEditors { [DataEditor( "tabPicker", diff --git a/src/Umbraco.Core/PropertyEditors/ParameterEditors/PropertyTypeParameterEditor.cs b/src/Umbraco.Core/PropertyEditors/ParameterEditors/PropertyTypeParameterEditor.cs index c3178d3138..8da3f6c610 100644 --- a/src/Umbraco.Core/PropertyEditors/ParameterEditors/PropertyTypeParameterEditor.cs +++ b/src/Umbraco.Core/PropertyEditors/ParameterEditors/PropertyTypeParameterEditor.cs @@ -1,10 +1,9 @@ using Microsoft.Extensions.Logging; -using Umbraco.Core.PropertyEditors; -using Umbraco.Core.Serialization; -using Umbraco.Core.Services; -using Umbraco.Core.Strings; +using Umbraco.Cms.Core.Serialization; +using Umbraco.Cms.Core.Services; +using Umbraco.Cms.Core.Strings; -namespace Umbraco.Web.PropertyEditors.ParameterEditors +namespace Umbraco.Cms.Core.PropertyEditors.ParameterEditors { [DataEditor( "propertyTypePicker", diff --git a/src/Umbraco.Core/PropertyEditors/PropertyCacheLevel.cs b/src/Umbraco.Core/PropertyEditors/PropertyCacheLevel.cs index afecf70cb1..9c94008616 100644 --- a/src/Umbraco.Core/PropertyEditors/PropertyCacheLevel.cs +++ b/src/Umbraco.Core/PropertyEditors/PropertyCacheLevel.cs @@ -1,4 +1,4 @@ -namespace Umbraco.Core.PropertyEditors +namespace Umbraco.Cms.Core.PropertyEditors { /// /// Specifies the level of cache for a property value. diff --git a/src/Umbraco.Core/PropertyEditors/PropertyEditorCollection.cs b/src/Umbraco.Core/PropertyEditors/PropertyEditorCollection.cs index a3c02aeb0d..e5b6e96c7b 100644 --- a/src/Umbraco.Core/PropertyEditors/PropertyEditorCollection.cs +++ b/src/Umbraco.Core/PropertyEditors/PropertyEditorCollection.cs @@ -1,8 +1,8 @@ using System.Linq; -using Umbraco.Core.Composing; -using Umbraco.Core.Manifest; +using Umbraco.Cms.Core.Composing; +using Umbraco.Cms.Core.Manifest; -namespace Umbraco.Core.PropertyEditors +namespace Umbraco.Cms.Core.PropertyEditors { public class PropertyEditorCollection : BuilderCollectionBase { diff --git a/src/Umbraco.Core/PropertyEditors/PropertyEditorTagsExtensions.cs b/src/Umbraco.Core/PropertyEditors/PropertyEditorTagsExtensions.cs index 3b2a9dd4e2..ddd12c5003 100644 --- a/src/Umbraco.Core/PropertyEditors/PropertyEditorTagsExtensions.cs +++ b/src/Umbraco.Core/PropertyEditors/PropertyEditorTagsExtensions.cs @@ -1,4 +1,6 @@ -namespace Umbraco.Core.PropertyEditors +using Umbraco.Cms.Core.PropertyEditors; + +namespace Umbraco.Extensions { /// /// Provides extension methods for the interface to manage tags. diff --git a/src/Umbraco.Core/PropertyEditors/PropertyValueConverterBase.cs b/src/Umbraco.Core/PropertyEditors/PropertyValueConverterBase.cs index 2ec0438328..9da1df938f 100644 --- a/src/Umbraco.Core/PropertyEditors/PropertyValueConverterBase.cs +++ b/src/Umbraco.Core/PropertyEditors/PropertyValueConverterBase.cs @@ -1,12 +1,12 @@ using System; -using Umbraco.Core.Models.PublishedContent; +using Umbraco.Cms.Core.Models.PublishedContent; -namespace Umbraco.Core.PropertyEditors +namespace Umbraco.Cms.Core.PropertyEditors { /// /// Provides a default implementation for . /// - /// + /// public abstract class PropertyValueConverterBase : IPropertyValueConverter { /// diff --git a/src/Umbraco.Core/PropertyEditors/PropertyValueConverterCollection.cs b/src/Umbraco.Core/PropertyEditors/PropertyValueConverterCollection.cs index a5e91562dc..136967e7ab 100644 --- a/src/Umbraco.Core/PropertyEditors/PropertyValueConverterCollection.cs +++ b/src/Umbraco.Core/PropertyEditors/PropertyValueConverterCollection.cs @@ -1,10 +1,10 @@ using System; using System.Collections.Generic; using System.Linq; -using System.Reflection; -using Umbraco.Core.Composing; +using Umbraco.Cms.Core.Composing; +using Umbraco.Extensions; -namespace Umbraco.Core.PropertyEditors +namespace Umbraco.Cms.Core.PropertyEditors { public class PropertyValueConverterCollection : BuilderCollectionBase { diff --git a/src/Umbraco.Core/PropertyEditors/PropertyValueConverterCollectionBuilder.cs b/src/Umbraco.Core/PropertyEditors/PropertyValueConverterCollectionBuilder.cs index a64fe8c43a..f7bbca2b02 100644 --- a/src/Umbraco.Core/PropertyEditors/PropertyValueConverterCollectionBuilder.cs +++ b/src/Umbraco.Core/PropertyEditors/PropertyValueConverterCollectionBuilder.cs @@ -1,6 +1,6 @@ -using Umbraco.Core.Composing; +using Umbraco.Cms.Core.Composing; -namespace Umbraco.Core.PropertyEditors +namespace Umbraco.Cms.Core.PropertyEditors { public class PropertyValueConverterCollectionBuilder : OrderedCollectionBuilderBase { diff --git a/src/Umbraco.Core/PropertyEditors/PropertyValueLevel.cs b/src/Umbraco.Core/PropertyEditors/PropertyValueLevel.cs index 956ce03b30..583bf87f3e 100644 --- a/src/Umbraco.Core/PropertyEditors/PropertyValueLevel.cs +++ b/src/Umbraco.Core/PropertyEditors/PropertyValueLevel.cs @@ -1,4 +1,4 @@ -namespace Umbraco.Core.PropertyEditors +namespace Umbraco.Cms.Core.PropertyEditors { /// /// Indicates the level of a value. diff --git a/src/Umbraco.Core/PropertyEditors/RichTextConfiguration.cs b/src/Umbraco.Core/PropertyEditors/RichTextConfiguration.cs index 341a4750f6..2d580b7590 100644 --- a/src/Umbraco.Core/PropertyEditors/RichTextConfiguration.cs +++ b/src/Umbraco.Core/PropertyEditors/RichTextConfiguration.cs @@ -1,7 +1,4 @@ -using Umbraco.Core; -using Umbraco.Core.PropertyEditors; - -namespace Umbraco.Web.PropertyEditors +namespace Umbraco.Cms.Core.PropertyEditors { /// /// Represents the configuration for the rich text value editor. @@ -15,7 +12,7 @@ namespace Umbraco.Web.PropertyEditors [ConfigurationField("hideLabel", "Hide Label", "boolean")] public bool HideLabel { get; set; } - [ConfigurationField(Core.Constants.DataTypes.ReservedPreValueKeys.IgnoreUserStartNodes, + [ConfigurationField(Constants.DataTypes.ReservedPreValueKeys.IgnoreUserStartNodes, "Ignore User Start Nodes", "boolean", Description = "Selecting this option allows a user to choose nodes that they normally don't have access to.")] public bool IgnoreUserStartNodes { get; set; } diff --git a/src/Umbraco.Core/PropertyEditors/SliderConfiguration.cs b/src/Umbraco.Core/PropertyEditors/SliderConfiguration.cs index dc71c2a48f..8d41873a11 100644 --- a/src/Umbraco.Core/PropertyEditors/SliderConfiguration.cs +++ b/src/Umbraco.Core/PropertyEditors/SliderConfiguration.cs @@ -1,4 +1,4 @@ -namespace Umbraco.Core.PropertyEditors +namespace Umbraco.Cms.Core.PropertyEditors { /// /// Represents the configuration for the slider value editor. diff --git a/src/Umbraco.Core/PropertyEditors/TagConfiguration.cs b/src/Umbraco.Core/PropertyEditors/TagConfiguration.cs index 28e2a2e3c8..61fa80472d 100644 --- a/src/Umbraco.Core/PropertyEditors/TagConfiguration.cs +++ b/src/Umbraco.Core/PropertyEditors/TagConfiguration.cs @@ -1,6 +1,6 @@ -using Umbraco.Core.Models; +using Umbraco.Cms.Core.Models; -namespace Umbraco.Core.PropertyEditors +namespace Umbraco.Cms.Core.PropertyEditors { /// /// Represents the configuration for the tag value editor. diff --git a/src/Umbraco.Core/PropertyEditors/TagsPropertyEditorAttribute.cs b/src/Umbraco.Core/PropertyEditors/TagsPropertyEditorAttribute.cs index 6549f1a233..9075d9be97 100644 --- a/src/Umbraco.Core/PropertyEditors/TagsPropertyEditorAttribute.cs +++ b/src/Umbraco.Core/PropertyEditors/TagsPropertyEditorAttribute.cs @@ -1,7 +1,7 @@ using System; -using Umbraco.Core.Models; +using Umbraco.Cms.Core.Models; -namespace Umbraco.Core.PropertyEditors +namespace Umbraco.Cms.Core.PropertyEditors { /// /// Marks property editors that support tags. diff --git a/src/Umbraco.Core/PropertyEditors/TextAreaConfiguration.cs b/src/Umbraco.Core/PropertyEditors/TextAreaConfiguration.cs index 86a4184307..86ca35ef64 100644 --- a/src/Umbraco.Core/PropertyEditors/TextAreaConfiguration.cs +++ b/src/Umbraco.Core/PropertyEditors/TextAreaConfiguration.cs @@ -1,6 +1,4 @@ -using Umbraco.Core.PropertyEditors; - -namespace Umbraco.Web.PropertyEditors +namespace Umbraco.Cms.Core.PropertyEditors { /// /// Represents the configuration for the textarea value editor. diff --git a/src/Umbraco.Core/PropertyEditors/TextOnlyValueEditor.cs b/src/Umbraco.Core/PropertyEditors/TextOnlyValueEditor.cs index aeac87079c..11c1fe93a5 100644 --- a/src/Umbraco.Core/PropertyEditors/TextOnlyValueEditor.cs +++ b/src/Umbraco.Core/PropertyEditors/TextOnlyValueEditor.cs @@ -1,11 +1,10 @@ using System; -using Umbraco.Core.Models; -using Umbraco.Core.PropertyEditors; -using Umbraco.Core.Serialization; -using Umbraco.Core.Services; -using Umbraco.Core.Strings; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Core.Serialization; +using Umbraco.Cms.Core.Services; +using Umbraco.Cms.Core.Strings; -namespace Umbraco.Web.PropertyEditors +namespace Umbraco.Cms.Core.PropertyEditors { /// /// Custom value editor which ensures that the value stored is just plain text and that diff --git a/src/Umbraco.Core/PropertyEditors/TextStringValueConverter.cs b/src/Umbraco.Core/PropertyEditors/TextStringValueConverter.cs index e373b375a5..5b9977518b 100644 --- a/src/Umbraco.Core/PropertyEditors/TextStringValueConverter.cs +++ b/src/Umbraco.Core/PropertyEditors/TextStringValueConverter.cs @@ -1,11 +1,9 @@ using System; using System.Linq; -using Umbraco.Core; -using Umbraco.Core.Models.PublishedContent; -using Umbraco.Core.PropertyEditors; -using Umbraco.Web.Templates; +using Umbraco.Cms.Core.Models.PublishedContent; +using Umbraco.Cms.Core.Templates; -namespace Umbraco.Web.PropertyEditors.ValueConverters +namespace Umbraco.Cms.Core.PropertyEditors { [DefaultPropertyValueConverter] public class TextStringValueConverter : PropertyValueConverterBase diff --git a/src/Umbraco.Core/PropertyEditors/TextboxConfiguration.cs b/src/Umbraco.Core/PropertyEditors/TextboxConfiguration.cs index 641cc8e42a..fb56567bc5 100644 --- a/src/Umbraco.Core/PropertyEditors/TextboxConfiguration.cs +++ b/src/Umbraco.Core/PropertyEditors/TextboxConfiguration.cs @@ -1,6 +1,4 @@ -using Umbraco.Core.PropertyEditors; - -namespace Umbraco.Web.PropertyEditors +namespace Umbraco.Cms.Core.PropertyEditors { /// /// Represents the configuration for the textbox value editor. diff --git a/src/Umbraco.Core/PropertyEditors/TrueFalseConfiguration.cs b/src/Umbraco.Core/PropertyEditors/TrueFalseConfiguration.cs index 03973cfc90..ab5b1ae964 100644 --- a/src/Umbraco.Core/PropertyEditors/TrueFalseConfiguration.cs +++ b/src/Umbraco.Core/PropertyEditors/TrueFalseConfiguration.cs @@ -1,6 +1,4 @@ -using Umbraco.Core.PropertyEditors; - -namespace Umbraco.Web.PropertyEditors +namespace Umbraco.Cms.Core.PropertyEditors { /// /// Represents the configuration for the boolean value editor. diff --git a/src/Umbraco.Core/PropertyEditors/UserPickerConfiguration.cs b/src/Umbraco.Core/PropertyEditors/UserPickerConfiguration.cs index bf3cd197a3..3e2a48ffd6 100644 --- a/src/Umbraco.Core/PropertyEditors/UserPickerConfiguration.cs +++ b/src/Umbraco.Core/PropertyEditors/UserPickerConfiguration.cs @@ -1,7 +1,6 @@ using System.Collections.Generic; -using Umbraco.Core.PropertyEditors; -namespace Umbraco.Web.PropertyEditors +namespace Umbraco.Cms.Core.PropertyEditors { public class UserPickerConfiguration : ConfigurationEditor { diff --git a/src/Umbraco.Core/PropertyEditors/UserPickerPropertyEditor.cs b/src/Umbraco.Core/PropertyEditors/UserPickerPropertyEditor.cs index f22c3d94dc..963e44dab6 100644 --- a/src/Umbraco.Core/PropertyEditors/UserPickerPropertyEditor.cs +++ b/src/Umbraco.Core/PropertyEditors/UserPickerPropertyEditor.cs @@ -1,11 +1,9 @@ using Microsoft.Extensions.Logging; -using Umbraco.Core; -using Umbraco.Core.PropertyEditors; -using Umbraco.Core.Serialization; -using Umbraco.Core.Services; -using Umbraco.Core.Strings; +using Umbraco.Cms.Core.Serialization; +using Umbraco.Cms.Core.Services; +using Umbraco.Cms.Core.Strings; -namespace Umbraco.Web.PropertyEditors +namespace Umbraco.Cms.Core.PropertyEditors { [DataEditor( Constants.PropertyEditors.Aliases.UserPicker, diff --git a/src/Umbraco.Core/PropertyEditors/Validation/ComplexEditorElementTypeValidationResult.cs b/src/Umbraco.Core/PropertyEditors/Validation/ComplexEditorElementTypeValidationResult.cs index 9c68deb7b5..ac7eb9ff61 100644 --- a/src/Umbraco.Core/PropertyEditors/Validation/ComplexEditorElementTypeValidationResult.cs +++ b/src/Umbraco.Core/PropertyEditors/Validation/ComplexEditorElementTypeValidationResult.cs @@ -2,13 +2,13 @@ using System.Collections.Generic; using System.ComponentModel.DataAnnotations; -namespace Umbraco.Web.PropertyEditors.Validation +namespace Umbraco.Cms.Core.PropertyEditors.Validation { /// /// A collection of for an element type within complex editor represented by an Element Type /// /// - /// For a more indepth explanation of how server side validation works with the angular app, see this GitHub PR: + /// For a more indepth explanation of how server side validation works with the angular app, see this GitHub PR: /// https://github.com/umbraco/Umbraco-CMS/pull/8339 /// public class ComplexEditorElementTypeValidationResult : ValidationResult diff --git a/src/Umbraco.Core/PropertyEditors/Validation/ComplexEditorPropertyTypeValidationResult.cs b/src/Umbraco.Core/PropertyEditors/Validation/ComplexEditorPropertyTypeValidationResult.cs index 3036529fb7..449ef432d8 100644 --- a/src/Umbraco.Core/PropertyEditors/Validation/ComplexEditorPropertyTypeValidationResult.cs +++ b/src/Umbraco.Core/PropertyEditors/Validation/ComplexEditorPropertyTypeValidationResult.cs @@ -3,13 +3,13 @@ using System.Collections.Generic; using System.ComponentModel.DataAnnotations; using System.Linq; -namespace Umbraco.Web.PropertyEditors.Validation +namespace Umbraco.Cms.Core.PropertyEditors.Validation { /// /// A collection of for a property type within a complex editor represented by an Element Type /// /// - /// For a more indepth explanation of how server side validation works with the angular app, see this GitHub PR: + /// For a more indepth explanation of how server side validation works with the angular app, see this GitHub PR: /// https://github.com/umbraco/Umbraco-CMS/pull/8339 /// public class ComplexEditorPropertyTypeValidationResult : ValidationResult diff --git a/src/Umbraco.Core/PropertyEditors/Validation/ComplexEditorValidationResult.cs b/src/Umbraco.Core/PropertyEditors/Validation/ComplexEditorValidationResult.cs index 178e1ec1f4..225963f461 100644 --- a/src/Umbraco.Core/PropertyEditors/Validation/ComplexEditorValidationResult.cs +++ b/src/Umbraco.Core/PropertyEditors/Validation/ComplexEditorValidationResult.cs @@ -1,7 +1,7 @@ using System.Collections.Generic; using System.ComponentModel.DataAnnotations; -namespace Umbraco.Web.PropertyEditors.Validation +namespace Umbraco.Cms.Core.PropertyEditors.Validation { /// @@ -10,7 +10,7 @@ namespace Umbraco.Web.PropertyEditors.Validation /// /// For example, each represents validation results for a row in Nested Content. /// - /// For a more indepth explanation of how server side validation works with the angular app, see this GitHub PR: + /// For a more indepth explanation of how server side validation works with the angular app, see this GitHub PR: /// https://github.com/umbraco/Umbraco-CMS/pull/8339 /// public class ComplexEditorValidationResult : ValidationResult diff --git a/src/Umbraco.Core/PropertyEditors/Validators/DateTimeValidator.cs b/src/Umbraco.Core/PropertyEditors/Validators/DateTimeValidator.cs index e964eae448..69c004376d 100644 --- a/src/Umbraco.Core/PropertyEditors/Validators/DateTimeValidator.cs +++ b/src/Umbraco.Core/PropertyEditors/Validators/DateTimeValidator.cs @@ -1,10 +1,9 @@ using System; using System.Collections.Generic; using System.ComponentModel.DataAnnotations; -using Umbraco.Core; -using Umbraco.Core.PropertyEditors; +using Umbraco.Extensions; -namespace Umbraco.Web.PropertyEditors +namespace Umbraco.Cms.Core.PropertyEditors.Validators { /// /// Used to validate if the value is a valid date/time diff --git a/src/Umbraco.Core/PropertyEditors/Validators/DecimalValidator.cs b/src/Umbraco.Core/PropertyEditors/Validators/DecimalValidator.cs index f464044923..7393603f85 100644 --- a/src/Umbraco.Core/PropertyEditors/Validators/DecimalValidator.cs +++ b/src/Umbraco.Core/PropertyEditors/Validators/DecimalValidator.cs @@ -1,7 +1,8 @@ using System.Collections.Generic; using System.ComponentModel.DataAnnotations; +using Umbraco.Extensions; -namespace Umbraco.Core.PropertyEditors.Validators +namespace Umbraco.Cms.Core.PropertyEditors.Validators { /// /// A validator that validates that the value is a valid decimal diff --git a/src/Umbraco.Core/PropertyEditors/Validators/DelimitedValueValidator.cs b/src/Umbraco.Core/PropertyEditors/Validators/DelimitedValueValidator.cs index 38912091c0..749f06d43f 100644 --- a/src/Umbraco.Core/PropertyEditors/Validators/DelimitedValueValidator.cs +++ b/src/Umbraco.Core/PropertyEditors/Validators/DelimitedValueValidator.cs @@ -3,7 +3,7 @@ using System.Collections.Generic; using System.ComponentModel.DataAnnotations; using System.Text.RegularExpressions; -namespace Umbraco.Core.PropertyEditors.Validators +namespace Umbraco.Cms.Core.PropertyEditors.Validators { /// /// A validator that validates a delimited set of values against a common regex diff --git a/src/Umbraco.Core/PropertyEditors/Validators/EmailValidator.cs b/src/Umbraco.Core/PropertyEditors/Validators/EmailValidator.cs index 8fb6d0c31b..04bf411f6e 100644 --- a/src/Umbraco.Core/PropertyEditors/Validators/EmailValidator.cs +++ b/src/Umbraco.Core/PropertyEditors/Validators/EmailValidator.cs @@ -1,7 +1,7 @@ using System.Collections.Generic; using System.ComponentModel.DataAnnotations; -namespace Umbraco.Core.PropertyEditors.Validators +namespace Umbraco.Cms.Core.PropertyEditors.Validators { /// /// A validator that validates an email address diff --git a/src/Umbraco.Core/PropertyEditors/Validators/IntegerValidator.cs b/src/Umbraco.Core/PropertyEditors/Validators/IntegerValidator.cs index 5274ff484b..7ed9a7b56d 100644 --- a/src/Umbraco.Core/PropertyEditors/Validators/IntegerValidator.cs +++ b/src/Umbraco.Core/PropertyEditors/Validators/IntegerValidator.cs @@ -1,7 +1,8 @@ using System.Collections.Generic; using System.ComponentModel.DataAnnotations; +using Umbraco.Extensions; -namespace Umbraco.Core.PropertyEditors.Validators +namespace Umbraco.Cms.Core.PropertyEditors.Validators { /// /// A validator that validates that the value is a valid integer diff --git a/src/Umbraco.Core/PropertyEditors/Validators/RegexValidator.cs b/src/Umbraco.Core/PropertyEditors/Validators/RegexValidator.cs index f1e3bc73c2..ea57e66481 100644 --- a/src/Umbraco.Core/PropertyEditors/Validators/RegexValidator.cs +++ b/src/Umbraco.Core/PropertyEditors/Validators/RegexValidator.cs @@ -1,11 +1,14 @@ -using System; +// Copyright (c) Umbraco. +// See LICENSE for more details. + +using System; using System.Collections.Generic; using System.ComponentModel.DataAnnotations; using System.Text.RegularExpressions; -using Umbraco.Core.Composing; -using Umbraco.Core.Services; +using Umbraco.Cms.Core.Services; +using Umbraco.Extensions; -namespace Umbraco.Core.PropertyEditors.Validators +namespace Umbraco.Cms.Core.PropertyEditors.Validators { /// /// A validator that validates that the value against a regular expression. diff --git a/src/Umbraco.Core/PropertyEditors/Validators/RequiredValidator.cs b/src/Umbraco.Core/PropertyEditors/Validators/RequiredValidator.cs index 8880ff5acf..3a7ec2b934 100644 --- a/src/Umbraco.Core/PropertyEditors/Validators/RequiredValidator.cs +++ b/src/Umbraco.Core/PropertyEditors/Validators/RequiredValidator.cs @@ -1,9 +1,9 @@ using System.Collections.Generic; using System.ComponentModel.DataAnnotations; -using Umbraco.Core.Composing; -using Umbraco.Core.Services; +using Umbraco.Cms.Core.Services; +using Umbraco.Extensions; -namespace Umbraco.Core.PropertyEditors.Validators +namespace Umbraco.Cms.Core.PropertyEditors.Validators { /// /// A validator that validates that the value is not null or empty (if it is a string) diff --git a/src/Umbraco.Core/PropertyEditors/ValueConverters/CheckboxListValueConverter.cs b/src/Umbraco.Core/PropertyEditors/ValueConverters/CheckboxListValueConverter.cs index ee1cd2062d..c3fa110adb 100644 --- a/src/Umbraco.Core/PropertyEditors/ValueConverters/CheckboxListValueConverter.cs +++ b/src/Umbraco.Core/PropertyEditors/ValueConverters/CheckboxListValueConverter.cs @@ -1,10 +1,11 @@ using System; using System.Collections.Generic; using System.Linq; -using Umbraco.Core.Models.PublishedContent; -using Umbraco.Core.Serialization; +using Umbraco.Cms.Core.Models.PublishedContent; +using Umbraco.Cms.Core.Serialization; +using Umbraco.Extensions; -namespace Umbraco.Core.PropertyEditors.ValueConverters +namespace Umbraco.Cms.Core.PropertyEditors.ValueConverters { [DefaultPropertyValueConverter] public class CheckboxListValueConverter : PropertyValueConverterBase diff --git a/src/Umbraco.Core/PropertyEditors/ValueConverters/ContentPickerValueConverter.cs b/src/Umbraco.Core/PropertyEditors/ValueConverters/ContentPickerValueConverter.cs index cc7aa27a4a..7a7f26ebe9 100644 --- a/src/Umbraco.Core/PropertyEditors/ValueConverters/ContentPickerValueConverter.cs +++ b/src/Umbraco.Core/PropertyEditors/ValueConverters/ContentPickerValueConverter.cs @@ -1,12 +1,11 @@ using System; using System.Collections.Generic; using System.Globalization; -using Umbraco.Core; -using Umbraco.Core.Models.PublishedContent; -using Umbraco.Core.PropertyEditors; -using Umbraco.Web.PublishedCache; +using Umbraco.Cms.Core.Models.PublishedContent; +using Umbraco.Cms.Core.PublishedCache; +using Umbraco.Extensions; -namespace Umbraco.Web.PropertyEditors.ValueConverters +namespace Umbraco.Cms.Core.PropertyEditors.ValueConverters { internal class ContentPickerValueConverter : PropertyValueConverterBase { diff --git a/src/Umbraco.Core/PropertyEditors/ValueConverters/DatePickerValueConverter.cs b/src/Umbraco.Core/PropertyEditors/ValueConverters/DatePickerValueConverter.cs index 0206528bf7..831d574d20 100644 --- a/src/Umbraco.Core/PropertyEditors/ValueConverters/DatePickerValueConverter.cs +++ b/src/Umbraco.Core/PropertyEditors/ValueConverters/DatePickerValueConverter.cs @@ -1,9 +1,9 @@ using System; -using System.Linq; using System.Xml; -using Umbraco.Core.Models.PublishedContent; +using Umbraco.Cms.Core.Models.PublishedContent; +using Umbraco.Extensions; -namespace Umbraco.Core.PropertyEditors.ValueConverters +namespace Umbraco.Cms.Core.PropertyEditors.ValueConverters { [DefaultPropertyValueConverter] public class DatePickerValueConverter : PropertyValueConverterBase diff --git a/src/Umbraco.Core/PropertyEditors/ValueConverters/DecimalValueConverter.cs b/src/Umbraco.Core/PropertyEditors/ValueConverters/DecimalValueConverter.cs index 7d6e7c0ce9..e9ede82590 100644 --- a/src/Umbraco.Core/PropertyEditors/ValueConverters/DecimalValueConverter.cs +++ b/src/Umbraco.Core/PropertyEditors/ValueConverters/DecimalValueConverter.cs @@ -1,8 +1,8 @@ using System; using System.Globalization; -using Umbraco.Core.Models.PublishedContent; +using Umbraco.Cms.Core.Models.PublishedContent; -namespace Umbraco.Core.PropertyEditors.ValueConverters +namespace Umbraco.Cms.Core.PropertyEditors.ValueConverters { [DefaultPropertyValueConverter] public class DecimalValueConverter : PropertyValueConverterBase diff --git a/src/Umbraco.Core/PropertyEditors/ValueConverters/EmailAddressValueConverter.cs b/src/Umbraco.Core/PropertyEditors/ValueConverters/EmailAddressValueConverter.cs index 88061a559e..668afe65bf 100644 --- a/src/Umbraco.Core/PropertyEditors/ValueConverters/EmailAddressValueConverter.cs +++ b/src/Umbraco.Core/PropertyEditors/ValueConverters/EmailAddressValueConverter.cs @@ -1,7 +1,8 @@ using System; -using Umbraco.Core.Models.PublishedContent; +using Umbraco.Cms.Core.Models.PublishedContent; +using Umbraco.Extensions; -namespace Umbraco.Core.PropertyEditors.ValueConverters +namespace Umbraco.Cms.Core.PropertyEditors.ValueConverters { [DefaultPropertyValueConverter] public class EmailAddressValueConverter : PropertyValueConverterBase diff --git a/src/Umbraco.Core/PropertyEditors/ValueConverters/IntegerValueConverter.cs b/src/Umbraco.Core/PropertyEditors/ValueConverters/IntegerValueConverter.cs index ca8f23bca2..a27ef9cb49 100644 --- a/src/Umbraco.Core/PropertyEditors/ValueConverters/IntegerValueConverter.cs +++ b/src/Umbraco.Core/PropertyEditors/ValueConverters/IntegerValueConverter.cs @@ -1,7 +1,8 @@ using System; -using Umbraco.Core.Models.PublishedContent; +using Umbraco.Cms.Core.Models.PublishedContent; +using Umbraco.Extensions; -namespace Umbraco.Core.PropertyEditors.ValueConverters +namespace Umbraco.Cms.Core.PropertyEditors.ValueConverters { [DefaultPropertyValueConverter] public class IntegerValueConverter : PropertyValueConverterBase diff --git a/src/Umbraco.Core/PropertyEditors/ValueConverters/LabelValueConverter.cs b/src/Umbraco.Core/PropertyEditors/ValueConverters/LabelValueConverter.cs index e706c198cf..637039faa9 100644 --- a/src/Umbraco.Core/PropertyEditors/ValueConverters/LabelValueConverter.cs +++ b/src/Umbraco.Core/PropertyEditors/ValueConverters/LabelValueConverter.cs @@ -1,8 +1,8 @@ using System; using System.Globalization; -using Umbraco.Core.Models.PublishedContent; +using Umbraco.Cms.Core.Models.PublishedContent; -namespace Umbraco.Core.PropertyEditors.ValueConverters +namespace Umbraco.Cms.Core.PropertyEditors.ValueConverters { /// /// We need this property converter so that we always force the value of a label to be a string diff --git a/src/Umbraco.Core/PropertyEditors/ValueConverters/MediaPickerValueConverter.cs b/src/Umbraco.Core/PropertyEditors/ValueConverters/MediaPickerValueConverter.cs index 9a33fd56e5..ff5fed786c 100644 --- a/src/Umbraco.Core/PropertyEditors/ValueConverters/MediaPickerValueConverter.cs +++ b/src/Umbraco.Core/PropertyEditors/ValueConverters/MediaPickerValueConverter.cs @@ -2,12 +2,10 @@ using System.Collections; using System.Collections.Generic; using System.Linq; -using Umbraco.Core; -using Umbraco.Core.Models.PublishedContent; -using Umbraco.Core.PropertyEditors; -using Umbraco.Web.PublishedCache; +using Umbraco.Cms.Core.Models.PublishedContent; +using Umbraco.Cms.Core.PublishedCache; -namespace Umbraco.Web.PropertyEditors.ValueConverters +namespace Umbraco.Cms.Core.PropertyEditors.ValueConverters { /// /// The media picker property value converter. diff --git a/src/Umbraco.Core/PropertyEditors/ValueConverters/MemberGroupPickerValueConverter.cs b/src/Umbraco.Core/PropertyEditors/ValueConverters/MemberGroupPickerValueConverter.cs index cd7f48f510..61b8a27f24 100644 --- a/src/Umbraco.Core/PropertyEditors/ValueConverters/MemberGroupPickerValueConverter.cs +++ b/src/Umbraco.Core/PropertyEditors/ValueConverters/MemberGroupPickerValueConverter.cs @@ -1,7 +1,8 @@ using System; -using Umbraco.Core.Models.PublishedContent; +using Umbraco.Cms.Core.Models.PublishedContent; +using Umbraco.Extensions; -namespace Umbraco.Core.PropertyEditors.ValueConverters +namespace Umbraco.Cms.Core.PropertyEditors.ValueConverters { [DefaultPropertyValueConverter] public class MemberGroupPickerValueConverter : PropertyValueConverterBase diff --git a/src/Umbraco.Core/PropertyEditors/ValueConverters/MemberPickerValueConverter.cs b/src/Umbraco.Core/PropertyEditors/ValueConverters/MemberPickerValueConverter.cs index 87e5ebec15..cd8f203cb9 100644 --- a/src/Umbraco.Core/PropertyEditors/ValueConverters/MemberPickerValueConverter.cs +++ b/src/Umbraco.Core/PropertyEditors/ValueConverters/MemberPickerValueConverter.cs @@ -1,10 +1,10 @@ using System; -using Umbraco.Core; -using Umbraco.Core.Models.PublishedContent; -using Umbraco.Core.PropertyEditors; -using Umbraco.Web.PublishedCache; +using Umbraco.Cms.Core.Models.PublishedContent; +using Umbraco.Cms.Core.PublishedCache; +using Umbraco.Cms.Core.Web; +using Umbraco.Extensions; -namespace Umbraco.Web.PropertyEditors.ValueConverters +namespace Umbraco.Cms.Core.PropertyEditors.ValueConverters { [DefaultPropertyValueConverter] public class MemberPickerValueConverter : PropertyValueConverterBase diff --git a/src/Umbraco.Core/PropertyEditors/ValueConverters/MultiNodeTreePickerValueConverter.cs b/src/Umbraco.Core/PropertyEditors/ValueConverters/MultiNodeTreePickerValueConverter.cs index e35205b704..4a00f20737 100644 --- a/src/Umbraco.Core/PropertyEditors/ValueConverters/MultiNodeTreePickerValueConverter.cs +++ b/src/Umbraco.Core/PropertyEditors/ValueConverters/MultiNodeTreePickerValueConverter.cs @@ -2,14 +2,13 @@ using System.Collections.Generic; using System.Globalization; using System.Linq; -using Umbraco.Core; -using Umbraco.Core.Models; -using Umbraco.Core.Models.PublishedContent; -using Umbraco.Core.PropertyEditors; -using Umbraco.Core.PropertyEditors.ValueConverters; -using Umbraco.Web.PublishedCache; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Core.Models.PublishedContent; +using Umbraco.Cms.Core.PublishedCache; +using Umbraco.Cms.Core.Web; +using Umbraco.Extensions; -namespace Umbraco.Web.PropertyEditors.ValueConverters +namespace Umbraco.Cms.Core.PropertyEditors.ValueConverters { /// diff --git a/src/Umbraco.Core/PropertyEditors/ValueConverters/MultipleTextStringValueConverter.cs b/src/Umbraco.Core/PropertyEditors/ValueConverters/MultipleTextStringValueConverter.cs index 15e7ce4caf..f7dccbf74d 100644 --- a/src/Umbraco.Core/PropertyEditors/ValueConverters/MultipleTextStringValueConverter.cs +++ b/src/Umbraco.Core/PropertyEditors/ValueConverters/MultipleTextStringValueConverter.cs @@ -2,9 +2,9 @@ using System.Collections.Generic; using System.Linq; using System.Xml; -using Umbraco.Core.Models.PublishedContent; +using Umbraco.Cms.Core.Models.PublishedContent; -namespace Umbraco.Core.PropertyEditors.ValueConverters +namespace Umbraco.Cms.Core.PropertyEditors.ValueConverters { [DefaultPropertyValueConverter] public class MultipleTextStringValueConverter : PropertyValueConverterBase diff --git a/src/Umbraco.Core/PropertyEditors/ValueConverters/MustBeStringValueConverter.cs b/src/Umbraco.Core/PropertyEditors/ValueConverters/MustBeStringValueConverter.cs index b9c61bb169..afefa4d156 100644 --- a/src/Umbraco.Core/PropertyEditors/ValueConverters/MustBeStringValueConverter.cs +++ b/src/Umbraco.Core/PropertyEditors/ValueConverters/MustBeStringValueConverter.cs @@ -1,8 +1,8 @@ using System; using System.Linq; -using Umbraco.Core.Models.PublishedContent; +using Umbraco.Cms.Core.Models.PublishedContent; -namespace Umbraco.Core.PropertyEditors.ValueConverters +namespace Umbraco.Cms.Core.PropertyEditors.ValueConverters { /// /// Ensures that no matter what is selected in (editor), the value results in a string. diff --git a/src/Umbraco.Core/PropertyEditors/ValueConverters/RadioButtonListValueConverter.cs b/src/Umbraco.Core/PropertyEditors/ValueConverters/RadioButtonListValueConverter.cs index 61adc9a93e..f2b41dd139 100644 --- a/src/Umbraco.Core/PropertyEditors/ValueConverters/RadioButtonListValueConverter.cs +++ b/src/Umbraco.Core/PropertyEditors/ValueConverters/RadioButtonListValueConverter.cs @@ -1,7 +1,8 @@ using System; -using Umbraco.Core.Models.PublishedContent; +using Umbraco.Cms.Core.Models.PublishedContent; +using Umbraco.Extensions; -namespace Umbraco.Core.PropertyEditors.ValueConverters +namespace Umbraco.Cms.Core.PropertyEditors.ValueConverters { [DefaultPropertyValueConverter] public class RadioButtonListValueConverter : PropertyValueConverterBase diff --git a/src/Umbraco.Core/PropertyEditors/ValueConverters/SimpleTinyMceValueConverter.cs b/src/Umbraco.Core/PropertyEditors/ValueConverters/SimpleTinyMceValueConverter.cs index 64ecba5c7c..db5376f52a 100644 --- a/src/Umbraco.Core/PropertyEditors/ValueConverters/SimpleTinyMceValueConverter.cs +++ b/src/Umbraco.Core/PropertyEditors/ValueConverters/SimpleTinyMceValueConverter.cs @@ -1,8 +1,8 @@ using System; -using Umbraco.Core.Models.PublishedContent; -using Umbraco.Core.Strings; +using Umbraco.Cms.Core.Models.PublishedContent; +using Umbraco.Cms.Core.Strings; -namespace Umbraco.Core.PropertyEditors.ValueConverters +namespace Umbraco.Cms.Core.PropertyEditors.ValueConverters { /// /// Value converter for the RTE so that it always returns IHtmlString so that Html.Raw doesn't have to be used. diff --git a/src/Umbraco.Core/PropertyEditors/ValueConverters/SliderValueConverter.cs b/src/Umbraco.Core/PropertyEditors/ValueConverters/SliderValueConverter.cs index 88c1770a06..a1f3f82f43 100644 --- a/src/Umbraco.Core/PropertyEditors/ValueConverters/SliderValueConverter.cs +++ b/src/Umbraco.Core/PropertyEditors/ValueConverters/SliderValueConverter.cs @@ -1,12 +1,11 @@ using System; using System.Collections.Concurrent; -using System.Collections.Generic; -using System.Linq; -using Umbraco.Core.Models; -using Umbraco.Core.Models.PublishedContent; -using Umbraco.Core.Services; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Core.Models.PublishedContent; +using Umbraco.Cms.Core.Services; +using Umbraco.Extensions; -namespace Umbraco.Core.PropertyEditors.ValueConverters +namespace Umbraco.Cms.Core.PropertyEditors.ValueConverters { [DefaultPropertyValueConverter] public class SliderValueConverter : PropertyValueConverterBase diff --git a/src/Umbraco.Core/PropertyEditors/ValueConverters/TagsValueConverter.cs b/src/Umbraco.Core/PropertyEditors/ValueConverters/TagsValueConverter.cs index edacd500df..d9c7cbeb75 100644 --- a/src/Umbraco.Core/PropertyEditors/ValueConverters/TagsValueConverter.cs +++ b/src/Umbraco.Core/PropertyEditors/ValueConverters/TagsValueConverter.cs @@ -1,12 +1,13 @@ using System; using System.Collections.Concurrent; using System.Collections.Generic; -using Umbraco.Core.Models; -using Umbraco.Core.Models.PublishedContent; -using Umbraco.Core.Serialization; -using Umbraco.Core.Services; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Core.Models.PublishedContent; +using Umbraco.Cms.Core.Serialization; +using Umbraco.Cms.Core.Services; +using Umbraco.Extensions; -namespace Umbraco.Core.PropertyEditors.ValueConverters +namespace Umbraco.Cms.Core.PropertyEditors.ValueConverters { [DefaultPropertyValueConverter] public class TagsValueConverter : PropertyValueConverterBase diff --git a/src/Umbraco.Core/PropertyEditors/ValueConverters/UploadPropertyConverter.cs b/src/Umbraco.Core/PropertyEditors/ValueConverters/UploadPropertyConverter.cs index 407ed13ddf..0dc33c25b6 100644 --- a/src/Umbraco.Core/PropertyEditors/ValueConverters/UploadPropertyConverter.cs +++ b/src/Umbraco.Core/PropertyEditors/ValueConverters/UploadPropertyConverter.cs @@ -1,7 +1,7 @@ using System; -using Umbraco.Core.Models.PublishedContent; +using Umbraco.Cms.Core.Models.PublishedContent; -namespace Umbraco.Core.PropertyEditors.ValueConverters +namespace Umbraco.Cms.Core.PropertyEditors.ValueConverters { /// /// The upload property value converter. diff --git a/src/Umbraco.Core/PropertyEditors/ValueConverters/YesNoValueConverter.cs b/src/Umbraco.Core/PropertyEditors/ValueConverters/YesNoValueConverter.cs index 153462ccf5..455ea5417d 100644 --- a/src/Umbraco.Core/PropertyEditors/ValueConverters/YesNoValueConverter.cs +++ b/src/Umbraco.Core/PropertyEditors/ValueConverters/YesNoValueConverter.cs @@ -1,7 +1,7 @@ using System; -using Umbraco.Core.Models.PublishedContent; +using Umbraco.Cms.Core.Models.PublishedContent; -namespace Umbraco.Core.PropertyEditors.ValueConverters +namespace Umbraco.Cms.Core.PropertyEditors.ValueConverters { [DefaultPropertyValueConverter] public class YesNoValueConverter : PropertyValueConverterBase diff --git a/src/Umbraco.Core/PropertyEditors/ValueListConfiguration.cs b/src/Umbraco.Core/PropertyEditors/ValueListConfiguration.cs index d5195ab54a..d26b46a510 100644 --- a/src/Umbraco.Core/PropertyEditors/ValueListConfiguration.cs +++ b/src/Umbraco.Core/PropertyEditors/ValueListConfiguration.cs @@ -1,7 +1,7 @@ using System.Collections.Generic; using System.Runtime.Serialization; -namespace Umbraco.Core.PropertyEditors +namespace Umbraco.Cms.Core.PropertyEditors { /// /// Represents the ValueList editor configuration. diff --git a/src/Umbraco.Core/PropertyEditors/ValueTypes.cs b/src/Umbraco.Core/PropertyEditors/ValueTypes.cs index a8ecea5cf3..28e8fbf58e 100644 --- a/src/Umbraco.Core/PropertyEditors/ValueTypes.cs +++ b/src/Umbraco.Core/PropertyEditors/ValueTypes.cs @@ -1,10 +1,10 @@ using System; -using System.Linq; using System.Collections.Generic; +using System.Linq; using System.Reflection; -using Umbraco.Core.Models; +using Umbraco.Cms.Core.Models; -namespace Umbraco.Core.PropertyEditors +namespace Umbraco.Cms.Core.PropertyEditors { /// /// Represents the types of the edited values. diff --git a/src/Umbraco.Core/PropertyEditors/VoidEditor.cs b/src/Umbraco.Core/PropertyEditors/VoidEditor.cs index d2e84b7952..8f0f4293cd 100644 --- a/src/Umbraco.Core/PropertyEditors/VoidEditor.cs +++ b/src/Umbraco.Core/PropertyEditors/VoidEditor.cs @@ -1,10 +1,10 @@ using Microsoft.Extensions.Logging; -using Umbraco.Core.Composing; -using Umbraco.Core.Serialization; -using Umbraco.Core.Services; -using Umbraco.Core.Strings; +using Umbraco.Cms.Core.Composing; +using Umbraco.Cms.Core.Serialization; +using Umbraco.Cms.Core.Services; +using Umbraco.Cms.Core.Strings; -namespace Umbraco.Core.PropertyEditors +namespace Umbraco.Cms.Core.PropertyEditors { /// /// Represents a void editor. diff --git a/src/Umbraco.Core/PublishedCache/DefaultCultureAccessor.cs b/src/Umbraco.Core/PublishedCache/DefaultCultureAccessor.cs index bd78358519..50ec3c4c16 100644 --- a/src/Umbraco.Core/PublishedCache/DefaultCultureAccessor.cs +++ b/src/Umbraco.Core/PublishedCache/DefaultCultureAccessor.cs @@ -1,9 +1,8 @@ using Microsoft.Extensions.Options; -using Umbraco.Core; -using Umbraco.Core.Configuration.Models; -using Umbraco.Core.Services; +using Umbraco.Cms.Core.Configuration.Models; +using Umbraco.Cms.Core.Services; -namespace Umbraco.Web.PublishedCache +namespace Umbraco.Cms.Core.PublishedCache { /// /// Provides the default implementation of . diff --git a/src/Umbraco.Core/PublishedCache/IDefaultCultureAccessor.cs b/src/Umbraco.Core/PublishedCache/IDefaultCultureAccessor.cs index b1c1edd4ee..58844562a7 100644 --- a/src/Umbraco.Core/PublishedCache/IDefaultCultureAccessor.cs +++ b/src/Umbraco.Core/PublishedCache/IDefaultCultureAccessor.cs @@ -1,4 +1,4 @@ -namespace Umbraco.Web.PublishedCache +namespace Umbraco.Cms.Core.PublishedCache { /// /// Gives access to the default culture. diff --git a/src/Umbraco.Core/PublishedCache/IDomainCache.cs b/src/Umbraco.Core/PublishedCache/IDomainCache.cs index 3ec84c9d48..0555960dfa 100644 --- a/src/Umbraco.Core/PublishedCache/IDomainCache.cs +++ b/src/Umbraco.Core/PublishedCache/IDomainCache.cs @@ -1,9 +1,7 @@ -using System; -using System.Collections.Generic; -using Umbraco.Core.Models.PublishedContent; -using Umbraco.Web.Routing; +using System.Collections.Generic; +using Umbraco.Cms.Core.Routing; -namespace Umbraco.Web.PublishedCache +namespace Umbraco.Cms.Core.PublishedCache { public interface IDomainCache { diff --git a/src/Umbraco.Core/PublishedCache/IPublishedCache.cs b/src/Umbraco.Core/PublishedCache/IPublishedCache.cs index a97c5df3ba..7ec0314377 100644 --- a/src/Umbraco.Core/PublishedCache/IPublishedCache.cs +++ b/src/Umbraco.Core/PublishedCache/IPublishedCache.cs @@ -1,11 +1,10 @@ using System; using System.Collections.Generic; using System.Xml.XPath; -using Umbraco.Core; -using Umbraco.Core.Models.PublishedContent; -using Umbraco.Core.Xml; +using Umbraco.Cms.Core.Models.PublishedContent; +using Umbraco.Cms.Core.Xml; -namespace Umbraco.Web.PublishedCache +namespace Umbraco.Cms.Core.PublishedCache { /// /// Provides access to cached contents. diff --git a/src/Umbraco.Core/PublishedCache/IPublishedContentCache.cs b/src/Umbraco.Core/PublishedCache/IPublishedContentCache.cs index b4a6e3d1e0..7358611711 100644 --- a/src/Umbraco.Core/PublishedCache/IPublishedContentCache.cs +++ b/src/Umbraco.Core/PublishedCache/IPublishedContentCache.cs @@ -1,8 +1,6 @@ -using System.Globalization; -using Umbraco.Core.Models; -using Umbraco.Core.Models.PublishedContent; +using Umbraco.Cms.Core.Models.PublishedContent; -namespace Umbraco.Web.PublishedCache +namespace Umbraco.Cms.Core.PublishedCache { public interface IPublishedContentCache : IPublishedCache { diff --git a/src/Umbraco.Core/PublishedCache/IPublishedMediaCache.cs b/src/Umbraco.Core/PublishedCache/IPublishedMediaCache.cs index 0b461882b7..1c10776d11 100644 --- a/src/Umbraco.Core/PublishedCache/IPublishedMediaCache.cs +++ b/src/Umbraco.Core/PublishedCache/IPublishedMediaCache.cs @@ -1,4 +1,4 @@ -namespace Umbraco.Web.PublishedCache +namespace Umbraco.Cms.Core.PublishedCache { public interface IPublishedMediaCache : IPublishedCache { } diff --git a/src/Umbraco.Core/PublishedCache/IPublishedMemberCache.cs b/src/Umbraco.Core/PublishedCache/IPublishedMemberCache.cs index 0ea812db83..67036202dd 100644 --- a/src/Umbraco.Core/PublishedCache/IPublishedMemberCache.cs +++ b/src/Umbraco.Core/PublishedCache/IPublishedMemberCache.cs @@ -1,8 +1,8 @@ using System.Xml.XPath; -using Umbraco.Core.Models; -using Umbraco.Core.Models.PublishedContent; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Core.Models.PublishedContent; -namespace Umbraco.Web.PublishedCache +namespace Umbraco.Cms.Core.PublishedCache { public interface IPublishedMemberCache : IXPathNavigable { diff --git a/src/Umbraco.Core/PublishedCache/IPublishedSnapshot.cs b/src/Umbraco.Core/PublishedCache/IPublishedSnapshot.cs index e823e09eae..bff2a3b838 100644 --- a/src/Umbraco.Core/PublishedCache/IPublishedSnapshot.cs +++ b/src/Umbraco.Core/PublishedCache/IPublishedSnapshot.cs @@ -1,7 +1,7 @@ using System; -using Umbraco.Core.Cache; +using Umbraco.Cms.Core.Cache; -namespace Umbraco.Web.PublishedCache +namespace Umbraco.Cms.Core.PublishedCache { /// /// Specifies a published snapshot. diff --git a/src/Umbraco.Core/PublishedCache/IPublishedSnapshotAccessor.cs b/src/Umbraco.Core/PublishedCache/IPublishedSnapshotAccessor.cs index 775de214ec..500507988c 100644 --- a/src/Umbraco.Core/PublishedCache/IPublishedSnapshotAccessor.cs +++ b/src/Umbraco.Core/PublishedCache/IPublishedSnapshotAccessor.cs @@ -1,4 +1,4 @@ -namespace Umbraco.Web.PublishedCache +namespace Umbraco.Cms.Core.PublishedCache { /// /// Provides access to the "current" . diff --git a/src/Umbraco.Core/PublishedCache/IPublishedSnapshotService.cs b/src/Umbraco.Core/PublishedCache/IPublishedSnapshotService.cs index 7307ba97f9..d1e113d16c 100644 --- a/src/Umbraco.Core/PublishedCache/IPublishedSnapshotService.cs +++ b/src/Umbraco.Core/PublishedCache/IPublishedSnapshotService.cs @@ -1,9 +1,9 @@ using System; using System.Collections.Generic; using System.Threading.Tasks; -using Umbraco.Web.Cache; +using Umbraco.Cms.Core.Cache; -namespace Umbraco.Web.PublishedCache +namespace Umbraco.Cms.Core.PublishedCache { /// diff --git a/src/Umbraco.Core/PublishedCache/IPublishedSnapshotStatus.cs b/src/Umbraco.Core/PublishedCache/IPublishedSnapshotStatus.cs index 0f88bd4085..5695f03377 100644 --- a/src/Umbraco.Core/PublishedCache/IPublishedSnapshotStatus.cs +++ b/src/Umbraco.Core/PublishedCache/IPublishedSnapshotStatus.cs @@ -1,4 +1,4 @@ -namespace Umbraco.Web.PublishedCache +namespace Umbraco.Cms.Core.PublishedCache { /// /// Returns the currents status for nucache diff --git a/src/Umbraco.Core/PublishedCache/ITagQuery.cs b/src/Umbraco.Core/PublishedCache/ITagQuery.cs index 1b96ea330c..4b9134bdf2 100644 --- a/src/Umbraco.Core/PublishedCache/ITagQuery.cs +++ b/src/Umbraco.Core/PublishedCache/ITagQuery.cs @@ -1,8 +1,8 @@ using System.Collections.Generic; -using Umbraco.Core.Models.PublishedContent; -using Umbraco.Web.Models; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Core.Models.PublishedContent; -namespace Umbraco.Web +namespace Umbraco.Cms.Core.PublishedCache { public interface ITagQuery { diff --git a/src/Umbraco.Core/PublishedCache/PublishedCacheBase.cs b/src/Umbraco.Core/PublishedCache/PublishedCacheBase.cs index 3bb0f3db1a..e9e5177c17 100644 --- a/src/Umbraco.Core/PublishedCache/PublishedCacheBase.cs +++ b/src/Umbraco.Core/PublishedCache/PublishedCacheBase.cs @@ -2,11 +2,11 @@ using System.Collections.Generic; using System.Linq; using System.Xml.XPath; -using Umbraco.Core; -using Umbraco.Core.Models.PublishedContent; -using Umbraco.Core.Xml; +using Umbraco.Cms.Core.Models.PublishedContent; +using Umbraco.Cms.Core.Xml; +using Umbraco.Extensions; -namespace Umbraco.Web.PublishedCache +namespace Umbraco.Cms.Core.PublishedCache { public abstract class PublishedCacheBase : IPublishedCache { diff --git a/src/Umbraco.Core/PublishedCache/PublishedElement.cs b/src/Umbraco.Core/PublishedCache/PublishedElement.cs index b7c8f77bb7..92e988fcca 100644 --- a/src/Umbraco.Core/PublishedCache/PublishedElement.cs +++ b/src/Umbraco.Core/PublishedCache/PublishedElement.cs @@ -1,10 +1,10 @@ using System; using System.Collections.Generic; using System.Linq; -using Umbraco.Core.Models.PublishedContent; -using Umbraco.Core.PropertyEditors; +using Umbraco.Cms.Core.Models.PublishedContent; +using Umbraco.Cms.Core.PropertyEditors; -namespace Umbraco.Web.PublishedCache +namespace Umbraco.Cms.Core.PublishedCache { // notes: // a published element does NOT manage any tree-like elements, neither the diff --git a/src/Umbraco.Core/PublishedCache/PublishedElementPropertyBase.cs b/src/Umbraco.Core/PublishedCache/PublishedElementPropertyBase.cs index ef62a3254d..0632e50b88 100644 --- a/src/Umbraco.Core/PublishedCache/PublishedElementPropertyBase.cs +++ b/src/Umbraco.Core/PublishedCache/PublishedElementPropertyBase.cs @@ -1,9 +1,9 @@ using System; -using Umbraco.Core.Cache; -using Umbraco.Core.Models.PublishedContent; -using Umbraco.Core.PropertyEditors; +using Umbraco.Cms.Core.Cache; +using Umbraco.Cms.Core.Models.PublishedContent; +using Umbraco.Cms.Core.PropertyEditors; -namespace Umbraco.Web.PublishedCache +namespace Umbraco.Cms.Core.PublishedCache { internal class PublishedElementPropertyBase : PublishedPropertyBase { diff --git a/src/Umbraco.Core/PublishedCache/PublishedMember.cs b/src/Umbraco.Core/PublishedCache/PublishedMember.cs index bd84e4a9d2..f5926cf639 100644 --- a/src/Umbraco.Core/PublishedCache/PublishedMember.cs +++ b/src/Umbraco.Core/PublishedCache/PublishedMember.cs @@ -1,14 +1,13 @@ using System; using System.Collections.Generic; using System.Linq; -using Umbraco.Core; -using Umbraco.Core.Models; -using Umbraco.Core.Models.Membership; -using Umbraco.Core.Models.PublishedContent; -using Umbraco.Core.Services; -using Umbraco.Web.Models; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Core.Models.Membership; +using Umbraco.Cms.Core.Models.PublishedContent; +using Umbraco.Cms.Core.Services; +using Umbraco.Extensions; -namespace Umbraco.Web.PublishedCache +namespace Umbraco.Cms.Core.PublishedCache { /// /// Exposes a member object as IPublishedContent diff --git a/src/Umbraco.Core/PublishedCache/UmbracoContextPublishedSnapshotAccessor.cs b/src/Umbraco.Core/PublishedCache/UmbracoContextPublishedSnapshotAccessor.cs index 874da1f3aa..4a8c9e6346 100644 --- a/src/Umbraco.Core/PublishedCache/UmbracoContextPublishedSnapshotAccessor.cs +++ b/src/Umbraco.Core/PublishedCache/UmbracoContextPublishedSnapshotAccessor.cs @@ -1,5 +1,7 @@ using System; -namespace Umbraco.Web.PublishedCache +using Umbraco.Cms.Core.Web; + +namespace Umbraco.Cms.Core.PublishedCache { // TODO: This is a mess. This is a circular reference: // IPublishedSnapshotAccessor -> PublishedSnapshotService -> UmbracoContext -> PublishedSnapshotService -> IPublishedSnapshotAccessor diff --git a/src/Umbraco.Core/ReadLock.cs b/src/Umbraco.Core/ReadLock.cs index 9d3ef22168..67aeb7062a 100644 --- a/src/Umbraco.Core/ReadLock.cs +++ b/src/Umbraco.Core/ReadLock.cs @@ -1,10 +1,7 @@ using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; using System.Threading; -namespace Umbraco.Core +namespace Umbraco.Cms.Core { /// /// Provides a convenience methodology for implementing locked access to resources. diff --git a/src/Umbraco.Core/ReflectionUtilities.cs b/src/Umbraco.Core/ReflectionUtilities.cs index b3fd8c1b59..01f373387f 100644 --- a/src/Umbraco.Core/ReflectionUtilities.cs +++ b/src/Umbraco.Core/ReflectionUtilities.cs @@ -4,7 +4,7 @@ using System.Linq; using System.Reflection; using System.Reflection.Emit; -namespace Umbraco.Core +namespace Umbraco.Cms.Core { /// /// Provides utilities to simplify reflection. diff --git a/src/Umbraco.Core/Routing/AliasUrlProvider.cs b/src/Umbraco.Core/Routing/AliasUrlProvider.cs index 65e094690e..0eb7eea0a2 100644 --- a/src/Umbraco.Core/Routing/AliasUrlProvider.cs +++ b/src/Umbraco.Core/Routing/AliasUrlProvider.cs @@ -2,13 +2,12 @@ using System; using System.Collections.Generic; using System.Linq; using Microsoft.Extensions.Options; -using Umbraco.Core; -using Umbraco.Core.Configuration; -using Umbraco.Core.Configuration.Models; -using Umbraco.Core.Configuration.UmbracoSettings; -using Umbraco.Core.Models.PublishedContent; +using Umbraco.Cms.Core.Configuration.Models; +using Umbraco.Cms.Core.Models.PublishedContent; +using Umbraco.Cms.Core.Web; +using Umbraco.Extensions; -namespace Umbraco.Web.Routing +namespace Umbraco.Cms.Core.Routing { /// /// Provides URLs using the umbracoUrlAlias property. diff --git a/src/Umbraco.Core/Routing/ContentFinderByIdPath.cs b/src/Umbraco.Core/Routing/ContentFinderByIdPath.cs index 500bd65f82..a64d59261a 100644 --- a/src/Umbraco.Core/Routing/ContentFinderByIdPath.cs +++ b/src/Umbraco.Core/Routing/ContentFinderByIdPath.cs @@ -1,11 +1,10 @@ -using System.Globalization; using Microsoft.Extensions.Logging; using Microsoft.Extensions.Options; -using Umbraco.Core; -using Umbraco.Core.Configuration.Models; -using Umbraco.Core.Models.PublishedContent; +using Umbraco.Cms.Core.Configuration.Models; +using Umbraco.Cms.Core.Models.PublishedContent; +using Umbraco.Cms.Core.Web; -namespace Umbraco.Web.Routing +namespace Umbraco.Cms.Core.Routing { /// /// Provides an implementation of that handles page identifiers. diff --git a/src/Umbraco.Core/Routing/ContentFinderByPageIdQuery.cs b/src/Umbraco.Core/Routing/ContentFinderByPageIdQuery.cs index 15698f9134..d0712905c7 100644 --- a/src/Umbraco.Core/Routing/ContentFinderByPageIdQuery.cs +++ b/src/Umbraco.Core/Routing/ContentFinderByPageIdQuery.cs @@ -1,7 +1,8 @@ -using Umbraco.Core.Models.PublishedContent; +using Umbraco.Cms.Core.Models.PublishedContent; +using Umbraco.Cms.Core.Web; -namespace Umbraco.Web.Routing +namespace Umbraco.Cms.Core.Routing { /// /// This looks up a document by checking for the umbPageId of a request/query string diff --git a/src/Umbraco.Core/Routing/ContentFinderByRedirectUrl.cs b/src/Umbraco.Core/Routing/ContentFinderByRedirectUrl.cs index e3c5b28a2a..93448c02cf 100644 --- a/src/Umbraco.Core/Routing/ContentFinderByRedirectUrl.cs +++ b/src/Umbraco.Core/Routing/ContentFinderByRedirectUrl.cs @@ -1,11 +1,12 @@ using System.Collections.Generic; using Microsoft.Extensions.Logging; -using Umbraco.Core; -using Umbraco.Core.Models; -using Umbraco.Core.Models.PublishedContent; -using Umbraco.Core.Services; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Core.Models.PublishedContent; +using Umbraco.Cms.Core.Services; +using Umbraco.Cms.Core.Web; +using Umbraco.Extensions; -namespace Umbraco.Web.Routing +namespace Umbraco.Cms.Core.Routing { /// /// Provides an implementation of that handles page URL rewrites diff --git a/src/Umbraco.Core/Routing/ContentFinderByUrl.cs b/src/Umbraco.Core/Routing/ContentFinderByUrl.cs index c20cf9fd85..4f08e5aa49 100644 --- a/src/Umbraco.Core/Routing/ContentFinderByUrl.cs +++ b/src/Umbraco.Core/Routing/ContentFinderByUrl.cs @@ -1,8 +1,8 @@ using Microsoft.Extensions.Logging; -using Umbraco.Core; -using Umbraco.Core.Models.PublishedContent; +using Umbraco.Cms.Core.Models.PublishedContent; +using Umbraco.Cms.Core.Web; -namespace Umbraco.Web.Routing +namespace Umbraco.Cms.Core.Routing { /// /// Provides an implementation of that handles page nice URLs. diff --git a/src/Umbraco.Core/Routing/ContentFinderByUrlAlias.cs b/src/Umbraco.Core/Routing/ContentFinderByUrlAlias.cs index 4745ea8cd3..8a48625cfe 100644 --- a/src/Umbraco.Core/Routing/ContentFinderByUrlAlias.cs +++ b/src/Umbraco.Core/Routing/ContentFinderByUrlAlias.cs @@ -1,13 +1,12 @@ using System; -using System.Text; using System.Linq; using Microsoft.Extensions.Logging; -using Umbraco.Core; -using Umbraco.Core.Models.PublishedContent; -using Umbraco.Core.Xml; -using Umbraco.Web.PublishedCache; +using Umbraco.Cms.Core.Models.PublishedContent; +using Umbraco.Cms.Core.PublishedCache; +using Umbraco.Cms.Core.Web; +using Umbraco.Extensions; -namespace Umbraco.Web.Routing +namespace Umbraco.Cms.Core.Routing { /// /// Provides an implementation of that handles page aliases. diff --git a/src/Umbraco.Core/Routing/ContentFinderByUrlAndTemplate.cs b/src/Umbraco.Core/Routing/ContentFinderByUrlAndTemplate.cs index 2e69446d68..2e5515fef2 100644 --- a/src/Umbraco.Core/Routing/ContentFinderByUrlAndTemplate.cs +++ b/src/Umbraco.Core/Routing/ContentFinderByUrlAndTemplate.cs @@ -1,12 +1,13 @@ using Microsoft.Extensions.Logging; using Microsoft.Extensions.Options; -using Umbraco.Core; -using Umbraco.Core.Configuration.Models; -using Umbraco.Core.Models; -using Umbraco.Core.Models.PublishedContent; -using Umbraco.Core.Services; +using Umbraco.Cms.Core.Configuration.Models; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Core.Models.PublishedContent; +using Umbraco.Cms.Core.Services; +using Umbraco.Cms.Core.Web; +using Umbraco.Extensions; -namespace Umbraco.Web.Routing +namespace Umbraco.Cms.Core.Routing { /// /// Provides an implementation of that handles page nice URLs and a template. diff --git a/src/Umbraco.Core/Routing/ContentFinderCollection.cs b/src/Umbraco.Core/Routing/ContentFinderCollection.cs index 9eca0d5d72..d63c269f50 100644 --- a/src/Umbraco.Core/Routing/ContentFinderCollection.cs +++ b/src/Umbraco.Core/Routing/ContentFinderCollection.cs @@ -1,7 +1,7 @@ using System.Collections.Generic; -using Umbraco.Core.Composing; +using Umbraco.Cms.Core.Composing; -namespace Umbraco.Web.Routing +namespace Umbraco.Cms.Core.Routing { public class ContentFinderCollection : BuilderCollectionBase { diff --git a/src/Umbraco.Core/Routing/ContentFinderCollectionBuilder.cs b/src/Umbraco.Core/Routing/ContentFinderCollectionBuilder.cs index 401a7daf43..d471acf60c 100644 --- a/src/Umbraco.Core/Routing/ContentFinderCollectionBuilder.cs +++ b/src/Umbraco.Core/Routing/ContentFinderCollectionBuilder.cs @@ -1,6 +1,6 @@ -using Umbraco.Core.Composing; +using Umbraco.Cms.Core.Composing; -namespace Umbraco.Web.Routing +namespace Umbraco.Cms.Core.Routing { public class ContentFinderCollectionBuilder : OrderedCollectionBuilderBase { diff --git a/src/Umbraco.Core/Routing/CreatingRequestNotification.cs b/src/Umbraco.Core/Routing/CreatingRequestNotification.cs index 859ccd24b0..7b7122b332 100644 --- a/src/Umbraco.Core/Routing/CreatingRequestNotification.cs +++ b/src/Umbraco.Core/Routing/CreatingRequestNotification.cs @@ -1,7 +1,7 @@ using System; -using Umbraco.Core.Events; +using Umbraco.Cms.Core.Events; -namespace Umbraco.Web.Routing +namespace Umbraco.Cms.Core.Routing { /// /// Used for notifying when an Umbraco request is being created diff --git a/src/Umbraco.Core/Routing/DefaultMediaUrlProvider.cs b/src/Umbraco.Core/Routing/DefaultMediaUrlProvider.cs index e489b764c3..821a5c9013 100644 --- a/src/Umbraco.Core/Routing/DefaultMediaUrlProvider.cs +++ b/src/Umbraco.Core/Routing/DefaultMediaUrlProvider.cs @@ -1,8 +1,8 @@ using System; -using Umbraco.Core.Models.PublishedContent; -using Umbraco.Core.PropertyEditors; +using Umbraco.Cms.Core.Models.PublishedContent; +using Umbraco.Cms.Core.PropertyEditors; -namespace Umbraco.Web.Routing +namespace Umbraco.Cms.Core.Routing { /// /// Default media URL provider. diff --git a/src/Umbraco.Core/Routing/DefaultUrlProvider.cs b/src/Umbraco.Core/Routing/DefaultUrlProvider.cs index d739f851ad..97c7deec9c 100644 --- a/src/Umbraco.Core/Routing/DefaultUrlProvider.cs +++ b/src/Umbraco.Core/Routing/DefaultUrlProvider.cs @@ -1,11 +1,12 @@ using System; using System.Collections.Generic; -using Microsoft.Extensions.Options; using Microsoft.Extensions.Logging; -using Umbraco.Core.Configuration.Models; -using Umbraco.Core.Models.PublishedContent; +using Microsoft.Extensions.Options; +using Umbraco.Cms.Core.Configuration.Models; +using Umbraco.Cms.Core.Models.PublishedContent; +using Umbraco.Cms.Core.Web; -namespace Umbraco.Web.Routing +namespace Umbraco.Cms.Core.Routing { /// /// Provides urls. diff --git a/src/Umbraco.Core/Routing/Domain.cs b/src/Umbraco.Core/Routing/Domain.cs index 7d1808ef97..cf09687dae 100644 --- a/src/Umbraco.Core/Routing/Domain.cs +++ b/src/Umbraco.Core/Routing/Domain.cs @@ -1,6 +1,4 @@ -using System.Globalization; - -namespace Umbraco.Web.Routing +namespace Umbraco.Cms.Core.Routing { /// /// Represents a published snapshot domain. diff --git a/src/Umbraco.Core/Routing/DomainAndUri.cs b/src/Umbraco.Core/Routing/DomainAndUri.cs index 46dc085998..751c4ead58 100644 --- a/src/Umbraco.Core/Routing/DomainAndUri.cs +++ b/src/Umbraco.Core/Routing/DomainAndUri.cs @@ -1,7 +1,7 @@ using System; -using Umbraco.Core; +using Umbraco.Extensions; -namespace Umbraco.Web.Routing +namespace Umbraco.Cms.Core.Routing { /// /// Represents a published snapshot domain with its normalized uri. diff --git a/src/Umbraco.Core/Routing/DomainUtilities.cs b/src/Umbraco.Core/Routing/DomainUtilities.cs index 0d14b26396..a6cd90a3c2 100644 --- a/src/Umbraco.Core/Routing/DomainUtilities.cs +++ b/src/Umbraco.Core/Routing/DomainUtilities.cs @@ -1,10 +1,11 @@ using System; using System.Collections.Generic; using System.Linq; -using Umbraco.Core; -using Umbraco.Web.PublishedCache; +using Umbraco.Cms.Core.PublishedCache; +using Umbraco.Cms.Core.Web; +using Umbraco.Extensions; -namespace Umbraco.Web.Routing +namespace Umbraco.Cms.Core.Routing { /// /// Provides utilities to handle domains. diff --git a/src/Umbraco.Core/Routing/IContentFinder.cs b/src/Umbraco.Core/Routing/IContentFinder.cs index 57575b3cf0..48a70d86e8 100644 --- a/src/Umbraco.Core/Routing/IContentFinder.cs +++ b/src/Umbraco.Core/Routing/IContentFinder.cs @@ -1,4 +1,4 @@ -namespace Umbraco.Web.Routing +namespace Umbraco.Cms.Core.Routing { /// /// Provides a method to try to find and assign an Umbraco document to a PublishedRequest. diff --git a/src/Umbraco.Core/Routing/IContentLastChanceFinder.cs b/src/Umbraco.Core/Routing/IContentLastChanceFinder.cs index b1ff47bddb..19e5f80246 100644 --- a/src/Umbraco.Core/Routing/IContentLastChanceFinder.cs +++ b/src/Umbraco.Core/Routing/IContentLastChanceFinder.cs @@ -1,4 +1,4 @@ -namespace Umbraco.Web.Routing +namespace Umbraco.Cms.Core.Routing { /// /// Provides a method to try to find and assign an Umbraco document to a PublishedRequest diff --git a/src/Umbraco.Core/Routing/IMediaUrlProvider.cs b/src/Umbraco.Core/Routing/IMediaUrlProvider.cs index 6da917fe25..918c7362f3 100644 --- a/src/Umbraco.Core/Routing/IMediaUrlProvider.cs +++ b/src/Umbraco.Core/Routing/IMediaUrlProvider.cs @@ -1,8 +1,7 @@ using System; -using Umbraco.Core.Models.PublishedContent; +using Umbraco.Cms.Core.Models.PublishedContent; - -namespace Umbraco.Web.Routing +namespace Umbraco.Cms.Core.Routing { /// /// Provides media URL. diff --git a/src/Umbraco.Core/Routing/IPublishedRequest.cs b/src/Umbraco.Core/Routing/IPublishedRequest.cs index 58523d12e4..17b836779e 100644 --- a/src/Umbraco.Core/Routing/IPublishedRequest.cs +++ b/src/Umbraco.Core/Routing/IPublishedRequest.cs @@ -1,10 +1,9 @@ using System; using System.Collections.Generic; -using System.Globalization; -using Umbraco.Core.Models; -using Umbraco.Core.Models.PublishedContent; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Core.Models.PublishedContent; -namespace Umbraco.Web.Routing +namespace Umbraco.Cms.Core.Routing { /// /// The result of Umbraco routing built with the diff --git a/src/Umbraco.Core/Routing/IPublishedRequestBuilder.cs b/src/Umbraco.Core/Routing/IPublishedRequestBuilder.cs index bd5b5625a3..3c6f614d60 100644 --- a/src/Umbraco.Core/Routing/IPublishedRequestBuilder.cs +++ b/src/Umbraco.Core/Routing/IPublishedRequestBuilder.cs @@ -2,10 +2,10 @@ using System; using System.Collections.Generic; using System.Globalization; using System.Net; -using Umbraco.Core.Models; -using Umbraco.Core.Models.PublishedContent; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Core.Models.PublishedContent; -namespace Umbraco.Web.Routing +namespace Umbraco.Cms.Core.Routing { /// /// Used by to route inbound requests to Umbraco content diff --git a/src/Umbraco.Core/Routing/IPublishedRouter.cs b/src/Umbraco.Core/Routing/IPublishedRouter.cs index b4c35c0e4d..39bc94cda1 100644 --- a/src/Umbraco.Core/Routing/IPublishedRouter.cs +++ b/src/Umbraco.Core/Routing/IPublishedRouter.cs @@ -1,7 +1,7 @@ using System; using System.Threading.Tasks; -namespace Umbraco.Web.Routing +namespace Umbraco.Cms.Core.Routing { /// /// Routes requests. diff --git a/src/Umbraco.Core/Routing/IPublishedUrlProvider.cs b/src/Umbraco.Core/Routing/IPublishedUrlProvider.cs index 45faf76772..9b54b71092 100644 --- a/src/Umbraco.Core/Routing/IPublishedUrlProvider.cs +++ b/src/Umbraco.Core/Routing/IPublishedUrlProvider.cs @@ -1,9 +1,8 @@ using System; using System.Collections.Generic; -using Umbraco.Core; -using Umbraco.Core.Models.PublishedContent; +using Umbraco.Cms.Core.Models.PublishedContent; -namespace Umbraco.Web.Routing +namespace Umbraco.Cms.Core.Routing { public interface IPublishedUrlProvider { diff --git a/src/Umbraco.Core/Routing/ISiteDomainHelper.cs b/src/Umbraco.Core/Routing/ISiteDomainHelper.cs index a56e414d9b..86a8e584b3 100644 --- a/src/Umbraco.Core/Routing/ISiteDomainHelper.cs +++ b/src/Umbraco.Core/Routing/ISiteDomainHelper.cs @@ -1,7 +1,7 @@ using System; using System.Collections.Generic; -namespace Umbraco.Web.Routing +namespace Umbraco.Cms.Core.Routing { /// /// Provides utilities to handle site domains. diff --git a/src/Umbraco.Core/Routing/IUrlProvider.cs b/src/Umbraco.Core/Routing/IUrlProvider.cs index 8fa96c7a2d..257e471c05 100644 --- a/src/Umbraco.Core/Routing/IUrlProvider.cs +++ b/src/Umbraco.Core/Routing/IUrlProvider.cs @@ -1,8 +1,8 @@ using System; using System.Collections.Generic; -using Umbraco.Core.Models.PublishedContent; +using Umbraco.Cms.Core.Models.PublishedContent; -namespace Umbraco.Web.Routing +namespace Umbraco.Cms.Core.Routing { /// /// Provides URLs. diff --git a/src/Umbraco.Core/Routing/MediaUrlProviderCollection.cs b/src/Umbraco.Core/Routing/MediaUrlProviderCollection.cs index eef0cbd3bc..0ac0ae265e 100644 --- a/src/Umbraco.Core/Routing/MediaUrlProviderCollection.cs +++ b/src/Umbraco.Core/Routing/MediaUrlProviderCollection.cs @@ -1,7 +1,7 @@ using System.Collections.Generic; -using Umbraco.Core.Composing; +using Umbraco.Cms.Core.Composing; -namespace Umbraco.Web.Routing +namespace Umbraco.Cms.Core.Routing { public class MediaUrlProviderCollection : BuilderCollectionBase { diff --git a/src/Umbraco.Core/Routing/MediaUrlProviderCollectionBuilder.cs b/src/Umbraco.Core/Routing/MediaUrlProviderCollectionBuilder.cs index 7bfc56ed0d..d778540e31 100644 --- a/src/Umbraco.Core/Routing/MediaUrlProviderCollectionBuilder.cs +++ b/src/Umbraco.Core/Routing/MediaUrlProviderCollectionBuilder.cs @@ -1,6 +1,6 @@ -using Umbraco.Core.Composing; +using Umbraco.Cms.Core.Composing; -namespace Umbraco.Web.Routing +namespace Umbraco.Cms.Core.Routing { public class MediaUrlProviderCollectionBuilder : OrderedCollectionBuilderBase { diff --git a/src/Umbraco.Core/Routing/PublishedRequest.cs b/src/Umbraco.Core/Routing/PublishedRequest.cs index 7a3d44149d..5667cb93e0 100644 --- a/src/Umbraco.Core/Routing/PublishedRequest.cs +++ b/src/Umbraco.Core/Routing/PublishedRequest.cs @@ -1,9 +1,9 @@ using System; using System.Collections.Generic; -using Umbraco.Core.Models; -using Umbraco.Core.Models.PublishedContent; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Core.Models.PublishedContent; -namespace Umbraco.Web.Routing +namespace Umbraco.Cms.Core.Routing { public class PublishedRequest : IPublishedRequest diff --git a/src/Umbraco.Core/Routing/PublishedRequestBuilder.cs b/src/Umbraco.Core/Routing/PublishedRequestBuilder.cs index 606031564b..374412071c 100644 --- a/src/Umbraco.Core/Routing/PublishedRequestBuilder.cs +++ b/src/Umbraco.Core/Routing/PublishedRequestBuilder.cs @@ -1,14 +1,13 @@ using System; using System.Collections.Generic; -using System.Globalization; using System.Linq; using System.Net; -using Umbraco.Core; -using Umbraco.Core.Models; -using Umbraco.Core.Models.PublishedContent; -using Umbraco.Core.Services; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Core.Models.PublishedContent; +using Umbraco.Cms.Core.Services; +using Umbraco.Extensions; -namespace Umbraco.Web.Routing +namespace Umbraco.Cms.Core.Routing { public class PublishedRequestBuilder : IPublishedRequestBuilder { diff --git a/src/Umbraco.Core/Routing/PublishedRequestExtensions.cs b/src/Umbraco.Core/Routing/PublishedRequestExtensions.cs index 2a4e4323f0..399347acb0 100644 --- a/src/Umbraco.Core/Routing/PublishedRequestExtensions.cs +++ b/src/Umbraco.Core/Routing/PublishedRequestExtensions.cs @@ -1,6 +1,6 @@ using System.Net; -namespace Umbraco.Web.Routing +namespace Umbraco.Cms.Core.Routing { public static class PublishedRequestExtensions diff --git a/src/Umbraco.Core/Routing/PublishedRequestOld.cs b/src/Umbraco.Core/Routing/PublishedRequestOld.cs index c851d4ebb6..7ee5cc35f2 100644 --- a/src/Umbraco.Core/Routing/PublishedRequestOld.cs +++ b/src/Umbraco.Core/Routing/PublishedRequestOld.cs @@ -3,11 +3,12 @@ using System.Collections.Generic; using System.Globalization; using System.Threading; using Microsoft.Extensions.Options; -using Umbraco.Core.Configuration.Models; -using Umbraco.Core.Models; -using Umbraco.Core.Models.PublishedContent; +using Umbraco.Cms.Core.Configuration.Models; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Core.Models.PublishedContent; +using Umbraco.Cms.Core.Web; -namespace Umbraco.Web.Routing +namespace Umbraco.Cms.Core.Routing { // TODO: Kill this, but we need to port all of it's functionality public class PublishedRequestOld // : IPublishedRequest diff --git a/src/Umbraco.Core/Routing/PublishedRouter.cs b/src/Umbraco.Core/Routing/PublishedRouter.cs index 4e0cda4041..c138232ef5 100644 --- a/src/Umbraco.Core/Routing/PublishedRouter.cs +++ b/src/Umbraco.Core/Routing/PublishedRouter.cs @@ -2,21 +2,21 @@ using System; using System.Globalization; using System.IO; using System.Linq; -using System.Threading; using System.Threading.Tasks; using Microsoft.Extensions.Logging; using Microsoft.Extensions.Options; -using Umbraco.Core; -using Umbraco.Core.Configuration.Models; -using Umbraco.Core.Events; -using Umbraco.Core.Logging; -using Umbraco.Core.Models; -using Umbraco.Core.Models.PublishedContent; -using Umbraco.Core.Services; -using Umbraco.Web.PublishedCache; -using Umbraco.Web.Security; +using Umbraco.Cms.Core.Configuration.Models; +using Umbraco.Cms.Core.Events; +using Umbraco.Cms.Core.Logging; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Core.Models.PublishedContent; +using Umbraco.Cms.Core.PublishedCache; +using Umbraco.Cms.Core.Security; +using Umbraco.Cms.Core.Services; +using Umbraco.Cms.Core.Web; +using Umbraco.Extensions; -namespace Umbraco.Web.Routing +namespace Umbraco.Cms.Core.Routing { /// diff --git a/src/Umbraco.Core/Routing/RouteDirection.cs b/src/Umbraco.Core/Routing/RouteDirection.cs index 1d811b06e3..33dad7b081 100644 --- a/src/Umbraco.Core/Routing/RouteDirection.cs +++ b/src/Umbraco.Core/Routing/RouteDirection.cs @@ -1,4 +1,4 @@ -namespace Umbraco.Web.Routing +namespace Umbraco.Cms.Core.Routing { /// /// The direction of a route diff --git a/src/Umbraco.Core/Routing/RouteRequestOptions.cs b/src/Umbraco.Core/Routing/RouteRequestOptions.cs index 91a343e2f0..6f987f072f 100644 --- a/src/Umbraco.Core/Routing/RouteRequestOptions.cs +++ b/src/Umbraco.Core/Routing/RouteRequestOptions.cs @@ -1,6 +1,6 @@ using System; -namespace Umbraco.Web.Routing +namespace Umbraco.Cms.Core.Routing { /// /// Options for routing an Umbraco request diff --git a/src/Umbraco.Core/Routing/RoutingRequestNotification.cs b/src/Umbraco.Core/Routing/RoutingRequestNotification.cs index dbf1cbc15b..7104274e39 100644 --- a/src/Umbraco.Core/Routing/RoutingRequestNotification.cs +++ b/src/Umbraco.Core/Routing/RoutingRequestNotification.cs @@ -1,6 +1,6 @@ -using Umbraco.Core.Events; +using Umbraco.Cms.Core.Events; -namespace Umbraco.Web.Routing +namespace Umbraco.Cms.Core.Routing { /// /// Used for notifying when an Umbraco request is being built diff --git a/src/Umbraco.Core/Routing/SiteDomainHelper.cs b/src/Umbraco.Core/Routing/SiteDomainHelper.cs index bf43514f4a..5b475f72e8 100644 --- a/src/Umbraco.Core/Routing/SiteDomainHelper.cs +++ b/src/Umbraco.Core/Routing/SiteDomainHelper.cs @@ -1,11 +1,11 @@ using System; using System.Collections.Generic; using System.Linq; -using System.Threading; using System.Text.RegularExpressions; -using Umbraco.Core; +using System.Threading; +using Umbraco.Extensions; -namespace Umbraco.Web.Routing +namespace Umbraco.Cms.Core.Routing { /// /// Provides utilities to handle site domains. diff --git a/src/Umbraco.Core/Routing/UmbracoRequestPaths.cs b/src/Umbraco.Core/Routing/UmbracoRequestPaths.cs index 8e8541cb2c..084b9b47e3 100644 --- a/src/Umbraco.Core/Routing/UmbracoRequestPaths.cs +++ b/src/Umbraco.Core/Routing/UmbracoRequestPaths.cs @@ -3,11 +3,12 @@ using System.Collections.Generic; using System.IO; using System.Linq; using Microsoft.Extensions.Options; -using Umbraco.Core.Configuration; -using Umbraco.Core.Configuration.Models; -using Umbraco.Core.Hosting; +using Umbraco.Cms.Core.Configuration; +using Umbraco.Cms.Core.Configuration.Models; +using Umbraco.Cms.Core.Hosting; +using Umbraco.Extensions; -namespace Umbraco.Core.Routing +namespace Umbraco.Cms.Core.Routing { /// /// Utility for checking paths diff --git a/src/Umbraco.Core/Routing/UmbracoRouteResult.cs b/src/Umbraco.Core/Routing/UmbracoRouteResult.cs index 9f42f372ac..d41c7ad7c3 100644 --- a/src/Umbraco.Core/Routing/UmbracoRouteResult.cs +++ b/src/Umbraco.Core/Routing/UmbracoRouteResult.cs @@ -1,4 +1,4 @@ -namespace Umbraco.Web.Routing +namespace Umbraco.Cms.Core.Routing { public enum UmbracoRouteResult { diff --git a/src/Umbraco.Core/Routing/UriUtility.cs b/src/Umbraco.Core/Routing/UriUtility.cs index 43a36db101..4d349021c4 100644 --- a/src/Umbraco.Core/Routing/UriUtility.cs +++ b/src/Umbraco.Core/Routing/UriUtility.cs @@ -1,12 +1,10 @@ using System; using System.Text; -using Umbraco.Core; -using Umbraco.Core.Configuration; -using Umbraco.Core.Configuration.Models; -using Umbraco.Core.Configuration.UmbracoSettings; -using Umbraco.Core.Hosting; +using Umbraco.Cms.Core.Configuration.Models; +using Umbraco.Cms.Core.Hosting; +using Umbraco.Extensions; -namespace Umbraco.Web +namespace Umbraco.Cms.Core.Routing { public sealed class UriUtility { diff --git a/src/Umbraco.Core/Routing/UrlInfo.cs b/src/Umbraco.Core/Routing/UrlInfo.cs index 59145d19ec..9165d795cd 100644 --- a/src/Umbraco.Core/Routing/UrlInfo.cs +++ b/src/Umbraco.Core/Routing/UrlInfo.cs @@ -1,7 +1,7 @@ using System; using System.Runtime.Serialization; -namespace Umbraco.Web.Routing +namespace Umbraco.Cms.Core.Routing { /// /// Represents infos for a URL. @@ -51,7 +51,7 @@ namespace Umbraco.Web.Routing public string Text { get; } /// - /// Checks equality + /// Checks equality /// /// /// diff --git a/src/Umbraco.Core/Routing/UrlProvider.cs b/src/Umbraco.Core/Routing/UrlProvider.cs index 542d1a6ea3..c3f294fbdb 100644 --- a/src/Umbraco.Core/Routing/UrlProvider.cs +++ b/src/Umbraco.Core/Routing/UrlProvider.cs @@ -2,13 +2,13 @@ using System.Collections.Generic; using System.Linq; using Microsoft.Extensions.Options; -using Umbraco.Core; -using Umbraco.Core.Configuration.Models; -using Umbraco.Core.Models.PublishedContent; +using Umbraco.Cms.Core.Configuration.Models; +using Umbraco.Cms.Core.Models.PublishedContent; +using Umbraco.Cms.Core.Web; +using Umbraco.Extensions; -namespace Umbraco.Web.Routing +namespace Umbraco.Cms.Core.Routing { - /// /// Provides URLs. /// diff --git a/src/Umbraco.Core/Routing/UrlProviderCollection.cs b/src/Umbraco.Core/Routing/UrlProviderCollection.cs index 7e08c37f06..4a383f82bf 100644 --- a/src/Umbraco.Core/Routing/UrlProviderCollection.cs +++ b/src/Umbraco.Core/Routing/UrlProviderCollection.cs @@ -1,7 +1,7 @@ using System.Collections.Generic; -using Umbraco.Core.Composing; +using Umbraco.Cms.Core.Composing; -namespace Umbraco.Web.Routing +namespace Umbraco.Cms.Core.Routing { public class UrlProviderCollection : BuilderCollectionBase { diff --git a/src/Umbraco.Core/Routing/UrlProviderCollectionBuilder.cs b/src/Umbraco.Core/Routing/UrlProviderCollectionBuilder.cs index 06f2728f4c..ca6f703c8b 100644 --- a/src/Umbraco.Core/Routing/UrlProviderCollectionBuilder.cs +++ b/src/Umbraco.Core/Routing/UrlProviderCollectionBuilder.cs @@ -1,6 +1,6 @@ -using Umbraco.Core.Composing; +using Umbraco.Cms.Core.Composing; -namespace Umbraco.Web.Routing +namespace Umbraco.Cms.Core.Routing { public class UrlProviderCollectionBuilder : OrderedCollectionBuilderBase { diff --git a/src/Umbraco.Core/Routing/UrlProviderExtensions.cs b/src/Umbraco.Core/Routing/UrlProviderExtensions.cs index 698b9ab526..80f17e3c12 100644 --- a/src/Umbraco.Core/Routing/UrlProviderExtensions.cs +++ b/src/Umbraco.Core/Routing/UrlProviderExtensions.cs @@ -3,12 +3,14 @@ using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; using Microsoft.Extensions.Logging; -using Umbraco.Core; -using Umbraco.Core.Models; -using Umbraco.Core.Models.PublishedContent; -using Umbraco.Core.Services; +using Umbraco.Cms.Core; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Core.Models.PublishedContent; +using Umbraco.Cms.Core.Routing; +using Umbraco.Cms.Core.Services; +using Umbraco.Cms.Core.Web; -namespace Umbraco.Web.Routing +namespace Umbraco.Extensions { public static class UrlProviderExtensions { diff --git a/src/Umbraco.Core/Routing/WebPath.cs b/src/Umbraco.Core/Routing/WebPath.cs index 0c9ab52e44..503cbb27fd 100644 --- a/src/Umbraco.Core/Routing/WebPath.cs +++ b/src/Umbraco.Core/Routing/WebPath.cs @@ -1,7 +1,8 @@ using System; using System.Linq; +using Umbraco.Extensions; -namespace Umbraco.Core.Routing +namespace Umbraco.Cms.Core.Routing { public class WebPath { diff --git a/src/Umbraco.Core/Runtime/AppPluginsManifestWatcherNotificationHandler.cs b/src/Umbraco.Core/Runtime/AppPluginsManifestWatcherNotificationHandler.cs index 2b1fa3d0cc..0b46dc0afd 100644 --- a/src/Umbraco.Core/Runtime/AppPluginsManifestWatcherNotificationHandler.cs +++ b/src/Umbraco.Core/Runtime/AppPluginsManifestWatcherNotificationHandler.cs @@ -2,11 +2,11 @@ using System; using System.IO; using System.Threading; using System.Threading.Tasks; -using Umbraco.Core.Events; -using Umbraco.Core.Hosting; -using Umbraco.Core.Manifest; +using Umbraco.Cms.Core.Events; +using Umbraco.Cms.Core.Hosting; +using Umbraco.Cms.Core.Manifest; -namespace Umbraco.Core.Runtime +namespace Umbraco.Cms.Core.Runtime { /// /// Starts monitoring AppPlugins directory during debug runs, to restart site when a plugin manifest changes. diff --git a/src/Umbraco.Core/Runtime/EssentialDirectoryCreator.cs b/src/Umbraco.Core/Runtime/EssentialDirectoryCreator.cs index 535a466e25..c1ef8f98b4 100644 --- a/src/Umbraco.Core/Runtime/EssentialDirectoryCreator.cs +++ b/src/Umbraco.Core/Runtime/EssentialDirectoryCreator.cs @@ -1,10 +1,10 @@ using Microsoft.Extensions.Options; -using Umbraco.Core.Configuration.Models; -using Umbraco.Core.Events; -using Umbraco.Core.Hosting; -using Umbraco.Core.IO; +using Umbraco.Cms.Core.Configuration.Models; +using Umbraco.Cms.Core.Events; +using Umbraco.Cms.Core.Hosting; +using Umbraco.Cms.Core.IO; -namespace Umbraco.Core.Runtime +namespace Umbraco.Cms.Core.Runtime { public class EssentialDirectoryCreator : INotificationHandler { diff --git a/src/Umbraco.Core/Runtime/IMainDom.cs b/src/Umbraco.Core/Runtime/IMainDom.cs index fbf099bcf1..f08b9f3436 100644 --- a/src/Umbraco.Core/Runtime/IMainDom.cs +++ b/src/Umbraco.Core/Runtime/IMainDom.cs @@ -1,8 +1,7 @@ using System; -using Umbraco.Core.Hosting; +using Umbraco.Cms.Core.Hosting; - -namespace Umbraco.Core +namespace Umbraco.Cms.Core.Runtime { /// /// Represents the main AppDomain running for a given application. diff --git a/src/Umbraco.Core/Runtime/IMainDomLock.cs b/src/Umbraco.Core/Runtime/IMainDomLock.cs index 6a62f48194..b0b3394a01 100644 --- a/src/Umbraco.Core/Runtime/IMainDomLock.cs +++ b/src/Umbraco.Core/Runtime/IMainDomLock.cs @@ -1,7 +1,7 @@ using System; using System.Threading.Tasks; -namespace Umbraco.Core.Runtime +namespace Umbraco.Cms.Core.Runtime { /// /// An application-wide distributed lock diff --git a/src/Umbraco.Core/Runtime/IUmbracoBootPermissionChecker.cs b/src/Umbraco.Core/Runtime/IUmbracoBootPermissionChecker.cs index 4e48a8b030..48ea6a5a48 100644 --- a/src/Umbraco.Core/Runtime/IUmbracoBootPermissionChecker.cs +++ b/src/Umbraco.Core/Runtime/IUmbracoBootPermissionChecker.cs @@ -1,4 +1,4 @@ -namespace Umbraco.Core.Runtime +namespace Umbraco.Cms.Core.Runtime { public interface IUmbracoBootPermissionChecker { diff --git a/src/Umbraco.Core/Runtime/MainDom.cs b/src/Umbraco.Core/Runtime/MainDom.cs index 07044a9eb7..187a1f377c 100644 --- a/src/Umbraco.Core/Runtime/MainDom.cs +++ b/src/Umbraco.Core/Runtime/MainDom.cs @@ -3,11 +3,12 @@ using System.Collections.Generic; using System.Linq; using System.Security.Cryptography; using System.Threading; -using Microsoft.Extensions.Logging; -using Umbraco.Core.Hosting; using System.Threading.Tasks; +using Microsoft.Extensions.Logging; +using Umbraco.Cms.Core.Hosting; +using Umbraco.Extensions; -namespace Umbraco.Core.Runtime +namespace Umbraco.Cms.Core.Runtime { /// diff --git a/src/Umbraco.Core/Runtime/MainDomSemaphoreLock.cs b/src/Umbraco.Core/Runtime/MainDomSemaphoreLock.cs index 74dea6742c..212e3a88c6 100644 --- a/src/Umbraco.Core/Runtime/MainDomSemaphoreLock.cs +++ b/src/Umbraco.Core/Runtime/MainDomSemaphoreLock.cs @@ -2,9 +2,10 @@ using System; using System.Threading; using System.Threading.Tasks; using Microsoft.Extensions.Logging; -using Umbraco.Core.Hosting; +using Umbraco.Cms.Core.Hosting; +using Umbraco.Extensions; -namespace Umbraco.Core.Runtime +namespace Umbraco.Cms.Core.Runtime { /// /// Uses a system-wide Semaphore and EventWaitHandle to synchronize the current AppDomain diff --git a/src/Umbraco.Core/RuntimeLevel.cs b/src/Umbraco.Core/RuntimeLevel.cs index 2645e89226..f08a8b9d95 100644 --- a/src/Umbraco.Core/RuntimeLevel.cs +++ b/src/Umbraco.Core/RuntimeLevel.cs @@ -1,4 +1,4 @@ -namespace Umbraco.Core +namespace Umbraco.Cms.Core { /// /// Describes the levels in which the runtime can run. diff --git a/src/Umbraco.Core/RuntimeLevelReason.cs b/src/Umbraco.Core/RuntimeLevelReason.cs index 587334d033..863843a537 100644 --- a/src/Umbraco.Core/RuntimeLevelReason.cs +++ b/src/Umbraco.Core/RuntimeLevelReason.cs @@ -1,4 +1,4 @@ -namespace Umbraco.Core +namespace Umbraco.Cms.Core { /// /// Describes the reason for the runtime level. diff --git a/src/Umbraco.Core/SafeCallContext.cs b/src/Umbraco.Core/SafeCallContext.cs index aeaf4af17e..e15ee36e33 100644 --- a/src/Umbraco.Core/SafeCallContext.cs +++ b/src/Umbraco.Core/SafeCallContext.cs @@ -1,8 +1,8 @@ using System; -using System.Linq; using System.Collections.Generic; +using System.Linq; -namespace Umbraco.Core +namespace Umbraco.Cms.Core { /// /// Provides a way to stop the data flow of a logical call context (i.e. CallContext or AsyncLocal) from within diff --git a/src/Umbraco.Core/Scoping/CallContext.cs b/src/Umbraco.Core/Scoping/CallContext.cs index cc8bf7cc7e..d975d0e695 100644 --- a/src/Umbraco.Core/Scoping/CallContext.cs +++ b/src/Umbraco.Core/Scoping/CallContext.cs @@ -1,8 +1,7 @@ -using System; using System.Collections.Concurrent; using System.Threading; -namespace Umbraco.Core.Scoping +namespace Umbraco.Cms.Core.Scoping { /// /// Represents ambient data that is local to a given asynchronous control flow, such as an asynchronous method. @@ -20,7 +19,7 @@ namespace Umbraco.Core.Scoping /// The name with which to associate the new item in the call context. /// The object to store in the call context. public static void SetData(string name, T data) => _state.GetOrAdd(name, _ => new AsyncLocal()).Value = data; - + //Replace the SetData with the following when you need to debug AsyncLocal. The args.ThreadContextChanged can be usefull //public static void SetData(string name, T data) => _state.GetOrAdd(name, _ => new AsyncLocal(OnValueChanged)).Value = data; // public static void OnValueChanged(AsyncLocalValueChangedArgs args) @@ -28,7 +27,7 @@ namespace Umbraco.Core.Scoping // var typeName = typeof(T).ToString(); // Console.WriteLine($"OnValueChanged!, Type: {typeName} Prev: #{args.PreviousValue} Current: #{args.CurrentValue}"); // } - + /// /// Retrieves an object with the specified name from the . /// @@ -40,7 +39,7 @@ namespace Umbraco.Core.Scoping // NOTE: If you have used the old CallContext in the past you might be thinking you need to clean this up but that is not the case. // With CallContext you had to call FreeNamedDataSlot to prevent leaks but with AsyncLocal this is not the case, there is no way to clean this up. // The above dictionary is sort of a trick because sure, there is always going to be a string key that will exist in the collection but the values - // themselves are managed per ExecutionContext so they don't build up. + // themselves are managed per ExecutionContext so they don't build up. // There's an SO article relating to this here https://stackoverflow.com/questions/36511243/safety-of-asynclocal-in-asp-net-core } diff --git a/src/Umbraco.Core/Scoping/IInstanceIdentifiable.cs b/src/Umbraco.Core/Scoping/IInstanceIdentifiable.cs index e855e68df2..a8d9f92f4a 100644 --- a/src/Umbraco.Core/Scoping/IInstanceIdentifiable.cs +++ b/src/Umbraco.Core/Scoping/IInstanceIdentifiable.cs @@ -1,6 +1,6 @@ using System; -namespace Umbraco.Core.Scoping +namespace Umbraco.Cms.Core.Scoping { /// /// Exposes an instance unique identifier. diff --git a/src/Umbraco.Core/Scoping/IScopeContext.cs b/src/Umbraco.Core/Scoping/IScopeContext.cs index 719cc5f0ad..aef8757e9e 100644 --- a/src/Umbraco.Core/Scoping/IScopeContext.cs +++ b/src/Umbraco.Core/Scoping/IScopeContext.cs @@ -1,6 +1,6 @@ using System; -namespace Umbraco.Core.Scoping +namespace Umbraco.Cms.Core.Scoping { /// /// Represents a scope context. diff --git a/src/Umbraco.Core/Scoping/RepositoryCacheMode.cs b/src/Umbraco.Core/Scoping/RepositoryCacheMode.cs index aa4329773a..78c50b628f 100644 --- a/src/Umbraco.Core/Scoping/RepositoryCacheMode.cs +++ b/src/Umbraco.Core/Scoping/RepositoryCacheMode.cs @@ -1,4 +1,4 @@ -namespace Umbraco.Core.Scoping +namespace Umbraco.Cms.Core.Scoping { /// /// Specifies the cache mode of repositories. diff --git a/src/Umbraco.Core/Sections/ContentSection.cs b/src/Umbraco.Core/Sections/ContentSection.cs index a93c3040f8..828adea295 100644 --- a/src/Umbraco.Core/Sections/ContentSection.cs +++ b/src/Umbraco.Core/Sections/ContentSection.cs @@ -1,7 +1,4 @@ -using Umbraco.Core; -using Umbraco.Core.Models.Sections; - -namespace Umbraco.Web.Sections +namespace Umbraco.Cms.Core.Sections { /// /// Defines the back office content section diff --git a/src/Umbraco.Core/Sections/FormsSection.cs b/src/Umbraco.Core/Sections/FormsSection.cs index 98ca2d1eb5..e0fd1085ee 100644 --- a/src/Umbraco.Core/Sections/FormsSection.cs +++ b/src/Umbraco.Core/Sections/FormsSection.cs @@ -1,7 +1,4 @@ -using Umbraco.Core; -using Umbraco.Core.Models.Sections; - -namespace Umbraco.Web.Sections +namespace Umbraco.Cms.Core.Sections { /// /// Defines the back office media section diff --git a/src/Umbraco.Core/Sections/ISection.cs b/src/Umbraco.Core/Sections/ISection.cs index 7967a9d01a..bbd380f57e 100644 --- a/src/Umbraco.Core/Sections/ISection.cs +++ b/src/Umbraco.Core/Sections/ISection.cs @@ -1,4 +1,4 @@ -namespace Umbraco.Core.Models.Sections +namespace Umbraco.Cms.Core.Sections { /// /// Defines a back office section. diff --git a/src/Umbraco.Core/Sections/MediaSection.cs b/src/Umbraco.Core/Sections/MediaSection.cs index 3d6b16125a..8732556a28 100644 --- a/src/Umbraco.Core/Sections/MediaSection.cs +++ b/src/Umbraco.Core/Sections/MediaSection.cs @@ -1,7 +1,4 @@ -using Umbraco.Core; -using Umbraco.Core.Models.Sections; - -namespace Umbraco.Web.Sections +namespace Umbraco.Cms.Core.Sections { /// /// Defines the back office media section diff --git a/src/Umbraco.Core/Sections/MembersSection.cs b/src/Umbraco.Core/Sections/MembersSection.cs index 1f82d31131..1edbf12604 100644 --- a/src/Umbraco.Core/Sections/MembersSection.cs +++ b/src/Umbraco.Core/Sections/MembersSection.cs @@ -1,7 +1,4 @@ -using Umbraco.Core; -using Umbraco.Core.Models.Sections; - -namespace Umbraco.Web.Sections +namespace Umbraco.Cms.Core.Sections { /// /// Defines the back office members section diff --git a/src/Umbraco.Core/Sections/PackagesSection.cs b/src/Umbraco.Core/Sections/PackagesSection.cs index 265b440195..4852c11397 100644 --- a/src/Umbraco.Core/Sections/PackagesSection.cs +++ b/src/Umbraco.Core/Sections/PackagesSection.cs @@ -1,7 +1,4 @@ -using Umbraco.Core; -using Umbraco.Core.Models.Sections; - -namespace Umbraco.Web.Sections +namespace Umbraco.Cms.Core.Sections { /// /// Defines the back office packages section diff --git a/src/Umbraco.Core/Sections/SectionCollection.cs b/src/Umbraco.Core/Sections/SectionCollection.cs index 9b3a07eb64..a93b36a161 100644 --- a/src/Umbraco.Core/Sections/SectionCollection.cs +++ b/src/Umbraco.Core/Sections/SectionCollection.cs @@ -1,8 +1,7 @@ using System.Collections.Generic; -using Umbraco.Core.Composing; -using Umbraco.Core.Models.Sections; +using Umbraco.Cms.Core.Composing; -namespace Umbraco.Web.Sections +namespace Umbraco.Cms.Core.Sections { public class SectionCollection : BuilderCollectionBase { diff --git a/src/Umbraco.Core/Sections/SectionCollectionBuilder.cs b/src/Umbraco.Core/Sections/SectionCollectionBuilder.cs index 9bda065881..0c5b2d7ba9 100644 --- a/src/Umbraco.Core/Sections/SectionCollectionBuilder.cs +++ b/src/Umbraco.Core/Sections/SectionCollectionBuilder.cs @@ -2,11 +2,10 @@ using System.Collections.Generic; using System.Linq; using Microsoft.Extensions.DependencyInjection; -using Umbraco.Core.Composing; -using Umbraco.Core.Manifest; -using Umbraco.Core.Models.Sections; +using Umbraco.Cms.Core.Composing; +using Umbraco.Cms.Core.Manifest; -namespace Umbraco.Web.Sections +namespace Umbraco.Cms.Core.Sections { public class SectionCollectionBuilder : OrderedCollectionBuilderBase { diff --git a/src/Umbraco.Core/Sections/SettingsSection.cs b/src/Umbraco.Core/Sections/SettingsSection.cs index 4185cd123a..bc0a43cae1 100644 --- a/src/Umbraco.Core/Sections/SettingsSection.cs +++ b/src/Umbraco.Core/Sections/SettingsSection.cs @@ -1,7 +1,4 @@ -using Umbraco.Core; -using Umbraco.Core.Models.Sections; - -namespace Umbraco.Web.Sections +namespace Umbraco.Cms.Core.Sections { /// /// Defines the back office settings section diff --git a/src/Umbraco.Core/Sections/TranslationSection.cs b/src/Umbraco.Core/Sections/TranslationSection.cs index b23dbde93b..d739757e93 100644 --- a/src/Umbraco.Core/Sections/TranslationSection.cs +++ b/src/Umbraco.Core/Sections/TranslationSection.cs @@ -1,7 +1,4 @@ -using Umbraco.Core; -using Umbraco.Core.Models.Sections; - -namespace Umbraco.Web.Sections +namespace Umbraco.Cms.Core.Sections { /// /// Defines the back office translation section diff --git a/src/Umbraco.Core/Sections/UsersSection.cs b/src/Umbraco.Core/Sections/UsersSection.cs index ac4255ac96..6969e9be3d 100644 --- a/src/Umbraco.Core/Sections/UsersSection.cs +++ b/src/Umbraco.Core/Sections/UsersSection.cs @@ -1,7 +1,4 @@ -using Umbraco.Core; -using Umbraco.Core.Models.Sections; - -namespace Umbraco.Web.Sections +namespace Umbraco.Cms.Core.Sections { /// /// Defines the back office users section diff --git a/src/Umbraco.Core/Security/AuthenticationExtensions.cs b/src/Umbraco.Core/Security/AuthenticationExtensions.cs index 13eab4ff80..3068b1c41d 100644 --- a/src/Umbraco.Core/Security/AuthenticationExtensions.cs +++ b/src/Umbraco.Core/Security/AuthenticationExtensions.cs @@ -1,8 +1,12 @@ +// Copyright (c) Umbraco. +// See LICENSE for more details. + using System.Globalization; +using System.Security.Claims; using System.Security.Principal; using System.Threading; -namespace Umbraco.Core.Security +namespace Umbraco.Extensions { public static class AuthenticationExtensions { @@ -20,9 +24,9 @@ namespace Umbraco.Core.Security public static CultureInfo GetCulture(this IIdentity identity) { - if (identity is UmbracoBackOfficeIdentity umbIdentity && umbIdentity.IsAuthenticated) + if (identity is ClaimsIdentity umbIdentity && umbIdentity.VerifyBackOfficeIdentity(out _) && umbIdentity.IsAuthenticated) { - return CultureInfo.GetCultureInfo(umbIdentity.Culture); + return CultureInfo.GetCultureInfo(umbIdentity.GetCultureString()); } return null; diff --git a/src/Umbraco.Core/Security/BackOfficeExternalLoginProviderErrors.cs b/src/Umbraco.Core/Security/BackOfficeExternalLoginProviderErrors.cs index d7a2fed46a..f0ce1f3f5d 100644 --- a/src/Umbraco.Core/Security/BackOfficeExternalLoginProviderErrors.cs +++ b/src/Umbraco.Core/Security/BackOfficeExternalLoginProviderErrors.cs @@ -1,7 +1,7 @@ using System.Collections.Generic; using System.Linq; -namespace Umbraco.Core.Security +namespace Umbraco.Cms.Core.Security { public class BackOfficeExternalLoginProviderErrors { diff --git a/src/Umbraco.Core/Security/BackOfficeUserPasswordCheckerResult.cs b/src/Umbraco.Core/Security/BackOfficeUserPasswordCheckerResult.cs index c640c85d0c..a59c1fb435 100644 --- a/src/Umbraco.Core/Security/BackOfficeUserPasswordCheckerResult.cs +++ b/src/Umbraco.Core/Security/BackOfficeUserPasswordCheckerResult.cs @@ -1,4 +1,4 @@ -namespace Umbraco.Core.Security +namespace Umbraco.Cms.Core.Security { /// /// The result returned from the IBackOfficeUserPasswordChecker diff --git a/src/Umbraco.Core/Security/ClaimsPrincipalExtensions.cs b/src/Umbraco.Core/Security/ClaimsPrincipalExtensions.cs index 395465cfb7..ce0e0eb774 100644 --- a/src/Umbraco.Core/Security/ClaimsPrincipalExtensions.cs +++ b/src/Umbraco.Core/Security/ClaimsPrincipalExtensions.cs @@ -1,39 +1,34 @@ +// Copyright (c) Umbraco. +// See LICENSE for more details. + using System; using System.Globalization; using System.Linq; using System.Security.Claims; using System.Security.Principal; -using Umbraco.Core; -using Umbraco.Core.Security; +using Umbraco.Cms.Core; +using Umbraco.Cms.Core.Security; namespace Umbraco.Extensions { public static class ClaimsPrincipalExtensions { /// - /// This will return the current back office identity if the IPrincipal is the correct type + /// This will return the current back office identity if the IPrincipal is the correct type and authenticated. /// /// /// - public static UmbracoBackOfficeIdentity GetUmbracoIdentity(this IPrincipal user) + public static ClaimsIdentity GetUmbracoIdentity(this IPrincipal user) { - // TODO: It would be nice to get rid of this and only rely on Claims, not a strongly typed identity instance - - //If it's already a UmbracoBackOfficeIdentity - if (user.Identity is UmbracoBackOfficeIdentity backOfficeIdentity) return backOfficeIdentity; - - //Check if there's more than one identity assigned and see if it's a UmbracoBackOfficeIdentity and use that - if (user is ClaimsPrincipal claimsPrincipal) - { - backOfficeIdentity = claimsPrincipal.Identities.OfType().FirstOrDefault(); - if (backOfficeIdentity != null) return backOfficeIdentity; - } - - //Otherwise convert to a UmbracoBackOfficeIdentity if it's auth'd + // Check if the identity is a ClaimsIdentity, and that's it's authenticated and has all required claims. if (user.Identity is ClaimsIdentity claimsIdentity && claimsIdentity.IsAuthenticated - && UmbracoBackOfficeIdentity.FromClaimsIdentity(claimsIdentity, out var umbracoIdentity)) + && claimsIdentity.VerifyBackOfficeIdentity(out ClaimsIdentity umbracoIdentity)) { + if (claimsIdentity.AuthenticationType == Constants.Security.BackOfficeAuthenticationType) + { + return claimsIdentity; + } return umbracoIdentity; } diff --git a/src/Umbraco.Core/Security/ContentPermissions.cs b/src/Umbraco.Core/Security/ContentPermissions.cs index 25ecc546c0..d137b3628e 100644 --- a/src/Umbraco.Core/Security/ContentPermissions.cs +++ b/src/Umbraco.Core/Security/ContentPermissions.cs @@ -2,12 +2,12 @@ using System.Collections.Generic; using System.Globalization; using System.Linq; -using Umbraco.Core.Models; -using Umbraco.Core.Models.Entities; -using Umbraco.Core.Models.Membership; -using Umbraco.Core.Services; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Core.Models.Entities; +using Umbraco.Cms.Core.Models.Membership; +using Umbraco.Cms.Core.Services; -namespace Umbraco.Core.Security +namespace Umbraco.Cms.Core.Security { /// @@ -155,7 +155,7 @@ namespace Umbraco.Core.Security /// public ContentAccess CheckPermissions( int nodeId, - IUser user, + IUser user, out IContent contentItem, IReadOnlyList permissionsToCheck = null) { diff --git a/src/Umbraco.Core/Security/HybridBackofficeSecurityAccessor.cs b/src/Umbraco.Core/Security/HybridBackofficeSecurityAccessor.cs index eb4be355f4..990715ce39 100644 --- a/src/Umbraco.Core/Security/HybridBackofficeSecurityAccessor.cs +++ b/src/Umbraco.Core/Security/HybridBackofficeSecurityAccessor.cs @@ -1,7 +1,6 @@ -using Umbraco.Core.Cache; -using Umbraco.Web; +using Umbraco.Cms.Core.Cache; -namespace Umbraco.Core.Security +namespace Umbraco.Cms.Core.Security { public class HybridBackofficeSecurityAccessor : HybridAccessorBase, IBackOfficeSecurityAccessor { diff --git a/src/Umbraco.Core/Security/HybridUmbracoWebsiteSecurityAccessor.cs b/src/Umbraco.Core/Security/HybridUmbracoWebsiteSecurityAccessor.cs index 09a7ab5d1b..cb986588d3 100644 --- a/src/Umbraco.Core/Security/HybridUmbracoWebsiteSecurityAccessor.cs +++ b/src/Umbraco.Core/Security/HybridUmbracoWebsiteSecurityAccessor.cs @@ -1,7 +1,6 @@ -using Umbraco.Core.Cache; -using Umbraco.Web; +using Umbraco.Cms.Core.Cache; -namespace Umbraco.Core.Security +namespace Umbraco.Cms.Core.Security { public class HybridUmbracoWebsiteSecurityAccessor : HybridAccessorBase, IUmbracoWebsiteSecurityAccessor diff --git a/src/Umbraco.Core/Security/IBackofficeSecurity.cs b/src/Umbraco.Core/Security/IBackofficeSecurity.cs index 8d0e0df6d8..b4eabd6744 100644 --- a/src/Umbraco.Core/Security/IBackofficeSecurity.cs +++ b/src/Umbraco.Core/Security/IBackofficeSecurity.cs @@ -1,8 +1,6 @@ -using System; -using Umbraco.Core; -using Umbraco.Core.Models.Membership; +using Umbraco.Cms.Core.Models.Membership; -namespace Umbraco.Core.Security +namespace Umbraco.Cms.Core.Security { public interface IBackOfficeSecurity { diff --git a/src/Umbraco.Core/Security/IBackofficeSecurityAccessor.cs b/src/Umbraco.Core/Security/IBackofficeSecurityAccessor.cs index 1695ecf46e..dbc64f40c7 100644 --- a/src/Umbraco.Core/Security/IBackofficeSecurityAccessor.cs +++ b/src/Umbraco.Core/Security/IBackofficeSecurityAccessor.cs @@ -1,4 +1,4 @@ -namespace Umbraco.Core.Security +namespace Umbraco.Cms.Core.Security { public interface IBackOfficeSecurityAccessor { diff --git a/src/Umbraco.Core/Security/IMemberUserKeyProvider.cs b/src/Umbraco.Core/Security/IMemberUserKeyProvider.cs index 439e7a82b8..9808ecc9b6 100644 --- a/src/Umbraco.Core/Security/IMemberUserKeyProvider.cs +++ b/src/Umbraco.Core/Security/IMemberUserKeyProvider.cs @@ -1,4 +1,4 @@ -namespace Umbraco.Core.Security +namespace Umbraco.Cms.Core.Security { public interface IMemberUserKeyProvider { diff --git a/src/Umbraco.Core/Security/IPasswordHasher.cs b/src/Umbraco.Core/Security/IPasswordHasher.cs index 2195570605..c0d436048e 100644 --- a/src/Umbraco.Core/Security/IPasswordHasher.cs +++ b/src/Umbraco.Core/Security/IPasswordHasher.cs @@ -1,4 +1,4 @@ -namespace Umbraco.Core.Security +namespace Umbraco.Cms.Core.Security { public interface IPasswordHasher { diff --git a/src/Umbraco.Core/Security/IPublicAccessChecker.cs b/src/Umbraco.Core/Security/IPublicAccessChecker.cs index a47186394e..4eaa184f5a 100644 --- a/src/Umbraco.Core/Security/IPublicAccessChecker.cs +++ b/src/Umbraco.Core/Security/IPublicAccessChecker.cs @@ -1,4 +1,4 @@ -namespace Umbraco.Web.Security +namespace Umbraco.Cms.Core.Security { public interface IPublicAccessChecker { diff --git a/src/Umbraco.Core/Security/IUmbracoWebsiteSecurity.cs b/src/Umbraco.Core/Security/IUmbracoWebsiteSecurity.cs index 00124c4dce..86dbb9683e 100644 --- a/src/Umbraco.Core/Security/IUmbracoWebsiteSecurity.cs +++ b/src/Umbraco.Core/Security/IUmbracoWebsiteSecurity.cs @@ -1,8 +1,8 @@ using System.Collections.Generic; using System.Threading.Tasks; -using Umbraco.Core.Models.Security; +using Umbraco.Cms.Core.Models.Security; -namespace Umbraco.Core.Security +namespace Umbraco.Cms.Core.Security { public interface IUmbracoWebsiteSecurity { diff --git a/src/Umbraco.Core/Security/IUmbracoWebsiteSecurityAccessor.cs b/src/Umbraco.Core/Security/IUmbracoWebsiteSecurityAccessor.cs index 618aeb7146..d05d84476c 100644 --- a/src/Umbraco.Core/Security/IUmbracoWebsiteSecurityAccessor.cs +++ b/src/Umbraco.Core/Security/IUmbracoWebsiteSecurityAccessor.cs @@ -1,4 +1,4 @@ -namespace Umbraco.Core.Security +namespace Umbraco.Cms.Core.Security { public interface IUmbracoWebsiteSecurityAccessor { diff --git a/src/Umbraco.Core/Security/IdentityAuditEventArgs.cs b/src/Umbraco.Core/Security/IdentityAuditEventArgs.cs index b9884c8e7d..225d46b268 100644 --- a/src/Umbraco.Core/Security/IdentityAuditEventArgs.cs +++ b/src/Umbraco.Core/Security/IdentityAuditEventArgs.cs @@ -1,7 +1,6 @@ using System; - -namespace Umbraco.Core.Security +namespace Umbraco.Cms.Core.Security { /// diff --git a/src/Umbraco.Core/Security/LegacyPasswordSecurity.cs b/src/Umbraco.Core/Security/LegacyPasswordSecurity.cs index d72ecda56c..bf56c3161d 100644 --- a/src/Umbraco.Core/Security/LegacyPasswordSecurity.cs +++ b/src/Umbraco.Core/Security/LegacyPasswordSecurity.cs @@ -2,9 +2,9 @@ using System.ComponentModel; using System.Security.Cryptography; using System.Text; -using Umbraco.Core.Configuration; +using Umbraco.Extensions; -namespace Umbraco.Core.Security +namespace Umbraco.Cms.Core.Security { /// @@ -86,7 +86,7 @@ namespace Umbraco.Core.Security salt = string.Empty; return storedString; } - + var saltLen = GenerateSalt(); salt = storedString.Substring(0, saltLen.Length); diff --git a/src/Umbraco.Core/Security/MediaPermissions.cs b/src/Umbraco.Core/Security/MediaPermissions.cs index 65da95ec02..e74144133d 100644 --- a/src/Umbraco.Core/Security/MediaPermissions.cs +++ b/src/Umbraco.Core/Security/MediaPermissions.cs @@ -1,10 +1,9 @@ using System; -using System.Collections.Generic; -using Umbraco.Core.Models; -using Umbraco.Core.Models.Membership; -using Umbraco.Core.Services; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Core.Models.Membership; +using Umbraco.Cms.Core.Services; -namespace Umbraco.Core.Security +namespace Umbraco.Cms.Core.Security { /// /// Checks user access to media @@ -62,7 +61,7 @@ namespace Umbraco.Core.Security } public MediaAccess CheckPermissions(IMedia media, IUser user) - { + { if (user == null) throw new ArgumentNullException(nameof(user)); if (media == null) return MediaAccess.NotFound; diff --git a/src/Umbraco.Core/Security/PasswordGenerator.cs b/src/Umbraco.Core/Security/PasswordGenerator.cs index d8e18a8146..1347d77ab7 100644 --- a/src/Umbraco.Core/Security/PasswordGenerator.cs +++ b/src/Umbraco.Core/Security/PasswordGenerator.cs @@ -1,9 +1,10 @@ using System; using System.Linq; using System.Security.Cryptography; -using Umbraco.Core.Configuration; +using Umbraco.Cms.Core.Configuration; +using Umbraco.Extensions; -namespace Umbraco.Core.Security +namespace Umbraco.Cms.Core.Security { /// /// Generates a password @@ -119,13 +120,13 @@ namespace Umbraco.Core.Security for (var i = 0; ;) { - // Look for the start of one of our patterns + // Look for the start of one of our patterns var n = s.IndexOfAny(StartingChars, i); // If not found, the string is safe if (n < 0) return false; - // If it's the last char, it's safe + // If it's the last char, it's safe if (n == s.Length - 1) return false; matchIndex = n; @@ -137,7 +138,7 @@ namespace Umbraco.Core.Security if (IsAtoZ(s[n + 1]) || s[n + 1] == '!' || s[n + 1] == '/' || s[n + 1] == '?') return true; break; case '&': - // If the & is followed by a #, it's unsafe (e.g. S) + // If the & is followed by a #, it's unsafe (e.g. S) if (s[n + 1] == '#') return true; break; } diff --git a/src/Umbraco.Core/Security/PublicAccessStatus.cs b/src/Umbraco.Core/Security/PublicAccessStatus.cs index 57df423749..b92c0ff57a 100644 --- a/src/Umbraco.Core/Security/PublicAccessStatus.cs +++ b/src/Umbraco.Core/Security/PublicAccessStatus.cs @@ -1,4 +1,4 @@ -namespace Umbraco.Web.Security +namespace Umbraco.Cms.Core.Security { public enum PublicAccessStatus { diff --git a/src/Umbraco.Core/Security/RegisterMemberStatus.cs b/src/Umbraco.Core/Security/RegisterMemberStatus.cs index 1cbeae38d1..757cfb3ba2 100644 --- a/src/Umbraco.Core/Security/RegisterMemberStatus.cs +++ b/src/Umbraco.Core/Security/RegisterMemberStatus.cs @@ -1,4 +1,4 @@ -namespace Umbraco.Core.Security +namespace Umbraco.Cms.Core.Security { public enum RegisterMemberStatus { diff --git a/src/Umbraco.Core/Security/UmbracoBackOfficeIdentity.cs b/src/Umbraco.Core/Security/UmbracoBackOfficeIdentity.cs deleted file mode 100644 index 6c9002f095..0000000000 --- a/src/Umbraco.Core/Security/UmbracoBackOfficeIdentity.cs +++ /dev/null @@ -1,231 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Security.Claims; - -namespace Umbraco.Core.Security -{ - /// - /// A custom user identity for the Umbraco backoffice - /// - [Serializable] - public class UmbracoBackOfficeIdentity : ClaimsIdentity - { - // TODO: Ideally we remove this class and only deal with ClaimsIdentity as a best practice. All things relevant to our own - // identity are part of claims. This class would essentially become extension methods on a ClaimsIdentity for resolving - // values from it. - public static bool FromClaimsIdentity(ClaimsIdentity identity, out UmbracoBackOfficeIdentity backOfficeIdentity) - { - // validate that all claims exist - foreach (var t in RequiredBackOfficeIdentityClaimTypes) - { - // if the identity doesn't have the claim, or the claim value is null - if (identity.HasClaim(x => x.Type == t) == false || identity.HasClaim(x => x.Type == t && x.Value.IsNullOrWhiteSpace())) - { - backOfficeIdentity = null; - return false; - } - } - - backOfficeIdentity = new UmbracoBackOfficeIdentity(identity); - return true; - } - - /// - /// Create a back office identity based on an existing claims identity - /// - /// - private UmbracoBackOfficeIdentity(ClaimsIdentity identity) - : base(identity.Claims, Constants.Security.BackOfficeAuthenticationType) - { - } - - /// - /// Creates a new UmbracoBackOfficeIdentity - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - public UmbracoBackOfficeIdentity(string userId, string username, string realName, - IEnumerable startContentNodes, IEnumerable startMediaNodes, string culture, - string securityStamp, IEnumerable allowedApps, IEnumerable roles) - : base(Enumerable.Empty(), Constants.Security.BackOfficeAuthenticationType) //this ctor is used to ensure the IsAuthenticated property is true - { - if (allowedApps == null) - throw new ArgumentNullException(nameof(allowedApps)); - if (string.IsNullOrWhiteSpace(username)) - throw new ArgumentException("Value cannot be null or whitespace.", nameof(username)); - if (string.IsNullOrWhiteSpace(realName)) - throw new ArgumentException("Value cannot be null or whitespace.", nameof(realName)); - if (string.IsNullOrWhiteSpace(culture)) - throw new ArgumentException("Value cannot be null or whitespace.", nameof(culture)); - if (string.IsNullOrWhiteSpace(securityStamp)) - throw new ArgumentException("Value cannot be null or whitespace.", nameof(securityStamp)); - AddRequiredClaims(userId, username, realName, startContentNodes, startMediaNodes, culture, securityStamp, allowedApps, roles); - } - - /// - /// Creates a new UmbracoBackOfficeIdentity - /// - /// - /// The original identity created by the ClaimsIdentityFactory - /// - /// - /// - /// - /// - /// - /// - /// - /// - /// - public UmbracoBackOfficeIdentity(ClaimsIdentity childIdentity, - string userId, string username, string realName, - IEnumerable startContentNodes, IEnumerable startMediaNodes, string culture, - string securityStamp, IEnumerable allowedApps, IEnumerable roles) - : base(childIdentity.Claims, Constants.Security.BackOfficeAuthenticationType) - { - if (string.IsNullOrWhiteSpace(username)) - throw new ArgumentException("Value cannot be null or whitespace.", nameof(username)); - if (string.IsNullOrWhiteSpace(realName)) - throw new ArgumentException("Value cannot be null or whitespace.", nameof(realName)); - if (string.IsNullOrWhiteSpace(culture)) - throw new ArgumentException("Value cannot be null or whitespace.", nameof(culture)); - if (string.IsNullOrWhiteSpace(securityStamp)) - throw new ArgumentException("Value cannot be null or whitespace.", nameof(securityStamp)); - - AddRequiredClaims(userId, username, realName, startContentNodes, startMediaNodes, culture, securityStamp, allowedApps, roles); - } - - public const string Issuer = Constants.Security.BackOfficeAuthenticationType; - - /// - /// Returns the required claim types for a back office identity - /// - /// - /// This does not include the role claim type or allowed apps type since that is a collection and in theory could be empty - /// - public static IEnumerable RequiredBackOfficeIdentityClaimTypes => new[] - { - ClaimTypes.NameIdentifier, //id - ClaimTypes.Name, //username - ClaimTypes.GivenName, - Constants.Security.StartContentNodeIdClaimType, - Constants.Security.StartMediaNodeIdClaimType, - ClaimTypes.Locality, - Constants.Security.SecurityStampClaimType - }; - - /// - /// Adds claims based on the ctor data - /// - private void AddRequiredClaims(string userId, string username, string realName, - IEnumerable startContentNodes, IEnumerable startMediaNodes, string culture, - string securityStamp, IEnumerable allowedApps, IEnumerable roles) - { - //This is the id that 'identity' uses to check for the user id - if (HasClaim(x => x.Type == ClaimTypes.NameIdentifier) == false) - AddClaim(new Claim(ClaimTypes.NameIdentifier, userId, ClaimValueTypes.String, Issuer, Issuer, this)); - - if (HasClaim(x => x.Type == ClaimTypes.Name) == false) - AddClaim(new Claim(ClaimTypes.Name, username, ClaimValueTypes.String, Issuer, Issuer, this)); - - if (HasClaim(x => x.Type == ClaimTypes.GivenName) == false) - AddClaim(new Claim(ClaimTypes.GivenName, realName, ClaimValueTypes.String, Issuer, Issuer, this)); - - if (HasClaim(x => x.Type == Constants.Security.StartContentNodeIdClaimType) == false && startContentNodes != null) - { - foreach (var startContentNode in startContentNodes) - { - AddClaim(new Claim(Constants.Security.StartContentNodeIdClaimType, startContentNode.ToInvariantString(), ClaimValueTypes.Integer32, Issuer, Issuer, this)); - } - } - - if (HasClaim(x => x.Type == Constants.Security.StartMediaNodeIdClaimType) == false && startMediaNodes != null) - { - foreach (var startMediaNode in startMediaNodes) - { - AddClaim(new Claim(Constants.Security.StartMediaNodeIdClaimType, startMediaNode.ToInvariantString(), ClaimValueTypes.Integer32, Issuer, Issuer, this)); - } - } - - if (HasClaim(x => x.Type == ClaimTypes.Locality) == false) - AddClaim(new Claim(ClaimTypes.Locality, culture, ClaimValueTypes.String, Issuer, Issuer, this)); - - //The security stamp claim is also required - if (HasClaim(x => x.Type == Constants.Security.SecurityStampClaimType) == false) - AddClaim(new Claim(Constants.Security.SecurityStampClaimType, securityStamp, ClaimValueTypes.String, Issuer, Issuer, this)); - - //Add each app as a separate claim - if (HasClaim(x => x.Type == Constants.Security.AllowedApplicationsClaimType) == false && allowedApps != null) - { - foreach (var application in allowedApps) - { - AddClaim(new Claim(Constants.Security.AllowedApplicationsClaimType, application, ClaimValueTypes.String, Issuer, Issuer, this)); - } - } - - //Claims are added by the ClaimsIdentityFactory because our UserStore supports roles, however this identity might - // not be made with that factory if it was created with a different ticket so perform the check - if (HasClaim(x => x.Type == DefaultRoleClaimType) == false && roles != null) - { - //manually add them - foreach (var roleName in roles) - { - AddClaim(new Claim(RoleClaimType, roleName, ClaimValueTypes.String, Issuer, Issuer, this)); - } - } - - } - - /// - /// - /// Gets the type of authenticated identity. - /// - /// - /// The type of authenticated identity. This property always returns "UmbracoBackOffice". - /// - public override string AuthenticationType => Issuer; - - private int[] _startContentNodes; - public int[] StartContentNodes => _startContentNodes ?? (_startContentNodes = FindAll(x => x.Type == Constants.Security.StartContentNodeIdClaimType).Select(app => int.TryParse(app.Value, out var i) ? i : default).Where(x => x != default).ToArray()); - - private int[] _startMediaNodes; - public int[] StartMediaNodes => _startMediaNodes ?? (_startMediaNodes = FindAll(x => x.Type == Constants.Security.StartMediaNodeIdClaimType).Select(app => int.TryParse(app.Value, out var i) ? i : default).Where(x => x != default).ToArray()); - - private string[] _allowedApplications; - public string[] AllowedApplications => _allowedApplications ?? (_allowedApplications = FindAll(x => x.Type == Constants.Security.AllowedApplicationsClaimType).Select(app => app.Value).ToArray()); - - public int Id => int.Parse(this.FindFirstValue(ClaimTypes.NameIdentifier)); - - public string RealName => this.FindFirstValue(ClaimTypes.GivenName); - - public string Username => this.FindFirstValue(ClaimTypes.Name); - - public string Culture => this.FindFirstValue(ClaimTypes.Locality); - - public string SecurityStamp => this.FindFirstValue(Constants.Security.SecurityStampClaimType); - - public string[] Roles => FindAll(x => x.Type == DefaultRoleClaimType).Select(role => role.Value).ToArray(); - - /// - /// Overridden to remove any temporary claims that shouldn't be copied - /// - /// - public override ClaimsIdentity Clone() - { - var clone = base.Clone(); - - foreach (var claim in clone.FindAll(x => x.Type == Constants.Security.TicketExpiresClaimType).ToList()) - clone.RemoveClaim(claim); - - return clone; - } - } -} diff --git a/src/Umbraco.Core/Security/UpdateMemberProfileResult.cs b/src/Umbraco.Core/Security/UpdateMemberProfileResult.cs index 1d435378a6..90c14086b5 100644 --- a/src/Umbraco.Core/Security/UpdateMemberProfileResult.cs +++ b/src/Umbraco.Core/Security/UpdateMemberProfileResult.cs @@ -1,4 +1,4 @@ -namespace Umbraco.Core.Security +namespace Umbraco.Cms.Core.Security { public class UpdateMemberProfileResult { diff --git a/src/Umbraco.Core/Security/UpdateMemberProfileStatus.cs b/src/Umbraco.Core/Security/UpdateMemberProfileStatus.cs index 33dfe4d486..df805d3096 100644 --- a/src/Umbraco.Core/Security/UpdateMemberProfileStatus.cs +++ b/src/Umbraco.Core/Security/UpdateMemberProfileStatus.cs @@ -1,4 +1,4 @@ -namespace Umbraco.Core.Security +namespace Umbraco.Cms.Core.Security { public enum UpdateMemberProfileStatus { diff --git a/src/Umbraco.Core/Semver/Semver.cs b/src/Umbraco.Core/Semver/Semver.cs index 94dbb8b927..f1fd48806e 100644 --- a/src/Umbraco.Core/Semver/Semver.cs +++ b/src/Umbraco.Core/Semver/Semver.cs @@ -1,13 +1,13 @@ using System; +using System.Text.RegularExpressions; #if !NETSTANDARD using System.Globalization; using System.Runtime.Serialization; using System.Security.Permissions; #endif -using System.Text.RegularExpressions; /* -Copyright (c) 2013 Max Hauser +Copyright (c) 2013 Max Hauser Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -27,7 +27,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -namespace Semver +namespace Umbraco.Cms.Core.Semver { /// /// A semantic version implementation. @@ -92,7 +92,7 @@ namespace Semver /// /// Initializes a new instance of the class. /// - /// The that is used to initialize + /// The that is used to initialize /// the Major, Minor, Patch and Build properties. public SemVersion(Version version) { @@ -178,8 +178,8 @@ namespace Semver /// Parses the specified string to a semantic version. /// /// The version string. - /// When the method returns, contains a SemVersion instance equivalent - /// to the version string passed in, if the version string was valid, or null if the + /// When the method returns, contains a SemVersion instance equivalent + /// to the version string passed in, if the version string was valid, or null if the /// version string was not valid. /// If set to true minor and patch version are required, else they default to 0. /// False when a invalid version string is passed, otherwise true. @@ -225,7 +225,7 @@ namespace Semver } /// - /// Make a copy of the current instance with optional altered fields. + /// Make a copy of the current instance with optional altered fields. /// /// The major version. /// The minor version. @@ -301,15 +301,15 @@ namespace Semver } /// - /// Compares the current instance with another object of the same type and returns an integer that indicates - /// whether the current instance precedes, follows, or occurs in the same position in the sort order as the + /// Compares the current instance with another object of the same type and returns an integer that indicates + /// whether the current instance precedes, follows, or occurs in the same position in the sort order as the /// other object. /// /// An object to compare with this instance. /// - /// A value that indicates the relative order of the objects being compared. - /// The return value has these meanings: Value Meaning Less than zero - /// This instance precedes in the sort order. + /// A value that indicates the relative order of the objects being compared. + /// The return value has these meanings: Value Meaning Less than zero + /// This instance precedes in the sort order. /// Zero This instance occurs in the same position in the sort order as . i /// Greater than zero This instance follows in the sort order. /// @@ -319,15 +319,15 @@ namespace Semver } /// - /// Compares the current instance with another object of the same type and returns an integer that indicates - /// whether the current instance precedes, follows, or occurs in the same position in the sort order as the + /// Compares the current instance with another object of the same type and returns an integer that indicates + /// whether the current instance precedes, follows, or occurs in the same position in the sort order as the /// other object. /// /// An object to compare with this instance. /// - /// A value that indicates the relative order of the objects being compared. - /// The return value has these meanings: Value Meaning Less than zero - /// This instance precedes in the sort order. + /// A value that indicates the relative order of the objects being compared. + /// The return value has these meanings: Value Meaning Less than zero + /// This instance precedes in the sort order. /// Zero This instance occurs in the same position in the sort order as . i /// Greater than zero This instance follows in the sort order. /// @@ -359,8 +359,8 @@ namespace Semver /// /// The semantic version. /// - /// A value that indicates the relative order of the objects being compared. - /// The return value has these meanings: Value Meaning Less than zero + /// A value that indicates the relative order of the objects being compared. + /// The return value has these meanings: Value Meaning Less than zero /// This instance precedes in the version precedence. /// Zero This instance has the same precedence as . i /// Greater than zero This instance has creater precedence as . @@ -455,7 +455,7 @@ namespace Semver /// Returns a hash code for this instance. /// /// - /// A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. + /// A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. /// public override int GetHashCode() { @@ -490,7 +490,7 @@ namespace Semver } /// - /// The override of the equals operator. + /// The override of the equals operator. /// /// The left value. /// The right value. @@ -501,7 +501,7 @@ namespace Semver } /// - /// The override of the un-equal operator. + /// The override of the un-equal operator. /// /// The left value. /// The right value. @@ -512,7 +512,7 @@ namespace Semver } /// - /// The override of the greater operator. + /// The override of the greater operator. /// /// The left value. /// The right value. @@ -523,7 +523,7 @@ namespace Semver } /// - /// The override of the greater than or equal operator. + /// The override of the greater than or equal operator. /// /// The left value. /// The right value. @@ -534,7 +534,7 @@ namespace Semver } /// - /// The override of the less operator. + /// The override of the less operator. /// /// The left value. /// The right value. @@ -545,7 +545,7 @@ namespace Semver } /// - /// The override of the less than or equal operator. + /// The override of the less than or equal operator. /// /// The left value. /// The right value. diff --git a/src/Umbraco.Core/Serialization/IConfigurationEditorJsonSerializer.cs b/src/Umbraco.Core/Serialization/IConfigurationEditorJsonSerializer.cs index 7370225bce..dee2e4c5db 100644 --- a/src/Umbraco.Core/Serialization/IConfigurationEditorJsonSerializer.cs +++ b/src/Umbraco.Core/Serialization/IConfigurationEditorJsonSerializer.cs @@ -1,4 +1,4 @@ -namespace Umbraco.Core.Serialization +namespace Umbraco.Cms.Core.Serialization { public interface IConfigurationEditorJsonSerializer : IJsonSerializer { diff --git a/src/Umbraco.Core/Serialization/IJsonSerializer.cs b/src/Umbraco.Core/Serialization/IJsonSerializer.cs index c952394dcb..fe1abcc044 100644 --- a/src/Umbraco.Core/Serialization/IJsonSerializer.cs +++ b/src/Umbraco.Core/Serialization/IJsonSerializer.cs @@ -1,4 +1,4 @@ -namespace Umbraco.Core.Serialization +namespace Umbraco.Cms.Core.Serialization { public interface IJsonSerializer { diff --git a/src/Umbraco.Core/Services/Changes/ContentTypeChange.cs b/src/Umbraco.Core/Services/Changes/ContentTypeChange.cs index 366a609418..9e56de950c 100644 --- a/src/Umbraco.Core/Services/Changes/ContentTypeChange.cs +++ b/src/Umbraco.Core/Services/Changes/ContentTypeChange.cs @@ -1,8 +1,8 @@ using System.Collections.Generic; using System.Linq; -using Umbraco.Core.Models; +using Umbraco.Cms.Core.Models; -namespace Umbraco.Core.Services.Changes +namespace Umbraco.Cms.Core.Services.Changes { public class ContentTypeChange where TItem : class, IContentTypeComposition diff --git a/src/Umbraco.Core/Services/Changes/ContentTypeChangeExtensions.cs b/src/Umbraco.Core/Services/Changes/ContentTypeChangeExtensions.cs index d9ac97ebcd..a3d555c2b1 100644 --- a/src/Umbraco.Core/Services/Changes/ContentTypeChangeExtensions.cs +++ b/src/Umbraco.Core/Services/Changes/ContentTypeChangeExtensions.cs @@ -1,7 +1,11 @@ -using System.Collections.Generic; -using Umbraco.Core.Models; +// Copyright (c) Umbraco. +// See LICENSE for more details. -namespace Umbraco.Core.Services.Changes +using System.Collections.Generic; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Core.Services.Changes; + +namespace Umbraco.Extensions { public static class ContentTypeChangeExtensions { diff --git a/src/Umbraco.Core/Services/Changes/ContentTypeChangeTypes.cs b/src/Umbraco.Core/Services/Changes/ContentTypeChangeTypes.cs index bf7f87fd1a..cd4965dc2b 100644 --- a/src/Umbraco.Core/Services/Changes/ContentTypeChangeTypes.cs +++ b/src/Umbraco.Core/Services/Changes/ContentTypeChangeTypes.cs @@ -1,6 +1,6 @@ using System; -namespace Umbraco.Core.Services.Changes +namespace Umbraco.Cms.Core.Services.Changes { [Flags] public enum ContentTypeChangeTypes : byte @@ -25,6 +25,6 @@ namespace Umbraco.Core.Services.Changes /// /// Content type was removed /// - Remove = 8 + Remove = 8 } } diff --git a/src/Umbraco.Core/Services/Changes/DomainChangeTypes.cs b/src/Umbraco.Core/Services/Changes/DomainChangeTypes.cs index 9dd8a956b7..25bf48e55a 100644 --- a/src/Umbraco.Core/Services/Changes/DomainChangeTypes.cs +++ b/src/Umbraco.Core/Services/Changes/DomainChangeTypes.cs @@ -1,4 +1,4 @@ -namespace Umbraco.Core.Services.Changes +namespace Umbraco.Cms.Core.Services.Changes { public enum DomainChangeTypes : byte { diff --git a/src/Umbraco.Core/Services/Changes/TreeChange.cs b/src/Umbraco.Core/Services/Changes/TreeChange.cs index 605cde87a2..f306a796cc 100644 --- a/src/Umbraco.Core/Services/Changes/TreeChange.cs +++ b/src/Umbraco.Core/Services/Changes/TreeChange.cs @@ -1,7 +1,7 @@ using System.Collections.Generic; using System.Linq; -namespace Umbraco.Core.Services.Changes +namespace Umbraco.Cms.Core.Services.Changes { public class TreeChange { diff --git a/src/Umbraco.Core/Services/Changes/TreeChangeExtensions.cs b/src/Umbraco.Core/Services/Changes/TreeChangeExtensions.cs index 6971ebc91f..5de6ae9847 100644 --- a/src/Umbraco.Core/Services/Changes/TreeChangeExtensions.cs +++ b/src/Umbraco.Core/Services/Changes/TreeChangeExtensions.cs @@ -1,6 +1,10 @@ -using System.Collections.Generic; +// Copyright (c) Umbraco. +// See LICENSE for more details. -namespace Umbraco.Core.Services.Changes +using System.Collections.Generic; +using Umbraco.Cms.Core.Services.Changes; + +namespace Umbraco.Extensions { public static class TreeChangeExtensions { diff --git a/src/Umbraco.Core/Services/Changes/TreeChangeTypes.cs b/src/Umbraco.Core/Services/Changes/TreeChangeTypes.cs index e2457864ed..9ef231ac06 100644 --- a/src/Umbraco.Core/Services/Changes/TreeChangeTypes.cs +++ b/src/Umbraco.Core/Services/Changes/TreeChangeTypes.cs @@ -1,6 +1,6 @@ using System; -namespace Umbraco.Core.Services.Changes +namespace Umbraco.Cms.Core.Services.Changes { [Flags] public enum TreeChangeTypes : byte diff --git a/src/Umbraco.Core/Services/ContentServiceExtensions.cs b/src/Umbraco.Core/Services/ContentServiceExtensions.cs index 3e4fe272f9..f6b236439b 100644 --- a/src/Umbraco.Core/Services/ContentServiceExtensions.cs +++ b/src/Umbraco.Core/Services/ContentServiceExtensions.cs @@ -1,11 +1,16 @@ -using System; +// Copyright (c) Umbraco. +// See LICENSE for more details. + +using System; using System.Collections.Generic; using System.Linq; using System.Text.RegularExpressions; -using Umbraco.Core.Models; -using Umbraco.Core.Models.Membership; +using Umbraco.Cms.Core; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Core.Models.Membership; +using Umbraco.Cms.Core.Services; -namespace Umbraco.Core.Services +namespace Umbraco.Extensions { /// /// Content service extension methods diff --git a/src/Umbraco.Core/Services/ContentTypeServiceExtensions.cs b/src/Umbraco.Core/Services/ContentTypeServiceExtensions.cs index d03820b53e..bc5393a26e 100644 --- a/src/Umbraco.Core/Services/ContentTypeServiceExtensions.cs +++ b/src/Umbraco.Core/Services/ContentTypeServiceExtensions.cs @@ -1,9 +1,14 @@ -using System; +// Copyright (c) Umbraco. +// See LICENSE for more details. + +using System; using System.Collections.Generic; using System.Linq; -using Umbraco.Core.Models; +using Umbraco.Cms.Core; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Core.Services; -namespace Umbraco.Core.Services +namespace Umbraco.Extensions { public static class ContentTypeServiceExtensions { diff --git a/src/Umbraco.Core/Services/DashboardService.cs b/src/Umbraco.Core/Services/DashboardService.cs index a89cd244dc..3f806bcc43 100644 --- a/src/Umbraco.Core/Services/DashboardService.cs +++ b/src/Umbraco.Core/Services/DashboardService.cs @@ -1,14 +1,12 @@ using System; using System.Collections.Generic; using System.Linq; -using Umbraco.Core; -using Umbraco.Core.Dashboards; -using Umbraco.Core.Models.Membership; -using Umbraco.Core.Services; -using Umbraco.Web.Dashboards; -using Umbraco.Web.Models.ContentEditing; +using Umbraco.Cms.Core.Dashboards; +using Umbraco.Cms.Core.Models.ContentEditing; +using Umbraco.Cms.Core.Models.Membership; +using Umbraco.Extensions; -namespace Umbraco.Web.Services +namespace Umbraco.Cms.Core.Services { /// /// A utility class for determine dashboard security diff --git a/src/Umbraco.Core/Services/DateTypeServiceExtensions.cs b/src/Umbraco.Core/Services/DateTypeServiceExtensions.cs index 6c2a1f7799..312b939ec5 100644 --- a/src/Umbraco.Core/Services/DateTypeServiceExtensions.cs +++ b/src/Umbraco.Core/Services/DateTypeServiceExtensions.cs @@ -1,8 +1,8 @@ using System; -using Umbraco.Core.Models; -using Umbraco.Core.PropertyEditors; +using Umbraco.Cms.Core.PropertyEditors; +using Umbraco.Cms.Core.Services; -namespace Umbraco.Core.Services +namespace Umbraco.Extensions { public static class DateTypeServiceExtensions { diff --git a/src/Umbraco.Core/Services/IAuditService.cs b/src/Umbraco.Core/Services/IAuditService.cs index de4ec889cd..bae50f55c8 100644 --- a/src/Umbraco.Core/Services/IAuditService.cs +++ b/src/Umbraco.Core/Services/IAuditService.cs @@ -1,9 +1,9 @@ using System; using System.Collections.Generic; -using Umbraco.Core.Models; -using Umbraco.Core.Persistence.Querying; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Core.Persistence.Querying; -namespace Umbraco.Core.Services +namespace Umbraco.Cms.Core.Services { /// /// Represents a service for handling audit. @@ -11,7 +11,7 @@ namespace Umbraco.Core.Services public interface IAuditService : IService { void Add(AuditType type, int userId, int objectId, string entityType, string comment, string parameters = null); - + IEnumerable GetLogs(int objectId); IEnumerable GetUserLogs(int userId, AuditType type, DateTime? sinceDate = null); IEnumerable GetLogs(AuditType type, DateTime? sinceDate = null); @@ -81,6 +81,6 @@ namespace Umbraco.Core.Services /// /// Free-form details about the audited event. IAuditEntry Write(int performingUserId, string perfomingDetails, string performingIp, DateTime eventDateUtc, int affectedUserId, string affectedDetails, string eventType, string eventDetails); - + } } diff --git a/src/Umbraco.Core/Services/IConsentService.cs b/src/Umbraco.Core/Services/IConsentService.cs index c6478ddd2b..a8e7e6cd8b 100644 --- a/src/Umbraco.Core/Services/IConsentService.cs +++ b/src/Umbraco.Core/Services/IConsentService.cs @@ -1,7 +1,7 @@ using System.Collections.Generic; -using Umbraco.Core.Models; +using Umbraco.Cms.Core.Models; -namespace Umbraco.Core.Services +namespace Umbraco.Cms.Core.Services { /// /// A service for handling lawful data processing requirements diff --git a/src/Umbraco.Core/Services/IContentService.cs b/src/Umbraco.Core/Services/IContentService.cs index 61504b0a98..2e6aa32c01 100644 --- a/src/Umbraco.Core/Services/IContentService.cs +++ b/src/Umbraco.Core/Services/IContentService.cs @@ -1,10 +1,10 @@ using System; using System.Collections.Generic; -using Umbraco.Core.Models; -using Umbraco.Core.Models.Membership; -using Umbraco.Core.Persistence.Querying; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Core.Models.Membership; +using Umbraco.Cms.Core.Persistence.Querying; -namespace Umbraco.Core.Services +namespace Umbraco.Cms.Core.Services { /// /// Defines the ContentService, which is an easy access to operations involving diff --git a/src/Umbraco.Core/Services/IContentServiceBase.cs b/src/Umbraco.Core/Services/IContentServiceBase.cs index ca87382494..9ab7fc7acc 100644 --- a/src/Umbraco.Core/Services/IContentServiceBase.cs +++ b/src/Umbraco.Core/Services/IContentServiceBase.cs @@ -1,8 +1,8 @@ using System; using System.Collections.Generic; -using Umbraco.Core.Models; +using Umbraco.Cms.Core.Models; -namespace Umbraco.Core.Services +namespace Umbraco.Cms.Core.Services { public interface IContentServiceBase : IContentServiceBase where TItem: class, IContentBase diff --git a/src/Umbraco.Core/Services/IContentTypeBaseServiceProvider.cs b/src/Umbraco.Core/Services/IContentTypeBaseServiceProvider.cs index d0146ce043..3c45722052 100644 --- a/src/Umbraco.Core/Services/IContentTypeBaseServiceProvider.cs +++ b/src/Umbraco.Core/Services/IContentTypeBaseServiceProvider.cs @@ -1,6 +1,6 @@ -using Umbraco.Core.Models; +using Umbraco.Cms.Core.Models; -namespace Umbraco.Core.Services +namespace Umbraco.Cms.Core.Services { /// /// Provides the corresponding to an object. diff --git a/src/Umbraco.Core/Services/IContentTypeService.cs b/src/Umbraco.Core/Services/IContentTypeService.cs index 02e4bc6b18..4b34baa869 100644 --- a/src/Umbraco.Core/Services/IContentTypeService.cs +++ b/src/Umbraco.Core/Services/IContentTypeService.cs @@ -1,8 +1,8 @@ using System; using System.Collections.Generic; -using Umbraco.Core.Models; +using Umbraco.Cms.Core.Models; -namespace Umbraco.Core.Services +namespace Umbraco.Cms.Core.Services { /// /// Manages objects. diff --git a/src/Umbraco.Core/Services/IContentTypeServiceBase.cs b/src/Umbraco.Core/Services/IContentTypeServiceBase.cs index 3c91091f8c..01519bc1c3 100644 --- a/src/Umbraco.Core/Services/IContentTypeServiceBase.cs +++ b/src/Umbraco.Core/Services/IContentTypeServiceBase.cs @@ -1,8 +1,8 @@ using System; using System.Collections.Generic; -using Umbraco.Core.Models; +using Umbraco.Cms.Core.Models; -namespace Umbraco.Core.Services +namespace Umbraco.Cms.Core.Services { /// /// Provides a common base interface for . diff --git a/src/Umbraco.Core/Services/IDashboardService.cs b/src/Umbraco.Core/Services/IDashboardService.cs index 11ff2728cf..7aba03e106 100644 --- a/src/Umbraco.Core/Services/IDashboardService.cs +++ b/src/Umbraco.Core/Services/IDashboardService.cs @@ -1,9 +1,9 @@ using System.Collections.Generic; -using Umbraco.Core.Dashboards; -using Umbraco.Core.Models.Membership; -using Umbraco.Web.Models.ContentEditing; +using Umbraco.Cms.Core.Dashboards; +using Umbraco.Cms.Core.Models.ContentEditing; +using Umbraco.Cms.Core.Models.Membership; -namespace Umbraco.Web.Services +namespace Umbraco.Cms.Core.Services { public interface IDashboardService { diff --git a/src/Umbraco.Core/Services/IDataTypeService.cs b/src/Umbraco.Core/Services/IDataTypeService.cs index b78607462c..f8e91d07d8 100644 --- a/src/Umbraco.Core/Services/IDataTypeService.cs +++ b/src/Umbraco.Core/Services/IDataTypeService.cs @@ -1,8 +1,8 @@ using System; using System.Collections.Generic; -using Umbraco.Core.Models; +using Umbraco.Cms.Core.Models; -namespace Umbraco.Core.Services +namespace Umbraco.Cms.Core.Services { /// diff --git a/src/Umbraco.Core/Services/IDomainService.cs b/src/Umbraco.Core/Services/IDomainService.cs index 70c986bf07..bd96df4391 100644 --- a/src/Umbraco.Core/Services/IDomainService.cs +++ b/src/Umbraco.Core/Services/IDomainService.cs @@ -1,7 +1,7 @@ using System.Collections.Generic; -using Umbraco.Core.Models; +using Umbraco.Cms.Core.Models; -namespace Umbraco.Core.Services +namespace Umbraco.Cms.Core.Services { public interface IDomainService : IService { diff --git a/src/Umbraco.Core/Services/IEntityService.cs b/src/Umbraco.Core/Services/IEntityService.cs index 2b2fad277a..5992196c69 100644 --- a/src/Umbraco.Core/Services/IEntityService.cs +++ b/src/Umbraco.Core/Services/IEntityService.cs @@ -1,10 +1,10 @@ using System; using System.Collections.Generic; -using Umbraco.Core.Models; -using Umbraco.Core.Models.Entities; -using Umbraco.Core.Persistence.Querying; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Core.Models.Entities; +using Umbraco.Cms.Core.Persistence.Querying; -namespace Umbraco.Core.Services +namespace Umbraco.Cms.Core.Services { public interface IEntityService { diff --git a/src/Umbraco.Core/Services/IEntityXmlSerializer.cs b/src/Umbraco.Core/Services/IEntityXmlSerializer.cs index 6feb31115c..20de556395 100644 --- a/src/Umbraco.Core/Services/IEntityXmlSerializer.cs +++ b/src/Umbraco.Core/Services/IEntityXmlSerializer.cs @@ -1,8 +1,8 @@ using System.Collections.Generic; using System.Xml.Linq; -using Umbraco.Core.Models; +using Umbraco.Cms.Core.Models; -namespace Umbraco.Core.Services +namespace Umbraco.Cms.Core.Services { /// /// Serializes entities to XML diff --git a/src/Umbraco.Core/Services/IExternalLoginService.cs b/src/Umbraco.Core/Services/IExternalLoginService.cs index d0c2a74192..e19d30e293 100644 --- a/src/Umbraco.Core/Services/IExternalLoginService.cs +++ b/src/Umbraco.Core/Services/IExternalLoginService.cs @@ -1,8 +1,7 @@ -using System; using System.Collections.Generic; -using Umbraco.Core.Models.Identity; +using Umbraco.Cms.Core.Models.Identity; -namespace Umbraco.Core.Services +namespace Umbraco.Cms.Core.Services { /// /// Used to store the external login info, this can be replaced with your own implementation diff --git a/src/Umbraco.Core/Services/IFileService.cs b/src/Umbraco.Core/Services/IFileService.cs index 00e99e1c38..bcf2a0caee 100644 --- a/src/Umbraco.Core/Services/IFileService.cs +++ b/src/Umbraco.Core/Services/IFileService.cs @@ -1,9 +1,9 @@ using System; using System.Collections.Generic; using System.IO; -using Umbraco.Core.Models; +using Umbraco.Cms.Core.Models; -namespace Umbraco.Core.Services +namespace Umbraco.Cms.Core.Services { /// /// Defines the File Service, which is an easy access to operations involving objects like Scripts, Stylesheets and Templates diff --git a/src/Umbraco.Core/Services/IIconService.cs b/src/Umbraco.Core/Services/IIconService.cs index 963edb22a5..fafe5995f2 100644 --- a/src/Umbraco.Core/Services/IIconService.cs +++ b/src/Umbraco.Core/Services/IIconService.cs @@ -1,7 +1,7 @@ using System.Collections.Generic; -using Umbraco.Core.Models; +using Umbraco.Cms.Core.Models; -namespace Umbraco.Core.Services +namespace Umbraco.Cms.Core.Services { public interface IIconService { diff --git a/src/Umbraco.Core/Services/IIdKeyMap.cs b/src/Umbraco.Core/Services/IIdKeyMap.cs index 05d1b2283d..56be36c5fa 100644 --- a/src/Umbraco.Core/Services/IIdKeyMap.cs +++ b/src/Umbraco.Core/Services/IIdKeyMap.cs @@ -1,7 +1,7 @@ using System; -using Umbraco.Core.Models; +using Umbraco.Cms.Core.Models; -namespace Umbraco.Core.Services +namespace Umbraco.Cms.Core.Services { public interface IIdKeyMap { diff --git a/src/Umbraco.Core/Services/IInstallationService.cs b/src/Umbraco.Core/Services/IInstallationService.cs index 334088f8ae..5b1d28cccc 100644 --- a/src/Umbraco.Core/Services/IInstallationService.cs +++ b/src/Umbraco.Core/Services/IInstallationService.cs @@ -1,7 +1,6 @@ using System.Threading.Tasks; -using Umbraco.Core.Models; -namespace Umbraco.Core.Services +namespace Umbraco.Cms.Core.Services { public interface IInstallationService { diff --git a/src/Umbraco.Core/Services/IKeyValueService.cs b/src/Umbraco.Core/Services/IKeyValueService.cs index 192c99bee7..4c24ca19de 100644 --- a/src/Umbraco.Core/Services/IKeyValueService.cs +++ b/src/Umbraco.Core/Services/IKeyValueService.cs @@ -1,4 +1,4 @@ -namespace Umbraco.Core.Services +namespace Umbraco.Cms.Core.Services { /// /// Manages the simplified key/value store. diff --git a/src/Umbraco.Core/Services/ILocalizationService.cs b/src/Umbraco.Core/Services/ILocalizationService.cs index b8c4e21f2a..cd28e4f5b3 100644 --- a/src/Umbraco.Core/Services/ILocalizationService.cs +++ b/src/Umbraco.Core/Services/ILocalizationService.cs @@ -1,8 +1,8 @@ using System; using System.Collections.Generic; -using Umbraco.Core.Models; +using Umbraco.Cms.Core.Models; -namespace Umbraco.Core.Services +namespace Umbraco.Cms.Core.Services { /// /// Defines the Localization Service, which is an easy access to operations involving Languages and Dictionary diff --git a/src/Umbraco.Core/Services/ILocalizedTextService.cs b/src/Umbraco.Core/Services/ILocalizedTextService.cs index f167c64e0f..fd23dd6f78 100644 --- a/src/Umbraco.Core/Services/ILocalizedTextService.cs +++ b/src/Umbraco.Core/Services/ILocalizedTextService.cs @@ -1,8 +1,7 @@ -using System.Collections; -using System.Collections.Generic; +using System.Collections.Generic; using System.Globalization; -namespace Umbraco.Core.Services +namespace Umbraco.Cms.Core.Services { /// /// The entry point to localize any key in the text storage source for a given culture diff --git a/src/Umbraco.Core/Services/IMacroService.cs b/src/Umbraco.Core/Services/IMacroService.cs index 597c986f37..c4bc34997f 100644 --- a/src/Umbraco.Core/Services/IMacroService.cs +++ b/src/Umbraco.Core/Services/IMacroService.cs @@ -1,8 +1,8 @@ using System; using System.Collections.Generic; -using Umbraco.Core.Models; +using Umbraco.Cms.Core.Models; -namespace Umbraco.Core.Services +namespace Umbraco.Cms.Core.Services { /// /// Defines the MacroService, which is an easy access to operations involving diff --git a/src/Umbraco.Core/Services/IMediaService.cs b/src/Umbraco.Core/Services/IMediaService.cs index aa6363cc36..32862e1f87 100644 --- a/src/Umbraco.Core/Services/IMediaService.cs +++ b/src/Umbraco.Core/Services/IMediaService.cs @@ -1,10 +1,10 @@ using System; using System.Collections.Generic; using System.IO; -using Umbraco.Core.Models; -using Umbraco.Core.Persistence.Querying; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Core.Persistence.Querying; -namespace Umbraco.Core.Services +namespace Umbraco.Cms.Core.Services { /// /// Defines the Media Service, which is an easy access to operations involving diff --git a/src/Umbraco.Core/Services/IMediaTypeService.cs b/src/Umbraco.Core/Services/IMediaTypeService.cs index 992937675f..e00d86613b 100644 --- a/src/Umbraco.Core/Services/IMediaTypeService.cs +++ b/src/Umbraco.Core/Services/IMediaTypeService.cs @@ -1,6 +1,6 @@ -using Umbraco.Core.Models; +using Umbraco.Cms.Core.Models; -namespace Umbraco.Core.Services +namespace Umbraco.Cms.Core.Services { /// /// Manages objects. diff --git a/src/Umbraco.Core/Services/IMemberGroupService.cs b/src/Umbraco.Core/Services/IMemberGroupService.cs index 9261dcfdf6..e584537ab1 100644 --- a/src/Umbraco.Core/Services/IMemberGroupService.cs +++ b/src/Umbraco.Core/Services/IMemberGroupService.cs @@ -1,8 +1,8 @@ using System; using System.Collections.Generic; -using Umbraco.Core.Models; +using Umbraco.Cms.Core.Models; -namespace Umbraco.Core.Services +namespace Umbraco.Cms.Core.Services { public interface IMemberGroupService : IService { diff --git a/src/Umbraco.Core/Services/IMemberService.cs b/src/Umbraco.Core/Services/IMemberService.cs index 1ea3590964..3220cf9fd9 100644 --- a/src/Umbraco.Core/Services/IMemberService.cs +++ b/src/Umbraco.Core/Services/IMemberService.cs @@ -1,9 +1,9 @@ using System; using System.Collections.Generic; -using Umbraco.Core.Models; -using Umbraco.Core.Persistence.Querying; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Core.Persistence.Querying; -namespace Umbraco.Core.Services +namespace Umbraco.Cms.Core.Services { /// /// Defines the MemberService, which is an easy access to operations involving (umbraco) members. diff --git a/src/Umbraco.Core/Services/IMemberTypeService.cs b/src/Umbraco.Core/Services/IMemberTypeService.cs index 41004d267d..4a52438d5e 100644 --- a/src/Umbraco.Core/Services/IMemberTypeService.cs +++ b/src/Umbraco.Core/Services/IMemberTypeService.cs @@ -1,6 +1,6 @@ -using Umbraco.Core.Models; +using Umbraco.Cms.Core.Models; -namespace Umbraco.Core.Services +namespace Umbraco.Cms.Core.Services { /// /// Manages objects. diff --git a/src/Umbraco.Core/Services/IMembershipMemberService.cs b/src/Umbraco.Core/Services/IMembershipMemberService.cs index 839d8e3af3..c91eba5250 100644 --- a/src/Umbraco.Core/Services/IMembershipMemberService.cs +++ b/src/Umbraco.Core/Services/IMembershipMemberService.cs @@ -1,10 +1,10 @@ using System; using System.Collections.Generic; -using Umbraco.Core.Models; -using Umbraco.Core.Models.Membership; -using Umbraco.Core.Persistence.Querying; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Core.Models.Membership; +using Umbraco.Cms.Core.Persistence.Querying; -namespace Umbraco.Core.Services +namespace Umbraco.Cms.Core.Services { /// /// Defines part of the MemberService, which is specific to methods used by the membership provider. @@ -137,7 +137,7 @@ namespace Umbraco.Core.Services /// Optional parameter to raise events. /// Default is True otherwise set to False to not raise events void Save(IEnumerable entities, bool raiseEvents = true); - + /// /// Finds a list of objects by a partial email string /// diff --git a/src/Umbraco.Core/Services/IMembershipRoleService.cs b/src/Umbraco.Core/Services/IMembershipRoleService.cs index b44bc53dac..b9e5912c1b 100644 --- a/src/Umbraco.Core/Services/IMembershipRoleService.cs +++ b/src/Umbraco.Core/Services/IMembershipRoleService.cs @@ -1,9 +1,9 @@ using System.Collections.Generic; -using Umbraco.Core.Models; -using Umbraco.Core.Models.Membership; -using Umbraco.Core.Persistence.Querying; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Core.Models.Membership; +using Umbraco.Cms.Core.Persistence.Querying; -namespace Umbraco.Core.Services +namespace Umbraco.Cms.Core.Services { public interface IMembershipRoleService where T : class, IMembershipUser diff --git a/src/Umbraco.Core/Services/IMembershipUserService.cs b/src/Umbraco.Core/Services/IMembershipUserService.cs index 2a3fe31b08..a2aca2821e 100644 --- a/src/Umbraco.Core/Services/IMembershipUserService.cs +++ b/src/Umbraco.Core/Services/IMembershipUserService.cs @@ -1,7 +1,6 @@ -using System.Collections.Generic; -using Umbraco.Core.Models.Membership; +using Umbraco.Cms.Core.Models.Membership; -namespace Umbraco.Core.Services +namespace Umbraco.Cms.Core.Services { /// /// Defines part of the UserService, which is specific to methods used by the membership provider. diff --git a/src/Umbraco.Core/Services/INotificationService.cs b/src/Umbraco.Core/Services/INotificationService.cs index 6ef639594d..17ee45dcfa 100644 --- a/src/Umbraco.Core/Services/INotificationService.cs +++ b/src/Umbraco.Core/Services/INotificationService.cs @@ -1,10 +1,10 @@ using System; using System.Collections.Generic; -using Umbraco.Core.Models; -using Umbraco.Core.Models.Entities; -using Umbraco.Core.Models.Membership; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Core.Models.Entities; +using Umbraco.Cms.Core.Models.Membership; -namespace Umbraco.Core.Services +namespace Umbraco.Cms.Core.Services { public interface INotificationService : IService { diff --git a/src/Umbraco.Core/Services/IPackagingService.cs b/src/Umbraco.Core/Services/IPackagingService.cs index b38b5a426b..96785417d8 100644 --- a/src/Umbraco.Core/Services/IPackagingService.cs +++ b/src/Umbraco.Core/Services/IPackagingService.cs @@ -2,13 +2,11 @@ using System.Collections.Generic; using System.IO; using System.Threading.Tasks; -using System.Xml.Linq; -using Semver; -using Umbraco.Core.Models; -using Umbraco.Core.Models.Packaging; -using Umbraco.Core.Packaging; +using Umbraco.Cms.Core.Models.Packaging; +using Umbraco.Cms.Core.Packaging; +using Umbraco.Cms.Core.Semver; -namespace Umbraco.Core.Services +namespace Umbraco.Cms.Core.Services { public interface IPackagingService : IService { diff --git a/src/Umbraco.Core/Services/IPropertyValidationService.cs b/src/Umbraco.Core/Services/IPropertyValidationService.cs index 842f45df2b..0fc2a0b02d 100644 --- a/src/Umbraco.Core/Services/IPropertyValidationService.cs +++ b/src/Umbraco.Core/Services/IPropertyValidationService.cs @@ -1,9 +1,9 @@ using System.Collections.Generic; using System.ComponentModel.DataAnnotations; -using Umbraco.Core.Models; -using Umbraco.Core.PropertyEditors; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Core.PropertyEditors; -namespace Umbraco.Core.Services +namespace Umbraco.Cms.Core.Services { public interface IPropertyValidationService { diff --git a/src/Umbraco.Core/Services/IPublicAccessService.cs b/src/Umbraco.Core/Services/IPublicAccessService.cs index a3efb07028..c064493425 100644 --- a/src/Umbraco.Core/Services/IPublicAccessService.cs +++ b/src/Umbraco.Core/Services/IPublicAccessService.cs @@ -1,7 +1,7 @@ using System.Collections.Generic; -using Umbraco.Core.Models; +using Umbraco.Cms.Core.Models; -namespace Umbraco.Core.Services +namespace Umbraco.Cms.Core.Services { public interface IPublicAccessService : IService { diff --git a/src/Umbraco.Core/Services/IRedirectUrlService.cs b/src/Umbraco.Core/Services/IRedirectUrlService.cs index d54c9994e1..5042a25662 100644 --- a/src/Umbraco.Core/Services/IRedirectUrlService.cs +++ b/src/Umbraco.Core/Services/IRedirectUrlService.cs @@ -1,8 +1,8 @@ using System; using System.Collections.Generic; -using Umbraco.Core.Models; +using Umbraco.Cms.Core.Models; -namespace Umbraco.Core.Services +namespace Umbraco.Cms.Core.Services { /// /// diff --git a/src/Umbraco.Core/Services/IRelationService.cs b/src/Umbraco.Core/Services/IRelationService.cs index a3c0317685..ce00f774f8 100644 --- a/src/Umbraco.Core/Services/IRelationService.cs +++ b/src/Umbraco.Core/Services/IRelationService.cs @@ -1,9 +1,9 @@ using System; using System.Collections.Generic; -using Umbraco.Core.Models; -using Umbraco.Core.Models.Entities; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Core.Models.Entities; -namespace Umbraco.Core.Services +namespace Umbraco.Cms.Core.Services { public interface IRelationService : IService { @@ -351,7 +351,7 @@ namespace Umbraco.Core.Services /// to Delete Relations for void DeleteRelationsOfType(IRelationType relationType); - + } } diff --git a/src/Umbraco.Core/Services/IRuntime.cs b/src/Umbraco.Core/Services/IRuntime.cs index d1254c219f..b10c9fe90f 100644 --- a/src/Umbraco.Core/Services/IRuntime.cs +++ b/src/Umbraco.Core/Services/IRuntime.cs @@ -1,6 +1,6 @@ using Microsoft.Extensions.Hosting; -namespace Umbraco.Core +namespace Umbraco.Cms.Core.Services { /// /// Defines the Umbraco runtime. diff --git a/src/Umbraco.Core/Services/IRuntimeState.cs b/src/Umbraco.Core/Services/IRuntimeState.cs index 2e5f8630d4..e36c10290e 100644 --- a/src/Umbraco.Core/Services/IRuntimeState.cs +++ b/src/Umbraco.Core/Services/IRuntimeState.cs @@ -1,9 +1,8 @@ using System; -using Semver; -using Umbraco.Core.Exceptions; -using Umbraco.Core.Sync; +using Umbraco.Cms.Core.Exceptions; +using Umbraco.Cms.Core.Semver; -namespace Umbraco.Core +namespace Umbraco.Cms.Core.Services { /// /// Represents the state of the Umbraco runtime. diff --git a/src/Umbraco.Core/Services/ISectionService.cs b/src/Umbraco.Core/Services/ISectionService.cs index 94ff6cf511..94aa267dab 100644 --- a/src/Umbraco.Core/Services/ISectionService.cs +++ b/src/Umbraco.Core/Services/ISectionService.cs @@ -1,7 +1,7 @@ using System.Collections.Generic; -using Umbraco.Core.Models.Sections; +using Umbraco.Cms.Core.Sections; -namespace Umbraco.Web.Services +namespace Umbraco.Cms.Core.Services { public interface ISectionService { diff --git a/src/Umbraco.Core/Services/IServerRegistrationService.cs b/src/Umbraco.Core/Services/IServerRegistrationService.cs index f0246dd287..d5cfd9f7a7 100644 --- a/src/Umbraco.Core/Services/IServerRegistrationService.cs +++ b/src/Umbraco.Core/Services/IServerRegistrationService.cs @@ -1,9 +1,9 @@ using System; using System.Collections.Generic; -using Umbraco.Core.Models; -using Umbraco.Core.Sync; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Core.Sync; -namespace Umbraco.Core.Services +namespace Umbraco.Cms.Core.Services { public interface IServerRegistrationService { diff --git a/src/Umbraco.Core/Services/IService.cs b/src/Umbraco.Core/Services/IService.cs index c38949dbb3..6ca00a8dbe 100644 --- a/src/Umbraco.Core/Services/IService.cs +++ b/src/Umbraco.Core/Services/IService.cs @@ -1,6 +1,4 @@ -using Umbraco.Core.Logging; - -namespace Umbraco.Core.Services +namespace Umbraco.Cms.Core.Services { /// /// Marker interface for services, which is used to store difference services in a list or dictionary diff --git a/src/Umbraco.Core/Services/ITagService.cs b/src/Umbraco.Core/Services/ITagService.cs index 6be18624cb..7a75b99c24 100644 --- a/src/Umbraco.Core/Services/ITagService.cs +++ b/src/Umbraco.Core/Services/ITagService.cs @@ -1,8 +1,8 @@ using System; using System.Collections.Generic; -using Umbraco.Core.Models; +using Umbraco.Cms.Core.Models; -namespace Umbraco.Core.Services +namespace Umbraco.Cms.Core.Services { /// /// Tag service to query for tags in the tags db table. The tags returned are only relevant for published content & saved media or members diff --git a/src/Umbraco.Core/Services/ITreeService.cs b/src/Umbraco.Core/Services/ITreeService.cs index f9ed522e71..362eab4594 100644 --- a/src/Umbraco.Core/Services/ITreeService.cs +++ b/src/Umbraco.Core/Services/ITreeService.cs @@ -1,7 +1,7 @@ using System.Collections.Generic; -using Umbraco.Web.Trees; +using Umbraco.Cms.Core.Trees; -namespace Umbraco.Web.Services +namespace Umbraco.Cms.Core.Services { /// /// Represents a service which manages section trees. diff --git a/src/Umbraco.Core/Services/IUpgradeService.cs b/src/Umbraco.Core/Services/IUpgradeService.cs index 70bbb68085..2e0f2a5f17 100644 --- a/src/Umbraco.Core/Services/IUpgradeService.cs +++ b/src/Umbraco.Core/Services/IUpgradeService.cs @@ -1,8 +1,7 @@ using System.Threading.Tasks; -using Semver; -using Umbraco.Core.Models; +using Umbraco.Cms.Core.Semver; -namespace Umbraco.Core.Services +namespace Umbraco.Cms.Core.Services { public interface IUpgradeService { diff --git a/src/Umbraco.Core/Services/IUserService.cs b/src/Umbraco.Core/Services/IUserService.cs index 6d1e8f82ac..a4af73e084 100644 --- a/src/Umbraco.Core/Services/IUserService.cs +++ b/src/Umbraco.Core/Services/IUserService.cs @@ -1,9 +1,9 @@ using System; using System.Collections.Generic; -using Umbraco.Core.Models.Membership; -using Umbraco.Core.Persistence.Querying; +using Umbraco.Cms.Core.Models.Membership; +using Umbraco.Cms.Core.Persistence.Querying; -namespace Umbraco.Core.Services +namespace Umbraco.Cms.Core.Services { /// /// Defines the UserService, which is an easy access to operations involving and eventually Users. diff --git a/src/Umbraco.Core/Services/InstallationService.cs b/src/Umbraco.Core/Services/InstallationService.cs index 6e283a61d7..eb1632be8a 100644 --- a/src/Umbraco.Core/Services/InstallationService.cs +++ b/src/Umbraco.Core/Services/InstallationService.cs @@ -1,8 +1,7 @@ using System.Threading.Tasks; -using Umbraco.Core.Models; -using Umbraco.Core.Persistence.Repositories; +using Umbraco.Cms.Core.Persistence.Repositories; -namespace Umbraco.Core.Services +namespace Umbraco.Cms.Core.Services { public class InstallationService : IInstallationService { diff --git a/src/Umbraco.Core/Services/LocalizedTextServiceExtensions.cs b/src/Umbraco.Core/Services/LocalizedTextServiceExtensions.cs index e02cdec7c9..598cebc2c0 100644 --- a/src/Umbraco.Core/Services/LocalizedTextServiceExtensions.cs +++ b/src/Umbraco.Core/Services/LocalizedTextServiceExtensions.cs @@ -1,23 +1,27 @@ -using System.Collections.Generic; +// Copyright (c) Umbraco. +// See LICENSE for more details. + +using System.Collections.Generic; using System.Globalization; using System.Linq; using System.Threading; -using Umbraco.Core.Dictionary; +using Umbraco.Cms.Core.Dictionary; +using Umbraco.Cms.Core.Services; -namespace Umbraco.Core.Services +namespace Umbraco.Extensions { /// /// Extension methods for ILocalizedTextService /// public static class LocalizedTextServiceExtensions { - public static string Localize(this ILocalizedTextService manager, string area, T key) where T: System.Enum { var fullKey = string.Join("/", area, key); return manager.Localize(fullKey, Thread.CurrentThread.CurrentUICulture); } + public static string Localize(this ILocalizedTextService manager, string area, string key) { var fullKey = string.Join("/", area, key); diff --git a/src/Umbraco.Core/Services/MediaServiceExtensions.cs b/src/Umbraco.Core/Services/MediaServiceExtensions.cs index 68924bc58b..ef0dfa5f97 100644 --- a/src/Umbraco.Core/Services/MediaServiceExtensions.cs +++ b/src/Umbraco.Core/Services/MediaServiceExtensions.cs @@ -1,9 +1,14 @@ -using System; +// Copyright (c) Umbraco. +// See LICENSE for more details. + +using System; using System.Collections.Generic; using System.Linq; -using Umbraco.Core.Models; +using Umbraco.Cms.Core; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Core.Services; -namespace Umbraco.Core.Services +namespace Umbraco.Extensions { /// /// Media service extension methods diff --git a/src/Umbraco.Core/Services/MoveOperationStatusType.cs b/src/Umbraco.Core/Services/MoveOperationStatusType.cs index b4b4c2b42e..4de17b2fa5 100644 --- a/src/Umbraco.Core/Services/MoveOperationStatusType.cs +++ b/src/Umbraco.Core/Services/MoveOperationStatusType.cs @@ -1,4 +1,4 @@ -namespace Umbraco.Core.Services +namespace Umbraco.Cms.Core.Services { /// diff --git a/src/Umbraco.Core/Services/OperationResult.cs b/src/Umbraco.Core/Services/OperationResult.cs index 2f0c09e272..f00c6b5d30 100644 --- a/src/Umbraco.Core/Services/OperationResult.cs +++ b/src/Umbraco.Core/Services/OperationResult.cs @@ -1,7 +1,7 @@ using System; -using Umbraco.Core.Events; +using Umbraco.Cms.Core.Events; -namespace Umbraco.Core.Services +namespace Umbraco.Cms.Core.Services { // TODO: no need for Attempt - the operation result SHOULD KNOW if it's a success or a failure! // but then each WhateverResultType must diff --git a/src/Umbraco.Core/Services/OperationResultType.cs b/src/Umbraco.Core/Services/OperationResultType.cs index 918f1c49fa..15b332e43c 100644 --- a/src/Umbraco.Core/Services/OperationResultType.cs +++ b/src/Umbraco.Core/Services/OperationResultType.cs @@ -1,4 +1,4 @@ -namespace Umbraco.Core.Services +namespace Umbraco.Cms.Core.Services { /// /// A value indicating the result of an operation. diff --git a/src/Umbraco.Core/Services/Ordering.cs b/src/Umbraco.Core/Services/Ordering.cs index b2f4cf4808..7a843191d3 100644 --- a/src/Umbraco.Core/Services/Ordering.cs +++ b/src/Umbraco.Core/Services/Ordering.cs @@ -1,4 +1,6 @@ -namespace Umbraco.Core.Services +using Umbraco.Extensions; + +namespace Umbraco.Cms.Core.Services { /// /// Represents ordering information. diff --git a/src/Umbraco.Core/Services/PublicAccessServiceExtensions.cs b/src/Umbraco.Core/Services/PublicAccessServiceExtensions.cs index cb2a5f4956..41bf9ac349 100644 --- a/src/Umbraco.Core/Services/PublicAccessServiceExtensions.cs +++ b/src/Umbraco.Core/Services/PublicAccessServiceExtensions.cs @@ -1,16 +1,20 @@ -using System; +// Copyright (c) Umbraco. +// See LICENSE for more details. + +using System; using System.Collections.Generic; using System.Linq; -using Umbraco.Core.Models; +using Umbraco.Cms.Core; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Core.Services; -namespace Umbraco.Core.Services +namespace Umbraco.Extensions { /// /// Extension methods for the IPublicAccessService /// public static class PublicAccessServiceExtensions { - public static bool RenameMemberGroupRoleRules(this IPublicAccessService publicAccessService, string oldRolename, string newRolename) { var hasChange = false; diff --git a/src/Umbraco.Core/Services/PublishResult.cs b/src/Umbraco.Core/Services/PublishResult.cs index fe11d77cf3..2b01d45d68 100644 --- a/src/Umbraco.Core/Services/PublishResult.cs +++ b/src/Umbraco.Core/Services/PublishResult.cs @@ -1,8 +1,8 @@ using System.Collections.Generic; -using Umbraco.Core.Events; -using Umbraco.Core.Models; +using Umbraco.Cms.Core.Events; +using Umbraco.Cms.Core.Models; -namespace Umbraco.Core.Services +namespace Umbraco.Cms.Core.Services { /// diff --git a/src/Umbraco.Core/Services/PublishResultType.cs b/src/Umbraco.Core/Services/PublishResultType.cs index 66c1e38267..43fab58218 100644 --- a/src/Umbraco.Core/Services/PublishResultType.cs +++ b/src/Umbraco.Core/Services/PublishResultType.cs @@ -1,4 +1,4 @@ -namespace Umbraco.Core.Services +namespace Umbraco.Cms.Core.Services { /// /// A value indicating the result of publishing or unpublishing a document. @@ -120,15 +120,15 @@ /// /// The document could not be published because it has no publishing flags or values or if its a variant document, no cultures were specified to be published. /// - FailedPublishNothingToPublish = FailedPublish | 9, + FailedPublishNothingToPublish = FailedPublish | 9, /// /// The document could not be published because some mandatory cultures are missing. /// - FailedPublishMandatoryCultureMissing = FailedPublish | 10, // in ContentService.SavePublishing + FailedPublishMandatoryCultureMissing = FailedPublish | 10, // in ContentService.SavePublishing /// - /// The document could not be published because it has been modified by another user. + /// The document could not be published because it has been modified by another user. /// FailedPublishConcurrencyViolation = FailedPublish | 11, diff --git a/src/Umbraco.Core/Services/SectionService.cs b/src/Umbraco.Core/Services/SectionService.cs index f66ab5ef62..93f6d624c3 100644 --- a/src/Umbraco.Core/Services/SectionService.cs +++ b/src/Umbraco.Core/Services/SectionService.cs @@ -1,11 +1,9 @@ using System; using System.Collections.Generic; using System.Linq; -using Umbraco.Core.Models.Sections; -using Umbraco.Core.Services; -using Umbraco.Web.Sections; +using Umbraco.Cms.Core.Sections; -namespace Umbraco.Web.Services +namespace Umbraco.Cms.Core.Services { public class SectionService : ISectionService { diff --git a/src/Umbraco.Core/Services/ServiceContext.cs b/src/Umbraco.Core/Services/ServiceContext.cs index c9bdc6d924..2a77a562ae 100644 --- a/src/Umbraco.Core/Services/ServiceContext.cs +++ b/src/Umbraco.Core/Services/ServiceContext.cs @@ -1,6 +1,6 @@ using System; -namespace Umbraco.Core.Services +namespace Umbraco.Cms.Core.Services { /// /// Represents the Umbraco Service context, which provides access to all services. diff --git a/src/Umbraco.Core/Services/TreeService.cs b/src/Umbraco.Core/Services/TreeService.cs index 48cc98b2db..9dbe5edb4f 100644 --- a/src/Umbraco.Core/Services/TreeService.cs +++ b/src/Umbraco.Core/Services/TreeService.cs @@ -1,10 +1,9 @@ -using System; -using System.Collections.Generic; +using System.Collections.Generic; using System.Linq; -using Umbraco.Core; -using Umbraco.Web.Trees; +using Umbraco.Cms.Core.Trees; +using Umbraco.Extensions; -namespace Umbraco.Web.Services +namespace Umbraco.Cms.Core.Services { /// /// Implements . diff --git a/src/Umbraco.Core/Services/UpgradeService.cs b/src/Umbraco.Core/Services/UpgradeService.cs index b36eac7789..e2003f8370 100644 --- a/src/Umbraco.Core/Services/UpgradeService.cs +++ b/src/Umbraco.Core/Services/UpgradeService.cs @@ -1,9 +1,8 @@ using System.Threading.Tasks; -using Semver; -using Umbraco.Core.Models; -using Umbraco.Core.Persistence.Repositories; +using Umbraco.Cms.Core.Persistence.Repositories; +using Umbraco.Cms.Core.Semver; -namespace Umbraco.Core.Services +namespace Umbraco.Cms.Core.Services { public class UpgradeService : IUpgradeService { diff --git a/src/Umbraco.Core/Services/UserServiceExtensions.cs b/src/Umbraco.Core/Services/UserServiceExtensions.cs index 4f5eb3c948..7206f74964 100644 --- a/src/Umbraco.Core/Services/UserServiceExtensions.cs +++ b/src/Umbraco.Core/Services/UserServiceExtensions.cs @@ -1,9 +1,10 @@ using System; using System.Collections.Generic; using System.Linq; -using Umbraco.Core.Models.Membership; +using Umbraco.Cms.Core.Models.Membership; +using Umbraco.Cms.Core.Services; -namespace Umbraco.Core.Services +namespace Umbraco.Extensions { public static class UserServiceExtensions { diff --git a/src/Umbraco.Core/Settable.cs b/src/Umbraco.Core/Settable.cs index ba46543d4d..0d2802226f 100644 --- a/src/Umbraco.Core/Settable.cs +++ b/src/Umbraco.Core/Settable.cs @@ -1,6 +1,6 @@ using System; -namespace Umbraco.Core +namespace Umbraco.Cms.Core { /// /// Represents a value that can be assigned a value. diff --git a/src/Umbraco.Core/SimpleMainDom.cs b/src/Umbraco.Core/SimpleMainDom.cs index 76e6d9a919..204734d918 100644 --- a/src/Umbraco.Core/SimpleMainDom.cs +++ b/src/Umbraco.Core/SimpleMainDom.cs @@ -1,9 +1,10 @@ using System; using System.Collections.Generic; using System.Linq; -using Umbraco.Core.Hosting; +using Umbraco.Cms.Core.Hosting; +using Umbraco.Cms.Core.Runtime; -namespace Umbraco.Core +namespace Umbraco.Cms.Core { /// /// Provides a simple implementation of . diff --git a/src/Umbraco.Core/StaticApplicationLogging.cs b/src/Umbraco.Core/StaticApplicationLogging.cs index 84cdc3c2d2..e216011014 100644 --- a/src/Umbraco.Core/StaticApplicationLogging.cs +++ b/src/Umbraco.Core/StaticApplicationLogging.cs @@ -1,7 +1,7 @@ using Microsoft.Extensions.Logging; using Microsoft.Extensions.Logging.Abstractions; -namespace Umbraco.Core +namespace Umbraco.Cms.Core { public static class StaticApplicationLogging { diff --git a/src/Umbraco.Core/StringUdi.cs b/src/Umbraco.Core/StringUdi.cs index 7e067ad6f9..f2b138a938 100644 --- a/src/Umbraco.Core/StringUdi.cs +++ b/src/Umbraco.Core/StringUdi.cs @@ -2,7 +2,7 @@ using System.ComponentModel; using System.Linq; -namespace Umbraco.Core +namespace Umbraco.Cms.Core { /// /// Represents a string-based entity identifier. diff --git a/src/Umbraco.Core/Strings/CleanStringType.cs b/src/Umbraco.Core/Strings/CleanStringType.cs index 95942fb9bf..771e834d35 100644 --- a/src/Umbraco.Core/Strings/CleanStringType.cs +++ b/src/Umbraco.Core/Strings/CleanStringType.cs @@ -1,6 +1,6 @@ using System; -namespace Umbraco.Core.Strings +namespace Umbraco.Cms.Core.Strings { /// /// Specifies the type of a clean string. diff --git a/src/Umbraco.Core/Strings/Css/StylesheetHelper.cs b/src/Umbraco.Core/Strings/Css/StylesheetHelper.cs index 80315abb95..51dffe5ab9 100644 --- a/src/Umbraco.Core/Strings/Css/StylesheetHelper.cs +++ b/src/Umbraco.Core/Strings/Css/StylesheetHelper.cs @@ -2,8 +2,9 @@ using System.Collections.Generic; using System.Linq; using System.Text.RegularExpressions; +using Umbraco.Extensions; -namespace Umbraco.Core.Strings.Css +namespace Umbraco.Cms.Core.Strings.Css { public class StylesheetHelper { diff --git a/src/Umbraco.Core/Strings/Css/StylesheetRule.cs b/src/Umbraco.Core/Strings/Css/StylesheetRule.cs index c12cc5b90c..c132c5d592 100644 --- a/src/Umbraco.Core/Strings/Css/StylesheetRule.cs +++ b/src/Umbraco.Core/Strings/Css/StylesheetRule.cs @@ -1,8 +1,8 @@ using System; -using System.Linq; using System.Text; +using Umbraco.Extensions; -namespace Umbraco.Core.Strings.Css +namespace Umbraco.Cms.Core.Strings.Css { public class StylesheetRule { diff --git a/src/Umbraco.Core/Strings/DefaultShortStringHelper.cs b/src/Umbraco.Core/Strings/DefaultShortStringHelper.cs index 492ded29e2..558e1af75c 100644 --- a/src/Umbraco.Core/Strings/DefaultShortStringHelper.cs +++ b/src/Umbraco.Core/Strings/DefaultShortStringHelper.cs @@ -1,13 +1,13 @@ using System; using System.Diagnostics; +using System.Globalization; using System.IO; using System.Linq; -using System.Globalization; -using Umbraco.Core.Configuration.UmbracoSettings; -using Umbraco.Core.Configuration.Models; using Microsoft.Extensions.Options; +using Umbraco.Cms.Core.Configuration.Models; +using Umbraco.Extensions; -namespace Umbraco.Core.Strings +namespace Umbraco.Cms.Core.Strings { /// /// New default implementation of string functions for short strings such as aliases or URL segments. diff --git a/src/Umbraco.Core/Strings/DefaultShortStringHelperConfig.cs b/src/Umbraco.Core/Strings/DefaultShortStringHelperConfig.cs index d6adf5b221..cf5e71a568 100644 --- a/src/Umbraco.Core/Strings/DefaultShortStringHelperConfig.cs +++ b/src/Umbraco.Core/Strings/DefaultShortStringHelperConfig.cs @@ -1,10 +1,10 @@ using System; using System.Collections.Generic; using System.Linq; -using Umbraco.Core.Configuration.Models; -using Umbraco.Core.Configuration.UmbracoSettings; +using Umbraco.Cms.Core.Configuration.Models; +using Umbraco.Extensions; -namespace Umbraco.Core.Strings +namespace Umbraco.Cms.Core.Strings { public class DefaultShortStringHelperConfig { diff --git a/src/Umbraco.Core/Strings/DefaultUrlSegmentProvider.cs b/src/Umbraco.Core/Strings/DefaultUrlSegmentProvider.cs index 6ec21b0986..a266b52f6b 100644 --- a/src/Umbraco.Core/Strings/DefaultUrlSegmentProvider.cs +++ b/src/Umbraco.Core/Strings/DefaultUrlSegmentProvider.cs @@ -1,6 +1,7 @@ -using Umbraco.Core.Models; +using Umbraco.Cms.Core.Models; +using Umbraco.Extensions; -namespace Umbraco.Core.Strings +namespace Umbraco.Cms.Core.Strings { /// /// Default implementation of IUrlSegmentProvider. diff --git a/src/Umbraco.Core/Strings/Diff.cs b/src/Umbraco.Core/Strings/Diff.cs index 6cd4985ead..8486875ad1 100644 --- a/src/Umbraco.Core/Strings/Diff.cs +++ b/src/Umbraco.Core/Strings/Diff.cs @@ -1,11 +1,8 @@ using System; using System.Collections; -using System.Collections.Generic; -using System.Linq; -using System.Text; using System.Text.RegularExpressions; -namespace Umbraco.Core.Strings +namespace Umbraco.Cms.Core.Strings { /// /// This Class implements the Difference Algorithm published in diff --git a/src/Umbraco.Core/Strings/HtmlEncodedString.cs b/src/Umbraco.Core/Strings/HtmlEncodedString.cs index 936b163615..16941cef48 100644 --- a/src/Umbraco.Core/Strings/HtmlEncodedString.cs +++ b/src/Umbraco.Core/Strings/HtmlEncodedString.cs @@ -1,4 +1,4 @@ -namespace Umbraco.Core.Strings +namespace Umbraco.Cms.Core.Strings { /// /// Represents an HTML-encoded string that should not be encoded again. diff --git a/src/Umbraco.Core/Strings/IHtmlEncodedString.cs b/src/Umbraco.Core/Strings/IHtmlEncodedString.cs index 0096a8a1f3..9747350f3a 100644 --- a/src/Umbraco.Core/Strings/IHtmlEncodedString.cs +++ b/src/Umbraco.Core/Strings/IHtmlEncodedString.cs @@ -1,4 +1,4 @@ -namespace Umbraco.Core.Strings +namespace Umbraco.Cms.Core.Strings { /// /// Represents an HTML-encoded string that should not be encoded again. diff --git a/src/Umbraco.Core/Strings/IShortStringHelper.cs b/src/Umbraco.Core/Strings/IShortStringHelper.cs index 37873caded..a424a0bf45 100644 --- a/src/Umbraco.Core/Strings/IShortStringHelper.cs +++ b/src/Umbraco.Core/Strings/IShortStringHelper.cs @@ -1,4 +1,4 @@ -namespace Umbraco.Core.Strings +namespace Umbraco.Cms.Core.Strings { /// /// Provides string functions for short strings such as aliases or URL segments. diff --git a/src/Umbraco.Core/Strings/IUrlSegmentProvider.cs b/src/Umbraco.Core/Strings/IUrlSegmentProvider.cs index fddb87e716..849f04a973 100644 --- a/src/Umbraco.Core/Strings/IUrlSegmentProvider.cs +++ b/src/Umbraco.Core/Strings/IUrlSegmentProvider.cs @@ -1,7 +1,6 @@ -using System.Globalization; -using Umbraco.Core.Models; +using Umbraco.Cms.Core.Models; -namespace Umbraco.Core.Strings +namespace Umbraco.Cms.Core.Strings { /// /// Provides URL segments for content. diff --git a/src/Umbraco.Core/Strings/PathUtility.cs b/src/Umbraco.Core/Strings/PathUtility.cs index 973f1dccf2..bc88fa8bca 100644 --- a/src/Umbraco.Core/Strings/PathUtility.cs +++ b/src/Umbraco.Core/Strings/PathUtility.cs @@ -1,4 +1,4 @@ -namespace Umbraco.Core.Strings +namespace Umbraco.Cms.Core.Strings { public static class PathUtility { diff --git a/src/Umbraco.Core/Strings/UrlSegmentProviderCollection.cs b/src/Umbraco.Core/Strings/UrlSegmentProviderCollection.cs index ba434f6a0d..7307c8964a 100644 --- a/src/Umbraco.Core/Strings/UrlSegmentProviderCollection.cs +++ b/src/Umbraco.Core/Strings/UrlSegmentProviderCollection.cs @@ -1,7 +1,7 @@ using System.Collections.Generic; -using Umbraco.Core.Composing; +using Umbraco.Cms.Core.Composing; -namespace Umbraco.Core.Strings +namespace Umbraco.Cms.Core.Strings { public class UrlSegmentProviderCollection : BuilderCollectionBase { diff --git a/src/Umbraco.Core/Strings/UrlSegmentProviderCollectionBuilder.cs b/src/Umbraco.Core/Strings/UrlSegmentProviderCollectionBuilder.cs index 5183c28e15..60504734f6 100644 --- a/src/Umbraco.Core/Strings/UrlSegmentProviderCollectionBuilder.cs +++ b/src/Umbraco.Core/Strings/UrlSegmentProviderCollectionBuilder.cs @@ -1,6 +1,6 @@ -using Umbraco.Core.Composing; +using Umbraco.Cms.Core.Composing; -namespace Umbraco.Core.Strings +namespace Umbraco.Cms.Core.Strings { public class UrlSegmentProviderCollectionBuilder : OrderedCollectionBuilderBase { diff --git a/src/Umbraco.Core/Strings/Utf8ToAsciiConverter.cs b/src/Umbraco.Core/Strings/Utf8ToAsciiConverter.cs index fea5e2b386..3f492a7b87 100644 --- a/src/Umbraco.Core/Strings/Utf8ToAsciiConverter.cs +++ b/src/Umbraco.Core/Strings/Utf8ToAsciiConverter.cs @@ -1,6 +1,6 @@ using System; -namespace Umbraco.Core.Strings +namespace Umbraco.Cms.Core.Strings { /// /// Provides methods to convert Utf8 text to Ascii. diff --git a/src/Umbraco.Core/Sync/DatabaseServerMessengerCallbacks.cs b/src/Umbraco.Core/Sync/DatabaseServerMessengerCallbacks.cs index f7dafac7a6..2107bbde20 100644 --- a/src/Umbraco.Core/Sync/DatabaseServerMessengerCallbacks.cs +++ b/src/Umbraco.Core/Sync/DatabaseServerMessengerCallbacks.cs @@ -1,7 +1,7 @@ using System; using System.Collections.Generic; -namespace Umbraco.Core.Sync +namespace Umbraco.Cms.Core.Sync { /// /// Holds a list of callbacks associated with implementations of . diff --git a/src/Umbraco.Core/Sync/ElectedServerRoleAccessor.cs b/src/Umbraco.Core/Sync/ElectedServerRoleAccessor.cs index e4accd046b..3c4d8a2b47 100644 --- a/src/Umbraco.Core/Sync/ElectedServerRoleAccessor.cs +++ b/src/Umbraco.Core/Sync/ElectedServerRoleAccessor.cs @@ -1,7 +1,7 @@ using System; -using Umbraco.Core.Services; +using Umbraco.Cms.Core.Services; -namespace Umbraco.Core.Sync +namespace Umbraco.Cms.Core.Sync { /// /// Gets the current server's based on active servers registered with diff --git a/src/Umbraco.Core/Sync/IServerAddress.cs b/src/Umbraco.Core/Sync/IServerAddress.cs index be74b8483f..c9333f33b8 100644 --- a/src/Umbraco.Core/Sync/IServerAddress.cs +++ b/src/Umbraco.Core/Sync/IServerAddress.cs @@ -1,4 +1,4 @@ -namespace Umbraco.Core.Sync +namespace Umbraco.Cms.Core.Sync { /// /// Provides the address of a server. diff --git a/src/Umbraco.Core/Sync/IServerMessenger.cs b/src/Umbraco.Core/Sync/IServerMessenger.cs index df2d665057..e58cfe9bc0 100644 --- a/src/Umbraco.Core/Sync/IServerMessenger.cs +++ b/src/Umbraco.Core/Sync/IServerMessenger.cs @@ -1,7 +1,7 @@ using System; -using Umbraco.Core.Cache; +using Umbraco.Cms.Core.Cache; -namespace Umbraco.Core.Sync +namespace Umbraco.Cms.Core.Sync { /// /// Transmits distributed cache notifications for all servers of a load balanced environment. diff --git a/src/Umbraco.Core/Sync/IServerRoleAccessor.cs b/src/Umbraco.Core/Sync/IServerRoleAccessor.cs index b23acbac7c..1ebd59b26d 100644 --- a/src/Umbraco.Core/Sync/IServerRoleAccessor.cs +++ b/src/Umbraco.Core/Sync/IServerRoleAccessor.cs @@ -1,6 +1,4 @@ -using System.Collections.Generic; - -namespace Umbraco.Core.Sync +namespace Umbraco.Cms.Core.Sync { /// /// Gets the current server's diff --git a/src/Umbraco.Core/Sync/MessageType.cs b/src/Umbraco.Core/Sync/MessageType.cs index 36d35e046a..5164428632 100644 --- a/src/Umbraco.Core/Sync/MessageType.cs +++ b/src/Umbraco.Core/Sync/MessageType.cs @@ -1,4 +1,4 @@ -namespace Umbraco.Core.Sync +namespace Umbraco.Cms.Core.Sync { /// /// The message type to be used for syncing across servers. diff --git a/src/Umbraco.Core/Sync/RefreshMethodType.cs b/src/Umbraco.Core/Sync/RefreshMethodType.cs index d5e9046540..bf72423c1f 100644 --- a/src/Umbraco.Core/Sync/RefreshMethodType.cs +++ b/src/Umbraco.Core/Sync/RefreshMethodType.cs @@ -1,6 +1,6 @@ using System; -namespace Umbraco.Core.Sync +namespace Umbraco.Cms.Core.Sync { /// /// Describes refresh action type. diff --git a/src/Umbraco.Core/Sync/ServerRole.cs b/src/Umbraco.Core/Sync/ServerRole.cs index 21091e41c5..27358608a4 100644 --- a/src/Umbraco.Core/Sync/ServerRole.cs +++ b/src/Umbraco.Core/Sync/ServerRole.cs @@ -1,4 +1,4 @@ -namespace Umbraco.Core.Sync +namespace Umbraco.Cms.Core.Sync { /// /// The role of a server in an application environment. diff --git a/src/Umbraco.Core/Sync/SingleServerRoleAccessor.cs b/src/Umbraco.Core/Sync/SingleServerRoleAccessor.cs index 65b9559522..43fd421ac5 100644 --- a/src/Umbraco.Core/Sync/SingleServerRoleAccessor.cs +++ b/src/Umbraco.Core/Sync/SingleServerRoleAccessor.cs @@ -1,8 +1,4 @@ -using System; -using System.Collections.Generic; -using Umbraco.Web; - -namespace Umbraco.Core.Sync +namespace Umbraco.Cms.Core.Sync { /// /// Can be used when Umbraco is definitely not operating in a Load Balanced scenario to micro-optimize some startup performance diff --git a/src/Umbraco.Core/SystemLock.cs b/src/Umbraco.Core/SystemLock.cs index 704fc65123..a4224560c1 100644 --- a/src/Umbraco.Core/SystemLock.cs +++ b/src/Umbraco.Core/SystemLock.cs @@ -1,10 +1,9 @@ using System; using System.Runtime.ConstrainedExecution; -using System.Runtime.InteropServices; using System.Threading; using System.Threading.Tasks; -namespace Umbraco.Core +namespace Umbraco.Cms.Core { // http://blogs.msdn.com/b/pfxteam/archive/2012/02/12/10266988.aspx // diff --git a/src/Umbraco.Core/TaskHelper.cs b/src/Umbraco.Core/TaskHelper.cs index 6afa94a941..113327ed88 100644 --- a/src/Umbraco.Core/TaskHelper.cs +++ b/src/Umbraco.Core/TaskHelper.cs @@ -5,7 +5,7 @@ using System; using System.Threading.Tasks; using Microsoft.Extensions.Logging; -namespace Umbraco.Core +namespace Umbraco.Cms.Core { /// /// Helper class to not repeat common patterns with Task. diff --git a/src/Umbraco.Core/Templates/HtmlImageSourceParser.cs b/src/Umbraco.Core/Templates/HtmlImageSourceParser.cs index 0394183740..c14a7a7bdf 100644 --- a/src/Umbraco.Core/Templates/HtmlImageSourceParser.cs +++ b/src/Umbraco.Core/Templates/HtmlImageSourceParser.cs @@ -1,10 +1,10 @@ using System; using System.Collections.Generic; using System.Text.RegularExpressions; -using Umbraco.Core; -using Umbraco.Web.Routing; +using Umbraco.Cms.Core.Routing; +using Umbraco.Extensions; -namespace Umbraco.Web.Templates +namespace Umbraco.Cms.Core.Templates { public sealed class HtmlImageSourceParser diff --git a/src/Umbraco.Core/Templates/HtmlLocalLinkParser.cs b/src/Umbraco.Core/Templates/HtmlLocalLinkParser.cs index 93229775b1..12762ee294 100644 --- a/src/Umbraco.Core/Templates/HtmlLocalLinkParser.cs +++ b/src/Umbraco.Core/Templates/HtmlLocalLinkParser.cs @@ -1,10 +1,10 @@ using System; using System.Collections.Generic; using System.Text.RegularExpressions; -using Umbraco.Core; -using Umbraco.Web.Routing; +using Umbraco.Cms.Core.Routing; +using Umbraco.Cms.Core.Web; -namespace Umbraco.Web.Templates +namespace Umbraco.Cms.Core.Templates { /// /// Utility class used to parse internal links diff --git a/src/Umbraco.Core/Templates/HtmlUrlParser.cs b/src/Umbraco.Core/Templates/HtmlUrlParser.cs index 254521d1c6..97bab9276a 100644 --- a/src/Umbraco.Core/Templates/HtmlUrlParser.cs +++ b/src/Umbraco.Core/Templates/HtmlUrlParser.cs @@ -1,11 +1,11 @@ using System.Text.RegularExpressions; -using Microsoft.Extensions.Options; using Microsoft.Extensions.Logging; -using Umbraco.Core.Configuration.Models; -using Umbraco.Core.IO; -using Umbraco.Core.Logging; +using Microsoft.Extensions.Options; +using Umbraco.Cms.Core.Configuration.Models; +using Umbraco.Cms.Core.IO; +using Umbraco.Cms.Core.Logging; -namespace Umbraco.Web.Templates +namespace Umbraco.Cms.Core.Templates { public sealed class HtmlUrlParser { diff --git a/src/Umbraco.Core/Templates/ITemplateRenderer.cs b/src/Umbraco.Core/Templates/ITemplateRenderer.cs index 7a6248e034..f6e6435a8a 100644 --- a/src/Umbraco.Core/Templates/ITemplateRenderer.cs +++ b/src/Umbraco.Core/Templates/ITemplateRenderer.cs @@ -1,7 +1,7 @@ using System.IO; using System.Threading.Tasks; -namespace Umbraco.Web.Templates +namespace Umbraco.Cms.Core.Templates { /// /// This is used purely for the RenderTemplate functionality in Umbraco diff --git a/src/Umbraco.Core/Templates/IUmbracoComponentRenderer.cs b/src/Umbraco.Core/Templates/IUmbracoComponentRenderer.cs index fcfdd815f6..a150337095 100644 --- a/src/Umbraco.Core/Templates/IUmbracoComponentRenderer.cs +++ b/src/Umbraco.Core/Templates/IUmbracoComponentRenderer.cs @@ -1,9 +1,9 @@ using System.Collections.Generic; using System.Threading.Tasks; -using Umbraco.Core.Models.PublishedContent; -using Umbraco.Core.Strings; +using Umbraco.Cms.Core.Models.PublishedContent; +using Umbraco.Cms.Core.Strings; -namespace Umbraco.Core.Templates +namespace Umbraco.Cms.Core.Templates { /// /// Methods used to render umbraco components as HTML in templates diff --git a/src/Umbraco.Core/Templates/UmbracoComponentRenderer.cs b/src/Umbraco.Core/Templates/UmbracoComponentRenderer.cs index d0b6972bc3..510fa70bcf 100644 --- a/src/Umbraco.Core/Templates/UmbracoComponentRenderer.cs +++ b/src/Umbraco.Core/Templates/UmbracoComponentRenderer.cs @@ -1,16 +1,16 @@ using System; -using System.Linq; -using System.IO; -using Umbraco.Web.Templates; using System.Collections.Generic; +using System.IO; +using System.Linq; using System.Net; -using Umbraco.Core.Models.PublishedContent; -using Umbraco.Core.Strings; -using Umbraco.Web; -using Umbraco.Web.Macros; using System.Threading.Tasks; +using Umbraco.Cms.Core.Macros; +using Umbraco.Cms.Core.Models.PublishedContent; +using Umbraco.Cms.Core.Strings; +using Umbraco.Cms.Core.Web; +using Umbraco.Extensions; -namespace Umbraco.Core.Templates +namespace Umbraco.Cms.Core.Templates { /// diff --git a/src/Umbraco.Core/Tour/BackOfficeTourFilter.cs b/src/Umbraco.Core/Tour/BackOfficeTourFilter.cs index bcca2e6673..281f2a1663 100644 --- a/src/Umbraco.Core/Tour/BackOfficeTourFilter.cs +++ b/src/Umbraco.Core/Tour/BackOfficeTourFilter.cs @@ -1,6 +1,6 @@ using System.Text.RegularExpressions; -namespace Umbraco.Web.Tour +namespace Umbraco.Cms.Core.Tour { /// /// Represents a back-office tour filter. @@ -14,7 +14,7 @@ namespace Umbraco.Web.Tour /// Value to filter out a tour file, can be null /// Value to filter out a tour alias, can be null /// - /// Depending on what is null will depend on how the filter is applied. + /// Depending on what is null will depend on how the filter is applied. /// If pluginName is not NULL and it's matched then we check if tourFileName is not NULL and it's matched then we check tour alias is not NULL and then match it, /// if any steps is NULL then the filters upstream are applied. /// Example, pluginName = "hello", tourFileName="stuff", tourAlias=NULL = we will filter out the tour file "stuff" from the plugin "hello" but not from other plugins if the same file name exists. diff --git a/src/Umbraco.Core/Tour/TourFilterCollection.cs b/src/Umbraco.Core/Tour/TourFilterCollection.cs index e221c17170..5c55d0e0cd 100644 --- a/src/Umbraco.Core/Tour/TourFilterCollection.cs +++ b/src/Umbraco.Core/Tour/TourFilterCollection.cs @@ -1,7 +1,7 @@ using System.Collections.Generic; -using Umbraco.Core.Composing; +using Umbraco.Cms.Core.Composing; -namespace Umbraco.Web.Tour +namespace Umbraco.Cms.Core.Tour { /// /// Represents a collection of items. diff --git a/src/Umbraco.Core/Tour/TourFilterCollectionBuilder.cs b/src/Umbraco.Core/Tour/TourFilterCollectionBuilder.cs index eac519494a..61f10cc96d 100644 --- a/src/Umbraco.Core/Tour/TourFilterCollectionBuilder.cs +++ b/src/Umbraco.Core/Tour/TourFilterCollectionBuilder.cs @@ -2,10 +2,10 @@ using System.Collections.Generic; using System.Linq; using System.Text.RegularExpressions; -using Umbraco.Core; -using Umbraco.Core.Composing; +using Umbraco.Cms.Core.Composing; +using Umbraco.Extensions; -namespace Umbraco.Web.Tour +namespace Umbraco.Cms.Core.Tour { /// /// Builds a collection of items. diff --git a/src/Umbraco.Core/Trees/ActionUrlMethod.cs b/src/Umbraco.Core/Trees/ActionUrlMethod.cs index a6c3b4a577..fcf455c6ad 100644 --- a/src/Umbraco.Core/Trees/ActionUrlMethod.cs +++ b/src/Umbraco.Core/Trees/ActionUrlMethod.cs @@ -1,4 +1,4 @@ -namespace Umbraco.Web.Trees +namespace Umbraco.Cms.Core.Trees { /// /// Specifies the action to take for a menu item when a URL is specified diff --git a/src/Umbraco.Core/Trees/CoreTreeAttribute.cs b/src/Umbraco.Core/Trees/CoreTreeAttribute.cs index c1d8d3726a..eedad5b600 100644 --- a/src/Umbraco.Core/Trees/CoreTreeAttribute.cs +++ b/src/Umbraco.Core/Trees/CoreTreeAttribute.cs @@ -1,6 +1,6 @@ using System; -namespace Umbraco.Web.Trees +namespace Umbraco.Cms.Core.Trees { /// /// Indicates that a tree is a core tree and should not be treated as a plugin tree. diff --git a/src/Umbraco.Core/Trees/IMenuItemCollectionFactory.cs b/src/Umbraco.Core/Trees/IMenuItemCollectionFactory.cs index dc4c53bac9..fca82ca18b 100644 --- a/src/Umbraco.Core/Trees/IMenuItemCollectionFactory.cs +++ b/src/Umbraco.Core/Trees/IMenuItemCollectionFactory.cs @@ -1,6 +1,4 @@ -using Umbraco.Web.Models.Trees; - -namespace Umbraco.Web.Trees +namespace Umbraco.Cms.Core.Trees { /// diff --git a/src/Umbraco.Core/Trees/ISearchableTree.cs b/src/Umbraco.Core/Trees/ISearchableTree.cs index 8f31c2c6ab..9464dbefd3 100644 --- a/src/Umbraco.Core/Trees/ISearchableTree.cs +++ b/src/Umbraco.Core/Trees/ISearchableTree.cs @@ -1,8 +1,8 @@ using System.Collections.Generic; -using Umbraco.Core.Composing; -using Umbraco.Web.Models.ContentEditing; +using Umbraco.Cms.Core.Composing; +using Umbraco.Cms.Core.Models.ContentEditing; -namespace Umbraco.Core.Trees +namespace Umbraco.Cms.Core.Trees { public interface ISearchableTree : IDiscoverable { diff --git a/src/Umbraco.Core/Trees/ITree.cs b/src/Umbraco.Core/Trees/ITree.cs index 7f7ff816be..b114b83d22 100644 --- a/src/Umbraco.Core/Trees/ITree.cs +++ b/src/Umbraco.Core/Trees/ITree.cs @@ -1,4 +1,4 @@ -namespace Umbraco.Web.Trees +namespace Umbraco.Cms.Core.Trees { // TODO: we don't really use this, it is nice to have the treecontroller, attribute and ApplicationTree streamlined to implement this but it's not used // leave as internal for now, maybe we'll use in the future, means we could pass around ITree diff --git a/src/Umbraco.Core/Trees/MenuItemCollection.cs b/src/Umbraco.Core/Trees/MenuItemCollection.cs index 84d46c0d11..0a83255368 100644 --- a/src/Umbraco.Core/Trees/MenuItemCollection.cs +++ b/src/Umbraco.Core/Trees/MenuItemCollection.cs @@ -1,8 +1,9 @@ using System.Collections.Generic; using System.Runtime.Serialization; -using Umbraco.Web.Actions; +using Umbraco.Cms.Core.Actions; +using Umbraco.Cms.Core.Models.Trees; -namespace Umbraco.Web.Models.Trees +namespace Umbraco.Cms.Core.Trees { /// /// A menu item collection for a given tree node diff --git a/src/Umbraco.Core/Trees/MenuItemCollectionFactory.cs b/src/Umbraco.Core/Trees/MenuItemCollectionFactory.cs index 0a8ea000e3..112b8b6240 100644 --- a/src/Umbraco.Core/Trees/MenuItemCollectionFactory.cs +++ b/src/Umbraco.Core/Trees/MenuItemCollectionFactory.cs @@ -1,7 +1,6 @@ -using Umbraco.Web.Actions; -using Umbraco.Web.Models.Trees; +using Umbraco.Cms.Core.Actions; -namespace Umbraco.Web.Trees +namespace Umbraco.Cms.Core.Trees { public class MenuItemCollectionFactory: IMenuItemCollectionFactory { diff --git a/src/Umbraco.Core/Trees/MenuItemList.cs b/src/Umbraco.Core/Trees/MenuItemList.cs index 1410575fdb..d2468f724b 100644 --- a/src/Umbraco.Core/Trees/MenuItemList.cs +++ b/src/Umbraco.Core/Trees/MenuItemList.cs @@ -1,9 +1,14 @@ -using System.Collections.Generic; -using System.Threading; -using Umbraco.Core.Services; -using Umbraco.Web.Actions; +// Copyright (c) Umbraco. +// See LICENSE for more details. -namespace Umbraco.Web.Models.Trees +using System.Collections.Generic; +using System.Threading; +using Umbraco.Cms.Core.Actions; +using Umbraco.Cms.Core.Models.Trees; +using Umbraco.Cms.Core.Services; +using Umbraco.Extensions; + +namespace Umbraco.Cms.Core.Trees { /// /// A custom menu list diff --git a/src/Umbraco.Core/Trees/SearchableApplicationTree.cs b/src/Umbraco.Core/Trees/SearchableApplicationTree.cs index ad6fb7f43f..33104cb8c7 100644 --- a/src/Umbraco.Core/Trees/SearchableApplicationTree.cs +++ b/src/Umbraco.Core/Trees/SearchableApplicationTree.cs @@ -1,4 +1,4 @@ -namespace Umbraco.Core.Trees +namespace Umbraco.Cms.Core.Trees { public class SearchableApplicationTree { diff --git a/src/Umbraco.Core/Trees/SearchableTreeAttribute.cs b/src/Umbraco.Core/Trees/SearchableTreeAttribute.cs index 2a30725fde..ca5cfef02a 100644 --- a/src/Umbraco.Core/Trees/SearchableTreeAttribute.cs +++ b/src/Umbraco.Core/Trees/SearchableTreeAttribute.cs @@ -1,6 +1,6 @@ using System; -namespace Umbraco.Web.Trees +namespace Umbraco.Cms.Core.Trees { [AttributeUsage(AttributeTargets.Class)] public sealed class SearchableTreeAttribute : Attribute diff --git a/src/Umbraco.Core/Trees/SearchableTreeCollection.cs b/src/Umbraco.Core/Trees/SearchableTreeCollection.cs index e562b763d4..8f1b20a7b1 100644 --- a/src/Umbraco.Core/Trees/SearchableTreeCollection.cs +++ b/src/Umbraco.Core/Trees/SearchableTreeCollection.cs @@ -1,12 +1,11 @@ using System; using System.Collections.Generic; using System.Linq; -using Umbraco.Core; -using Umbraco.Core.Composing; -using Umbraco.Web.Services; -using Umbraco.Web.Trees; +using Umbraco.Cms.Core.Composing; +using Umbraco.Cms.Core.Services; +using Umbraco.Extensions; -namespace Umbraco.Core.Trees +namespace Umbraco.Cms.Core.Trees { public class SearchableTreeCollection : BuilderCollectionBase { diff --git a/src/Umbraco.Core/Trees/SearchableTreeCollectionBuilder.cs b/src/Umbraco.Core/Trees/SearchableTreeCollectionBuilder.cs index 7922cf36ad..dca2839558 100644 --- a/src/Umbraco.Core/Trees/SearchableTreeCollectionBuilder.cs +++ b/src/Umbraco.Core/Trees/SearchableTreeCollectionBuilder.cs @@ -1,7 +1,7 @@ using Microsoft.Extensions.DependencyInjection; -using Umbraco.Core.Composing; +using Umbraco.Cms.Core.Composing; -namespace Umbraco.Core.Trees +namespace Umbraco.Cms.Core.Trees { public class SearchableTreeCollectionBuilder : LazyCollectionBuilderBase { diff --git a/src/Umbraco.Core/Trees/Tree.cs b/src/Umbraco.Core/Trees/Tree.cs index b528443eb1..a0286090ec 100644 --- a/src/Umbraco.Core/Trees/Tree.cs +++ b/src/Umbraco.Core/Trees/Tree.cs @@ -1,8 +1,12 @@ -using System; -using System.Diagnostics; -using Umbraco.Core.Services; +// Copyright (c) Umbraco. +// See LICENSE for more details. -namespace Umbraco.Web.Trees +using System; +using System.Diagnostics; +using Umbraco.Cms.Core.Services; +using Umbraco.Extensions; + +namespace Umbraco.Cms.Core.Trees { [DebuggerDisplay("Tree - {SectionAlias}/{TreeAlias}")] public class Tree : ITree diff --git a/src/Umbraco.Core/Trees/TreeCollection.cs b/src/Umbraco.Core/Trees/TreeCollection.cs index 76404d4ac5..45a405217f 100644 --- a/src/Umbraco.Core/Trees/TreeCollection.cs +++ b/src/Umbraco.Core/Trees/TreeCollection.cs @@ -1,7 +1,7 @@ using System.Collections.Generic; -using Umbraco.Core.Composing; +using Umbraco.Cms.Core.Composing; -namespace Umbraco.Web.Trees +namespace Umbraco.Cms.Core.Trees { /// /// Represents the collection of section trees. diff --git a/src/Umbraco.Core/Trees/TreeNode.cs b/src/Umbraco.Core/Trees/TreeNode.cs index cc99269cd8..c09f7559ca 100644 --- a/src/Umbraco.Core/Trees/TreeNode.cs +++ b/src/Umbraco.Core/Trees/TreeNode.cs @@ -1,11 +1,10 @@ using System; using System.Collections.Generic; using System.Runtime.Serialization; -using Umbraco.Core; -using Umbraco.Core.Configuration; -using Umbraco.Web.Models.ContentEditing; +using Umbraco.Cms.Core.Models.ContentEditing; +using Umbraco.Extensions; -namespace Umbraco.Web.Models.Trees +namespace Umbraco.Cms.Core.Trees { /// /// Represents a model in the tree diff --git a/src/Umbraco.Core/Trees/TreeNodeCollection.cs b/src/Umbraco.Core/Trees/TreeNodeCollection.cs index 48e9b46dbe..545b6881aa 100644 --- a/src/Umbraco.Core/Trees/TreeNodeCollection.cs +++ b/src/Umbraco.Core/Trees/TreeNodeCollection.cs @@ -1,7 +1,7 @@ using System.Collections.Generic; using System.Runtime.Serialization; -namespace Umbraco.Web.Models.Trees +namespace Umbraco.Cms.Core.Trees { [CollectionDataContract(Name = "nodes", Namespace = "")] public sealed class TreeNodeCollection : List diff --git a/src/Umbraco.Core/Trees/TreeNodeExtensions.cs b/src/Umbraco.Core/Trees/TreeNodeExtensions.cs index 10aaf342f0..9e887f68ec 100644 --- a/src/Umbraco.Core/Trees/TreeNodeExtensions.cs +++ b/src/Umbraco.Core/Trees/TreeNodeExtensions.cs @@ -1,4 +1,9 @@ -namespace Umbraco.Web.Models.Trees +// Copyright (c) Umbraco. +// See LICENSE for more details. + +using Umbraco.Cms.Core.Trees; + +namespace Umbraco.Extensions { public static class TreeNodeExtensions { diff --git a/src/Umbraco.Core/Trees/TreeUse.cs b/src/Umbraco.Core/Trees/TreeUse.cs index a1baee3332..55be24d54d 100644 --- a/src/Umbraco.Core/Trees/TreeUse.cs +++ b/src/Umbraco.Core/Trees/TreeUse.cs @@ -1,6 +1,6 @@ using System; -namespace Umbraco.Web.Trees +namespace Umbraco.Cms.Core.Trees { /// /// Defines tree uses. @@ -23,4 +23,4 @@ namespace Umbraco.Web.Trees /// Dialog = 2, } -} \ No newline at end of file +} diff --git a/src/Umbraco.Core/Udi.cs b/src/Umbraco.Core/Udi.cs index 8a0ce83811..b861bcc68b 100644 --- a/src/Umbraco.Core/Udi.cs +++ b/src/Umbraco.Core/Udi.cs @@ -2,7 +2,7 @@ using System.ComponentModel; using System.Linq; -namespace Umbraco.Core +namespace Umbraco.Cms.Core { /// diff --git a/src/Umbraco.Core/UdiDefinitionAttribute.cs b/src/Umbraco.Core/UdiDefinitionAttribute.cs index a5ff960db1..9139ef4188 100644 --- a/src/Umbraco.Core/UdiDefinitionAttribute.cs +++ b/src/Umbraco.Core/UdiDefinitionAttribute.cs @@ -1,6 +1,6 @@ using System; -namespace Umbraco.Core +namespace Umbraco.Cms.Core { [AttributeUsage(AttributeTargets.Class, AllowMultiple = true, Inherited = false)] public sealed class UdiDefinitionAttribute : Attribute diff --git a/src/Umbraco.Core/UdiEntityTypeHelper.cs b/src/Umbraco.Core/UdiEntityTypeHelper.cs index 39ee28488f..781c084785 100644 --- a/src/Umbraco.Core/UdiEntityTypeHelper.cs +++ b/src/Umbraco.Core/UdiEntityTypeHelper.cs @@ -1,12 +1,11 @@ using System; -using System.Collections.Generic; -using Umbraco.Core.Models; +using Umbraco.Cms.Core.Models; -namespace Umbraco.Core +namespace Umbraco.Cms.Core { public static class UdiEntityTypeHelper { - + public static string FromUmbracoObjectType(UmbracoObjectTypes umbracoObjectType) { diff --git a/src/Umbraco.Core/UdiParser.cs b/src/Umbraco.Core/UdiParser.cs index 18871a755d..92f4e46f89 100644 --- a/src/Umbraco.Core/UdiParser.cs +++ b/src/Umbraco.Core/UdiParser.cs @@ -3,7 +3,7 @@ using System.Collections.Concurrent; using System.Collections.Generic; using System.ComponentModel; -namespace Umbraco.Core +namespace Umbraco.Cms.Core { public sealed class UdiParser { diff --git a/src/Umbraco.Core/UdiParserServiceConnectors.cs b/src/Umbraco.Core/UdiParserServiceConnectors.cs index 6137b0bde9..320cc9a901 100644 --- a/src/Umbraco.Core/UdiParserServiceConnectors.cs +++ b/src/Umbraco.Core/UdiParserServiceConnectors.cs @@ -1,10 +1,10 @@ using System; using System.Collections.Generic; -using System.Linq; -using Umbraco.Core.Deploy; -using Umbraco.Core.Composing; +using Umbraco.Cms.Core.Composing; +using Umbraco.Cms.Core.Deploy; +using Umbraco.Extensions; -namespace Umbraco.Core +namespace Umbraco.Cms.Core { public static class UdiParserServiceConnectors { diff --git a/src/Umbraco.Core/UdiRange.cs b/src/Umbraco.Core/UdiRange.cs index b70cf43d18..50f5b88189 100644 --- a/src/Umbraco.Core/UdiRange.cs +++ b/src/Umbraco.Core/UdiRange.cs @@ -1,6 +1,6 @@ using System; -namespace Umbraco.Core +namespace Umbraco.Cms.Core { /// /// Represents a range. diff --git a/src/Umbraco.Core/UdiType.cs b/src/Umbraco.Core/UdiType.cs index 6d183d7c36..572c36de95 100644 --- a/src/Umbraco.Core/UdiType.cs +++ b/src/Umbraco.Core/UdiType.cs @@ -1,4 +1,4 @@ -namespace Umbraco.Core +namespace Umbraco.Cms.Core { /// /// Defines Udi types. diff --git a/src/Umbraco.Core/UdiTypeConverter.cs b/src/Umbraco.Core/UdiTypeConverter.cs index 8da1b7bb5f..3b4015e8f0 100644 --- a/src/Umbraco.Core/UdiTypeConverter.cs +++ b/src/Umbraco.Core/UdiTypeConverter.cs @@ -2,7 +2,7 @@ using System.ComponentModel; using System.Globalization; -namespace Umbraco.Core +namespace Umbraco.Cms.Core { /// /// A custom type converter for UDI diff --git a/src/Umbraco.Core/Umbraco.Core.csproj b/src/Umbraco.Core/Umbraco.Core.csproj index 48dba0b4ad..2f38e4953b 100644 --- a/src/Umbraco.Core/Umbraco.Core.csproj +++ b/src/Umbraco.Core/Umbraco.Core.csproj @@ -3,11 +3,12 @@ netstandard2.0 8 - Umbraco.Core + Umbraco.Cms.Core 0.5.0 0.5.0 0.5.0 Umbraco CMS + Umbraco.Core diff --git a/src/Umbraco.Core/UmbracoApiControllerTypeCollection.cs b/src/Umbraco.Core/UmbracoApiControllerTypeCollection.cs index dc8d1767dc..9ff5073d17 100644 --- a/src/Umbraco.Core/UmbracoApiControllerTypeCollection.cs +++ b/src/Umbraco.Core/UmbracoApiControllerTypeCollection.cs @@ -1,8 +1,8 @@ using System; using System.Collections.Generic; -using Umbraco.Core.Composing; +using Umbraco.Cms.Core.Composing; -namespace Umbraco.Web.WebApi +namespace Umbraco.Cms.Core { public class UmbracoApiControllerTypeCollection : BuilderCollectionBase { diff --git a/src/Umbraco.Core/UmbracoContextReference.cs b/src/Umbraco.Core/UmbracoContextReference.cs index c253c2f007..18ba20b384 100644 --- a/src/Umbraco.Core/UmbracoContextReference.cs +++ b/src/Umbraco.Core/UmbracoContextReference.cs @@ -1,6 +1,7 @@ using System; +using Umbraco.Cms.Core.Web; -namespace Umbraco.Web +namespace Umbraco.Cms.Core { /// /// Represents a reference to an instance. diff --git a/src/Umbraco.Core/UnknownTypeUdi.cs b/src/Umbraco.Core/UnknownTypeUdi.cs index c6ad48bb79..4131eae053 100644 --- a/src/Umbraco.Core/UnknownTypeUdi.cs +++ b/src/Umbraco.Core/UnknownTypeUdi.cs @@ -1,4 +1,4 @@ -namespace Umbraco.Core +namespace Umbraco.Cms.Core { public class UnknownTypeUdi : Udi { diff --git a/src/Umbraco.Core/UpgradeResult.cs b/src/Umbraco.Core/UpgradeResult.cs index a27f6bb6a3..25431a5983 100644 --- a/src/Umbraco.Core/UpgradeResult.cs +++ b/src/Umbraco.Core/UpgradeResult.cs @@ -1,4 +1,4 @@ -namespace Umbraco.Core.Models +namespace Umbraco.Cms.Core { public class UpgradeResult { diff --git a/src/Umbraco.Core/UpgradeableReadLock.cs b/src/Umbraco.Core/UpgradeableReadLock.cs index e3717fdf9a..4b6fc9219a 100644 --- a/src/Umbraco.Core/UpgradeableReadLock.cs +++ b/src/Umbraco.Core/UpgradeableReadLock.cs @@ -1,10 +1,7 @@ using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; using System.Threading; -namespace Umbraco.Core +namespace Umbraco.Cms.Core { /// /// Provides a convenience methodology for implementing locked access to resources. diff --git a/src/Umbraco.Core/UriUtilityCore.cs b/src/Umbraco.Core/UriUtilityCore.cs index 9ca9d66229..8716865a9e 100644 --- a/src/Umbraco.Core/UriUtilityCore.cs +++ b/src/Umbraco.Core/UriUtilityCore.cs @@ -1,7 +1,7 @@ using System; -using Umbraco.Core; +using Umbraco.Extensions; -namespace Umbraco.Web +namespace Umbraco.Cms.Core { public static class UriUtilityCore { diff --git a/src/Umbraco.Core/Web/CookieManagerExtensions.cs b/src/Umbraco.Core/Web/CookieManagerExtensions.cs index 41f2fa1aca..d8c4396ab8 100644 --- a/src/Umbraco.Core/Web/CookieManagerExtensions.cs +++ b/src/Umbraco.Core/Web/CookieManagerExtensions.cs @@ -1,6 +1,10 @@ -using Umbraco.Core; +// Copyright (c) Umbraco. +// See LICENSE for more details. -namespace Umbraco.Web +using Umbraco.Cms.Core; +using Umbraco.Cms.Core.Web; + +namespace Umbraco.Extensions { public static class CookieManagerExtensions { diff --git a/src/Umbraco.Core/Web/HybridUmbracoContextAccessor.cs b/src/Umbraco.Core/Web/HybridUmbracoContextAccessor.cs index 1ad4777460..a266c07769 100644 --- a/src/Umbraco.Core/Web/HybridUmbracoContextAccessor.cs +++ b/src/Umbraco.Core/Web/HybridUmbracoContextAccessor.cs @@ -1,6 +1,6 @@ -using Umbraco.Core.Cache; +using Umbraco.Cms.Core.Cache; -namespace Umbraco.Web +namespace Umbraco.Cms.Core.Web { /// /// Implements a hybrid . diff --git a/src/Umbraco.Core/Web/ICookieManager.cs b/src/Umbraco.Core/Web/ICookieManager.cs index 39eda89222..50a71bf135 100644 --- a/src/Umbraco.Core/Web/ICookieManager.cs +++ b/src/Umbraco.Core/Web/ICookieManager.cs @@ -1,4 +1,4 @@ -namespace Umbraco.Web +namespace Umbraco.Cms.Core.Web { public interface ICookieManager diff --git a/src/Umbraco.Core/Web/IRequestAccessor.cs b/src/Umbraco.Core/Web/IRequestAccessor.cs index 56c8091f94..992b56b75c 100644 --- a/src/Umbraco.Core/Web/IRequestAccessor.cs +++ b/src/Umbraco.Core/Web/IRequestAccessor.cs @@ -1,6 +1,6 @@ using System; -namespace Umbraco.Web +namespace Umbraco.Cms.Core.Web { public interface IRequestAccessor { diff --git a/src/Umbraco.Core/Web/ISessionManager.cs b/src/Umbraco.Core/Web/ISessionManager.cs index e7bee5012d..f2bc0136d0 100644 --- a/src/Umbraco.Core/Web/ISessionManager.cs +++ b/src/Umbraco.Core/Web/ISessionManager.cs @@ -1,4 +1,4 @@ -namespace Umbraco.Web +namespace Umbraco.Cms.Core.Web { public interface ISessionManager { diff --git a/src/Umbraco.Core/Web/IUmbracoContext.cs b/src/Umbraco.Core/Web/IUmbracoContext.cs index c80dd9c1f3..d50b2bbc88 100644 --- a/src/Umbraco.Core/Web/IUmbracoContext.cs +++ b/src/Umbraco.Core/Web/IUmbracoContext.cs @@ -1,10 +1,9 @@ using System; -using Umbraco.Core.Models.PublishedContent; -using Umbraco.Core.Security; -using Umbraco.Web.PublishedCache; -using Umbraco.Web.Routing; +using Umbraco.Cms.Core.Models.PublishedContent; +using Umbraco.Cms.Core.PublishedCache; +using Umbraco.Cms.Core.Routing; -namespace Umbraco.Web +namespace Umbraco.Cms.Core.Web { public interface IUmbracoContext : IDisposable { diff --git a/src/Umbraco.Core/Web/IUmbracoContextAccessor.cs b/src/Umbraco.Core/Web/IUmbracoContextAccessor.cs index 5c7549bff6..0f15034dd1 100644 --- a/src/Umbraco.Core/Web/IUmbracoContextAccessor.cs +++ b/src/Umbraco.Core/Web/IUmbracoContextAccessor.cs @@ -1,4 +1,4 @@ -namespace Umbraco.Web +namespace Umbraco.Cms.Core.Web { /// /// Provides access to UmbracoContext. diff --git a/src/Umbraco.Core/Web/IUmbracoContextFactory.cs b/src/Umbraco.Core/Web/IUmbracoContextFactory.cs index c3ed863da8..68ebcf8b2b 100644 --- a/src/Umbraco.Core/Web/IUmbracoContextFactory.cs +++ b/src/Umbraco.Core/Web/IUmbracoContextFactory.cs @@ -1,5 +1,5 @@  -namespace Umbraco.Web +namespace Umbraco.Cms.Core.Web { /// /// Creates and manages instances. diff --git a/src/Umbraco.Core/Web/Mvc/PluginControllerMetadata.cs b/src/Umbraco.Core/Web/Mvc/PluginControllerMetadata.cs index b8750d6998..a8b6401cea 100644 --- a/src/Umbraco.Core/Web/Mvc/PluginControllerMetadata.cs +++ b/src/Umbraco.Core/Web/Mvc/PluginControllerMetadata.cs @@ -1,6 +1,6 @@ using System; -namespace Umbraco.Web.Mvc +namespace Umbraco.Cms.Core.Web.Mvc { /// /// Represents some metadata about the controller diff --git a/src/Umbraco.Core/WebAssets/AssetFile.cs b/src/Umbraco.Core/WebAssets/AssetFile.cs index ceb3816633..78249edae9 100644 --- a/src/Umbraco.Core/WebAssets/AssetFile.cs +++ b/src/Umbraco.Core/WebAssets/AssetFile.cs @@ -1,6 +1,6 @@ using System.Diagnostics; -namespace Umbraco.Core.WebAssets +namespace Umbraco.Cms.Core.WebAssets { /// /// Represents a dependency file diff --git a/src/Umbraco.Core/WebAssets/AssetType.cs b/src/Umbraco.Core/WebAssets/AssetType.cs index c08e2be6c1..f40a592588 100644 --- a/src/Umbraco.Core/WebAssets/AssetType.cs +++ b/src/Umbraco.Core/WebAssets/AssetType.cs @@ -1,4 +1,4 @@ -namespace Umbraco.Core.WebAssets +namespace Umbraco.Cms.Core.WebAssets { public enum AssetType { diff --git a/src/Umbraco.Core/WebAssets/CssFile.cs b/src/Umbraco.Core/WebAssets/CssFile.cs index 42c677807e..101ff22763 100644 --- a/src/Umbraco.Core/WebAssets/CssFile.cs +++ b/src/Umbraco.Core/WebAssets/CssFile.cs @@ -1,4 +1,4 @@ -namespace Umbraco.Core.WebAssets +namespace Umbraco.Cms.Core.WebAssets { /// /// Represents a CSS asset file diff --git a/src/Umbraco.Core/WebAssets/IAssetFile.cs b/src/Umbraco.Core/WebAssets/IAssetFile.cs index 721c415ffe..6992af7f30 100644 --- a/src/Umbraco.Core/WebAssets/IAssetFile.cs +++ b/src/Umbraco.Core/WebAssets/IAssetFile.cs @@ -1,4 +1,4 @@ -namespace Umbraco.Core.WebAssets +namespace Umbraco.Cms.Core.WebAssets { public interface IAssetFile { diff --git a/src/Umbraco.Core/WebAssets/IRuntimeMinifier.cs b/src/Umbraco.Core/WebAssets/IRuntimeMinifier.cs index 2b68a2f4ec..2c6c39f3bd 100644 --- a/src/Umbraco.Core/WebAssets/IRuntimeMinifier.cs +++ b/src/Umbraco.Core/WebAssets/IRuntimeMinifier.cs @@ -2,7 +2,7 @@ using System.Collections.Generic; using System.Threading.Tasks; -namespace Umbraco.Core.WebAssets +namespace Umbraco.Cms.Core.WebAssets { /// /// Used for bundling and minifying web assets at runtime diff --git a/src/Umbraco.Core/WebAssets/JavascriptFile.cs b/src/Umbraco.Core/WebAssets/JavascriptFile.cs index 1f5b1a1f77..2dccbf2a07 100644 --- a/src/Umbraco.Core/WebAssets/JavascriptFile.cs +++ b/src/Umbraco.Core/WebAssets/JavascriptFile.cs @@ -1,4 +1,4 @@ -namespace Umbraco.Core.WebAssets +namespace Umbraco.Cms.Core.WebAssets { /// /// Represents a JS asset file diff --git a/src/Umbraco.Core/WriteLock.cs b/src/Umbraco.Core/WriteLock.cs index dfa170218b..7484c26869 100644 --- a/src/Umbraco.Core/WriteLock.cs +++ b/src/Umbraco.Core/WriteLock.cs @@ -1,10 +1,7 @@ using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; using System.Threading; -namespace Umbraco.Core +namespace Umbraco.Cms.Core { /// /// Provides a convenience methodology for implementing locked access to resources. diff --git a/src/Umbraco.Core/Xml/DynamicContext.cs b/src/Umbraco.Core/Xml/DynamicContext.cs index e5b90a1622..338984867e 100644 --- a/src/Umbraco.Core/Xml/DynamicContext.cs +++ b/src/Umbraco.Core/Xml/DynamicContext.cs @@ -1,12 +1,12 @@ using System; using System.Collections.Generic; using System.Xml; -using System.Xml.Xsl; using System.Xml.XPath; +using System.Xml.Xsl; // source: mvpxml.codeplex.com -namespace Umbraco.Core.Xml +namespace Umbraco.Cms.Core.Xml { /// /// Provides the evaluation context for fast execution and custom diff --git a/src/Umbraco.Core/Xml/UmbracoXPathPathSyntaxParser.cs b/src/Umbraco.Core/Xml/UmbracoXPathPathSyntaxParser.cs index 08178b8fcd..e92aa8e147 100644 --- a/src/Umbraco.Core/Xml/UmbracoXPathPathSyntaxParser.cs +++ b/src/Umbraco.Core/Xml/UmbracoXPathPathSyntaxParser.cs @@ -2,7 +2,7 @@ using System.Collections.Generic; using System.Linq; -namespace Umbraco.Core.Xml +namespace Umbraco.Cms.Core.Xml { /// /// This is used to parse our customize Umbraco XPath expressions (i.e. that include special tokens like $site) into diff --git a/src/Umbraco.Core/Xml/XPath/INavigableContent.cs b/src/Umbraco.Core/Xml/XPath/INavigableContent.cs index c0b3192830..0e0848088a 100644 --- a/src/Umbraco.Core/Xml/XPath/INavigableContent.cs +++ b/src/Umbraco.Core/Xml/XPath/INavigableContent.cs @@ -1,6 +1,6 @@ using System.Collections.Generic; -namespace Umbraco.Core.Xml.XPath +namespace Umbraco.Cms.Core.Xml.XPath { /// /// Represents a content that can be navigated via XPath. diff --git a/src/Umbraco.Core/Xml/XPath/INavigableContentType.cs b/src/Umbraco.Core/Xml/XPath/INavigableContentType.cs index 1fff0b60bb..420cd6a487 100644 --- a/src/Umbraco.Core/Xml/XPath/INavigableContentType.cs +++ b/src/Umbraco.Core/Xml/XPath/INavigableContentType.cs @@ -1,9 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; - -namespace Umbraco.Core.Xml.XPath +namespace Umbraco.Cms.Core.Xml.XPath { /// /// Represents the type of a content that can be navigated via XPath. diff --git a/src/Umbraco.Core/Xml/XPath/INavigableFieldType.cs b/src/Umbraco.Core/Xml/XPath/INavigableFieldType.cs index d741060865..a9bbef3821 100644 --- a/src/Umbraco.Core/Xml/XPath/INavigableFieldType.cs +++ b/src/Umbraco.Core/Xml/XPath/INavigableFieldType.cs @@ -1,9 +1,6 @@ using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -namespace Umbraco.Core.Xml.XPath +namespace Umbraco.Cms.Core.Xml.XPath { /// /// Represents the type of a field of a content that can be navigated via XPath. diff --git a/src/Umbraco.Core/Xml/XPath/INavigableSource.cs b/src/Umbraco.Core/Xml/XPath/INavigableSource.cs index 7a605574d7..60243142d7 100644 --- a/src/Umbraco.Core/Xml/XPath/INavigableSource.cs +++ b/src/Umbraco.Core/Xml/XPath/INavigableSource.cs @@ -1,9 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; - -namespace Umbraco.Core.Xml.XPath +namespace Umbraco.Cms.Core.Xml.XPath { /// /// Represents a source of content that can be navigated via XPath. diff --git a/src/Umbraco.Core/Xml/XPath/MacroNavigator.cs b/src/Umbraco.Core/Xml/XPath/MacroNavigator.cs index dc2246834e..439d2b1ca3 100644 --- a/src/Umbraco.Core/Xml/XPath/MacroNavigator.cs +++ b/src/Umbraco.Core/Xml/XPath/MacroNavigator.cs @@ -5,7 +5,7 @@ using System.Linq; using System.Xml; using System.Xml.XPath; -namespace Umbraco.Core.Xml.XPath +namespace Umbraco.Cms.Core.Xml.XPath { /// /// Provides a cursor model for navigating {macro /} as if it were XML. diff --git a/src/Umbraco.Core/Xml/XPath/NavigableNavigator.cs b/src/Umbraco.Core/Xml/XPath/NavigableNavigator.cs index e178ab918e..68dfb9bb67 100644 --- a/src/Umbraco.Core/Xml/XPath/NavigableNavigator.cs +++ b/src/Umbraco.Core/Xml/XPath/NavigableNavigator.cs @@ -20,7 +20,7 @@ using System.Linq; using System.Xml; using System.Xml.XPath; -namespace Umbraco.Core.Xml.XPath +namespace Umbraco.Cms.Core.Xml.XPath { /// /// Provides a cursor model for navigating Umbraco data as if it were XML. diff --git a/src/Umbraco.Core/Xml/XPath/RenamedRootNavigator.cs b/src/Umbraco.Core/Xml/XPath/RenamedRootNavigator.cs index cd7fca3b2d..364560ebee 100644 --- a/src/Umbraco.Core/Xml/XPath/RenamedRootNavigator.cs +++ b/src/Umbraco.Core/Xml/XPath/RenamedRootNavigator.cs @@ -1,7 +1,7 @@ using System.Xml; using System.Xml.XPath; -namespace Umbraco.Core.Xml.XPath +namespace Umbraco.Cms.Core.Xml.XPath { public class RenamedRootNavigator : XPathNavigator { diff --git a/src/Umbraco.Core/Xml/XPathNavigatorExtensions.cs b/src/Umbraco.Core/Xml/XPathNavigatorExtensions.cs index bb3b41511b..8006d26da6 100644 --- a/src/Umbraco.Core/Xml/XPathNavigatorExtensions.cs +++ b/src/Umbraco.Core/Xml/XPathNavigatorExtensions.cs @@ -1,6 +1,10 @@ -using System.Xml.XPath; +// Copyright (c) Umbraco. +// See LICENSE for more details. -namespace Umbraco.Core.Xml +using System.Xml.XPath; +using Umbraco.Cms.Core.Xml; + +namespace Umbraco.Extensions { /// /// Provides extensions to XPathNavigator. diff --git a/src/Umbraco.Core/Xml/XPathVariable.cs b/src/Umbraco.Core/Xml/XPathVariable.cs index fc5765b822..9bfed8e98d 100644 --- a/src/Umbraco.Core/Xml/XPathVariable.cs +++ b/src/Umbraco.Core/Xml/XPathVariable.cs @@ -1,6 +1,6 @@ // source: mvpxml.codeplex.com -namespace Umbraco.Core.Xml +namespace Umbraco.Cms.Core.Xml { /// /// Represents a variable in an XPath query. diff --git a/src/Umbraco.Core/Xml/XmlHelper.cs b/src/Umbraco.Core/Xml/XmlHelper.cs index 44063bd7b7..ab171659fb 100644 --- a/src/Umbraco.Core/Xml/XmlHelper.cs +++ b/src/Umbraco.Core/Xml/XmlHelper.cs @@ -5,9 +5,9 @@ using System.Linq; using System.Text.RegularExpressions; using System.Xml; using System.Xml.XPath; -using Umbraco.Core.Hosting; +using Umbraco.Cms.Core.Hosting; -namespace Umbraco.Core.Xml +namespace Umbraco.Cms.Core.Xml { /// /// The XmlHelper class contains general helper methods for working with xml in umbraco. diff --git a/src/Umbraco.Core/Xml/XmlNamespaces.cs b/src/Umbraco.Core/Xml/XmlNamespaces.cs index a37c383980..1721de253f 100644 --- a/src/Umbraco.Core/Xml/XmlNamespaces.cs +++ b/src/Umbraco.Core/Xml/XmlNamespaces.cs @@ -1,6 +1,6 @@ // source: mvpxml.codeplex.com -namespace Umbraco.Core.Xml +namespace Umbraco.Cms.Core.Xml { /// /// Provides public constants for wellknown XML namespaces. diff --git a/src/Umbraco.Core/Xml/XmlNodeListFactory.cs b/src/Umbraco.Core/Xml/XmlNodeListFactory.cs index 0a5f2c859d..b0ab0dd3be 100644 --- a/src/Umbraco.Core/Xml/XmlNodeListFactory.cs +++ b/src/Umbraco.Core/Xml/XmlNodeListFactory.cs @@ -5,7 +5,7 @@ using System.Xml.XPath; // source: mvpxml.codeplex.com -namespace Umbraco.Core.Xml +namespace Umbraco.Cms.Core.Xml { public class XmlNodeListFactory { diff --git a/src/Umbraco.Examine.Lucene/BackOfficeExamineSearcher.cs b/src/Umbraco.Examine.Lucene/BackOfficeExamineSearcher.cs index 9551dc8b90..c9fab6b6fc 100644 --- a/src/Umbraco.Examine.Lucene/BackOfficeExamineSearcher.cs +++ b/src/Umbraco.Examine.Lucene/BackOfficeExamineSearcher.cs @@ -1,17 +1,21 @@ -using System; +// Copyright (c) Umbraco. +// See LICENSE for more details. + +using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Text.RegularExpressions; using Examine; -using Umbraco.Core; -using Umbraco.Core.Models; -using Umbraco.Core.Security; -using Umbraco.Core.Services; -using Umbraco.Web; -using Umbraco.Web.Models.ContentEditing; +using Umbraco.Cms.Core; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Core.Models.ContentEditing; +using Umbraco.Cms.Core.Security; +using Umbraco.Cms.Core.Services; +using Umbraco.Extensions; +using Constants = Umbraco.Cms.Core.Constants; -namespace Umbraco.Examine +namespace Umbraco.Cms.Infrastructure.Examine { public class BackOfficeExamineSearcher : IBackOfficeExamineSearcher { diff --git a/src/Umbraco.Examine.Lucene/ExamineLuceneComponent.cs b/src/Umbraco.Examine.Lucene/ExamineLuceneComponent.cs index 1bdb579e62..fe1826c989 100644 --- a/src/Umbraco.Examine.Lucene/ExamineLuceneComponent.cs +++ b/src/Umbraco.Examine.Lucene/ExamineLuceneComponent.cs @@ -1,12 +1,15 @@ -using Microsoft.Extensions.Logging; +// Copyright (c) Umbraco. +// See LICENSE for more details. + using Examine; using Examine.LuceneEngine.Directories; -using Umbraco.Core; -using Umbraco.Core.Composing; +using Microsoft.Extensions.Logging; +using Umbraco.Cms.Core.Composing; +using Umbraco.Cms.Core.Runtime; +using Umbraco.Extensions; -namespace Umbraco.Examine +namespace Umbraco.Cms.Infrastructure.Examine { - public sealed class ExamineLuceneComponent : IComponent { private readonly IndexRebuilder _indexRebuilder; diff --git a/src/Umbraco.Examine.Lucene/ExamineLuceneComposer.cs b/src/Umbraco.Examine.Lucene/ExamineLuceneComposer.cs index 05315b05fe..327ac4b4ba 100644 --- a/src/Umbraco.Examine.Lucene/ExamineLuceneComposer.cs +++ b/src/Umbraco.Examine.Lucene/ExamineLuceneComposer.cs @@ -1,8 +1,12 @@ -using System.Runtime.InteropServices; -using Umbraco.Core.DependencyInjection; -using Umbraco.Core.Composing; +// Copyright (c) Umbraco. +// See LICENSE for more details. -namespace Umbraco.Examine +using System.Runtime.InteropServices; +using Umbraco.Cms.Core.Composing; +using Umbraco.Cms.Core.DependencyInjection; +using Umbraco.Extensions; + +namespace Umbraco.Cms.Infrastructure.Examine { // We want to run after core composers since we are replacing some items [ComposeAfter(typeof(ICoreComposer))] diff --git a/src/Umbraco.Examine.Lucene/ExamineLuceneFinalComponent.cs b/src/Umbraco.Examine.Lucene/ExamineLuceneFinalComponent.cs index 745a5fb583..b95165b121 100644 --- a/src/Umbraco.Examine.Lucene/ExamineLuceneFinalComponent.cs +++ b/src/Umbraco.Examine.Lucene/ExamineLuceneFinalComponent.cs @@ -1,9 +1,13 @@ -using Microsoft.Extensions.Logging; -using Examine; -using Umbraco.Core; -using Umbraco.Core.Composing; +// Copyright (c) Umbraco. +// See LICENSE for more details. -namespace Umbraco.Examine +using Examine; +using Microsoft.Extensions.Logging; +using Umbraco.Cms.Core.Composing; +using Umbraco.Cms.Core.Runtime; +using Umbraco.Extensions; + +namespace Umbraco.Cms.Infrastructure.Examine { public class ExamineLuceneFinalComponent : IComponent { diff --git a/src/Umbraco.Examine.Lucene/ExamineLuceneFinalComposer.cs b/src/Umbraco.Examine.Lucene/ExamineLuceneFinalComposer.cs index 8f3656f67c..518ffc2db8 100644 --- a/src/Umbraco.Examine.Lucene/ExamineLuceneFinalComposer.cs +++ b/src/Umbraco.Examine.Lucene/ExamineLuceneFinalComposer.cs @@ -1,6 +1,9 @@ -using Umbraco.Core.Composing; +// Copyright (c) Umbraco. +// See LICENSE for more details. -namespace Umbraco.Examine +using Umbraco.Cms.Core.Composing; + +namespace Umbraco.Cms.Infrastructure.Examine { // examine's Lucene final composer composes after all user composers // and *also* after ICoreComposer (in case IUserComposer is disabled) diff --git a/src/Umbraco.Examine.Lucene/ExamineExtensions.cs b/src/Umbraco.Examine.Lucene/Extensions/ExamineExtensions.cs similarity index 96% rename from src/Umbraco.Examine.Lucene/ExamineExtensions.cs rename to src/Umbraco.Examine.Lucene/Extensions/ExamineExtensions.cs index 6f476ec79d..9307c4cbf4 100644 --- a/src/Umbraco.Examine.Lucene/ExamineExtensions.cs +++ b/src/Umbraco.Examine.Lucene/Extensions/ExamineExtensions.cs @@ -1,19 +1,22 @@ -using System; +// Copyright (c) Umbraco. +// See LICENSE for more details. + +using System; using System.Linq; -using Microsoft.Extensions.Logging; +using System.Threading; using Examine; using Examine.LuceneEngine.Providers; using Lucene.Net.Analysis; using Lucene.Net.Index; using Lucene.Net.QueryParsers; using Lucene.Net.Search; -using Umbraco.Core; +using Microsoft.Extensions.Logging; +using Umbraco.Cms.Core.Runtime; +using Umbraco.Cms.Infrastructure.Examine; using Version = Lucene.Net.Util.Version; -using System.Threading; -namespace Umbraco.Examine +namespace Umbraco.Extensions { - /// /// Extension methods for the LuceneIndex /// @@ -149,6 +152,5 @@ namespace Umbraco.Examine return reader.GetFieldNames(IndexReader.FieldOption.ALL).Count; } } - } } diff --git a/src/Umbraco.Examine.Lucene/ILuceneDirectoryFactory.cs b/src/Umbraco.Examine.Lucene/ILuceneDirectoryFactory.cs index f4946d491e..70f3825667 100644 --- a/src/Umbraco.Examine.Lucene/ILuceneDirectoryFactory.cs +++ b/src/Umbraco.Examine.Lucene/ILuceneDirectoryFactory.cs @@ -1,4 +1,7 @@ -namespace Umbraco.Examine +// Copyright (c) Umbraco. +// See LICENSE for more details. + +namespace Umbraco.Cms.Infrastructure.Examine { public interface ILuceneDirectoryFactory { diff --git a/src/Umbraco.Examine.Lucene/LuceneFileSystemDirectoryFactory.cs b/src/Umbraco.Examine.Lucene/LuceneFileSystemDirectoryFactory.cs index 32c441ab28..9e09c7e96e 100644 --- a/src/Umbraco.Examine.Lucene/LuceneFileSystemDirectoryFactory.cs +++ b/src/Umbraco.Examine.Lucene/LuceneFileSystemDirectoryFactory.cs @@ -1,17 +1,19 @@ -using Umbraco.Core.Configuration; -using Umbraco.Core; -using Umbraco.Core.Composing; -using Umbraco.Core.Hosting; -using Lucene.Net.Store; -using System.IO; +// Copyright (c) Umbraco. +// See LICENSE for more details. + using System; +using System.IO; using Examine.LuceneEngine.Directories; +using Lucene.Net.Store; using Microsoft.Extensions.Options; -using Umbraco.Core.Configuration.Models; +using Umbraco.Cms.Core.Composing; +using Umbraco.Cms.Core.Configuration.Models; +using Umbraco.Cms.Core.Hosting; +using Umbraco.Extensions; +using Constants = Umbraco.Cms.Core.Constants; -namespace Umbraco.Examine +namespace Umbraco.Cms.Infrastructure.Examine { - public class LuceneFileSystemDirectoryFactory : ILuceneDirectoryFactory { private readonly ITypeFinder _typeFinder; diff --git a/src/Umbraco.Examine.Lucene/LuceneIndexCreator.cs b/src/Umbraco.Examine.Lucene/LuceneIndexCreator.cs index 8ecb1b4421..dc2acfa66d 100644 --- a/src/Umbraco.Examine.Lucene/LuceneIndexCreator.cs +++ b/src/Umbraco.Examine.Lucene/LuceneIndexCreator.cs @@ -1,16 +1,14 @@ -using System; -using System.Collections.Generic; -using System.IO; -using Examine; -using Examine.LuceneEngine.Directories; -using Lucene.Net.Store; -using Microsoft.Extensions.Options; -using Umbraco.Core; -using Umbraco.Core.Composing; -using Umbraco.Core.Configuration.Models; -using Umbraco.Core.Hosting; +// Copyright (c) Umbraco. +// See LICENSE for more details. -namespace Umbraco.Examine +using System.Collections.Generic; +using Examine; +using Microsoft.Extensions.Options; +using Umbraco.Cms.Core.Composing; +using Umbraco.Cms.Core.Configuration.Models; +using Umbraco.Cms.Core.Hosting; + +namespace Umbraco.Cms.Infrastructure.Examine { /// /// @@ -29,6 +27,6 @@ namespace Umbraco.Examine _settings = settings.Value; } - public abstract IEnumerable Create(); + public abstract IEnumerable Create(); } } diff --git a/src/Umbraco.Examine.Lucene/LuceneIndexDiagnostics.cs b/src/Umbraco.Examine.Lucene/LuceneIndexDiagnostics.cs index 525f7372bf..1cba0767eb 100644 --- a/src/Umbraco.Examine.Lucene/LuceneIndexDiagnostics.cs +++ b/src/Umbraco.Examine.Lucene/LuceneIndexDiagnostics.cs @@ -1,14 +1,15 @@ -using System.Collections.Generic; -using Microsoft.Extensions.Logging; -using Examine.LuceneEngine.Providers; -using Umbraco.Core; -using Lucene.Net.Store; -using Umbraco.Core.IO; -using System.Linq; -using Umbraco.Core.Composing; -using Umbraco.Core.Hosting; +// Copyright (c) Umbraco. +// See LICENSE for more details. -namespace Umbraco.Examine +using System.Collections.Generic; +using Examine.LuceneEngine.Providers; +using Lucene.Net.Store; +using Microsoft.Extensions.Logging; +using Umbraco.Cms.Core; +using Umbraco.Cms.Core.Hosting; +using Umbraco.Extensions; + +namespace Umbraco.Cms.Infrastructure.Examine { public class LuceneIndexDiagnostics : IIndexDiagnostics { diff --git a/src/Umbraco.Examine.Lucene/LuceneIndexDiagnosticsFactory.cs b/src/Umbraco.Examine.Lucene/LuceneIndexDiagnosticsFactory.cs index feeac4bf77..322da710dc 100644 --- a/src/Umbraco.Examine.Lucene/LuceneIndexDiagnosticsFactory.cs +++ b/src/Umbraco.Examine.Lucene/LuceneIndexDiagnosticsFactory.cs @@ -1,10 +1,12 @@ -using Examine; +// Copyright (c) Umbraco. +// See LICENSE for more details. + +using Examine; using Examine.LuceneEngine.Providers; using Microsoft.Extensions.Logging; -using Umbraco.Core.Hosting; -using Umbraco.Core.IO; +using Umbraco.Cms.Core.Hosting; -namespace Umbraco.Examine +namespace Umbraco.Cms.Infrastructure.Examine { /// /// Implementation of which returns diff --git a/src/Umbraco.Examine.Lucene/LuceneRAMDirectoryFactory.cs b/src/Umbraco.Examine.Lucene/LuceneRAMDirectoryFactory.cs index 327328390b..1f9802f072 100644 --- a/src/Umbraco.Examine.Lucene/LuceneRAMDirectoryFactory.cs +++ b/src/Umbraco.Examine.Lucene/LuceneRAMDirectoryFactory.cs @@ -1,7 +1,10 @@ -using Lucene.Net.Store; -using System; +// Copyright (c) Umbraco. +// See LICENSE for more details. -namespace Umbraco.Examine +using System; +using Lucene.Net.Store; + +namespace Umbraco.Cms.Infrastructure.Examine { public class LuceneRAMDirectoryFactory : ILuceneDirectoryFactory { diff --git a/src/Umbraco.Examine.Lucene/NoPrefixSimpleFsLockFactory.cs b/src/Umbraco.Examine.Lucene/NoPrefixSimpleFsLockFactory.cs index 7c83223d0b..38d704e681 100644 --- a/src/Umbraco.Examine.Lucene/NoPrefixSimpleFsLockFactory.cs +++ b/src/Umbraco.Examine.Lucene/NoPrefixSimpleFsLockFactory.cs @@ -1,7 +1,10 @@ +// Copyright (c) Umbraco. +// See LICENSE for more details. + using System.IO; using Lucene.Net.Store; -namespace Umbraco.Examine +namespace Umbraco.Cms.Infrastructure.Examine { /// /// A custom that ensures a prefixless lock prefix @@ -21,6 +24,5 @@ namespace Umbraco.Examine get => base.LockPrefix; set => base.LockPrefix = null; //always set to null } - } -} \ No newline at end of file +} diff --git a/src/Umbraco.Examine.Lucene/Umbraco.Examine.Lucene.csproj b/src/Umbraco.Examine.Lucene/Umbraco.Examine.Lucene.csproj index 137d4d425c..71f10f003b 100644 --- a/src/Umbraco.Examine.Lucene/Umbraco.Examine.Lucene.csproj +++ b/src/Umbraco.Examine.Lucene/Umbraco.Examine.Lucene.csproj @@ -2,17 +2,17 @@ net472 - Umbraco.Examine + Umbraco.Cms.Infrastructure.Examine Umbraco CMS + Umbraco.Examine Umbraco.Examine.Lucene - 8 true bin\Release\Umbraco.Examine.Lucene.xml - + diff --git a/src/Umbraco.Examine.Lucene/UmbracoContentIndex.cs b/src/Umbraco.Examine.Lucene/UmbracoContentIndex.cs index 0dcf269902..16806c530a 100644 --- a/src/Umbraco.Examine.Lucene/UmbracoContentIndex.cs +++ b/src/Umbraco.Examine.Lucene/UmbracoContentIndex.cs @@ -1,21 +1,19 @@ -using System; +// Copyright (c) Umbraco. +// See LICENSE for more details. + +using System; using System.Collections.Generic; -using System.Collections.Specialized; -using System.ComponentModel; using System.Linq; -using Microsoft.Extensions.Logging; using Examine; -using Umbraco.Core; -using Umbraco.Core.Services; +using Examine.LuceneEngine; using Lucene.Net.Analysis; using Lucene.Net.Store; -using Umbraco.Core.Composing; -using Umbraco.Core.Logging; -using Examine.LuceneEngine; -using Umbraco.Core.Hosting; -using Umbraco.Core.IO; +using Microsoft.Extensions.Logging; +using Umbraco.Cms.Core.Hosting; +using Umbraco.Cms.Core.Logging; +using Umbraco.Cms.Core.Services; -namespace Umbraco.Examine +namespace Umbraco.Cms.Infrastructure.Examine { /// /// An indexer for Umbraco content and media diff --git a/src/Umbraco.Examine.Lucene/UmbracoExamineIndex.cs b/src/Umbraco.Examine.Lucene/UmbracoExamineIndex.cs index ceec013eaa..3dc3176c11 100644 --- a/src/Umbraco.Examine.Lucene/UmbracoExamineIndex.cs +++ b/src/Umbraco.Examine.Lucene/UmbracoExamineIndex.cs @@ -1,21 +1,24 @@ -using System; +// Copyright (c) Umbraco. +// See LICENSE for more details. + +using System; using System.Collections.Generic; using System.Linq; +using Examine; +using Examine.LuceneEngine; using Examine.LuceneEngine.Providers; using Lucene.Net.Analysis; using Lucene.Net.Documents; using Lucene.Net.Index; -using Umbraco.Core; -using Examine; -using Examine.LuceneEngine; using Lucene.Net.Store; -using Umbraco.Core.Hosting; -using Umbraco.Core.IO; -using Umbraco.Core.Logging; -using Directory = Lucene.Net.Store.Directory; using Microsoft.Extensions.Logging; +using Umbraco.Cms.Core; +using Umbraco.Cms.Core.Hosting; +using Umbraco.Cms.Core.Logging; +using Umbraco.Cms.Core.Services; +using Directory = Lucene.Net.Store.Directory; -namespace Umbraco.Examine +namespace Umbraco.Cms.Infrastructure.Examine { /// diff --git a/src/Umbraco.Examine.Lucene/UmbracoExamineIndexDiagnostics.cs b/src/Umbraco.Examine.Lucene/UmbracoExamineIndexDiagnostics.cs index 5952f410fc..b8e6a20e68 100644 --- a/src/Umbraco.Examine.Lucene/UmbracoExamineIndexDiagnostics.cs +++ b/src/Umbraco.Examine.Lucene/UmbracoExamineIndexDiagnostics.cs @@ -1,12 +1,12 @@ -using System.Collections.Generic; +// Copyright (c) Umbraco. +// See LICENSE for more details. + +using System.Collections.Generic; using System.Linq; using Microsoft.Extensions.Logging; -using Lucene.Net.Store; -using Umbraco.Core; -using Umbraco.Core.Hosting; -using Umbraco.Core.IO; +using Umbraco.Cms.Core.Hosting; -namespace Umbraco.Examine +namespace Umbraco.Cms.Infrastructure.Examine { public class UmbracoExamineIndexDiagnostics : LuceneIndexDiagnostics { diff --git a/src/Umbraco.Examine.Lucene/UmbracoIndexesCreator.cs b/src/Umbraco.Examine.Lucene/UmbracoIndexesCreator.cs index 2184108b4a..aa7b30677f 100644 --- a/src/Umbraco.Examine.Lucene/UmbracoIndexesCreator.cs +++ b/src/Umbraco.Examine.Lucene/UmbracoIndexesCreator.cs @@ -1,21 +1,21 @@ -using System.Collections.Generic; -using Umbraco.Core.Logging; -using Umbraco.Core.Services; -using Lucene.Net.Analysis.Standard; -using Examine.LuceneEngine; +// Copyright (c) Umbraco. +// See LICENSE for more details. + +using System.Collections.Generic; using Examine; -using Umbraco.Core.Configuration; -using Umbraco.Core; -using Umbraco.Core.Composing; -using Umbraco.Core.Hosting; -using Umbraco.Core.IO; -using Umbraco.Core.Configuration.Models; -using Microsoft.Extensions.Options; +using Examine.LuceneEngine; +using Lucene.Net.Analysis.Standard; using Microsoft.Extensions.Logging; +using Microsoft.Extensions.Options; +using Umbraco.Cms.Core.Composing; +using Umbraco.Cms.Core.Configuration.Models; +using Umbraco.Cms.Core.Hosting; +using Umbraco.Cms.Core.Logging; +using Umbraco.Cms.Core.Services; +using Constants = Umbraco.Cms.Core.Constants; -namespace Umbraco.Examine +namespace Umbraco.Cms.Infrastructure.Examine { - /// /// Creates the indexes used by Umbraco /// diff --git a/src/Umbraco.Examine.Lucene/UmbracoMemberIndex.cs b/src/Umbraco.Examine.Lucene/UmbracoMemberIndex.cs index a753df15ee..3889209fdb 100644 --- a/src/Umbraco.Examine.Lucene/UmbracoMemberIndex.cs +++ b/src/Umbraco.Examine.Lucene/UmbracoMemberIndex.cs @@ -1,15 +1,16 @@ -using Examine; +// Copyright (c) Umbraco. +// See LICENSE for more details. + +using Examine; using Lucene.Net.Analysis; using Microsoft.Extensions.Logging; -using Umbraco.Core; -using Umbraco.Core.Hosting; -using Umbraco.Core.IO; -using Umbraco.Core.Logging; +using Umbraco.Cms.Core.Hosting; +using Umbraco.Cms.Core.Logging; +using Umbraco.Cms.Core.Services; using Directory = Lucene.Net.Store.Directory; -namespace Umbraco.Examine +namespace Umbraco.Cms.Infrastructure.Examine { - /// /// Custom indexer for members /// diff --git a/src/Umbraco.Infrastructure/Cache/DatabaseServerMessengerNotificationHandler.cs b/src/Umbraco.Infrastructure/Cache/DatabaseServerMessengerNotificationHandler.cs index fc3f66c28f..ac35f442c1 100644 --- a/src/Umbraco.Infrastructure/Cache/DatabaseServerMessengerNotificationHandler.cs +++ b/src/Umbraco.Infrastructure/Cache/DatabaseServerMessengerNotificationHandler.cs @@ -1,12 +1,12 @@ -using Microsoft.Extensions.Logging; -using Umbraco.Core.Events; -using Umbraco.Core.Persistence; -using Umbraco.Core.Sync; -using Umbraco.Web; -using Umbraco.Web.Cache; -using Umbraco.Web.Routing; +// Copyright (c) Umbraco. +// See LICENSE for more details. -namespace Umbraco.Infrastructure.Cache +using Microsoft.Extensions.Logging; +using Umbraco.Cms.Core.Events; +using Umbraco.Cms.Core.Sync; +using Umbraco.Cms.Infrastructure.Persistence; + +namespace Umbraco.Cms.Core.Cache { /// /// Ensures that distributed cache events are setup and the is initialized diff --git a/src/Umbraco.Infrastructure/Cache/DefaultRepositoryCachePolicy.cs b/src/Umbraco.Infrastructure/Cache/DefaultRepositoryCachePolicy.cs index e4102e8684..106451d32a 100644 --- a/src/Umbraco.Infrastructure/Cache/DefaultRepositoryCachePolicy.cs +++ b/src/Umbraco.Infrastructure/Cache/DefaultRepositoryCachePolicy.cs @@ -1,10 +1,14 @@ -using System; +// Copyright (c) Umbraco. +// See LICENSE for more details. + +using System; using System.Collections.Generic; using System.Linq; -using Umbraco.Core.Models.Entities; -using Umbraco.Core.Scoping; +using Umbraco.Cms.Core.Models.Entities; +using Umbraco.Cms.Core.Scoping; +using Umbraco.Extensions; -namespace Umbraco.Core.Cache +namespace Umbraco.Cms.Core.Cache { /// /// Represents the default cache policy. diff --git a/src/Umbraco.Infrastructure/Cache/DistributedCacheBinder.cs b/src/Umbraco.Infrastructure/Cache/DistributedCacheBinder.cs index 67987915ac..7f0b33cfc6 100644 --- a/src/Umbraco.Infrastructure/Cache/DistributedCacheBinder.cs +++ b/src/Umbraco.Infrastructure/Cache/DistributedCacheBinder.cs @@ -1,13 +1,17 @@ +// Copyright (c) Umbraco. +// See LICENSE for more details. + using System; using System.Collections.Concurrent; using System.Collections.Generic; using System.Linq; using System.Reflection; using Microsoft.Extensions.Logging; -using Umbraco.Core; -using Umbraco.Core.Events; +using Umbraco.Cms.Core.Events; +using Umbraco.Cms.Core.Web; +using Umbraco.Extensions; -namespace Umbraco.Web.Cache +namespace Umbraco.Cms.Core.Cache { /// /// Default implementation. diff --git a/src/Umbraco.Infrastructure/Cache/DistributedCacheBinder_Handlers.cs b/src/Umbraco.Infrastructure/Cache/DistributedCacheBinder_Handlers.cs index b846d5467a..99c1d2b0ee 100644 --- a/src/Umbraco.Infrastructure/Cache/DistributedCacheBinder_Handlers.cs +++ b/src/Umbraco.Infrastructure/Cache/DistributedCacheBinder_Handlers.cs @@ -1,16 +1,19 @@ -using System; +// Copyright (c) Umbraco. +// See LICENSE for more details. + +using System; using System.Collections.Generic; using System.Linq; using Microsoft.Extensions.Logging; -using Umbraco.Core.Events; -using Umbraco.Core.Models; -using Umbraco.Core.Models.Membership; -using Umbraco.Core.Services; -using Umbraco.Core.Services.Changes; -using Umbraco.Core.Services.Implement; -using Umbraco.Infrastructure.Services.Implement; +using Umbraco.Cms.Core.Events; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Core.Models.Membership; +using Umbraco.Cms.Core.Services; +using Umbraco.Cms.Core.Services.Changes; +using Umbraco.Cms.Core.Services.Implement; +using Umbraco.Extensions; -namespace Umbraco.Web.Cache +namespace Umbraco.Cms.Core.Cache { /// /// Default implementation. diff --git a/src/Umbraco.Infrastructure/Cache/DistributedCacheExtensions.cs b/src/Umbraco.Infrastructure/Cache/DistributedCacheExtensions.cs index ef968e8fa6..e28af2f49d 100644 --- a/src/Umbraco.Infrastructure/Cache/DistributedCacheExtensions.cs +++ b/src/Umbraco.Infrastructure/Cache/DistributedCacheExtensions.cs @@ -1,8 +1,12 @@ -using System.Linq; -using Umbraco.Core.Models; -using Umbraco.Core.Services.Changes; +// Copyright (c) Umbraco. +// See LICENSE for more details. -namespace Umbraco.Web.Cache +using System.Linq; +using Umbraco.Cms.Core.Cache; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Core.Services.Changes; + +namespace Umbraco.Extensions { /// /// Extension methods for . diff --git a/src/Umbraco.Infrastructure/Cache/FullDataSetRepositoryCachePolicy.cs b/src/Umbraco.Infrastructure/Cache/FullDataSetRepositoryCachePolicy.cs index c3b69d9a6d..a04cd69900 100644 --- a/src/Umbraco.Infrastructure/Cache/FullDataSetRepositoryCachePolicy.cs +++ b/src/Umbraco.Infrastructure/Cache/FullDataSetRepositoryCachePolicy.cs @@ -1,11 +1,15 @@ -using System; +// Copyright (c) Umbraco. +// See LICENSE for more details. + +using System; using System.Collections.Generic; using System.Linq; -using Umbraco.Core.Collections; -using Umbraco.Core.Models.Entities; -using Umbraco.Core.Scoping; +using Umbraco.Cms.Core.Collections; +using Umbraco.Cms.Core.Models.Entities; +using Umbraco.Cms.Core.Scoping; +using Umbraco.Extensions; -namespace Umbraco.Core.Cache +namespace Umbraco.Cms.Core.Cache { /// /// Represents a caching policy that caches the entire entities set as a single collection. diff --git a/src/Umbraco.Infrastructure/Cache/RepositoryCachePolicyBase.cs b/src/Umbraco.Infrastructure/Cache/RepositoryCachePolicyBase.cs index 33258cbf06..8913de956b 100644 --- a/src/Umbraco.Infrastructure/Cache/RepositoryCachePolicyBase.cs +++ b/src/Umbraco.Infrastructure/Cache/RepositoryCachePolicyBase.cs @@ -1,9 +1,12 @@ -using System; -using System.Collections.Generic; -using Umbraco.Core.Models.Entities; -using Umbraco.Core.Scoping; +// Copyright (c) Umbraco. +// See LICENSE for more details. -namespace Umbraco.Core.Cache +using System; +using System.Collections.Generic; +using Umbraco.Cms.Core.Models.Entities; +using Umbraco.Cms.Core.Scoping; + +namespace Umbraco.Cms.Core.Cache { /// /// A base class for repository cache policies. diff --git a/src/Umbraco.Infrastructure/Cache/SingleItemsOnlyRepositoryCachePolicy.cs b/src/Umbraco.Infrastructure/Cache/SingleItemsOnlyRepositoryCachePolicy.cs index 9de7519edb..5b1420be65 100644 --- a/src/Umbraco.Infrastructure/Cache/SingleItemsOnlyRepositoryCachePolicy.cs +++ b/src/Umbraco.Infrastructure/Cache/SingleItemsOnlyRepositoryCachePolicy.cs @@ -1,7 +1,10 @@ -using Umbraco.Core.Models.Entities; -using Umbraco.Core.Scoping; +// Copyright (c) Umbraco. +// See LICENSE for more details. -namespace Umbraco.Core.Cache +using Umbraco.Cms.Core.Models.Entities; +using Umbraco.Cms.Core.Scoping; + +namespace Umbraco.Cms.Core.Cache { /// /// Represents a special policy that does not cache the result of GetAll. diff --git a/src/Umbraco.Infrastructure/Compose/AuditEventsComponent.cs b/src/Umbraco.Infrastructure/Compose/AuditEventsComponent.cs index 41c406065f..7c526d330c 100644 --- a/src/Umbraco.Infrastructure/Compose/AuditEventsComponent.cs +++ b/src/Umbraco.Infrastructure/Compose/AuditEventsComponent.cs @@ -1,20 +1,19 @@ -using System; +using System; using System.Linq; using System.Text; -using System.Threading; using Microsoft.Extensions.Options; -using Umbraco.Core.Composing; -using Umbraco.Core.Configuration.Models; -using Umbraco.Core.Events; -using Umbraco.Core.Models; -using Umbraco.Core.Models.Membership; -using Umbraco.Core.Services; -using Umbraco.Core.Services.Implement; +using Umbraco.Cms.Core.Composing; +using Umbraco.Cms.Core.Configuration.Models; +using Umbraco.Cms.Core.Events; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Core.Models.Membership; +using Umbraco.Cms.Core.Net; +using Umbraco.Cms.Core.Security; +using Umbraco.Cms.Core.Services; +using Umbraco.Cms.Core.Services.Implement; using Umbraco.Extensions; -using Umbraco.Infrastructure.Services.Implement; -using Umbraco.Net; -namespace Umbraco.Core.Compose +namespace Umbraco.Cms.Core.Compose { public sealed class AuditEventsComponent : IComponent { @@ -22,14 +21,22 @@ namespace Umbraco.Core.Compose private readonly IUserService _userService; private readonly IEntityService _entityService; private readonly IIpResolver _ipResolver; + private readonly IBackOfficeSecurityAccessor _backOfficeSecurityAccessor; private readonly GlobalSettings _globalSettings; - public AuditEventsComponent(IAuditService auditService, IUserService userService, IEntityService entityService, IIpResolver ipResolver, IOptions globalSettings) + public AuditEventsComponent( + IAuditService auditService, + IUserService userService, + IEntityService entityService, + IIpResolver ipResolver, + IOptions globalSettings, + IBackOfficeSecurityAccessor backOfficeSecurityAccessor) { _auditService = auditService; _userService = userService; _entityService = entityService; _ipResolver = ipResolver; + _backOfficeSecurityAccessor = backOfficeSecurityAccessor; _globalSettings = globalSettings.Value; } @@ -63,13 +70,13 @@ namespace Umbraco.Core.Compose MemberService.Exported -= OnMemberExported; } - public static IUser UnknownUser(GlobalSettings globalSettings) => new User(globalSettings) { Id = Constants.Security.UnknownUserId, Name = Constants.Security.UnknownUserName, Email = "" }; + public static IUser UnknownUser(GlobalSettings globalSettings) => new User(globalSettings) { Id = Cms.Core.Constants.Security.UnknownUserId, Name = Cms.Core.Constants.Security.UnknownUserName, Email = "" }; private IUser CurrentPerformingUser { get { - var identity = Thread.CurrentPrincipal?.GetUmbracoIdentity(); + var identity = _backOfficeSecurityAccessor.BackOfficeSecurity.CurrentUser; var user = identity == null ? null : _userService.GetUserById(Convert.ToInt32(identity.Id)); return user ?? UnknownUser(_globalSettings); } diff --git a/src/Umbraco.Infrastructure/Compose/AuditEventsComposer.cs b/src/Umbraco.Infrastructure/Compose/AuditEventsComposer.cs index 339d106087..b6d5f60765 100644 --- a/src/Umbraco.Infrastructure/Compose/AuditEventsComposer.cs +++ b/src/Umbraco.Infrastructure/Compose/AuditEventsComposer.cs @@ -1,6 +1,6 @@ -using Umbraco.Core.Composing; +using Umbraco.Cms.Core.Composing; -namespace Umbraco.Core.Compose +namespace Umbraco.Cms.Core.Compose { public sealed class AuditEventsComposer : ComponentComposer, ICoreComposer { } diff --git a/src/Umbraco.Infrastructure/Compose/BlockEditorComponent.cs b/src/Umbraco.Infrastructure/Compose/BlockEditorComponent.cs index a8b4cfb8ca..f54b52db51 100644 --- a/src/Umbraco.Infrastructure/Compose/BlockEditorComponent.cs +++ b/src/Umbraco.Infrastructure/Compose/BlockEditorComponent.cs @@ -3,12 +3,12 @@ using System.Collections.Generic; using System.Linq; using Newtonsoft.Json; using Newtonsoft.Json.Linq; -using Umbraco.Core; -using Umbraco.Core.Composing; -using Umbraco.Core.Models.Blocks; -using Umbraco.Core.PropertyEditors; +using Umbraco.Cms.Core.Composing; +using Umbraco.Cms.Core.Models.Blocks; +using Umbraco.Cms.Core.PropertyEditors; +using Umbraco.Extensions; -namespace Umbraco.Web.Compose +namespace Umbraco.Cms.Core.Compose { /// /// A component for Block editors used to bind to events diff --git a/src/Umbraco.Infrastructure/Compose/BlockEditorComposer.cs b/src/Umbraco.Infrastructure/Compose/BlockEditorComposer.cs index c0ab3c42b5..bcc70e1748 100644 --- a/src/Umbraco.Infrastructure/Compose/BlockEditorComposer.cs +++ b/src/Umbraco.Infrastructure/Compose/BlockEditorComposer.cs @@ -1,6 +1,6 @@ -using Umbraco.Core.Composing; +using Umbraco.Cms.Core.Composing; -namespace Umbraco.Web.Compose +namespace Umbraco.Cms.Core.Compose { /// /// A composer for Block editors to run a component diff --git a/src/Umbraco.Infrastructure/Compose/NestedContentPropertyComponent.cs b/src/Umbraco.Infrastructure/Compose/NestedContentPropertyComponent.cs index 7116b3eb86..332c2464ad 100644 --- a/src/Umbraco.Infrastructure/Compose/NestedContentPropertyComponent.cs +++ b/src/Umbraco.Infrastructure/Compose/NestedContentPropertyComponent.cs @@ -1,14 +1,12 @@ using System; using System.Linq; using Newtonsoft.Json.Linq; -using Umbraco.Core; -using Umbraco.Core.Composing; -using Umbraco.Core.PropertyEditors; -using Umbraco.Web.PropertyEditors; +using Umbraco.Cms.Core.Composing; +using Umbraco.Cms.Core.PropertyEditors; +using Umbraco.Extensions; -namespace Umbraco.Web.Compose +namespace Umbraco.Cms.Core.Compose { - /// /// A component for NestedContent used to bind to events /// diff --git a/src/Umbraco.Infrastructure/Compose/NestedContentPropertyComposer.cs b/src/Umbraco.Infrastructure/Compose/NestedContentPropertyComposer.cs index e357cf849b..c8cddd6d08 100644 --- a/src/Umbraco.Infrastructure/Compose/NestedContentPropertyComposer.cs +++ b/src/Umbraco.Infrastructure/Compose/NestedContentPropertyComposer.cs @@ -1,7 +1,6 @@ -using Umbraco.Core; -using Umbraco.Core.Composing; +using Umbraco.Cms.Core.Composing; -namespace Umbraco.Web.Compose +namespace Umbraco.Cms.Core.Compose { /// /// A composer for nested content to run a component diff --git a/src/Umbraco.Infrastructure/Compose/NotificationsComponent.cs b/src/Umbraco.Infrastructure/Compose/NotificationsComponent.cs index ad3efc88df..068a8bceea 100644 --- a/src/Umbraco.Infrastructure/Compose/NotificationsComponent.cs +++ b/src/Umbraco.Infrastructure/Compose/NotificationsComponent.cs @@ -1,22 +1,26 @@ -using System; +// Copyright (c) Umbraco. +// See LICENSE for more details. + +using System; using System.Collections.Generic; using System.Globalization; using System.Linq; using Microsoft.Extensions.Logging; using Microsoft.Extensions.Options; -using Umbraco.Core; -using Umbraco.Core.Composing; -using Umbraco.Core.Configuration.Models; -using Umbraco.Core.Hosting; -using Umbraco.Core.Models; -using Umbraco.Core.Models.Entities; -using Umbraco.Core.Models.Membership; -using Umbraco.Core.Security; -using Umbraco.Core.Services; -using Umbraco.Core.Services.Implement; -using Umbraco.Web.Actions; +using Umbraco.Cms.Core.Actions; +using Umbraco.Cms.Core.Composing; +using Umbraco.Cms.Core.Configuration.Models; +using Umbraco.Cms.Core.Events; +using Umbraco.Cms.Core.Hosting; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Core.Models.Entities; +using Umbraco.Cms.Core.Models.Membership; +using Umbraco.Cms.Core.Security; +using Umbraco.Cms.Core.Services; +using Umbraco.Cms.Core.Services.Implement; +using Umbraco.Extensions; -namespace Umbraco.Web.Compose +namespace Umbraco.Cms.Core.Compose { public sealed class NotificationsComponent : IComponent { @@ -72,40 +76,40 @@ namespace Umbraco.Web.Compose UserService.UserGroupPermissionsAssigned -= UserService_UserGroupPermissionsAssigned; } - private void UserService_UserGroupPermissionsAssigned(IUserService sender, Core.Events.SaveEventArgs args) + private void UserService_UserGroupPermissionsAssigned(IUserService sender, SaveEventArgs args) => UserServiceUserGroupPermissionsAssigned(args, _contentService); - private void PublicAccessService_Saved(IPublicAccessService sender, Core.Events.SaveEventArgs args) + private void PublicAccessService_Saved(IPublicAccessService sender, SaveEventArgs args) => PublicAccessServiceSaved(args, _contentService); - private void ContentService_RolledBack(IContentService sender, Core.Events.RollbackEventArgs args) + private void ContentService_RolledBack(IContentService sender, RollbackEventArgs args) => _notifier.Notify(_actions.GetAction(), args.Entity); - private void ContentService_Copied(IContentService sender, Core.Events.CopyEventArgs args) + private void ContentService_Copied(IContentService sender, CopyEventArgs args) => _notifier.Notify(_actions.GetAction(), args.Original); - private void ContentService_Trashed(IContentService sender, Core.Events.MoveEventArgs args) + private void ContentService_Trashed(IContentService sender, MoveEventArgs args) => _notifier.Notify(_actions.GetAction(), args.MoveInfoCollection.Select(m => m.Entity).ToArray()); - private void ContentService_Moved(IContentService sender, Core.Events.MoveEventArgs args) + private void ContentService_Moved(IContentService sender, MoveEventArgs args) => ContentServiceMoved(args); - private void ContentService_Unpublished(IContentService sender, Core.Events.PublishEventArgs args) + private void ContentService_Unpublished(IContentService sender, PublishEventArgs args) => _notifier.Notify(_actions.GetAction(), args.PublishedEntities.ToArray()); - private void ContentService_Saved(IContentService sender, Core.Events.ContentSavedEventArgs args) + private void ContentService_Saved(IContentService sender, ContentSavedEventArgs args) => ContentServiceSaved(args); - private void ContentService_Sorted(IContentService sender, Core.Events.SaveEventArgs args) + private void ContentService_Sorted(IContentService sender, SaveEventArgs args) => ContentServiceSorted(sender, args); - private void ContentService_Published(IContentService sender, Core.Events.ContentPublishedEventArgs args) + private void ContentService_Published(IContentService sender, ContentPublishedEventArgs args) => _notifier.Notify(_actions.GetAction(), args.PublishedEntities.ToArray()); - private void ContentService_SentToPublish(IContentService sender, Core.Events.SendToPublishEventArgs args) + private void ContentService_SentToPublish(IContentService sender, SendToPublishEventArgs args) => _notifier.Notify(_actions.GetAction(), args.Entity); - private void ContentServiceSorted(IContentService sender, Core.Events.SaveEventArgs args) + private void ContentServiceSorted(IContentService sender, SaveEventArgs args) { var parentId = args.SavedEntities.Select(x => x.ParentId).Distinct().ToList(); if (parentId.Count != 1) return; // this shouldn't happen, for sorting all entities will have the same parent id @@ -120,7 +124,7 @@ namespace Umbraco.Web.Compose _notifier.Notify(_actions.GetAction(), new[] { parent }); } - private void ContentServiceSaved(Core.Events.SaveEventArgs args) + private void ContentServiceSaved(SaveEventArgs args) { var newEntities = new List(); var updatedEntities = new List(); @@ -144,7 +148,7 @@ namespace Umbraco.Web.Compose _notifier.Notify(_actions.GetAction(), updatedEntities.ToArray()); } - private void UserServiceUserGroupPermissionsAssigned(Core.Events.SaveEventArgs args, IContentService contentService) + private void UserServiceUserGroupPermissionsAssigned(SaveEventArgs args, IContentService contentService) { var entities = contentService.GetByIds(args.SavedEntities.Select(e => e.EntityId)).ToArray(); if (entities.Any() == false) @@ -154,7 +158,7 @@ namespace Umbraco.Web.Compose _notifier.Notify(_actions.GetAction(), entities); } - private void ContentServiceMoved(Core.Events.MoveEventArgs args) + private void ContentServiceMoved(MoveEventArgs args) { // notify about the move for all moved items _notifier.Notify(_actions.GetAction(), args.MoveInfoCollection.Select(m => m.Entity).ToArray()); @@ -170,7 +174,7 @@ namespace Umbraco.Web.Compose } } - private void PublicAccessServiceSaved(Core.Events.SaveEventArgs args, IContentService contentService) + private void PublicAccessServiceSaved(SaveEventArgs args, IContentService contentService) { var entities = contentService.GetByIds(args.SavedEntities.Select(e => e.ProtectedNodeId)).ToArray(); if (entities.Any() == false) diff --git a/src/Umbraco.Infrastructure/Compose/NotificationsComposer.cs b/src/Umbraco.Infrastructure/Compose/NotificationsComposer.cs index 79066dedd7..21e473bb87 100644 --- a/src/Umbraco.Infrastructure/Compose/NotificationsComposer.cs +++ b/src/Umbraco.Infrastructure/Compose/NotificationsComposer.cs @@ -1,7 +1,8 @@ -using Umbraco.Core.DependencyInjection; -using Umbraco.Core.Composing; +using Umbraco.Cms.Core.Composing; +using Umbraco.Cms.Core.DependencyInjection; +using Umbraco.Extensions; -namespace Umbraco.Web.Compose +namespace Umbraco.Cms.Core.Compose { public sealed class NotificationsComposer : ComponentComposer, ICoreComposer { diff --git a/src/Umbraco.Infrastructure/Compose/PublicAccessComponent.cs b/src/Umbraco.Infrastructure/Compose/PublicAccessComponent.cs index a917cfe0ef..b8c60c9d8a 100644 --- a/src/Umbraco.Infrastructure/Compose/PublicAccessComponent.cs +++ b/src/Umbraco.Infrastructure/Compose/PublicAccessComponent.cs @@ -1,10 +1,12 @@ using System; -using Umbraco.Core; -using Umbraco.Core.Composing; -using Umbraco.Core.Services; -using Umbraco.Core.Services.Implement; +using Umbraco.Cms.Core.Composing; +using Umbraco.Cms.Core.Events; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Core.Services; +using Umbraco.Cms.Core.Services.Implement; +using Umbraco.Extensions; -namespace Umbraco.Web.Compose +namespace Umbraco.Cms.Core.Compose { public sealed class PublicAccessComponent : IComponent { @@ -24,7 +26,7 @@ namespace Umbraco.Web.Compose MemberGroupService.Saved -= MemberGroupService_Saved; } - private void MemberGroupService_Saved(IMemberGroupService sender, Core.Events.SaveEventArgs e) + private void MemberGroupService_Saved(IMemberGroupService sender, SaveEventArgs e) { foreach (var grp in e.SavedEntities) { diff --git a/src/Umbraco.Infrastructure/Compose/PublicAccessComposer.cs b/src/Umbraco.Infrastructure/Compose/PublicAccessComposer.cs index 3a23f7da34..71e48c44d1 100644 --- a/src/Umbraco.Infrastructure/Compose/PublicAccessComposer.cs +++ b/src/Umbraco.Infrastructure/Compose/PublicAccessComposer.cs @@ -1,6 +1,6 @@ -using Umbraco.Core.Composing; +using Umbraco.Cms.Core.Composing; -namespace Umbraco.Web.Compose +namespace Umbraco.Cms.Core.Compose { /// /// Used to ensure that the public access data file is kept up to date properly diff --git a/src/Umbraco.Infrastructure/Compose/RelateOnCopyComponent.cs b/src/Umbraco.Infrastructure/Compose/RelateOnCopyComponent.cs index 3418dfcfc0..c24e7614e3 100644 --- a/src/Umbraco.Infrastructure/Compose/RelateOnCopyComponent.cs +++ b/src/Umbraco.Infrastructure/Compose/RelateOnCopyComponent.cs @@ -1,9 +1,10 @@ -using Umbraco.Core.Composing; -using Umbraco.Core.Models; -using Umbraco.Core.Services; -using Umbraco.Core.Services.Implement; +using Umbraco.Cms.Core.Composing; +using Umbraco.Cms.Core.Events; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Core.Services; +using Umbraco.Cms.Core.Services.Implement; -namespace Umbraco.Core.Compose +namespace Umbraco.Cms.Core.Compose { // TODO: This should just exist in the content service/repo! public sealed class RelateOnCopyComponent : IComponent @@ -27,20 +28,20 @@ namespace Umbraco.Core.Compose ContentService.Copied -= ContentServiceCopied; } - private void ContentServiceCopied(IContentService sender, Events.CopyEventArgs e) + private void ContentServiceCopied(IContentService sender, CopyEventArgs e) { if (e.RelateToOriginal == false) return; - var relationType = _relationService.GetRelationTypeByAlias(Constants.Conventions.RelationTypes.RelateDocumentOnCopyAlias); + var relationType = _relationService.GetRelationTypeByAlias(Cms.Core.Constants.Conventions.RelationTypes.RelateDocumentOnCopyAlias); if (relationType == null) { - relationType = new RelationType(Constants.Conventions.RelationTypes.RelateDocumentOnCopyAlias, - Constants.Conventions.RelationTypes.RelateDocumentOnCopyName, + relationType = new RelationType(Cms.Core.Constants.Conventions.RelationTypes.RelateDocumentOnCopyAlias, + Cms.Core.Constants.Conventions.RelationTypes.RelateDocumentOnCopyName, true, - Constants.ObjectTypes.Document, - Constants.ObjectTypes.Document); + Cms.Core.Constants.ObjectTypes.Document, + Cms.Core.Constants.ObjectTypes.Document); _relationService.Save(relationType); } diff --git a/src/Umbraco.Infrastructure/Compose/RelateOnCopyComposer.cs b/src/Umbraco.Infrastructure/Compose/RelateOnCopyComposer.cs index 4e4bd9ff15..ad2a3db78d 100644 --- a/src/Umbraco.Infrastructure/Compose/RelateOnCopyComposer.cs +++ b/src/Umbraco.Infrastructure/Compose/RelateOnCopyComposer.cs @@ -1,6 +1,6 @@ -using Umbraco.Core.Composing; +using Umbraco.Cms.Core.Composing; -namespace Umbraco.Core.Compose +namespace Umbraco.Cms.Core.Compose { public sealed class RelateOnCopyComposer : ComponentComposer, ICoreComposer { } diff --git a/src/Umbraco.Infrastructure/Compose/RelateOnTrashComponent.cs b/src/Umbraco.Infrastructure/Compose/RelateOnTrashComponent.cs index bac5b27ae7..de00961357 100644 --- a/src/Umbraco.Infrastructure/Compose/RelateOnTrashComponent.cs +++ b/src/Umbraco.Infrastructure/Compose/RelateOnTrashComponent.cs @@ -1,12 +1,13 @@ using System.Linq; -using Umbraco.Core.Composing; -using Umbraco.Core.Events; -using Umbraco.Core.Models; -using Umbraco.Core.Scoping; -using Umbraco.Core.Services; -using Umbraco.Core.Services.Implement; +using Umbraco.Cms.Core.Composing; +using Umbraco.Cms.Core.Events; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Core.Scoping; +using Umbraco.Cms.Core.Services; +using Umbraco.Cms.Core.Services.Implement; +using Umbraco.Extensions; -namespace Umbraco.Core.Compose +namespace Umbraco.Cms.Core.Compose { public sealed class RelateOnTrashComponent : IComponent { @@ -48,10 +49,10 @@ namespace Umbraco.Core.Compose private void ContentService_Moved(IContentService sender, MoveEventArgs e) { - foreach (var item in e.MoveInfoCollection.Where(x => x.OriginalPath.Contains(Constants.System.RecycleBinContentString))) + foreach (var item in e.MoveInfoCollection.Where(x => x.OriginalPath.Contains(Cms.Core.Constants.System.RecycleBinContentString))) { - const string relationTypeAlias = Constants.Conventions.RelationTypes.RelateParentDocumentOnDeleteAlias; + const string relationTypeAlias = Cms.Core.Constants.Conventions.RelationTypes.RelateParentDocumentOnDeleteAlias; var relations = _relationService.GetByChildId(item.Entity.Id); foreach (var relation in relations.Where(x => x.RelationType.Alias.InvariantEquals(relationTypeAlias))) @@ -63,9 +64,9 @@ namespace Umbraco.Core.Compose private void MediaService_Moved(IMediaService sender, MoveEventArgs e) { - foreach (var item in e.MoveInfoCollection.Where(x => x.OriginalPath.Contains(Constants.System.RecycleBinMediaString))) + foreach (var item in e.MoveInfoCollection.Where(x => x.OriginalPath.Contains(Cms.Core.Constants.System.RecycleBinMediaString))) { - const string relationTypeAlias = Constants.Conventions.RelationTypes.RelateParentMediaFolderOnDeleteAlias; + const string relationTypeAlias = Cms.Core.Constants.Conventions.RelationTypes.RelateParentMediaFolderOnDeleteAlias; var relations = _relationService.GetByChildId(item.Entity.Id); foreach (var relation in relations.Where(x => x.RelationType.Alias.InvariantEquals(relationTypeAlias))) { @@ -78,15 +79,15 @@ namespace Umbraco.Core.Compose { using (var scope = _scopeProvider.CreateScope()) { - const string relationTypeAlias = Constants.Conventions.RelationTypes.RelateParentDocumentOnDeleteAlias; + const string relationTypeAlias = Cms.Core.Constants.Conventions.RelationTypes.RelateParentDocumentOnDeleteAlias; var relationType = _relationService.GetRelationTypeByAlias(relationTypeAlias); // check that the relation-type exists, if not, then recreate it if (relationType == null) { - var documentObjectType = Constants.ObjectTypes.Document; + var documentObjectType = Cms.Core.Constants.ObjectTypes.Document; const string relationTypeName = - Constants.Conventions.RelationTypes.RelateParentDocumentOnDeleteName; + Cms.Core.Constants.Conventions.RelationTypes.RelateParentDocumentOnDeleteName; relationType = new RelationType(relationTypeName, relationTypeAlias, false, documentObjectType, documentObjectType); @@ -98,7 +99,7 @@ namespace Umbraco.Core.Compose var originalPath = item.OriginalPath.ToDelimitedList(); var originalParentId = originalPath.Count > 2 ? int.Parse(originalPath[originalPath.Count - 2]) - : Constants.System.Root; + : Cms.Core.Constants.System.Root; //before we can create this relation, we need to ensure that the original parent still exists which //may not be the case if the encompassing transaction also deleted it when this item was moved to the bin @@ -129,14 +130,14 @@ namespace Umbraco.Core.Compose using (var scope = _scopeProvider.CreateScope()) { const string relationTypeAlias = - Constants.Conventions.RelationTypes.RelateParentMediaFolderOnDeleteAlias; + Cms.Core.Constants.Conventions.RelationTypes.RelateParentMediaFolderOnDeleteAlias; var relationType = _relationService.GetRelationTypeByAlias(relationTypeAlias); // check that the relation-type exists, if not, then recreate it if (relationType == null) { - var documentObjectType = Constants.ObjectTypes.Document; + var documentObjectType = Cms.Core.Constants.ObjectTypes.Document; const string relationTypeName = - Constants.Conventions.RelationTypes.RelateParentMediaFolderOnDeleteName; + Cms.Core.Constants.Conventions.RelationTypes.RelateParentMediaFolderOnDeleteName; relationType = new RelationType(relationTypeName, relationTypeAlias, false, documentObjectType, documentObjectType); _relationService.Save(relationType); @@ -147,7 +148,7 @@ namespace Umbraco.Core.Compose var originalPath = item.OriginalPath.ToDelimitedList(); var originalParentId = originalPath.Count > 2 ? int.Parse(originalPath[originalPath.Count - 2]) - : Constants.System.Root; + : Cms.Core.Constants.System.Root; //before we can create this relation, we need to ensure that the original parent still exists which //may not be the case if the encompassing transaction also deleted it when this item was moved to the bin if (_entityService.Exists(originalParentId)) diff --git a/src/Umbraco.Infrastructure/Compose/RelateOnTrashComposer.cs b/src/Umbraco.Infrastructure/Compose/RelateOnTrashComposer.cs index 76ee76f5ec..8394dfc993 100644 --- a/src/Umbraco.Infrastructure/Compose/RelateOnTrashComposer.cs +++ b/src/Umbraco.Infrastructure/Compose/RelateOnTrashComposer.cs @@ -1,6 +1,6 @@ -using Umbraco.Core.Composing; +using Umbraco.Cms.Core.Composing; -namespace Umbraco.Core.Compose +namespace Umbraco.Cms.Core.Compose { public sealed class RelateOnTrashComposer : ComponentComposer, ICoreComposer { } diff --git a/src/Umbraco.Infrastructure/Configuration/JsonConfigManipulator.cs b/src/Umbraco.Infrastructure/Configuration/JsonConfigManipulator.cs index 0d6be8717a..6057ce8a82 100644 --- a/src/Umbraco.Infrastructure/Configuration/JsonConfigManipulator.cs +++ b/src/Umbraco.Infrastructure/Configuration/JsonConfigManipulator.cs @@ -5,8 +5,9 @@ using Microsoft.Extensions.Configuration.Json; using Microsoft.Extensions.FileProviders; using Newtonsoft.Json; using Newtonsoft.Json.Linq; +using Umbraco.Cms.Core.Configuration; -namespace Umbraco.Core.Configuration +namespace Umbraco.Cms.Core.Configuration { public class JsonConfigManipulator : IConfigManipulator { @@ -17,7 +18,7 @@ namespace Umbraco.Core.Configuration _configuration = configuration; } - public string UmbracoConnectionPath { get; } = $"ConnectionStrings:{ Constants.System.UmbracoConnectionName}"; + public string UmbracoConnectionPath { get; } = $"ConnectionStrings:{ Cms.Core.Constants.System.UmbracoConnectionName}"; public void RemoveConnectionString() { var provider = GetJsonConfigurationProvider(UmbracoConnectionPath); @@ -142,7 +143,7 @@ namespace Umbraco.Core.Configuration writer.WriteStartObject(); writer.WritePropertyName("ConnectionStrings"); writer.WriteStartObject(); - writer.WritePropertyName(Constants.System.UmbracoConnectionName); + writer.WritePropertyName(Cms.Core.Constants.System.UmbracoConnectionName); writer.WriteValue(connectionString); writer.WriteEndObject(); writer.WriteEndObject(); diff --git a/src/Umbraco.Infrastructure/Configuration/NCronTabParser.cs b/src/Umbraco.Infrastructure/Configuration/NCronTabParser.cs index ca25563730..fe21141636 100644 --- a/src/Umbraco.Infrastructure/Configuration/NCronTabParser.cs +++ b/src/Umbraco.Infrastructure/Configuration/NCronTabParser.cs @@ -1,7 +1,8 @@ using System; using NCrontab; +using Umbraco.Cms.Core.Configuration; -namespace Umbraco.Core.Configuration +namespace Umbraco.Cms.Core.Configuration { public class NCronTabParser : ICronTabParser { diff --git a/src/Umbraco.Infrastructure/DependencyInjection/UmbracoBuilder.Collections.cs b/src/Umbraco.Infrastructure/DependencyInjection/UmbracoBuilder.Collections.cs index 4da9c93fb3..9becde2ebe 100644 --- a/src/Umbraco.Infrastructure/DependencyInjection/UmbracoBuilder.Collections.cs +++ b/src/Umbraco.Infrastructure/DependencyInjection/UmbracoBuilder.Collections.cs @@ -1,14 +1,7 @@ -using Umbraco.Core.Cache; -using Umbraco.Core.DependencyInjection; -using Umbraco.Core.Manifest; -using Umbraco.Core.PackageActions; -using Umbraco.Core.Persistence.Mappers; -using Umbraco.Core.PropertyEditors; -using Umbraco.Core.Strings; -using Umbraco.Core.Trees; -using Umbraco.Web.Media.EmbedProviders; +using Umbraco.Cms.Core.DependencyInjection; +using Umbraco.Cms.Infrastructure.Persistence.Mappers; -namespace Umbraco.Infrastructure.DependencyInjection +namespace Umbraco.Cms.Infrastructure.DependencyInjection { /// /// Provides extension methods to the class. diff --git a/src/Umbraco.Infrastructure/DependencyInjection/UmbracoBuilder.CoreServices.cs b/src/Umbraco.Infrastructure/DependencyInjection/UmbracoBuilder.CoreServices.cs index f8fc338ee1..f42e88b7df 100644 --- a/src/Umbraco.Infrastructure/DependencyInjection/UmbracoBuilder.CoreServices.cs +++ b/src/Umbraco.Infrastructure/DependencyInjection/UmbracoBuilder.CoreServices.cs @@ -3,49 +3,46 @@ using Examine; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Logging; using Microsoft.Extensions.Options; -using Umbraco.Core; -using Umbraco.Core.Configuration; -using Umbraco.Core.Configuration.Models; -using Umbraco.Core.DependencyInjection; -using Umbraco.Core.HealthChecks.NotificationMethods; -using Umbraco.Core.Hosting; -using Umbraco.Core.Install; -using Umbraco.Core.Logging.Serilog.Enrichers; -using Umbraco.Core.Mail; -using Umbraco.Core.Manifest; -using Umbraco.Core.Media; -using Umbraco.Core.Migrations; -using Umbraco.Core.Migrations.Install; -using Umbraco.Core.Migrations.PostMigrations; -using Umbraco.Core.Models.PublishedContent; -using Umbraco.Core.Packaging; -using Umbraco.Core.Persistence; -using Umbraco.Core.PropertyEditors.ValueConverters; -using Umbraco.Core.Runtime; -using Umbraco.Core.Scoping; -using Umbraco.Core.Serialization; -using Umbraco.Core.Strings; -using Umbraco.Core.Templates; -using Umbraco.Examine; -using Umbraco.Infrastructure.Examine; -using Umbraco.Infrastructure.HealthChecks; -using Umbraco.Infrastructure.HostedServices; -using Umbraco.Infrastructure.Install; -using Umbraco.Infrastructure.Logging.Serilog.Enrichers; -using Umbraco.Infrastructure.Media; -using Umbraco.Infrastructure.Runtime; -using Umbraco.Web; -using Umbraco.Web.Media; -using Umbraco.Web.Migrations.PostMigrations; -using Umbraco.Web.Models.PublishedContent; -using Umbraco.Web.PropertyEditors; -using Umbraco.Web.PropertyEditors.ValueConverters; -using Umbraco.Web.PublishedCache; -using Umbraco.Web.Routing; -using Umbraco.Web.Search; -using Umbraco.Web.Trees; +using Umbraco.Cms.Core; +using Umbraco.Cms.Core.Configuration; +using Umbraco.Cms.Core.Configuration.Models; +using Umbraco.Cms.Core.DependencyInjection; +using Umbraco.Cms.Core.HealthChecks.NotificationMethods; +using Umbraco.Cms.Core.Hosting; +using Umbraco.Cms.Core.Install; +using Umbraco.Cms.Core.Logging.Serilog.Enrichers; +using Umbraco.Cms.Core.Mail; +using Umbraco.Cms.Core.Manifest; +using Umbraco.Cms.Core.Media; +using Umbraco.Cms.Core.Models.PublishedContent; +using Umbraco.Cms.Core.Packaging; +using Umbraco.Cms.Core.PropertyEditors; +using Umbraco.Cms.Core.PropertyEditors.ValueConverters; +using Umbraco.Cms.Core.PublishedCache; +using Umbraco.Cms.Core.Routing; +using Umbraco.Cms.Core.Runtime; +using Umbraco.Cms.Core.Scoping; +using Umbraco.Cms.Core.Serialization; +using Umbraco.Cms.Core.Services; +using Umbraco.Cms.Core.Strings; +using Umbraco.Cms.Core.Templates; +using Umbraco.Cms.Core.Trees; +using Umbraco.Cms.Core.Web; +using Umbraco.Cms.Infrastructure.Examine; +using Umbraco.Cms.Infrastructure.HealthChecks; +using Umbraco.Cms.Infrastructure.HostedServices; +using Umbraco.Cms.Infrastructure.Install; +using Umbraco.Cms.Infrastructure.Media; +using Umbraco.Cms.Infrastructure.Migrations; +using Umbraco.Cms.Infrastructure.Migrations.Install; +using Umbraco.Cms.Infrastructure.Migrations.PostMigrations; +using Umbraco.Cms.Infrastructure.Persistence; +using Umbraco.Cms.Infrastructure.Runtime; +using Umbraco.Cms.Infrastructure.Search; +using Umbraco.Cms.Infrastructure.Serialization; +using Umbraco.Extensions; -namespace Umbraco.Infrastructure.DependencyInjection +namespace Umbraco.Cms.Infrastructure.DependencyInjection { public static partial class UmbracoBuilderExtensions { diff --git a/src/Umbraco.Infrastructure/DependencyInjection/UmbracoBuilder.DistributedCache.cs b/src/Umbraco.Infrastructure/DependencyInjection/UmbracoBuilder.DistributedCache.cs index e816972989..eb0be3e164 100644 --- a/src/Umbraco.Infrastructure/DependencyInjection/UmbracoBuilder.DistributedCache.cs +++ b/src/Umbraco.Infrastructure/DependencyInjection/UmbracoBuilder.DistributedCache.cs @@ -1,16 +1,16 @@ using System; using Microsoft.Extensions.DependencyInjection; -using Microsoft.Extensions.DependencyInjection.Extensions; -using Umbraco.Core.DependencyInjection; -using Umbraco.Core.Events; -using Umbraco.Core.Services.Changes; -using Umbraco.Core.Sync; -using Umbraco.Infrastructure.Cache; -using Umbraco.Web.Cache; -using Umbraco.Web.PublishedCache; -using Umbraco.Web.Search; +using Umbraco.Cms.Core.Cache; +using Umbraco.Cms.Core.DependencyInjection; +using Umbraco.Cms.Core.Events; +using Umbraco.Cms.Core.PublishedCache; +using Umbraco.Cms.Core.Services.Changes; +using Umbraco.Cms.Core.Sync; +using Umbraco.Cms.Infrastructure.Search; +using Umbraco.Cms.Infrastructure.Sync; +using Umbraco.Extensions; -namespace Umbraco.Infrastructure.DependencyInjection +namespace Umbraco.Cms.Infrastructure.DependencyInjection { /// /// Provides extension methods to the class. diff --git a/src/Umbraco.Infrastructure/DependencyInjection/UmbracoBuilder.FileSystems.cs b/src/Umbraco.Infrastructure/DependencyInjection/UmbracoBuilder.FileSystems.cs index 5c61fd2c60..b00b9a4985 100644 --- a/src/Umbraco.Infrastructure/DependencyInjection/UmbracoBuilder.FileSystems.cs +++ b/src/Umbraco.Infrastructure/DependencyInjection/UmbracoBuilder.FileSystems.cs @@ -1,13 +1,14 @@ using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Logging; using Microsoft.Extensions.Options; -using Umbraco.Core.Configuration.Models; -using Umbraco.Core.DependencyInjection; -using Umbraco.Core.Hosting; -using Umbraco.Core.IO; -using Umbraco.Core.IO.MediaPathSchemes; +using Umbraco.Cms.Core.Configuration.Models; +using Umbraco.Cms.Core.DependencyInjection; +using Umbraco.Cms.Core.Hosting; +using Umbraco.Cms.Core.IO; +using Umbraco.Cms.Core.IO.MediaPathSchemes; +using Umbraco.Extensions; -namespace Umbraco.Infrastructure.DependencyInjection +namespace Umbraco.Cms.Infrastructure.DependencyInjection { public static partial class UmbracoBuilderExtensions { diff --git a/src/Umbraco.Infrastructure/DependencyInjection/UmbracoBuilder.Installer.cs b/src/Umbraco.Infrastructure/DependencyInjection/UmbracoBuilder.Installer.cs index 21bb4d7ceb..dda80967b1 100644 --- a/src/Umbraco.Infrastructure/DependencyInjection/UmbracoBuilder.Installer.cs +++ b/src/Umbraco.Infrastructure/DependencyInjection/UmbracoBuilder.Installer.cs @@ -1,11 +1,12 @@ using Microsoft.Extensions.DependencyInjection; -using Umbraco.Core.DependencyInjection; -using Umbraco.Core.Install.InstallSteps; -using Umbraco.Web.Install; -using Umbraco.Web.Install.InstallSteps; -using Umbraco.Web.Install.Models; +using Umbraco.Cms.Core.DependencyInjection; +using Umbraco.Cms.Core.Install.InstallSteps; +using Umbraco.Cms.Core.Install.Models; +using Umbraco.Cms.Infrastructure.Install; +using Umbraco.Cms.Infrastructure.Install.InstallSteps; +using Umbraco.Extensions; -namespace Umbraco.Infrastructure.DependencyInjection +namespace Umbraco.Cms.Infrastructure.DependencyInjection { public static partial class UmbracoBuilderExtensions { diff --git a/src/Umbraco.Infrastructure/DependencyInjection/UmbracoBuilder.MappingProfiles.cs b/src/Umbraco.Infrastructure/DependencyInjection/UmbracoBuilder.MappingProfiles.cs index 2973abf271..80a89da097 100644 --- a/src/Umbraco.Infrastructure/DependencyInjection/UmbracoBuilder.MappingProfiles.cs +++ b/src/Umbraco.Infrastructure/DependencyInjection/UmbracoBuilder.MappingProfiles.cs @@ -1,12 +1,11 @@ using Microsoft.Extensions.DependencyInjection; -using Umbraco.Core.DependencyInjection; -using Umbraco.Core.Mapping; -using Umbraco.Core.Models.Mapping; -using Umbraco.Core.Security; -using Umbraco.Infrastructure.Security; -using Umbraco.Web.Models.Mapping; +using Umbraco.Cms.Core.DependencyInjection; +using Umbraco.Cms.Core.Mapping; +using Umbraco.Cms.Core.Models.Mapping; +using Umbraco.Cms.Core.Security; +using Umbraco.Extensions; -namespace Umbraco.Infrastructure.DependencyInjection +namespace Umbraco.Cms.Infrastructure.DependencyInjection { public static partial class UmbracoBuilderExtensions { diff --git a/src/Umbraco.Infrastructure/DependencyInjection/UmbracoBuilder.Repositories.cs b/src/Umbraco.Infrastructure/DependencyInjection/UmbracoBuilder.Repositories.cs index 1e32eddb5c..8292fd2ecb 100644 --- a/src/Umbraco.Infrastructure/DependencyInjection/UmbracoBuilder.Repositories.cs +++ b/src/Umbraco.Infrastructure/DependencyInjection/UmbracoBuilder.Repositories.cs @@ -1,8 +1,9 @@ -using Umbraco.Core.DependencyInjection; -using Umbraco.Core.Persistence.Repositories; -using Umbraco.Core.Persistence.Repositories.Implement; +using Umbraco.Cms.Core.DependencyInjection; +using Umbraco.Cms.Core.Persistence.Repositories; +using Umbraco.Cms.Infrastructure.Persistence.Repositories.Implement; +using Umbraco.Extensions; -namespace Umbraco.Infrastructure.DependencyInjection +namespace Umbraco.Cms.Infrastructure.DependencyInjection { /// /// Composes repositories. diff --git a/src/Umbraco.Infrastructure/DependencyInjection/UmbracoBuilder.Services.cs b/src/Umbraco.Infrastructure/DependencyInjection/UmbracoBuilder.Services.cs index ca7ba6e479..97e32451a5 100644 --- a/src/Umbraco.Infrastructure/DependencyInjection/UmbracoBuilder.Services.cs +++ b/src/Umbraco.Infrastructure/DependencyInjection/UmbracoBuilder.Services.cs @@ -4,19 +4,19 @@ using System.Linq; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Logging; using Microsoft.Extensions.Options; -using Umbraco.Core; -using Umbraco.Core.Cache; -using Umbraco.Core.Configuration; -using Umbraco.Core.Configuration.Models; -using Umbraco.Core.DependencyInjection; -using Umbraco.Core.Hosting; -using Umbraco.Core.Packaging; -using Umbraco.Core.Routing; -using Umbraco.Core.Services; -using Umbraco.Core.Services.Implement; -using Umbraco.Infrastructure.Services.Implement; +using Umbraco.Cms.Core; +using Umbraco.Cms.Core.Cache; +using Umbraco.Cms.Core.Configuration; +using Umbraco.Cms.Core.Configuration.Models; +using Umbraco.Cms.Core.DependencyInjection; +using Umbraco.Cms.Core.Hosting; +using Umbraco.Cms.Core.Packaging; +using Umbraco.Cms.Core.Routing; +using Umbraco.Cms.Core.Services; +using Umbraco.Cms.Core.Services.Implement; +using Umbraco.Extensions; -namespace Umbraco.Infrastructure.DependencyInjection +namespace Umbraco.Cms.Infrastructure.DependencyInjection { public static partial class UmbracoBuilderExtensions { diff --git a/src/Umbraco.Infrastructure/DependencyInjection/UmbracoBuilder.Uniques.cs b/src/Umbraco.Infrastructure/DependencyInjection/UmbracoBuilder.Uniques.cs index f26b4442f8..5a6c8fe8f2 100644 --- a/src/Umbraco.Infrastructure/DependencyInjection/UmbracoBuilder.Uniques.cs +++ b/src/Umbraco.Infrastructure/DependencyInjection/UmbracoBuilder.Uniques.cs @@ -1,14 +1,14 @@ using System; using Microsoft.Extensions.DependencyInjection; -using Umbraco.Core.DependencyInjection; -using Umbraco.Core.Dictionary; -using Umbraco.Core.IO; -using Umbraco.Core.Logging.Viewer; -using Umbraco.Core.Models.PublishedContent; -using Umbraco.Core.Strings; -using Umbraco.Core.Sync; +using Umbraco.Cms.Core.DependencyInjection; +using Umbraco.Cms.Core.Dictionary; +using Umbraco.Cms.Core.IO; +using Umbraco.Cms.Core.Logging.Viewer; +using Umbraco.Cms.Core.Models.PublishedContent; +using Umbraco.Cms.Core.Strings; +using Umbraco.Extensions; -namespace Umbraco.Infrastructure.DependencyInjection +namespace Umbraco.Cms.Infrastructure.DependencyInjection { /// /// Provides extension methods to the class. diff --git a/src/Umbraco.Infrastructure/Deploy/IGridCellValueConnector.cs b/src/Umbraco.Infrastructure/Deploy/IGridCellValueConnector.cs index 15ed404d31..40c0b98474 100644 --- a/src/Umbraco.Infrastructure/Deploy/IGridCellValueConnector.cs +++ b/src/Umbraco.Infrastructure/Deploy/IGridCellValueConnector.cs @@ -1,7 +1,7 @@ using System.Collections.Generic; -using Umbraco.Core.Models; +using Umbraco.Cms.Core.Models; -namespace Umbraco.Core.Deploy +namespace Umbraco.Cms.Core.Deploy { /// /// Defines methods that can convert a grid cell value to / from an environment-agnostic string. diff --git a/src/Umbraco.Infrastructure/EmailSender.cs b/src/Umbraco.Infrastructure/EmailSender.cs index 4c377f1ff1..fe18301295 100644 --- a/src/Umbraco.Infrastructure/EmailSender.cs +++ b/src/Umbraco.Infrastructure/EmailSender.cs @@ -1,19 +1,20 @@ -using System; +// Copyright (c) Umbraco. +// See LICENSE for more details. + +using System; using System.Net.Mail; using System.Threading.Tasks; -using MailKit.Security; using Microsoft.Extensions.Options; using MimeKit; using MimeKit.Text; -using Umbraco.Core.Configuration.Models; -using Umbraco.Core.Events; -using Umbraco.Core.Mail; -using Umbraco.Core.Models; +using Umbraco.Cms.Core.Configuration.Models; +using Umbraco.Cms.Core.Events; +using Umbraco.Cms.Core.Mail; +using Umbraco.Cms.Core.Models; using SmtpClient = MailKit.Net.Smtp.SmtpClient; -namespace Umbraco.Core +namespace Umbraco.Cms.Infrastructure { - /// /// A utility class for sending emails /// diff --git a/src/Umbraco.Infrastructure/Events/MigrationEventArgs.cs b/src/Umbraco.Infrastructure/Events/MigrationEventArgs.cs index 5349f3c374..1f326abdd6 100644 --- a/src/Umbraco.Infrastructure/Events/MigrationEventArgs.cs +++ b/src/Umbraco.Infrastructure/Events/MigrationEventArgs.cs @@ -1,9 +1,9 @@ using System; using System.Collections.Generic; -using Semver; -using Umbraco.Core.Migrations; +using Umbraco.Cms.Core.Semver; +using Umbraco.Cms.Infrastructure.Migrations; -namespace Umbraco.Core.Events +namespace Umbraco.Cms.Core.Events { public class MigrationEventArgs : CancellableObjectEventArgs>, IEquatable { diff --git a/src/Umbraco.Infrastructure/Examine/BaseValueSetBuilder.cs b/src/Umbraco.Infrastructure/Examine/BaseValueSetBuilder.cs index 2350d3cb84..636f50c22d 100644 --- a/src/Umbraco.Infrastructure/Examine/BaseValueSetBuilder.cs +++ b/src/Umbraco.Infrastructure/Examine/BaseValueSetBuilder.cs @@ -1,12 +1,11 @@ using System.Collections.Generic; using Examine; -using Umbraco.Core; -using Umbraco.Core.Models; -using Umbraco.Core.PropertyEditors; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Core.PropertyEditors; +using Umbraco.Extensions; -namespace Umbraco.Examine +namespace Umbraco.Cms.Infrastructure.Examine { - /// public abstract class BaseValueSetBuilder : IValueSetBuilder where TContent : IContentBase diff --git a/src/Umbraco.Infrastructure/Examine/ContentIndexPopulator.cs b/src/Umbraco.Infrastructure/Examine/ContentIndexPopulator.cs index 98401c363c..d9fd10f1d7 100644 --- a/src/Umbraco.Infrastructure/Examine/ContentIndexPopulator.cs +++ b/src/Umbraco.Infrastructure/Examine/ContentIndexPopulator.cs @@ -2,27 +2,28 @@ using System.Collections.Generic; using System.Linq; using Examine; -using Umbraco.Core; -using Umbraco.Core.Models; -using Umbraco.Core.Services; -using Umbraco.Core.Persistence; -using Umbraco.Core.Persistence.Querying; +using Umbraco.Cms.Core; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Core.Persistence.Querying; +using Umbraco.Cms.Core.Services; +using Umbraco.Cms.Infrastructure.Persistence; -namespace Umbraco.Examine +namespace Umbraco.Cms.Infrastructure.Examine { - /// /// Performs the data lookups required to rebuild a content index /// public class ContentIndexPopulator : IndexPopulator { private readonly IContentService _contentService; + private readonly IUmbracoDatabaseFactory _umbracoDatabaseFactory; private readonly IValueSetBuilder _contentValueSetBuilder; /// /// This is a static query, it's parameters don't change so store statically /// - private static IQuery _publishedQuery; + private IQuery _publishedQuery; + private IQuery PublishedQuery => _publishedQuery ??= _umbracoDatabaseFactory.SqlContext.Query().Where(x => x.Published); private readonly bool _publishedValuesOnly; private readonly int? _parentId; @@ -33,26 +34,20 @@ namespace Umbraco.Examine /// /// /// - public ContentIndexPopulator(IContentService contentService, ISqlContext sqlContext, IContentValueSetBuilder contentValueSetBuilder) - : this(false, null, contentService, sqlContext, contentValueSetBuilder) + public ContentIndexPopulator(IContentService contentService, IUmbracoDatabaseFactory umbracoDatabaseFactory, IContentValueSetBuilder contentValueSetBuilder) + : this(false, null, contentService, umbracoDatabaseFactory, contentValueSetBuilder) { } /// /// Optional constructor allowing specifying custom query parameters /// - /// - /// - /// - /// - /// - public ContentIndexPopulator(bool publishedValuesOnly, int? parentId, IContentService contentService, ISqlContext sqlContext, IValueSetBuilder contentValueSetBuilder) + public ContentIndexPopulator(bool publishedValuesOnly, int? parentId, IContentService contentService, IUmbracoDatabaseFactory umbracoDatabaseFactory, IValueSetBuilder contentValueSetBuilder) { - if (sqlContext == null) throw new ArgumentNullException(nameof(sqlContext)); + if (umbracoDatabaseFactory == null) throw new ArgumentNullException(nameof(umbracoDatabaseFactory)); _contentService = contentService ?? throw new ArgumentNullException(nameof(contentService)); + _umbracoDatabaseFactory = umbracoDatabaseFactory; _contentValueSetBuilder = contentValueSetBuilder ?? throw new ArgumentNullException(nameof(contentValueSetBuilder)); - if (_publishedQuery == null) - _publishedQuery = sqlContext.Query().Where(x => x.Published); _publishedValuesOnly = publishedValuesOnly; _parentId = parentId; } @@ -120,10 +115,10 @@ namespace Umbraco.Examine { //add the published filter //note: We will filter for published variants in the validator - content = _contentService.GetPagedDescendants(contentParentId, pageIndex, pageSize, out _, _publishedQuery, + content = _contentService.GetPagedDescendants(contentParentId, pageIndex, pageSize, out _, PublishedQuery, Ordering.By("Path", Direction.Ascending)).ToArray(); - + if (content.Length > 0) { var indexableContent = new List(); diff --git a/src/Umbraco.Infrastructure/Examine/ContentValueSetBuilder.cs b/src/Umbraco.Infrastructure/Examine/ContentValueSetBuilder.cs index f03fcca181..74eb0f84af 100644 --- a/src/Umbraco.Infrastructure/Examine/ContentValueSetBuilder.cs +++ b/src/Umbraco.Infrastructure/Examine/ContentValueSetBuilder.cs @@ -1,15 +1,15 @@ -using Examine; -using System.Collections.Generic; +using System.Collections.Generic; using System.Linq; -using Umbraco.Core; -using Umbraco.Core.Models; -using Umbraco.Core.Models.Membership; -using Umbraco.Core.PropertyEditors; -using Umbraco.Core.Scoping; -using Umbraco.Core.Services; -using Umbraco.Core.Strings; +using Examine; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Core.Models.Membership; +using Umbraco.Cms.Core.PropertyEditors; +using Umbraco.Cms.Core.Scoping; +using Umbraco.Cms.Core.Services; +using Umbraco.Cms.Core.Strings; +using Umbraco.Extensions; -namespace Umbraco.Examine +namespace Umbraco.Cms.Infrastructure.Examine { /// /// Builds s for items diff --git a/src/Umbraco.Infrastructure/Examine/ContentValueSetValidator.cs b/src/Umbraco.Infrastructure/Examine/ContentValueSetValidator.cs index 24c9ab2c84..010ccdf149 100644 --- a/src/Umbraco.Infrastructure/Examine/ContentValueSetValidator.cs +++ b/src/Umbraco.Infrastructure/Examine/ContentValueSetValidator.cs @@ -1,10 +1,11 @@ using System.Collections.Generic; using System.Linq; using Examine; -using Umbraco.Core; -using Umbraco.Core.Services; +using Umbraco.Cms.Core.Services; +using Umbraco.Extensions; +using Constants = Umbraco.Cms.Core.Constants; -namespace Umbraco.Examine +namespace Umbraco.Cms.Infrastructure.Examine { /// /// Used to validate a ValueSet for content/media - based on permissions, parent id, etc.... diff --git a/src/Umbraco.Infrastructure/Examine/ExamineExtensions.cs b/src/Umbraco.Infrastructure/Examine/ExamineExtensions.cs index 5da21de6df..b2103f6e7d 100644 --- a/src/Umbraco.Infrastructure/Examine/ExamineExtensions.cs +++ b/src/Umbraco.Infrastructure/Examine/ExamineExtensions.cs @@ -1,11 +1,11 @@ using System; using System.Collections.Generic; using Examine; -using Umbraco.Core.Models.PublishedContent; -using Umbraco.Examine; -using Umbraco.Web.PublishedCache; +using Umbraco.Cms.Core.Models.PublishedContent; +using Umbraco.Cms.Core.PublishedCache; +using Umbraco.Cms.Infrastructure.Examine; -namespace Umbraco.Web +namespace Umbraco.Extensions { /// /// Extension methods for Examine. diff --git a/src/Umbraco.Infrastructure/Examine/GenericIndexDiagnostics.cs b/src/Umbraco.Infrastructure/Examine/GenericIndexDiagnostics.cs index c384392710..8c05926483 100644 --- a/src/Umbraco.Infrastructure/Examine/GenericIndexDiagnostics.cs +++ b/src/Umbraco.Infrastructure/Examine/GenericIndexDiagnostics.cs @@ -2,10 +2,11 @@ using System.Collections.Generic; using System.Linq; using Examine; -using Umbraco.Core; -using Umbraco.Core.Composing; +using Umbraco.Cms.Core; +using Umbraco.Cms.Core.Composing; +using Umbraco.Extensions; -namespace Umbraco.Examine +namespace Umbraco.Cms.Infrastructure.Examine { /// diff --git a/src/Umbraco.Infrastructure/Examine/IBackOfficeExamineSearcher.cs b/src/Umbraco.Infrastructure/Examine/IBackOfficeExamineSearcher.cs index 719d5a33f2..dc6da46150 100644 --- a/src/Umbraco.Infrastructure/Examine/IBackOfficeExamineSearcher.cs +++ b/src/Umbraco.Infrastructure/Examine/IBackOfficeExamineSearcher.cs @@ -1,8 +1,8 @@ -using Examine; -using System.Collections.Generic; -using Umbraco.Web.Models.ContentEditing; +using System.Collections.Generic; +using Examine; +using Umbraco.Cms.Core.Models.ContentEditing; -namespace Umbraco.Examine +namespace Umbraco.Cms.Infrastructure.Examine { /// /// Used to search the back office for Examine indexed entities (Documents, Media and Members) diff --git a/src/Umbraco.Infrastructure/Examine/IContentValueSetBuilder.cs b/src/Umbraco.Infrastructure/Examine/IContentValueSetBuilder.cs index fed706d592..af6b613e24 100644 --- a/src/Umbraco.Infrastructure/Examine/IContentValueSetBuilder.cs +++ b/src/Umbraco.Infrastructure/Examine/IContentValueSetBuilder.cs @@ -1,7 +1,6 @@ -using Examine; -using Umbraco.Core.Models; +using Umbraco.Cms.Core.Models; -namespace Umbraco.Examine +namespace Umbraco.Cms.Infrastructure.Examine { /// /// diff --git a/src/Umbraco.Infrastructure/Examine/IContentValueSetValidator.cs b/src/Umbraco.Infrastructure/Examine/IContentValueSetValidator.cs index fa85a0d32b..e76153f25e 100644 --- a/src/Umbraco.Infrastructure/Examine/IContentValueSetValidator.cs +++ b/src/Umbraco.Infrastructure/Examine/IContentValueSetValidator.cs @@ -1,6 +1,6 @@ using Examine; -namespace Umbraco.Examine +namespace Umbraco.Cms.Infrastructure.Examine { /// /// An extended for content indexes diff --git a/src/Umbraco.Infrastructure/Examine/IIndexCreator.cs b/src/Umbraco.Infrastructure/Examine/IIndexCreator.cs index 3b8f683990..aadaa00f46 100644 --- a/src/Umbraco.Infrastructure/Examine/IIndexCreator.cs +++ b/src/Umbraco.Infrastructure/Examine/IIndexCreator.cs @@ -1,7 +1,7 @@ using System.Collections.Generic; using Examine; -namespace Umbraco.Examine +namespace Umbraco.Cms.Infrastructure.Examine { /// /// Creates 's diff --git a/src/Umbraco.Infrastructure/Examine/IIndexDiagnostics.cs b/src/Umbraco.Infrastructure/Examine/IIndexDiagnostics.cs index fa9dde25b8..a4e1c0ca4f 100644 --- a/src/Umbraco.Infrastructure/Examine/IIndexDiagnostics.cs +++ b/src/Umbraco.Infrastructure/Examine/IIndexDiagnostics.cs @@ -1,7 +1,7 @@ using System.Collections.Generic; -using Umbraco.Core; +using Umbraco.Cms.Core; -namespace Umbraco.Examine +namespace Umbraco.Cms.Infrastructure.Examine { /// diff --git a/src/Umbraco.Infrastructure/Examine/IIndexDiagnosticsFactory.cs b/src/Umbraco.Infrastructure/Examine/IIndexDiagnosticsFactory.cs index f7922e64cb..b39ef5c3a8 100644 --- a/src/Umbraco.Infrastructure/Examine/IIndexDiagnosticsFactory.cs +++ b/src/Umbraco.Infrastructure/Examine/IIndexDiagnosticsFactory.cs @@ -1,6 +1,6 @@ using Examine; -namespace Umbraco.Examine +namespace Umbraco.Cms.Infrastructure.Examine { /// diff --git a/src/Umbraco.Infrastructure/Examine/IIndexPopulator.cs b/src/Umbraco.Infrastructure/Examine/IIndexPopulator.cs index 97a1216fae..2089bd923a 100644 --- a/src/Umbraco.Infrastructure/Examine/IIndexPopulator.cs +++ b/src/Umbraco.Infrastructure/Examine/IIndexPopulator.cs @@ -1,6 +1,6 @@ using Examine; -namespace Umbraco.Examine +namespace Umbraco.Cms.Infrastructure.Examine { public interface IIndexPopulator { diff --git a/src/Umbraco.Infrastructure/Examine/IPublishedContentValueSetBuilder.cs b/src/Umbraco.Infrastructure/Examine/IPublishedContentValueSetBuilder.cs index c337a7a1e6..8c5348ed46 100644 --- a/src/Umbraco.Infrastructure/Examine/IPublishedContentValueSetBuilder.cs +++ b/src/Umbraco.Infrastructure/Examine/IPublishedContentValueSetBuilder.cs @@ -1,7 +1,7 @@ using Examine; -using Umbraco.Core.Models; +using Umbraco.Cms.Core.Models; -namespace Umbraco.Examine +namespace Umbraco.Cms.Infrastructure.Examine { /// /// Marker interface for a builder for only published content @@ -9,4 +9,4 @@ namespace Umbraco.Examine public interface IPublishedContentValueSetBuilder : IValueSetBuilder { } -} \ No newline at end of file +} diff --git a/src/Umbraco.Infrastructure/Examine/IUmbracoContentIndex.cs b/src/Umbraco.Infrastructure/Examine/IUmbracoContentIndex.cs index cc85c1eda0..63bbfb047a 100644 --- a/src/Umbraco.Infrastructure/Examine/IUmbracoContentIndex.cs +++ b/src/Umbraco.Infrastructure/Examine/IUmbracoContentIndex.cs @@ -1,6 +1,6 @@ using Examine; -namespace Umbraco.Examine +namespace Umbraco.Cms.Infrastructure.Examine { /// /// Marker interface for indexes of Umbraco content diff --git a/src/Umbraco.Infrastructure/Examine/IUmbracoIndex.cs b/src/Umbraco.Infrastructure/Examine/IUmbracoIndex.cs index 9461434fff..8dfdf6d812 100644 --- a/src/Umbraco.Infrastructure/Examine/IUmbracoIndex.cs +++ b/src/Umbraco.Infrastructure/Examine/IUmbracoIndex.cs @@ -1,7 +1,7 @@ using System.Collections.Generic; using Examine; -namespace Umbraco.Examine +namespace Umbraco.Cms.Infrastructure.Examine { /// /// A Marker interface for defining an Umbraco indexer diff --git a/src/Umbraco.Infrastructure/Examine/IUmbracoIndexConfig.cs b/src/Umbraco.Infrastructure/Examine/IUmbracoIndexConfig.cs index 02c6c51d0c..83a3730b97 100644 --- a/src/Umbraco.Infrastructure/Examine/IUmbracoIndexConfig.cs +++ b/src/Umbraco.Infrastructure/Examine/IUmbracoIndexConfig.cs @@ -1,6 +1,6 @@ using Examine; -namespace Umbraco.Examine +namespace Umbraco.Cms.Infrastructure.Examine { public interface IUmbracoIndexConfig { diff --git a/src/Umbraco.Infrastructure/Examine/IUmbracoIndexesCreator.cs b/src/Umbraco.Infrastructure/Examine/IUmbracoIndexesCreator.cs index d64046a940..df61901dba 100644 --- a/src/Umbraco.Infrastructure/Examine/IUmbracoIndexesCreator.cs +++ b/src/Umbraco.Infrastructure/Examine/IUmbracoIndexesCreator.cs @@ -1,4 +1,4 @@ -namespace Umbraco.Examine +namespace Umbraco.Cms.Infrastructure.Examine { /// /// diff --git a/src/Umbraco.Infrastructure/Examine/IUmbracoMemberIndex.cs b/src/Umbraco.Infrastructure/Examine/IUmbracoMemberIndex.cs index b1f325b2e9..d09c8518fa 100644 --- a/src/Umbraco.Infrastructure/Examine/IUmbracoMemberIndex.cs +++ b/src/Umbraco.Infrastructure/Examine/IUmbracoMemberIndex.cs @@ -1,6 +1,6 @@ using Examine; -namespace Umbraco.Examine +namespace Umbraco.Cms.Infrastructure.Examine { public interface IUmbracoMemberIndex : IIndex { diff --git a/src/Umbraco.Infrastructure/Examine/IUmbracoTreeSearcherFields.cs b/src/Umbraco.Infrastructure/Examine/IUmbracoTreeSearcherFields.cs index d873d01972..6d0d3f8efb 100644 --- a/src/Umbraco.Infrastructure/Examine/IUmbracoTreeSearcherFields.cs +++ b/src/Umbraco.Infrastructure/Examine/IUmbracoTreeSearcherFields.cs @@ -1,6 +1,6 @@ using System.Collections.Generic; -namespace Umbraco.Examine +namespace Umbraco.Cms.Infrastructure.Examine { /// /// Used to propagate hardcoded internal Field lists diff --git a/src/Umbraco.Infrastructure/Examine/IValueSetBuilder.cs b/src/Umbraco.Infrastructure/Examine/IValueSetBuilder.cs index 1c4890f404..0e1d05440d 100644 --- a/src/Umbraco.Infrastructure/Examine/IValueSetBuilder.cs +++ b/src/Umbraco.Infrastructure/Examine/IValueSetBuilder.cs @@ -1,8 +1,7 @@ -using Examine; -using System.Collections.Generic; -using Umbraco.Core.Models; +using System.Collections.Generic; +using Examine; -namespace Umbraco.Examine +namespace Umbraco.Cms.Infrastructure.Examine { /// /// Creates a collection of to be indexed based on a collection of diff --git a/src/Umbraco.Infrastructure/Examine/IndexDiagnosticsFactory.cs b/src/Umbraco.Infrastructure/Examine/IndexDiagnosticsFactory.cs index 9daa1705a9..ca2e732071 100644 --- a/src/Umbraco.Infrastructure/Examine/IndexDiagnosticsFactory.cs +++ b/src/Umbraco.Infrastructure/Examine/IndexDiagnosticsFactory.cs @@ -1,6 +1,6 @@ using Examine; -namespace Umbraco.Examine +namespace Umbraco.Cms.Infrastructure.Examine { /// /// Default implementation of which returns for indexes that don't have an implementation diff --git a/src/Umbraco.Infrastructure/Examine/IndexPopulator.cs b/src/Umbraco.Infrastructure/Examine/IndexPopulator.cs index bfd757f9be..2feac0710a 100644 --- a/src/Umbraco.Infrastructure/Examine/IndexPopulator.cs +++ b/src/Umbraco.Infrastructure/Examine/IndexPopulator.cs @@ -1,9 +1,9 @@ using System.Collections.Generic; using System.Linq; using Examine; -using Umbraco.Core.Collections; +using Umbraco.Cms.Core.Collections; -namespace Umbraco.Examine +namespace Umbraco.Cms.Infrastructure.Examine { /// /// An that is automatically associated to any index of type diff --git a/src/Umbraco.Infrastructure/Examine/IndexRebuilder.cs b/src/Umbraco.Infrastructure/Examine/IndexRebuilder.cs index bafdfc72f4..9e4fe6fed0 100644 --- a/src/Umbraco.Infrastructure/Examine/IndexRebuilder.cs +++ b/src/Umbraco.Infrastructure/Examine/IndexRebuilder.cs @@ -1,13 +1,11 @@ using System; using System.Collections.Generic; using System.Linq; -using Microsoft.Extensions.Logging; -using System.Threading.Tasks; using Examine; -using Umbraco.Core.Composing; -using Umbraco.Core.Logging; +using Microsoft.Extensions.Logging; +using Umbraco.Cms.Core.Logging; -namespace Umbraco.Examine +namespace Umbraco.Cms.Infrastructure.Examine { /// diff --git a/src/Umbraco.Infrastructure/Examine/IndexRebuildingEventArgs.cs b/src/Umbraco.Infrastructure/Examine/IndexRebuildingEventArgs.cs index 20141a7194..fbe3dbcbe3 100644 --- a/src/Umbraco.Infrastructure/Examine/IndexRebuildingEventArgs.cs +++ b/src/Umbraco.Infrastructure/Examine/IndexRebuildingEventArgs.cs @@ -2,7 +2,7 @@ using System.Collections.Generic; using Examine; -namespace Umbraco.Examine +namespace Umbraco.Cms.Infrastructure.Examine { public class IndexRebuildingEventArgs : EventArgs { diff --git a/src/Umbraco.Infrastructure/Examine/IndexTypes.cs b/src/Umbraco.Infrastructure/Examine/IndexTypes.cs index 3fa00e234c..bb6edaa78b 100644 --- a/src/Umbraco.Infrastructure/Examine/IndexTypes.cs +++ b/src/Umbraco.Infrastructure/Examine/IndexTypes.cs @@ -1,4 +1,4 @@ -namespace Umbraco.Examine +namespace Umbraco.Cms.Infrastructure.Examine { /// /// The index types stored in the Lucene Index diff --git a/src/Umbraco.Infrastructure/Examine/MediaIndexPopulator.cs b/src/Umbraco.Infrastructure/Examine/MediaIndexPopulator.cs index 03fbe392b6..429285fa85 100644 --- a/src/Umbraco.Infrastructure/Examine/MediaIndexPopulator.cs +++ b/src/Umbraco.Infrastructure/Examine/MediaIndexPopulator.cs @@ -1,10 +1,10 @@ using System.Collections.Generic; using System.Linq; using Examine; -using Umbraco.Core.Models; -using Umbraco.Core.Services; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Core.Services; -namespace Umbraco.Examine +namespace Umbraco.Cms.Infrastructure.Examine { /// /// Performs the data lookups required to rebuild a media index diff --git a/src/Umbraco.Infrastructure/Examine/MediaValueSetBuilder.cs b/src/Umbraco.Infrastructure/Examine/MediaValueSetBuilder.cs index 73ad31e115..997cbfe19f 100644 --- a/src/Umbraco.Infrastructure/Examine/MediaValueSetBuilder.cs +++ b/src/Umbraco.Infrastructure/Examine/MediaValueSetBuilder.cs @@ -1,17 +1,18 @@ using System; -using Examine; using System.Collections.Generic; using System.Linq; +using Examine; using Microsoft.Extensions.Logging; -using Umbraco.Core; -using Umbraco.Core.Models; -using Umbraco.Core.PropertyEditors; -using Umbraco.Core.PropertyEditors.ValueConverters; -using Umbraco.Core.Services; -using Umbraco.Core.Strings; -using Umbraco.Core.Serialization; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Core.PropertyEditors; +using Umbraco.Cms.Core.PropertyEditors.ValueConverters; +using Umbraco.Cms.Core.Serialization; +using Umbraco.Cms.Core.Services; +using Umbraco.Cms.Core.Strings; +using Umbraco.Extensions; +using Constants = Umbraco.Cms.Core.Constants; -namespace Umbraco.Examine +namespace Umbraco.Cms.Infrastructure.Examine { public class MediaValueSetBuilder : BaseValueSetBuilder { diff --git a/src/Umbraco.Infrastructure/Examine/MemberIndexPopulator.cs b/src/Umbraco.Infrastructure/Examine/MemberIndexPopulator.cs index 270d93d80d..76dee23450 100644 --- a/src/Umbraco.Infrastructure/Examine/MemberIndexPopulator.cs +++ b/src/Umbraco.Infrastructure/Examine/MemberIndexPopulator.cs @@ -1,10 +1,10 @@ using System.Collections.Generic; using System.Linq; using Examine; -using Umbraco.Core.Models; -using Umbraco.Core.Services; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Core.Services; -namespace Umbraco.Examine +namespace Umbraco.Cms.Infrastructure.Examine { public class MemberIndexPopulator : IndexPopulator { diff --git a/src/Umbraco.Infrastructure/Examine/MemberValueSetBuilder.cs b/src/Umbraco.Infrastructure/Examine/MemberValueSetBuilder.cs index 12d886eaf1..9364ac6b94 100644 --- a/src/Umbraco.Infrastructure/Examine/MemberValueSetBuilder.cs +++ b/src/Umbraco.Infrastructure/Examine/MemberValueSetBuilder.cs @@ -1,11 +1,11 @@ -using Examine; -using System.Collections.Generic; +using System.Collections.Generic; using System.Linq; -using Umbraco.Core; -using Umbraco.Core.Models; -using Umbraco.Core.PropertyEditors; +using Examine; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Core.PropertyEditors; +using Umbraco.Extensions; -namespace Umbraco.Examine +namespace Umbraco.Cms.Infrastructure.Examine { public class MemberValueSetBuilder : BaseValueSetBuilder diff --git a/src/Umbraco.Infrastructure/Examine/MemberValueSetValidator.cs b/src/Umbraco.Infrastructure/Examine/MemberValueSetValidator.cs index 6ce650fc1d..f92a9dc620 100644 --- a/src/Umbraco.Infrastructure/Examine/MemberValueSetValidator.cs +++ b/src/Umbraco.Infrastructure/Examine/MemberValueSetValidator.cs @@ -1,8 +1,6 @@ using System.Collections.Generic; -using System.Linq; -using Examine; -namespace Umbraco.Examine +namespace Umbraco.Cms.Infrastructure.Examine { public class MemberValueSetValidator : ValueSetValidator { diff --git a/src/Umbraco.Infrastructure/Examine/NoopBackOfficeExamineSearcher.cs b/src/Umbraco.Infrastructure/Examine/NoopBackOfficeExamineSearcher.cs index 15ed8de389..8b676ab331 100644 --- a/src/Umbraco.Infrastructure/Examine/NoopBackOfficeExamineSearcher.cs +++ b/src/Umbraco.Infrastructure/Examine/NoopBackOfficeExamineSearcher.cs @@ -1,10 +1,9 @@ using System.Collections.Generic; using System.Linq; using Examine; -using Umbraco.Examine; -using Umbraco.Web.Models.ContentEditing; +using Umbraco.Cms.Core.Models.ContentEditing; -namespace Umbraco.Infrastructure.Examine +namespace Umbraco.Cms.Infrastructure.Examine { public class NoopBackOfficeExamineSearcher : IBackOfficeExamineSearcher { diff --git a/src/Umbraco.Infrastructure/Examine/NoopUmbracoIndexesCreator.cs b/src/Umbraco.Infrastructure/Examine/NoopUmbracoIndexesCreator.cs index a6133a7e59..e84fb96a74 100644 --- a/src/Umbraco.Infrastructure/Examine/NoopUmbracoIndexesCreator.cs +++ b/src/Umbraco.Infrastructure/Examine/NoopUmbracoIndexesCreator.cs @@ -1,9 +1,8 @@ using System.Collections.Generic; using System.Linq; using Examine; -using Umbraco.Examine; -namespace Umbraco.Infrastructure.Examine +namespace Umbraco.Cms.Infrastructure.Examine { public class NoopUmbracoIndexesCreator : IUmbracoIndexesCreator { diff --git a/src/Umbraco.Infrastructure/Examine/PublishedContentIndexPopulator.cs b/src/Umbraco.Infrastructure/Examine/PublishedContentIndexPopulator.cs index 143e2db630..4b55337670 100644 --- a/src/Umbraco.Infrastructure/Examine/PublishedContentIndexPopulator.cs +++ b/src/Umbraco.Infrastructure/Examine/PublishedContentIndexPopulator.cs @@ -1,8 +1,7 @@ -using Umbraco.Core.Models; -using Umbraco.Core.Services; -using Umbraco.Core.Persistence; +using Umbraco.Cms.Core.Services; +using Umbraco.Cms.Infrastructure.Persistence; -namespace Umbraco.Examine +namespace Umbraco.Cms.Infrastructure.Examine { /// /// Performs the data lookups required to rebuild a content index containing only published content @@ -14,9 +13,9 @@ namespace Umbraco.Examine /// public class PublishedContentIndexPopulator : ContentIndexPopulator { - public PublishedContentIndexPopulator(IContentService contentService, ISqlContext sqlContext, IPublishedContentValueSetBuilder contentValueSetBuilder) : - base(true, null, contentService, sqlContext, contentValueSetBuilder) - { + public PublishedContentIndexPopulator(IContentService contentService, IUmbracoDatabaseFactory umbracoDatabaseFactory, IPublishedContentValueSetBuilder contentValueSetBuilder) : + base(true, null, contentService, umbracoDatabaseFactory, contentValueSetBuilder) + { } } } diff --git a/src/Umbraco.Infrastructure/Examine/UmbracoExamineExtensions.cs b/src/Umbraco.Infrastructure/Examine/UmbracoExamineExtensions.cs index c1932e0514..90f012f08a 100644 --- a/src/Umbraco.Infrastructure/Examine/UmbracoExamineExtensions.cs +++ b/src/Umbraco.Infrastructure/Examine/UmbracoExamineExtensions.cs @@ -1,10 +1,10 @@ -using Examine; -using Examine.Search; -using System.Collections.Generic; +using System.Collections.Generic; using System.Text.RegularExpressions; -using Umbraco.Core; +using Examine; +using Examine.Search; +using Umbraco.Cms.Infrastructure.Examine; -namespace Umbraco.Examine +namespace Umbraco.Extensions { public static class UmbracoExamineExtensions { @@ -16,7 +16,7 @@ namespace Umbraco.Examine /// internal static readonly Regex CultureIsoCodeFieldNameMatchExpression = new Regex("^([_\\w]+)_([a-z]{2}-[a-z0-9]{2,4})$", RegexOptions.Compiled); - + //TODO: We need a public method here to just match a field name against CultureIsoCodeFieldNameMatchExpression diff --git a/src/Umbraco.Infrastructure/Examine/UmbracoExamineFieldNames.cs b/src/Umbraco.Infrastructure/Examine/UmbracoExamineFieldNames.cs index 9b6d086ae4..90f1ddf634 100644 --- a/src/Umbraco.Infrastructure/Examine/UmbracoExamineFieldNames.cs +++ b/src/Umbraco.Infrastructure/Examine/UmbracoExamineFieldNames.cs @@ -1,6 +1,6 @@ using Examine; -namespace Umbraco.Examine +namespace Umbraco.Cms.Infrastructure.Examine { public static class UmbracoExamineFieldNames { diff --git a/src/Umbraco.Infrastructure/Examine/UmbracoFieldDefinitionCollection.cs b/src/Umbraco.Infrastructure/Examine/UmbracoFieldDefinitionCollection.cs index 0ea563e9cc..d278e95bb2 100644 --- a/src/Umbraco.Infrastructure/Examine/UmbracoFieldDefinitionCollection.cs +++ b/src/Umbraco.Infrastructure/Examine/UmbracoFieldDefinitionCollection.cs @@ -1,16 +1,14 @@ -using System.Collections.Generic; -using System.Text.RegularExpressions; -using Examine; -using Umbraco.Core; +using Examine; +using Umbraco.Extensions; -namespace Umbraco.Examine +namespace Umbraco.Cms.Infrastructure.Examine { /// /// Custom allowing dynamic creation of /// public class UmbracoFieldDefinitionCollection : FieldDefinitionCollection { - + public UmbracoFieldDefinitionCollection() : base(UmbracoIndexFieldDefinitions) { @@ -91,6 +89,6 @@ namespace Umbraco.Examine return false; } - + } } diff --git a/src/Umbraco.Infrastructure/Examine/UmbracoIndexConfig.cs b/src/Umbraco.Infrastructure/Examine/UmbracoIndexConfig.cs index a840c730ea..2c282a1924 100644 --- a/src/Umbraco.Infrastructure/Examine/UmbracoIndexConfig.cs +++ b/src/Umbraco.Infrastructure/Examine/UmbracoIndexConfig.cs @@ -1,7 +1,7 @@ using Examine; -using Umbraco.Core.Services; +using Umbraco.Cms.Core.Services; -namespace Umbraco.Examine +namespace Umbraco.Cms.Infrastructure.Examine { public class UmbracoIndexConfig : IUmbracoIndexConfig { diff --git a/src/Umbraco.Infrastructure/Examine/ValueSetValidator.cs b/src/Umbraco.Infrastructure/Examine/ValueSetValidator.cs index f6538dfacd..54eaac63df 100644 --- a/src/Umbraco.Infrastructure/Examine/ValueSetValidator.cs +++ b/src/Umbraco.Infrastructure/Examine/ValueSetValidator.cs @@ -1,9 +1,9 @@ using System.Collections.Generic; using System.Linq; using Examine; -using Umbraco.Core; +using Umbraco.Extensions; -namespace Umbraco.Examine +namespace Umbraco.Cms.Infrastructure.Examine { /// /// Performing basic validation of a value set diff --git a/src/Umbraco.Infrastructure/ObjectJsonExtensions.cs b/src/Umbraco.Infrastructure/Extensions/ObjectJsonExtensions.cs similarity index 90% rename from src/Umbraco.Infrastructure/ObjectJsonExtensions.cs rename to src/Umbraco.Infrastructure/Extensions/ObjectJsonExtensions.cs index 029f7ed502..40960cdbb7 100644 --- a/src/Umbraco.Infrastructure/ObjectJsonExtensions.cs +++ b/src/Umbraco.Infrastructure/Extensions/ObjectJsonExtensions.cs @@ -1,17 +1,12 @@ using System; -using System.Collections; using System.Collections.Concurrent; using System.Collections.Generic; -using System.ComponentModel; using System.Linq; -using System.Linq.Expressions; using System.Reflection; -using System.Runtime.CompilerServices; -using System.Xml; using Newtonsoft.Json; -using Umbraco.Core.Collections; +using Umbraco.Cms.Core; -namespace Umbraco.Core +namespace Umbraco.Extensions { /// /// Provides object extension methods. diff --git a/src/Umbraco.Infrastructure/HealthChecks/MarkdownToHtmlConverter.cs b/src/Umbraco.Infrastructure/HealthChecks/MarkdownToHtmlConverter.cs index 739035b177..64e329be97 100644 --- a/src/Umbraco.Infrastructure/HealthChecks/MarkdownToHtmlConverter.cs +++ b/src/Umbraco.Infrastructure/HealthChecks/MarkdownToHtmlConverter.cs @@ -1,8 +1,8 @@ using HeyRed.MarkdownSharp; -using Umbraco.Core.HealthChecks; -using Umbraco.Core.HealthChecks.NotificationMethods; +using Umbraco.Cms.Core.HealthChecks; +using Umbraco.Cms.Core.HealthChecks.NotificationMethods; -namespace Umbraco.Infrastructure.HealthChecks +namespace Umbraco.Cms.Infrastructure.HealthChecks { public class MarkdownToHtmlConverter : IMarkdownToHtmlConverter { diff --git a/src/Umbraco.Infrastructure/HostedServices/BackgroundTaskQueue.cs b/src/Umbraco.Infrastructure/HostedServices/BackgroundTaskQueue.cs index 152bb7c14f..10823dd149 100644 --- a/src/Umbraco.Infrastructure/HostedServices/BackgroundTaskQueue.cs +++ b/src/Umbraco.Infrastructure/HostedServices/BackgroundTaskQueue.cs @@ -3,7 +3,7 @@ using System.Collections.Concurrent; using System.Threading; using System.Threading.Tasks; -namespace Umbraco.Infrastructure.HostedServices +namespace Umbraco.Cms.Infrastructure.HostedServices { /// /// A Background Task Queue, to enqueue tasks for executing in the background. diff --git a/src/Umbraco.Infrastructure/HostedServices/HealthCheckNotifier.cs b/src/Umbraco.Infrastructure/HostedServices/HealthCheckNotifier.cs index dcbec3d8d1..85efeb2716 100644 --- a/src/Umbraco.Infrastructure/HostedServices/HealthCheckNotifier.cs +++ b/src/Umbraco.Infrastructure/HostedServices/HealthCheckNotifier.cs @@ -7,17 +7,19 @@ using System.Linq; using System.Threading.Tasks; using Microsoft.Extensions.Logging; using Microsoft.Extensions.Options; -using Umbraco.Core; -using Umbraco.Core.Configuration; -using Umbraco.Core.Configuration.Extensions; -using Umbraco.Core.Configuration.Models; -using Umbraco.Core.HealthChecks; -using Umbraco.Core.HealthChecks.NotificationMethods; -using Umbraco.Core.Logging; -using Umbraco.Core.Scoping; -using Umbraco.Core.Sync; +using Umbraco.Cms.Core; +using Umbraco.Cms.Core.Configuration; +using Umbraco.Cms.Core.Configuration.Models; +using Umbraco.Cms.Core.HealthChecks; +using Umbraco.Cms.Core.HealthChecks.NotificationMethods; +using Umbraco.Cms.Core.Logging; +using Umbraco.Cms.Core.Runtime; +using Umbraco.Cms.Core.Scoping; +using Umbraco.Cms.Core.Services; +using Umbraco.Cms.Core.Sync; +using Umbraco.Extensions; -namespace Umbraco.Infrastructure.HostedServices +namespace Umbraco.Cms.Infrastructure.HostedServices { /// /// Hosted service implementation for recurring health check notifications. diff --git a/src/Umbraco.Infrastructure/HostedServices/IBackgroundTaskQueue.cs b/src/Umbraco.Infrastructure/HostedServices/IBackgroundTaskQueue.cs index 7dba27bccb..d5d0c07fda 100644 --- a/src/Umbraco.Infrastructure/HostedServices/IBackgroundTaskQueue.cs +++ b/src/Umbraco.Infrastructure/HostedServices/IBackgroundTaskQueue.cs @@ -2,7 +2,7 @@ using System.Threading; using System.Threading.Tasks; -namespace Umbraco.Infrastructure.HostedServices +namespace Umbraco.Cms.Infrastructure.HostedServices { /// /// A Background Task Queue, to enqueue tasks for executing in the background. diff --git a/src/Umbraco.Infrastructure/HostedServices/KeepAlive.cs b/src/Umbraco.Infrastructure/HostedServices/KeepAlive.cs index f0acd22230..ad64319f5e 100644 --- a/src/Umbraco.Infrastructure/HostedServices/KeepAlive.cs +++ b/src/Umbraco.Infrastructure/HostedServices/KeepAlive.cs @@ -6,13 +6,14 @@ using System.Net.Http; using System.Threading.Tasks; using Microsoft.Extensions.Logging; using Microsoft.Extensions.Options; -using Umbraco.Core; -using Umbraco.Core.Configuration.Models; -using Umbraco.Core.Hosting; -using Umbraco.Core.Logging; -using Umbraco.Core.Sync; +using Umbraco.Cms.Core.Configuration.Models; +using Umbraco.Cms.Core.Hosting; +using Umbraco.Cms.Core.Logging; +using Umbraco.Cms.Core.Runtime; +using Umbraco.Cms.Core.Sync; +using Umbraco.Extensions; -namespace Umbraco.Infrastructure.HostedServices +namespace Umbraco.Cms.Infrastructure.HostedServices { /// /// Hosted service implementation for keep alive feature. diff --git a/src/Umbraco.Infrastructure/HostedServices/LogScrubber.cs b/src/Umbraco.Infrastructure/HostedServices/LogScrubber.cs index c933ee2470..01f9c3fdeb 100644 --- a/src/Umbraco.Infrastructure/HostedServices/LogScrubber.cs +++ b/src/Umbraco.Infrastructure/HostedServices/LogScrubber.cs @@ -5,14 +5,14 @@ using System; using System.Threading.Tasks; using Microsoft.Extensions.Logging; using Microsoft.Extensions.Options; -using Umbraco.Core; -using Umbraco.Core.Configuration.Models; -using Umbraco.Core.Logging; -using Umbraco.Core.Scoping; -using Umbraco.Core.Services; -using Umbraco.Core.Sync; +using Umbraco.Cms.Core.Configuration.Models; +using Umbraco.Cms.Core.Logging; +using Umbraco.Cms.Core.Runtime; +using Umbraco.Cms.Core.Scoping; +using Umbraco.Cms.Core.Services; +using Umbraco.Cms.Core.Sync; -namespace Umbraco.Infrastructure.HostedServices +namespace Umbraco.Cms.Infrastructure.HostedServices { /// /// Log scrubbing hosted service. diff --git a/src/Umbraco.Infrastructure/HostedServices/QueuedHostedService.cs b/src/Umbraco.Infrastructure/HostedServices/QueuedHostedService.cs index a330cb7811..db933fec31 100644 --- a/src/Umbraco.Infrastructure/HostedServices/QueuedHostedService.cs +++ b/src/Umbraco.Infrastructure/HostedServices/QueuedHostedService.cs @@ -4,7 +4,7 @@ using System.Threading.Tasks; using Microsoft.Extensions.Hosting; using Microsoft.Extensions.Logging; -namespace Umbraco.Infrastructure.HostedServices +namespace Umbraco.Cms.Infrastructure.HostedServices { /// diff --git a/src/Umbraco.Infrastructure/HostedServices/RecurringHostedServiceBase.cs b/src/Umbraco.Infrastructure/HostedServices/RecurringHostedServiceBase.cs index 7e9354523a..0f493e800e 100644 --- a/src/Umbraco.Infrastructure/HostedServices/RecurringHostedServiceBase.cs +++ b/src/Umbraco.Infrastructure/HostedServices/RecurringHostedServiceBase.cs @@ -6,7 +6,7 @@ using System.Threading; using System.Threading.Tasks; using Microsoft.Extensions.Hosting; -namespace Umbraco.Infrastructure.HostedServices +namespace Umbraco.Cms.Infrastructure.HostedServices { /// /// Provides a base class for recurring background tasks implemented as hosted services. diff --git a/src/Umbraco.Infrastructure/HostedServices/ReportSiteTask.cs b/src/Umbraco.Infrastructure/HostedServices/ReportSiteTask.cs index 7ce1fffa0c..87fc8a3a37 100644 --- a/src/Umbraco.Infrastructure/HostedServices/ReportSiteTask.cs +++ b/src/Umbraco.Infrastructure/HostedServices/ReportSiteTask.cs @@ -1,17 +1,16 @@ -using Newtonsoft.Json; -using System; +using System; using System.Net.Http; using System.Runtime.Serialization; using System.Text; using System.Threading.Tasks; using Microsoft.Extensions.Logging; using Microsoft.Extensions.Options; -using Umbraco.Core; -using Umbraco.Core.Configuration; -using Umbraco.Core.Configuration.Models; -using Umbraco.Infrastructure.HostedServices; +using Newtonsoft.Json; +using Umbraco.Cms.Core.Configuration; +using Umbraco.Cms.Core.Configuration.Models; +using Umbraco.Extensions; -namespace Umbraco.Web.Telemetry +namespace Umbraco.Cms.Infrastructure.HostedServices { public class ReportSiteTask : RecurringHostedServiceBase { diff --git a/src/Umbraco.Infrastructure/HostedServices/ScheduledPublishing.cs b/src/Umbraco.Infrastructure/HostedServices/ScheduledPublishing.cs index b42de1add5..bc81bfabcf 100644 --- a/src/Umbraco.Infrastructure/HostedServices/ScheduledPublishing.cs +++ b/src/Umbraco.Infrastructure/HostedServices/ScheduledPublishing.cs @@ -6,13 +6,14 @@ using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; using Microsoft.Extensions.Logging; -using Umbraco.Core; -using Umbraco.Core.Security; -using Umbraco.Core.Services; -using Umbraco.Core.Sync; -using Umbraco.Web; +using Umbraco.Cms.Core; +using Umbraco.Cms.Core.Runtime; +using Umbraco.Cms.Core.Security; +using Umbraco.Cms.Core.Services; +using Umbraco.Cms.Core.Sync; +using Umbraco.Cms.Core.Web; -namespace Umbraco.Infrastructure.HostedServices +namespace Umbraco.Cms.Infrastructure.HostedServices { /// /// Hosted service implementation for scheduled publishing feature. diff --git a/src/Umbraco.Infrastructure/HostedServices/ServerRegistration/InstructionProcessTask.cs b/src/Umbraco.Infrastructure/HostedServices/ServerRegistration/InstructionProcessTask.cs index 8b194e32ef..f30500d123 100644 --- a/src/Umbraco.Infrastructure/HostedServices/ServerRegistration/InstructionProcessTask.cs +++ b/src/Umbraco.Infrastructure/HostedServices/ServerRegistration/InstructionProcessTask.cs @@ -5,11 +5,12 @@ using System; using System.Threading.Tasks; using Microsoft.Extensions.Logging; using Microsoft.Extensions.Options; -using Umbraco.Core; -using Umbraco.Core.Configuration.Models; -using Umbraco.Core.Sync; +using Umbraco.Cms.Core; +using Umbraco.Cms.Core.Configuration.Models; +using Umbraco.Cms.Core.Services; +using Umbraco.Cms.Core.Sync; -namespace Umbraco.Infrastructure.HostedServices.ServerRegistration +namespace Umbraco.Cms.Infrastructure.HostedServices.ServerRegistration { /// /// Implements periodic database instruction processing as a hosted service. diff --git a/src/Umbraco.Infrastructure/HostedServices/ServerRegistration/TouchServerTask.cs b/src/Umbraco.Infrastructure/HostedServices/ServerRegistration/TouchServerTask.cs index 6771705c8e..82913b59fc 100644 --- a/src/Umbraco.Infrastructure/HostedServices/ServerRegistration/TouchServerTask.cs +++ b/src/Umbraco.Infrastructure/HostedServices/ServerRegistration/TouchServerTask.cs @@ -5,12 +5,13 @@ using System; using System.Threading.Tasks; using Microsoft.Extensions.Logging; using Microsoft.Extensions.Options; -using Umbraco.Core; -using Umbraco.Core.Configuration.Models; -using Umbraco.Core.Hosting; -using Umbraco.Core.Services; +using Umbraco.Cms.Core; +using Umbraco.Cms.Core.Configuration.Models; +using Umbraco.Cms.Core.Hosting; +using Umbraco.Cms.Core.Services; +using Umbraco.Extensions; -namespace Umbraco.Infrastructure.HostedServices.ServerRegistration +namespace Umbraco.Cms.Infrastructure.HostedServices.ServerRegistration { /// /// Implements periodic server "touching" (to mark as active/deactive) as a hosted service. diff --git a/src/Umbraco.Infrastructure/HostedServices/TempFileCleanup.cs b/src/Umbraco.Infrastructure/HostedServices/TempFileCleanup.cs index 7e3f70d510..3ef1064f5f 100644 --- a/src/Umbraco.Infrastructure/HostedServices/TempFileCleanup.cs +++ b/src/Umbraco.Infrastructure/HostedServices/TempFileCleanup.cs @@ -5,10 +5,10 @@ using System; using System.IO; using System.Threading.Tasks; using Microsoft.Extensions.Logging; -using Umbraco.Core; -using Umbraco.Core.IO; +using Umbraco.Cms.Core.IO; +using Umbraco.Cms.Core.Runtime; -namespace Umbraco.Infrastructure.HostedServices +namespace Umbraco.Cms.Infrastructure.HostedServices { /// /// Used to cleanup temporary file locations. diff --git a/src/Umbraco.Infrastructure/IPublishedContentQuery.cs b/src/Umbraco.Infrastructure/IPublishedContentQuery.cs index c5f49c3e0b..e487873ab2 100644 --- a/src/Umbraco.Infrastructure/IPublishedContentQuery.cs +++ b/src/Umbraco.Infrastructure/IPublishedContentQuery.cs @@ -2,20 +2,16 @@ using System.Collections.Generic; using System.Xml.XPath; using Examine.Search; -using Umbraco.Core; -using Umbraco.Core.Models.PublishedContent; -using Umbraco.Core.Xml; +using Umbraco.Cms.Core.Models.PublishedContent; +using Umbraco.Cms.Core.Xml; -namespace Umbraco.Web +namespace Umbraco.Cms.Core { /// /// Query methods used for accessing strongly typed content in templates /// public interface IPublishedContentQuery { - - - IPublishedContent Content(int id); IPublishedContent Content(Guid id); IPublishedContent Content(Udi id); @@ -44,7 +40,7 @@ namespace Umbraco.Web /// /// The term to search. /// The culture (defaults to a culture insensitive search). - /// The name of the index to search (defaults to ). + /// The name of the index to search (defaults to ). /// /// The search results. /// diff --git a/src/Umbraco.Infrastructure/Install/FilePermissionHelper.cs b/src/Umbraco.Infrastructure/Install/FilePermissionHelper.cs index ec73035dc2..7c28e09445 100644 --- a/src/Umbraco.Infrastructure/Install/FilePermissionHelper.cs +++ b/src/Umbraco.Infrastructure/Install/FilePermissionHelper.cs @@ -7,13 +7,14 @@ using System.IO; using System.Linq; using System.Security.AccessControl; using Microsoft.Extensions.Options; -using Umbraco.Core; -using Umbraco.Core.Configuration.Models; -using Umbraco.Core.Hosting; -using Umbraco.Core.Install; -using Umbraco.Core.IO; +using Umbraco.Cms.Core; +using Umbraco.Cms.Core.Configuration.Models; +using Umbraco.Cms.Core.Hosting; +using Umbraco.Cms.Core.Install; +using Umbraco.Cms.Core.IO; +using Umbraco.Extensions; -namespace Umbraco.Infrastructure.Install +namespace Umbraco.Cms.Infrastructure.Install { /// public class FilePermissionHelper : IFilePermissionHelper @@ -26,6 +27,7 @@ namespace Umbraco.Infrastructure.Install private readonly string[] _permissionFiles = Array.Empty(); private readonly GlobalSettings _globalSettings; private readonly IIOHelper _ioHelper; + private readonly IHostingEnvironment _hostingEnvironment; private string _basePath; /// @@ -35,6 +37,7 @@ namespace Umbraco.Infrastructure.Install { _globalSettings = globalSettings.Value; _ioHelper = ioHelper; + _hostingEnvironment = hostingEnvironment; _basePath = hostingEnvironment.MapPathContentRoot("/"); _permissionDirs = new[] { @@ -67,7 +70,7 @@ namespace Umbraco.Infrastructure.Install EnsureFiles(_permissionFiles, out errors); report[FilePermissionTest.FileWriting] = errors.ToList(); - EnsureCanCreateSubDirectory(_globalSettings.UmbracoMediaPath, out errors); + EnsureCanCreateSubDirectory(_hostingEnvironment.MapPathWebRoot(_globalSettings.UmbracoMediaPath), out errors); report[FilePermissionTest.MediaFolderCreation] = errors.ToList(); return report.Sum(x => x.Value.Count()) == 0; diff --git a/src/Umbraco.Infrastructure/Install/InstallHelper.cs b/src/Umbraco.Infrastructure/Install/InstallHelper.cs index b8b5371457..7206bdfffa 100644 --- a/src/Umbraco.Infrastructure/Install/InstallHelper.cs +++ b/src/Umbraco.Infrastructure/Install/InstallHelper.cs @@ -1,22 +1,24 @@ -using System; +using System; using System.Collections.Generic; using System.Linq; using System.Net.Http; using System.Threading.Tasks; using Microsoft.Extensions.Logging; -using Umbraco.Core; -using Umbraco.Core.Configuration; -using Umbraco.Core.Migrations.Install; -using Umbraco.Core.Models; -using Umbraco.Net; -using Umbraco.Core.Persistence; -using Umbraco.Core.Serialization; -using Umbraco.Core.Services; -using Umbraco.Web.Install.Models; using Microsoft.Extensions.Options; -using Umbraco.Core.Configuration.Models; +using Umbraco.Cms.Core; +using Umbraco.Cms.Core.Configuration; +using Umbraco.Cms.Core.Configuration.Models; +using Umbraco.Cms.Core.Install.Models; +using Umbraco.Cms.Core.Net; +using Umbraco.Cms.Core.Serialization; +using Umbraco.Cms.Core.Services; +using Umbraco.Cms.Core.Web; +using Umbraco.Cms.Infrastructure.Migrations.Install; +using Umbraco.Cms.Infrastructure.Persistence; +using Umbraco.Extensions; +using Constants = Umbraco.Cms.Core.Constants; -namespace Umbraco.Web.Install +namespace Umbraco.Cms.Infrastructure.Install { public sealed class InstallHelper { @@ -96,8 +98,8 @@ namespace Umbraco.Web.Install } var installLog = new InstallLog(installId: installId, isUpgrade: IsBrandNewInstall == false, - installCompleted: isCompleted, timestamp: DateTime.Now, versionMajor: _umbracoVersion.Current.Major, - versionMinor: _umbracoVersion.Current.Minor, versionPatch: _umbracoVersion.Current.Build, + installCompleted: isCompleted, timestamp: DateTime.Now, versionMajor: _umbracoVersion.Version.Major, + versionMinor: _umbracoVersion.Version.Minor, versionPatch: _umbracoVersion.Version.Build, versionComment: _umbracoVersion.Comment, error: errorMsg, userAgent: userAgent, dbProvider: dbProvider); @@ -143,7 +145,7 @@ namespace Umbraco.Web.Install var packages = new List(); try { - var requestUri = $"https://our.umbraco.com/webapi/StarterKit/Get/?umbracoVersion={_umbracoVersion.Current}"; + var requestUri = $"https://our.umbraco.com/webapi/StarterKit/Get/?umbracoVersion={_umbracoVersion.Version}"; using (var request = new HttpRequestMessage(HttpMethod.Get, requestUri)) { diff --git a/src/Umbraco.Infrastructure/Install/InstallStepCollection.cs b/src/Umbraco.Infrastructure/Install/InstallStepCollection.cs index c8be2fc5a9..2a9c303349 100644 --- a/src/Umbraco.Infrastructure/Install/InstallStepCollection.cs +++ b/src/Umbraco.Infrastructure/Install/InstallStepCollection.cs @@ -1,10 +1,10 @@ using System.Collections.Generic; using System.Linq; -using Umbraco.Core.Install.InstallSteps; -using Umbraco.Web.Install.InstallSteps; -using Umbraco.Web.Install.Models; +using Umbraco.Cms.Core.Install.InstallSteps; +using Umbraco.Cms.Core.Install.Models; +using Umbraco.Cms.Infrastructure.Install.InstallSteps; -namespace Umbraco.Web.Install +namespace Umbraco.Cms.Infrastructure.Install { public sealed class InstallStepCollection { diff --git a/src/Umbraco.Infrastructure/Install/InstallSteps/CompleteInstallStep.cs b/src/Umbraco.Infrastructure/Install/InstallSteps/CompleteInstallStep.cs index c95defe51a..a819306ae9 100644 --- a/src/Umbraco.Infrastructure/Install/InstallSteps/CompleteInstallStep.cs +++ b/src/Umbraco.Infrastructure/Install/InstallSteps/CompleteInstallStep.cs @@ -1,7 +1,7 @@ using System.Threading.Tasks; -using Umbraco.Web.Install.Models; +using Umbraco.Cms.Core.Install.Models; -namespace Umbraco.Web.Install.InstallSteps +namespace Umbraco.Cms.Infrastructure.Install.InstallSteps { [InstallSetupStep(InstallationType.NewInstall | InstallationType.Upgrade, "UmbracoVersion", 50, "Installation is complete! Get ready to be redirected to your new CMS.", diff --git a/src/Umbraco.Infrastructure/Install/InstallSteps/DatabaseConfigureStep.cs b/src/Umbraco.Infrastructure/Install/InstallSteps/DatabaseConfigureStep.cs index 467d712888..8e0c5601e6 100644 --- a/src/Umbraco.Infrastructure/Install/InstallSteps/DatabaseConfigureStep.cs +++ b/src/Umbraco.Infrastructure/Install/InstallSteps/DatabaseConfigureStep.cs @@ -3,12 +3,13 @@ using System.Collections.Generic; using System.Threading.Tasks; using Microsoft.Extensions.Logging; using Microsoft.Extensions.Options; -using Umbraco.Core; -using Umbraco.Core.Configuration.Models; -using Umbraco.Core.Migrations.Install; -using Umbraco.Web.Install.Models; +using Umbraco.Cms.Core.Configuration.Models; +using Umbraco.Cms.Core.Install; +using Umbraco.Cms.Core.Install.Models; +using Umbraco.Cms.Infrastructure.Migrations.Install; +using Umbraco.Extensions; -namespace Umbraco.Web.Install.InstallSteps +namespace Umbraco.Cms.Infrastructure.Install.InstallSteps { [InstallSetupStep(InstallationType.NewInstall, "DatabaseConfigure", "database", 10, "Setting up a database, so Umbraco has a place to store your website", @@ -95,7 +96,7 @@ namespace Umbraco.Web.Install.InstallSteps // NOTE: Type.GetType will only return types that are currently loaded into the appdomain. In this case // that is ok because we know if this is availalbe we will have manually loaded it into the appdomain. // Else we'd have to use Assembly.LoadFrom and need to know the DLL location here which we don't need to do. - return !(Type.GetType("Umbraco.Persistence.SqlCe.SqlCeSyntaxProvider, Umbraco.Persistence.SqlCe") is null); + return !(Type.GetType("Umbraco.Cms.Persistence.SqlCe.SqlCeSyntaxProvider, Umbraco.Persistence.SqlCe") is null); } public override string View => ShouldDisplayView() ? base.View : ""; diff --git a/src/Umbraco.Infrastructure/Install/InstallSteps/DatabaseInstallStep.cs b/src/Umbraco.Infrastructure/Install/InstallSteps/DatabaseInstallStep.cs index e5f783caba..61d78173fa 100644 --- a/src/Umbraco.Infrastructure/Install/InstallSteps/DatabaseInstallStep.cs +++ b/src/Umbraco.Infrastructure/Install/InstallSteps/DatabaseInstallStep.cs @@ -1,14 +1,13 @@ using System; using System.Collections.Generic; using System.Threading.Tasks; -using Umbraco.Core; -using Umbraco.Core.Configuration; -using Umbraco.Core.IO; -using Umbraco.Core.Logging; -using Umbraco.Core.Migrations.Install; -using Umbraco.Web.Install.Models; +using Umbraco.Cms.Core; +using Umbraco.Cms.Core.Install; +using Umbraco.Cms.Core.Install.Models; +using Umbraco.Cms.Core.Services; +using Umbraco.Cms.Infrastructure.Migrations.Install; -namespace Umbraco.Web.Install.InstallSteps +namespace Umbraco.Cms.Infrastructure.Install.InstallSteps { [InstallSetupStep(InstallationType.NewInstall | InstallationType.Upgrade, "DatabaseInstall", 11, "")] diff --git a/src/Umbraco.Infrastructure/Install/InstallSteps/DatabaseUpgradeStep.cs b/src/Umbraco.Infrastructure/Install/InstallSteps/DatabaseUpgradeStep.cs index 7258628b7d..9e11cbd51f 100644 --- a/src/Umbraco.Infrastructure/Install/InstallSteps/DatabaseUpgradeStep.cs +++ b/src/Umbraco.Infrastructure/Install/InstallSteps/DatabaseUpgradeStep.cs @@ -1,18 +1,20 @@ using System; using System.Linq; using System.Threading.Tasks; -using Microsoft.Extensions.Options; using Microsoft.Extensions.Logging; -using Umbraco.Core; -using Umbraco.Core.Configuration; -using Umbraco.Core.Configuration.Models; -using Umbraco.Core.IO; -using Umbraco.Core.Migrations.Install; -using Umbraco.Core.Migrations.Upgrade; -using Umbraco.Web.Install.Models; -using Umbraco.Web.Migrations.PostMigrations; +using Microsoft.Extensions.Options; +using Umbraco.Cms.Core; +using Umbraco.Cms.Core.Configuration; +using Umbraco.Cms.Core.Configuration.Models; +using Umbraco.Cms.Core.Install; +using Umbraco.Cms.Core.Install.Models; +using Umbraco.Cms.Core.Services; +using Umbraco.Cms.Infrastructure.Migrations.Install; +using Umbraco.Cms.Infrastructure.Migrations.PostMigrations; +using Umbraco.Cms.Infrastructure.Migrations.Upgrade; +using Umbraco.Extensions; -namespace Umbraco.Web.Install.InstallSteps +namespace Umbraco.Cms.Infrastructure.Install.InstallSteps { [InstallSetupStep(InstallationType.Upgrade | InstallationType.NewInstall, "DatabaseUpgrade", 12, "")] diff --git a/src/Umbraco.Infrastructure/Install/InstallSteps/NewInstallStep.cs b/src/Umbraco.Infrastructure/Install/InstallSteps/NewInstallStep.cs index 91c78457c0..05bd0bf26f 100644 --- a/src/Umbraco.Infrastructure/Install/InstallSteps/NewInstallStep.cs +++ b/src/Umbraco.Infrastructure/Install/InstallSteps/NewInstallStep.cs @@ -5,17 +5,17 @@ using System.Text; using System.Threading.Tasks; using Microsoft.Extensions.Options; using Newtonsoft.Json; -using Umbraco.Core; -using Umbraco.Core.Configuration.Models; -using Umbraco.Core.Migrations.Install; -using Umbraco.Core.Security; -using Umbraco.Core.Persistence; -using Umbraco.Core.Services; +using Umbraco.Cms.Core.Configuration.Models; +using Umbraco.Cms.Core.Install.Models; +using Umbraco.Cms.Core.Security; +using Umbraco.Cms.Core.Services; +using Umbraco.Cms.Core.Web; +using Umbraco.Cms.Infrastructure.Migrations.Install; +using Umbraco.Cms.Infrastructure.Persistence; using Umbraco.Extensions; -using Umbraco.Infrastructure.Security; -using Umbraco.Web.Install.Models; +using Constants = Umbraco.Cms.Core.Constants; -namespace Umbraco.Web.Install.InstallSteps +namespace Umbraco.Cms.Infrastructure.Install.InstallSteps { /// /// This is the first UI step for a brand new install diff --git a/src/Umbraco.Infrastructure/Install/InstallSteps/StarterKitDownloadStep.cs b/src/Umbraco.Infrastructure/Install/InstallSteps/StarterKitDownloadStep.cs index 8bc5bcfdff..7f3885e4e2 100644 --- a/src/Umbraco.Infrastructure/Install/InstallSteps/StarterKitDownloadStep.cs +++ b/src/Umbraco.Infrastructure/Install/InstallSteps/StarterKitDownloadStep.cs @@ -1,16 +1,15 @@ -using System; +using System; using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; -using Umbraco.Core.Services; -using Umbraco.Core.Configuration; -using Umbraco.Core.Models.Packaging; -using Umbraco.Core.Security; -using Umbraco.Web.Install.Models; -using Umbraco.Web.Security; -using Umbraco.Core.Hosting; +using Umbraco.Cms.Core.Configuration; +using Umbraco.Cms.Core.Hosting; +using Umbraco.Cms.Core.Install.Models; +using Umbraco.Cms.Core.Packaging; +using Umbraco.Cms.Core.Security; +using Umbraco.Cms.Core.Services; -namespace Umbraco.Web.Install.InstallSteps +namespace Umbraco.Cms.Infrastructure.Install.InstallSteps { [InstallSetupStep(InstallationType.NewInstall, "StarterKitDownload", "starterKit", 30, "Adding a simple website to Umbraco, will make it easier for you to get started", @@ -68,7 +67,7 @@ namespace Umbraco.Web.Install.InstallSteps private async Task<(string packageFile, int packageId)> DownloadPackageFilesAsync(Guid kitGuid) { //Go get the package file from the package repo - var packageFile = await _packageService.FetchPackageFileAsync(kitGuid, _umbracoVersion.Current, _backofficeSecurityAccessor.BackOfficeSecurity.GetUserId().ResultOr(0)); + var packageFile = await _packageService.FetchPackageFileAsync(kitGuid, _umbracoVersion.Version, _backofficeSecurityAccessor.BackOfficeSecurity.GetUserId().ResultOr(0)); if (packageFile == null) throw new InvalidOperationException("Could not fetch package file " + kitGuid); //add an entry to the installedPackages.config diff --git a/src/Umbraco.Infrastructure/Logging/MessageTemplates.cs b/src/Umbraco.Infrastructure/Logging/MessageTemplates.cs index 712ff85e16..305844d7d6 100644 --- a/src/Umbraco.Infrastructure/Logging/MessageTemplates.cs +++ b/src/Umbraco.Infrastructure/Logging/MessageTemplates.cs @@ -1,12 +1,12 @@ using System; using System.IO; using System.Linq; -using System.Text; using Serilog; using Serilog.Events; using Serilog.Parsing; +using Umbraco.Cms.Core.Logging; -namespace Umbraco.Core.Logging +namespace Umbraco.Cms.Core.Logging { public class MessageTemplates : IMessageTemplates { diff --git a/src/Umbraco.Infrastructure/Logging/Serilog/Enrichers/HttpRequestIdEnricher.cs b/src/Umbraco.Infrastructure/Logging/Serilog/Enrichers/HttpRequestIdEnricher.cs index 704e80d302..cddd98bb13 100644 --- a/src/Umbraco.Infrastructure/Logging/Serilog/Enrichers/HttpRequestIdEnricher.cs +++ b/src/Umbraco.Infrastructure/Logging/Serilog/Enrichers/HttpRequestIdEnricher.cs @@ -1,10 +1,10 @@ using System; using Serilog.Core; using Serilog.Events; -using Umbraco.Core.Cache; -using Umbraco.Core.Composing; +using Umbraco.Cms.Core.Cache; +using Umbraco.Extensions; -namespace Umbraco.Core.Logging.Serilog.Enrichers +namespace Umbraco.Cms.Core.Logging.Serilog.Enrichers { /// /// Enrich log events with a HttpRequestId GUID. diff --git a/src/Umbraco.Infrastructure/Logging/Serilog/Enrichers/HttpRequestNumberEnricher.cs b/src/Umbraco.Infrastructure/Logging/Serilog/Enrichers/HttpRequestNumberEnricher.cs index 20643ff539..57e31ebec9 100644 --- a/src/Umbraco.Infrastructure/Logging/Serilog/Enrichers/HttpRequestNumberEnricher.cs +++ b/src/Umbraco.Infrastructure/Logging/Serilog/Enrichers/HttpRequestNumberEnricher.cs @@ -2,10 +2,9 @@ using System.Threading; using Serilog.Core; using Serilog.Events; -using Umbraco.Core.Cache; -using Umbraco.Core.Composing; +using Umbraco.Cms.Core.Cache; -namespace Umbraco.Core.Logging.Serilog.Enrichers +namespace Umbraco.Cms.Core.Logging.Serilog.Enrichers { /// /// Enrich log events with a HttpRequestNumber unique within the current diff --git a/src/Umbraco.Infrastructure/Logging/Serilog/Enrichers/HttpSessionIdEnricher.cs b/src/Umbraco.Infrastructure/Logging/Serilog/Enrichers/HttpSessionIdEnricher.cs index 19572b5b42..7f85873c61 100644 --- a/src/Umbraco.Infrastructure/Logging/Serilog/Enrichers/HttpSessionIdEnricher.cs +++ b/src/Umbraco.Infrastructure/Logging/Serilog/Enrichers/HttpSessionIdEnricher.cs @@ -1,9 +1,9 @@ using Serilog.Core; using Serilog.Events; using System; -using Umbraco.Net; +using Umbraco.Cms.Core.Net; -namespace Umbraco.Core.Logging.Serilog.Enrichers +namespace Umbraco.Cms.Core.Logging.Serilog.Enrichers { /// /// Enrich log events with the HttpSessionId property. diff --git a/src/Umbraco.Infrastructure/Logging/Serilog/Enrichers/Log4NetLevelMapperEnricher.cs b/src/Umbraco.Infrastructure/Logging/Serilog/Enrichers/Log4NetLevelMapperEnricher.cs index 0c255fa8b4..2cf782c5bf 100644 --- a/src/Umbraco.Infrastructure/Logging/Serilog/Enrichers/Log4NetLevelMapperEnricher.cs +++ b/src/Umbraco.Infrastructure/Logging/Serilog/Enrichers/Log4NetLevelMapperEnricher.cs @@ -1,7 +1,7 @@ using Serilog.Core; using Serilog.Events; -namespace Umbraco.Core.Logging.Serilog.Enrichers +namespace Umbraco.Cms.Core.Logging.Serilog.Enrichers { /// /// This is used to create a new property in Logs called 'Log4NetLevel' diff --git a/src/Umbraco.Infrastructure/Logging/Serilog/Enrichers/ThreadAbortExceptionEnricher.cs b/src/Umbraco.Infrastructure/Logging/Serilog/Enrichers/ThreadAbortExceptionEnricher.cs index a85e52cffe..9ea3d0009d 100644 --- a/src/Umbraco.Infrastructure/Logging/Serilog/Enrichers/ThreadAbortExceptionEnricher.cs +++ b/src/Umbraco.Infrastructure/Logging/Serilog/Enrichers/ThreadAbortExceptionEnricher.cs @@ -4,11 +4,11 @@ using System.Threading; using Microsoft.Extensions.Options; using Serilog.Core; using Serilog.Events; -using Umbraco.Core.Diagnostics; -using Umbraco.Core.Hosting; -using CoreDebugSettings = Umbraco.Core.Configuration.Models.CoreDebugSettings; +using Umbraco.Cms.Core.Diagnostics; +using Umbraco.Cms.Core.Hosting; +using CoreDebugSettings = Umbraco.Cms.Core.Configuration.Models.CoreDebugSettings; -namespace Umbraco.Infrastructure.Logging.Serilog.Enrichers +namespace Umbraco.Cms.Core.Logging.Serilog.Enrichers { /// /// Enriches the log if there are ThreadAbort exceptions and will automatically create a minidump if it can diff --git a/src/Umbraco.Infrastructure/Logging/Serilog/LoggerConfigExtensions.cs b/src/Umbraco.Infrastructure/Logging/Serilog/LoggerConfigExtensions.cs index 5481f22cb6..8e693b83ee 100644 --- a/src/Umbraco.Infrastructure/Logging/Serilog/LoggerConfigExtensions.cs +++ b/src/Umbraco.Infrastructure/Logging/Serilog/LoggerConfigExtensions.cs @@ -7,10 +7,11 @@ using Serilog.Core; using Serilog.Events; using Serilog.Formatting; using Serilog.Formatting.Compact; -using Umbraco.Core.Hosting; -using Umbraco.Core.Logging.Serilog.Enrichers; +using Umbraco.Cms.Core.Hosting; +using Umbraco.Cms.Core.Logging; +using Umbraco.Cms.Core.Logging.Serilog.Enrichers; -namespace Umbraco.Core.Logging.Serilog +namespace Umbraco.Extensions { public static class LoggerConfigExtensions { @@ -69,7 +70,7 @@ namespace Umbraco.Core.Logging.Serilog { //Main .txt logfile - in similar format to older Log4Net output //Ends with ..txt as Date is inserted before file extension substring - logConfig.WriteTo.File(Path.Combine(hostingEnvironment.MapPathContentRoot(Constants.SystemDirectories.LogFiles), $"UmbracoTraceLog.{Environment.MachineName}..txt"), + logConfig.WriteTo.File(Path.Combine(hostingEnvironment.MapPathContentRoot(Cms.Core.Constants.SystemDirectories.LogFiles), $"UmbracoTraceLog.{Environment.MachineName}..txt"), shared: true, rollingInterval: RollingInterval.Day, restrictedToMinimumLevel: minimumLevel, @@ -138,7 +139,7 @@ namespace Umbraco.Core.Logging.Serilog // .clef format (Compact log event format, that can be imported into local SEQ & will make searching/filtering logs easier) // Ends with ..txt as Date is inserted before file extension substring logConfig.WriteTo.File(new CompactJsonFormatter(), - Path.Combine(hostingEnvironment.MapPathContentRoot(Constants.SystemDirectories.LogFiles) ,$"UmbracoTraceLog.{Environment.MachineName}..json"), + Path.Combine(hostingEnvironment.MapPathContentRoot(Cms.Core.Constants.SystemDirectories.LogFiles) ,$"UmbracoTraceLog.{Environment.MachineName}..json"), shared: true, rollingInterval: RollingInterval.Day, // Create a new JSON file every day retainedFileCountLimit: retainedFileCount, // Setting to null means we keep all files - default is 31 days diff --git a/src/Umbraco.Infrastructure/Logging/Serilog/SerilogLogger.cs b/src/Umbraco.Infrastructure/Logging/Serilog/SerilogLogger.cs index 9e14a6407a..26a87a3dff 100644 --- a/src/Umbraco.Infrastructure/Logging/Serilog/SerilogLogger.cs +++ b/src/Umbraco.Infrastructure/Logging/Serilog/SerilogLogger.cs @@ -1,15 +1,13 @@ using System; using System.IO; using Microsoft.Extensions.Configuration; -using Microsoft.Extensions.Logging; using Serilog; using Serilog.Events; -using Serilog.Extensions.Logging; -using Umbraco.Core.Hosting; +using Umbraco.Cms.Core.Hosting; +using Umbraco.Extensions; -namespace Umbraco.Core.Logging.Serilog +namespace Umbraco.Cms.Core.Logging.Serilog { - /// /// Implements on top of Serilog. /// diff --git a/src/Umbraco.Infrastructure/Logging/Viewer/CountingFilter.cs b/src/Umbraco.Infrastructure/Logging/Viewer/CountingFilter.cs index bce0e0e9f8..36d12dee0d 100644 --- a/src/Umbraco.Infrastructure/Logging/Viewer/CountingFilter.cs +++ b/src/Umbraco.Infrastructure/Logging/Viewer/CountingFilter.cs @@ -1,7 +1,7 @@ using System; using Serilog.Events; -namespace Umbraco.Core.Logging.Viewer +namespace Umbraco.Cms.Core.Logging.Viewer { internal class CountingFilter : ILogFilter { diff --git a/src/Umbraco.Infrastructure/Logging/Viewer/ErrorCounterFilter.cs b/src/Umbraco.Infrastructure/Logging/Viewer/ErrorCounterFilter.cs index 63f85b1087..1a4ececff6 100644 --- a/src/Umbraco.Infrastructure/Logging/Viewer/ErrorCounterFilter.cs +++ b/src/Umbraco.Infrastructure/Logging/Viewer/ErrorCounterFilter.cs @@ -1,6 +1,6 @@ using Serilog.Events; -namespace Umbraco.Core.Logging.Viewer +namespace Umbraco.Cms.Core.Logging.Viewer { internal class ErrorCounterFilter : ILogFilter { diff --git a/src/Umbraco.Infrastructure/Logging/Viewer/ExpressionFilter.cs b/src/Umbraco.Infrastructure/Logging/Viewer/ExpressionFilter.cs index f38897d47e..7327262ec5 100644 --- a/src/Umbraco.Infrastructure/Logging/Viewer/ExpressionFilter.cs +++ b/src/Umbraco.Infrastructure/Logging/Viewer/ExpressionFilter.cs @@ -2,8 +2,9 @@ using System.Linq; using Serilog.Events; using Serilog.Filters.Expressions; +using Umbraco.Extensions; -namespace Umbraco.Core.Logging.Viewer +namespace Umbraco.Cms.Core.Logging.Viewer { //Log Expression Filters (pass in filter exp string) internal class ExpressionFilter : ILogFilter diff --git a/src/Umbraco.Infrastructure/Logging/Viewer/ILogFilter.cs b/src/Umbraco.Infrastructure/Logging/Viewer/ILogFilter.cs index 3e1deb4923..4619df2b13 100644 --- a/src/Umbraco.Infrastructure/Logging/Viewer/ILogFilter.cs +++ b/src/Umbraco.Infrastructure/Logging/Viewer/ILogFilter.cs @@ -1,6 +1,6 @@ using Serilog.Events; -namespace Umbraco.Core.Logging.Viewer +namespace Umbraco.Cms.Core.Logging.Viewer { public interface ILogFilter { diff --git a/src/Umbraco.Infrastructure/Logging/Viewer/ILogViewer.cs b/src/Umbraco.Infrastructure/Logging/Viewer/ILogViewer.cs index 6763b0ebbb..2cb6123469 100644 --- a/src/Umbraco.Infrastructure/Logging/Viewer/ILogViewer.cs +++ b/src/Umbraco.Infrastructure/Logging/Viewer/ILogViewer.cs @@ -1,7 +1,7 @@ using System.Collections.Generic; -using Umbraco.Core.Models; +using Umbraco.Cms.Core.Models; -namespace Umbraco.Core.Logging.Viewer +namespace Umbraco.Cms.Core.Logging.Viewer { public interface ILogViewer { diff --git a/src/Umbraco.Infrastructure/Logging/Viewer/ILogViewerConfig.cs b/src/Umbraco.Infrastructure/Logging/Viewer/ILogViewerConfig.cs index 14f35361e6..54ade21b48 100644 --- a/src/Umbraco.Infrastructure/Logging/Viewer/ILogViewerConfig.cs +++ b/src/Umbraco.Infrastructure/Logging/Viewer/ILogViewerConfig.cs @@ -1,7 +1,7 @@ using System; using System.Collections.Generic; -namespace Umbraco.Core.Logging.Viewer +namespace Umbraco.Cms.Core.Logging.Viewer { public interface ILogViewerConfig { diff --git a/src/Umbraco.Infrastructure/Logging/Viewer/LogLevelCounts.cs b/src/Umbraco.Infrastructure/Logging/Viewer/LogLevelCounts.cs index 4d2e39f6e2..f397c1ab7c 100644 --- a/src/Umbraco.Infrastructure/Logging/Viewer/LogLevelCounts.cs +++ b/src/Umbraco.Infrastructure/Logging/Viewer/LogLevelCounts.cs @@ -1,4 +1,4 @@ -namespace Umbraco.Core.Logging.Viewer +namespace Umbraco.Cms.Core.Logging.Viewer { public class LogLevelCounts { diff --git a/src/Umbraco.Infrastructure/Logging/Viewer/LogMessage.cs b/src/Umbraco.Infrastructure/Logging/Viewer/LogMessage.cs index c9310ad200..e55f1605fb 100644 --- a/src/Umbraco.Infrastructure/Logging/Viewer/LogMessage.cs +++ b/src/Umbraco.Infrastructure/Logging/Viewer/LogMessage.cs @@ -5,7 +5,7 @@ using System; using System.Collections.Generic; // ReSharper disable UnusedAutoPropertyAccessor.Global -namespace Umbraco.Core.Logging.Viewer +namespace Umbraco.Cms.Core.Logging.Viewer { public class LogMessage { diff --git a/src/Umbraco.Infrastructure/Logging/Viewer/LogTemplate.cs b/src/Umbraco.Infrastructure/Logging/Viewer/LogTemplate.cs index dd960a9e81..3398e32fd0 100644 --- a/src/Umbraco.Infrastructure/Logging/Viewer/LogTemplate.cs +++ b/src/Umbraco.Infrastructure/Logging/Viewer/LogTemplate.cs @@ -1,4 +1,4 @@ -namespace Umbraco.Core.Logging.Viewer +namespace Umbraco.Cms.Core.Logging.Viewer { public class LogTemplate { diff --git a/src/Umbraco.Infrastructure/Logging/Viewer/LogTimePeriod.cs b/src/Umbraco.Infrastructure/Logging/Viewer/LogTimePeriod.cs index 0f41faef0a..446f7bf160 100644 --- a/src/Umbraco.Infrastructure/Logging/Viewer/LogTimePeriod.cs +++ b/src/Umbraco.Infrastructure/Logging/Viewer/LogTimePeriod.cs @@ -1,6 +1,6 @@ using System; -namespace Umbraco.Core.Logging.Viewer +namespace Umbraco.Cms.Core.Logging.Viewer { public class LogTimePeriod { diff --git a/src/Umbraco.Infrastructure/Logging/Viewer/LogViewerComposer.cs b/src/Umbraco.Infrastructure/Logging/Viewer/LogViewerComposer.cs index 4c419a1648..dcfcb66d5d 100644 --- a/src/Umbraco.Infrastructure/Logging/Viewer/LogViewerComposer.cs +++ b/src/Umbraco.Infrastructure/Logging/Viewer/LogViewerComposer.cs @@ -1,11 +1,13 @@ using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Logging; using Serilog; -using Umbraco.Core.DependencyInjection; -using Umbraco.Core.Composing; -using Umbraco.Infrastructure.DependencyInjection; +using Umbraco.Cms.Core.Composing; +using Umbraco.Cms.Core.DependencyInjection; +using Umbraco.Cms.Core.Logging; +using Umbraco.Cms.Infrastructure.DependencyInjection; +using Umbraco.Extensions; -namespace Umbraco.Core.Logging.Viewer +namespace Umbraco.Cms.Core.Logging.Viewer { // ReSharper disable once UnusedMember.Global public class LogViewerComposer : ICoreComposer diff --git a/src/Umbraco.Infrastructure/Logging/Viewer/LogViewerConfig.cs b/src/Umbraco.Infrastructure/Logging/Viewer/LogViewerConfig.cs index e13558b59f..13b295f4bc 100644 --- a/src/Umbraco.Infrastructure/Logging/Viewer/LogViewerConfig.cs +++ b/src/Umbraco.Infrastructure/Logging/Viewer/LogViewerConfig.cs @@ -2,16 +2,16 @@ using System.IO; using System.Linq; using Newtonsoft.Json; -using Umbraco.Core.Hosting; -using Umbraco.Core.Routing; +using Umbraco.Cms.Core.Hosting; +using Umbraco.Cms.Core.Routing; using Formatting = Newtonsoft.Json.Formatting; -namespace Umbraco.Core.Logging.Viewer +namespace Umbraco.Cms.Core.Logging.Viewer { public class LogViewerConfig : ILogViewerConfig { private readonly IHostingEnvironment _hostingEnvironment; - private static readonly string _pathToSearches = WebPath.Combine(Constants.SystemDirectories.Config, "logviewer.searches.config.js"); + private static readonly string _pathToSearches = WebPath.Combine(Cms.Core.Constants.SystemDirectories.Config, "logviewer.searches.config.js"); private readonly FileInfo _searchesConfig; public LogViewerConfig(IHostingEnvironment hostingEnvironment) diff --git a/src/Umbraco.Infrastructure/Logging/Viewer/MessageTemplateFilter.cs b/src/Umbraco.Infrastructure/Logging/Viewer/MessageTemplateFilter.cs index 4a724d9147..1b89716256 100644 --- a/src/Umbraco.Infrastructure/Logging/Viewer/MessageTemplateFilter.cs +++ b/src/Umbraco.Infrastructure/Logging/Viewer/MessageTemplateFilter.cs @@ -1,7 +1,7 @@ using System.Collections.Generic; using Serilog.Events; -namespace Umbraco.Core.Logging.Viewer +namespace Umbraco.Cms.Core.Logging.Viewer { internal class MessageTemplateFilter : ILogFilter { diff --git a/src/Umbraco.Infrastructure/Logging/Viewer/SavedLogSearch.cs b/src/Umbraco.Infrastructure/Logging/Viewer/SavedLogSearch.cs index ef2181e3bf..b01dad251d 100644 --- a/src/Umbraco.Infrastructure/Logging/Viewer/SavedLogSearch.cs +++ b/src/Umbraco.Infrastructure/Logging/Viewer/SavedLogSearch.cs @@ -1,6 +1,6 @@ using Newtonsoft.Json; -namespace Umbraco.Core.Logging.Viewer +namespace Umbraco.Cms.Core.Logging.Viewer { public class SavedLogSearch { diff --git a/src/Umbraco.Infrastructure/Logging/Viewer/SerilogJsonLogViewer.cs b/src/Umbraco.Infrastructure/Logging/Viewer/SerilogJsonLogViewer.cs index 8e74dbe194..7599ab0a16 100644 --- a/src/Umbraco.Infrastructure/Logging/Viewer/SerilogJsonLogViewer.cs +++ b/src/Umbraco.Infrastructure/Logging/Viewer/SerilogJsonLogViewer.cs @@ -6,8 +6,9 @@ using Microsoft.Extensions.Logging; using Newtonsoft.Json; using Serilog.Events; using Serilog.Formatting.Compact.Reader; +using Umbraco.Cms.Core.Logging; -namespace Umbraco.Core.Logging.Viewer +namespace Umbraco.Cms.Core.Logging.Viewer { internal class SerilogJsonLogViewer : SerilogLogViewerSourceBase { diff --git a/src/Umbraco.Infrastructure/Logging/Viewer/SerilogLogViewerSourceBase.cs b/src/Umbraco.Infrastructure/Logging/Viewer/SerilogLogViewerSourceBase.cs index 278f3d8d00..ce897de0cd 100644 --- a/src/Umbraco.Infrastructure/Logging/Viewer/SerilogLogViewerSourceBase.cs +++ b/src/Umbraco.Infrastructure/Logging/Viewer/SerilogLogViewerSourceBase.cs @@ -1,13 +1,12 @@ using System; using System.Collections.Generic; using System.Linq; -using Serilog; using Serilog.Events; -using Umbraco.Core.Models; +using Umbraco.Cms.Core.Models; +using Umbraco.Extensions; -namespace Umbraco.Core.Logging.Viewer +namespace Umbraco.Cms.Core.Logging.Viewer { - public abstract class SerilogLogViewerSourceBase : ILogViewer { private readonly ILogViewerConfig _logViewerConfig; diff --git a/src/Umbraco.Infrastructure/Macros/MacroTagParser.cs b/src/Umbraco.Infrastructure/Macros/MacroTagParser.cs index 2cbd84e20a..13b0333984 100644 --- a/src/Umbraco.Infrastructure/Macros/MacroTagParser.cs +++ b/src/Umbraco.Infrastructure/Macros/MacroTagParser.cs @@ -3,9 +3,9 @@ using System.Collections.Generic; using System.Text; using System.Text.RegularExpressions; using HtmlAgilityPack; -using Umbraco.Core.Xml; +using Umbraco.Cms.Core.Xml; -namespace Umbraco.Web.Macros +namespace Umbraco.Cms.Infrastructure.Macros { /// /// Parses the macro syntax in a string and renders out it's contents diff --git a/src/Umbraco.Infrastructure/Manifest/DashboardAccessRuleConverter.cs b/src/Umbraco.Infrastructure/Manifest/DashboardAccessRuleConverter.cs index 67c5a5824e..80f944950c 100644 --- a/src/Umbraco.Infrastructure/Manifest/DashboardAccessRuleConverter.cs +++ b/src/Umbraco.Infrastructure/Manifest/DashboardAccessRuleConverter.cs @@ -1,10 +1,10 @@ using System; using Newtonsoft.Json; using Newtonsoft.Json.Linq; -using Umbraco.Core.Dashboards; -using Umbraco.Core.Serialization; +using Umbraco.Cms.Core.Dashboards; +using Umbraco.Cms.Infrastructure.Serialization; -namespace Umbraco.Core.Manifest +namespace Umbraco.Cms.Core.Manifest { /// /// Implements a json read converter for . diff --git a/src/Umbraco.Infrastructure/Manifest/DataEditorConverter.cs b/src/Umbraco.Infrastructure/Manifest/DataEditorConverter.cs index 1bbd9042b0..7010dac185 100644 --- a/src/Umbraco.Infrastructure/Manifest/DataEditorConverter.cs +++ b/src/Umbraco.Infrastructure/Manifest/DataEditorConverter.cs @@ -2,13 +2,15 @@ using Microsoft.Extensions.Logging; using Newtonsoft.Json; using Newtonsoft.Json.Linq; -using Umbraco.Core.IO; -using Umbraco.Core.PropertyEditors; -using Umbraco.Core.Serialization; -using Umbraco.Core.Services; -using Umbraco.Core.Strings; +using Umbraco.Cms.Core.IO; +using Umbraco.Cms.Core.PropertyEditors; +using Umbraco.Cms.Core.Serialization; +using Umbraco.Cms.Core.Services; +using Umbraco.Cms.Core.Strings; +using Umbraco.Cms.Infrastructure.Serialization; +using Umbraco.Extensions; -namespace Umbraco.Core.Manifest +namespace Umbraco.Cms.Core.Manifest { /// /// Provides a json read converter for in manifests. diff --git a/src/Umbraco.Infrastructure/Manifest/ManifestParser.cs b/src/Umbraco.Infrastructure/Manifest/ManifestParser.cs index d134010104..5c37e0b2d9 100644 --- a/src/Umbraco.Infrastructure/Manifest/ManifestParser.cs +++ b/src/Umbraco.Infrastructure/Manifest/ManifestParser.cs @@ -5,15 +5,16 @@ using System.Linq; using System.Text; using Microsoft.Extensions.Logging; using Newtonsoft.Json; -using Umbraco.Core.Cache; -using Umbraco.Core.Hosting; -using Umbraco.Core.IO; -using Umbraco.Core.PropertyEditors; -using Umbraco.Core.Serialization; -using Umbraco.Core.Services; -using Umbraco.Core.Strings; +using Umbraco.Cms.Core.Cache; +using Umbraco.Cms.Core.Hosting; +using Umbraco.Cms.Core.IO; +using Umbraco.Cms.Core.PropertyEditors; +using Umbraco.Cms.Core.Serialization; +using Umbraco.Cms.Core.Services; +using Umbraco.Cms.Core.Strings; +using Umbraco.Extensions; -namespace Umbraco.Core.Manifest +namespace Umbraco.Cms.Core.Manifest { /// /// Parses the Main.js file and replaces all tokens accordingly. diff --git a/src/Umbraco.Infrastructure/Manifest/ValueValidatorConverter.cs b/src/Umbraco.Infrastructure/Manifest/ValueValidatorConverter.cs index 743ad23192..01fc43738d 100644 --- a/src/Umbraco.Infrastructure/Manifest/ValueValidatorConverter.cs +++ b/src/Umbraco.Infrastructure/Manifest/ValueValidatorConverter.cs @@ -1,9 +1,9 @@ using System; using Newtonsoft.Json.Linq; -using Umbraco.Core.PropertyEditors; -using Umbraco.Core.Serialization; +using Umbraco.Cms.Core.PropertyEditors; +using Umbraco.Cms.Infrastructure.Serialization; -namespace Umbraco.Core.Manifest +namespace Umbraco.Cms.Core.Manifest { /// /// Implements a json read converter for . diff --git a/src/Umbraco.Infrastructure/Media/ImageDimensionExtractor.cs b/src/Umbraco.Infrastructure/Media/ImageDimensionExtractor.cs index ad5155e6d2..091d3c395b 100644 --- a/src/Umbraco.Infrastructure/Media/ImageDimensionExtractor.cs +++ b/src/Umbraco.Infrastructure/Media/ImageDimensionExtractor.cs @@ -1,10 +1,10 @@ using System; using System.Drawing; using System.IO; -using Umbraco.Core; -using Umbraco.Core.Media; +using Umbraco.Cms.Core.Media; +using Constants = Umbraco.Cms.Core.Constants; -namespace Umbraco.Web.Media +namespace Umbraco.Cms.Infrastructure.Media { internal class ImageDimensionExtractor : IImageDimensionExtractor { diff --git a/src/Umbraco.Infrastructure/Media/ImageSharpImageUrlGenerator.cs b/src/Umbraco.Infrastructure/Media/ImageSharpImageUrlGenerator.cs index cfe542badc..e1bf2c197b 100644 --- a/src/Umbraco.Infrastructure/Media/ImageSharpImageUrlGenerator.cs +++ b/src/Umbraco.Infrastructure/Media/ImageSharpImageUrlGenerator.cs @@ -1,12 +1,11 @@ using System.Collections.Generic; using System.Globalization; using System.Text; -using Umbraco.Core; -using Umbraco.Core.Media; -using Umbraco.Core.Models; -using Umbraco.Web.Models; +using Umbraco.Cms.Core.Media; +using Umbraco.Cms.Core.Models; +using Umbraco.Extensions; -namespace Umbraco.Infrastructure.Media +namespace Umbraco.Cms.Infrastructure.Media { public class ImageSharpImageUrlGenerator : IImageUrlGenerator { diff --git a/src/Umbraco.Infrastructure/Migrations/Expressions/Alter/AlterBuilder.cs b/src/Umbraco.Infrastructure/Migrations/Expressions/Alter/AlterBuilder.cs index 91144774bf..fec6b5d0c1 100644 --- a/src/Umbraco.Infrastructure/Migrations/Expressions/Alter/AlterBuilder.cs +++ b/src/Umbraco.Infrastructure/Migrations/Expressions/Alter/AlterBuilder.cs @@ -1,8 +1,7 @@ -using NPoco; -using Umbraco.Core.Migrations.Expressions.Alter.Expressions; -using Umbraco.Core.Migrations.Expressions.Alter.Table; +using Umbraco.Cms.Infrastructure.Migrations.Expressions.Alter.Expressions; +using Umbraco.Cms.Infrastructure.Migrations.Expressions.Alter.Table; -namespace Umbraco.Core.Migrations.Expressions.Alter +namespace Umbraco.Cms.Infrastructure.Migrations.Expressions.Alter { /// /// Implements . diff --git a/src/Umbraco.Infrastructure/Migrations/Expressions/Alter/Expressions/AlterColumnExpression.cs b/src/Umbraco.Infrastructure/Migrations/Expressions/Alter/Expressions/AlterColumnExpression.cs index 1b00b03ca2..1caf4fa2c2 100644 --- a/src/Umbraco.Infrastructure/Migrations/Expressions/Alter/Expressions/AlterColumnExpression.cs +++ b/src/Umbraco.Infrastructure/Migrations/Expressions/Alter/Expressions/AlterColumnExpression.cs @@ -1,7 +1,6 @@ -using NPoco; -using Umbraco.Core.Persistence.DatabaseModelDefinitions; +using Umbraco.Cms.Infrastructure.Persistence.DatabaseModelDefinitions; -namespace Umbraco.Core.Migrations.Expressions.Alter.Expressions +namespace Umbraco.Cms.Infrastructure.Migrations.Expressions.Alter.Expressions { public class AlterColumnExpression : MigrationExpressionBase { diff --git a/src/Umbraco.Infrastructure/Migrations/Expressions/Alter/Expressions/AlterDefaultConstraintExpression.cs b/src/Umbraco.Infrastructure/Migrations/Expressions/Alter/Expressions/AlterDefaultConstraintExpression.cs index c69b9390cf..fbe43e95aa 100644 --- a/src/Umbraco.Infrastructure/Migrations/Expressions/Alter/Expressions/AlterDefaultConstraintExpression.cs +++ b/src/Umbraco.Infrastructure/Migrations/Expressions/Alter/Expressions/AlterDefaultConstraintExpression.cs @@ -1,6 +1,4 @@ -using NPoco; - -namespace Umbraco.Core.Migrations.Expressions.Alter.Expressions +namespace Umbraco.Cms.Infrastructure.Migrations.Expressions.Alter.Expressions { public class AlterDefaultConstraintExpression : MigrationExpressionBase { diff --git a/src/Umbraco.Infrastructure/Migrations/Expressions/Alter/Expressions/AlterTableExpression.cs b/src/Umbraco.Infrastructure/Migrations/Expressions/Alter/Expressions/AlterTableExpression.cs index 062ceaf8c7..9fa7f5f77f 100644 --- a/src/Umbraco.Infrastructure/Migrations/Expressions/Alter/Expressions/AlterTableExpression.cs +++ b/src/Umbraco.Infrastructure/Migrations/Expressions/Alter/Expressions/AlterTableExpression.cs @@ -1,6 +1,4 @@ -using NPoco; - -namespace Umbraco.Core.Migrations.Expressions.Alter.Expressions +namespace Umbraco.Cms.Infrastructure.Migrations.Expressions.Alter.Expressions { public class AlterTableExpression : MigrationExpressionBase { diff --git a/src/Umbraco.Infrastructure/Migrations/Expressions/Alter/IAlterBuilder.cs b/src/Umbraco.Infrastructure/Migrations/Expressions/Alter/IAlterBuilder.cs index 80a519d449..7f3bf080d4 100644 --- a/src/Umbraco.Infrastructure/Migrations/Expressions/Alter/IAlterBuilder.cs +++ b/src/Umbraco.Infrastructure/Migrations/Expressions/Alter/IAlterBuilder.cs @@ -1,6 +1,6 @@ -using Umbraco.Core.Migrations.Expressions.Alter.Table; +using Umbraco.Cms.Infrastructure.Migrations.Expressions.Alter.Table; -namespace Umbraco.Core.Migrations.Expressions.Alter +namespace Umbraco.Cms.Infrastructure.Migrations.Expressions.Alter { /// /// Builds an Alter expression. diff --git a/src/Umbraco.Infrastructure/Migrations/Expressions/Alter/Table/AlterTableBuilder.cs b/src/Umbraco.Infrastructure/Migrations/Expressions/Alter/Table/AlterTableBuilder.cs index d5abe67af7..9266257250 100644 --- a/src/Umbraco.Infrastructure/Migrations/Expressions/Alter/Table/AlterTableBuilder.cs +++ b/src/Umbraco.Infrastructure/Migrations/Expressions/Alter/Table/AlterTableBuilder.cs @@ -1,11 +1,11 @@ using System.Data; -using Umbraco.Core.Migrations.Expressions.Alter.Expressions; -using Umbraco.Core.Migrations.Expressions.Common.Expressions; -using Umbraco.Core.Migrations.Expressions.Create.Expressions; -using Umbraco.Core.Persistence.DatabaseAnnotations; -using Umbraco.Core.Persistence.DatabaseModelDefinitions; +using Umbraco.Cms.Infrastructure.Migrations.Expressions.Alter.Expressions; +using Umbraco.Cms.Infrastructure.Migrations.Expressions.Common.Expressions; +using Umbraco.Cms.Infrastructure.Migrations.Expressions.Create.Expressions; +using Umbraco.Cms.Infrastructure.Persistence.DatabaseAnnotations; +using Umbraco.Cms.Infrastructure.Persistence.DatabaseModelDefinitions; -namespace Umbraco.Core.Migrations.Expressions.Alter.Table +namespace Umbraco.Cms.Infrastructure.Migrations.Expressions.Alter.Table { public class AlterTableBuilder : ExpressionBuilderBase, IAlterTableColumnTypeBuilder, diff --git a/src/Umbraco.Infrastructure/Migrations/Expressions/Alter/Table/IAlterTableBuilder.cs b/src/Umbraco.Infrastructure/Migrations/Expressions/Alter/Table/IAlterTableBuilder.cs index 04537e48db..642e71757a 100644 --- a/src/Umbraco.Infrastructure/Migrations/Expressions/Alter/Table/IAlterTableBuilder.cs +++ b/src/Umbraco.Infrastructure/Migrations/Expressions/Alter/Table/IAlterTableBuilder.cs @@ -1,4 +1,4 @@ -namespace Umbraco.Core.Migrations.Expressions.Alter.Table +namespace Umbraco.Cms.Infrastructure.Migrations.Expressions.Alter.Table { /// /// Builds an Alter Table expression. diff --git a/src/Umbraco.Infrastructure/Migrations/Expressions/Alter/Table/IAlterTableColumnOptionBuilder.cs b/src/Umbraco.Infrastructure/Migrations/Expressions/Alter/Table/IAlterTableColumnOptionBuilder.cs index 0c323b0699..3ace421b7b 100644 --- a/src/Umbraco.Infrastructure/Migrations/Expressions/Alter/Table/IAlterTableColumnOptionBuilder.cs +++ b/src/Umbraco.Infrastructure/Migrations/Expressions/Alter/Table/IAlterTableColumnOptionBuilder.cs @@ -1,6 +1,6 @@ -using Umbraco.Core.Migrations.Expressions.Common; +using Umbraco.Cms.Infrastructure.Migrations.Expressions.Common; -namespace Umbraco.Core.Migrations.Expressions.Alter.Table +namespace Umbraco.Cms.Infrastructure.Migrations.Expressions.Alter.Table { public interface IAlterTableColumnOptionBuilder : IColumnOptionBuilder, IAlterTableBuilder, IExecutableBuilder diff --git a/src/Umbraco.Infrastructure/Migrations/Expressions/Alter/Table/IAlterTableColumnOptionForeignKeyCascadeBuilder.cs b/src/Umbraco.Infrastructure/Migrations/Expressions/Alter/Table/IAlterTableColumnOptionForeignKeyCascadeBuilder.cs index 8099deaa56..e42fcb266d 100644 --- a/src/Umbraco.Infrastructure/Migrations/Expressions/Alter/Table/IAlterTableColumnOptionForeignKeyCascadeBuilder.cs +++ b/src/Umbraco.Infrastructure/Migrations/Expressions/Alter/Table/IAlterTableColumnOptionForeignKeyCascadeBuilder.cs @@ -1,6 +1,6 @@ -using Umbraco.Core.Migrations.Expressions.Common; +using Umbraco.Cms.Infrastructure.Migrations.Expressions.Common; -namespace Umbraco.Core.Migrations.Expressions.Alter.Table +namespace Umbraco.Cms.Infrastructure.Migrations.Expressions.Alter.Table { public interface IAlterTableColumnOptionForeignKeyCascadeBuilder : IAlterTableColumnOptionBuilder, diff --git a/src/Umbraco.Infrastructure/Migrations/Expressions/Alter/Table/IAlterTableColumnTypeBuilder.cs b/src/Umbraco.Infrastructure/Migrations/Expressions/Alter/Table/IAlterTableColumnTypeBuilder.cs index 61fdec4ca0..4768b52e7f 100644 --- a/src/Umbraco.Infrastructure/Migrations/Expressions/Alter/Table/IAlterTableColumnTypeBuilder.cs +++ b/src/Umbraco.Infrastructure/Migrations/Expressions/Alter/Table/IAlterTableColumnTypeBuilder.cs @@ -1,6 +1,6 @@ -using Umbraco.Core.Migrations.Expressions.Common; +using Umbraco.Cms.Infrastructure.Migrations.Expressions.Common; -namespace Umbraco.Core.Migrations.Expressions.Alter.Table +namespace Umbraco.Cms.Infrastructure.Migrations.Expressions.Alter.Table { public interface IAlterTableColumnTypeBuilder : IColumnTypeBuilder { } diff --git a/src/Umbraco.Infrastructure/Migrations/Expressions/Common/ExecutableBuilder.cs b/src/Umbraco.Infrastructure/Migrations/Expressions/Common/ExecutableBuilder.cs index 6e93d7bcc1..5ec8c200e0 100644 --- a/src/Umbraco.Infrastructure/Migrations/Expressions/Common/ExecutableBuilder.cs +++ b/src/Umbraco.Infrastructure/Migrations/Expressions/Common/ExecutableBuilder.cs @@ -1,4 +1,4 @@ -namespace Umbraco.Core.Migrations.Expressions.Common +namespace Umbraco.Cms.Infrastructure.Migrations.Expressions.Common { public class ExecutableBuilder : IExecutableBuilder { diff --git a/src/Umbraco.Infrastructure/Migrations/Expressions/Common/Expressions/CreateColumnExpression.cs b/src/Umbraco.Infrastructure/Migrations/Expressions/Common/Expressions/CreateColumnExpression.cs index 91317167f8..d19e8346cb 100644 --- a/src/Umbraco.Infrastructure/Migrations/Expressions/Common/Expressions/CreateColumnExpression.cs +++ b/src/Umbraco.Infrastructure/Migrations/Expressions/Common/Expressions/CreateColumnExpression.cs @@ -1,7 +1,6 @@ -using NPoco; -using Umbraco.Core.Persistence.DatabaseModelDefinitions; +using Umbraco.Cms.Infrastructure.Persistence.DatabaseModelDefinitions; -namespace Umbraco.Core.Migrations.Expressions.Common.Expressions +namespace Umbraco.Cms.Infrastructure.Migrations.Expressions.Common.Expressions { public class CreateColumnExpression : MigrationExpressionBase { diff --git a/src/Umbraco.Infrastructure/Migrations/Expressions/Common/Expressions/CreateForeignKeyExpression.cs b/src/Umbraco.Infrastructure/Migrations/Expressions/Common/Expressions/CreateForeignKeyExpression.cs index 2f35338eb0..511f4ac634 100644 --- a/src/Umbraco.Infrastructure/Migrations/Expressions/Common/Expressions/CreateForeignKeyExpression.cs +++ b/src/Umbraco.Infrastructure/Migrations/Expressions/Common/Expressions/CreateForeignKeyExpression.cs @@ -1,7 +1,6 @@ -using NPoco; -using Umbraco.Core.Persistence.DatabaseModelDefinitions; +using Umbraco.Cms.Infrastructure.Persistence.DatabaseModelDefinitions; -namespace Umbraco.Core.Migrations.Expressions.Common.Expressions +namespace Umbraco.Cms.Infrastructure.Migrations.Expressions.Common.Expressions { public class CreateForeignKeyExpression : MigrationExpressionBase { diff --git a/src/Umbraco.Infrastructure/Migrations/Expressions/Common/Expressions/CreateIndexExpression.cs b/src/Umbraco.Infrastructure/Migrations/Expressions/Common/Expressions/CreateIndexExpression.cs index 3d07937fa7..cef5a8387a 100644 --- a/src/Umbraco.Infrastructure/Migrations/Expressions/Common/Expressions/CreateIndexExpression.cs +++ b/src/Umbraco.Infrastructure/Migrations/Expressions/Common/Expressions/CreateIndexExpression.cs @@ -1,7 +1,6 @@ -using NPoco; -using Umbraco.Core.Persistence.DatabaseModelDefinitions; +using Umbraco.Cms.Infrastructure.Persistence.DatabaseModelDefinitions; -namespace Umbraco.Core.Migrations.Expressions.Common.Expressions +namespace Umbraco.Cms.Infrastructure.Migrations.Expressions.Common.Expressions { public class CreateIndexExpression : MigrationExpressionBase { diff --git a/src/Umbraco.Infrastructure/Migrations/Expressions/Common/IColumnOptionBuilder.cs b/src/Umbraco.Infrastructure/Migrations/Expressions/Common/IColumnOptionBuilder.cs index 06e00211a0..10057c0f6f 100644 --- a/src/Umbraco.Infrastructure/Migrations/Expressions/Common/IColumnOptionBuilder.cs +++ b/src/Umbraco.Infrastructure/Migrations/Expressions/Common/IColumnOptionBuilder.cs @@ -1,6 +1,6 @@ -using Umbraco.Core.Persistence.DatabaseModelDefinitions; +using Umbraco.Cms.Infrastructure.Persistence.DatabaseModelDefinitions; -namespace Umbraco.Core.Migrations.Expressions.Common +namespace Umbraco.Cms.Infrastructure.Migrations.Expressions.Common { public interface IColumnOptionBuilder : IFluentBuilder where TNext : IFluentBuilder diff --git a/src/Umbraco.Infrastructure/Migrations/Expressions/Common/IColumnTypeBuilder.cs b/src/Umbraco.Infrastructure/Migrations/Expressions/Common/IColumnTypeBuilder.cs index 431b6c34c4..75d5512cee 100644 --- a/src/Umbraco.Infrastructure/Migrations/Expressions/Common/IColumnTypeBuilder.cs +++ b/src/Umbraco.Infrastructure/Migrations/Expressions/Common/IColumnTypeBuilder.cs @@ -1,4 +1,4 @@ -namespace Umbraco.Core.Migrations.Expressions.Common +namespace Umbraco.Cms.Infrastructure.Migrations.Expressions.Common { /// /// Builds a column type expression. diff --git a/src/Umbraco.Infrastructure/Migrations/Expressions/Common/IExecutableBuilder.cs b/src/Umbraco.Infrastructure/Migrations/Expressions/Common/IExecutableBuilder.cs index b56ff776cb..b5a29d801b 100644 --- a/src/Umbraco.Infrastructure/Migrations/Expressions/Common/IExecutableBuilder.cs +++ b/src/Umbraco.Infrastructure/Migrations/Expressions/Common/IExecutableBuilder.cs @@ -1,4 +1,4 @@ -namespace Umbraco.Core.Migrations.Expressions.Common +namespace Umbraco.Cms.Infrastructure.Migrations.Expressions.Common { public interface IExecutableBuilder { diff --git a/src/Umbraco.Infrastructure/Migrations/Expressions/Common/IForeignKeyCascadeBuilder.cs b/src/Umbraco.Infrastructure/Migrations/Expressions/Common/IForeignKeyCascadeBuilder.cs index 746dea64d4..f566e5c4bb 100644 --- a/src/Umbraco.Infrastructure/Migrations/Expressions/Common/IForeignKeyCascadeBuilder.cs +++ b/src/Umbraco.Infrastructure/Migrations/Expressions/Common/IForeignKeyCascadeBuilder.cs @@ -1,6 +1,6 @@ using System.Data; -namespace Umbraco.Core.Migrations.Expressions.Common +namespace Umbraco.Cms.Infrastructure.Migrations.Expressions.Common { public interface IForeignKeyCascadeBuilder : IFluentBuilder where TNext : IFluentBuilder diff --git a/src/Umbraco.Infrastructure/Migrations/Expressions/Create/Column/CreateColumnBuilder.cs b/src/Umbraco.Infrastructure/Migrations/Expressions/Create/Column/CreateColumnBuilder.cs index 656aedcea0..12f575e879 100644 --- a/src/Umbraco.Infrastructure/Migrations/Expressions/Create/Column/CreateColumnBuilder.cs +++ b/src/Umbraco.Infrastructure/Migrations/Expressions/Create/Column/CreateColumnBuilder.cs @@ -1,10 +1,9 @@ using System.Data; -using NPoco; -using Umbraco.Core.Migrations.Expressions.Common.Expressions; -using Umbraco.Core.Persistence.DatabaseAnnotations; -using Umbraco.Core.Persistence.DatabaseModelDefinitions; +using Umbraco.Cms.Infrastructure.Migrations.Expressions.Common.Expressions; +using Umbraco.Cms.Infrastructure.Persistence.DatabaseAnnotations; +using Umbraco.Cms.Infrastructure.Persistence.DatabaseModelDefinitions; -namespace Umbraco.Core.Migrations.Expressions.Create.Column +namespace Umbraco.Cms.Infrastructure.Migrations.Expressions.Create.Column { public class CreateColumnBuilder : ExpressionBuilderBase, ICreateColumnOnTableBuilder, @@ -113,7 +112,7 @@ namespace Umbraco.Core.Migrations.Expressions.Create.Column var index = new CreateIndexExpression(_context, new IndexDefinition { Name = indexName, - TableName = Expression.TableName, + TableName = Expression.TableName, IndexType = IndexTypes.UniqueNonClustered }); diff --git a/src/Umbraco.Infrastructure/Migrations/Expressions/Create/Column/ICreateColumnOnTableBuilder.cs b/src/Umbraco.Infrastructure/Migrations/Expressions/Create/Column/ICreateColumnOnTableBuilder.cs index fbd7387cda..982b495ac8 100644 --- a/src/Umbraco.Infrastructure/Migrations/Expressions/Create/Column/ICreateColumnOnTableBuilder.cs +++ b/src/Umbraco.Infrastructure/Migrations/Expressions/Create/Column/ICreateColumnOnTableBuilder.cs @@ -1,6 +1,6 @@ -using Umbraco.Core.Migrations.Expressions.Common; +using Umbraco.Cms.Infrastructure.Migrations.Expressions.Common; -namespace Umbraco.Core.Migrations.Expressions.Create.Column +namespace Umbraco.Cms.Infrastructure.Migrations.Expressions.Create.Column { public interface ICreateColumnOnTableBuilder : IColumnTypeBuilder { diff --git a/src/Umbraco.Infrastructure/Migrations/Expressions/Create/Column/ICreateColumnOptionBuilder.cs b/src/Umbraco.Infrastructure/Migrations/Expressions/Create/Column/ICreateColumnOptionBuilder.cs index eccaf26d89..9a4c2c647e 100644 --- a/src/Umbraco.Infrastructure/Migrations/Expressions/Create/Column/ICreateColumnOptionBuilder.cs +++ b/src/Umbraco.Infrastructure/Migrations/Expressions/Create/Column/ICreateColumnOptionBuilder.cs @@ -1,6 +1,6 @@ -using Umbraco.Core.Migrations.Expressions.Common; +using Umbraco.Cms.Infrastructure.Migrations.Expressions.Common; -namespace Umbraco.Core.Migrations.Expressions.Create.Column +namespace Umbraco.Cms.Infrastructure.Migrations.Expressions.Create.Column { public interface ICreateColumnOptionBuilder : IColumnOptionBuilder , IExecutableBuilder diff --git a/src/Umbraco.Infrastructure/Migrations/Expressions/Create/Column/ICreateColumnOptionForeignKeyCascadeBuilder.cs b/src/Umbraco.Infrastructure/Migrations/Expressions/Create/Column/ICreateColumnOptionForeignKeyCascadeBuilder.cs index 59e714e73c..25e0d792c4 100644 --- a/src/Umbraco.Infrastructure/Migrations/Expressions/Create/Column/ICreateColumnOptionForeignKeyCascadeBuilder.cs +++ b/src/Umbraco.Infrastructure/Migrations/Expressions/Create/Column/ICreateColumnOptionForeignKeyCascadeBuilder.cs @@ -1,6 +1,6 @@ -using Umbraco.Core.Migrations.Expressions.Common; +using Umbraco.Cms.Infrastructure.Migrations.Expressions.Common; -namespace Umbraco.Core.Migrations.Expressions.Create.Column +namespace Umbraco.Cms.Infrastructure.Migrations.Expressions.Create.Column { public interface ICreateColumnOptionForeignKeyCascadeBuilder : ICreateColumnOptionBuilder, IForeignKeyCascadeBuilder diff --git a/src/Umbraco.Infrastructure/Migrations/Expressions/Create/Column/ICreateColumnTypeBuilder.cs b/src/Umbraco.Infrastructure/Migrations/Expressions/Create/Column/ICreateColumnTypeBuilder.cs index f9c077e838..f1177efad3 100644 --- a/src/Umbraco.Infrastructure/Migrations/Expressions/Create/Column/ICreateColumnTypeBuilder.cs +++ b/src/Umbraco.Infrastructure/Migrations/Expressions/Create/Column/ICreateColumnTypeBuilder.cs @@ -1,6 +1,6 @@ -using Umbraco.Core.Migrations.Expressions.Common; +using Umbraco.Cms.Infrastructure.Migrations.Expressions.Common; -namespace Umbraco.Core.Migrations.Expressions.Create.Column +namespace Umbraco.Cms.Infrastructure.Migrations.Expressions.Create.Column { public interface ICreateColumnTypeBuilder : IColumnTypeBuilder { } diff --git a/src/Umbraco.Infrastructure/Migrations/Expressions/Create/Constraint/CreateConstraintBuilder.cs b/src/Umbraco.Infrastructure/Migrations/Expressions/Create/Constraint/CreateConstraintBuilder.cs index 48690f4aa6..f61d99f237 100644 --- a/src/Umbraco.Infrastructure/Migrations/Expressions/Create/Constraint/CreateConstraintBuilder.cs +++ b/src/Umbraco.Infrastructure/Migrations/Expressions/Create/Constraint/CreateConstraintBuilder.cs @@ -1,7 +1,7 @@ -using Umbraco.Core.Migrations.Expressions.Common; -using Umbraco.Core.Migrations.Expressions.Create.Expressions; +using Umbraco.Cms.Infrastructure.Migrations.Expressions.Common; +using Umbraco.Cms.Infrastructure.Migrations.Expressions.Create.Expressions; -namespace Umbraco.Core.Migrations.Expressions.Create.Constraint +namespace Umbraco.Cms.Infrastructure.Migrations.Expressions.Create.Constraint { public class CreateConstraintBuilder : ExpressionBuilderBase, ICreateConstraintOnTableBuilder, diff --git a/src/Umbraco.Infrastructure/Migrations/Expressions/Create/Constraint/ICreateConstraintColumnsBuilder.cs b/src/Umbraco.Infrastructure/Migrations/Expressions/Create/Constraint/ICreateConstraintColumnsBuilder.cs index fc2d2116e1..cfc7568686 100644 --- a/src/Umbraco.Infrastructure/Migrations/Expressions/Create/Constraint/ICreateConstraintColumnsBuilder.cs +++ b/src/Umbraco.Infrastructure/Migrations/Expressions/Create/Constraint/ICreateConstraintColumnsBuilder.cs @@ -1,6 +1,6 @@ -using Umbraco.Core.Migrations.Expressions.Common; +using Umbraco.Cms.Infrastructure.Migrations.Expressions.Common; -namespace Umbraco.Core.Migrations.Expressions.Create.Constraint +namespace Umbraco.Cms.Infrastructure.Migrations.Expressions.Create.Constraint { public interface ICreateConstraintColumnsBuilder : IFluentBuilder { diff --git a/src/Umbraco.Infrastructure/Migrations/Expressions/Create/Constraint/ICreateConstraintOnTableBuilder.cs b/src/Umbraco.Infrastructure/Migrations/Expressions/Create/Constraint/ICreateConstraintOnTableBuilder.cs index d6a6c9b2a8..01d2da0cd1 100644 --- a/src/Umbraco.Infrastructure/Migrations/Expressions/Create/Constraint/ICreateConstraintOnTableBuilder.cs +++ b/src/Umbraco.Infrastructure/Migrations/Expressions/Create/Constraint/ICreateConstraintOnTableBuilder.cs @@ -1,4 +1,4 @@ -namespace Umbraco.Core.Migrations.Expressions.Create.Constraint +namespace Umbraco.Cms.Infrastructure.Migrations.Expressions.Create.Constraint { public interface ICreateConstraintOnTableBuilder : IFluentBuilder { diff --git a/src/Umbraco.Infrastructure/Migrations/Expressions/Create/CreateBuilder.cs b/src/Umbraco.Infrastructure/Migrations/Expressions/Create/CreateBuilder.cs index 8d4cb39a87..b672b1e5d4 100644 --- a/src/Umbraco.Infrastructure/Migrations/Expressions/Create/CreateBuilder.cs +++ b/src/Umbraco.Infrastructure/Migrations/Expressions/Create/CreateBuilder.cs @@ -1,17 +1,16 @@ using System; -using NPoco; -using Umbraco.Core.Migrations.Expressions.Common; -using Umbraco.Core.Migrations.Expressions.Common.Expressions; -using Umbraco.Core.Migrations.Expressions.Create.Column; -using Umbraco.Core.Migrations.Expressions.Create.Constraint; -using Umbraco.Core.Migrations.Expressions.Create.Expressions; -using Umbraco.Core.Migrations.Expressions.Create.ForeignKey; -using Umbraco.Core.Migrations.Expressions.Create.Index; -using Umbraco.Core.Migrations.Expressions.Create.KeysAndIndexes; -using Umbraco.Core.Migrations.Expressions.Create.Table; -using Umbraco.Core.Persistence.DatabaseModelDefinitions; +using Umbraco.Cms.Infrastructure.Migrations.Expressions.Common; +using Umbraco.Cms.Infrastructure.Migrations.Expressions.Common.Expressions; +using Umbraco.Cms.Infrastructure.Migrations.Expressions.Create.Column; +using Umbraco.Cms.Infrastructure.Migrations.Expressions.Create.Constraint; +using Umbraco.Cms.Infrastructure.Migrations.Expressions.Create.Expressions; +using Umbraco.Cms.Infrastructure.Migrations.Expressions.Create.ForeignKey; +using Umbraco.Cms.Infrastructure.Migrations.Expressions.Create.Index; +using Umbraco.Cms.Infrastructure.Migrations.Expressions.Create.KeysAndIndexes; +using Umbraco.Cms.Infrastructure.Migrations.Expressions.Create.Table; +using Umbraco.Cms.Infrastructure.Persistence.DatabaseModelDefinitions; -namespace Umbraco.Core.Migrations.Expressions.Create +namespace Umbraco.Cms.Infrastructure.Migrations.Expressions.Create { public class CreateBuilder : ICreateBuilder { diff --git a/src/Umbraco.Infrastructure/Migrations/Expressions/Create/Expressions/CreateConstraintExpression.cs b/src/Umbraco.Infrastructure/Migrations/Expressions/Create/Expressions/CreateConstraintExpression.cs index d55efbe0ee..7440d6c837 100644 --- a/src/Umbraco.Infrastructure/Migrations/Expressions/Create/Expressions/CreateConstraintExpression.cs +++ b/src/Umbraco.Infrastructure/Migrations/Expressions/Create/Expressions/CreateConstraintExpression.cs @@ -1,8 +1,7 @@ using System.Linq; -using NPoco; -using Umbraco.Core.Persistence.DatabaseModelDefinitions; +using Umbraco.Cms.Infrastructure.Persistence.DatabaseModelDefinitions; -namespace Umbraco.Core.Migrations.Expressions.Create.Expressions +namespace Umbraco.Cms.Infrastructure.Migrations.Expressions.Create.Expressions { public class CreateConstraintExpression : MigrationExpressionBase { diff --git a/src/Umbraco.Infrastructure/Migrations/Expressions/Create/Expressions/CreateTableExpression.cs b/src/Umbraco.Infrastructure/Migrations/Expressions/Create/Expressions/CreateTableExpression.cs index d194fcc01d..41d6e06d40 100644 --- a/src/Umbraco.Infrastructure/Migrations/Expressions/Create/Expressions/CreateTableExpression.cs +++ b/src/Umbraco.Infrastructure/Migrations/Expressions/Create/Expressions/CreateTableExpression.cs @@ -1,8 +1,7 @@ using System.Collections.Generic; -using NPoco; -using Umbraco.Core.Persistence.DatabaseModelDefinitions; +using Umbraco.Cms.Infrastructure.Persistence.DatabaseModelDefinitions; -namespace Umbraco.Core.Migrations.Expressions.Create.Expressions +namespace Umbraco.Cms.Infrastructure.Migrations.Expressions.Create.Expressions { public class CreateTableExpression : MigrationExpressionBase { diff --git a/src/Umbraco.Infrastructure/Migrations/Expressions/Create/ForeignKey/CreateForeignKeyBuilder.cs b/src/Umbraco.Infrastructure/Migrations/Expressions/Create/ForeignKey/CreateForeignKeyBuilder.cs index 3529e12187..4a30a815a2 100644 --- a/src/Umbraco.Infrastructure/Migrations/Expressions/Create/ForeignKey/CreateForeignKeyBuilder.cs +++ b/src/Umbraco.Infrastructure/Migrations/Expressions/Create/ForeignKey/CreateForeignKeyBuilder.cs @@ -1,8 +1,8 @@ using System.Data; -using Umbraco.Core.Migrations.Expressions.Common; -using Umbraco.Core.Migrations.Expressions.Common.Expressions; +using Umbraco.Cms.Infrastructure.Migrations.Expressions.Common; +using Umbraco.Cms.Infrastructure.Migrations.Expressions.Common.Expressions; -namespace Umbraco.Core.Migrations.Expressions.Create.ForeignKey +namespace Umbraco.Cms.Infrastructure.Migrations.Expressions.Create.ForeignKey { public class CreateForeignKeyBuilder : ExpressionBuilderBase, ICreateForeignKeyFromTableBuilder, diff --git a/src/Umbraco.Infrastructure/Migrations/Expressions/Create/ForeignKey/ICreateForeignKeyCascadeBuilder.cs b/src/Umbraco.Infrastructure/Migrations/Expressions/Create/ForeignKey/ICreateForeignKeyCascadeBuilder.cs index bb4d8fa248..3b45404b85 100644 --- a/src/Umbraco.Infrastructure/Migrations/Expressions/Create/ForeignKey/ICreateForeignKeyCascadeBuilder.cs +++ b/src/Umbraco.Infrastructure/Migrations/Expressions/Create/ForeignKey/ICreateForeignKeyCascadeBuilder.cs @@ -1,7 +1,7 @@ using System.Data; -using Umbraco.Core.Migrations.Expressions.Common; +using Umbraco.Cms.Infrastructure.Migrations.Expressions.Common; -namespace Umbraco.Core.Migrations.Expressions.Create.ForeignKey +namespace Umbraco.Cms.Infrastructure.Migrations.Expressions.Create.ForeignKey { public interface ICreateForeignKeyCascadeBuilder : IFluentBuilder, IExecutableBuilder { diff --git a/src/Umbraco.Infrastructure/Migrations/Expressions/Create/ForeignKey/ICreateForeignKeyForeignColumnBuilder.cs b/src/Umbraco.Infrastructure/Migrations/Expressions/Create/ForeignKey/ICreateForeignKeyForeignColumnBuilder.cs index 2abebc513e..8f37b40487 100644 --- a/src/Umbraco.Infrastructure/Migrations/Expressions/Create/ForeignKey/ICreateForeignKeyForeignColumnBuilder.cs +++ b/src/Umbraco.Infrastructure/Migrations/Expressions/Create/ForeignKey/ICreateForeignKeyForeignColumnBuilder.cs @@ -1,4 +1,4 @@ -namespace Umbraco.Core.Migrations.Expressions.Create.ForeignKey +namespace Umbraco.Cms.Infrastructure.Migrations.Expressions.Create.ForeignKey { public interface ICreateForeignKeyForeignColumnBuilder : IFluentBuilder { diff --git a/src/Umbraco.Infrastructure/Migrations/Expressions/Create/ForeignKey/ICreateForeignKeyFromTableBuilder.cs b/src/Umbraco.Infrastructure/Migrations/Expressions/Create/ForeignKey/ICreateForeignKeyFromTableBuilder.cs index bb6ea987b5..941647e27d 100644 --- a/src/Umbraco.Infrastructure/Migrations/Expressions/Create/ForeignKey/ICreateForeignKeyFromTableBuilder.cs +++ b/src/Umbraco.Infrastructure/Migrations/Expressions/Create/ForeignKey/ICreateForeignKeyFromTableBuilder.cs @@ -1,4 +1,4 @@ -namespace Umbraco.Core.Migrations.Expressions.Create.ForeignKey +namespace Umbraco.Cms.Infrastructure.Migrations.Expressions.Create.ForeignKey { public interface ICreateForeignKeyFromTableBuilder : IFluentBuilder { diff --git a/src/Umbraco.Infrastructure/Migrations/Expressions/Create/ForeignKey/ICreateForeignKeyPrimaryColumnBuilder.cs b/src/Umbraco.Infrastructure/Migrations/Expressions/Create/ForeignKey/ICreateForeignKeyPrimaryColumnBuilder.cs index 39ad38cd7d..95d1346d0f 100644 --- a/src/Umbraco.Infrastructure/Migrations/Expressions/Create/ForeignKey/ICreateForeignKeyPrimaryColumnBuilder.cs +++ b/src/Umbraco.Infrastructure/Migrations/Expressions/Create/ForeignKey/ICreateForeignKeyPrimaryColumnBuilder.cs @@ -1,4 +1,4 @@ -namespace Umbraco.Core.Migrations.Expressions.Create.ForeignKey +namespace Umbraco.Cms.Infrastructure.Migrations.Expressions.Create.ForeignKey { public interface ICreateForeignKeyPrimaryColumnBuilder : IFluentBuilder { diff --git a/src/Umbraco.Infrastructure/Migrations/Expressions/Create/ForeignKey/ICreateForeignKeyToTableBuilder.cs b/src/Umbraco.Infrastructure/Migrations/Expressions/Create/ForeignKey/ICreateForeignKeyToTableBuilder.cs index 0c415cd0ac..1ea49b1369 100644 --- a/src/Umbraco.Infrastructure/Migrations/Expressions/Create/ForeignKey/ICreateForeignKeyToTableBuilder.cs +++ b/src/Umbraco.Infrastructure/Migrations/Expressions/Create/ForeignKey/ICreateForeignKeyToTableBuilder.cs @@ -1,4 +1,4 @@ -namespace Umbraco.Core.Migrations.Expressions.Create.ForeignKey +namespace Umbraco.Cms.Infrastructure.Migrations.Expressions.Create.ForeignKey { public interface ICreateForeignKeyToTableBuilder : IFluentBuilder { diff --git a/src/Umbraco.Infrastructure/Migrations/Expressions/Create/ICreateBuilder.cs b/src/Umbraco.Infrastructure/Migrations/Expressions/Create/ICreateBuilder.cs index 2e4df55245..d01326eb0d 100644 --- a/src/Umbraco.Infrastructure/Migrations/Expressions/Create/ICreateBuilder.cs +++ b/src/Umbraco.Infrastructure/Migrations/Expressions/Create/ICreateBuilder.cs @@ -1,12 +1,12 @@ using System; -using Umbraco.Core.Migrations.Expressions.Common; -using Umbraco.Core.Migrations.Expressions.Create.Column; -using Umbraco.Core.Migrations.Expressions.Create.Constraint; -using Umbraco.Core.Migrations.Expressions.Create.ForeignKey; -using Umbraco.Core.Migrations.Expressions.Create.Index; -using Umbraco.Core.Migrations.Expressions.Create.Table; +using Umbraco.Cms.Infrastructure.Migrations.Expressions.Common; +using Umbraco.Cms.Infrastructure.Migrations.Expressions.Create.Column; +using Umbraco.Cms.Infrastructure.Migrations.Expressions.Create.Constraint; +using Umbraco.Cms.Infrastructure.Migrations.Expressions.Create.ForeignKey; +using Umbraco.Cms.Infrastructure.Migrations.Expressions.Create.Index; +using Umbraco.Cms.Infrastructure.Migrations.Expressions.Create.Table; -namespace Umbraco.Core.Migrations.Expressions.Create +namespace Umbraco.Cms.Infrastructure.Migrations.Expressions.Create { /// /// Builds a Create expression. diff --git a/src/Umbraco.Infrastructure/Migrations/Expressions/Create/Index/CreateIndexBuilder.cs b/src/Umbraco.Infrastructure/Migrations/Expressions/Create/Index/CreateIndexBuilder.cs index 1f2cb93f95..f74f7131f5 100644 --- a/src/Umbraco.Infrastructure/Migrations/Expressions/Create/Index/CreateIndexBuilder.cs +++ b/src/Umbraco.Infrastructure/Migrations/Expressions/Create/Index/CreateIndexBuilder.cs @@ -1,8 +1,9 @@ -using Umbraco.Core.Migrations.Expressions.Common.Expressions; -using Umbraco.Core.Persistence.DatabaseAnnotations; -using Umbraco.Core.Persistence.DatabaseModelDefinitions; +using Umbraco.Cms.Core; +using Umbraco.Cms.Infrastructure.Migrations.Expressions.Common.Expressions; +using Umbraco.Cms.Infrastructure.Persistence.DatabaseAnnotations; +using Umbraco.Cms.Infrastructure.Persistence.DatabaseModelDefinitions; -namespace Umbraco.Core.Migrations.Expressions.Create.Index +namespace Umbraco.Cms.Infrastructure.Migrations.Expressions.Create.Index { public class CreateIndexBuilder : ExpressionBuilderBase, ICreateIndexForTableBuilder, @@ -56,29 +57,29 @@ namespace Umbraco.Core.Migrations.Expressions.Create.Index /// ICreateIndexOnColumnBuilder ICreateIndexColumnOptionsBuilder.Unique() - { - Expression.Index.IndexType = IndexTypes.UniqueNonClustered; + { + Expression.Index.IndexType = IndexTypes.UniqueNonClustered; return this; } /// public ICreateIndexOnColumnBuilder NonClustered() { - Expression.Index.IndexType = IndexTypes.NonClustered; + Expression.Index.IndexType = IndexTypes.NonClustered; return this; } /// public ICreateIndexOnColumnBuilder Clustered() - { - Expression.Index.IndexType = IndexTypes.Clustered; + { + Expression.Index.IndexType = IndexTypes.Clustered; return this; } /// ICreateIndexOnColumnBuilder ICreateIndexOptionsBuilder.Unique() { - Expression.Index.IndexType = IndexTypes.UniqueNonClustered; + Expression.Index.IndexType = IndexTypes.UniqueNonClustered; return this; } } diff --git a/src/Umbraco.Infrastructure/Migrations/Expressions/Create/Index/ICreateIndexColumnOptionsBuilder.cs b/src/Umbraco.Infrastructure/Migrations/Expressions/Create/Index/ICreateIndexColumnOptionsBuilder.cs index fbf873236d..037e9e71f5 100644 --- a/src/Umbraco.Infrastructure/Migrations/Expressions/Create/Index/ICreateIndexColumnOptionsBuilder.cs +++ b/src/Umbraco.Infrastructure/Migrations/Expressions/Create/Index/ICreateIndexColumnOptionsBuilder.cs @@ -1,4 +1,4 @@ -namespace Umbraco.Core.Migrations.Expressions.Create.Index +namespace Umbraco.Cms.Infrastructure.Migrations.Expressions.Create.Index { public interface ICreateIndexColumnOptionsBuilder : IFluentBuilder { diff --git a/src/Umbraco.Infrastructure/Migrations/Expressions/Create/Index/ICreateIndexForTableBuilder.cs b/src/Umbraco.Infrastructure/Migrations/Expressions/Create/Index/ICreateIndexForTableBuilder.cs index f22cedab16..c74c5b546e 100644 --- a/src/Umbraco.Infrastructure/Migrations/Expressions/Create/Index/ICreateIndexForTableBuilder.cs +++ b/src/Umbraco.Infrastructure/Migrations/Expressions/Create/Index/ICreateIndexForTableBuilder.cs @@ -1,4 +1,4 @@ -namespace Umbraco.Core.Migrations.Expressions.Create.Index +namespace Umbraco.Cms.Infrastructure.Migrations.Expressions.Create.Index { public interface ICreateIndexForTableBuilder : IFluentBuilder { diff --git a/src/Umbraco.Infrastructure/Migrations/Expressions/Create/Index/ICreateIndexOnColumnBuilder.cs b/src/Umbraco.Infrastructure/Migrations/Expressions/Create/Index/ICreateIndexOnColumnBuilder.cs index b904632cc5..4981186fa3 100644 --- a/src/Umbraco.Infrastructure/Migrations/Expressions/Create/Index/ICreateIndexOnColumnBuilder.cs +++ b/src/Umbraco.Infrastructure/Migrations/Expressions/Create/Index/ICreateIndexOnColumnBuilder.cs @@ -1,6 +1,6 @@ -using Umbraco.Core.Migrations.Expressions.Common; +using Umbraco.Cms.Infrastructure.Migrations.Expressions.Common; -namespace Umbraco.Core.Migrations.Expressions.Create.Index +namespace Umbraco.Cms.Infrastructure.Migrations.Expressions.Create.Index { public interface ICreateIndexOnColumnBuilder : IFluentBuilder, IExecutableBuilder { diff --git a/src/Umbraco.Infrastructure/Migrations/Expressions/Create/Index/ICreateIndexOptionsBuilder.cs b/src/Umbraco.Infrastructure/Migrations/Expressions/Create/Index/ICreateIndexOptionsBuilder.cs index d3b9c51cd7..fc2e4f2a53 100644 --- a/src/Umbraco.Infrastructure/Migrations/Expressions/Create/Index/ICreateIndexOptionsBuilder.cs +++ b/src/Umbraco.Infrastructure/Migrations/Expressions/Create/Index/ICreateIndexOptionsBuilder.cs @@ -1,4 +1,4 @@ -namespace Umbraco.Core.Migrations.Expressions.Create.Index +namespace Umbraco.Cms.Infrastructure.Migrations.Expressions.Create.Index { public interface ICreateIndexOptionsBuilder : IFluentBuilder { diff --git a/src/Umbraco.Infrastructure/Migrations/Expressions/Create/KeysAndIndexes/CreateKeysAndIndexesBuilder.cs b/src/Umbraco.Infrastructure/Migrations/Expressions/Create/KeysAndIndexes/CreateKeysAndIndexesBuilder.cs index 6bf450a9b8..f52331c730 100644 --- a/src/Umbraco.Infrastructure/Migrations/Expressions/Create/KeysAndIndexes/CreateKeysAndIndexesBuilder.cs +++ b/src/Umbraco.Infrastructure/Migrations/Expressions/Create/KeysAndIndexes/CreateKeysAndIndexesBuilder.cs @@ -1,10 +1,10 @@ using System; using NPoco; -using Umbraco.Core.Migrations.Expressions.Common; -using Umbraco.Core.Migrations.Expressions.Execute.Expressions; -using Umbraco.Core.Persistence.DatabaseModelDefinitions; +using Umbraco.Cms.Infrastructure.Migrations.Expressions.Common; +using Umbraco.Cms.Infrastructure.Migrations.Expressions.Execute.Expressions; +using Umbraco.Cms.Infrastructure.Persistence.DatabaseModelDefinitions; -namespace Umbraco.Core.Migrations.Expressions.Create.KeysAndIndexes +namespace Umbraco.Cms.Infrastructure.Migrations.Expressions.Create.KeysAndIndexes { public class CreateKeysAndIndexesBuilder : IExecutableBuilder { diff --git a/src/Umbraco.Infrastructure/Migrations/Expressions/Create/Table/CreateTableBuilder.cs b/src/Umbraco.Infrastructure/Migrations/Expressions/Create/Table/CreateTableBuilder.cs index a87abb2c84..41892ef7f4 100644 --- a/src/Umbraco.Infrastructure/Migrations/Expressions/Create/Table/CreateTableBuilder.cs +++ b/src/Umbraco.Infrastructure/Migrations/Expressions/Create/Table/CreateTableBuilder.cs @@ -1,12 +1,10 @@ using System.Data; -using NPoco; -using Umbraco.Core.Migrations.Expressions.Common.Expressions; -using Umbraco.Core.Migrations.Expressions.Create.Expressions; -using Umbraco.Core.Persistence; -using Umbraco.Core.Persistence.DatabaseAnnotations; -using Umbraco.Core.Persistence.DatabaseModelDefinitions; +using Umbraco.Cms.Infrastructure.Migrations.Expressions.Common.Expressions; +using Umbraco.Cms.Infrastructure.Migrations.Expressions.Create.Expressions; +using Umbraco.Cms.Infrastructure.Persistence.DatabaseAnnotations; +using Umbraco.Cms.Infrastructure.Persistence.DatabaseModelDefinitions; -namespace Umbraco.Core.Migrations.Expressions.Create.Table +namespace Umbraco.Cms.Infrastructure.Migrations.Expressions.Create.Table { public class CreateTableBuilder : ExpressionBuilderBase, ICreateTableColumnAsTypeBuilder, diff --git a/src/Umbraco.Infrastructure/Migrations/Expressions/Create/Table/CreateTableOfDtoBuilder.cs b/src/Umbraco.Infrastructure/Migrations/Expressions/Create/Table/CreateTableOfDtoBuilder.cs index 4b73e9435d..5f699d66d5 100644 --- a/src/Umbraco.Infrastructure/Migrations/Expressions/Create/Table/CreateTableOfDtoBuilder.cs +++ b/src/Umbraco.Infrastructure/Migrations/Expressions/Create/Table/CreateTableOfDtoBuilder.cs @@ -1,10 +1,10 @@ using System; using NPoco; -using Umbraco.Core.Migrations.Expressions.Common; -using Umbraco.Core.Migrations.Expressions.Execute.Expressions; -using Umbraco.Core.Persistence.DatabaseModelDefinitions; +using Umbraco.Cms.Infrastructure.Migrations.Expressions.Common; +using Umbraco.Cms.Infrastructure.Migrations.Expressions.Execute.Expressions; +using Umbraco.Cms.Infrastructure.Persistence.DatabaseModelDefinitions; -namespace Umbraco.Core.Migrations.Expressions.Create.Table +namespace Umbraco.Cms.Infrastructure.Migrations.Expressions.Create.Table { public class CreateTableOfDtoBuilder : IExecutableBuilder { diff --git a/src/Umbraco.Infrastructure/Migrations/Expressions/Create/Table/ICreateTableColumnAsTypeBuilder.cs b/src/Umbraco.Infrastructure/Migrations/Expressions/Create/Table/ICreateTableColumnAsTypeBuilder.cs index 31511ddbb9..dfbeacde35 100644 --- a/src/Umbraco.Infrastructure/Migrations/Expressions/Create/Table/ICreateTableColumnAsTypeBuilder.cs +++ b/src/Umbraco.Infrastructure/Migrations/Expressions/Create/Table/ICreateTableColumnAsTypeBuilder.cs @@ -1,6 +1,6 @@ -using Umbraco.Core.Migrations.Expressions.Common; +using Umbraco.Cms.Infrastructure.Migrations.Expressions.Common; -namespace Umbraco.Core.Migrations.Expressions.Create.Table +namespace Umbraco.Cms.Infrastructure.Migrations.Expressions.Create.Table { public interface ICreateTableColumnAsTypeBuilder : IColumnTypeBuilder { } diff --git a/src/Umbraco.Infrastructure/Migrations/Expressions/Create/Table/ICreateTableColumnOptionBuilder.cs b/src/Umbraco.Infrastructure/Migrations/Expressions/Create/Table/ICreateTableColumnOptionBuilder.cs index 542c08c978..9c3d877277 100644 --- a/src/Umbraco.Infrastructure/Migrations/Expressions/Create/Table/ICreateTableColumnOptionBuilder.cs +++ b/src/Umbraco.Infrastructure/Migrations/Expressions/Create/Table/ICreateTableColumnOptionBuilder.cs @@ -1,6 +1,6 @@ -using Umbraco.Core.Migrations.Expressions.Common; +using Umbraco.Cms.Infrastructure.Migrations.Expressions.Common; -namespace Umbraco.Core.Migrations.Expressions.Create.Table +namespace Umbraco.Cms.Infrastructure.Migrations.Expressions.Create.Table { public interface ICreateTableColumnOptionBuilder : IColumnOptionBuilder, diff --git a/src/Umbraco.Infrastructure/Migrations/Expressions/Create/Table/ICreateTableColumnOptionForeignKeyCascadeBuilder.cs b/src/Umbraco.Infrastructure/Migrations/Expressions/Create/Table/ICreateTableColumnOptionForeignKeyCascadeBuilder.cs index e2b7a18b68..14d9369cfc 100644 --- a/src/Umbraco.Infrastructure/Migrations/Expressions/Create/Table/ICreateTableColumnOptionForeignKeyCascadeBuilder.cs +++ b/src/Umbraco.Infrastructure/Migrations/Expressions/Create/Table/ICreateTableColumnOptionForeignKeyCascadeBuilder.cs @@ -1,6 +1,6 @@ -using Umbraco.Core.Migrations.Expressions.Common; +using Umbraco.Cms.Infrastructure.Migrations.Expressions.Common; -namespace Umbraco.Core.Migrations.Expressions.Create.Table +namespace Umbraco.Cms.Infrastructure.Migrations.Expressions.Create.Table { public interface ICreateTableColumnOptionForeignKeyCascadeBuilder : ICreateTableColumnOptionBuilder, diff --git a/src/Umbraco.Infrastructure/Migrations/Expressions/Create/Table/ICreateTableWithColumnBuilder.cs b/src/Umbraco.Infrastructure/Migrations/Expressions/Create/Table/ICreateTableWithColumnBuilder.cs index 0292028f2a..d913406387 100644 --- a/src/Umbraco.Infrastructure/Migrations/Expressions/Create/Table/ICreateTableWithColumnBuilder.cs +++ b/src/Umbraco.Infrastructure/Migrations/Expressions/Create/Table/ICreateTableWithColumnBuilder.cs @@ -1,6 +1,6 @@ -using Umbraco.Core.Migrations.Expressions.Common; +using Umbraco.Cms.Infrastructure.Migrations.Expressions.Common; -namespace Umbraco.Core.Migrations.Expressions.Create.Table +namespace Umbraco.Cms.Infrastructure.Migrations.Expressions.Create.Table { public interface ICreateTableWithColumnBuilder : IFluentBuilder, IExecutableBuilder { diff --git a/src/Umbraco.Infrastructure/Migrations/Expressions/Delete/Column/DeleteColumnBuilder.cs b/src/Umbraco.Infrastructure/Migrations/Expressions/Delete/Column/DeleteColumnBuilder.cs index 696cda1506..50101f46a1 100644 --- a/src/Umbraco.Infrastructure/Migrations/Expressions/Delete/Column/DeleteColumnBuilder.cs +++ b/src/Umbraco.Infrastructure/Migrations/Expressions/Delete/Column/DeleteColumnBuilder.cs @@ -1,7 +1,7 @@ -using Umbraco.Core.Migrations.Expressions.Common; -using Umbraco.Core.Migrations.Expressions.Delete.Expressions; +using Umbraco.Cms.Infrastructure.Migrations.Expressions.Common; +using Umbraco.Cms.Infrastructure.Migrations.Expressions.Delete.Expressions; -namespace Umbraco.Core.Migrations.Expressions.Delete.Column +namespace Umbraco.Cms.Infrastructure.Migrations.Expressions.Delete.Column { public class DeleteColumnBuilder : ExpressionBuilderBase, IDeleteColumnBuilder diff --git a/src/Umbraco.Infrastructure/Migrations/Expressions/Delete/Column/IDeleteColumnBuilder.cs b/src/Umbraco.Infrastructure/Migrations/Expressions/Delete/Column/IDeleteColumnBuilder.cs index 76da05f524..80755635ee 100644 --- a/src/Umbraco.Infrastructure/Migrations/Expressions/Delete/Column/IDeleteColumnBuilder.cs +++ b/src/Umbraco.Infrastructure/Migrations/Expressions/Delete/Column/IDeleteColumnBuilder.cs @@ -1,6 +1,6 @@ -using Umbraco.Core.Migrations.Expressions.Common; +using Umbraco.Cms.Infrastructure.Migrations.Expressions.Common; -namespace Umbraco.Core.Migrations.Expressions.Delete.Column +namespace Umbraco.Cms.Infrastructure.Migrations.Expressions.Delete.Column { /// /// Builds a Delete Column expression. diff --git a/src/Umbraco.Infrastructure/Migrations/Expressions/Delete/Constraint/DeleteConstraintBuilder.cs b/src/Umbraco.Infrastructure/Migrations/Expressions/Delete/Constraint/DeleteConstraintBuilder.cs index af0b0e5498..84e5393549 100644 --- a/src/Umbraco.Infrastructure/Migrations/Expressions/Delete/Constraint/DeleteConstraintBuilder.cs +++ b/src/Umbraco.Infrastructure/Migrations/Expressions/Delete/Constraint/DeleteConstraintBuilder.cs @@ -1,7 +1,7 @@ -using Umbraco.Core.Migrations.Expressions.Common; -using Umbraco.Core.Migrations.Expressions.Delete.Expressions; +using Umbraco.Cms.Infrastructure.Migrations.Expressions.Common; +using Umbraco.Cms.Infrastructure.Migrations.Expressions.Delete.Expressions; -namespace Umbraco.Core.Migrations.Expressions.Delete.Constraint +namespace Umbraco.Cms.Infrastructure.Migrations.Expressions.Delete.Constraint { public class DeleteConstraintBuilder : ExpressionBuilderBase, IDeleteConstraintBuilder diff --git a/src/Umbraco.Infrastructure/Migrations/Expressions/Delete/Constraint/IDeleteConstraintBuilder.cs b/src/Umbraco.Infrastructure/Migrations/Expressions/Delete/Constraint/IDeleteConstraintBuilder.cs index cdb107e1ab..a3304f552d 100644 --- a/src/Umbraco.Infrastructure/Migrations/Expressions/Delete/Constraint/IDeleteConstraintBuilder.cs +++ b/src/Umbraco.Infrastructure/Migrations/Expressions/Delete/Constraint/IDeleteConstraintBuilder.cs @@ -1,6 +1,6 @@ -using Umbraco.Core.Migrations.Expressions.Common; +using Umbraco.Cms.Infrastructure.Migrations.Expressions.Common; -namespace Umbraco.Core.Migrations.Expressions.Delete.Constraint +namespace Umbraco.Cms.Infrastructure.Migrations.Expressions.Delete.Constraint { /// /// Builds a Delete Constraint expression. diff --git a/src/Umbraco.Infrastructure/Migrations/Expressions/Delete/Data/DeleteDataBuilder.cs b/src/Umbraco.Infrastructure/Migrations/Expressions/Delete/Data/DeleteDataBuilder.cs index 635456b7a6..d3435892cf 100644 --- a/src/Umbraco.Infrastructure/Migrations/Expressions/Delete/Data/DeleteDataBuilder.cs +++ b/src/Umbraco.Infrastructure/Migrations/Expressions/Delete/Data/DeleteDataBuilder.cs @@ -1,10 +1,10 @@ using System.Collections.Generic; using System.ComponentModel; -using Umbraco.Core.Migrations.Expressions.Common; -using Umbraco.Core.Migrations.Expressions.Delete.Expressions; -using Umbraco.Core.Persistence.DatabaseModelDefinitions; +using Umbraco.Cms.Infrastructure.Migrations.Expressions.Common; +using Umbraco.Cms.Infrastructure.Migrations.Expressions.Delete.Expressions; +using Umbraco.Cms.Infrastructure.Persistence.DatabaseModelDefinitions; -namespace Umbraco.Core.Migrations.Expressions.Delete.Data +namespace Umbraco.Cms.Infrastructure.Migrations.Expressions.Delete.Data { public class DeleteDataBuilder : ExpressionBuilderBase, IDeleteDataBuilder diff --git a/src/Umbraco.Infrastructure/Migrations/Expressions/Delete/Data/IDeleteDataBuilder.cs b/src/Umbraco.Infrastructure/Migrations/Expressions/Delete/Data/IDeleteDataBuilder.cs index 043b900e75..701d526d7d 100644 --- a/src/Umbraco.Infrastructure/Migrations/Expressions/Delete/Data/IDeleteDataBuilder.cs +++ b/src/Umbraco.Infrastructure/Migrations/Expressions/Delete/Data/IDeleteDataBuilder.cs @@ -1,6 +1,6 @@ -using Umbraco.Core.Migrations.Expressions.Common; +using Umbraco.Cms.Infrastructure.Migrations.Expressions.Common; -namespace Umbraco.Core.Migrations.Expressions.Delete.Data +namespace Umbraco.Cms.Infrastructure.Migrations.Expressions.Delete.Data { /// /// Builds a Delete expression. diff --git a/src/Umbraco.Infrastructure/Migrations/Expressions/Delete/DefaultConstraint/DeleteDefaultConstraintBuilder.cs b/src/Umbraco.Infrastructure/Migrations/Expressions/Delete/DefaultConstraint/DeleteDefaultConstraintBuilder.cs index 92bc11b04d..7093256c5f 100644 --- a/src/Umbraco.Infrastructure/Migrations/Expressions/Delete/DefaultConstraint/DeleteDefaultConstraintBuilder.cs +++ b/src/Umbraco.Infrastructure/Migrations/Expressions/Delete/DefaultConstraint/DeleteDefaultConstraintBuilder.cs @@ -1,7 +1,7 @@ -using Umbraco.Core.Migrations.Expressions.Common; -using Umbraco.Core.Migrations.Expressions.Delete.Expressions; +using Umbraco.Cms.Infrastructure.Migrations.Expressions.Common; +using Umbraco.Cms.Infrastructure.Migrations.Expressions.Delete.Expressions; -namespace Umbraco.Core.Migrations.Expressions.Delete.DefaultConstraint +namespace Umbraco.Cms.Infrastructure.Migrations.Expressions.Delete.DefaultConstraint { /// /// Implements , . diff --git a/src/Umbraco.Infrastructure/Migrations/Expressions/Delete/DefaultConstraint/IDeleteDefaultConstraintOnColumnBuilder.cs b/src/Umbraco.Infrastructure/Migrations/Expressions/Delete/DefaultConstraint/IDeleteDefaultConstraintOnColumnBuilder.cs index 2ab4a32185..dcc613e0fb 100644 --- a/src/Umbraco.Infrastructure/Migrations/Expressions/Delete/DefaultConstraint/IDeleteDefaultConstraintOnColumnBuilder.cs +++ b/src/Umbraco.Infrastructure/Migrations/Expressions/Delete/DefaultConstraint/IDeleteDefaultConstraintOnColumnBuilder.cs @@ -1,6 +1,6 @@ -using Umbraco.Core.Migrations.Expressions.Common; +using Umbraco.Cms.Infrastructure.Migrations.Expressions.Common; -namespace Umbraco.Core.Migrations.Expressions.Delete.DefaultConstraint +namespace Umbraco.Cms.Infrastructure.Migrations.Expressions.Delete.DefaultConstraint { /// /// Builds a Delete expression. diff --git a/src/Umbraco.Infrastructure/Migrations/Expressions/Delete/DefaultConstraint/IDeleteDefaultConstraintOnTableBuilder.cs b/src/Umbraco.Infrastructure/Migrations/Expressions/Delete/DefaultConstraint/IDeleteDefaultConstraintOnTableBuilder.cs index ff288cd6c8..4b8be9f3ee 100644 --- a/src/Umbraco.Infrastructure/Migrations/Expressions/Delete/DefaultConstraint/IDeleteDefaultConstraintOnTableBuilder.cs +++ b/src/Umbraco.Infrastructure/Migrations/Expressions/Delete/DefaultConstraint/IDeleteDefaultConstraintOnTableBuilder.cs @@ -1,4 +1,4 @@ -namespace Umbraco.Core.Migrations.Expressions.Delete.DefaultConstraint +namespace Umbraco.Cms.Infrastructure.Migrations.Expressions.Delete.DefaultConstraint { /// /// Builds a Delete expression. diff --git a/src/Umbraco.Infrastructure/Migrations/Expressions/Delete/DeleteBuilder.cs b/src/Umbraco.Infrastructure/Migrations/Expressions/Delete/DeleteBuilder.cs index 65c15456a5..251c13b4e8 100644 --- a/src/Umbraco.Infrastructure/Migrations/Expressions/Delete/DeleteBuilder.cs +++ b/src/Umbraco.Infrastructure/Migrations/Expressions/Delete/DeleteBuilder.cs @@ -1,16 +1,16 @@ using System; -using Umbraco.Core.Migrations.Expressions.Common; -using Umbraco.Core.Migrations.Expressions.Delete.Column; -using Umbraco.Core.Migrations.Expressions.Delete.Constraint; -using Umbraco.Core.Migrations.Expressions.Delete.Data; -using Umbraco.Core.Migrations.Expressions.Delete.DefaultConstraint; -using Umbraco.Core.Migrations.Expressions.Delete.Expressions; -using Umbraco.Core.Migrations.Expressions.Delete.ForeignKey; -using Umbraco.Core.Migrations.Expressions.Delete.Index; -using Umbraco.Core.Migrations.Expressions.Delete.KeysAndIndexes; -using Umbraco.Core.Persistence.DatabaseModelDefinitions; +using Umbraco.Cms.Infrastructure.Migrations.Expressions.Common; +using Umbraco.Cms.Infrastructure.Migrations.Expressions.Delete.Column; +using Umbraco.Cms.Infrastructure.Migrations.Expressions.Delete.Constraint; +using Umbraco.Cms.Infrastructure.Migrations.Expressions.Delete.Data; +using Umbraco.Cms.Infrastructure.Migrations.Expressions.Delete.DefaultConstraint; +using Umbraco.Cms.Infrastructure.Migrations.Expressions.Delete.Expressions; +using Umbraco.Cms.Infrastructure.Migrations.Expressions.Delete.ForeignKey; +using Umbraco.Cms.Infrastructure.Migrations.Expressions.Delete.Index; +using Umbraco.Cms.Infrastructure.Migrations.Expressions.Delete.KeysAndIndexes; +using Umbraco.Cms.Infrastructure.Persistence.DatabaseModelDefinitions; -namespace Umbraco.Core.Migrations.Expressions.Delete +namespace Umbraco.Cms.Infrastructure.Migrations.Expressions.Delete { public class DeleteBuilder : IDeleteBuilder { diff --git a/src/Umbraco.Infrastructure/Migrations/Expressions/Delete/Expressions/DeleteColumnExpression.cs b/src/Umbraco.Infrastructure/Migrations/Expressions/Delete/Expressions/DeleteColumnExpression.cs index 9df810bd12..13f94cc8a5 100644 --- a/src/Umbraco.Infrastructure/Migrations/Expressions/Delete/Expressions/DeleteColumnExpression.cs +++ b/src/Umbraco.Infrastructure/Migrations/Expressions/Delete/Expressions/DeleteColumnExpression.cs @@ -1,8 +1,7 @@ using System.Collections.Generic; using System.Text; -using NPoco; -namespace Umbraco.Core.Migrations.Expressions.Delete.Expressions +namespace Umbraco.Cms.Infrastructure.Migrations.Expressions.Delete.Expressions { public class DeleteColumnExpression : MigrationExpressionBase { diff --git a/src/Umbraco.Infrastructure/Migrations/Expressions/Delete/Expressions/DeleteConstraintExpression.cs b/src/Umbraco.Infrastructure/Migrations/Expressions/Delete/Expressions/DeleteConstraintExpression.cs index c5d986b8d2..73e17ba124 100644 --- a/src/Umbraco.Infrastructure/Migrations/Expressions/Delete/Expressions/DeleteConstraintExpression.cs +++ b/src/Umbraco.Infrastructure/Migrations/Expressions/Delete/Expressions/DeleteConstraintExpression.cs @@ -1,6 +1,6 @@ -using Umbraco.Core.Persistence.DatabaseModelDefinitions; +using Umbraco.Cms.Infrastructure.Persistence.DatabaseModelDefinitions; -namespace Umbraco.Core.Migrations.Expressions.Delete.Expressions +namespace Umbraco.Cms.Infrastructure.Migrations.Expressions.Delete.Expressions { public class DeleteConstraintExpression : MigrationExpressionBase { diff --git a/src/Umbraco.Infrastructure/Migrations/Expressions/Delete/Expressions/DeleteDataExpression.cs b/src/Umbraco.Infrastructure/Migrations/Expressions/Delete/Expressions/DeleteDataExpression.cs index 1775f0b53e..9e518dc587 100644 --- a/src/Umbraco.Infrastructure/Migrations/Expressions/Delete/Expressions/DeleteDataExpression.cs +++ b/src/Umbraco.Infrastructure/Migrations/Expressions/Delete/Expressions/DeleteDataExpression.cs @@ -1,10 +1,9 @@ -using System.Linq; -using System.Collections.Generic; +using System.Collections.Generic; +using System.Linq; using System.Text; -using NPoco; -using Umbraco.Core.Persistence.DatabaseModelDefinitions; +using Umbraco.Cms.Infrastructure.Persistence.DatabaseModelDefinitions; -namespace Umbraco.Core.Migrations.Expressions.Delete.Expressions +namespace Umbraco.Cms.Infrastructure.Migrations.Expressions.Delete.Expressions { public class DeleteDataExpression : MigrationExpressionBase { diff --git a/src/Umbraco.Infrastructure/Migrations/Expressions/Delete/Expressions/DeleteDefaultConstraintExpression.cs b/src/Umbraco.Infrastructure/Migrations/Expressions/Delete/Expressions/DeleteDefaultConstraintExpression.cs index b73d3f0d13..fd6950c12d 100644 --- a/src/Umbraco.Infrastructure/Migrations/Expressions/Delete/Expressions/DeleteDefaultConstraintExpression.cs +++ b/src/Umbraco.Infrastructure/Migrations/Expressions/Delete/Expressions/DeleteDefaultConstraintExpression.cs @@ -1,6 +1,4 @@ -using NPoco; - -namespace Umbraco.Core.Migrations.Expressions.Delete.Expressions +namespace Umbraco.Cms.Infrastructure.Migrations.Expressions.Delete.Expressions { public class DeleteDefaultConstraintExpression : MigrationExpressionBase { diff --git a/src/Umbraco.Infrastructure/Migrations/Expressions/Delete/Expressions/DeleteForeignKeyExpression.cs b/src/Umbraco.Infrastructure/Migrations/Expressions/Delete/Expressions/DeleteForeignKeyExpression.cs index 73688233b6..b7f670006e 100644 --- a/src/Umbraco.Infrastructure/Migrations/Expressions/Delete/Expressions/DeleteForeignKeyExpression.cs +++ b/src/Umbraco.Infrastructure/Migrations/Expressions/Delete/Expressions/DeleteForeignKeyExpression.cs @@ -1,8 +1,8 @@ using System; using System.Linq; -using Umbraco.Core.Persistence.DatabaseModelDefinitions; +using Umbraco.Cms.Infrastructure.Persistence.DatabaseModelDefinitions; -namespace Umbraco.Core.Migrations.Expressions.Delete.Expressions +namespace Umbraco.Cms.Infrastructure.Migrations.Expressions.Delete.Expressions { public class DeleteForeignKeyExpression : MigrationExpressionBase { @@ -18,7 +18,7 @@ namespace Umbraco.Core.Migrations.Expressions.Delete.Expressions { if (ForeignKey.ForeignTable == null) throw new ArgumentNullException("Table name not specified, ensure you have appended the OnTable extension. Format should be Delete.ForeignKey(KeyName).OnTable(TableName)"); - + if (string.IsNullOrEmpty(ForeignKey.Name)) { ForeignKey.Name = $"FK_{ForeignKey.ForeignTable}_{ForeignKey.PrimaryTable}_{ForeignKey.PrimaryColumns.First()}"; diff --git a/src/Umbraco.Infrastructure/Migrations/Expressions/Delete/Expressions/DeleteIndexExpression.cs b/src/Umbraco.Infrastructure/Migrations/Expressions/Delete/Expressions/DeleteIndexExpression.cs index f5c21085b8..dd3c41dd2c 100644 --- a/src/Umbraco.Infrastructure/Migrations/Expressions/Delete/Expressions/DeleteIndexExpression.cs +++ b/src/Umbraco.Infrastructure/Migrations/Expressions/Delete/Expressions/DeleteIndexExpression.cs @@ -1,7 +1,6 @@ -using NPoco; -using Umbraco.Core.Persistence.DatabaseModelDefinitions; +using Umbraco.Cms.Infrastructure.Persistence.DatabaseModelDefinitions; -namespace Umbraco.Core.Migrations.Expressions.Delete.Expressions +namespace Umbraco.Cms.Infrastructure.Migrations.Expressions.Delete.Expressions { public class DeleteIndexExpression : MigrationExpressionBase { diff --git a/src/Umbraco.Infrastructure/Migrations/Expressions/Delete/Expressions/DeleteTableExpression.cs b/src/Umbraco.Infrastructure/Migrations/Expressions/Delete/Expressions/DeleteTableExpression.cs index 1843648c45..18ff73cdea 100644 --- a/src/Umbraco.Infrastructure/Migrations/Expressions/Delete/Expressions/DeleteTableExpression.cs +++ b/src/Umbraco.Infrastructure/Migrations/Expressions/Delete/Expressions/DeleteTableExpression.cs @@ -1,6 +1,4 @@ -using NPoco; - -namespace Umbraco.Core.Migrations.Expressions.Delete.Expressions +namespace Umbraco.Cms.Infrastructure.Migrations.Expressions.Delete.Expressions { public class DeleteTableExpression : MigrationExpressionBase { diff --git a/src/Umbraco.Infrastructure/Migrations/Expressions/Delete/ForeignKey/DeleteForeignKeyBuilder.cs b/src/Umbraco.Infrastructure/Migrations/Expressions/Delete/ForeignKey/DeleteForeignKeyBuilder.cs index 9850e914ea..74bee1a440 100644 --- a/src/Umbraco.Infrastructure/Migrations/Expressions/Delete/ForeignKey/DeleteForeignKeyBuilder.cs +++ b/src/Umbraco.Infrastructure/Migrations/Expressions/Delete/ForeignKey/DeleteForeignKeyBuilder.cs @@ -1,7 +1,7 @@ -using Umbraco.Core.Migrations.Expressions.Common; -using Umbraco.Core.Migrations.Expressions.Delete.Expressions; +using Umbraco.Cms.Infrastructure.Migrations.Expressions.Common; +using Umbraco.Cms.Infrastructure.Migrations.Expressions.Delete.Expressions; -namespace Umbraco.Core.Migrations.Expressions.Delete.ForeignKey +namespace Umbraco.Cms.Infrastructure.Migrations.Expressions.Delete.ForeignKey { /// /// Implements IDeleteForeignKey... diff --git a/src/Umbraco.Infrastructure/Migrations/Expressions/Delete/ForeignKey/IDeleteForeignKeyForeignColumnBuilder.cs b/src/Umbraco.Infrastructure/Migrations/Expressions/Delete/ForeignKey/IDeleteForeignKeyForeignColumnBuilder.cs index b682e68a8f..3b17700218 100644 --- a/src/Umbraco.Infrastructure/Migrations/Expressions/Delete/ForeignKey/IDeleteForeignKeyForeignColumnBuilder.cs +++ b/src/Umbraco.Infrastructure/Migrations/Expressions/Delete/ForeignKey/IDeleteForeignKeyForeignColumnBuilder.cs @@ -1,4 +1,4 @@ -namespace Umbraco.Core.Migrations.Expressions.Delete.ForeignKey +namespace Umbraco.Cms.Infrastructure.Migrations.Expressions.Delete.ForeignKey { /// /// Builds a Delete expression. diff --git a/src/Umbraco.Infrastructure/Migrations/Expressions/Delete/ForeignKey/IDeleteForeignKeyFromTableBuilder.cs b/src/Umbraco.Infrastructure/Migrations/Expressions/Delete/ForeignKey/IDeleteForeignKeyFromTableBuilder.cs index 581254a250..6d422ad535 100644 --- a/src/Umbraco.Infrastructure/Migrations/Expressions/Delete/ForeignKey/IDeleteForeignKeyFromTableBuilder.cs +++ b/src/Umbraco.Infrastructure/Migrations/Expressions/Delete/ForeignKey/IDeleteForeignKeyFromTableBuilder.cs @@ -1,4 +1,4 @@ -namespace Umbraco.Core.Migrations.Expressions.Delete.ForeignKey +namespace Umbraco.Cms.Infrastructure.Migrations.Expressions.Delete.ForeignKey { /// /// Builds a Delete expression. diff --git a/src/Umbraco.Infrastructure/Migrations/Expressions/Delete/ForeignKey/IDeleteForeignKeyOnTableBuilder.cs b/src/Umbraco.Infrastructure/Migrations/Expressions/Delete/ForeignKey/IDeleteForeignKeyOnTableBuilder.cs index 6a16dd9687..19dd14f36e 100644 --- a/src/Umbraco.Infrastructure/Migrations/Expressions/Delete/ForeignKey/IDeleteForeignKeyOnTableBuilder.cs +++ b/src/Umbraco.Infrastructure/Migrations/Expressions/Delete/ForeignKey/IDeleteForeignKeyOnTableBuilder.cs @@ -1,6 +1,6 @@ -using Umbraco.Core.Migrations.Expressions.Common; +using Umbraco.Cms.Infrastructure.Migrations.Expressions.Common; -namespace Umbraco.Core.Migrations.Expressions.Delete.ForeignKey +namespace Umbraco.Cms.Infrastructure.Migrations.Expressions.Delete.ForeignKey { /// /// Builds a Delete expression. diff --git a/src/Umbraco.Infrastructure/Migrations/Expressions/Delete/ForeignKey/IDeleteForeignKeyPrimaryColumnBuilder.cs b/src/Umbraco.Infrastructure/Migrations/Expressions/Delete/ForeignKey/IDeleteForeignKeyPrimaryColumnBuilder.cs index c579759871..c44696b45d 100644 --- a/src/Umbraco.Infrastructure/Migrations/Expressions/Delete/ForeignKey/IDeleteForeignKeyPrimaryColumnBuilder.cs +++ b/src/Umbraco.Infrastructure/Migrations/Expressions/Delete/ForeignKey/IDeleteForeignKeyPrimaryColumnBuilder.cs @@ -1,6 +1,6 @@ -using Umbraco.Core.Migrations.Expressions.Common; +using Umbraco.Cms.Infrastructure.Migrations.Expressions.Common; -namespace Umbraco.Core.Migrations.Expressions.Delete.ForeignKey +namespace Umbraco.Cms.Infrastructure.Migrations.Expressions.Delete.ForeignKey { /// /// Builds a Delete expression. diff --git a/src/Umbraco.Infrastructure/Migrations/Expressions/Delete/ForeignKey/IDeleteForeignKeyToTableBuilder.cs b/src/Umbraco.Infrastructure/Migrations/Expressions/Delete/ForeignKey/IDeleteForeignKeyToTableBuilder.cs index 8ae7a65f9a..6588b7a18a 100644 --- a/src/Umbraco.Infrastructure/Migrations/Expressions/Delete/ForeignKey/IDeleteForeignKeyToTableBuilder.cs +++ b/src/Umbraco.Infrastructure/Migrations/Expressions/Delete/ForeignKey/IDeleteForeignKeyToTableBuilder.cs @@ -1,4 +1,4 @@ -namespace Umbraco.Core.Migrations.Expressions.Delete.ForeignKey +namespace Umbraco.Cms.Infrastructure.Migrations.Expressions.Delete.ForeignKey { /// /// Builds a Delete expression. diff --git a/src/Umbraco.Infrastructure/Migrations/Expressions/Delete/IDeleteBuilder.cs b/src/Umbraco.Infrastructure/Migrations/Expressions/Delete/IDeleteBuilder.cs index 84e44d0d93..0b8da10097 100644 --- a/src/Umbraco.Infrastructure/Migrations/Expressions/Delete/IDeleteBuilder.cs +++ b/src/Umbraco.Infrastructure/Migrations/Expressions/Delete/IDeleteBuilder.cs @@ -1,12 +1,12 @@ -using Umbraco.Core.Migrations.Expressions.Common; -using Umbraco.Core.Migrations.Expressions.Delete.Column; -using Umbraco.Core.Migrations.Expressions.Delete.Constraint; -using Umbraco.Core.Migrations.Expressions.Delete.Data; -using Umbraco.Core.Migrations.Expressions.Delete.DefaultConstraint; -using Umbraco.Core.Migrations.Expressions.Delete.ForeignKey; -using Umbraco.Core.Migrations.Expressions.Delete.Index; +using Umbraco.Cms.Infrastructure.Migrations.Expressions.Common; +using Umbraco.Cms.Infrastructure.Migrations.Expressions.Delete.Column; +using Umbraco.Cms.Infrastructure.Migrations.Expressions.Delete.Constraint; +using Umbraco.Cms.Infrastructure.Migrations.Expressions.Delete.Data; +using Umbraco.Cms.Infrastructure.Migrations.Expressions.Delete.DefaultConstraint; +using Umbraco.Cms.Infrastructure.Migrations.Expressions.Delete.ForeignKey; +using Umbraco.Cms.Infrastructure.Migrations.Expressions.Delete.Index; -namespace Umbraco.Core.Migrations.Expressions.Delete +namespace Umbraco.Cms.Infrastructure.Migrations.Expressions.Delete { /// /// Builds a Delete expression. diff --git a/src/Umbraco.Infrastructure/Migrations/Expressions/Delete/Index/DeleteIndexBuilder.cs b/src/Umbraco.Infrastructure/Migrations/Expressions/Delete/Index/DeleteIndexBuilder.cs index 4aced4378c..e55b1e3d8f 100644 --- a/src/Umbraco.Infrastructure/Migrations/Expressions/Delete/Index/DeleteIndexBuilder.cs +++ b/src/Umbraco.Infrastructure/Migrations/Expressions/Delete/Index/DeleteIndexBuilder.cs @@ -1,8 +1,7 @@ -using Umbraco.Core.Migrations.Expressions.Common; -using Umbraco.Core.Migrations.Expressions.Delete.Expressions; -using Umbraco.Core.Persistence.DatabaseModelDefinitions; +using Umbraco.Cms.Infrastructure.Migrations.Expressions.Common; +using Umbraco.Cms.Infrastructure.Migrations.Expressions.Delete.Expressions; -namespace Umbraco.Core.Migrations.Expressions.Delete.Index +namespace Umbraco.Cms.Infrastructure.Migrations.Expressions.Delete.Index { public class DeleteIndexBuilder : ExpressionBuilderBase, IDeleteIndexForTableBuilder, IExecutableBuilder diff --git a/src/Umbraco.Infrastructure/Migrations/Expressions/Delete/Index/IDeleteIndexForTableBuilder.cs b/src/Umbraco.Infrastructure/Migrations/Expressions/Delete/Index/IDeleteIndexForTableBuilder.cs index 8251107cbb..f99e0d1ea0 100644 --- a/src/Umbraco.Infrastructure/Migrations/Expressions/Delete/Index/IDeleteIndexForTableBuilder.cs +++ b/src/Umbraco.Infrastructure/Migrations/Expressions/Delete/Index/IDeleteIndexForTableBuilder.cs @@ -1,6 +1,6 @@ -using Umbraco.Core.Migrations.Expressions.Common; +using Umbraco.Cms.Infrastructure.Migrations.Expressions.Common; -namespace Umbraco.Core.Migrations.Expressions.Delete.Index +namespace Umbraco.Cms.Infrastructure.Migrations.Expressions.Delete.Index { /// /// Builds a Delete expression. diff --git a/src/Umbraco.Infrastructure/Migrations/Expressions/Delete/KeysAndIndexes/DeleteKeysAndIndexesBuilder.cs b/src/Umbraco.Infrastructure/Migrations/Expressions/Delete/KeysAndIndexes/DeleteKeysAndIndexesBuilder.cs index df74bf7c87..5a669e182a 100644 --- a/src/Umbraco.Infrastructure/Migrations/Expressions/Delete/KeysAndIndexes/DeleteKeysAndIndexesBuilder.cs +++ b/src/Umbraco.Infrastructure/Migrations/Expressions/Delete/KeysAndIndexes/DeleteKeysAndIndexesBuilder.cs @@ -1,11 +1,10 @@ -using System.Collections.Generic; -using System.Linq; +using System.Linq; using NPoco; -using Umbraco.Core; -using Umbraco.Core.Migrations.Expressions.Common; -using Umbraco.Core.Persistence.SqlSyntax; +using Umbraco.Cms.Infrastructure.Migrations.Expressions.Common; +using Umbraco.Cms.Infrastructure.Persistence.SqlSyntax; +using Umbraco.Extensions; -namespace Umbraco.Core.Migrations.Expressions.Delete.KeysAndIndexes +namespace Umbraco.Cms.Infrastructure.Migrations.Expressions.Delete.KeysAndIndexes { public class DeleteKeysAndIndexesBuilder : IExecutableBuilder { @@ -42,7 +41,7 @@ namespace Umbraco.Core.Migrations.Expressions.Delete.KeysAndIndexes if (DeleteLocal || DeleteForeign) { // table, constraint - + if (DeleteForeign) { //In some cases not all FK's are prefixed with "FK" :/ mostly with old upgraded databases so we need to check if it's either: @@ -54,7 +53,7 @@ namespace Umbraco.Core.Migrations.Expressions.Delete.KeysAndIndexes { Delete.ForeignKey(key.Item2).OnTable(key.Item1).Do(); } - + } if (DeleteLocal) { @@ -68,7 +67,7 @@ namespace Umbraco.Core.Migrations.Expressions.Delete.KeysAndIndexes // drop indexes if (DeleteLocal) - { + { foreach (var index in indexes.Where(x => x.TableName == TableName)) { //if this is a unique constraint we need to drop the constraint, else drop the index @@ -79,7 +78,7 @@ namespace Umbraco.Core.Migrations.Expressions.Delete.KeysAndIndexes else Delete.Index(index.IndexName).OnTable(index.TableName).Do(); } - + } } diff --git a/src/Umbraco.Infrastructure/Migrations/Expressions/Execute/ExecuteBuilder.cs b/src/Umbraco.Infrastructure/Migrations/Expressions/Execute/ExecuteBuilder.cs index 0ba2499c44..f483ec6402 100644 --- a/src/Umbraco.Infrastructure/Migrations/Expressions/Execute/ExecuteBuilder.cs +++ b/src/Umbraco.Infrastructure/Migrations/Expressions/Execute/ExecuteBuilder.cs @@ -1,9 +1,9 @@ using NPoco; -using Umbraco.Core.Migrations.Expressions.Common; -using Umbraco.Core.Migrations.Expressions.Execute.Expressions; -using Umbraco.Core.Persistence; +using Umbraco.Cms.Infrastructure.Migrations.Expressions.Common; +using Umbraco.Cms.Infrastructure.Migrations.Expressions.Execute.Expressions; +using Umbraco.Cms.Infrastructure.Persistence; -namespace Umbraco.Core.Migrations.Expressions.Execute +namespace Umbraco.Cms.Infrastructure.Migrations.Expressions.Execute { public class ExecuteBuilder : ExpressionBuilderBase, IExecuteBuilder, IExecutableBuilder diff --git a/src/Umbraco.Infrastructure/Migrations/Expressions/Execute/Expressions/ExecuteSqlStatementExpression.cs b/src/Umbraco.Infrastructure/Migrations/Expressions/Execute/Expressions/ExecuteSqlStatementExpression.cs index 8b5da4f270..091d20fa8f 100644 --- a/src/Umbraco.Infrastructure/Migrations/Expressions/Execute/Expressions/ExecuteSqlStatementExpression.cs +++ b/src/Umbraco.Infrastructure/Migrations/Expressions/Execute/Expressions/ExecuteSqlStatementExpression.cs @@ -1,7 +1,7 @@ using NPoco; -using Umbraco.Core.Persistence; +using Umbraco.Cms.Infrastructure.Persistence; -namespace Umbraco.Core.Migrations.Expressions.Execute.Expressions +namespace Umbraco.Cms.Infrastructure.Migrations.Expressions.Execute.Expressions { public class ExecuteSqlStatementExpression : MigrationExpressionBase { diff --git a/src/Umbraco.Infrastructure/Migrations/Expressions/Execute/IExecuteBuilder.cs b/src/Umbraco.Infrastructure/Migrations/Expressions/Execute/IExecuteBuilder.cs index 7f575fd3f8..54a1f6a768 100644 --- a/src/Umbraco.Infrastructure/Migrations/Expressions/Execute/IExecuteBuilder.cs +++ b/src/Umbraco.Infrastructure/Migrations/Expressions/Execute/IExecuteBuilder.cs @@ -1,8 +1,8 @@ using NPoco; -using Umbraco.Core.Migrations.Expressions.Common; -using Umbraco.Core.Persistence; +using Umbraco.Cms.Infrastructure.Migrations.Expressions.Common; +using Umbraco.Cms.Infrastructure.Persistence; -namespace Umbraco.Core.Migrations.Expressions.Execute +namespace Umbraco.Cms.Infrastructure.Migrations.Expressions.Execute { /// /// Builds and executes an Sql statement. diff --git a/src/Umbraco.Infrastructure/Migrations/Expressions/ExpressionBuilderBase.cs b/src/Umbraco.Infrastructure/Migrations/Expressions/ExpressionBuilderBase.cs index e491cf30c7..a3bed8b5d8 100644 --- a/src/Umbraco.Infrastructure/Migrations/Expressions/ExpressionBuilderBase.cs +++ b/src/Umbraco.Infrastructure/Migrations/Expressions/ExpressionBuilderBase.cs @@ -1,4 +1,4 @@ -namespace Umbraco.Core.Migrations.Expressions +namespace Umbraco.Cms.Infrastructure.Migrations.Expressions { /// /// Provides a base class for expression builders. diff --git a/src/Umbraco.Infrastructure/Migrations/Expressions/ExpressionBuilderBaseOfNext.cs b/src/Umbraco.Infrastructure/Migrations/Expressions/ExpressionBuilderBaseOfNext.cs index b9b3458bb4..3ac0344f85 100644 --- a/src/Umbraco.Infrastructure/Migrations/Expressions/ExpressionBuilderBaseOfNext.cs +++ b/src/Umbraco.Infrastructure/Migrations/Expressions/ExpressionBuilderBaseOfNext.cs @@ -1,7 +1,7 @@ using System.Data; -using Umbraco.Core.Persistence.DatabaseModelDefinitions; +using Umbraco.Cms.Infrastructure.Persistence.DatabaseModelDefinitions; -namespace Umbraco.Core.Migrations.Expressions +namespace Umbraco.Cms.Infrastructure.Migrations.Expressions { /// /// Provides a base class for expression builders. diff --git a/src/Umbraco.Infrastructure/Migrations/Expressions/IFluentBuilder.cs b/src/Umbraco.Infrastructure/Migrations/Expressions/IFluentBuilder.cs index 6d947ef410..8ad08b5733 100644 --- a/src/Umbraco.Infrastructure/Migrations/Expressions/IFluentBuilder.cs +++ b/src/Umbraco.Infrastructure/Migrations/Expressions/IFluentBuilder.cs @@ -1,4 +1,4 @@ -namespace Umbraco.Core.Migrations.Expressions +namespace Umbraco.Cms.Infrastructure.Migrations.Expressions { public interface IFluentBuilder { } diff --git a/src/Umbraco.Infrastructure/Migrations/Expressions/Insert/Expressions/InsertDataExpression.cs b/src/Umbraco.Infrastructure/Migrations/Expressions/Insert/Expressions/InsertDataExpression.cs index 75768faad8..aa5c8ebd23 100644 --- a/src/Umbraco.Infrastructure/Migrations/Expressions/Insert/Expressions/InsertDataExpression.cs +++ b/src/Umbraco.Infrastructure/Migrations/Expressions/Insert/Expressions/InsertDataExpression.cs @@ -1,8 +1,8 @@ using System.Collections.Generic; using System.Text; -using Umbraco.Core.Persistence.DatabaseModelDefinitions; +using Umbraco.Cms.Infrastructure.Persistence.DatabaseModelDefinitions; -namespace Umbraco.Core.Migrations.Expressions.Insert.Expressions +namespace Umbraco.Cms.Infrastructure.Migrations.Expressions.Insert.Expressions { public class InsertDataExpression : MigrationExpressionBase { diff --git a/src/Umbraco.Infrastructure/Migrations/Expressions/Insert/IInsertBuilder.cs b/src/Umbraco.Infrastructure/Migrations/Expressions/Insert/IInsertBuilder.cs index ad8adeb5c3..407a7a02f1 100644 --- a/src/Umbraco.Infrastructure/Migrations/Expressions/Insert/IInsertBuilder.cs +++ b/src/Umbraco.Infrastructure/Migrations/Expressions/Insert/IInsertBuilder.cs @@ -1,4 +1,4 @@ -namespace Umbraco.Core.Migrations.Expressions.Insert +namespace Umbraco.Cms.Infrastructure.Migrations.Expressions.Insert { /// /// Builds an Insert expression. diff --git a/src/Umbraco.Infrastructure/Migrations/Expressions/Insert/IInsertIntoBuilder.cs b/src/Umbraco.Infrastructure/Migrations/Expressions/Insert/IInsertIntoBuilder.cs index f1b901382e..dfe4ba7909 100644 --- a/src/Umbraco.Infrastructure/Migrations/Expressions/Insert/IInsertIntoBuilder.cs +++ b/src/Umbraco.Infrastructure/Migrations/Expressions/Insert/IInsertIntoBuilder.cs @@ -1,6 +1,6 @@ -using Umbraco.Core.Migrations.Expressions.Common; +using Umbraco.Cms.Infrastructure.Migrations.Expressions.Common; -namespace Umbraco.Core.Migrations.Expressions.Insert +namespace Umbraco.Cms.Infrastructure.Migrations.Expressions.Insert { /// /// Builds an Insert Into expression. diff --git a/src/Umbraco.Infrastructure/Migrations/Expressions/Insert/InsertBuilder.cs b/src/Umbraco.Infrastructure/Migrations/Expressions/Insert/InsertBuilder.cs index 3e315e7ea8..ddae2d5325 100644 --- a/src/Umbraco.Infrastructure/Migrations/Expressions/Insert/InsertBuilder.cs +++ b/src/Umbraco.Infrastructure/Migrations/Expressions/Insert/InsertBuilder.cs @@ -1,7 +1,6 @@ -using NPoco; -using Umbraco.Core.Migrations.Expressions.Insert.Expressions; +using Umbraco.Cms.Infrastructure.Migrations.Expressions.Insert.Expressions; -namespace Umbraco.Core.Migrations.Expressions.Insert +namespace Umbraco.Cms.Infrastructure.Migrations.Expressions.Insert { /// /// Implements . diff --git a/src/Umbraco.Infrastructure/Migrations/Expressions/Insert/InsertIntoBuilder.cs b/src/Umbraco.Infrastructure/Migrations/Expressions/Insert/InsertIntoBuilder.cs index 07524eac54..889f7c04ce 100644 --- a/src/Umbraco.Infrastructure/Migrations/Expressions/Insert/InsertIntoBuilder.cs +++ b/src/Umbraco.Infrastructure/Migrations/Expressions/Insert/InsertIntoBuilder.cs @@ -1,9 +1,9 @@ using System.Collections.Generic; using System.ComponentModel; -using Umbraco.Core.Migrations.Expressions.Insert.Expressions; -using Umbraco.Core.Persistence.DatabaseModelDefinitions; +using Umbraco.Cms.Infrastructure.Migrations.Expressions.Insert.Expressions; +using Umbraco.Cms.Infrastructure.Persistence.DatabaseModelDefinitions; -namespace Umbraco.Core.Migrations.Expressions.Insert +namespace Umbraco.Cms.Infrastructure.Migrations.Expressions.Insert { /// /// Implements . diff --git a/src/Umbraco.Infrastructure/Migrations/Expressions/Rename/Column/IRenameColumnBuilder.cs b/src/Umbraco.Infrastructure/Migrations/Expressions/Rename/Column/IRenameColumnBuilder.cs index dd2ccb889f..76a3c06946 100644 --- a/src/Umbraco.Infrastructure/Migrations/Expressions/Rename/Column/IRenameColumnBuilder.cs +++ b/src/Umbraco.Infrastructure/Migrations/Expressions/Rename/Column/IRenameColumnBuilder.cs @@ -1,4 +1,4 @@ -namespace Umbraco.Core.Migrations.Expressions.Rename.Column +namespace Umbraco.Cms.Infrastructure.Migrations.Expressions.Rename.Column { /// /// Builds a Rename Column expression. diff --git a/src/Umbraco.Infrastructure/Migrations/Expressions/Rename/Column/IRenameColumnToBuilder.cs b/src/Umbraco.Infrastructure/Migrations/Expressions/Rename/Column/IRenameColumnToBuilder.cs index 630c813abc..5580226c1f 100644 --- a/src/Umbraco.Infrastructure/Migrations/Expressions/Rename/Column/IRenameColumnToBuilder.cs +++ b/src/Umbraco.Infrastructure/Migrations/Expressions/Rename/Column/IRenameColumnToBuilder.cs @@ -1,6 +1,6 @@ -using Umbraco.Core.Migrations.Expressions.Common; +using Umbraco.Cms.Infrastructure.Migrations.Expressions.Common; -namespace Umbraco.Core.Migrations.Expressions.Rename.Column +namespace Umbraco.Cms.Infrastructure.Migrations.Expressions.Rename.Column { /// /// Builds a Rename Column expression. diff --git a/src/Umbraco.Infrastructure/Migrations/Expressions/Rename/Column/RenameColumnBuilder.cs b/src/Umbraco.Infrastructure/Migrations/Expressions/Rename/Column/RenameColumnBuilder.cs index 1f4e808e32..a3a181c5df 100644 --- a/src/Umbraco.Infrastructure/Migrations/Expressions/Rename/Column/RenameColumnBuilder.cs +++ b/src/Umbraco.Infrastructure/Migrations/Expressions/Rename/Column/RenameColumnBuilder.cs @@ -1,7 +1,7 @@ -using Umbraco.Core.Migrations.Expressions.Common; -using Umbraco.Core.Migrations.Expressions.Rename.Expressions; +using Umbraco.Cms.Infrastructure.Migrations.Expressions.Common; +using Umbraco.Cms.Infrastructure.Migrations.Expressions.Rename.Expressions; -namespace Umbraco.Core.Migrations.Expressions.Rename.Column +namespace Umbraco.Cms.Infrastructure.Migrations.Expressions.Rename.Column { public class RenameColumnBuilder : ExpressionBuilderBase, IRenameColumnToBuilder, IRenameColumnBuilder, IExecutableBuilder diff --git a/src/Umbraco.Infrastructure/Migrations/Expressions/Rename/Expressions/RenameColumnExpression.cs b/src/Umbraco.Infrastructure/Migrations/Expressions/Rename/Expressions/RenameColumnExpression.cs index 3ab5fd27b9..6dd72c78c5 100644 --- a/src/Umbraco.Infrastructure/Migrations/Expressions/Rename/Expressions/RenameColumnExpression.cs +++ b/src/Umbraco.Infrastructure/Migrations/Expressions/Rename/Expressions/RenameColumnExpression.cs @@ -1,4 +1,4 @@ -namespace Umbraco.Core.Migrations.Expressions.Rename.Expressions +namespace Umbraco.Cms.Infrastructure.Migrations.Expressions.Rename.Expressions { public class RenameColumnExpression : MigrationExpressionBase { @@ -10,9 +10,6 @@ public virtual string OldName { get; set; } public virtual string NewName { get; set; } - public override string Process(IMigrationContext context) - => GetSql(); - /// protected override string GetSql() { diff --git a/src/Umbraco.Infrastructure/Migrations/Expressions/Rename/Expressions/RenameTableExpression.cs b/src/Umbraco.Infrastructure/Migrations/Expressions/Rename/Expressions/RenameTableExpression.cs index cdd3367b92..aeaad46eac 100644 --- a/src/Umbraco.Infrastructure/Migrations/Expressions/Rename/Expressions/RenameTableExpression.cs +++ b/src/Umbraco.Infrastructure/Migrations/Expressions/Rename/Expressions/RenameTableExpression.cs @@ -1,6 +1,4 @@ -using NPoco; - -namespace Umbraco.Core.Migrations.Expressions.Rename.Expressions +namespace Umbraco.Cms.Infrastructure.Migrations.Expressions.Rename.Expressions { /// /// Represents a Rename Table expression. diff --git a/src/Umbraco.Infrastructure/Migrations/Expressions/Rename/IRenameBuilder.cs b/src/Umbraco.Infrastructure/Migrations/Expressions/Rename/IRenameBuilder.cs index ac93158508..e93842ae2a 100644 --- a/src/Umbraco.Infrastructure/Migrations/Expressions/Rename/IRenameBuilder.cs +++ b/src/Umbraco.Infrastructure/Migrations/Expressions/Rename/IRenameBuilder.cs @@ -1,7 +1,7 @@ -using Umbraco.Core.Migrations.Expressions.Rename.Column; -using Umbraco.Core.Migrations.Expressions.Rename.Table; +using Umbraco.Cms.Infrastructure.Migrations.Expressions.Rename.Column; +using Umbraco.Cms.Infrastructure.Migrations.Expressions.Rename.Table; -namespace Umbraco.Core.Migrations.Expressions.Rename +namespace Umbraco.Cms.Infrastructure.Migrations.Expressions.Rename { /// /// Builds a Rename expression. diff --git a/src/Umbraco.Infrastructure/Migrations/Expressions/Rename/RenameBuilder.cs b/src/Umbraco.Infrastructure/Migrations/Expressions/Rename/RenameBuilder.cs index bb9950e354..c0b80f34bb 100644 --- a/src/Umbraco.Infrastructure/Migrations/Expressions/Rename/RenameBuilder.cs +++ b/src/Umbraco.Infrastructure/Migrations/Expressions/Rename/RenameBuilder.cs @@ -1,9 +1,8 @@ -using NPoco; -using Umbraco.Core.Migrations.Expressions.Rename.Column; -using Umbraco.Core.Migrations.Expressions.Rename.Expressions; -using Umbraco.Core.Migrations.Expressions.Rename.Table; +using Umbraco.Cms.Infrastructure.Migrations.Expressions.Rename.Column; +using Umbraco.Cms.Infrastructure.Migrations.Expressions.Rename.Expressions; +using Umbraco.Cms.Infrastructure.Migrations.Expressions.Rename.Table; -namespace Umbraco.Core.Migrations.Expressions.Rename +namespace Umbraco.Cms.Infrastructure.Migrations.Expressions.Rename { public class RenameBuilder : IRenameBuilder { diff --git a/src/Umbraco.Infrastructure/Migrations/Expressions/Rename/Table/IRenameTableBuilder.cs b/src/Umbraco.Infrastructure/Migrations/Expressions/Rename/Table/IRenameTableBuilder.cs index 6309dd0abf..53f25a1b41 100644 --- a/src/Umbraco.Infrastructure/Migrations/Expressions/Rename/Table/IRenameTableBuilder.cs +++ b/src/Umbraco.Infrastructure/Migrations/Expressions/Rename/Table/IRenameTableBuilder.cs @@ -1,6 +1,6 @@ -using Umbraco.Core.Migrations.Expressions.Common; +using Umbraco.Cms.Infrastructure.Migrations.Expressions.Common; -namespace Umbraco.Core.Migrations.Expressions.Rename.Table +namespace Umbraco.Cms.Infrastructure.Migrations.Expressions.Rename.Table { /// /// Builds a Rename Table expression. diff --git a/src/Umbraco.Infrastructure/Migrations/Expressions/Rename/Table/RenameTableBuilder.cs b/src/Umbraco.Infrastructure/Migrations/Expressions/Rename/Table/RenameTableBuilder.cs index 2a7f7a446a..af849b25d7 100644 --- a/src/Umbraco.Infrastructure/Migrations/Expressions/Rename/Table/RenameTableBuilder.cs +++ b/src/Umbraco.Infrastructure/Migrations/Expressions/Rename/Table/RenameTableBuilder.cs @@ -1,7 +1,7 @@ -using Umbraco.Core.Migrations.Expressions.Common; -using Umbraco.Core.Migrations.Expressions.Rename.Expressions; +using Umbraco.Cms.Infrastructure.Migrations.Expressions.Common; +using Umbraco.Cms.Infrastructure.Migrations.Expressions.Rename.Expressions; -namespace Umbraco.Core.Migrations.Expressions.Rename.Table +namespace Umbraco.Cms.Infrastructure.Migrations.Expressions.Rename.Table { public class RenameTableBuilder : ExpressionBuilderBase, IRenameTableBuilder, IExecutableBuilder diff --git a/src/Umbraco.Infrastructure/Migrations/Expressions/Update/Expressions/UpdateDataExpression.cs b/src/Umbraco.Infrastructure/Migrations/Expressions/Update/Expressions/UpdateDataExpression.cs index 26d96bbdb9..f10737c884 100644 --- a/src/Umbraco.Infrastructure/Migrations/Expressions/Update/Expressions/UpdateDataExpression.cs +++ b/src/Umbraco.Infrastructure/Migrations/Expressions/Update/Expressions/UpdateDataExpression.cs @@ -1,8 +1,7 @@ using System.Collections.Generic; -using NPoco; using System.Linq; -namespace Umbraco.Core.Migrations.Expressions.Update.Expressions +namespace Umbraco.Cms.Infrastructure.Migrations.Expressions.Update.Expressions { public class UpdateDataExpression : MigrationExpressionBase { diff --git a/src/Umbraco.Infrastructure/Migrations/Expressions/Update/IUpdateBuilder.cs b/src/Umbraco.Infrastructure/Migrations/Expressions/Update/IUpdateBuilder.cs index 152dda4012..16b1badf48 100644 --- a/src/Umbraco.Infrastructure/Migrations/Expressions/Update/IUpdateBuilder.cs +++ b/src/Umbraco.Infrastructure/Migrations/Expressions/Update/IUpdateBuilder.cs @@ -1,4 +1,4 @@ -namespace Umbraco.Core.Migrations.Expressions.Update +namespace Umbraco.Cms.Infrastructure.Migrations.Expressions.Update { /// /// Builds an Update expression. diff --git a/src/Umbraco.Infrastructure/Migrations/Expressions/Update/IUpdateTableBuilder.cs b/src/Umbraco.Infrastructure/Migrations/Expressions/Update/IUpdateTableBuilder.cs index 023a62113c..abd5201cc5 100644 --- a/src/Umbraco.Infrastructure/Migrations/Expressions/Update/IUpdateTableBuilder.cs +++ b/src/Umbraco.Infrastructure/Migrations/Expressions/Update/IUpdateTableBuilder.cs @@ -1,4 +1,4 @@ -namespace Umbraco.Core.Migrations.Expressions.Update +namespace Umbraco.Cms.Infrastructure.Migrations.Expressions.Update { /// /// Builds an Update expression. diff --git a/src/Umbraco.Infrastructure/Migrations/Expressions/Update/IUpdateWhereBuilder.cs b/src/Umbraco.Infrastructure/Migrations/Expressions/Update/IUpdateWhereBuilder.cs index dc722f2f5a..378830cf0f 100644 --- a/src/Umbraco.Infrastructure/Migrations/Expressions/Update/IUpdateWhereBuilder.cs +++ b/src/Umbraco.Infrastructure/Migrations/Expressions/Update/IUpdateWhereBuilder.cs @@ -1,6 +1,6 @@ -using Umbraco.Core.Migrations.Expressions.Common; +using Umbraco.Cms.Infrastructure.Migrations.Expressions.Common; -namespace Umbraco.Core.Migrations.Expressions.Update +namespace Umbraco.Cms.Infrastructure.Migrations.Expressions.Update { /// /// Builds an Update expression. diff --git a/src/Umbraco.Infrastructure/Migrations/Expressions/Update/UpdateBuilder.cs b/src/Umbraco.Infrastructure/Migrations/Expressions/Update/UpdateBuilder.cs index 05546b5d37..e47e31168a 100644 --- a/src/Umbraco.Infrastructure/Migrations/Expressions/Update/UpdateBuilder.cs +++ b/src/Umbraco.Infrastructure/Migrations/Expressions/Update/UpdateBuilder.cs @@ -1,7 +1,6 @@ -using NPoco; -using Umbraco.Core.Migrations.Expressions.Update.Expressions; +using Umbraco.Cms.Infrastructure.Migrations.Expressions.Update.Expressions; -namespace Umbraco.Core.Migrations.Expressions.Update +namespace Umbraco.Cms.Infrastructure.Migrations.Expressions.Update { public class UpdateBuilder : IUpdateBuilder { diff --git a/src/Umbraco.Infrastructure/Migrations/Expressions/Update/UpdateDataBuilder.cs b/src/Umbraco.Infrastructure/Migrations/Expressions/Update/UpdateDataBuilder.cs index 7e327db2d7..47601b37b6 100644 --- a/src/Umbraco.Infrastructure/Migrations/Expressions/Update/UpdateDataBuilder.cs +++ b/src/Umbraco.Infrastructure/Migrations/Expressions/Update/UpdateDataBuilder.cs @@ -1,9 +1,9 @@ using System.Collections.Generic; using System.ComponentModel; -using Umbraco.Core.Migrations.Expressions.Common; -using Umbraco.Core.Migrations.Expressions.Update.Expressions; +using Umbraco.Cms.Infrastructure.Migrations.Expressions.Common; +using Umbraco.Cms.Infrastructure.Migrations.Expressions.Update.Expressions; -namespace Umbraco.Core.Migrations.Expressions.Update +namespace Umbraco.Cms.Infrastructure.Migrations.Expressions.Update { public class UpdateDataBuilder : ExpressionBuilderBase, IUpdateTableBuilder, IUpdateWhereBuilder, IExecutableBuilder diff --git a/src/Umbraco.Infrastructure/Migrations/IMigrationBuilder.cs b/src/Umbraco.Infrastructure/Migrations/IMigrationBuilder.cs index 3d78d825a7..325c8dd752 100644 --- a/src/Umbraco.Infrastructure/Migrations/IMigrationBuilder.cs +++ b/src/Umbraco.Infrastructure/Migrations/IMigrationBuilder.cs @@ -1,6 +1,7 @@ using System; +using Umbraco.Cms.Core.Migrations; -namespace Umbraco.Core.Migrations +namespace Umbraco.Cms.Infrastructure.Migrations { public interface IMigrationBuilder { diff --git a/src/Umbraco.Infrastructure/Migrations/IMigrationContext.cs b/src/Umbraco.Infrastructure/Migrations/IMigrationContext.cs index b276d5b171..016184d4cf 100644 --- a/src/Umbraco.Infrastructure/Migrations/IMigrationContext.cs +++ b/src/Umbraco.Infrastructure/Migrations/IMigrationContext.cs @@ -1,9 +1,8 @@ -using System; -using System.Collections.Generic; -using Microsoft.Extensions.Logging; -using Umbraco.Core.Persistence; +using Microsoft.Extensions.Logging; +using Umbraco.Cms.Core.Migrations; +using Umbraco.Cms.Infrastructure.Persistence; -namespace Umbraco.Core.Migrations +namespace Umbraco.Cms.Infrastructure.Migrations { /// /// Provides context to migrations. diff --git a/src/Umbraco.Infrastructure/Migrations/IMigrationExpression.cs b/src/Umbraco.Infrastructure/Migrations/IMigrationExpression.cs index c60126f63c..30d3385632 100644 --- a/src/Umbraco.Infrastructure/Migrations/IMigrationExpression.cs +++ b/src/Umbraco.Infrastructure/Migrations/IMigrationExpression.cs @@ -1,11 +1,10 @@ -namespace Umbraco.Core.Migrations +namespace Umbraco.Cms.Infrastructure.Migrations { /// /// Marker interface for migration expressions /// public interface IMigrationExpression { - string Process(IMigrationContext context); // TODO: remove that one? void Execute(); } } diff --git a/src/Umbraco.Infrastructure/Migrations/Install/DatabaseBuilder.cs b/src/Umbraco.Infrastructure/Migrations/Install/DatabaseBuilder.cs index 541896548c..e06818a589 100644 --- a/src/Umbraco.Infrastructure/Migrations/Install/DatabaseBuilder.cs +++ b/src/Umbraco.Infrastructure/Migrations/Install/DatabaseBuilder.cs @@ -1,20 +1,17 @@ using System; using System.IO; -using System.Linq; -using System.Xml.Linq; using Microsoft.Extensions.Logging; -using Microsoft.Extensions.Options; -using Umbraco.Core.Configuration; -using Umbraco.Core.Configuration.Models; -using Umbraco.Core.Hosting; -using Umbraco.Core.IO; -using Umbraco.Core.Migrations.Upgrade; -using Umbraco.Core.Persistence; -using Umbraco.Core.Persistence.Dtos; -using Umbraco.Core.Scoping; -using Umbraco.Core.Services; +using Umbraco.Cms.Core; +using Umbraco.Cms.Core.Configuration; +using Umbraco.Cms.Core.Hosting; +using Umbraco.Cms.Core.Scoping; +using Umbraco.Cms.Core.Services; +using Umbraco.Cms.Infrastructure.Migrations.Upgrade; +using Umbraco.Cms.Infrastructure.Persistence; +using Umbraco.Cms.Infrastructure.Persistence.Dtos; +using Umbraco.Extensions; -namespace Umbraco.Core.Migrations.Install +namespace Umbraco.Cms.Infrastructure.Migrations.Install { /// /// Supports building and configuring the database. diff --git a/src/Umbraco.Infrastructure/Migrations/Install/DatabaseDataCreator.cs b/src/Umbraco.Infrastructure/Migrations/Install/DatabaseDataCreator.cs index 1ade2f5153..72e8b864bf 100644 --- a/src/Umbraco.Infrastructure/Migrations/Install/DatabaseDataCreator.cs +++ b/src/Umbraco.Infrastructure/Migrations/Install/DatabaseDataCreator.cs @@ -1,13 +1,13 @@ using System; using Microsoft.Extensions.Logging; using NPoco; -using Umbraco.Core.Configuration; -using Umbraco.Core.Configuration.Models; -using Umbraco.Core.Migrations.Upgrade; -using Umbraco.Core.Models; -using Umbraco.Core.Persistence.Dtos; +using Umbraco.Cms.Core.Configuration; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Infrastructure.Migrations.Upgrade; +using Umbraco.Cms.Infrastructure.Persistence.Dtos; +using Umbraco.Extensions; -namespace Umbraco.Core.Migrations.Install +namespace Umbraco.Cms.Infrastructure.Migrations.Install { /// /// Creates the initial database data during install. @@ -34,46 +34,46 @@ namespace Umbraco.Core.Migrations.Install { _logger.LogInformation("Creating data in {TableName}", tableName); - if (tableName.Equals(Constants.DatabaseSchema.Tables.Node)) + if (tableName.Equals(Cms.Core.Constants.DatabaseSchema.Tables.Node)) CreateNodeData(); - if (tableName.Equals(Constants.DatabaseSchema.Tables.Lock)) + if (tableName.Equals(Cms.Core.Constants.DatabaseSchema.Tables.Lock)) CreateLockData(); - if (tableName.Equals(Constants.DatabaseSchema.Tables.ContentType)) + if (tableName.Equals(Cms.Core.Constants.DatabaseSchema.Tables.ContentType)) CreateContentTypeData(); - if (tableName.Equals(Constants.DatabaseSchema.Tables.User)) + if (tableName.Equals(Cms.Core.Constants.DatabaseSchema.Tables.User)) CreateUserData(); - if (tableName.Equals(Constants.DatabaseSchema.Tables.UserGroup)) + if (tableName.Equals(Cms.Core.Constants.DatabaseSchema.Tables.UserGroup)) CreateUserGroupData(); - if (tableName.Equals(Constants.DatabaseSchema.Tables.User2UserGroup)) + if (tableName.Equals(Cms.Core.Constants.DatabaseSchema.Tables.User2UserGroup)) CreateUser2UserGroupData(); - if (tableName.Equals(Constants.DatabaseSchema.Tables.UserGroup2App)) + if (tableName.Equals(Cms.Core.Constants.DatabaseSchema.Tables.UserGroup2App)) CreateUserGroup2AppData(); - if (tableName.Equals(Constants.DatabaseSchema.Tables.PropertyTypeGroup)) + if (tableName.Equals(Cms.Core.Constants.DatabaseSchema.Tables.PropertyTypeGroup)) CreatePropertyTypeGroupData(); - if (tableName.Equals(Constants.DatabaseSchema.Tables.PropertyType)) + if (tableName.Equals(Cms.Core.Constants.DatabaseSchema.Tables.PropertyType)) CreatePropertyTypeData(); - if (tableName.Equals(Constants.DatabaseSchema.Tables.Language)) + if (tableName.Equals(Cms.Core.Constants.DatabaseSchema.Tables.Language)) CreateLanguageData(); - if (tableName.Equals(Constants.DatabaseSchema.Tables.ContentChildType)) + if (tableName.Equals(Cms.Core.Constants.DatabaseSchema.Tables.ContentChildType)) CreateContentChildTypeData(); - if (tableName.Equals(Constants.DatabaseSchema.Tables.DataType)) + if (tableName.Equals(Cms.Core.Constants.DatabaseSchema.Tables.DataType)) CreateDataTypeData(); - if (tableName.Equals(Constants.DatabaseSchema.Tables.RelationType)) + if (tableName.Equals(Cms.Core.Constants.DatabaseSchema.Tables.RelationType)) CreateRelationTypeData(); - if (tableName.Equals(Constants.DatabaseSchema.Tables.KeyValue)) + if (tableName.Equals(Cms.Core.Constants.DatabaseSchema.Tables.KeyValue)) CreateKeyValueData(); _logger.LogInformation("Done creating table {TableName} data.", tableName); @@ -94,156 +94,156 @@ namespace Umbraco.Core.Migrations.Install SortOrder = sortOrder, UniqueId = new Guid(uniqueId), Text = text, - NodeObjectType = Constants.ObjectTypes.DataType, + NodeObjectType = Cms.Core.Constants.ObjectTypes.DataType, CreateDate = DateTime.Now }; - _database.Insert(Constants.DatabaseSchema.Tables.Node, "id", false, nodeDto); + _database.Insert(Cms.Core.Constants.DatabaseSchema.Tables.Node, "id", false, nodeDto); } - _database.Insert(Constants.DatabaseSchema.Tables.Node, "id", false, new NodeDto { NodeId = -1, Trashed = false, ParentId = -1, UserId = -1, Level = 0, Path = "-1", SortOrder = 0, UniqueId = new Guid("916724a5-173d-4619-b97e-b9de133dd6f5"), Text = "SYSTEM DATA: umbraco master root", NodeObjectType = Constants.ObjectTypes.SystemRoot, CreateDate = DateTime.Now }); - _database.Insert(Constants.DatabaseSchema.Tables.Node, "id", false, new NodeDto { NodeId = -20, Trashed = false, ParentId = -1, UserId = -1, Level = 0, Path = "-1,-20", SortOrder = 0, UniqueId = new Guid("0F582A79-1E41-4CF0-BFA0-76340651891A"), Text = "Recycle Bin", NodeObjectType = Constants.ObjectTypes.ContentRecycleBin, CreateDate = DateTime.Now }); - _database.Insert(Constants.DatabaseSchema.Tables.Node, "id", false, new NodeDto { NodeId = -21, Trashed = false, ParentId = -1, UserId = -1, Level = 0, Path = "-1,-21", SortOrder = 0, UniqueId = new Guid("BF7C7CBC-952F-4518-97A2-69E9C7B33842"), Text = "Recycle Bin", NodeObjectType = Constants.ObjectTypes.MediaRecycleBin, CreateDate = DateTime.Now }); - InsertDataTypeNodeDto(Constants.DataTypes.LabelString, 35, Constants.DataTypes.Guids.LabelString, "Label (string)"); - InsertDataTypeNodeDto(Constants.DataTypes.LabelInt, 36, Constants.DataTypes.Guids.LabelInt, "Label (integer)"); - InsertDataTypeNodeDto(Constants.DataTypes.LabelBigint, 36, Constants.DataTypes.Guids.LabelBigInt, "Label (bigint)"); - InsertDataTypeNodeDto(Constants.DataTypes.LabelDateTime, 37, Constants.DataTypes.Guids.LabelDateTime, "Label (datetime)"); - InsertDataTypeNodeDto(Constants.DataTypes.LabelTime, 38, Constants.DataTypes.Guids.LabelTime, "Label (time)"); - InsertDataTypeNodeDto(Constants.DataTypes.LabelDecimal, 39, Constants.DataTypes.Guids.LabelDecimal, "Label (decimal)"); - _database.Insert(Constants.DatabaseSchema.Tables.Node, "id", false, new NodeDto { NodeId = Constants.DataTypes.Upload, Trashed = false, ParentId = -1, UserId = -1, Level = 1, Path = $"-1,{Constants.DataTypes.Upload}", SortOrder = 34, UniqueId = Constants.DataTypes.Guids.UploadGuid, Text = "Upload", NodeObjectType = Constants.ObjectTypes.DataType, CreateDate = DateTime.Now }); - _database.Insert(Constants.DatabaseSchema.Tables.Node, "id", false, new NodeDto { NodeId = Constants.DataTypes.Textarea, Trashed = false, ParentId = -1, UserId = -1, Level = 1, Path = $"-1,{Constants.DataTypes.Textarea}", SortOrder = 33, UniqueId = Constants.DataTypes.Guids.TextareaGuid, Text = "Textarea", NodeObjectType = Constants.ObjectTypes.DataType, CreateDate = DateTime.Now }); - _database.Insert(Constants.DatabaseSchema.Tables.Node, "id", false, new NodeDto { NodeId = Constants.DataTypes.Textbox, Trashed = false, ParentId = -1, UserId = -1, Level = 1, Path = $"-1,{Constants.DataTypes.Textbox}", SortOrder = 32, UniqueId = Constants.DataTypes.Guids.TextstringGuid, Text = "Textstring", NodeObjectType = Constants.ObjectTypes.DataType, CreateDate = DateTime.Now }); - _database.Insert(Constants.DatabaseSchema.Tables.Node, "id", false, new NodeDto { NodeId = Constants.DataTypes.RichtextEditor, Trashed = false, ParentId = -1, UserId = -1, Level = 1, Path = $"-1,{Constants.DataTypes.RichtextEditor}", SortOrder = 4, UniqueId = Constants.DataTypes.Guids.RichtextEditorGuid, Text = "Richtext editor", NodeObjectType = Constants.ObjectTypes.DataType, CreateDate = DateTime.Now }); - _database.Insert(Constants.DatabaseSchema.Tables.Node, "id", false, new NodeDto { NodeId = -51, Trashed = false, ParentId = -1, UserId = -1, Level = 1, Path = "-1,-51", SortOrder = 2, UniqueId = Constants.DataTypes.Guids.NumericGuid, Text = "Numeric", NodeObjectType = Constants.ObjectTypes.DataType, CreateDate = DateTime.Now }); - _database.Insert(Constants.DatabaseSchema.Tables.Node, "id", false, new NodeDto { NodeId = Constants.DataTypes.Boolean, Trashed = false, ParentId = -1, UserId = -1, Level = 1, Path = $"-1,{Constants.DataTypes.Boolean}", SortOrder = 2, UniqueId = Constants.DataTypes.Guids.CheckboxGuid, Text = "True/false", NodeObjectType = Constants.ObjectTypes.DataType, CreateDate = DateTime.Now }); - _database.Insert(Constants.DatabaseSchema.Tables.Node, "id", false, new NodeDto { NodeId = -43, Trashed = false, ParentId = -1, UserId = -1, Level = 1, Path = "-1,-43", SortOrder = 2, UniqueId = Constants.DataTypes.Guids.CheckboxListGuid, Text = "Checkbox list", NodeObjectType = Constants.ObjectTypes.DataType, CreateDate = DateTime.Now }); - _database.Insert(Constants.DatabaseSchema.Tables.Node, "id", false, new NodeDto { NodeId = Constants.DataTypes.DropDownSingle, Trashed = false, ParentId = -1, UserId = -1, Level = 1, Path = $"-1,{Constants.DataTypes.DropDownSingle}", SortOrder = 2, UniqueId = Constants.DataTypes.Guids.DropdownGuid, Text = "Dropdown", NodeObjectType = Constants.ObjectTypes.DataType, CreateDate = DateTime.Now }); - _database.Insert(Constants.DatabaseSchema.Tables.Node, "id", false, new NodeDto { NodeId = -41, Trashed = false, ParentId = -1, UserId = -1, Level = 1, Path = "-1,-41", SortOrder = 2, UniqueId = Constants.DataTypes.Guids.DatePickerGuid, Text = "Date Picker", NodeObjectType = Constants.ObjectTypes.DataType, CreateDate = DateTime.Now }); - _database.Insert(Constants.DatabaseSchema.Tables.Node, "id", false, new NodeDto { NodeId = -40, Trashed = false, ParentId = -1, UserId = -1, Level = 1, Path = "-1,-40", SortOrder = 2, UniqueId = Constants.DataTypes.Guids.RadioboxGuid, Text = "Radiobox", NodeObjectType = Constants.ObjectTypes.DataType, CreateDate = DateTime.Now }); - _database.Insert(Constants.DatabaseSchema.Tables.Node, "id", false, new NodeDto { NodeId = Constants.DataTypes.DropDownMultiple, Trashed = false, ParentId = -1, UserId = -1, Level = 1, Path = $"-1,{Constants.DataTypes.DropDownMultiple}", SortOrder = 2, UniqueId = Constants.DataTypes.Guids.DropdownMultipleGuid, Text = "Dropdown multiple", NodeObjectType = Constants.ObjectTypes.DataType, CreateDate = DateTime.Now }); - _database.Insert(Constants.DatabaseSchema.Tables.Node, "id", false, new NodeDto { NodeId = -37, Trashed = false, ParentId = -1, UserId = -1, Level = 1, Path = "-1,-37", SortOrder = 2, UniqueId = Constants.DataTypes.Guids.ApprovedColorGuid, Text = "Approved Color", NodeObjectType = Constants.ObjectTypes.DataType, CreateDate = DateTime.Now }); - _database.Insert(Constants.DatabaseSchema.Tables.Node, "id", false, new NodeDto { NodeId = Constants.DataTypes.DateTime, Trashed = false, ParentId = -1, UserId = -1, Level = 1, Path = $"-1,{Constants.DataTypes.DateTime}", SortOrder = 2, UniqueId = Constants.DataTypes.Guids.DatePickerWithTimeGuid, Text = "Date Picker with time", NodeObjectType = Constants.ObjectTypes.DataType, CreateDate = DateTime.Now }); - _database.Insert(Constants.DatabaseSchema.Tables.Node, "id", false, new NodeDto { NodeId = Constants.DataTypes.DefaultContentListView, Trashed = false, ParentId = -1, UserId = -1, Level = 1, Path = $"-1,{Constants.DataTypes.DefaultContentListView}", SortOrder = 2, UniqueId = Constants.DataTypes.Guids.ListViewContentGuid, Text = Constants.Conventions.DataTypes.ListViewPrefix + "Content", NodeObjectType = Constants.ObjectTypes.DataType, CreateDate = DateTime.Now }); - _database.Insert(Constants.DatabaseSchema.Tables.Node, "id", false, new NodeDto { NodeId = Constants.DataTypes.DefaultMediaListView, Trashed = false, ParentId = -1, UserId = -1, Level = 1, Path = $"-1,{Constants.DataTypes.DefaultMediaListView}", SortOrder = 2, UniqueId = Constants.DataTypes.Guids.ListViewMediaGuid, Text = Constants.Conventions.DataTypes.ListViewPrefix + "Media", NodeObjectType = Constants.ObjectTypes.DataType, CreateDate = DateTime.Now }); - _database.Insert(Constants.DatabaseSchema.Tables.Node, "id", false, new NodeDto { NodeId = Constants.DataTypes.DefaultMembersListView, Trashed = false, ParentId = -1, UserId = -1, Level = 1, Path = $"-1,{Constants.DataTypes.DefaultMembersListView}", SortOrder = 2, UniqueId = Constants.DataTypes.Guids.ListViewMembersGuid, Text = Constants.Conventions.DataTypes.ListViewPrefix + "Members", NodeObjectType = Constants.ObjectTypes.DataType, CreateDate = DateTime.Now }); - _database.Insert(Constants.DatabaseSchema.Tables.Node, "id", false, new NodeDto { NodeId = 1031, Trashed = false, ParentId = -1, UserId = -1, Level = 1, Path = "-1,1031", SortOrder = 2, UniqueId = new Guid("f38bd2d7-65d0-48e6-95dc-87ce06ec2d3d"), Text = Constants.Conventions.MediaTypes.Folder, NodeObjectType = Constants.ObjectTypes.MediaType, CreateDate = DateTime.Now }); - _database.Insert(Constants.DatabaseSchema.Tables.Node, "id", false, new NodeDto { NodeId = 1032, Trashed = false, ParentId = -1, UserId = -1, Level = 1, Path = "-1,1032", SortOrder = 2, UniqueId = new Guid("cc07b313-0843-4aa8-bbda-871c8da728c8"), Text = Constants.Conventions.MediaTypes.Image, NodeObjectType = Constants.ObjectTypes.MediaType, CreateDate = DateTime.Now }); - _database.Insert(Constants.DatabaseSchema.Tables.Node, "id", false, new NodeDto { NodeId = 1033, Trashed = false, ParentId = -1, UserId = -1, Level = 1, Path = "-1,1033", SortOrder = 2, UniqueId = new Guid("4c52d8ab-54e6-40cd-999c-7a5f24903e4d"), Text = Constants.Conventions.MediaTypes.File, NodeObjectType = Constants.ObjectTypes.MediaType, CreateDate = DateTime.Now }); - _database.Insert(Constants.DatabaseSchema.Tables.Node, "id", false, new NodeDto { NodeId = Constants.DataTypes.Tags, Trashed = false, ParentId = -1, UserId = -1, Level = 1, Path = $"-1,{Constants.DataTypes.Tags}", SortOrder = 2, UniqueId = new Guid("b6b73142-b9c1-4bf8-a16d-e1c23320b549"), Text = "Tags", NodeObjectType = Constants.ObjectTypes.DataType, CreateDate = DateTime.Now }); - _database.Insert(Constants.DatabaseSchema.Tables.Node, "id", false, new NodeDto { NodeId = Constants.DataTypes.ImageCropper, Trashed = false, ParentId = -1, UserId = -1, Level = 1, Path = $"-1,{Constants.DataTypes.ImageCropper}", SortOrder = 2, UniqueId = new Guid("1df9f033-e6d4-451f-b8d2-e0cbc50a836f"), Text = "Image Cropper", NodeObjectType = Constants.ObjectTypes.DataType, CreateDate = DateTime.Now }); - _database.Insert(Constants.DatabaseSchema.Tables.Node, "id", false, new NodeDto { NodeId = 1044, Trashed = false, ParentId = -1, UserId = -1, Level = 1, Path = "-1,1044", SortOrder = 0, UniqueId = new Guid("d59be02f-1df9-4228-aa1e-01917d806cda"), Text = Constants.Conventions.MemberTypes.DefaultAlias, NodeObjectType = Constants.ObjectTypes.MemberType, CreateDate = DateTime.Now }); + _database.Insert(Cms.Core.Constants.DatabaseSchema.Tables.Node, "id", false, new NodeDto { NodeId = -1, Trashed = false, ParentId = -1, UserId = -1, Level = 0, Path = "-1", SortOrder = 0, UniqueId = new Guid("916724a5-173d-4619-b97e-b9de133dd6f5"), Text = "SYSTEM DATA: umbraco master root", NodeObjectType = Cms.Core.Constants.ObjectTypes.SystemRoot, CreateDate = DateTime.Now }); + _database.Insert(Cms.Core.Constants.DatabaseSchema.Tables.Node, "id", false, new NodeDto { NodeId = -20, Trashed = false, ParentId = -1, UserId = -1, Level = 0, Path = "-1,-20", SortOrder = 0, UniqueId = new Guid("0F582A79-1E41-4CF0-BFA0-76340651891A"), Text = "Recycle Bin", NodeObjectType = Cms.Core.Constants.ObjectTypes.ContentRecycleBin, CreateDate = DateTime.Now }); + _database.Insert(Cms.Core.Constants.DatabaseSchema.Tables.Node, "id", false, new NodeDto { NodeId = -21, Trashed = false, ParentId = -1, UserId = -1, Level = 0, Path = "-1,-21", SortOrder = 0, UniqueId = new Guid("BF7C7CBC-952F-4518-97A2-69E9C7B33842"), Text = "Recycle Bin", NodeObjectType = Cms.Core.Constants.ObjectTypes.MediaRecycleBin, CreateDate = DateTime.Now }); + InsertDataTypeNodeDto(Cms.Core.Constants.DataTypes.LabelString, 35, Cms.Core.Constants.DataTypes.Guids.LabelString, "Label (string)"); + InsertDataTypeNodeDto(Cms.Core.Constants.DataTypes.LabelInt, 36, Cms.Core.Constants.DataTypes.Guids.LabelInt, "Label (integer)"); + InsertDataTypeNodeDto(Cms.Core.Constants.DataTypes.LabelBigint, 36, Cms.Core.Constants.DataTypes.Guids.LabelBigInt, "Label (bigint)"); + InsertDataTypeNodeDto(Cms.Core.Constants.DataTypes.LabelDateTime, 37, Cms.Core.Constants.DataTypes.Guids.LabelDateTime, "Label (datetime)"); + InsertDataTypeNodeDto(Cms.Core.Constants.DataTypes.LabelTime, 38, Cms.Core.Constants.DataTypes.Guids.LabelTime, "Label (time)"); + InsertDataTypeNodeDto(Cms.Core.Constants.DataTypes.LabelDecimal, 39, Cms.Core.Constants.DataTypes.Guids.LabelDecimal, "Label (decimal)"); + _database.Insert(Cms.Core.Constants.DatabaseSchema.Tables.Node, "id", false, new NodeDto { NodeId = Cms.Core.Constants.DataTypes.Upload, Trashed = false, ParentId = -1, UserId = -1, Level = 1, Path = $"-1,{Cms.Core.Constants.DataTypes.Upload}", SortOrder = 34, UniqueId = Cms.Core.Constants.DataTypes.Guids.UploadGuid, Text = "Upload", NodeObjectType = Cms.Core.Constants.ObjectTypes.DataType, CreateDate = DateTime.Now }); + _database.Insert(Cms.Core.Constants.DatabaseSchema.Tables.Node, "id", false, new NodeDto { NodeId = Cms.Core.Constants.DataTypes.Textarea, Trashed = false, ParentId = -1, UserId = -1, Level = 1, Path = $"-1,{Cms.Core.Constants.DataTypes.Textarea}", SortOrder = 33, UniqueId = Cms.Core.Constants.DataTypes.Guids.TextareaGuid, Text = "Textarea", NodeObjectType = Cms.Core.Constants.ObjectTypes.DataType, CreateDate = DateTime.Now }); + _database.Insert(Cms.Core.Constants.DatabaseSchema.Tables.Node, "id", false, new NodeDto { NodeId = Cms.Core.Constants.DataTypes.Textbox, Trashed = false, ParentId = -1, UserId = -1, Level = 1, Path = $"-1,{Cms.Core.Constants.DataTypes.Textbox}", SortOrder = 32, UniqueId = Cms.Core.Constants.DataTypes.Guids.TextstringGuid, Text = "Textstring", NodeObjectType = Cms.Core.Constants.ObjectTypes.DataType, CreateDate = DateTime.Now }); + _database.Insert(Cms.Core.Constants.DatabaseSchema.Tables.Node, "id", false, new NodeDto { NodeId = Cms.Core.Constants.DataTypes.RichtextEditor, Trashed = false, ParentId = -1, UserId = -1, Level = 1, Path = $"-1,{Cms.Core.Constants.DataTypes.RichtextEditor}", SortOrder = 4, UniqueId = Cms.Core.Constants.DataTypes.Guids.RichtextEditorGuid, Text = "Richtext editor", NodeObjectType = Cms.Core.Constants.ObjectTypes.DataType, CreateDate = DateTime.Now }); + _database.Insert(Cms.Core.Constants.DatabaseSchema.Tables.Node, "id", false, new NodeDto { NodeId = -51, Trashed = false, ParentId = -1, UserId = -1, Level = 1, Path = "-1,-51", SortOrder = 2, UniqueId = Cms.Core.Constants.DataTypes.Guids.NumericGuid, Text = "Numeric", NodeObjectType = Cms.Core.Constants.ObjectTypes.DataType, CreateDate = DateTime.Now }); + _database.Insert(Cms.Core.Constants.DatabaseSchema.Tables.Node, "id", false, new NodeDto { NodeId = Cms.Core.Constants.DataTypes.Boolean, Trashed = false, ParentId = -1, UserId = -1, Level = 1, Path = $"-1,{Cms.Core.Constants.DataTypes.Boolean}", SortOrder = 2, UniqueId = Cms.Core.Constants.DataTypes.Guids.CheckboxGuid, Text = "True/false", NodeObjectType = Cms.Core.Constants.ObjectTypes.DataType, CreateDate = DateTime.Now }); + _database.Insert(Cms.Core.Constants.DatabaseSchema.Tables.Node, "id", false, new NodeDto { NodeId = -43, Trashed = false, ParentId = -1, UserId = -1, Level = 1, Path = "-1,-43", SortOrder = 2, UniqueId = Cms.Core.Constants.DataTypes.Guids.CheckboxListGuid, Text = "Checkbox list", NodeObjectType = Cms.Core.Constants.ObjectTypes.DataType, CreateDate = DateTime.Now }); + _database.Insert(Cms.Core.Constants.DatabaseSchema.Tables.Node, "id", false, new NodeDto { NodeId = Cms.Core.Constants.DataTypes.DropDownSingle, Trashed = false, ParentId = -1, UserId = -1, Level = 1, Path = $"-1,{Cms.Core.Constants.DataTypes.DropDownSingle}", SortOrder = 2, UniqueId = Cms.Core.Constants.DataTypes.Guids.DropdownGuid, Text = "Dropdown", NodeObjectType = Cms.Core.Constants.ObjectTypes.DataType, CreateDate = DateTime.Now }); + _database.Insert(Cms.Core.Constants.DatabaseSchema.Tables.Node, "id", false, new NodeDto { NodeId = -41, Trashed = false, ParentId = -1, UserId = -1, Level = 1, Path = "-1,-41", SortOrder = 2, UniqueId = Cms.Core.Constants.DataTypes.Guids.DatePickerGuid, Text = "Date Picker", NodeObjectType = Cms.Core.Constants.ObjectTypes.DataType, CreateDate = DateTime.Now }); + _database.Insert(Cms.Core.Constants.DatabaseSchema.Tables.Node, "id", false, new NodeDto { NodeId = -40, Trashed = false, ParentId = -1, UserId = -1, Level = 1, Path = "-1,-40", SortOrder = 2, UniqueId = Cms.Core.Constants.DataTypes.Guids.RadioboxGuid, Text = "Radiobox", NodeObjectType = Cms.Core.Constants.ObjectTypes.DataType, CreateDate = DateTime.Now }); + _database.Insert(Cms.Core.Constants.DatabaseSchema.Tables.Node, "id", false, new NodeDto { NodeId = Cms.Core.Constants.DataTypes.DropDownMultiple, Trashed = false, ParentId = -1, UserId = -1, Level = 1, Path = $"-1,{Cms.Core.Constants.DataTypes.DropDownMultiple}", SortOrder = 2, UniqueId = Cms.Core.Constants.DataTypes.Guids.DropdownMultipleGuid, Text = "Dropdown multiple", NodeObjectType = Cms.Core.Constants.ObjectTypes.DataType, CreateDate = DateTime.Now }); + _database.Insert(Cms.Core.Constants.DatabaseSchema.Tables.Node, "id", false, new NodeDto { NodeId = -37, Trashed = false, ParentId = -1, UserId = -1, Level = 1, Path = "-1,-37", SortOrder = 2, UniqueId = Cms.Core.Constants.DataTypes.Guids.ApprovedColorGuid, Text = "Approved Color", NodeObjectType = Cms.Core.Constants.ObjectTypes.DataType, CreateDate = DateTime.Now }); + _database.Insert(Cms.Core.Constants.DatabaseSchema.Tables.Node, "id", false, new NodeDto { NodeId = Cms.Core.Constants.DataTypes.DateTime, Trashed = false, ParentId = -1, UserId = -1, Level = 1, Path = $"-1,{Cms.Core.Constants.DataTypes.DateTime}", SortOrder = 2, UniqueId = Cms.Core.Constants.DataTypes.Guids.DatePickerWithTimeGuid, Text = "Date Picker with time", NodeObjectType = Cms.Core.Constants.ObjectTypes.DataType, CreateDate = DateTime.Now }); + _database.Insert(Cms.Core.Constants.DatabaseSchema.Tables.Node, "id", false, new NodeDto { NodeId = Cms.Core.Constants.DataTypes.DefaultContentListView, Trashed = false, ParentId = -1, UserId = -1, Level = 1, Path = $"-1,{Cms.Core.Constants.DataTypes.DefaultContentListView}", SortOrder = 2, UniqueId = Cms.Core.Constants.DataTypes.Guids.ListViewContentGuid, Text = Cms.Core.Constants.Conventions.DataTypes.ListViewPrefix + "Content", NodeObjectType = Cms.Core.Constants.ObjectTypes.DataType, CreateDate = DateTime.Now }); + _database.Insert(Cms.Core.Constants.DatabaseSchema.Tables.Node, "id", false, new NodeDto { NodeId = Cms.Core.Constants.DataTypes.DefaultMediaListView, Trashed = false, ParentId = -1, UserId = -1, Level = 1, Path = $"-1,{Cms.Core.Constants.DataTypes.DefaultMediaListView}", SortOrder = 2, UniqueId = Cms.Core.Constants.DataTypes.Guids.ListViewMediaGuid, Text = Cms.Core.Constants.Conventions.DataTypes.ListViewPrefix + "Media", NodeObjectType = Cms.Core.Constants.ObjectTypes.DataType, CreateDate = DateTime.Now }); + _database.Insert(Cms.Core.Constants.DatabaseSchema.Tables.Node, "id", false, new NodeDto { NodeId = Cms.Core.Constants.DataTypes.DefaultMembersListView, Trashed = false, ParentId = -1, UserId = -1, Level = 1, Path = $"-1,{Cms.Core.Constants.DataTypes.DefaultMembersListView}", SortOrder = 2, UniqueId = Cms.Core.Constants.DataTypes.Guids.ListViewMembersGuid, Text = Cms.Core.Constants.Conventions.DataTypes.ListViewPrefix + "Members", NodeObjectType = Cms.Core.Constants.ObjectTypes.DataType, CreateDate = DateTime.Now }); + _database.Insert(Cms.Core.Constants.DatabaseSchema.Tables.Node, "id", false, new NodeDto { NodeId = 1031, Trashed = false, ParentId = -1, UserId = -1, Level = 1, Path = "-1,1031", SortOrder = 2, UniqueId = new Guid("f38bd2d7-65d0-48e6-95dc-87ce06ec2d3d"), Text = Cms.Core.Constants.Conventions.MediaTypes.Folder, NodeObjectType = Cms.Core.Constants.ObjectTypes.MediaType, CreateDate = DateTime.Now }); + _database.Insert(Cms.Core.Constants.DatabaseSchema.Tables.Node, "id", false, new NodeDto { NodeId = 1032, Trashed = false, ParentId = -1, UserId = -1, Level = 1, Path = "-1,1032", SortOrder = 2, UniqueId = new Guid("cc07b313-0843-4aa8-bbda-871c8da728c8"), Text = Cms.Core.Constants.Conventions.MediaTypes.Image, NodeObjectType = Cms.Core.Constants.ObjectTypes.MediaType, CreateDate = DateTime.Now }); + _database.Insert(Cms.Core.Constants.DatabaseSchema.Tables.Node, "id", false, new NodeDto { NodeId = 1033, Trashed = false, ParentId = -1, UserId = -1, Level = 1, Path = "-1,1033", SortOrder = 2, UniqueId = new Guid("4c52d8ab-54e6-40cd-999c-7a5f24903e4d"), Text = Cms.Core.Constants.Conventions.MediaTypes.File, NodeObjectType = Cms.Core.Constants.ObjectTypes.MediaType, CreateDate = DateTime.Now }); + _database.Insert(Cms.Core.Constants.DatabaseSchema.Tables.Node, "id", false, new NodeDto { NodeId = Cms.Core.Constants.DataTypes.Tags, Trashed = false, ParentId = -1, UserId = -1, Level = 1, Path = $"-1,{Cms.Core.Constants.DataTypes.Tags}", SortOrder = 2, UniqueId = new Guid("b6b73142-b9c1-4bf8-a16d-e1c23320b549"), Text = "Tags", NodeObjectType = Cms.Core.Constants.ObjectTypes.DataType, CreateDate = DateTime.Now }); + _database.Insert(Cms.Core.Constants.DatabaseSchema.Tables.Node, "id", false, new NodeDto { NodeId = Cms.Core.Constants.DataTypes.ImageCropper, Trashed = false, ParentId = -1, UserId = -1, Level = 1, Path = $"-1,{Cms.Core.Constants.DataTypes.ImageCropper}", SortOrder = 2, UniqueId = new Guid("1df9f033-e6d4-451f-b8d2-e0cbc50a836f"), Text = "Image Cropper", NodeObjectType = Cms.Core.Constants.ObjectTypes.DataType, CreateDate = DateTime.Now }); + _database.Insert(Cms.Core.Constants.DatabaseSchema.Tables.Node, "id", false, new NodeDto { NodeId = 1044, Trashed = false, ParentId = -1, UserId = -1, Level = 1, Path = "-1,1044", SortOrder = 0, UniqueId = new Guid("d59be02f-1df9-4228-aa1e-01917d806cda"), Text = Cms.Core.Constants.Conventions.MemberTypes.DefaultAlias, NodeObjectType = Cms.Core.Constants.ObjectTypes.MemberType, CreateDate = DateTime.Now }); //New UDI pickers with newer Ids - _database.Insert(Constants.DatabaseSchema.Tables.Node, "id", false, new NodeDto { NodeId = 1046, Trashed = false, ParentId = -1, UserId = -1, Level = 1, Path = "-1,1046", SortOrder = 2, UniqueId = new Guid("FD1E0DA5-5606-4862-B679-5D0CF3A52A59"), Text = "Content Picker", NodeObjectType = Constants.ObjectTypes.DataType, CreateDate = DateTime.Now }); - _database.Insert(Constants.DatabaseSchema.Tables.Node, "id", false, new NodeDto { NodeId = 1047, Trashed = false, ParentId = -1, UserId = -1, Level = 1, Path = "-1,1047", SortOrder = 2, UniqueId = new Guid("1EA2E01F-EBD8-4CE1-8D71-6B1149E63548"), Text = "Member Picker", NodeObjectType = Constants.ObjectTypes.DataType, CreateDate = DateTime.Now }); - _database.Insert(Constants.DatabaseSchema.Tables.Node, "id", false, new NodeDto { NodeId = 1048, Trashed = false, ParentId = -1, UserId = -1, Level = 1, Path = "-1,1048", SortOrder = 2, UniqueId = new Guid("135D60E0-64D9-49ED-AB08-893C9BA44AE5"), Text = "Media Picker", NodeObjectType = Constants.ObjectTypes.DataType, CreateDate = DateTime.Now }); - _database.Insert(Constants.DatabaseSchema.Tables.Node, "id", false, new NodeDto { NodeId = 1049, Trashed = false, ParentId = -1, UserId = -1, Level = 1, Path = "-1,1049", SortOrder = 2, UniqueId = new Guid("9DBBCBBB-2327-434A-B355-AF1B84E5010A"), Text = "Multiple Media Picker", NodeObjectType = Constants.ObjectTypes.DataType, CreateDate = DateTime.Now }); - _database.Insert(Constants.DatabaseSchema.Tables.Node, "id", false, new NodeDto { NodeId = 1050, Trashed = false, ParentId = -1, UserId = -1, Level = 1, Path = "-1,1050", SortOrder = 2, UniqueId = new Guid("B4E3535A-1753-47E2-8568-602CF8CFEE6F"), Text = "Multi URL Picker", NodeObjectType = Constants.ObjectTypes.DataType, CreateDate = DateTime.Now }); + _database.Insert(Cms.Core.Constants.DatabaseSchema.Tables.Node, "id", false, new NodeDto { NodeId = 1046, Trashed = false, ParentId = -1, UserId = -1, Level = 1, Path = "-1,1046", SortOrder = 2, UniqueId = new Guid("FD1E0DA5-5606-4862-B679-5D0CF3A52A59"), Text = "Content Picker", NodeObjectType = Cms.Core.Constants.ObjectTypes.DataType, CreateDate = DateTime.Now }); + _database.Insert(Cms.Core.Constants.DatabaseSchema.Tables.Node, "id", false, new NodeDto { NodeId = 1047, Trashed = false, ParentId = -1, UserId = -1, Level = 1, Path = "-1,1047", SortOrder = 2, UniqueId = new Guid("1EA2E01F-EBD8-4CE1-8D71-6B1149E63548"), Text = "Member Picker", NodeObjectType = Cms.Core.Constants.ObjectTypes.DataType, CreateDate = DateTime.Now }); + _database.Insert(Cms.Core.Constants.DatabaseSchema.Tables.Node, "id", false, new NodeDto { NodeId = 1048, Trashed = false, ParentId = -1, UserId = -1, Level = 1, Path = "-1,1048", SortOrder = 2, UniqueId = new Guid("135D60E0-64D9-49ED-AB08-893C9BA44AE5"), Text = "Media Picker", NodeObjectType = Cms.Core.Constants.ObjectTypes.DataType, CreateDate = DateTime.Now }); + _database.Insert(Cms.Core.Constants.DatabaseSchema.Tables.Node, "id", false, new NodeDto { NodeId = 1049, Trashed = false, ParentId = -1, UserId = -1, Level = 1, Path = "-1,1049", SortOrder = 2, UniqueId = new Guid("9DBBCBBB-2327-434A-B355-AF1B84E5010A"), Text = "Multiple Media Picker", NodeObjectType = Cms.Core.Constants.ObjectTypes.DataType, CreateDate = DateTime.Now }); + _database.Insert(Cms.Core.Constants.DatabaseSchema.Tables.Node, "id", false, new NodeDto { NodeId = 1050, Trashed = false, ParentId = -1, UserId = -1, Level = 1, Path = "-1,1050", SortOrder = 2, UniqueId = new Guid("B4E3535A-1753-47E2-8568-602CF8CFEE6F"), Text = "Multi URL Picker", NodeObjectType = Cms.Core.Constants.ObjectTypes.DataType, CreateDate = DateTime.Now }); } private void CreateLockData() { // all lock objects - _database.Insert(Constants.DatabaseSchema.Tables.Lock, "id", false, new LockDto { Id = Constants.Locks.Servers, Name = "Servers" }); - _database.Insert(Constants.DatabaseSchema.Tables.Lock, "id", false, new LockDto { Id = Constants.Locks.ContentTypes, Name = "ContentTypes" }); - _database.Insert(Constants.DatabaseSchema.Tables.Lock, "id", false, new LockDto { Id = Constants.Locks.ContentTree, Name = "ContentTree" }); - _database.Insert(Constants.DatabaseSchema.Tables.Lock, "id", false, new LockDto { Id = Constants.Locks.MediaTypes, Name = "MediaTypes" }); - _database.Insert(Constants.DatabaseSchema.Tables.Lock, "id", false, new LockDto { Id = Constants.Locks.MediaTree, Name = "MediaTree" }); - _database.Insert(Constants.DatabaseSchema.Tables.Lock, "id", false, new LockDto { Id = Constants.Locks.MemberTypes, Name = "MemberTypes" }); - _database.Insert(Constants.DatabaseSchema.Tables.Lock, "id", false, new LockDto { Id = Constants.Locks.MemberTree, Name = "MemberTree" }); - _database.Insert(Constants.DatabaseSchema.Tables.Lock, "id", false, new LockDto { Id = Constants.Locks.Domains, Name = "Domains" }); - _database.Insert(Constants.DatabaseSchema.Tables.Lock, "id", false, new LockDto { Id = Constants.Locks.KeyValues, Name = "KeyValues" }); - _database.Insert(Constants.DatabaseSchema.Tables.Lock, "id", false, new LockDto { Id = Constants.Locks.Languages, Name = "Languages" }); + _database.Insert(Cms.Core.Constants.DatabaseSchema.Tables.Lock, "id", false, new LockDto { Id = Cms.Core.Constants.Locks.Servers, Name = "Servers" }); + _database.Insert(Cms.Core.Constants.DatabaseSchema.Tables.Lock, "id", false, new LockDto { Id = Cms.Core.Constants.Locks.ContentTypes, Name = "ContentTypes" }); + _database.Insert(Cms.Core.Constants.DatabaseSchema.Tables.Lock, "id", false, new LockDto { Id = Cms.Core.Constants.Locks.ContentTree, Name = "ContentTree" }); + _database.Insert(Cms.Core.Constants.DatabaseSchema.Tables.Lock, "id", false, new LockDto { Id = Cms.Core.Constants.Locks.MediaTypes, Name = "MediaTypes" }); + _database.Insert(Cms.Core.Constants.DatabaseSchema.Tables.Lock, "id", false, new LockDto { Id = Cms.Core.Constants.Locks.MediaTree, Name = "MediaTree" }); + _database.Insert(Cms.Core.Constants.DatabaseSchema.Tables.Lock, "id", false, new LockDto { Id = Cms.Core.Constants.Locks.MemberTypes, Name = "MemberTypes" }); + _database.Insert(Cms.Core.Constants.DatabaseSchema.Tables.Lock, "id", false, new LockDto { Id = Cms.Core.Constants.Locks.MemberTree, Name = "MemberTree" }); + _database.Insert(Cms.Core.Constants.DatabaseSchema.Tables.Lock, "id", false, new LockDto { Id = Cms.Core.Constants.Locks.Domains, Name = "Domains" }); + _database.Insert(Cms.Core.Constants.DatabaseSchema.Tables.Lock, "id", false, new LockDto { Id = Cms.Core.Constants.Locks.KeyValues, Name = "KeyValues" }); + _database.Insert(Cms.Core.Constants.DatabaseSchema.Tables.Lock, "id", false, new LockDto { Id = Cms.Core.Constants.Locks.Languages, Name = "Languages" }); - _database.Insert(Constants.DatabaseSchema.Tables.Lock, "id", false, new LockDto { Id = Constants.Locks.MainDom, Name = "MainDom" }); + _database.Insert(Cms.Core.Constants.DatabaseSchema.Tables.Lock, "id", false, new LockDto { Id = Cms.Core.Constants.Locks.MainDom, Name = "MainDom" }); } private void CreateContentTypeData() { - _database.Insert(Constants.DatabaseSchema.Tables.ContentType, "pk", false, new ContentTypeDto { PrimaryKey = 532, NodeId = 1031, Alias = Constants.Conventions.MediaTypes.Folder, Icon = Constants.Icons.MediaFolder, Thumbnail = Constants.Icons.MediaFolder, IsContainer = false, AllowAtRoot = true, Variations = (byte) ContentVariation.Nothing }); - _database.Insert(Constants.DatabaseSchema.Tables.ContentType, "pk", false, new ContentTypeDto { PrimaryKey = 533, NodeId = 1032, Alias = Constants.Conventions.MediaTypes.Image, Icon = Constants.Icons.MediaImage, Thumbnail = Constants.Icons.MediaImage, AllowAtRoot = true, Variations = (byte) ContentVariation.Nothing }); - _database.Insert(Constants.DatabaseSchema.Tables.ContentType, "pk", false, new ContentTypeDto { PrimaryKey = 534, NodeId = 1033, Alias = Constants.Conventions.MediaTypes.File, Icon = Constants.Icons.MediaFile, Thumbnail = Constants.Icons.MediaFile, AllowAtRoot = true, Variations = (byte) ContentVariation.Nothing }); - _database.Insert(Constants.DatabaseSchema.Tables.ContentType, "pk", false, new ContentTypeDto { PrimaryKey = 531, NodeId = 1044, Alias = Constants.Conventions.MemberTypes.DefaultAlias, Icon = Constants.Icons.Member, Thumbnail = Constants.Icons.Member, Variations = (byte) ContentVariation.Nothing }); + _database.Insert(Cms.Core.Constants.DatabaseSchema.Tables.ContentType, "pk", false, new ContentTypeDto { PrimaryKey = 532, NodeId = 1031, Alias = Cms.Core.Constants.Conventions.MediaTypes.Folder, Icon = Cms.Core.Constants.Icons.MediaFolder, Thumbnail = Cms.Core.Constants.Icons.MediaFolder, IsContainer = false, AllowAtRoot = true, Variations = (byte) ContentVariation.Nothing }); + _database.Insert(Cms.Core.Constants.DatabaseSchema.Tables.ContentType, "pk", false, new ContentTypeDto { PrimaryKey = 533, NodeId = 1032, Alias = Cms.Core.Constants.Conventions.MediaTypes.Image, Icon = Cms.Core.Constants.Icons.MediaImage, Thumbnail = Cms.Core.Constants.Icons.MediaImage, AllowAtRoot = true, Variations = (byte) ContentVariation.Nothing }); + _database.Insert(Cms.Core.Constants.DatabaseSchema.Tables.ContentType, "pk", false, new ContentTypeDto { PrimaryKey = 534, NodeId = 1033, Alias = Cms.Core.Constants.Conventions.MediaTypes.File, Icon = Cms.Core.Constants.Icons.MediaFile, Thumbnail = Cms.Core.Constants.Icons.MediaFile, AllowAtRoot = true, Variations = (byte) ContentVariation.Nothing }); + _database.Insert(Cms.Core.Constants.DatabaseSchema.Tables.ContentType, "pk", false, new ContentTypeDto { PrimaryKey = 531, NodeId = 1044, Alias = Cms.Core.Constants.Conventions.MemberTypes.DefaultAlias, Icon = Cms.Core.Constants.Icons.Member, Thumbnail = Cms.Core.Constants.Icons.Member, Variations = (byte) ContentVariation.Nothing }); } private void CreateUserData() { - _database.Insert(Constants.DatabaseSchema.Tables.User, "id", false, new UserDto { Id = Constants.Security.SuperUserId, Disabled = false, NoConsole = false, UserName = "Administrator", Login = "admin", Password = "default", Email = "", UserLanguage = "en-US", CreateDate = DateTime.Now, UpdateDate = DateTime.Now }); + _database.Insert(Cms.Core.Constants.DatabaseSchema.Tables.User, "id", false, new UserDto { Id = Cms.Core.Constants.Security.SuperUserId, Disabled = false, NoConsole = false, UserName = "Administrator", Login = "admin", Password = "default", Email = "", UserLanguage = "en-US", CreateDate = DateTime.Now, UpdateDate = DateTime.Now }); } private void CreateUserGroupData() { - _database.Insert(Constants.DatabaseSchema.Tables.UserGroup, "id", false, new UserGroupDto { Id = 1, StartMediaId = -1, StartContentId = -1, Alias = Constants.Security.AdminGroupAlias, Name = "Administrators", DefaultPermissions = "CADMOSKTPIURZ:5F7ï", CreateDate = DateTime.Now, UpdateDate = DateTime.Now, Icon = "icon-medal" }); - _database.Insert(Constants.DatabaseSchema.Tables.UserGroup, "id", false, new UserGroupDto { Id = 2, StartMediaId = -1, StartContentId = -1, Alias = Constants.Security.WriterGroupAlias, Name = "Writers", DefaultPermissions = "CAH:F", CreateDate = DateTime.Now, UpdateDate = DateTime.Now, Icon = "icon-edit" }); - _database.Insert(Constants.DatabaseSchema.Tables.UserGroup, "id", false, new UserGroupDto { Id = 3, StartMediaId = -1, StartContentId = -1, Alias = Constants.Security.EditorGroupAlias, Name = "Editors", DefaultPermissions = "CADMOSKTPUZ:5Fï", CreateDate = DateTime.Now, UpdateDate = DateTime.Now, Icon = "icon-tools" }); - _database.Insert(Constants.DatabaseSchema.Tables.UserGroup, "id", false, new UserGroupDto { Id = 4, StartMediaId = -1, StartContentId = -1, Alias = Constants.Security.TranslatorGroupAlias, Name = "Translators", DefaultPermissions = "AF", CreateDate = DateTime.Now, UpdateDate = DateTime.Now, Icon = "icon-globe" }); - _database.Insert(Constants.DatabaseSchema.Tables.UserGroup, "id", false, new UserGroupDto { Id = 5, StartMediaId = -1, StartContentId = -1, Alias = Constants.Security.SensitiveDataGroupAlias, Name = "Sensitive data", DefaultPermissions = "", CreateDate = DateTime.Now, UpdateDate = DateTime.Now, Icon = "icon-lock" }); + _database.Insert(Cms.Core.Constants.DatabaseSchema.Tables.UserGroup, "id", false, new UserGroupDto { Id = 1, StartMediaId = -1, StartContentId = -1, Alias = Cms.Core.Constants.Security.AdminGroupAlias, Name = "Administrators", DefaultPermissions = "CADMOSKTPIURZ:5F7ï", CreateDate = DateTime.Now, UpdateDate = DateTime.Now, Icon = "icon-medal" }); + _database.Insert(Cms.Core.Constants.DatabaseSchema.Tables.UserGroup, "id", false, new UserGroupDto { Id = 2, StartMediaId = -1, StartContentId = -1, Alias = Cms.Core.Constants.Security.WriterGroupAlias, Name = "Writers", DefaultPermissions = "CAH:F", CreateDate = DateTime.Now, UpdateDate = DateTime.Now, Icon = "icon-edit" }); + _database.Insert(Cms.Core.Constants.DatabaseSchema.Tables.UserGroup, "id", false, new UserGroupDto { Id = 3, StartMediaId = -1, StartContentId = -1, Alias = Cms.Core.Constants.Security.EditorGroupAlias, Name = "Editors", DefaultPermissions = "CADMOSKTPUZ:5Fï", CreateDate = DateTime.Now, UpdateDate = DateTime.Now, Icon = "icon-tools" }); + _database.Insert(Cms.Core.Constants.DatabaseSchema.Tables.UserGroup, "id", false, new UserGroupDto { Id = 4, StartMediaId = -1, StartContentId = -1, Alias = Cms.Core.Constants.Security.TranslatorGroupAlias, Name = "Translators", DefaultPermissions = "AF", CreateDate = DateTime.Now, UpdateDate = DateTime.Now, Icon = "icon-globe" }); + _database.Insert(Cms.Core.Constants.DatabaseSchema.Tables.UserGroup, "id", false, new UserGroupDto { Id = 5, StartMediaId = -1, StartContentId = -1, Alias = Cms.Core.Constants.Security.SensitiveDataGroupAlias, Name = "Sensitive data", DefaultPermissions = "", CreateDate = DateTime.Now, UpdateDate = DateTime.Now, Icon = "icon-lock" }); } private void CreateUser2UserGroupData() { - _database.Insert(new User2UserGroupDto { UserGroupId = 1, UserId = Constants.Security.SuperUserId }); // add super to admins - _database.Insert(new User2UserGroupDto { UserGroupId = 5, UserId = Constants.Security.SuperUserId }); // add super to sensitive data + _database.Insert(new User2UserGroupDto { UserGroupId = 1, UserId = Cms.Core.Constants.Security.SuperUserId }); // add super to admins + _database.Insert(new User2UserGroupDto { UserGroupId = 5, UserId = Cms.Core.Constants.Security.SuperUserId }); // add super to sensitive data } private void CreateUserGroup2AppData() { - _database.Insert(new UserGroup2AppDto { UserGroupId = 1, AppAlias = Constants.Applications.Content }); - _database.Insert(new UserGroup2AppDto { UserGroupId = 1, AppAlias = Constants.Applications.Packages }); - _database.Insert(new UserGroup2AppDto { UserGroupId = 1, AppAlias = Constants.Applications.Media }); - _database.Insert(new UserGroup2AppDto { UserGroupId = 1, AppAlias = Constants.Applications.Members }); - _database.Insert(new UserGroup2AppDto { UserGroupId = 1, AppAlias = Constants.Applications.Settings }); - _database.Insert(new UserGroup2AppDto { UserGroupId = 1, AppAlias = Constants.Applications.Users }); - _database.Insert(new UserGroup2AppDto { UserGroupId = 1, AppAlias = Constants.Applications.Forms }); - _database.Insert(new UserGroup2AppDto { UserGroupId = 1, AppAlias = Constants.Applications.Translation }); + _database.Insert(new UserGroup2AppDto { UserGroupId = 1, AppAlias = Cms.Core.Constants.Applications.Content }); + _database.Insert(new UserGroup2AppDto { UserGroupId = 1, AppAlias = Cms.Core.Constants.Applications.Packages }); + _database.Insert(new UserGroup2AppDto { UserGroupId = 1, AppAlias = Cms.Core.Constants.Applications.Media }); + _database.Insert(new UserGroup2AppDto { UserGroupId = 1, AppAlias = Cms.Core.Constants.Applications.Members }); + _database.Insert(new UserGroup2AppDto { UserGroupId = 1, AppAlias = Cms.Core.Constants.Applications.Settings }); + _database.Insert(new UserGroup2AppDto { UserGroupId = 1, AppAlias = Cms.Core.Constants.Applications.Users }); + _database.Insert(new UserGroup2AppDto { UserGroupId = 1, AppAlias = Cms.Core.Constants.Applications.Forms }); + _database.Insert(new UserGroup2AppDto { UserGroupId = 1, AppAlias = Cms.Core.Constants.Applications.Translation }); - _database.Insert(new UserGroup2AppDto { UserGroupId = 2, AppAlias = Constants.Applications.Content }); + _database.Insert(new UserGroup2AppDto { UserGroupId = 2, AppAlias = Cms.Core.Constants.Applications.Content }); - _database.Insert(new UserGroup2AppDto { UserGroupId = 3, AppAlias = Constants.Applications.Content }); - _database.Insert(new UserGroup2AppDto { UserGroupId = 3, AppAlias = Constants.Applications.Media }); - _database.Insert(new UserGroup2AppDto { UserGroupId = 3, AppAlias = Constants.Applications.Forms }); + _database.Insert(new UserGroup2AppDto { UserGroupId = 3, AppAlias = Cms.Core.Constants.Applications.Content }); + _database.Insert(new UserGroup2AppDto { UserGroupId = 3, AppAlias = Cms.Core.Constants.Applications.Media }); + _database.Insert(new UserGroup2AppDto { UserGroupId = 3, AppAlias = Cms.Core.Constants.Applications.Forms }); - _database.Insert(new UserGroup2AppDto { UserGroupId = 4, AppAlias = Constants.Applications.Translation }); + _database.Insert(new UserGroup2AppDto { UserGroupId = 4, AppAlias = Cms.Core.Constants.Applications.Translation }); } private void CreatePropertyTypeGroupData() { - _database.Insert(Constants.DatabaseSchema.Tables.PropertyTypeGroup, "id", false, new PropertyTypeGroupDto { Id = 3, ContentTypeNodeId = 1032, Text = "Image", SortOrder = 1, UniqueId = new Guid(Constants.PropertyTypeGroups.Image) }); - _database.Insert(Constants.DatabaseSchema.Tables.PropertyTypeGroup, "id", false, new PropertyTypeGroupDto { Id = 4, ContentTypeNodeId = 1033, Text = "File", SortOrder = 1, UniqueId = new Guid(Constants.PropertyTypeGroups.File) }); + _database.Insert(Cms.Core.Constants.DatabaseSchema.Tables.PropertyTypeGroup, "id", false, new PropertyTypeGroupDto { Id = 3, ContentTypeNodeId = 1032, Text = "Image", SortOrder = 1, UniqueId = new Guid(Cms.Core.Constants.PropertyTypeGroups.Image) }); + _database.Insert(Cms.Core.Constants.DatabaseSchema.Tables.PropertyTypeGroup, "id", false, new PropertyTypeGroupDto { Id = 4, ContentTypeNodeId = 1033, Text = "File", SortOrder = 1, UniqueId = new Guid(Cms.Core.Constants.PropertyTypeGroups.File) }); //membership property group - _database.Insert(Constants.DatabaseSchema.Tables.PropertyTypeGroup, "id", false, new PropertyTypeGroupDto { Id = 11, ContentTypeNodeId = 1044, Text = "Membership", SortOrder = 1, UniqueId = new Guid(Constants.PropertyTypeGroups.Membership) }); + _database.Insert(Cms.Core.Constants.DatabaseSchema.Tables.PropertyTypeGroup, "id", false, new PropertyTypeGroupDto { Id = 11, ContentTypeNodeId = 1044, Text = "Membership", SortOrder = 1, UniqueId = new Guid(Cms.Core.Constants.PropertyTypeGroups.Membership) }); } private void CreatePropertyTypeData() { - _database.Insert(Constants.DatabaseSchema.Tables.PropertyType, "id", false, new PropertyTypeDto { Id = 6, UniqueId = 6.ToGuid(), DataTypeId = Constants.DataTypes.ImageCropper, ContentTypeId = 1032, PropertyTypeGroupId = 3, Alias = Constants.Conventions.Media.File, Name = "Upload image", SortOrder = 0, Mandatory = true, ValidationRegExp = null, Description = null, Variations = (byte) ContentVariation.Nothing }); - _database.Insert(Constants.DatabaseSchema.Tables.PropertyType, "id", false, new PropertyTypeDto { Id = 7, UniqueId = 7.ToGuid(), DataTypeId = Constants.DataTypes.LabelInt, ContentTypeId = 1032, PropertyTypeGroupId = 3, Alias = Constants.Conventions.Media.Width, Name = "Width", SortOrder = 0, Mandatory = false, ValidationRegExp = null, Description = "in pixels", Variations = (byte) ContentVariation.Nothing }); - _database.Insert(Constants.DatabaseSchema.Tables.PropertyType, "id", false, new PropertyTypeDto { Id = 8, UniqueId = 8.ToGuid(), DataTypeId = Constants.DataTypes.LabelInt, ContentTypeId = 1032, PropertyTypeGroupId = 3, Alias = Constants.Conventions.Media.Height, Name = "Height", SortOrder = 0, Mandatory = false, ValidationRegExp = null, Description = "in pixels", Variations = (byte) ContentVariation.Nothing }); - _database.Insert(Constants.DatabaseSchema.Tables.PropertyType, "id", false, new PropertyTypeDto { Id = 9, UniqueId = 9.ToGuid(), DataTypeId = Constants.DataTypes.LabelBigint, ContentTypeId = 1032, PropertyTypeGroupId = 3, Alias = Constants.Conventions.Media.Bytes, Name = "Size", SortOrder = 0, Mandatory = false, ValidationRegExp = null, Description = "in bytes", Variations = (byte) ContentVariation.Nothing }); - _database.Insert(Constants.DatabaseSchema.Tables.PropertyType, "id", false, new PropertyTypeDto { Id = 10, UniqueId = 10.ToGuid(), DataTypeId = -92, ContentTypeId = 1032, PropertyTypeGroupId = 3, Alias = Constants.Conventions.Media.Extension, Name = "Type", SortOrder = 0, Mandatory = false, ValidationRegExp = null, Description = null, Variations = (byte) ContentVariation.Nothing }); - _database.Insert(Constants.DatabaseSchema.Tables.PropertyType, "id", false, new PropertyTypeDto { Id = 24, UniqueId = 24.ToGuid(), DataTypeId = Constants.DataTypes.Upload, ContentTypeId = 1033, PropertyTypeGroupId = 4, Alias = Constants.Conventions.Media.File, Name = "Upload file", SortOrder = 0, Mandatory = true, ValidationRegExp = null, Description = null, Variations = (byte) ContentVariation.Nothing }); - _database.Insert(Constants.DatabaseSchema.Tables.PropertyType, "id", false, new PropertyTypeDto { Id = 25, UniqueId = 25.ToGuid(), DataTypeId = -92, ContentTypeId = 1033, PropertyTypeGroupId = 4, Alias = Constants.Conventions.Media.Extension, Name = "Type", SortOrder = 0, Mandatory = false, ValidationRegExp = null, Description = null, Variations = (byte) ContentVariation.Nothing }); - _database.Insert(Constants.DatabaseSchema.Tables.PropertyType, "id", false, new PropertyTypeDto { Id = 26, UniqueId = 26.ToGuid(), DataTypeId = Constants.DataTypes.LabelBigint, ContentTypeId = 1033, PropertyTypeGroupId = 4, Alias = Constants.Conventions.Media.Bytes, Name = "Size", SortOrder = 0, Mandatory = false, ValidationRegExp = null, Description = "in bytes", Variations = (byte) ContentVariation.Nothing }); + _database.Insert(Cms.Core.Constants.DatabaseSchema.Tables.PropertyType, "id", false, new PropertyTypeDto { Id = 6, UniqueId = 6.ToGuid(), DataTypeId = Cms.Core.Constants.DataTypes.ImageCropper, ContentTypeId = 1032, PropertyTypeGroupId = 3, Alias = Cms.Core.Constants.Conventions.Media.File, Name = "Upload image", SortOrder = 0, Mandatory = true, ValidationRegExp = null, Description = null, Variations = (byte) ContentVariation.Nothing }); + _database.Insert(Cms.Core.Constants.DatabaseSchema.Tables.PropertyType, "id", false, new PropertyTypeDto { Id = 7, UniqueId = 7.ToGuid(), DataTypeId = Cms.Core.Constants.DataTypes.LabelInt, ContentTypeId = 1032, PropertyTypeGroupId = 3, Alias = Cms.Core.Constants.Conventions.Media.Width, Name = "Width", SortOrder = 0, Mandatory = false, ValidationRegExp = null, Description = "in pixels", Variations = (byte) ContentVariation.Nothing }); + _database.Insert(Cms.Core.Constants.DatabaseSchema.Tables.PropertyType, "id", false, new PropertyTypeDto { Id = 8, UniqueId = 8.ToGuid(), DataTypeId = Cms.Core.Constants.DataTypes.LabelInt, ContentTypeId = 1032, PropertyTypeGroupId = 3, Alias = Cms.Core.Constants.Conventions.Media.Height, Name = "Height", SortOrder = 0, Mandatory = false, ValidationRegExp = null, Description = "in pixels", Variations = (byte) ContentVariation.Nothing }); + _database.Insert(Cms.Core.Constants.DatabaseSchema.Tables.PropertyType, "id", false, new PropertyTypeDto { Id = 9, UniqueId = 9.ToGuid(), DataTypeId = Cms.Core.Constants.DataTypes.LabelBigint, ContentTypeId = 1032, PropertyTypeGroupId = 3, Alias = Cms.Core.Constants.Conventions.Media.Bytes, Name = "Size", SortOrder = 0, Mandatory = false, ValidationRegExp = null, Description = "in bytes", Variations = (byte) ContentVariation.Nothing }); + _database.Insert(Cms.Core.Constants.DatabaseSchema.Tables.PropertyType, "id", false, new PropertyTypeDto { Id = 10, UniqueId = 10.ToGuid(), DataTypeId = -92, ContentTypeId = 1032, PropertyTypeGroupId = 3, Alias = Cms.Core.Constants.Conventions.Media.Extension, Name = "Type", SortOrder = 0, Mandatory = false, ValidationRegExp = null, Description = null, Variations = (byte) ContentVariation.Nothing }); + _database.Insert(Cms.Core.Constants.DatabaseSchema.Tables.PropertyType, "id", false, new PropertyTypeDto { Id = 24, UniqueId = 24.ToGuid(), DataTypeId = Cms.Core.Constants.DataTypes.Upload, ContentTypeId = 1033, PropertyTypeGroupId = 4, Alias = Cms.Core.Constants.Conventions.Media.File, Name = "Upload file", SortOrder = 0, Mandatory = true, ValidationRegExp = null, Description = null, Variations = (byte) ContentVariation.Nothing }); + _database.Insert(Cms.Core.Constants.DatabaseSchema.Tables.PropertyType, "id", false, new PropertyTypeDto { Id = 25, UniqueId = 25.ToGuid(), DataTypeId = -92, ContentTypeId = 1033, PropertyTypeGroupId = 4, Alias = Cms.Core.Constants.Conventions.Media.Extension, Name = "Type", SortOrder = 0, Mandatory = false, ValidationRegExp = null, Description = null, Variations = (byte) ContentVariation.Nothing }); + _database.Insert(Cms.Core.Constants.DatabaseSchema.Tables.PropertyType, "id", false, new PropertyTypeDto { Id = 26, UniqueId = 26.ToGuid(), DataTypeId = Cms.Core.Constants.DataTypes.LabelBigint, ContentTypeId = 1033, PropertyTypeGroupId = 4, Alias = Cms.Core.Constants.Conventions.Media.Bytes, Name = "Size", SortOrder = 0, Mandatory = false, ValidationRegExp = null, Description = "in bytes", Variations = (byte) ContentVariation.Nothing }); //membership property types - _database.Insert(Constants.DatabaseSchema.Tables.PropertyType, "id", false, new PropertyTypeDto { Id = 28, UniqueId = 28.ToGuid(), DataTypeId = Constants.DataTypes.Textarea, ContentTypeId = 1044, PropertyTypeGroupId = 11, Alias = Constants.Conventions.Member.Comments, Name = Constants.Conventions.Member.CommentsLabel, SortOrder = 0, Mandatory = false, ValidationRegExp = null, Description = null, Variations = (byte) ContentVariation.Nothing }); - _database.Insert(Constants.DatabaseSchema.Tables.PropertyType, "id", false, new PropertyTypeDto { Id = 29, UniqueId = 29.ToGuid(), DataTypeId = Constants.DataTypes.LabelInt, ContentTypeId = 1044, PropertyTypeGroupId = 11, Alias = Constants.Conventions.Member.FailedPasswordAttempts, Name = Constants.Conventions.Member.FailedPasswordAttemptsLabel, SortOrder = 1, Mandatory = false, ValidationRegExp = null, Description = null, Variations = (byte) ContentVariation.Nothing }); - _database.Insert(Constants.DatabaseSchema.Tables.PropertyType, "id", false, new PropertyTypeDto { Id = 30, UniqueId = 30.ToGuid(), DataTypeId = Constants.DataTypes.Boolean, ContentTypeId = 1044, PropertyTypeGroupId = 11, Alias = Constants.Conventions.Member.IsApproved, Name = Constants.Conventions.Member.IsApprovedLabel, SortOrder = 2, Mandatory = false, ValidationRegExp = null, Description = null, Variations = (byte) ContentVariation.Nothing }); - _database.Insert(Constants.DatabaseSchema.Tables.PropertyType, "id", false, new PropertyTypeDto { Id = 31, UniqueId = 31.ToGuid(), DataTypeId = Constants.DataTypes.Boolean, ContentTypeId = 1044, PropertyTypeGroupId = 11, Alias = Constants.Conventions.Member.IsLockedOut, Name = Constants.Conventions.Member.IsLockedOutLabel, SortOrder = 3, Mandatory = false, ValidationRegExp = null, Description = null, Variations = (byte) ContentVariation.Nothing }); - _database.Insert(Constants.DatabaseSchema.Tables.PropertyType, "id", false, new PropertyTypeDto { Id = 32, UniqueId = 32.ToGuid(), DataTypeId = Constants.DataTypes.LabelDateTime, ContentTypeId = 1044, PropertyTypeGroupId = 11, Alias = Constants.Conventions.Member.LastLockoutDate, Name = Constants.Conventions.Member.LastLockoutDateLabel, SortOrder = 4, Mandatory = false, ValidationRegExp = null, Description = null, Variations = (byte) ContentVariation.Nothing }); - _database.Insert(Constants.DatabaseSchema.Tables.PropertyType, "id", false, new PropertyTypeDto { Id = 33, UniqueId = 33.ToGuid(), DataTypeId = Constants.DataTypes.LabelDateTime, ContentTypeId = 1044, PropertyTypeGroupId = 11, Alias = Constants.Conventions.Member.LastLoginDate, Name = Constants.Conventions.Member.LastLoginDateLabel, SortOrder = 5, Mandatory = false, ValidationRegExp = null, Description = null, Variations = (byte) ContentVariation.Nothing }); - _database.Insert(Constants.DatabaseSchema.Tables.PropertyType, "id", false, new PropertyTypeDto { Id = 34, UniqueId = 34.ToGuid(), DataTypeId = Constants.DataTypes.LabelDateTime, ContentTypeId = 1044, PropertyTypeGroupId = 11, Alias = Constants.Conventions.Member.LastPasswordChangeDate, Name = Constants.Conventions.Member.LastPasswordChangeDateLabel, SortOrder = 6, Mandatory = false, ValidationRegExp = null, Description = null, Variations = (byte) ContentVariation.Nothing }); + _database.Insert(Cms.Core.Constants.DatabaseSchema.Tables.PropertyType, "id", false, new PropertyTypeDto { Id = 28, UniqueId = 28.ToGuid(), DataTypeId = Cms.Core.Constants.DataTypes.Textarea, ContentTypeId = 1044, PropertyTypeGroupId = 11, Alias = Cms.Core.Constants.Conventions.Member.Comments, Name = Cms.Core.Constants.Conventions.Member.CommentsLabel, SortOrder = 0, Mandatory = false, ValidationRegExp = null, Description = null, Variations = (byte) ContentVariation.Nothing }); + _database.Insert(Cms.Core.Constants.DatabaseSchema.Tables.PropertyType, "id", false, new PropertyTypeDto { Id = 29, UniqueId = 29.ToGuid(), DataTypeId = Cms.Core.Constants.DataTypes.LabelInt, ContentTypeId = 1044, PropertyTypeGroupId = 11, Alias = Cms.Core.Constants.Conventions.Member.FailedPasswordAttempts, Name = Cms.Core.Constants.Conventions.Member.FailedPasswordAttemptsLabel, SortOrder = 1, Mandatory = false, ValidationRegExp = null, Description = null, Variations = (byte) ContentVariation.Nothing }); + _database.Insert(Cms.Core.Constants.DatabaseSchema.Tables.PropertyType, "id", false, new PropertyTypeDto { Id = 30, UniqueId = 30.ToGuid(), DataTypeId = Cms.Core.Constants.DataTypes.Boolean, ContentTypeId = 1044, PropertyTypeGroupId = 11, Alias = Cms.Core.Constants.Conventions.Member.IsApproved, Name = Cms.Core.Constants.Conventions.Member.IsApprovedLabel, SortOrder = 2, Mandatory = false, ValidationRegExp = null, Description = null, Variations = (byte) ContentVariation.Nothing }); + _database.Insert(Cms.Core.Constants.DatabaseSchema.Tables.PropertyType, "id", false, new PropertyTypeDto { Id = 31, UniqueId = 31.ToGuid(), DataTypeId = Cms.Core.Constants.DataTypes.Boolean, ContentTypeId = 1044, PropertyTypeGroupId = 11, Alias = Cms.Core.Constants.Conventions.Member.IsLockedOut, Name = Cms.Core.Constants.Conventions.Member.IsLockedOutLabel, SortOrder = 3, Mandatory = false, ValidationRegExp = null, Description = null, Variations = (byte) ContentVariation.Nothing }); + _database.Insert(Cms.Core.Constants.DatabaseSchema.Tables.PropertyType, "id", false, new PropertyTypeDto { Id = 32, UniqueId = 32.ToGuid(), DataTypeId = Cms.Core.Constants.DataTypes.LabelDateTime, ContentTypeId = 1044, PropertyTypeGroupId = 11, Alias = Cms.Core.Constants.Conventions.Member.LastLockoutDate, Name = Cms.Core.Constants.Conventions.Member.LastLockoutDateLabel, SortOrder = 4, Mandatory = false, ValidationRegExp = null, Description = null, Variations = (byte) ContentVariation.Nothing }); + _database.Insert(Cms.Core.Constants.DatabaseSchema.Tables.PropertyType, "id", false, new PropertyTypeDto { Id = 33, UniqueId = 33.ToGuid(), DataTypeId = Cms.Core.Constants.DataTypes.LabelDateTime, ContentTypeId = 1044, PropertyTypeGroupId = 11, Alias = Cms.Core.Constants.Conventions.Member.LastLoginDate, Name = Cms.Core.Constants.Conventions.Member.LastLoginDateLabel, SortOrder = 5, Mandatory = false, ValidationRegExp = null, Description = null, Variations = (byte) ContentVariation.Nothing }); + _database.Insert(Cms.Core.Constants.DatabaseSchema.Tables.PropertyType, "id", false, new PropertyTypeDto { Id = 34, UniqueId = 34.ToGuid(), DataTypeId = Cms.Core.Constants.DataTypes.LabelDateTime, ContentTypeId = 1044, PropertyTypeGroupId = 11, Alias = Cms.Core.Constants.Conventions.Member.LastPasswordChangeDate, Name = Cms.Core.Constants.Conventions.Member.LastPasswordChangeDateLabel, SortOrder = 6, Mandatory = false, ValidationRegExp = null, Description = null, Variations = (byte) ContentVariation.Nothing }); } private void CreateLanguageData() { - _database.Insert(Constants.DatabaseSchema.Tables.Language, "id", false, new LanguageDto { Id = 1, IsoCode = "en-US", CultureName = "English (United States)", IsDefault = true }); + _database.Insert(Cms.Core.Constants.DatabaseSchema.Tables.Language, "id", false, new LanguageDto { Id = 1, IsoCode = "en-US", CultureName = "English (United States)", IsDefault = true }); } private void CreateContentChildTypeData() { - _database.Insert(Constants.DatabaseSchema.Tables.ContentChildType, "Id", false, new ContentTypeAllowedContentTypeDto { Id = 1031, AllowedId = 1031 }); - _database.Insert(Constants.DatabaseSchema.Tables.ContentChildType, "Id", false, new ContentTypeAllowedContentTypeDto { Id = 1031, AllowedId = 1032 }); - _database.Insert(Constants.DatabaseSchema.Tables.ContentChildType, "Id", false, new ContentTypeAllowedContentTypeDto { Id = 1031, AllowedId = 1033 }); + _database.Insert(Cms.Core.Constants.DatabaseSchema.Tables.ContentChildType, "Id", false, new ContentTypeAllowedContentTypeDto { Id = 1031, AllowedId = 1031 }); + _database.Insert(Cms.Core.Constants.DatabaseSchema.Tables.ContentChildType, "Id", false, new ContentTypeAllowedContentTypeDto { Id = 1031, AllowedId = 1032 }); + _database.Insert(Cms.Core.Constants.DatabaseSchema.Tables.ContentChildType, "Id", false, new ContentTypeAllowedContentTypeDto { Id = 1031, AllowedId = 1033 }); } private void CreateDataTypeData() @@ -260,7 +260,7 @@ namespace Umbraco.Core.Migrations.Install if (configuration != null) dataTypeDto.Configuration = configuration; - _database.Insert(Constants.DatabaseSchema.Tables.DataType, "pk", false, dataTypeDto); + _database.Insert(Cms.Core.Constants.DatabaseSchema.Tables.DataType, "pk", false, dataTypeDto); } //layouts for the list view @@ -269,65 +269,65 @@ namespace Umbraco.Core.Migrations.Install const string layouts = "[" + cardLayout + "," + listLayout + "]"; // TODO: Check which of the DataTypeIds below doesn't exist in umbracoNode, which results in a foreign key constraint errors. - _database.Insert(Constants.DatabaseSchema.Tables.DataType, "pk", false, new DataTypeDto { NodeId = Constants.DataTypes.Boolean, EditorAlias = Constants.PropertyEditors.Aliases.Boolean, DbType = "Integer" }); - _database.Insert(Constants.DatabaseSchema.Tables.DataType, "pk", false, new DataTypeDto { NodeId = -51, EditorAlias = Constants.PropertyEditors.Aliases.Integer, DbType = "Integer" }); - _database.Insert(Constants.DatabaseSchema.Tables.DataType, "pk", false, new DataTypeDto { NodeId = -87, EditorAlias = Constants.PropertyEditors.Aliases.TinyMce, DbType = "Ntext", + _database.Insert(Cms.Core.Constants.DatabaseSchema.Tables.DataType, "pk", false, new DataTypeDto { NodeId = Cms.Core.Constants.DataTypes.Boolean, EditorAlias = Cms.Core.Constants.PropertyEditors.Aliases.Boolean, DbType = "Integer" }); + _database.Insert(Cms.Core.Constants.DatabaseSchema.Tables.DataType, "pk", false, new DataTypeDto { NodeId = -51, EditorAlias = Cms.Core.Constants.PropertyEditors.Aliases.Integer, DbType = "Integer" }); + _database.Insert(Cms.Core.Constants.DatabaseSchema.Tables.DataType, "pk", false, new DataTypeDto { NodeId = -87, EditorAlias = Cms.Core.Constants.PropertyEditors.Aliases.TinyMce, DbType = "Ntext", Configuration = "{\"value\":\",code,undo,redo,cut,copy,mcepasteword,stylepicker,bold,italic,bullist,numlist,outdent,indent,mcelink,unlink,mceinsertanchor,mceimage,umbracomacro,mceinserttable,umbracoembed,mcecharmap,|1|1,2,3,|0|500,400|1049,|true|\"}" }); - _database.Insert(Constants.DatabaseSchema.Tables.DataType, "pk", false, new DataTypeDto { NodeId = Constants.DataTypes.Textbox, EditorAlias = Constants.PropertyEditors.Aliases.TextBox, DbType = "Nvarchar" }); - _database.Insert(Constants.DatabaseSchema.Tables.DataType, "pk", false, new DataTypeDto { NodeId = Constants.DataTypes.Textarea, EditorAlias = Constants.PropertyEditors.Aliases.TextArea, DbType = "Ntext" }); - _database.Insert(Constants.DatabaseSchema.Tables.DataType, "pk", false, new DataTypeDto { NodeId = Constants.DataTypes.Upload, EditorAlias = Constants.PropertyEditors.Aliases.UploadField, DbType = "Nvarchar" }); - InsertDataTypeDto(Constants.DataTypes.LabelString, Constants.PropertyEditors.Aliases.Label, "Nvarchar", "{\"umbracoDataValueType\":\"STRING\"}"); - InsertDataTypeDto(Constants.DataTypes.LabelInt, Constants.PropertyEditors.Aliases.Label, "Integer", "{\"umbracoDataValueType\":\"INT\"}"); - InsertDataTypeDto(Constants.DataTypes.LabelBigint, Constants.PropertyEditors.Aliases.Label, "Nvarchar", "{\"umbracoDataValueType\":\"BIGINT\"}"); - InsertDataTypeDto(Constants.DataTypes.LabelDateTime, Constants.PropertyEditors.Aliases.Label, "Date", "{\"umbracoDataValueType\":\"DATETIME\"}"); - InsertDataTypeDto(Constants.DataTypes.LabelDecimal, Constants.PropertyEditors.Aliases.Label, "Decimal", "{\"umbracoDataValueType\":\"DECIMAL\"}"); - InsertDataTypeDto(Constants.DataTypes.LabelTime, Constants.PropertyEditors.Aliases.Label, "Date", "{\"umbracoDataValueType\":\"TIME\"}"); - _database.Insert(Constants.DatabaseSchema.Tables.DataType, "pk", false, new DataTypeDto { NodeId = Constants.DataTypes.DateTime, EditorAlias = Constants.PropertyEditors.Aliases.DateTime, DbType = "Date" }); - _database.Insert(Constants.DatabaseSchema.Tables.DataType, "pk", false, new DataTypeDto { NodeId = -37, EditorAlias = Constants.PropertyEditors.Aliases.ColorPicker, DbType = "Nvarchar" }); - InsertDataTypeDto(Constants.DataTypes.DropDownSingle, Constants.PropertyEditors.Aliases.DropDownListFlexible, "Nvarchar", "{\"multiple\":false}"); - _database.Insert(Constants.DatabaseSchema.Tables.DataType, "pk", false, new DataTypeDto { NodeId = -40, EditorAlias = Constants.PropertyEditors.Aliases.RadioButtonList, DbType = "Nvarchar" }); - _database.Insert(Constants.DatabaseSchema.Tables.DataType, "pk", false, new DataTypeDto { NodeId = -41, EditorAlias = "Umbraco.DateTime", DbType = "Date", Configuration = "{\"format\":\"YYYY-MM-DD\"}" }); - InsertDataTypeDto(Constants.DataTypes.DropDownMultiple, Constants.PropertyEditors.Aliases.DropDownListFlexible, "Nvarchar", "{\"multiple\":true}"); - _database.Insert(Constants.DatabaseSchema.Tables.DataType, "pk", false, new DataTypeDto { NodeId = -43, EditorAlias = Constants.PropertyEditors.Aliases.CheckBoxList, DbType = "Nvarchar" }); - _database.Insert(Constants.DatabaseSchema.Tables.DataType, "pk", false, new DataTypeDto { NodeId = Constants.DataTypes.Tags, EditorAlias = Constants.PropertyEditors.Aliases.Tags, DbType = "Ntext", + _database.Insert(Cms.Core.Constants.DatabaseSchema.Tables.DataType, "pk", false, new DataTypeDto { NodeId = Cms.Core.Constants.DataTypes.Textbox, EditorAlias = Cms.Core.Constants.PropertyEditors.Aliases.TextBox, DbType = "Nvarchar" }); + _database.Insert(Cms.Core.Constants.DatabaseSchema.Tables.DataType, "pk", false, new DataTypeDto { NodeId = Cms.Core.Constants.DataTypes.Textarea, EditorAlias = Cms.Core.Constants.PropertyEditors.Aliases.TextArea, DbType = "Ntext" }); + _database.Insert(Cms.Core.Constants.DatabaseSchema.Tables.DataType, "pk", false, new DataTypeDto { NodeId = Cms.Core.Constants.DataTypes.Upload, EditorAlias = Cms.Core.Constants.PropertyEditors.Aliases.UploadField, DbType = "Nvarchar" }); + InsertDataTypeDto(Cms.Core.Constants.DataTypes.LabelString, Cms.Core.Constants.PropertyEditors.Aliases.Label, "Nvarchar", "{\"umbracoDataValueType\":\"STRING\"}"); + InsertDataTypeDto(Cms.Core.Constants.DataTypes.LabelInt, Cms.Core.Constants.PropertyEditors.Aliases.Label, "Integer", "{\"umbracoDataValueType\":\"INT\"}"); + InsertDataTypeDto(Cms.Core.Constants.DataTypes.LabelBigint, Cms.Core.Constants.PropertyEditors.Aliases.Label, "Nvarchar", "{\"umbracoDataValueType\":\"BIGINT\"}"); + InsertDataTypeDto(Cms.Core.Constants.DataTypes.LabelDateTime, Cms.Core.Constants.PropertyEditors.Aliases.Label, "Date", "{\"umbracoDataValueType\":\"DATETIME\"}"); + InsertDataTypeDto(Cms.Core.Constants.DataTypes.LabelDecimal, Cms.Core.Constants.PropertyEditors.Aliases.Label, "Decimal", "{\"umbracoDataValueType\":\"DECIMAL\"}"); + InsertDataTypeDto(Cms.Core.Constants.DataTypes.LabelTime, Cms.Core.Constants.PropertyEditors.Aliases.Label, "Date", "{\"umbracoDataValueType\":\"TIME\"}"); + _database.Insert(Cms.Core.Constants.DatabaseSchema.Tables.DataType, "pk", false, new DataTypeDto { NodeId = Cms.Core.Constants.DataTypes.DateTime, EditorAlias = Cms.Core.Constants.PropertyEditors.Aliases.DateTime, DbType = "Date" }); + _database.Insert(Cms.Core.Constants.DatabaseSchema.Tables.DataType, "pk", false, new DataTypeDto { NodeId = -37, EditorAlias = Cms.Core.Constants.PropertyEditors.Aliases.ColorPicker, DbType = "Nvarchar" }); + InsertDataTypeDto(Cms.Core.Constants.DataTypes.DropDownSingle, Cms.Core.Constants.PropertyEditors.Aliases.DropDownListFlexible, "Nvarchar", "{\"multiple\":false}"); + _database.Insert(Cms.Core.Constants.DatabaseSchema.Tables.DataType, "pk", false, new DataTypeDto { NodeId = -40, EditorAlias = Cms.Core.Constants.PropertyEditors.Aliases.RadioButtonList, DbType = "Nvarchar" }); + _database.Insert(Cms.Core.Constants.DatabaseSchema.Tables.DataType, "pk", false, new DataTypeDto { NodeId = -41, EditorAlias = "Umbraco.DateTime", DbType = "Date", Configuration = "{\"format\":\"YYYY-MM-DD\"}" }); + InsertDataTypeDto(Cms.Core.Constants.DataTypes.DropDownMultiple, Cms.Core.Constants.PropertyEditors.Aliases.DropDownListFlexible, "Nvarchar", "{\"multiple\":true}"); + _database.Insert(Cms.Core.Constants.DatabaseSchema.Tables.DataType, "pk", false, new DataTypeDto { NodeId = -43, EditorAlias = Cms.Core.Constants.PropertyEditors.Aliases.CheckBoxList, DbType = "Nvarchar" }); + _database.Insert(Cms.Core.Constants.DatabaseSchema.Tables.DataType, "pk", false, new DataTypeDto { NodeId = Cms.Core.Constants.DataTypes.Tags, EditorAlias = Cms.Core.Constants.PropertyEditors.Aliases.Tags, DbType = "Ntext", Configuration = "{\"group\":\"default\", \"storageType\":\"Json\"}" }); - _database.Insert(Constants.DatabaseSchema.Tables.DataType, "pk", false, new DataTypeDto { NodeId = Constants.DataTypes.ImageCropper, EditorAlias = Constants.PropertyEditors.Aliases.ImageCropper, DbType = "Ntext" }); - _database.Insert(Constants.DatabaseSchema.Tables.DataType, "pk", false, new DataTypeDto { NodeId = Constants.DataTypes.DefaultContentListView, EditorAlias = Constants.PropertyEditors.Aliases.ListView, DbType = "Nvarchar", + _database.Insert(Cms.Core.Constants.DatabaseSchema.Tables.DataType, "pk", false, new DataTypeDto { NodeId = Cms.Core.Constants.DataTypes.ImageCropper, EditorAlias = Cms.Core.Constants.PropertyEditors.Aliases.ImageCropper, DbType = "Ntext" }); + _database.Insert(Cms.Core.Constants.DatabaseSchema.Tables.DataType, "pk", false, new DataTypeDto { NodeId = Cms.Core.Constants.DataTypes.DefaultContentListView, EditorAlias = Cms.Core.Constants.PropertyEditors.Aliases.ListView, DbType = "Nvarchar", Configuration = "{\"pageSize\":100, \"orderBy\":\"updateDate\", \"orderDirection\":\"desc\", \"layouts\":" + layouts + ", \"includeProperties\":[{\"alias\":\"updateDate\",\"header\":\"Last edited\",\"isSystem\":1},{\"alias\":\"owner\",\"header\":\"Updated by\",\"isSystem\":1}]}" }); - _database.Insert(Constants.DatabaseSchema.Tables.DataType, "pk", false, new DataTypeDto { NodeId = Constants.DataTypes.DefaultMediaListView, EditorAlias = Constants.PropertyEditors.Aliases.ListView, DbType = "Nvarchar", + _database.Insert(Cms.Core.Constants.DatabaseSchema.Tables.DataType, "pk", false, new DataTypeDto { NodeId = Cms.Core.Constants.DataTypes.DefaultMediaListView, EditorAlias = Cms.Core.Constants.PropertyEditors.Aliases.ListView, DbType = "Nvarchar", Configuration = "{\"pageSize\":100, \"orderBy\":\"updateDate\", \"orderDirection\":\"desc\", \"layouts\":" + layouts + ", \"includeProperties\":[{\"alias\":\"updateDate\",\"header\":\"Last edited\",\"isSystem\":1},{\"alias\":\"owner\",\"header\":\"Updated by\",\"isSystem\":1}]}" }); - _database.Insert(Constants.DatabaseSchema.Tables.DataType, "pk", false, new DataTypeDto { NodeId = Constants.DataTypes.DefaultMembersListView, EditorAlias = Constants.PropertyEditors.Aliases.ListView, DbType = "Nvarchar", + _database.Insert(Cms.Core.Constants.DatabaseSchema.Tables.DataType, "pk", false, new DataTypeDto { NodeId = Cms.Core.Constants.DataTypes.DefaultMembersListView, EditorAlias = Cms.Core.Constants.PropertyEditors.Aliases.ListView, DbType = "Nvarchar", Configuration = "{\"pageSize\":10, \"orderBy\":\"username\", \"orderDirection\":\"asc\", \"includeProperties\":[{\"alias\":\"username\",\"isSystem\":1},{\"alias\":\"email\",\"isSystem\":1},{\"alias\":\"updateDate\",\"header\":\"Last edited\",\"isSystem\":1}]}" }); //New UDI pickers with newer Ids - _database.Insert(Constants.DatabaseSchema.Tables.DataType, "pk", false, new DataTypeDto { NodeId = 1046, EditorAlias = Constants.PropertyEditors.Aliases.ContentPicker, DbType = "Nvarchar" }); - _database.Insert(Constants.DatabaseSchema.Tables.DataType, "pk", false, new DataTypeDto { NodeId = 1047, EditorAlias = Constants.PropertyEditors.Aliases.MemberPicker, DbType = "Nvarchar" }); - _database.Insert(Constants.DatabaseSchema.Tables.DataType, "pk", false, new DataTypeDto { NodeId = 1048, EditorAlias = Constants.PropertyEditors.Aliases.MediaPicker, DbType = "Ntext" }); - _database.Insert(Constants.DatabaseSchema.Tables.DataType, "pk", false, new DataTypeDto { NodeId = 1049, EditorAlias = Constants.PropertyEditors.Aliases.MediaPicker, DbType = "Ntext", + _database.Insert(Cms.Core.Constants.DatabaseSchema.Tables.DataType, "pk", false, new DataTypeDto { NodeId = 1046, EditorAlias = Cms.Core.Constants.PropertyEditors.Aliases.ContentPicker, DbType = "Nvarchar" }); + _database.Insert(Cms.Core.Constants.DatabaseSchema.Tables.DataType, "pk", false, new DataTypeDto { NodeId = 1047, EditorAlias = Cms.Core.Constants.PropertyEditors.Aliases.MemberPicker, DbType = "Nvarchar" }); + _database.Insert(Cms.Core.Constants.DatabaseSchema.Tables.DataType, "pk", false, new DataTypeDto { NodeId = 1048, EditorAlias = Cms.Core.Constants.PropertyEditors.Aliases.MediaPicker, DbType = "Ntext" }); + _database.Insert(Cms.Core.Constants.DatabaseSchema.Tables.DataType, "pk", false, new DataTypeDto { NodeId = 1049, EditorAlias = Cms.Core.Constants.PropertyEditors.Aliases.MediaPicker, DbType = "Ntext", Configuration = "{\"multiPicker\":1}" }); - _database.Insert(Constants.DatabaseSchema.Tables.DataType, "pk", false, new DataTypeDto { NodeId = 1050, EditorAlias = Constants.PropertyEditors.Aliases.MultiUrlPicker, DbType = "Ntext" }); + _database.Insert(Cms.Core.Constants.DatabaseSchema.Tables.DataType, "pk", false, new DataTypeDto { NodeId = 1050, EditorAlias = Cms.Core.Constants.PropertyEditors.Aliases.MultiUrlPicker, DbType = "Ntext" }); } private void CreateRelationTypeData() { - var relationType = new RelationTypeDto { Id = 1, Alias = Constants.Conventions.RelationTypes.RelateDocumentOnCopyAlias, ChildObjectType = Constants.ObjectTypes.Document, ParentObjectType = Constants.ObjectTypes.Document, Dual = true, Name = Constants.Conventions.RelationTypes.RelateDocumentOnCopyName }; + var relationType = new RelationTypeDto { Id = 1, Alias = Cms.Core.Constants.Conventions.RelationTypes.RelateDocumentOnCopyAlias, ChildObjectType = Cms.Core.Constants.ObjectTypes.Document, ParentObjectType = Cms.Core.Constants.ObjectTypes.Document, Dual = true, Name = Cms.Core.Constants.Conventions.RelationTypes.RelateDocumentOnCopyName }; relationType.UniqueId = CreateUniqueRelationTypeId(relationType.Alias, relationType.Name); - _database.Insert(Constants.DatabaseSchema.Tables.RelationType, "id", false, relationType); - relationType = new RelationTypeDto { Id = 2, Alias = Constants.Conventions.RelationTypes.RelateParentDocumentOnDeleteAlias, ChildObjectType = Constants.ObjectTypes.Document, ParentObjectType = Constants.ObjectTypes.Document, Dual = false, Name = Constants.Conventions.RelationTypes.RelateParentDocumentOnDeleteName }; + _database.Insert(Cms.Core.Constants.DatabaseSchema.Tables.RelationType, "id", false, relationType); + relationType = new RelationTypeDto { Id = 2, Alias = Cms.Core.Constants.Conventions.RelationTypes.RelateParentDocumentOnDeleteAlias, ChildObjectType = Cms.Core.Constants.ObjectTypes.Document, ParentObjectType = Cms.Core.Constants.ObjectTypes.Document, Dual = false, Name = Cms.Core.Constants.Conventions.RelationTypes.RelateParentDocumentOnDeleteName }; relationType.UniqueId = CreateUniqueRelationTypeId(relationType.Alias, relationType.Name); - _database.Insert(Constants.DatabaseSchema.Tables.RelationType, "id", false, relationType); - relationType = new RelationTypeDto { Id = 3, Alias = Constants.Conventions.RelationTypes.RelateParentMediaFolderOnDeleteAlias, ChildObjectType = Constants.ObjectTypes.Media, ParentObjectType = Constants.ObjectTypes.Media, Dual = false, Name = Constants.Conventions.RelationTypes.RelateParentMediaFolderOnDeleteName }; + _database.Insert(Cms.Core.Constants.DatabaseSchema.Tables.RelationType, "id", false, relationType); + relationType = new RelationTypeDto { Id = 3, Alias = Cms.Core.Constants.Conventions.RelationTypes.RelateParentMediaFolderOnDeleteAlias, ChildObjectType = Cms.Core.Constants.ObjectTypes.Media, ParentObjectType = Cms.Core.Constants.ObjectTypes.Media, Dual = false, Name = Cms.Core.Constants.Conventions.RelationTypes.RelateParentMediaFolderOnDeleteName }; relationType.UniqueId = CreateUniqueRelationTypeId(relationType.Alias, relationType.Name); - _database.Insert(Constants.DatabaseSchema.Tables.RelationType, "id", false, relationType); + _database.Insert(Cms.Core.Constants.DatabaseSchema.Tables.RelationType, "id", false, relationType); - relationType = new RelationTypeDto { Id = 4, Alias = Constants.Conventions.RelationTypes.RelatedMediaAlias, ChildObjectType = null, ParentObjectType = null, Dual = false, Name = Constants.Conventions.RelationTypes.RelatedMediaName }; + relationType = new RelationTypeDto { Id = 4, Alias = Cms.Core.Constants.Conventions.RelationTypes.RelatedMediaAlias, ChildObjectType = null, ParentObjectType = null, Dual = false, Name = Cms.Core.Constants.Conventions.RelationTypes.RelatedMediaName }; relationType.UniqueId = CreateUniqueRelationTypeId(relationType.Alias, relationType.Name); - _database.Insert(Constants.DatabaseSchema.Tables.RelationType, "id", false, relationType); + _database.Insert(Cms.Core.Constants.DatabaseSchema.Tables.RelationType, "id", false, relationType); - relationType = new RelationTypeDto { Id = 5, Alias = Constants.Conventions.RelationTypes.RelatedDocumentAlias, ChildObjectType = null, ParentObjectType = null, Dual = false, Name = Constants.Conventions.RelationTypes.RelatedDocumentName }; + relationType = new RelationTypeDto { Id = 5, Alias = Cms.Core.Constants.Conventions.RelationTypes.RelatedDocumentAlias, ChildObjectType = null, ParentObjectType = null, Dual = false, Name = Cms.Core.Constants.Conventions.RelationTypes.RelatedDocumentName }; relationType.UniqueId = CreateUniqueRelationTypeId(relationType.Alias, relationType.Name); - _database.Insert(Constants.DatabaseSchema.Tables.RelationType, "id", false, relationType); + _database.Insert(Cms.Core.Constants.DatabaseSchema.Tables.RelationType, "id", false, relationType); } internal static Guid CreateUniqueRelationTypeId(string alias, string name) @@ -343,7 +343,7 @@ namespace Umbraco.Core.Migrations.Install var stateValueKey = upgrader.StateValueKey; var finalState = upgrader.Plan.FinalState; - _database.Insert(Constants.DatabaseSchema.Tables.KeyValue, "key", false, new KeyValueDto { Key = stateValueKey, Value = finalState, UpdateDate = DateTime.Now }); + _database.Insert(Cms.Core.Constants.DatabaseSchema.Tables.KeyValue, "key", false, new KeyValueDto { Key = stateValueKey, Value = finalState, UpdateDate = DateTime.Now }); } } } diff --git a/src/Umbraco.Infrastructure/Migrations/Install/DatabaseSchemaCreator.cs b/src/Umbraco.Infrastructure/Migrations/Install/DatabaseSchemaCreator.cs index ed6e684cc6..d7db160b56 100644 --- a/src/Umbraco.Infrastructure/Migrations/Install/DatabaseSchemaCreator.cs +++ b/src/Umbraco.Infrastructure/Migrations/Install/DatabaseSchemaCreator.cs @@ -3,15 +3,15 @@ using System.Collections.Generic; using System.Linq; using Microsoft.Extensions.Logging; using NPoco; -using Umbraco.Core.Configuration; -using Umbraco.Core.Configuration.Models; -using Umbraco.Core.Events; -using Umbraco.Core.Persistence; -using Umbraco.Core.Persistence.DatabaseModelDefinitions; -using Umbraco.Core.Persistence.Dtos; -using Umbraco.Core.Persistence.SqlSyntax; +using Umbraco.Cms.Core.Configuration; +using Umbraco.Cms.Core.Events; +using Umbraco.Cms.Infrastructure.Persistence; +using Umbraco.Cms.Infrastructure.Persistence.DatabaseModelDefinitions; +using Umbraco.Cms.Infrastructure.Persistence.Dtos; +using Umbraco.Cms.Infrastructure.Persistence.SqlSyntax; +using Umbraco.Extensions; -namespace Umbraco.Core.Migrations.Install +namespace Umbraco.Cms.Infrastructure.Migrations.Install { /// /// Creates the initial database schema during install. diff --git a/src/Umbraco.Infrastructure/Migrations/Install/DatabaseSchemaCreatorFactory.cs b/src/Umbraco.Infrastructure/Migrations/Install/DatabaseSchemaCreatorFactory.cs index 935ede3ab5..4cbff82b7e 100644 --- a/src/Umbraco.Infrastructure/Migrations/Install/DatabaseSchemaCreatorFactory.cs +++ b/src/Umbraco.Infrastructure/Migrations/Install/DatabaseSchemaCreatorFactory.cs @@ -1,8 +1,8 @@ using Microsoft.Extensions.Logging; -using Umbraco.Core.Configuration; -using Umbraco.Core.Persistence; +using Umbraco.Cms.Core.Configuration; +using Umbraco.Cms.Infrastructure.Persistence; -namespace Umbraco.Core.Migrations.Install +namespace Umbraco.Cms.Infrastructure.Migrations.Install { /// /// Creates the initial database schema during install. diff --git a/src/Umbraco.Infrastructure/Migrations/Install/DatabaseSchemaResult.cs b/src/Umbraco.Infrastructure/Migrations/Install/DatabaseSchemaResult.cs index a153ba7b41..83c4fd4cef 100644 --- a/src/Umbraco.Infrastructure/Migrations/Install/DatabaseSchemaResult.cs +++ b/src/Umbraco.Infrastructure/Migrations/Install/DatabaseSchemaResult.cs @@ -2,10 +2,9 @@ using System.Collections.Generic; using System.Linq; using System.Text; -using Umbraco.Core.Persistence; -using Umbraco.Core.Persistence.DatabaseModelDefinitions; +using Umbraco.Cms.Infrastructure.Persistence.DatabaseModelDefinitions; -namespace Umbraco.Core.Migrations.Install +namespace Umbraco.Cms.Infrastructure.Migrations.Install { /// /// Represents ... diff --git a/src/Umbraco.Infrastructure/Migrations/MergeBuilder.cs b/src/Umbraco.Infrastructure/Migrations/MergeBuilder.cs index f1eeea9dfa..4385fd54b8 100644 --- a/src/Umbraco.Infrastructure/Migrations/MergeBuilder.cs +++ b/src/Umbraco.Infrastructure/Migrations/MergeBuilder.cs @@ -1,7 +1,8 @@ using System; using System.Collections.Generic; +using Umbraco.Cms.Core.Migrations; -namespace Umbraco.Core.Migrations +namespace Umbraco.Cms.Infrastructure.Migrations { /// /// Represents a migration plan builder for merges. diff --git a/src/Umbraco.Infrastructure/Migrations/MigrationBase.cs b/src/Umbraco.Infrastructure/Migrations/MigrationBase.cs index b24313bebb..56f195cd9f 100644 --- a/src/Umbraco.Infrastructure/Migrations/MigrationBase.cs +++ b/src/Umbraco.Infrastructure/Migrations/MigrationBase.cs @@ -1,17 +1,17 @@ -using System; +using Microsoft.Extensions.Logging; using NPoco; -using Microsoft.Extensions.Logging; -using Umbraco.Core.Migrations.Expressions.Alter; -using Umbraco.Core.Migrations.Expressions.Create; -using Umbraco.Core.Migrations.Expressions.Delete; -using Umbraco.Core.Migrations.Expressions.Execute; -using Umbraco.Core.Migrations.Expressions.Insert; -using Umbraco.Core.Migrations.Expressions.Rename; -using Umbraco.Core.Migrations.Expressions.Update; -using Umbraco.Core.Persistence; -using Umbraco.Core.Persistence.SqlSyntax; +using Umbraco.Cms.Core.Migrations; +using Umbraco.Cms.Infrastructure.Migrations.Expressions.Alter; +using Umbraco.Cms.Infrastructure.Migrations.Expressions.Create; +using Umbraco.Cms.Infrastructure.Migrations.Expressions.Delete; +using Umbraco.Cms.Infrastructure.Migrations.Expressions.Execute; +using Umbraco.Cms.Infrastructure.Migrations.Expressions.Insert; +using Umbraco.Cms.Infrastructure.Migrations.Expressions.Rename; +using Umbraco.Cms.Infrastructure.Migrations.Expressions.Update; +using Umbraco.Cms.Infrastructure.Persistence; +using Umbraco.Cms.Infrastructure.Persistence.SqlSyntax; -namespace Umbraco.Core.Migrations +namespace Umbraco.Cms.Infrastructure.Migrations { /// /// Provides a base class to all migrations. diff --git a/src/Umbraco.Infrastructure/Migrations/MigrationBase_Extra.cs b/src/Umbraco.Infrastructure/Migrations/MigrationBase_Extra.cs index f4c6150073..b3ad73811e 100644 --- a/src/Umbraco.Infrastructure/Migrations/MigrationBase_Extra.cs +++ b/src/Umbraco.Infrastructure/Migrations/MigrationBase_Extra.cs @@ -1,10 +1,11 @@ using System.Collections.Generic; using System.Linq; -using Umbraco.Core.Persistence; -using Umbraco.Core.Persistence.DatabaseModelDefinitions; -using Umbraco.Core.Persistence.SqlSyntax; +using Umbraco.Cms.Infrastructure.Persistence; +using Umbraco.Cms.Infrastructure.Persistence.DatabaseModelDefinitions; +using Umbraco.Cms.Infrastructure.Persistence.SqlSyntax; +using Umbraco.Extensions; -namespace Umbraco.Core.Migrations +namespace Umbraco.Cms.Infrastructure.Migrations { /// /// Provides a base class to all migrations. @@ -45,7 +46,7 @@ namespace Umbraco.Core.Migrations var column = table.Columns.First(x => x.Name == columnName); var createSql = SqlSyntax.Format(column); - + Execute.Sql(string.Format(SqlSyntax.AddColumn, SqlSyntax.GetQuotedTableName(tableName), createSql)).Do(); } diff --git a/src/Umbraco.Infrastructure/Migrations/MigrationBuilder.cs b/src/Umbraco.Infrastructure/Migrations/MigrationBuilder.cs index 22961dea5a..e0006134d7 100644 --- a/src/Umbraco.Infrastructure/Migrations/MigrationBuilder.cs +++ b/src/Umbraco.Infrastructure/Migrations/MigrationBuilder.cs @@ -1,8 +1,8 @@ using System; -using Umbraco.Core.Composing; -using Umbraco.Core.DependencyInjection; +using Umbraco.Cms.Core.Migrations; +using Umbraco.Extensions; -namespace Umbraco.Core.Migrations +namespace Umbraco.Cms.Infrastructure.Migrations { public class MigrationBuilder : IMigrationBuilder { diff --git a/src/Umbraco.Infrastructure/Migrations/MigrationContext.cs b/src/Umbraco.Infrastructure/Migrations/MigrationContext.cs index 5c53c3cc46..01e270dc79 100644 --- a/src/Umbraco.Infrastructure/Migrations/MigrationContext.cs +++ b/src/Umbraco.Infrastructure/Migrations/MigrationContext.cs @@ -1,9 +1,10 @@ using System; using System.Collections.Generic; using Microsoft.Extensions.Logging; -using Umbraco.Core.Persistence; +using Umbraco.Cms.Core.Migrations; +using Umbraco.Cms.Infrastructure.Persistence; -namespace Umbraco.Core.Migrations +namespace Umbraco.Cms.Infrastructure.Migrations { /// /// Implements . diff --git a/src/Umbraco.Infrastructure/Migrations/MigrationExpressionBase.cs b/src/Umbraco.Infrastructure/Migrations/MigrationExpressionBase.cs index 56ba221205..5e710eaad5 100644 --- a/src/Umbraco.Infrastructure/Migrations/MigrationExpressionBase.cs +++ b/src/Umbraco.Infrastructure/Migrations/MigrationExpressionBase.cs @@ -1,13 +1,14 @@ -using System; +using System; using System.Collections.Generic; using System.IO; using System.Text; using Microsoft.Extensions.Logging; using NPoco; -using Umbraco.Core.Persistence; -using Umbraco.Core.Persistence.SqlSyntax; +using Umbraco.Cms.Infrastructure.Persistence; +using Umbraco.Cms.Infrastructure.Persistence.SqlSyntax; +using Umbraco.Extensions; -namespace Umbraco.Core.Migrations +namespace Umbraco.Cms.Infrastructure.Migrations { /// /// Provides a base class for migration expressions. @@ -34,11 +35,6 @@ namespace Umbraco.Core.Migrations public List Expressions => _expressions ?? (_expressions = new List()); - public virtual string Process(IMigrationContext context) - { - return ToString(); - } - protected virtual string GetSql() { return ToString(); diff --git a/src/Umbraco.Infrastructure/Migrations/MigrationPlan.cs b/src/Umbraco.Infrastructure/Migrations/MigrationPlan.cs index 67e5d0b41a..3bde224640 100644 --- a/src/Umbraco.Infrastructure/Migrations/MigrationPlan.cs +++ b/src/Umbraco.Infrastructure/Migrations/MigrationPlan.cs @@ -2,10 +2,12 @@ using System.Collections.Generic; using System.Linq; using Microsoft.Extensions.Logging; -using Umbraco.Core.Scoping; +using Umbraco.Cms.Core.Migrations; +using Umbraco.Cms.Core.Scoping; +using Umbraco.Extensions; using Type = System.Type; -namespace Umbraco.Core.Migrations +namespace Umbraco.Cms.Infrastructure.Migrations { /// /// Represents a migration plan. diff --git a/src/Umbraco.Infrastructure/Migrations/PostMigrations/ClearCsrfCookies.cs b/src/Umbraco.Infrastructure/Migrations/PostMigrations/ClearCsrfCookies.cs index 2616e3a926..90fb247f22 100644 --- a/src/Umbraco.Infrastructure/Migrations/PostMigrations/ClearCsrfCookies.cs +++ b/src/Umbraco.Infrastructure/Migrations/PostMigrations/ClearCsrfCookies.cs @@ -1,7 +1,8 @@ -using Umbraco.Core; -using Umbraco.Core.Migrations; +using Umbraco.Cms.Core.Migrations; +using Umbraco.Cms.Core.Web; +using Constants = Umbraco.Cms.Core.Constants; -namespace Umbraco.Web.Migrations.PostMigrations +namespace Umbraco.Cms.Infrastructure.Migrations.PostMigrations { /// /// Clears Csrf tokens. diff --git a/src/Umbraco.Infrastructure/Migrations/PostMigrations/IPublishedSnapshotRebuilder.cs b/src/Umbraco.Infrastructure/Migrations/PostMigrations/IPublishedSnapshotRebuilder.cs index 1b0549827e..94a2bc3aad 100644 --- a/src/Umbraco.Infrastructure/Migrations/PostMigrations/IPublishedSnapshotRebuilder.cs +++ b/src/Umbraco.Infrastructure/Migrations/PostMigrations/IPublishedSnapshotRebuilder.cs @@ -1,4 +1,4 @@ -namespace Umbraco.Core.Migrations.PostMigrations +namespace Umbraco.Cms.Infrastructure.Migrations.PostMigrations { /// /// Rebuilds the published snapshot. diff --git a/src/Umbraco.Infrastructure/Migrations/PostMigrations/PublishedSnapshotRebuilder.cs b/src/Umbraco.Infrastructure/Migrations/PostMigrations/PublishedSnapshotRebuilder.cs index 764e46af5d..b4afea633e 100644 --- a/src/Umbraco.Infrastructure/Migrations/PostMigrations/PublishedSnapshotRebuilder.cs +++ b/src/Umbraco.Infrastructure/Migrations/PostMigrations/PublishedSnapshotRebuilder.cs @@ -1,8 +1,8 @@ -using Umbraco.Core.Migrations.PostMigrations; -using Umbraco.Web.Cache; -using Umbraco.Web.PublishedCache; +using Umbraco.Cms.Core.Cache; +using Umbraco.Cms.Core.PublishedCache; +using Umbraco.Extensions; -namespace Umbraco.Web.Migrations.PostMigrations +namespace Umbraco.Cms.Infrastructure.Migrations.PostMigrations { /// /// Implements in Umbraco.Web (rebuilding). diff --git a/src/Umbraco.Infrastructure/Migrations/PostMigrations/RebuildPublishedSnapshot.cs b/src/Umbraco.Infrastructure/Migrations/PostMigrations/RebuildPublishedSnapshot.cs index 4905699fd4..ca39939ac9 100644 --- a/src/Umbraco.Infrastructure/Migrations/PostMigrations/RebuildPublishedSnapshot.cs +++ b/src/Umbraco.Infrastructure/Migrations/PostMigrations/RebuildPublishedSnapshot.cs @@ -1,4 +1,6 @@ -namespace Umbraco.Core.Migrations.PostMigrations +using Umbraco.Cms.Core.Migrations; + +namespace Umbraco.Cms.Infrastructure.Migrations.PostMigrations { /// /// Rebuilds the published snapshot. diff --git a/src/Umbraco.Infrastructure/Migrations/Upgrade/Common/CreateKeysAndIndexes.cs b/src/Umbraco.Infrastructure/Migrations/Upgrade/Common/CreateKeysAndIndexes.cs index 4872e0019d..5bd7ddbf2b 100644 --- a/src/Umbraco.Infrastructure/Migrations/Upgrade/Common/CreateKeysAndIndexes.cs +++ b/src/Umbraco.Infrastructure/Migrations/Upgrade/Common/CreateKeysAndIndexes.cs @@ -1,6 +1,6 @@ -using Umbraco.Core.Migrations.Install; +using Umbraco.Cms.Infrastructure.Migrations.Install; -namespace Umbraco.Core.Migrations.Upgrade.Common +namespace Umbraco.Cms.Infrastructure.Migrations.Upgrade.Common { public class CreateKeysAndIndexes : MigrationBase { @@ -11,8 +11,8 @@ namespace Umbraco.Core.Migrations.Upgrade.Common public override void Migrate() { // remove those that may already have keys - Delete.KeysAndIndexes(Constants.DatabaseSchema.Tables.KeyValue).Do(); - Delete.KeysAndIndexes(Constants.DatabaseSchema.Tables.PropertyData).Do(); + Delete.KeysAndIndexes(Cms.Core.Constants.DatabaseSchema.Tables.KeyValue).Do(); + Delete.KeysAndIndexes(Cms.Core.Constants.DatabaseSchema.Tables.PropertyData).Do(); // re-create *all* keys and indexes foreach (var x in DatabaseSchemaCreator.OrderedTables) diff --git a/src/Umbraco.Infrastructure/Migrations/Upgrade/Common/DeleteKeysAndIndexes.cs b/src/Umbraco.Infrastructure/Migrations/Upgrade/Common/DeleteKeysAndIndexes.cs index 9e4af17c09..e36af3bfa4 100644 --- a/src/Umbraco.Infrastructure/Migrations/Upgrade/Common/DeleteKeysAndIndexes.cs +++ b/src/Umbraco.Infrastructure/Migrations/Upgrade/Common/DeleteKeysAndIndexes.cs @@ -1,4 +1,4 @@ -namespace Umbraco.Core.Migrations.Upgrade.Common +namespace Umbraco.Cms.Infrastructure.Migrations.Upgrade.Common { public class DeleteKeysAndIndexes : MigrationBase { diff --git a/src/Umbraco.Infrastructure/Migrations/Upgrade/UmbracoPlan.cs b/src/Umbraco.Infrastructure/Migrations/Upgrade/UmbracoPlan.cs index c0a4f5bd35..9aacab1740 100644 --- a/src/Umbraco.Infrastructure/Migrations/Upgrade/UmbracoPlan.cs +++ b/src/Umbraco.Infrastructure/Migrations/Upgrade/UmbracoPlan.cs @@ -1,17 +1,17 @@ using System; -using Semver; -using Umbraco.Core.Composing; -using Umbraco.Core.Configuration; -using Umbraco.Core.Configuration.Models; -using Umbraco.Core.Migrations.Upgrade.Common; -using Umbraco.Core.Migrations.Upgrade.V_8_0_0; -using Umbraco.Core.Migrations.Upgrade.V_8_0_1; -using Umbraco.Core.Migrations.Upgrade.V_8_1_0; -using Umbraco.Core.Migrations.Upgrade.V_8_6_0; -using Umbraco.Core.Migrations.Upgrade.V_8_9_0; -using Umbraco.Core.Migrations.Upgrade.V_8_10_0; +using Umbraco.Cms.Core.Configuration; +using Umbraco.Cms.Core.Semver; +using Umbraco.Cms.Infrastructure.Migrations.Upgrade.Common; +using Umbraco.Cms.Infrastructure.Migrations.Upgrade.V_8_0_0; +using Umbraco.Cms.Infrastructure.Migrations.Upgrade.V_8_0_1; +using Umbraco.Cms.Infrastructure.Migrations.Upgrade.V_8_1_0; +using Umbraco.Cms.Infrastructure.Migrations.Upgrade.V_8_10_0; +using Umbraco.Cms.Infrastructure.Migrations.Upgrade.V_8_6_0; +using Umbraco.Cms.Infrastructure.Migrations.Upgrade.V_8_7_0; +using Umbraco.Cms.Infrastructure.Migrations.Upgrade.V_8_9_0; +using Umbraco.Extensions; -namespace Umbraco.Core.Migrations.Upgrade +namespace Umbraco.Cms.Infrastructure.Migrations.Upgrade { /// /// Represents Umbraco's migration plan. @@ -25,7 +25,7 @@ namespace Umbraco.Core.Migrations.Upgrade /// Initializes a new instance of the class. /// public UmbracoPlan(IUmbracoVersion umbracoVersion) - : base(Constants.System.UmbracoUpgradePlanName) + : base(Cms.Core.Constants.System.UmbracoUpgradePlanName) { _umbracoVersion = umbracoVersion; DefinePlan(); diff --git a/src/Umbraco.Infrastructure/Migrations/Upgrade/Upgrader.cs b/src/Umbraco.Infrastructure/Migrations/Upgrade/Upgrader.cs index 9096a14146..58b7f9e07b 100644 --- a/src/Umbraco.Infrastructure/Migrations/Upgrade/Upgrader.cs +++ b/src/Umbraco.Infrastructure/Migrations/Upgrade/Upgrader.cs @@ -1,9 +1,9 @@ using System; using Microsoft.Extensions.Logging; -using Umbraco.Core.Scoping; -using Umbraco.Core.Services; +using Umbraco.Cms.Core.Scoping; +using Umbraco.Cms.Core.Services; -namespace Umbraco.Core.Migrations.Upgrade +namespace Umbraco.Cms.Infrastructure.Migrations.Upgrade { /// /// Represents an upgrader. diff --git a/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/AddContentNuTable.cs b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/AddContentNuTable.cs index 5342755ebf..35552e4c0e 100644 --- a/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/AddContentNuTable.cs +++ b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/AddContentNuTable.cs @@ -1,9 +1,7 @@ -using System.Data; -using System.Linq; -using Umbraco.Core.Persistence.DatabaseAnnotations; -using Umbraco.Core.Persistence.Dtos; +using Umbraco.Cms.Infrastructure.Persistence.Dtos; +using Umbraco.Extensions; -namespace Umbraco.Core.Migrations.Upgrade.V_8_0_0 +namespace Umbraco.Cms.Infrastructure.Migrations.Upgrade.V_8_0_0 { class AddContentNuTable : MigrationBase { diff --git a/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/AddContentTypeIsElementColumn.cs b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/AddContentTypeIsElementColumn.cs index 1df11a3e99..d0425dcb76 100644 --- a/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/AddContentTypeIsElementColumn.cs +++ b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/AddContentTypeIsElementColumn.cs @@ -1,6 +1,6 @@ -using Umbraco.Core.Persistence.Dtos; +using Umbraco.Cms.Infrastructure.Persistence.Dtos; -namespace Umbraco.Core.Migrations.Upgrade.V_8_0_0 +namespace Umbraco.Cms.Infrastructure.Migrations.Upgrade.V_8_0_0 { public class AddContentTypeIsElementColumn : MigrationBase { diff --git a/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/AddLockObjects.cs b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/AddLockObjects.cs index 7c0b26dd53..de6889c157 100644 --- a/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/AddLockObjects.cs +++ b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/AddLockObjects.cs @@ -1,7 +1,7 @@ -using Umbraco.Core.Persistence; -using Umbraco.Core.Persistence.Dtos; +using Umbraco.Cms.Infrastructure.Persistence; +using Umbraco.Cms.Infrastructure.Persistence.Dtos; -namespace Umbraco.Core.Migrations.Upgrade.V_8_0_0 +namespace Umbraco.Cms.Infrastructure.Migrations.Upgrade.V_8_0_0 { public class AddLockObjects : MigrationBase { @@ -12,14 +12,14 @@ namespace Umbraco.Core.Migrations.Upgrade.V_8_0_0 public override void Migrate() { // some may already exist, just ensure everything we need is here - EnsureLockObject(Constants.Locks.Servers, "Servers"); - EnsureLockObject(Constants.Locks.ContentTypes, "ContentTypes"); - EnsureLockObject(Constants.Locks.ContentTree, "ContentTree"); - EnsureLockObject(Constants.Locks.MediaTree, "MediaTree"); - EnsureLockObject(Constants.Locks.MemberTree, "MemberTree"); - EnsureLockObject(Constants.Locks.MediaTypes, "MediaTypes"); - EnsureLockObject(Constants.Locks.MemberTypes, "MemberTypes"); - EnsureLockObject(Constants.Locks.Domains, "Domains"); + EnsureLockObject(Cms.Core.Constants.Locks.Servers, "Servers"); + EnsureLockObject(Cms.Core.Constants.Locks.ContentTypes, "ContentTypes"); + EnsureLockObject(Cms.Core.Constants.Locks.ContentTree, "ContentTree"); + EnsureLockObject(Cms.Core.Constants.Locks.MediaTree, "MediaTree"); + EnsureLockObject(Cms.Core.Constants.Locks.MemberTree, "MemberTree"); + EnsureLockObject(Cms.Core.Constants.Locks.MediaTypes, "MediaTypes"); + EnsureLockObject(Cms.Core.Constants.Locks.MemberTypes, "MemberTypes"); + EnsureLockObject(Cms.Core.Constants.Locks.Domains, "Domains"); } private void EnsureLockObject(int id, string name) diff --git a/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/AddLogTableColumns.cs b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/AddLogTableColumns.cs index c8a6e38dad..8cd193bb2c 100644 --- a/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/AddLogTableColumns.cs +++ b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/AddLogTableColumns.cs @@ -1,7 +1,7 @@ using System.Linq; -using Umbraco.Core.Persistence.Dtos; +using Umbraco.Cms.Infrastructure.Persistence.Dtos; -namespace Umbraco.Core.Migrations.Upgrade.V_8_0_0 +namespace Umbraco.Cms.Infrastructure.Migrations.Upgrade.V_8_0_0 { public class AddLogTableColumns : MigrationBase { @@ -14,7 +14,7 @@ namespace Umbraco.Core.Migrations.Upgrade.V_8_0_0 var columns = SqlSyntax.GetColumnsInSchema(Context.Database).ToList(); AddColumnIfNotExists(columns, "entityType"); - AddColumnIfNotExists(columns, "parameters"); + AddColumnIfNotExists(columns, "parameters"); } } } diff --git a/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/AddPackagesSectionAccess.cs b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/AddPackagesSectionAccess.cs index d44e637a2c..8ca31127d1 100644 --- a/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/AddPackagesSectionAccess.cs +++ b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/AddPackagesSectionAccess.cs @@ -1,10 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace Umbraco.Core.Migrations.Upgrade.V_8_0_0 +namespace Umbraco.Cms.Infrastructure.Migrations.Upgrade.V_8_0_0 { public class AddPackagesSectionAccess : MigrationBase { @@ -16,9 +10,9 @@ namespace Umbraco.Core.Migrations.Upgrade.V_8_0_0 { // Any user group which had access to the Developer section should have access to Packages Database.Execute($@" - insert into {Constants.DatabaseSchema.Tables.UserGroup2App} - select userGroupId, '{Constants.Applications.Packages}' - from {Constants.DatabaseSchema.Tables.UserGroup2App} + insert into {Cms.Core.Constants.DatabaseSchema.Tables.UserGroup2App} + select userGroupId, '{Cms.Core.Constants.Applications.Packages}' + from {Cms.Core.Constants.DatabaseSchema.Tables.UserGroup2App} where app='developer'"); } } diff --git a/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/AddTypedLabels.cs b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/AddTypedLabels.cs index 66f9114370..68b7d1524b 100644 --- a/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/AddTypedLabels.cs +++ b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/AddTypedLabels.cs @@ -2,10 +2,10 @@ using System.Globalization; using System.Linq; using NPoco; -using Umbraco.Core.Persistence; -using Umbraco.Core.Persistence.Dtos; +using Umbraco.Cms.Infrastructure.Persistence.Dtos; +using Umbraco.Extensions; -namespace Umbraco.Core.Migrations.Upgrade.V_8_0_0 +namespace Umbraco.Cms.Infrastructure.Migrations.Upgrade.V_8_0_0 { public class AddTypedLabels : MigrationBase { @@ -30,65 +30,65 @@ namespace Umbraco.Core.Migrations.Upgrade.V_8_0_0 SortOrder = sortOrder, UniqueId = new Guid(uniqueId), Text = text, - NodeObjectType = Constants.ObjectTypes.DataType, + NodeObjectType = Cms.Core.Constants.ObjectTypes.DataType, CreateDate = DateTime.Now }; - Database.Insert(Constants.DatabaseSchema.Tables.Node, "id", false, nodeDto); + Database.Insert(Cms.Core.Constants.DatabaseSchema.Tables.Node, "id", false, nodeDto); } if (SqlSyntax.SupportsIdentityInsert()) - Database.Execute(new Sql($"SET IDENTITY_INSERT {SqlSyntax.GetQuotedTableName(Constants.DatabaseSchema.Tables.Node)} ON ")); + Database.Execute(new Sql($"SET IDENTITY_INSERT {SqlSyntax.GetQuotedTableName(Cms.Core.Constants.DatabaseSchema.Tables.Node)} ON ")); - InsertNodeDto(Constants.DataTypes.LabelInt, 36, "8e7f995c-bd81-4627-9932-c40e568ec788", "Label (integer)"); - InsertNodeDto(Constants.DataTypes.LabelBigint, 36, "930861bf-e262-4ead-a704-f99453565708", "Label (bigint)"); - InsertNodeDto(Constants.DataTypes.LabelDateTime, 37, "0e9794eb-f9b5-4f20-a788-93acd233a7e4", "Label (datetime)"); - InsertNodeDto(Constants.DataTypes.LabelTime, 38, "a97cec69-9b71-4c30-8b12-ec398860d7e8", "Label (time)"); - InsertNodeDto(Constants.DataTypes.LabelDecimal, 39, "8f1ef1e1-9de4-40d3-a072-6673f631ca64", "Label (decimal)"); + InsertNodeDto(Cms.Core.Constants.DataTypes.LabelInt, 36, "8e7f995c-bd81-4627-9932-c40e568ec788", "Label (integer)"); + InsertNodeDto(Cms.Core.Constants.DataTypes.LabelBigint, 36, "930861bf-e262-4ead-a704-f99453565708", "Label (bigint)"); + InsertNodeDto(Cms.Core.Constants.DataTypes.LabelDateTime, 37, "0e9794eb-f9b5-4f20-a788-93acd233a7e4", "Label (datetime)"); + InsertNodeDto(Cms.Core.Constants.DataTypes.LabelTime, 38, "a97cec69-9b71-4c30-8b12-ec398860d7e8", "Label (time)"); + InsertNodeDto(Cms.Core.Constants.DataTypes.LabelDecimal, 39, "8f1ef1e1-9de4-40d3-a072-6673f631ca64", "Label (decimal)"); if (SqlSyntax.SupportsIdentityInsert()) - Database.Execute(new Sql($"SET IDENTITY_INSERT {SqlSyntax.GetQuotedTableName(Constants.DatabaseSchema.Tables.Node)} OFF ")); + Database.Execute(new Sql($"SET IDENTITY_INSERT {SqlSyntax.GetQuotedTableName(Cms.Core.Constants.DatabaseSchema.Tables.Node)} OFF ")); void InsertDataTypeDto(int id, string dbType, string configuration = null) { var dataTypeDto = new DataTypeDto { NodeId = id, - EditorAlias = Constants.PropertyEditors.Aliases.Label, + EditorAlias = Cms.Core.Constants.PropertyEditors.Aliases.Label, DbType = dbType }; if (configuration != null) dataTypeDto.Configuration = configuration; - Database.Insert(Constants.DatabaseSchema.Tables.DataType, "pk", false, dataTypeDto); + Database.Insert(Cms.Core.Constants.DatabaseSchema.Tables.DataType, "pk", false, dataTypeDto); } - InsertDataTypeDto(Constants.DataTypes.LabelInt, "Integer", "{\"umbracoDataValueType\":\"INT\"}"); - InsertDataTypeDto(Constants.DataTypes.LabelBigint, "Nvarchar", "{\"umbracoDataValueType\":\"BIGINT\"}"); - InsertDataTypeDto(Constants.DataTypes.LabelDateTime, "Date", "{\"umbracoDataValueType\":\"DATETIME\"}"); - InsertDataTypeDto(Constants.DataTypes.LabelDecimal, "Decimal", "{\"umbracoDataValueType\":\"DECIMAL\"}"); - InsertDataTypeDto(Constants.DataTypes.LabelTime, "Date", "{\"umbracoDataValueType\":\"TIME\"}"); + InsertDataTypeDto(Cms.Core.Constants.DataTypes.LabelInt, "Integer", "{\"umbracoDataValueType\":\"INT\"}"); + InsertDataTypeDto(Cms.Core.Constants.DataTypes.LabelBigint, "Nvarchar", "{\"umbracoDataValueType\":\"BIGINT\"}"); + InsertDataTypeDto(Cms.Core.Constants.DataTypes.LabelDateTime, "Date", "{\"umbracoDataValueType\":\"DATETIME\"}"); + InsertDataTypeDto(Cms.Core.Constants.DataTypes.LabelDecimal, "Decimal", "{\"umbracoDataValueType\":\"DECIMAL\"}"); + InsertDataTypeDto(Cms.Core.Constants.DataTypes.LabelTime, "Date", "{\"umbracoDataValueType\":\"TIME\"}"); // flip known property types var labelPropertyTypes = Database.Fetch(Sql() .Select(x => x.Id, x => x.Alias) .From() - .Where(x => x.DataTypeId == Constants.DataTypes.LabelString)); + .Where(x => x.DataTypeId == Cms.Core.Constants.DataTypes.LabelString)); - var intPropertyAliases = new[] { Constants.Conventions.Media.Width, Constants.Conventions.Media.Height, Constants.Conventions.Member.FailedPasswordAttempts }; - var bigintPropertyAliases = new[] { Constants.Conventions.Media.Bytes }; - var dtPropertyAliases = new[] { Constants.Conventions.Member.LastLockoutDate, Constants.Conventions.Member.LastLoginDate, Constants.Conventions.Member.LastPasswordChangeDate }; + var intPropertyAliases = new[] { Cms.Core.Constants.Conventions.Media.Width, Cms.Core.Constants.Conventions.Media.Height, Cms.Core.Constants.Conventions.Member.FailedPasswordAttempts }; + var bigintPropertyAliases = new[] { Cms.Core.Constants.Conventions.Media.Bytes }; + var dtPropertyAliases = new[] { Cms.Core.Constants.Conventions.Member.LastLockoutDate, Cms.Core.Constants.Conventions.Member.LastLoginDate, Cms.Core.Constants.Conventions.Member.LastPasswordChangeDate }; var intPropertyTypes = labelPropertyTypes.Where(pt => intPropertyAliases.Contains(pt.Alias)).Select(pt => pt.Id).ToArray(); var bigintPropertyTypes = labelPropertyTypes.Where(pt => bigintPropertyAliases.Contains(pt.Alias)).Select(pt => pt.Id).ToArray(); var dtPropertyTypes = labelPropertyTypes.Where(pt => dtPropertyAliases.Contains(pt.Alias)).Select(pt => pt.Id).ToArray(); - Database.Execute(Sql().Update(u => u.Set(x => x.DataTypeId, Constants.DataTypes.LabelInt)).WhereIn(x => x.Id, intPropertyTypes)); - Database.Execute(Sql().Update(u => u.Set(x => x.DataTypeId, Constants.DataTypes.LabelInt)).WhereIn(x => x.Id, intPropertyTypes)); - Database.Execute(Sql().Update(u => u.Set(x => x.DataTypeId, Constants.DataTypes.LabelBigint)).WhereIn(x => x.Id, bigintPropertyTypes)); - Database.Execute(Sql().Update(u => u.Set(x => x.DataTypeId, Constants.DataTypes.LabelDateTime)).WhereIn(x => x.Id, dtPropertyTypes)); + Database.Execute(Sql().Update(u => u.Set(x => x.DataTypeId, Cms.Core.Constants.DataTypes.LabelInt)).WhereIn(x => x.Id, intPropertyTypes)); + Database.Execute(Sql().Update(u => u.Set(x => x.DataTypeId, Cms.Core.Constants.DataTypes.LabelInt)).WhereIn(x => x.Id, intPropertyTypes)); + Database.Execute(Sql().Update(u => u.Set(x => x.DataTypeId, Cms.Core.Constants.DataTypes.LabelBigint)).WhereIn(x => x.Id, bigintPropertyTypes)); + Database.Execute(Sql().Update(u => u.Set(x => x.DataTypeId, Cms.Core.Constants.DataTypes.LabelDateTime)).WhereIn(x => x.Id, dtPropertyTypes)); // update values for known property types // depending on the size of the site, that *may* take time diff --git a/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/AddVariationTables1A.cs b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/AddVariationTables1A.cs index a60e8c149c..327a5df4da 100644 --- a/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/AddVariationTables1A.cs +++ b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/AddVariationTables1A.cs @@ -1,7 +1,7 @@ using System; -using Umbraco.Core.Persistence.Dtos; +using Umbraco.Cms.Infrastructure.Persistence.Dtos; -namespace Umbraco.Core.Migrations.Upgrade.V_8_0_0 +namespace Umbraco.Cms.Infrastructure.Migrations.Upgrade.V_8_0_0 { public class AddVariationTables1A : MigrationBase { @@ -23,10 +23,10 @@ namespace Umbraco.Core.Migrations.Upgrade.V_8_0_0 // but we need to take care of ppl caught into the state // was not used - Delete.Column("available").FromTable(Constants.DatabaseSchema.Tables.ContentVersionCultureVariation).Do(); + Delete.Column("available").FromTable(Cms.Core.Constants.DatabaseSchema.Tables.ContentVersionCultureVariation).Do(); // was not used - Delete.Column("availableDate").FromTable(Constants.DatabaseSchema.Tables.ContentVersionCultureVariation).Do(); + Delete.Column("availableDate").FromTable(Cms.Core.Constants.DatabaseSchema.Tables.ContentVersionCultureVariation).Do(); //special trick to add the column without constraints and return the sql to add them later AddColumn("date", out var sqls); @@ -36,8 +36,8 @@ namespace Umbraco.Core.Migrations.Upgrade.V_8_0_0 foreach (var sql in sqls) Execute.Sql(sql).Do(); // name, languageId are now non-nullable - AlterColumn(Constants.DatabaseSchema.Tables.ContentVersionCultureVariation, "name"); - AlterColumn(Constants.DatabaseSchema.Tables.ContentVersionCultureVariation, "languageId"); + AlterColumn(Cms.Core.Constants.DatabaseSchema.Tables.ContentVersionCultureVariation, "name"); + AlterColumn(Cms.Core.Constants.DatabaseSchema.Tables.ContentVersionCultureVariation, "languageId"); Create.Table().Do(); } diff --git a/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/AddVariationTables2.cs b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/AddVariationTables2.cs index 4044b5a173..dfe8cccfc7 100644 --- a/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/AddVariationTables2.cs +++ b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/AddVariationTables2.cs @@ -1,7 +1,6 @@ -using System; -using Umbraco.Core.Persistence.Dtos; +using Umbraco.Cms.Infrastructure.Persistence.Dtos; -namespace Umbraco.Core.Migrations.Upgrade.V_8_0_0 +namespace Umbraco.Cms.Infrastructure.Migrations.Upgrade.V_8_0_0 { public class AddVariationTables2 : MigrationBase { diff --git a/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/ContentVariationMigration.cs b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/ContentVariationMigration.cs index eabbd34b08..8e8111a04c 100644 --- a/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/ContentVariationMigration.cs +++ b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/ContentVariationMigration.cs @@ -1,16 +1,8 @@ using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using NPoco; -using Umbraco.Core.Migrations.Upgrade.V_8_0_0.Models; -using Umbraco.Core.Persistence; -using Umbraco.Core.Persistence.DatabaseAnnotations; -using Umbraco.Core.Persistence.DatabaseModelDefinitions; -using Umbraco.Core.Persistence.Dtos; +using Umbraco.Cms.Infrastructure.Migrations.Upgrade.V_8_0_0.Models; +using Umbraco.Extensions; -namespace Umbraco.Core.Migrations.Upgrade.V_8_0_0 +namespace Umbraco.Cms.Infrastructure.Migrations.Upgrade.V_8_0_0 { public class ContentVariationMigration : MigrationBase { @@ -66,9 +58,9 @@ namespace Umbraco.Core.Migrations.Upgrade.V_8_0_0 // we *need* to use these private DTOs here, which does *not* have extra properties, which would kill the migration - - + + } } diff --git a/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/ConvertRelatedLinksToMultiUrlPicker.cs b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/ConvertRelatedLinksToMultiUrlPicker.cs index b82d1eab8b..71818fe285 100644 --- a/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/ConvertRelatedLinksToMultiUrlPicker.cs +++ b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/ConvertRelatedLinksToMultiUrlPicker.cs @@ -2,11 +2,12 @@ using System.Linq; using System.Runtime.Serialization; using Newtonsoft.Json; -using Umbraco.Core.Migrations.Upgrade.V_8_0_0.Models; -using Umbraco.Core.Persistence; -using Umbraco.Core.Persistence.Dtos; +using Umbraco.Cms.Core; +using Umbraco.Cms.Infrastructure.Migrations.Upgrade.V_8_0_0.Models; +using Umbraco.Cms.Infrastructure.Persistence.Dtos; +using Umbraco.Extensions; -namespace Umbraco.Core.Migrations.Upgrade.V_8_0_0 +namespace Umbraco.Cms.Infrastructure.Migrations.Upgrade.V_8_0_0 { public class ConvertRelatedLinksToMultiUrlPicker : MigrationBase { @@ -18,8 +19,8 @@ namespace Umbraco.Core.Migrations.Upgrade.V_8_0_0 var sqlDataTypes = Sql() .Select() .From() - .Where(x => x.EditorAlias == Constants.PropertyEditors.Legacy.Aliases.RelatedLinks - || x.EditorAlias == Constants.PropertyEditors.Legacy.Aliases.RelatedLinks2); + .Where(x => x.EditorAlias == Cms.Core.Constants.PropertyEditors.Legacy.Aliases.RelatedLinks + || x.EditorAlias == Cms.Core.Constants.PropertyEditors.Legacy.Aliases.RelatedLinks2); var dataTypes = Database.Fetch(sqlDataTypes); var dataTypeIds = dataTypes.Select(x => x.NodeId).ToList(); @@ -28,7 +29,7 @@ namespace Umbraco.Core.Migrations.Upgrade.V_8_0_0 foreach (var dataType in dataTypes) { - dataType.EditorAlias = Constants.PropertyEditors.Aliases.MultiUrlPicker; + dataType.EditorAlias = Cms.Core.Constants.PropertyEditors.Aliases.MultiUrlPicker; Database.Update(dataType); } diff --git a/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/DataTypeMigration.cs b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/DataTypeMigration.cs index d813550750..30957e949a 100644 --- a/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/DataTypeMigration.cs +++ b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/DataTypeMigration.cs @@ -2,13 +2,13 @@ using System.Collections.Generic; using System.Linq; using Microsoft.Extensions.Logging; -using Umbraco.Core.Migrations.Upgrade.V_8_0_0.DataTypes; -using Umbraco.Core.Persistence; -using Umbraco.Core.Persistence.Dtos; -using Umbraco.Core.PropertyEditors; -using Umbraco.Core.Serialization; +using Umbraco.Cms.Core.PropertyEditors; +using Umbraco.Cms.Core.Serialization; +using Umbraco.Cms.Infrastructure.Migrations.Upgrade.V_8_0_0.DataTypes; +using Umbraco.Cms.Infrastructure.Persistence.Dtos; +using Umbraco.Extensions; -namespace Umbraco.Core.Migrations.Upgrade.V_8_0_0 +namespace Umbraco.Cms.Infrastructure.Migrations.Upgrade.V_8_0_0 { public class DataTypeMigration : MigrationBase @@ -20,14 +20,14 @@ namespace Umbraco.Core.Migrations.Upgrade.V_8_0_0 private static readonly ISet LegacyAliases = new HashSet() { - Constants.PropertyEditors.Legacy.Aliases.Date, - Constants.PropertyEditors.Legacy.Aliases.Textbox, - Constants.PropertyEditors.Legacy.Aliases.ContentPicker2, - Constants.PropertyEditors.Legacy.Aliases.MediaPicker2, - Constants.PropertyEditors.Legacy.Aliases.MemberPicker2, - Constants.PropertyEditors.Legacy.Aliases.RelatedLinks2, - Constants.PropertyEditors.Legacy.Aliases.TextboxMultiple, - Constants.PropertyEditors.Legacy.Aliases.MultiNodeTreePicker2, + Cms.Core.Constants.PropertyEditors.Legacy.Aliases.Date, + Cms.Core.Constants.PropertyEditors.Legacy.Aliases.Textbox, + Cms.Core.Constants.PropertyEditors.Legacy.Aliases.ContentPicker2, + Cms.Core.Constants.PropertyEditors.Legacy.Aliases.MediaPicker2, + Cms.Core.Constants.PropertyEditors.Legacy.Aliases.MemberPicker2, + Cms.Core.Constants.PropertyEditors.Legacy.Aliases.RelatedLinks2, + Cms.Core.Constants.PropertyEditors.Legacy.Aliases.TextboxMultiple, + Cms.Core.Constants.PropertyEditors.Legacy.Aliases.MultiNodeTreePicker2, }; public DataTypeMigration(IMigrationContext context, @@ -49,10 +49,10 @@ namespace Umbraco.Core.Migrations.Upgrade.V_8_0_0 Delete.Column("pk").FromTable("cmsDataType").Do(); // rename the table - Rename.Table("cmsDataType").To(Constants.DatabaseSchema.Tables.DataType).Do(); + Rename.Table("cmsDataType").To(Cms.Core.Constants.DatabaseSchema.Tables.DataType).Do(); // create column - AddColumn(Constants.DatabaseSchema.Tables.DataType, "config"); + AddColumn(Cms.Core.Constants.DatabaseSchema.Tables.DataType, "config"); Execute.Sql(Sql().Update(u => u.Set(x => x.Configuration, string.Empty))).Do(); // renames diff --git a/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/DataTypes/ContentPickerPreValueMigrator.cs b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/DataTypes/ContentPickerPreValueMigrator.cs index f445742aa9..231c59b315 100644 --- a/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/DataTypes/ContentPickerPreValueMigrator.cs +++ b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/DataTypes/ContentPickerPreValueMigrator.cs @@ -1,9 +1,9 @@ -namespace Umbraco.Core.Migrations.Upgrade.V_8_0_0.DataTypes +namespace Umbraco.Cms.Infrastructure.Migrations.Upgrade.V_8_0_0.DataTypes { class ContentPickerPreValueMigrator : DefaultPreValueMigrator { public override bool CanMigrate(string editorAlias) - => editorAlias == Constants.PropertyEditors.Legacy.Aliases.ContentPicker2; + => editorAlias == Cms.Core.Constants.PropertyEditors.Legacy.Aliases.ContentPicker2; public override string GetNewAlias(string editorAlias) => null; diff --git a/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/DataTypes/DecimalPreValueMigrator.cs b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/DataTypes/DecimalPreValueMigrator.cs index 8dc0f1dcd5..e5a331cfbe 100644 --- a/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/DataTypes/DecimalPreValueMigrator.cs +++ b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/DataTypes/DecimalPreValueMigrator.cs @@ -1,6 +1,7 @@ using Newtonsoft.Json; +using Umbraco.Extensions; -namespace Umbraco.Core.Migrations.Upgrade.V_8_0_0.DataTypes +namespace Umbraco.Cms.Infrastructure.Migrations.Upgrade.V_8_0_0.DataTypes { class DecimalPreValueMigrator : DefaultPreValueMigrator { diff --git a/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/DataTypes/DefaultPreValueMigrator.cs b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/DataTypes/DefaultPreValueMigrator.cs index 0c8161c9ef..0d3b25259c 100644 --- a/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/DataTypes/DefaultPreValueMigrator.cs +++ b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/DataTypes/DefaultPreValueMigrator.cs @@ -2,8 +2,9 @@ using System.Collections.Generic; using System.Linq; using Newtonsoft.Json; +using Umbraco.Extensions; -namespace Umbraco.Core.Migrations.Upgrade.V_8_0_0.DataTypes +namespace Umbraco.Cms.Infrastructure.Migrations.Upgrade.V_8_0_0.DataTypes { class DefaultPreValueMigrator : IPreValueMigrator { diff --git a/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/DataTypes/DropDownFlexiblePreValueMigrator.cs b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/DataTypes/DropDownFlexiblePreValueMigrator.cs index 35ca574bab..fe55844c95 100644 --- a/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/DataTypes/DropDownFlexiblePreValueMigrator.cs +++ b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/DataTypes/DropDownFlexiblePreValueMigrator.cs @@ -1,8 +1,7 @@ using System.Collections.Generic; -using System.Linq; -using Umbraco.Core.PropertyEditors; +using Umbraco.Cms.Core.PropertyEditors; -namespace Umbraco.Core.Migrations.Upgrade.V_8_0_0.DataTypes +namespace Umbraco.Cms.Infrastructure.Migrations.Upgrade.V_8_0_0.DataTypes { class DropDownFlexiblePreValueMigrator : IPreValueMigrator { diff --git a/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/DataTypes/IPreValueMigrator.cs b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/DataTypes/IPreValueMigrator.cs index 01e0ed3875..c6ed38ae16 100644 --- a/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/DataTypes/IPreValueMigrator.cs +++ b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/DataTypes/IPreValueMigrator.cs @@ -1,6 +1,6 @@ using System.Collections.Generic; -namespace Umbraco.Core.Migrations.Upgrade.V_8_0_0.DataTypes +namespace Umbraco.Cms.Infrastructure.Migrations.Upgrade.V_8_0_0.DataTypes { /// /// Defines a service migrating preValues. diff --git a/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/DataTypes/ListViewPreValueMigrator.cs b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/DataTypes/ListViewPreValueMigrator.cs index d8daf9b5e6..01cd171b6b 100644 --- a/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/DataTypes/ListViewPreValueMigrator.cs +++ b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/DataTypes/ListViewPreValueMigrator.cs @@ -1,8 +1,9 @@ using System.Collections.Generic; using System.Linq; using Newtonsoft.Json; +using Umbraco.Extensions; -namespace Umbraco.Core.Migrations.Upgrade.V_8_0_0.DataTypes +namespace Umbraco.Cms.Infrastructure.Migrations.Upgrade.V_8_0_0.DataTypes { class ListViewPreValueMigrator : DefaultPreValueMigrator { diff --git a/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/DataTypes/MarkdownEditorPreValueMigrator.cs b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/DataTypes/MarkdownEditorPreValueMigrator.cs index a8ebc768fc..1c0004506a 100644 --- a/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/DataTypes/MarkdownEditorPreValueMigrator.cs +++ b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/DataTypes/MarkdownEditorPreValueMigrator.cs @@ -1,12 +1,9 @@ -using System.Collections.Generic; -using Newtonsoft.Json; - -namespace Umbraco.Core.Migrations.Upgrade.V_8_0_0.DataTypes +namespace Umbraco.Cms.Infrastructure.Migrations.Upgrade.V_8_0_0.DataTypes { class MarkdownEditorPreValueMigrator : DefaultPreValueMigrator //PreValueMigratorBase { public override bool CanMigrate(string editorAlias) - => editorAlias == Constants.PropertyEditors.Aliases.MarkdownEditor; + => editorAlias == Cms.Core.Constants.PropertyEditors.Aliases.MarkdownEditor; protected override object GetPreValueValue(PreValueDto preValue) { diff --git a/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/DataTypes/MediaPickerPreValueMigrator.cs b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/DataTypes/MediaPickerPreValueMigrator.cs index 922d886595..39b67984c8 100644 --- a/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/DataTypes/MediaPickerPreValueMigrator.cs +++ b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/DataTypes/MediaPickerPreValueMigrator.cs @@ -1,20 +1,20 @@ using System.Linq; -namespace Umbraco.Core.Migrations.Upgrade.V_8_0_0.DataTypes +namespace Umbraco.Cms.Infrastructure.Migrations.Upgrade.V_8_0_0.DataTypes { class MediaPickerPreValueMigrator : DefaultPreValueMigrator //PreValueMigratorBase { private readonly string[] _editors = { - Constants.PropertyEditors.Legacy.Aliases.MediaPicker2, - Constants.PropertyEditors.Aliases.MediaPicker + Cms.Core.Constants.PropertyEditors.Legacy.Aliases.MediaPicker2, + Cms.Core.Constants.PropertyEditors.Aliases.MediaPicker }; public override bool CanMigrate(string editorAlias) => _editors.Contains(editorAlias); public override string GetNewAlias(string editorAlias) - => Constants.PropertyEditors.Aliases.MediaPicker; + => Cms.Core.Constants.PropertyEditors.Aliases.MediaPicker; // you wish - but MediaPickerConfiguration lives in Umbraco.Web /* diff --git a/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/DataTypes/NestedContentPreValueMigrator.cs b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/DataTypes/NestedContentPreValueMigrator.cs index 22c87f8503..aba3e3f407 100644 --- a/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/DataTypes/NestedContentPreValueMigrator.cs +++ b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/DataTypes/NestedContentPreValueMigrator.cs @@ -1,7 +1,7 @@ -using System.Collections.Generic; -using Newtonsoft.Json; +using Newtonsoft.Json; +using Umbraco.Extensions; -namespace Umbraco.Core.Migrations.Upgrade.V_8_0_0.DataTypes +namespace Umbraco.Cms.Infrastructure.Migrations.Upgrade.V_8_0_0.DataTypes { class NestedContentPreValueMigrator : DefaultPreValueMigrator //PreValueMigratorBase { diff --git a/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/DataTypes/PreValueDto.cs b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/DataTypes/PreValueDto.cs index b6ab622510..0531d571f3 100644 --- a/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/DataTypes/PreValueDto.cs +++ b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/DataTypes/PreValueDto.cs @@ -1,6 +1,6 @@ using NPoco; -namespace Umbraco.Core.Migrations.Upgrade.V_8_0_0.DataTypes +namespace Umbraco.Cms.Infrastructure.Migrations.Upgrade.V_8_0_0.DataTypes { [TableName("cmsDataTypePreValues")] [ExplicitColumns] diff --git a/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/DataTypes/PreValueMigratorBase.cs b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/DataTypes/PreValueMigratorBase.cs index 62e2b2347b..d4f5f4c425 100644 --- a/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/DataTypes/PreValueMigratorBase.cs +++ b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/DataTypes/PreValueMigratorBase.cs @@ -1,6 +1,6 @@ using System.Collections.Generic; -namespace Umbraco.Core.Migrations.Upgrade.V_8_0_0.DataTypes +namespace Umbraco.Cms.Infrastructure.Migrations.Upgrade.V_8_0_0.DataTypes { public abstract class PreValueMigratorBase : IPreValueMigrator { diff --git a/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/DataTypes/PreValueMigratorCollection.cs b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/DataTypes/PreValueMigratorCollection.cs index fbe8e38688..5f9d87269d 100644 --- a/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/DataTypes/PreValueMigratorCollection.cs +++ b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/DataTypes/PreValueMigratorCollection.cs @@ -1,9 +1,9 @@ using System.Collections.Generic; using System.Linq; using Microsoft.Extensions.Logging; -using Umbraco.Core.Composing; +using Umbraco.Cms.Core.Composing; -namespace Umbraco.Core.Migrations.Upgrade.V_8_0_0.DataTypes +namespace Umbraco.Cms.Infrastructure.Migrations.Upgrade.V_8_0_0.DataTypes { public class PreValueMigratorCollection : BuilderCollectionBase { diff --git a/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/DataTypes/PreValueMigratorCollectionBuilder.cs b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/DataTypes/PreValueMigratorCollectionBuilder.cs index 3859e63767..2c90a0d504 100644 --- a/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/DataTypes/PreValueMigratorCollectionBuilder.cs +++ b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/DataTypes/PreValueMigratorCollectionBuilder.cs @@ -1,6 +1,6 @@ -using Umbraco.Core.Composing; +using Umbraco.Cms.Core.Composing; -namespace Umbraco.Core.Migrations.Upgrade.V_8_0_0.DataTypes +namespace Umbraco.Cms.Infrastructure.Migrations.Upgrade.V_8_0_0.DataTypes { public class PreValueMigratorCollectionBuilder : OrderedCollectionBuilderBase { diff --git a/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/DataTypes/PreValueMigratorComposer.cs b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/DataTypes/PreValueMigratorComposer.cs index 2cca4a839f..eafec39da3 100644 --- a/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/DataTypes/PreValueMigratorComposer.cs +++ b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/DataTypes/PreValueMigratorComposer.cs @@ -1,7 +1,7 @@ -using Umbraco.Core.DependencyInjection; -using Umbraco.Core.Composing; +using Umbraco.Cms.Core.Composing; +using Umbraco.Cms.Core.DependencyInjection; -namespace Umbraco.Core.Migrations.Upgrade.V_8_0_0.DataTypes +namespace Umbraco.Cms.Infrastructure.Migrations.Upgrade.V_8_0_0.DataTypes { public class PreValueMigratorComposer : ICoreComposer { diff --git a/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/DataTypes/RenamingPreValueMigrator.cs b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/DataTypes/RenamingPreValueMigrator.cs index 89a71fdaf4..5d05de56c3 100644 --- a/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/DataTypes/RenamingPreValueMigrator.cs +++ b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/DataTypes/RenamingPreValueMigrator.cs @@ -1,8 +1,7 @@ -using System; -using System.Linq; -using Umbraco.Core.Exceptions; +using System.Linq; +using Umbraco.Cms.Core.Exceptions; -namespace Umbraco.Core.Migrations.Upgrade.V_8_0_0.DataTypes +namespace Umbraco.Cms.Infrastructure.Migrations.Upgrade.V_8_0_0.DataTypes { class RenamingPreValueMigrator : DefaultPreValueMigrator { @@ -19,7 +18,7 @@ namespace Umbraco.Core.Migrations.Upgrade.V_8_0_0.DataTypes switch (editorAlias) { case "Umbraco.NoEdit": - return Constants.PropertyEditors.Aliases.Label; + return Cms.Core.Constants.PropertyEditors.Aliases.Label; default: throw new PanicException($"The alias {editorAlias} is not supported"); } diff --git a/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/DataTypes/RichTextPreValueMigrator.cs b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/DataTypes/RichTextPreValueMigrator.cs index a5c037c859..1f704e0b3d 100644 --- a/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/DataTypes/RichTextPreValueMigrator.cs +++ b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/DataTypes/RichTextPreValueMigrator.cs @@ -1,6 +1,7 @@ using Newtonsoft.Json; +using Umbraco.Extensions; -namespace Umbraco.Core.Migrations.Upgrade.V_8_0_0.DataTypes +namespace Umbraco.Cms.Infrastructure.Migrations.Upgrade.V_8_0_0.DataTypes { class RichTextPreValueMigrator : DefaultPreValueMigrator { @@ -8,7 +9,7 @@ namespace Umbraco.Core.Migrations.Upgrade.V_8_0_0.DataTypes => editorAlias == "Umbraco.TinyMCEv3"; public override string GetNewAlias(string editorAlias) - => Constants.PropertyEditors.Aliases.TinyMce; + => Cms.Core.Constants.PropertyEditors.Aliases.TinyMce; protected override object GetPreValueValue(PreValueDto preValue) { diff --git a/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/DataTypes/UmbracoSliderPreValueMigrator.cs b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/DataTypes/UmbracoSliderPreValueMigrator.cs index dc6de5e493..c193f27028 100644 --- a/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/DataTypes/UmbracoSliderPreValueMigrator.cs +++ b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/DataTypes/UmbracoSliderPreValueMigrator.cs @@ -1,7 +1,7 @@ using System.Collections.Generic; -using Umbraco.Core.PropertyEditors; +using Umbraco.Cms.Core.PropertyEditors; -namespace Umbraco.Core.Migrations.Upgrade.V_8_0_0.DataTypes +namespace Umbraco.Cms.Infrastructure.Migrations.Upgrade.V_8_0_0.DataTypes { class UmbracoSliderPreValueMigrator : PreValueMigratorBase { diff --git a/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/DataTypes/ValueListPreValueMigrator.cs b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/DataTypes/ValueListPreValueMigrator.cs index 07fefc8e85..be6b270048 100644 --- a/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/DataTypes/ValueListPreValueMigrator.cs +++ b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/DataTypes/ValueListPreValueMigrator.cs @@ -1,8 +1,8 @@ using System.Collections.Generic; using System.Linq; -using Umbraco.Core.PropertyEditors; +using Umbraco.Cms.Core.PropertyEditors; -namespace Umbraco.Core.Migrations.Upgrade.V_8_0_0.DataTypes +namespace Umbraco.Cms.Infrastructure.Migrations.Upgrade.V_8_0_0.DataTypes { class ValueListPreValueMigrator : IPreValueMigrator { diff --git a/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/DropDownPropertyEditorsMigration.cs b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/DropDownPropertyEditorsMigration.cs index 031abc17f9..f55ebbbddc 100644 --- a/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/DropDownPropertyEditorsMigration.cs +++ b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/DropDownPropertyEditorsMigration.cs @@ -2,15 +2,15 @@ using System.Collections.Generic; using System.Linq; using Microsoft.Extensions.Logging; -using Umbraco.Core.IO; -using Umbraco.Core.Persistence; -using Umbraco.Core.Persistence.Dtos; -using Umbraco.Core.PropertyEditors; -using Umbraco.Core.Migrations.PostMigrations; -using Umbraco.Core.Models; -using Umbraco.Core.Serialization; +using Umbraco.Cms.Core.IO; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Core.PropertyEditors; +using Umbraco.Cms.Core.Serialization; +using Umbraco.Cms.Infrastructure.Migrations.PostMigrations; +using Umbraco.Cms.Infrastructure.Persistence.Dtos; +using Umbraco.Extensions; -namespace Umbraco.Core.Migrations.Upgrade.V_8_0_0 +namespace Umbraco.Cms.Infrastructure.Migrations.Upgrade.V_8_0_0 { public class DropDownPropertyEditorsMigration : PropertyEditorsMigrationBase { @@ -108,7 +108,7 @@ namespace Umbraco.Core.Migrations.Upgrade.V_8_0_0 private void UpdateDataType(DataTypeDto dataType, ValueListConfiguration config, bool isMultiple) { dataType.DbType = ValueStorageType.Nvarchar.ToString(); - dataType.EditorAlias = Constants.PropertyEditors.Aliases.DropDownListFlexible; + dataType.EditorAlias = Cms.Core.Constants.PropertyEditors.Aliases.DropDownListFlexible; var flexConfig = new DropDownFlexibleConfiguration { diff --git a/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/DropMigrationsTable.cs b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/DropMigrationsTable.cs index def6a93400..a80d3936e1 100644 --- a/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/DropMigrationsTable.cs +++ b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/DropMigrationsTable.cs @@ -1,4 +1,4 @@ -namespace Umbraco.Core.Migrations.Upgrade.V_8_0_0 +namespace Umbraco.Cms.Infrastructure.Migrations.Upgrade.V_8_0_0 { public class DropMigrationsTable : MigrationBase { diff --git a/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/DropPreValueTable.cs b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/DropPreValueTable.cs index 918510d13c..1d5237ab94 100644 --- a/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/DropPreValueTable.cs +++ b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/DropPreValueTable.cs @@ -1,4 +1,4 @@ -namespace Umbraco.Core.Migrations.Upgrade.V_8_0_0 +namespace Umbraco.Cms.Infrastructure.Migrations.Upgrade.V_8_0_0 { public class DropPreValueTable : MigrationBase { diff --git a/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/DropTaskTables.cs b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/DropTaskTables.cs index 061b96976a..e830bddf92 100644 --- a/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/DropTaskTables.cs +++ b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/DropTaskTables.cs @@ -1,4 +1,4 @@ -namespace Umbraco.Core.Migrations.Upgrade.V_8_0_0 +namespace Umbraco.Cms.Infrastructure.Migrations.Upgrade.V_8_0_0 { public class DropTaskTables : MigrationBase { diff --git a/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/DropTemplateDesignColumn.cs b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/DropTemplateDesignColumn.cs index f1b25403d4..89dd26beed 100644 --- a/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/DropTemplateDesignColumn.cs +++ b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/DropTemplateDesignColumn.cs @@ -1,4 +1,4 @@ -namespace Umbraco.Core.Migrations.Upgrade.V_8_0_0 +namespace Umbraco.Cms.Infrastructure.Migrations.Upgrade.V_8_0_0 { public class DropTemplateDesignColumn : MigrationBase { diff --git a/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/DropXmlTables.cs b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/DropXmlTables.cs index be79178932..81581c48cd 100644 --- a/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/DropXmlTables.cs +++ b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/DropXmlTables.cs @@ -1,4 +1,4 @@ -namespace Umbraco.Core.Migrations.Upgrade.V_8_0_0 +namespace Umbraco.Cms.Infrastructure.Migrations.Upgrade.V_8_0_0 { public class DropXmlTables : MigrationBase { @@ -14,4 +14,4 @@ Delete.Table("cmsPreviewXml").Do(); } } -} \ No newline at end of file +} diff --git a/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/FallbackLanguage.cs b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/FallbackLanguage.cs index f0d7c02b82..c1761f74f2 100644 --- a/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/FallbackLanguage.cs +++ b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/FallbackLanguage.cs @@ -1,7 +1,8 @@ using System.Linq; -using Umbraco.Core.Persistence.Dtos; +using Umbraco.Cms.Infrastructure.Persistence.Dtos; +using Umbraco.Extensions; -namespace Umbraco.Core.Migrations.Upgrade.V_8_0_0 +namespace Umbraco.Cms.Infrastructure.Migrations.Upgrade.V_8_0_0 { /// /// Adds a new, self-joined field to umbracoLanguages to hold the fall-back language for @@ -17,7 +18,7 @@ namespace Umbraco.Core.Migrations.Upgrade.V_8_0_0 { var columns = SqlSyntax.GetColumnsInSchema(Context.Database).ToArray(); - if (columns.Any(x => x.TableName.InvariantEquals(Constants.DatabaseSchema.Tables.Language) && x.ColumnName.InvariantEquals("fallbackLanguageId")) == false) + if (columns.Any(x => x.TableName.InvariantEquals(Cms.Core.Constants.DatabaseSchema.Tables.Language) && x.ColumnName.InvariantEquals("fallbackLanguageId")) == false) AddColumn("fallbackLanguageId"); } } diff --git a/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/FixLanguageIsoCodeLength.cs b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/FixLanguageIsoCodeLength.cs index 8de06c9a6f..24e820e816 100644 --- a/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/FixLanguageIsoCodeLength.cs +++ b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/FixLanguageIsoCodeLength.cs @@ -1,4 +1,4 @@ -namespace Umbraco.Core.Migrations.Upgrade.V_8_0_0 +namespace Umbraco.Cms.Infrastructure.Migrations.Upgrade.V_8_0_0 { public class FixLanguageIsoCodeLength : MigrationBase { diff --git a/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/LanguageColumns.cs b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/LanguageColumns.cs index e8a1197d37..bb69922721 100644 --- a/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/LanguageColumns.cs +++ b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/LanguageColumns.cs @@ -1,6 +1,6 @@ -using Umbraco.Core.Persistence.Dtos; +using Umbraco.Cms.Infrastructure.Persistence.Dtos; -namespace Umbraco.Core.Migrations.Upgrade.V_8_0_0 +namespace Umbraco.Cms.Infrastructure.Migrations.Upgrade.V_8_0_0 { public class LanguageColumns : MigrationBase { @@ -10,8 +10,8 @@ namespace Umbraco.Core.Migrations.Upgrade.V_8_0_0 public override void Migrate() { - AddColumn(Constants.DatabaseSchema.Tables.Language, "isDefaultVariantLang"); - AddColumn(Constants.DatabaseSchema.Tables.Language, "mandatory"); + AddColumn(Cms.Core.Constants.DatabaseSchema.Tables.Language, "isDefaultVariantLang"); + AddColumn(Cms.Core.Constants.DatabaseSchema.Tables.Language, "mandatory"); } } } diff --git a/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/MakeRedirectUrlVariant.cs b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/MakeRedirectUrlVariant.cs index 651c95e6bd..5cc7a0e6b5 100644 --- a/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/MakeRedirectUrlVariant.cs +++ b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/MakeRedirectUrlVariant.cs @@ -1,6 +1,6 @@ -using Umbraco.Core.Persistence.Dtos; +using Umbraco.Cms.Infrastructure.Persistence.Dtos; -namespace Umbraco.Core.Migrations.Upgrade.V_8_0_0 +namespace Umbraco.Cms.Infrastructure.Migrations.Upgrade.V_8_0_0 { public class MakeRedirectUrlVariant : MigrationBase { diff --git a/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/MakeTagsVariant.cs b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/MakeTagsVariant.cs index c898187884..3a5db9c1e6 100644 --- a/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/MakeTagsVariant.cs +++ b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/MakeTagsVariant.cs @@ -1,6 +1,6 @@ -using Umbraco.Core.Persistence.Dtos; +using Umbraco.Cms.Infrastructure.Persistence.Dtos; -namespace Umbraco.Core.Migrations.Upgrade.V_8_0_0 +namespace Umbraco.Cms.Infrastructure.Migrations.Upgrade.V_8_0_0 { public class MakeTagsVariant : MigrationBase { diff --git a/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/MergeDateAndDateTimePropertyEditor.cs b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/MergeDateAndDateTimePropertyEditor.cs index 8e71c8ff4f..287e4d8d15 100644 --- a/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/MergeDateAndDateTimePropertyEditor.cs +++ b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/MergeDateAndDateTimePropertyEditor.cs @@ -1,13 +1,13 @@ using System; using System.Collections.Generic; using Microsoft.Extensions.Logging; -using Umbraco.Core.IO; -using Umbraco.Core.Persistence; -using Umbraco.Core.Persistence.Dtos; -using Umbraco.Core.PropertyEditors; -using Umbraco.Core.Serialization; +using Umbraco.Cms.Core.IO; +using Umbraco.Cms.Core.PropertyEditors; +using Umbraco.Cms.Core.Serialization; +using Umbraco.Cms.Infrastructure.Persistence.Dtos; +using Umbraco.Extensions; -namespace Umbraco.Core.Migrations.Upgrade.V_8_0_0 +namespace Umbraco.Cms.Infrastructure.Migrations.Upgrade.V_8_0_0 { public class MergeDateAndDateTimePropertyEditor : MigrationBase { @@ -23,7 +23,7 @@ namespace Umbraco.Core.Migrations.Upgrade.V_8_0_0 public override void Migrate() { - var dataTypes = GetDataTypes(Constants.PropertyEditors.Legacy.Aliases.Date); + var dataTypes = GetDataTypes(Cms.Core.Constants.PropertyEditors.Legacy.Aliases.Date); foreach (var dataType in dataTypes) { @@ -53,7 +53,7 @@ namespace Umbraco.Core.Migrations.Upgrade.V_8_0_0 config.OffsetTime = false; - dataType.EditorAlias = Constants.PropertyEditors.Aliases.DateTime; + dataType.EditorAlias = Cms.Core.Constants.PropertyEditors.Aliases.DateTime; dataType.Configuration = ConfigurationEditor.ToDatabase(config, _configurationEditorJsonSerializer); Database.Update(dataType); diff --git a/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/Models/ContentTypeDto80.cs b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/Models/ContentTypeDto80.cs index bc41e5e32a..9328e774e1 100644 --- a/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/Models/ContentTypeDto80.cs +++ b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/Models/ContentTypeDto80.cs @@ -1,8 +1,8 @@ using NPoco; -using Umbraco.Core.Persistence.DatabaseAnnotations; -using Umbraco.Core.Persistence.Dtos; +using Umbraco.Cms.Infrastructure.Persistence.DatabaseAnnotations; +using Umbraco.Cms.Infrastructure.Persistence.Dtos; -namespace Umbraco.Core.Migrations.Upgrade.V_8_0_0.Models +namespace Umbraco.Cms.Infrastructure.Migrations.Upgrade.V_8_0_0.Models { /// @@ -16,7 +16,7 @@ namespace Umbraco.Core.Migrations.Upgrade.V_8_0_0.Models [ExplicitColumns] internal class ContentTypeDto80 { - public const string TableName = Constants.DatabaseSchema.Tables.ContentType; + public const string TableName = Cms.Core.Constants.DatabaseSchema.Tables.ContentType; [Column("pk")] [PrimaryKeyColumn(IdentitySeed = 535)] diff --git a/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/Models/PropertyDataDto80.cs b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/Models/PropertyDataDto80.cs index f0a36b223d..1755e6c075 100644 --- a/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/Models/PropertyDataDto80.cs +++ b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/Models/PropertyDataDto80.cs @@ -1,9 +1,10 @@ -using NPoco; -using System; -using Umbraco.Core.Persistence.DatabaseAnnotations; -using Umbraco.Core.Persistence.Dtos; +using System; +using NPoco; +using Umbraco.Cms.Infrastructure.Persistence.DatabaseAnnotations; +using Umbraco.Cms.Infrastructure.Persistence.Dtos; +using Umbraco.Extensions; -namespace Umbraco.Core.Migrations.Upgrade.V_8_0_0.Models +namespace Umbraco.Cms.Infrastructure.Migrations.Upgrade.V_8_0_0.Models { /// /// Snapshot of the as it was at version 8.0 @@ -16,7 +17,7 @@ namespace Umbraco.Core.Migrations.Upgrade.V_8_0_0.Models [ExplicitColumns] internal class PropertyDataDto80 { - public const string TableName = Constants.DatabaseSchema.Tables.PropertyData; + public const string TableName = Cms.Core.Constants.DatabaseSchema.Tables.PropertyData; public const int VarcharLength = 512; public const int SegmentLength = 256; diff --git a/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/Models/PropertyTypeDto80.cs b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/Models/PropertyTypeDto80.cs index 6e2bd7371a..485be0d3b0 100644 --- a/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/Models/PropertyTypeDto80.cs +++ b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/Models/PropertyTypeDto80.cs @@ -1,14 +1,10 @@ -using NPoco; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using Umbraco.Core.Persistence.DatabaseAnnotations; -using Umbraco.Core.Persistence.DatabaseModelDefinitions; -using Umbraco.Core.Persistence.Dtos; +using System; +using NPoco; +using Umbraco.Cms.Infrastructure.Persistence.DatabaseAnnotations; +using Umbraco.Cms.Infrastructure.Persistence.DatabaseModelDefinitions; +using Umbraco.Cms.Infrastructure.Persistence.Dtos; -namespace Umbraco.Core.Migrations.Upgrade.V_8_0_0.Models +namespace Umbraco.Cms.Infrastructure.Migrations.Upgrade.V_8_0_0.Models { /// /// Snapshot of the as it was at version 8.0 @@ -16,7 +12,7 @@ namespace Umbraco.Core.Migrations.Upgrade.V_8_0_0.Models /// /// This is required during migrations before 8.6 since the schema has changed and running SQL against the new table would result in errors /// - [TableName(Constants.DatabaseSchema.Tables.PropertyType)] + [TableName(Cms.Core.Constants.DatabaseSchema.Tables.PropertyType)] [PrimaryKey("id")] [ExplicitColumns] internal class PropertyTypeDto80 diff --git a/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/PropertyEditorsMigration.cs b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/PropertyEditorsMigration.cs index 89a8f010ec..b3ac352e67 100644 --- a/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/PropertyEditorsMigration.cs +++ b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/PropertyEditorsMigration.cs @@ -1,8 +1,8 @@ using System; -using Umbraco.Core.Persistence; -using Umbraco.Core.Persistence.Dtos; +using Umbraco.Cms.Infrastructure.Persistence.Dtos; +using Umbraco.Extensions; -namespace Umbraco.Core.Migrations.Upgrade.V_8_0_0 +namespace Umbraco.Cms.Infrastructure.Migrations.Upgrade.V_8_0_0 { public class PropertyEditorsMigration : MigrationBase { @@ -12,12 +12,12 @@ namespace Umbraco.Core.Migrations.Upgrade.V_8_0_0 public override void Migrate() { - RenameDataType(Constants.PropertyEditors.Legacy.Aliases.ContentPicker2, Constants.PropertyEditors.Aliases.ContentPicker); - RenameDataType(Constants.PropertyEditors.Legacy.Aliases.MediaPicker2, Constants.PropertyEditors.Aliases.MediaPicker); - RenameDataType(Constants.PropertyEditors.Legacy.Aliases.MemberPicker2, Constants.PropertyEditors.Aliases.MemberPicker); - RenameDataType(Constants.PropertyEditors.Legacy.Aliases.MultiNodeTreePicker2, Constants.PropertyEditors.Aliases.MultiNodeTreePicker); - RenameDataType(Constants.PropertyEditors.Legacy.Aliases.TextboxMultiple, Constants.PropertyEditors.Aliases.TextArea, false); - RenameDataType(Constants.PropertyEditors.Legacy.Aliases.Textbox, Constants.PropertyEditors.Aliases.TextBox, false); + RenameDataType(Cms.Core.Constants.PropertyEditors.Legacy.Aliases.ContentPicker2, Cms.Core.Constants.PropertyEditors.Aliases.ContentPicker); + RenameDataType(Cms.Core.Constants.PropertyEditors.Legacy.Aliases.MediaPicker2, Cms.Core.Constants.PropertyEditors.Aliases.MediaPicker); + RenameDataType(Cms.Core.Constants.PropertyEditors.Legacy.Aliases.MemberPicker2, Cms.Core.Constants.PropertyEditors.Aliases.MemberPicker); + RenameDataType(Cms.Core.Constants.PropertyEditors.Legacy.Aliases.MultiNodeTreePicker2, Cms.Core.Constants.PropertyEditors.Aliases.MultiNodeTreePicker); + RenameDataType(Cms.Core.Constants.PropertyEditors.Legacy.Aliases.TextboxMultiple, Cms.Core.Constants.PropertyEditors.Aliases.TextArea, false); + RenameDataType(Cms.Core.Constants.PropertyEditors.Legacy.Aliases.Textbox, Cms.Core.Constants.PropertyEditors.Aliases.TextBox, false); } private void RenameDataType(string fromAlias, string toAlias, bool checkCollision = true) diff --git a/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/PropertyEditorsMigrationBase.cs b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/PropertyEditorsMigrationBase.cs index 79bbcece0d..68ad810619 100644 --- a/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/PropertyEditorsMigrationBase.cs +++ b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/PropertyEditorsMigrationBase.cs @@ -3,12 +3,12 @@ using System.Collections.Generic; using System.Linq; using Microsoft.Extensions.Logging; using Newtonsoft.Json; -using Umbraco.Core.IO; -using Umbraco.Core.Persistence; -using Umbraco.Core.Persistence.Dtos; -using Umbraco.Core.PropertyEditors; +using Umbraco.Cms.Core.IO; +using Umbraco.Cms.Core.PropertyEditors; +using Umbraco.Cms.Infrastructure.Persistence.Dtos; +using Umbraco.Extensions; -namespace Umbraco.Core.Migrations.Upgrade.V_8_0_0 +namespace Umbraco.Cms.Infrastructure.Migrations.Upgrade.V_8_0_0 { public abstract class PropertyEditorsMigrationBase : MigrationBase { diff --git a/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/RadioAndCheckboxPropertyEditorsMigration.cs b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/RadioAndCheckboxPropertyEditorsMigration.cs index e1173ed3a4..ee9a61e0c1 100644 --- a/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/RadioAndCheckboxPropertyEditorsMigration.cs +++ b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/RadioAndCheckboxPropertyEditorsMigration.cs @@ -2,15 +2,15 @@ using System.Collections.Generic; using System.Linq; using Microsoft.Extensions.Logging; -using Umbraco.Core.IO; -using Umbraco.Core.Migrations.PostMigrations; -using Umbraco.Core.Models; -using Umbraco.Core.Persistence; -using Umbraco.Core.Persistence.Dtos; -using Umbraco.Core.PropertyEditors; -using Umbraco.Core.Serialization; +using Umbraco.Cms.Core.IO; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Core.PropertyEditors; +using Umbraco.Cms.Core.Serialization; +using Umbraco.Cms.Infrastructure.Migrations.PostMigrations; +using Umbraco.Cms.Infrastructure.Persistence.Dtos; +using Umbraco.Extensions; -namespace Umbraco.Core.Migrations.Upgrade.V_8_0_0 +namespace Umbraco.Cms.Infrastructure.Migrations.Upgrade.V_8_0_0 { public class RadioAndCheckboxPropertyEditorsMigration : PropertyEditorsMigrationBase { @@ -31,8 +31,8 @@ namespace Umbraco.Core.Migrations.Upgrade.V_8_0_0 { var refreshCache = false; - refreshCache |= Migrate(GetDataTypes(Constants.PropertyEditors.Aliases.RadioButtonList), false); - refreshCache |= Migrate(GetDataTypes(Constants.PropertyEditors.Aliases.CheckBoxList), true); + refreshCache |= Migrate(GetDataTypes(Cms.Core.Constants.PropertyEditors.Aliases.RadioButtonList), false); + refreshCache |= Migrate(GetDataTypes(Cms.Core.Constants.PropertyEditors.Aliases.CheckBoxList), true); // if some data types have been updated directly in the database (editing DataTypeDto and/or PropertyDataDto), // bypassing the services, then we need to rebuild the cache entirely, including the umbracoContentNu table diff --git a/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/RefactorMacroColumns.cs b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/RefactorMacroColumns.cs index bc3df6f584..fc03d18584 100644 --- a/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/RefactorMacroColumns.cs +++ b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/RefactorMacroColumns.cs @@ -1,7 +1,6 @@ -using Umbraco.Core.Models; -using Umbraco.Core.Persistence.Dtos; +using Umbraco.Cms.Infrastructure.Persistence.Dtos; -namespace Umbraco.Core.Migrations.Upgrade.V_8_0_0 +namespace Umbraco.Cms.Infrastructure.Migrations.Upgrade.V_8_0_0 { public class RefactorMacroColumns : MigrationBase { @@ -11,7 +10,7 @@ namespace Umbraco.Core.Migrations.Upgrade.V_8_0_0 public override void Migrate() { - if (ColumnExists(Constants.DatabaseSchema.Tables.Macro, "macroXSLT")) + if (ColumnExists(Cms.Core.Constants.DatabaseSchema.Tables.Macro, "macroXSLT")) { //special trick to add the column without constraints and return the sql to add them later AddColumn("macroType", out var sqls1); @@ -19,21 +18,21 @@ namespace Umbraco.Core.Migrations.Upgrade.V_8_0_0 //populate the new columns with legacy data //when the macro type is PartialView, it corresponds to 7, else it is 4 for Unknown - Execute.Sql($"UPDATE {Constants.DatabaseSchema.Tables.Macro} SET macroSource = '', macroType = 4").Do(); - Execute.Sql($"UPDATE {Constants.DatabaseSchema.Tables.Macro} SET macroSource = macroXSLT, macroType = 4 WHERE macroXSLT != '' AND macroXSLT IS NOT NULL").Do(); - Execute.Sql($"UPDATE {Constants.DatabaseSchema.Tables.Macro} SET macroSource = macroScriptAssembly, macroType = 4 WHERE macroScriptAssembly != '' AND macroScriptAssembly IS NOT NULL").Do(); - Execute.Sql($"UPDATE {Constants.DatabaseSchema.Tables.Macro} SET macroSource = macroScriptType, macroType = 4 WHERE macroScriptType != '' AND macroScriptType IS NOT NULL").Do(); - Execute.Sql($"UPDATE {Constants.DatabaseSchema.Tables.Macro} SET macroSource = macroPython, macroType = 7 WHERE macroPython != '' AND macroPython IS NOT NULL").Do(); + Execute.Sql($"UPDATE {Cms.Core.Constants.DatabaseSchema.Tables.Macro} SET macroSource = '', macroType = 4").Do(); + Execute.Sql($"UPDATE {Cms.Core.Constants.DatabaseSchema.Tables.Macro} SET macroSource = macroXSLT, macroType = 4 WHERE macroXSLT != '' AND macroXSLT IS NOT NULL").Do(); + Execute.Sql($"UPDATE {Cms.Core.Constants.DatabaseSchema.Tables.Macro} SET macroSource = macroScriptAssembly, macroType = 4 WHERE macroScriptAssembly != '' AND macroScriptAssembly IS NOT NULL").Do(); + Execute.Sql($"UPDATE {Cms.Core.Constants.DatabaseSchema.Tables.Macro} SET macroSource = macroScriptType, macroType = 4 WHERE macroScriptType != '' AND macroScriptType IS NOT NULL").Do(); + Execute.Sql($"UPDATE {Cms.Core.Constants.DatabaseSchema.Tables.Macro} SET macroSource = macroPython, macroType = 7 WHERE macroPython != '' AND macroPython IS NOT NULL").Do(); //now apply constraints (NOT NULL) to new table foreach (var sql in sqls1) Execute.Sql(sql).Do(); foreach (var sql in sqls2) Execute.Sql(sql).Do(); //now remove these old columns - Delete.Column("macroXSLT").FromTable(Constants.DatabaseSchema.Tables.Macro).Do(); - Delete.Column("macroScriptAssembly").FromTable(Constants.DatabaseSchema.Tables.Macro).Do(); - Delete.Column("macroScriptType").FromTable(Constants.DatabaseSchema.Tables.Macro).Do(); - Delete.Column("macroPython").FromTable(Constants.DatabaseSchema.Tables.Macro).Do(); + Delete.Column("macroXSLT").FromTable(Cms.Core.Constants.DatabaseSchema.Tables.Macro).Do(); + Delete.Column("macroScriptAssembly").FromTable(Cms.Core.Constants.DatabaseSchema.Tables.Macro).Do(); + Delete.Column("macroScriptType").FromTable(Cms.Core.Constants.DatabaseSchema.Tables.Macro).Do(); + Delete.Column("macroPython").FromTable(Cms.Core.Constants.DatabaseSchema.Tables.Macro).Do(); } } } diff --git a/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/RefactorVariantsModel.cs b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/RefactorVariantsModel.cs index 6ddd49841d..a444831c90 100644 --- a/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/RefactorVariantsModel.cs +++ b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/RefactorVariantsModel.cs @@ -1,7 +1,7 @@ -using Umbraco.Core.Persistence; -using Umbraco.Core.Persistence.Dtos; +using Umbraco.Cms.Infrastructure.Persistence.Dtos; +using Umbraco.Extensions; -namespace Umbraco.Core.Migrations.Upgrade.V_8_0_0 +namespace Umbraco.Cms.Infrastructure.Migrations.Upgrade.V_8_0_0 { public class RefactorVariantsModel : MigrationBase { @@ -11,8 +11,8 @@ namespace Umbraco.Core.Migrations.Upgrade.V_8_0_0 public override void Migrate() { - if (ColumnExists(Constants.DatabaseSchema.Tables.ContentVersionCultureVariation, "edited")) - Delete.Column("edited").FromTable(Constants.DatabaseSchema.Tables.ContentVersionCultureVariation).Do(); + if (ColumnExists(Cms.Core.Constants.DatabaseSchema.Tables.ContentVersionCultureVariation, "edited")) + Delete.Column("edited").FromTable(Cms.Core.Constants.DatabaseSchema.Tables.ContentVersionCultureVariation).Do(); // add available column diff --git a/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/RenameLabelAndRichTextPropertyEditorAliases.cs b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/RenameLabelAndRichTextPropertyEditorAliases.cs index 1252a26e68..d5e47c54d2 100644 --- a/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/RenameLabelAndRichTextPropertyEditorAliases.cs +++ b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/RenameLabelAndRichTextPropertyEditorAliases.cs @@ -1,8 +1,8 @@ using System.Collections.Generic; -using Umbraco.Core.Persistence; -using Umbraco.Core.Persistence.Dtos; +using Umbraco.Cms.Infrastructure.Persistence.Dtos; +using Umbraco.Extensions; -namespace Umbraco.Core.Migrations.Upgrade.V_8_0_0 +namespace Umbraco.Cms.Infrastructure.Migrations.Upgrade.V_8_0_0 { public class RenameLabelAndRichTextPropertyEditorAliases : MigrationBase { @@ -13,8 +13,8 @@ namespace Umbraco.Core.Migrations.Upgrade.V_8_0_0 public override void Migrate() { - MigratePropertyEditorAlias("Umbraco.TinyMCEv3", Constants.PropertyEditors.Aliases.TinyMce); - MigratePropertyEditorAlias("Umbraco.NoEdit", Constants.PropertyEditors.Aliases.Label); + MigratePropertyEditorAlias("Umbraco.TinyMCEv3", Cms.Core.Constants.PropertyEditors.Aliases.TinyMce); + MigratePropertyEditorAlias("Umbraco.NoEdit", Cms.Core.Constants.PropertyEditors.Aliases.Label); } private void MigratePropertyEditorAlias(string oldAlias, string newAlias) diff --git a/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/RenameMediaVersionTable.cs b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/RenameMediaVersionTable.cs index 2b27bdafe8..cedbb97666 100644 --- a/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/RenameMediaVersionTable.cs +++ b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/RenameMediaVersionTable.cs @@ -1,7 +1,7 @@ -using Umbraco.Core.Persistence; -using Umbraco.Core.Persistence.Dtos; +using Umbraco.Cms.Infrastructure.Persistence; +using Umbraco.Cms.Infrastructure.Persistence.Dtos; -namespace Umbraco.Core.Migrations.Upgrade.V_8_0_0 +namespace Umbraco.Cms.Infrastructure.Migrations.Upgrade.V_8_0_0 { public class RenameMediaVersionTable : MigrationBase { @@ -11,7 +11,7 @@ namespace Umbraco.Core.Migrations.Upgrade.V_8_0_0 public override void Migrate() { - Rename.Table("cmsMedia").To(Constants.DatabaseSchema.Tables.MediaVersion).Do(); + Rename.Table("cmsMedia").To(Cms.Core.Constants.DatabaseSchema.Tables.MediaVersion).Do(); // that is not supported on SqlCE //Rename.Column("versionId").OnTable(Constants.DatabaseSchema.Tables.MediaVersion).To("id").Do(); @@ -24,34 +24,34 @@ namespace Umbraco.Core.Migrations.Upgrade.V_8_0_0 var versions = Database.Fetch($@"SELECT v.versionId, v.id FROM cmsContentVersion v JOIN umbracoNode n on v.contentId=n.id -WHERE n.nodeObjectType='{Constants.ObjectTypes.Media}'"); +WHERE n.nodeObjectType='{Cms.Core.Constants.ObjectTypes.Media}'"); foreach (var t in versions) - Execute.Sql($"UPDATE {Constants.DatabaseSchema.Tables.MediaVersion} SET id={t.id} WHERE versionId='{t.versionId}'").Do(); + Execute.Sql($"UPDATE {Cms.Core.Constants.DatabaseSchema.Tables.MediaVersion} SET id={t.id} WHERE versionId='{t.versionId}'").Do(); } else { - Database.Execute($@"UPDATE {Constants.DatabaseSchema.Tables.MediaVersion} SET id=v.id -FROM {Constants.DatabaseSchema.Tables.MediaVersion} m + Database.Execute($@"UPDATE {Cms.Core.Constants.DatabaseSchema.Tables.MediaVersion} SET id=v.id +FROM {Cms.Core.Constants.DatabaseSchema.Tables.MediaVersion} m JOIN cmsContentVersion v on m.versionId = v.versionId JOIN umbracoNode n on v.contentId=n.id -WHERE n.nodeObjectType='{Constants.ObjectTypes.Media}'"); +WHERE n.nodeObjectType='{Cms.Core.Constants.ObjectTypes.Media}'"); } foreach (var sql in sqls) Execute.Sql(sql).Do(); AddColumn("path", out sqls); - Execute.Sql($"UPDATE {Constants.DatabaseSchema.Tables.MediaVersion} SET path=mediaPath").Do(); + Execute.Sql($"UPDATE {Cms.Core.Constants.DatabaseSchema.Tables.MediaVersion} SET path=mediaPath").Do(); foreach (var sql in sqls) Execute.Sql(sql).Do(); // we had to run sqls to get the NULL constraints, but we need to get rid of most - Delete.KeysAndIndexes(Constants.DatabaseSchema.Tables.MediaVersion).Do(); + Delete.KeysAndIndexes(Cms.Core.Constants.DatabaseSchema.Tables.MediaVersion).Do(); - Delete.Column("mediaPath").FromTable(Constants.DatabaseSchema.Tables.MediaVersion).Do(); - Delete.Column("versionId").FromTable(Constants.DatabaseSchema.Tables.MediaVersion).Do(); - Delete.Column("nodeId").FromTable(Constants.DatabaseSchema.Tables.MediaVersion).Do(); + Delete.Column("mediaPath").FromTable(Cms.Core.Constants.DatabaseSchema.Tables.MediaVersion).Do(); + Delete.Column("versionId").FromTable(Cms.Core.Constants.DatabaseSchema.Tables.MediaVersion).Do(); + Delete.Column("nodeId").FromTable(Cms.Core.Constants.DatabaseSchema.Tables.MediaVersion).Do(); } } } diff --git a/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/RenameUmbracoDomainsTable.cs b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/RenameUmbracoDomainsTable.cs index 0543b57fcc..9e89678e11 100644 --- a/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/RenameUmbracoDomainsTable.cs +++ b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/RenameUmbracoDomainsTable.cs @@ -1,4 +1,4 @@ -namespace Umbraco.Core.Migrations.Upgrade.V_8_0_0 +namespace Umbraco.Cms.Infrastructure.Migrations.Upgrade.V_8_0_0 { public class RenameUmbracoDomainsTable : MigrationBase { @@ -8,7 +8,7 @@ public override void Migrate() { - Rename.Table("umbracoDomains").To(Constants.DatabaseSchema.Tables.Domain).Do(); + Rename.Table("umbracoDomains").To(Cms.Core.Constants.DatabaseSchema.Tables.Domain).Do(); } } } diff --git a/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/SuperZero.cs b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/SuperZero.cs index 8791cdc208..2d3c7264b6 100644 --- a/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/SuperZero.cs +++ b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/SuperZero.cs @@ -1,4 +1,4 @@ -namespace Umbraco.Core.Migrations.Upgrade.V_8_0_0 +namespace Umbraco.Cms.Infrastructure.Migrations.Upgrade.V_8_0_0 { public class SuperZero : MigrationBase { @@ -33,7 +33,7 @@ Database.Execute("update umbracoUser2NodeNotify set userId=-1 where userId=0;"); Database.Execute("update umbracoNode set nodeUser=-1 where nodeUser=0;"); Database.Execute("update umbracoUserLogin set userId=-1 where userId=0;"); - Database.Execute($"update {Constants.DatabaseSchema.Tables.ContentVersion} set userId=-1 where userId=0;"); + Database.Execute($"update {Cms.Core.Constants.DatabaseSchema.Tables.ContentVersion} set userId=-1 where userId=0;"); Database.Execute("delete from umbracoUser where id=0;"); } } diff --git a/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/TablesForScheduledPublishing.cs b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/TablesForScheduledPublishing.cs index 2f7ffe8679..db16e47701 100644 --- a/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/TablesForScheduledPublishing.cs +++ b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/TablesForScheduledPublishing.cs @@ -1,9 +1,9 @@ -using NPoco; -using System; -using Umbraco.Core.Models; -using Umbraco.Core.Persistence.Dtos; +using System; +using NPoco; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Infrastructure.Persistence.Dtos; -namespace Umbraco.Core.Migrations.Upgrade.V_8_0_0 +namespace Umbraco.Cms.Infrastructure.Migrations.Upgrade.V_8_0_0 { public class TablesForScheduledPublishing : MigrationBase { @@ -52,7 +52,7 @@ namespace Umbraco.Core.Migrations.Upgrade.V_8_0_0 Insert.IntoTable(ContentScheduleDto.TableName) .Row(new { id = Guid.NewGuid(), nodeId = s.Key, date = date, action = action }) .Do(); - } + } } } } diff --git a/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/TagsMigration.cs b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/TagsMigration.cs index d6a5380e31..b90066c64a 100644 --- a/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/TagsMigration.cs +++ b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/TagsMigration.cs @@ -1,7 +1,6 @@ -using System.Linq; -using Umbraco.Core.Persistence.Dtos; +using Umbraco.Cms.Infrastructure.Persistence.Dtos; -namespace Umbraco.Core.Migrations.Upgrade.V_8_0_0 +namespace Umbraco.Cms.Infrastructure.Migrations.Upgrade.V_8_0_0 { public class TagsMigration : MigrationBase { @@ -12,11 +11,11 @@ namespace Umbraco.Core.Migrations.Upgrade.V_8_0_0 public override void Migrate() { // alter columns => non-null - AlterColumn(Constants.DatabaseSchema.Tables.Tag, "group"); - AlterColumn(Constants.DatabaseSchema.Tables.Tag, "tag"); + AlterColumn(Cms.Core.Constants.DatabaseSchema.Tables.Tag, "group"); + AlterColumn(Cms.Core.Constants.DatabaseSchema.Tables.Tag, "tag"); // kill unused parentId column - Delete.Column("ParentId").FromTable(Constants.DatabaseSchema.Tables.Tag).Do(); + Delete.Column("ParentId").FromTable(Cms.Core.Constants.DatabaseSchema.Tables.Tag).Do(); } } } diff --git a/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/TagsMigrationFix.cs b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/TagsMigrationFix.cs index 057715269d..f4e37914a9 100644 --- a/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/TagsMigrationFix.cs +++ b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/TagsMigrationFix.cs @@ -1,4 +1,4 @@ -namespace Umbraco.Core.Migrations.Upgrade.V_8_0_0 +namespace Umbraco.Cms.Infrastructure.Migrations.Upgrade.V_8_0_0 { public class TagsMigrationFix : MigrationBase { @@ -9,8 +9,8 @@ public override void Migrate() { // kill unused parentId column, if it still exists - if (ColumnExists(Constants.DatabaseSchema.Tables.Tag, "ParentId")) - Delete.Column("ParentId").FromTable(Constants.DatabaseSchema.Tables.Tag).Do(); + if (ColumnExists(Cms.Core.Constants.DatabaseSchema.Tables.Tag, "ParentId")) + Delete.Column("ParentId").FromTable(Cms.Core.Constants.DatabaseSchema.Tables.Tag).Do(); } } } diff --git a/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/UpdateDefaultMandatoryLanguage.cs b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/UpdateDefaultMandatoryLanguage.cs index b965bc71d2..ddf3dfbcb5 100644 --- a/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/UpdateDefaultMandatoryLanguage.cs +++ b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/UpdateDefaultMandatoryLanguage.cs @@ -1,7 +1,7 @@ -using Umbraco.Core.Persistence; -using Umbraco.Core.Persistence.Dtos; +using Umbraco.Cms.Infrastructure.Persistence.Dtos; +using Umbraco.Extensions; -namespace Umbraco.Core.Migrations.Upgrade.V_8_0_0 +namespace Umbraco.Cms.Infrastructure.Migrations.Upgrade.V_8_0_0 { public class UpdateDefaultMandatoryLanguage : MigrationBase { @@ -12,7 +12,7 @@ namespace Umbraco.Core.Migrations.Upgrade.V_8_0_0 public override void Migrate() { // add the new languages lock object - AddLockObjects.EnsureLockObject(Database, Constants.Locks.Languages, "Languages"); + AddLockObjects.EnsureLockObject(Database, Cms.Core.Constants.Locks.Languages, "Languages"); // get all existing languages var selectDtos = Sql() diff --git a/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/UpdatePickerIntegerValuesToUdi.cs b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/UpdatePickerIntegerValuesToUdi.cs index 7f7cf8474c..031d65dc73 100644 --- a/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/UpdatePickerIntegerValuesToUdi.cs +++ b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/UpdatePickerIntegerValuesToUdi.cs @@ -2,11 +2,11 @@ using System.Linq; using Newtonsoft.Json; using Newtonsoft.Json.Linq; -using Umbraco.Core.Composing; -using Umbraco.Core.Persistence; -using Umbraco.Core.Persistence.Dtos; +using Umbraco.Cms.Core; +using Umbraco.Cms.Infrastructure.Persistence.Dtos; +using Umbraco.Extensions; -namespace Umbraco.Core.Migrations.Upgrade.V_8_0_0 +namespace Umbraco.Cms.Infrastructure.Migrations.Upgrade.V_8_0_0 { public class UpdatePickerIntegerValuesToUdi : MigrationBase { @@ -18,9 +18,9 @@ namespace Umbraco.Core.Migrations.Upgrade.V_8_0_0 var sqlDataTypes = Sql() .Select() .From() - .Where(x => x.EditorAlias == Constants.PropertyEditors.Aliases.ContentPicker - || x.EditorAlias == Constants.PropertyEditors.Aliases.MediaPicker - || x.EditorAlias == Constants.PropertyEditors.Aliases.MultiNodeTreePicker); + .Where(x => x.EditorAlias == Cms.Core.Constants.PropertyEditors.Aliases.ContentPicker + || x.EditorAlias == Cms.Core.Constants.PropertyEditors.Aliases.MediaPicker + || x.EditorAlias == Cms.Core.Constants.PropertyEditors.Aliases.MultiNodeTreePicker); var dataTypes = Database.Fetch(sqlDataTypes).ToList(); @@ -28,8 +28,8 @@ namespace Umbraco.Core.Migrations.Upgrade.V_8_0_0 { switch (datatype.EditorAlias) { - case Constants.PropertyEditors.Aliases.ContentPicker: - case Constants.PropertyEditors.Aliases.MediaPicker: + case Cms.Core.Constants.PropertyEditors.Aliases.ContentPicker: + case Cms.Core.Constants.PropertyEditors.Aliases.MediaPicker: { var config = JsonConvert.DeserializeObject(datatype.Configuration); var startNodeId = config.Value("startNodeId"); @@ -41,9 +41,9 @@ namespace Umbraco.Core.Migrations.Upgrade.V_8_0_0 Sql().Select(x => x.UniqueId).From().Where(x => x.NodeId == intStartNode)); if (guid.HasValue) { - var udi = new GuidUdi(datatype.EditorAlias == Constants.PropertyEditors.Aliases.MediaPicker - ? Constants.UdiEntityType.Media - : Constants.UdiEntityType.Document, guid.Value); + var udi = new GuidUdi(datatype.EditorAlias == Cms.Core.Constants.PropertyEditors.Aliases.MediaPicker + ? Cms.Core.Constants.UdiEntityType.Media + : Cms.Core.Constants.UdiEntityType.Document, guid.Value); config["startNodeId"] = new JValue(udi.ToString()); } else @@ -55,7 +55,7 @@ namespace Umbraco.Core.Migrations.Upgrade.V_8_0_0 break; } - case Constants.PropertyEditors.Aliases.MultiNodeTreePicker: + case Cms.Core.Constants.PropertyEditors.Aliases.MultiNodeTreePicker: { var config = JsonConvert.DeserializeObject(datatype.Configuration); var startNodeConfig = config.Value("startNode"); @@ -76,13 +76,13 @@ namespace Umbraco.Core.Migrations.Upgrade.V_8_0_0 switch (objectType.ToLowerInvariant()) { case "content": - entityType = Constants.UdiEntityType.Document; + entityType = Cms.Core.Constants.UdiEntityType.Document; break; case "media": - entityType = Constants.UdiEntityType.Media; + entityType = Cms.Core.Constants.UdiEntityType.Media; break; case "member": - entityType = Constants.UdiEntityType.Member; + entityType = Cms.Core.Constants.UdiEntityType.Member; break; } diff --git a/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/UserForeignKeys.cs b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/UserForeignKeys.cs index f16c9cd761..f29526b8ce 100644 --- a/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/UserForeignKeys.cs +++ b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/UserForeignKeys.cs @@ -1,6 +1,6 @@ -using Umbraco.Core.Persistence.Dtos; +using Umbraco.Cms.Infrastructure.Persistence.Dtos; -namespace Umbraco.Core.Migrations.Upgrade.V_8_0_0 +namespace Umbraco.Cms.Infrastructure.Migrations.Upgrade.V_8_0_0 { /// /// Creates/Updates non mandatory FK columns to the user table @@ -16,13 +16,13 @@ namespace Umbraco.Core.Migrations.Upgrade.V_8_0_0 // first allow NULL-able Alter.Table(ContentVersionCultureVariationDto.TableName).AlterColumn("availableUserId").AsInt32().Nullable().Do(); Alter.Table(ContentVersionDto.TableName).AlterColumn("userId").AsInt32().Nullable().Do(); - Alter.Table(Constants.DatabaseSchema.Tables.Log).AlterColumn("userId").AsInt32().Nullable().Do(); + Alter.Table(Cms.Core.Constants.DatabaseSchema.Tables.Log).AlterColumn("userId").AsInt32().Nullable().Do(); Alter.Table(NodeDto.TableName).AlterColumn("nodeUser").AsInt32().Nullable().Do(); // then we can update any non existing users to NULL Execute.Sql($"UPDATE {ContentVersionCultureVariationDto.TableName} SET availableUserId = NULL WHERE availableUserId NOT IN (SELECT id FROM {UserDto.TableName})").Do(); Execute.Sql($"UPDATE {ContentVersionDto.TableName} SET userId = NULL WHERE userId NOT IN (SELECT id FROM {UserDto.TableName})").Do(); - Execute.Sql($"UPDATE {Constants.DatabaseSchema.Tables.Log} SET userId = NULL WHERE userId NOT IN (SELECT id FROM {UserDto.TableName})").Do(); + Execute.Sql($"UPDATE {Cms.Core.Constants.DatabaseSchema.Tables.Log} SET userId = NULL WHERE userId NOT IN (SELECT id FROM {UserDto.TableName})").Do(); Execute.Sql($"UPDATE {NodeDto.TableName} SET nodeUser = NULL WHERE nodeUser NOT IN (SELECT id FROM {UserDto.TableName})").Do(); // FKs will be created after migrations diff --git a/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/VariantsMigration.cs b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/VariantsMigration.cs index adc451ef6a..d9e6109373 100644 --- a/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/VariantsMigration.cs +++ b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/VariantsMigration.cs @@ -2,11 +2,11 @@ using System.Collections.Generic; using System.Diagnostics; using System.Linq; -using Umbraco.Core.Migrations.Install; -using Umbraco.Core.Persistence; -using Umbraco.Core.Persistence.Dtos; +using Umbraco.Cms.Infrastructure.Persistence; +using Umbraco.Cms.Infrastructure.Persistence.DatabaseModelDefinitions; +using Umbraco.Cms.Infrastructure.Persistence.Dtos; -namespace Umbraco.Core.Migrations.Upgrade.V_8_0_0 +namespace Umbraco.Cms.Infrastructure.Migrations.Upgrade.V_8_0_0 { public class VariantsMigration : MigrationBase { @@ -25,20 +25,20 @@ namespace Umbraco.Core.Migrations.Upgrade.V_8_0_0 MigrateContent(); MigrateVersions(); - if (Database.Fetch($@"SELECT {Constants.DatabaseSchema.Tables.ContentVersion}.nodeId, COUNT({Constants.DatabaseSchema.Tables.ContentVersion}.id) -FROM {Constants.DatabaseSchema.Tables.ContentVersion} -JOIN {Constants.DatabaseSchema.Tables.DocumentVersion} ON {Constants.DatabaseSchema.Tables.ContentVersion}.id={Constants.DatabaseSchema.Tables.DocumentVersion}.id -WHERE {Constants.DatabaseSchema.Tables.DocumentVersion}.published=1 -GROUP BY {Constants.DatabaseSchema.Tables.ContentVersion}.nodeId -HAVING COUNT({Constants.DatabaseSchema.Tables.ContentVersion}.id) > 1").Any()) + if (Database.Fetch($@"SELECT {Cms.Core.Constants.DatabaseSchema.Tables.ContentVersion}.nodeId, COUNT({Cms.Core.Constants.DatabaseSchema.Tables.ContentVersion}.id) +FROM {Cms.Core.Constants.DatabaseSchema.Tables.ContentVersion} +JOIN {Cms.Core.Constants.DatabaseSchema.Tables.DocumentVersion} ON {Cms.Core.Constants.DatabaseSchema.Tables.ContentVersion}.id={Cms.Core.Constants.DatabaseSchema.Tables.DocumentVersion}.id +WHERE {Cms.Core.Constants.DatabaseSchema.Tables.DocumentVersion}.published=1 +GROUP BY {Cms.Core.Constants.DatabaseSchema.Tables.ContentVersion}.nodeId +HAVING COUNT({Cms.Core.Constants.DatabaseSchema.Tables.ContentVersion}.id) > 1").Any()) { Debugger.Break(); throw new Exception("Migration failed: duplicate 'published' document versions."); } if (Database.Fetch($@"SELECT v1.nodeId, v1.id, COUNT(v2.id) -FROM {Constants.DatabaseSchema.Tables.ContentVersion} v1 -LEFT JOIN {Constants.DatabaseSchema.Tables.ContentVersion} v2 ON v1.nodeId=v2.nodeId AND v2.[current]=1 +FROM {Cms.Core.Constants.DatabaseSchema.Tables.ContentVersion} v1 +LEFT JOIN {Cms.Core.Constants.DatabaseSchema.Tables.ContentVersion} v2 ON v1.nodeId=v2.nodeId AND v2.[current]=1 GROUP BY v1.nodeId, v1.id HAVING COUNT(v2.id) <> 1").Any()) { @@ -50,7 +50,7 @@ HAVING COUNT(v2.id) <> 1").Any()) private void MigratePropertyData() { // if the table has already been renamed, we're done - if (TableExists(Constants.DatabaseSchema.Tables.PropertyData)) + if (TableExists(Cms.Core.Constants.DatabaseSchema.Tables.PropertyData)) return; // add columns @@ -99,14 +99,14 @@ INNER JOIN {PreTables.PropertyData} ON {PreTables.ContentVersion}.versionId = {P Delete.Column("contentNodeId").FromTable(PreTables.PropertyData).Do(); // rename table - Rename.Table(PreTables.PropertyData).To(Constants.DatabaseSchema.Tables.PropertyData).Do(); + Rename.Table(PreTables.PropertyData).To(Cms.Core.Constants.DatabaseSchema.Tables.PropertyData).Do(); } private void CreatePropertyDataIndexes() { // Creates a temporary index on umbracoPropertyData to speed up other migrations which update property values. // It will be removed in CreateKeysAndIndexes before the normal indexes for the table are created - var tableDefinition = Persistence.DatabaseModelDefinitions.DefinitionFactory.GetTableDefinition(typeof(PropertyDataDto), SqlSyntax); + var tableDefinition = DefinitionFactory.GetTableDefinition(typeof(PropertyDataDto), SqlSyntax); Execute.Sql(SqlSyntax.FormatPrimaryKey(tableDefinition)).Do(); Create.Index("IX_umbracoPropertyData_Temp").OnTable(PropertyDataDto.TableName) .WithOptions().Unique() @@ -115,7 +115,7 @@ INNER JOIN {PreTables.PropertyData} ON {PreTables.ContentVersion}.versionId = {P .OnColumn("propertyTypeId").Ascending() .OnColumn("languageId").Ascending() .OnColumn("segment").Ascending() - .Do(); + .Do(); } private void MigrateContentAndPropertyTypes() @@ -129,7 +129,7 @@ INNER JOIN {PreTables.PropertyData} ON {PreTables.ContentVersion}.versionId = {P private void MigrateContent() { // if the table has already been renamed, we're done - if (TableExists(Constants.DatabaseSchema.Tables.Content)) + if (TableExists(Cms.Core.Constants.DatabaseSchema.Tables.Content)) return; // rename columns @@ -141,21 +141,21 @@ INNER JOIN {PreTables.PropertyData} ON {PreTables.ContentVersion}.versionId = {P Delete.Column("pk").FromTable(PreTables.Content).Do(); // rename table - Rename.Table(PreTables.Content).To(Constants.DatabaseSchema.Tables.Content).Do(); + Rename.Table(PreTables.Content).To(Cms.Core.Constants.DatabaseSchema.Tables.Content).Do(); } private void MigrateVersions() { // if the table has already been renamed, we're done - if (TableExists(Constants.DatabaseSchema.Tables.ContentVersion)) + if (TableExists(Cms.Core.Constants.DatabaseSchema.Tables.ContentVersion)) return; // if the table already exists, we're done - if (TableExists(Constants.DatabaseSchema.Tables.DocumentVersion)) + if (TableExists(Cms.Core.Constants.DatabaseSchema.Tables.DocumentVersion)) return; // if the table has already been renamed, we're done - if (TableExists(Constants.DatabaseSchema.Tables.Document)) + if (TableExists(Cms.Core.Constants.DatabaseSchema.Tables.Document)) return; // do it all at once @@ -201,7 +201,7 @@ FROM {PreTables.ContentVersion} v INNER JOIN {PreTables.Document} d ON d.version // SQLCE does not support UPDATE...FROM var otherContent = Database.Fetch($@"SELECT cver.versionId, n.text FROM {PreTables.ContentVersion} cver -JOIN {SqlSyntax.GetQuotedTableName(Constants.DatabaseSchema.Tables.Node)} n ON cver.nodeId=n.id +JOIN {SqlSyntax.GetQuotedTableName(Cms.Core.Constants.DatabaseSchema.Tables.Node)} n ON cver.nodeId=n.id WHERE cver.versionId NOT IN (SELECT versionId FROM {SqlSyntax.GetQuotedTableName(PreTables.Document)})"); foreach (var t in otherContent) @@ -212,7 +212,7 @@ WHERE cver.versionId NOT IN (SELECT versionId FROM {SqlSyntax.GetQuotedTableName { Database.Execute($@"UPDATE {PreTables.ContentVersion} SET text=n.text, {SqlSyntax.GetQuotedColumnName("current")}=1, userId=0 FROM {PreTables.ContentVersion} cver -JOIN {SqlSyntax.GetQuotedTableName(Constants.DatabaseSchema.Tables.Node)} n ON cver.nodeId=n.id +JOIN {SqlSyntax.GetQuotedTableName(Cms.Core.Constants.DatabaseSchema.Tables.Node)} n ON cver.nodeId=n.id WHERE cver.versionId NOT IN (SELECT versionId FROM {SqlSyntax.GetQuotedTableName(PreTables.Document)})"); } @@ -220,7 +220,7 @@ WHERE cver.versionId NOT IN (SELECT versionId FROM {SqlSyntax.GetQuotedTableName Create.Table(withoutKeysAndIndexes: true).Do(); // every document row becomes a document version - Database.Execute($@"INSERT INTO {SqlSyntax.GetQuotedTableName(Constants.DatabaseSchema.Tables.DocumentVersion)} (id, templateId, published) + Database.Execute($@"INSERT INTO {SqlSyntax.GetQuotedTableName(Cms.Core.Constants.DatabaseSchema.Tables.DocumentVersion)} (id, templateId, published) SELECT cver.id, doc.templateId, doc.published FROM {SqlSyntax.GetQuotedTableName(PreTables.ContentVersion)} cver JOIN {SqlSyntax.GetQuotedTableName(PreTables.Document)} doc ON doc.nodeId=cver.nodeId AND doc.versionId=cver.versionId"); @@ -237,7 +237,7 @@ JOIN {SqlSyntax.GetQuotedTableName(PreTables.ContentVersion)} cver ON doc.nodeId WHERE doc.newest=1 AND doc.published=1"); Database.Execute($@" -INSERT INTO {SqlSyntax.GetQuotedTableName(Constants.DatabaseSchema.Tables.DocumentVersion)} (id, templateId, published) +INSERT INTO {SqlSyntax.GetQuotedTableName(Cms.Core.Constants.DatabaseSchema.Tables.DocumentVersion)} (id, templateId, published) SELECT cverNew.id, doc.templateId, 0 FROM {SqlSyntax.GetQuotedTableName(PreTables.Document)} doc JOIN {SqlSyntax.GetQuotedTableName(PreTables.ContentVersion)} cverNew ON doc.nodeId = cverNew.nodeId @@ -259,7 +259,7 @@ WHERE versionId NOT IN (SELECT (versionId) FROM {PreTables.ContentVersion} WHERE // ensure that documents with a published version are marked as published Database.Execute($@"UPDATE {PreTables.Document} SET published=1 WHERE nodeId IN ( -SELECT nodeId FROM {PreTables.ContentVersion} cv INNER JOIN {Constants.DatabaseSchema.Tables.DocumentVersion} dv ON dv.id = cv.id WHERE dv.published=1)"); +SELECT nodeId FROM {PreTables.ContentVersion} cv INNER JOIN {Cms.Core.Constants.DatabaseSchema.Tables.DocumentVersion} dv ON dv.id = cv.id WHERE dv.published=1)"); // drop some document columns Delete.Column("text").FromTable(PreTables.Document).Do(); @@ -286,12 +286,12 @@ SELECT nodeId FROM {PreTables.ContentVersion} cv INNER JOIN {Constants.DatabaseS var temp = Database.Fetch($@"SELECT n.id, v1.intValue intValue1, v1.decimalValue decimalValue1, v1.dateValue dateValue1, v1.varcharValue varcharValue1, v1.textValue textValue1, v2.intValue intValue2, v2.decimalValue decimalValue2, v2.dateValue dateValue2, v2.varcharValue varcharValue2, v2.textValue textValue2 -FROM {Constants.DatabaseSchema.Tables.Node} n +FROM {Cms.Core.Constants.DatabaseSchema.Tables.Node} n JOIN {PreTables.ContentVersion} cv1 ON n.id=cv1.nodeId AND cv1.{SqlSyntax.GetQuotedColumnName("current")}=1 -JOIN {Constants.DatabaseSchema.Tables.PropertyData} v1 ON cv1.id=v1.versionId +JOIN {Cms.Core.Constants.DatabaseSchema.Tables.PropertyData} v1 ON cv1.id=v1.versionId JOIN {PreTables.ContentVersion} cv2 ON n.id=cv2.nodeId -JOIN {Constants.DatabaseSchema.Tables.DocumentVersion} dv ON cv2.id=dv.id AND dv.published=1 -JOIN {Constants.DatabaseSchema.Tables.PropertyData} v2 ON cv2.id=v2.versionId +JOIN {Cms.Core.Constants.DatabaseSchema.Tables.DocumentVersion} dv ON cv2.id=dv.id AND dv.published=1 +JOIN {Cms.Core.Constants.DatabaseSchema.Tables.PropertyData} v2 ON cv2.id=v2.versionId WHERE v1.propertyTypeId=v2.propertyTypeId AND (v1.languageId=v2.languageId OR (v1.languageId IS NULL AND v2.languageId IS NULL)) AND (v1.segment=v2.segment OR (v1.segment IS NULL AND v2.segment IS NULL))"); @@ -306,8 +306,8 @@ AND (v1.segment=v2.segment OR (v1.segment IS NULL AND v2.segment IS NULL))"); Delete.Column("versionId").FromTable(PreTables.ContentVersion).Do(); // rename tables - Rename.Table(PreTables.ContentVersion).To(Constants.DatabaseSchema.Tables.ContentVersion).Do(); - Rename.Table(PreTables.Document).To(Constants.DatabaseSchema.Tables.Document).Do(); + Rename.Table(PreTables.ContentVersion).To(Cms.Core.Constants.DatabaseSchema.Tables.ContentVersion).Do(); + Rename.Table(PreTables.Document).To(Cms.Core.Constants.DatabaseSchema.Tables.Document).Do(); } private static class PreTables diff --git a/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_1/ChangeNuCacheJsonFormat.cs b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_1/ChangeNuCacheJsonFormat.cs index f6850eb254..e0ba4c2403 100644 --- a/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_1/ChangeNuCacheJsonFormat.cs +++ b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_1/ChangeNuCacheJsonFormat.cs @@ -1,6 +1,6 @@ -using Umbraco.Core.Migrations.PostMigrations; +using Umbraco.Cms.Infrastructure.Migrations.PostMigrations; -namespace Umbraco.Core.Migrations.Upgrade.V_8_0_1 +namespace Umbraco.Cms.Infrastructure.Migrations.Upgrade.V_8_0_1 { public class ChangeNuCacheJsonFormat : MigrationBase { diff --git a/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_10_0/AddPropertyTypeLabelOnTopColumn.cs b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_10_0/AddPropertyTypeLabelOnTopColumn.cs index 206ea2be02..a8ecebbf99 100644 --- a/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_10_0/AddPropertyTypeLabelOnTopColumn.cs +++ b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_10_0/AddPropertyTypeLabelOnTopColumn.cs @@ -1,7 +1,7 @@ using System.Linq; -using Umbraco.Core.Persistence.Dtos; +using Umbraco.Cms.Infrastructure.Persistence.Dtos; -namespace Umbraco.Core.Migrations.Upgrade.V_8_10_0 +namespace Umbraco.Cms.Infrastructure.Migrations.Upgrade.V_8_10_0 { public class AddPropertyTypeLabelOnTopColumn : MigrationBase diff --git a/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_1_0/ConvertTinyMceAndGridMediaUrlsToLocalLink.cs b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_1_0/ConvertTinyMceAndGridMediaUrlsToLocalLink.cs index 052b72ca26..3de504f48a 100644 --- a/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_1_0/ConvertTinyMceAndGridMediaUrlsToLocalLink.cs +++ b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_1_0/ConvertTinyMceAndGridMediaUrlsToLocalLink.cs @@ -4,13 +4,13 @@ using System.Linq; using System.Text.RegularExpressions; using Newtonsoft.Json; using Newtonsoft.Json.Linq; -using Umbraco.Core.Migrations.PostMigrations; -using Umbraco.Core.Migrations.Upgrade.V_8_0_0.Models; -using Umbraco.Core.Persistence; -using Umbraco.Core.Persistence.Dtos; -using Umbraco.Core.Services; +using Umbraco.Cms.Core.Services; +using Umbraco.Cms.Infrastructure.Migrations.PostMigrations; +using Umbraco.Cms.Infrastructure.Migrations.Upgrade.V_8_0_0.Models; +using Umbraco.Cms.Infrastructure.Persistence.Dtos; +using Umbraco.Extensions; -namespace Umbraco.Core.Migrations.Upgrade.V_8_1_0 +namespace Umbraco.Cms.Infrastructure.Migrations.Upgrade.V_8_1_0 { public class ConvertTinyMceAndGridMediaUrlsToLocalLink : MigrationBase { @@ -33,8 +33,8 @@ namespace Umbraco.Core.Migrations.Upgrade.V_8_1_0 .InnerJoin().On((left, right) => left.PropertyTypeId == right.Id) .InnerJoin().On((left, right) => left.DataTypeId == right.NodeId) .Where(x => - x.EditorAlias == Constants.PropertyEditors.Aliases.TinyMce || - x.EditorAlias == Constants.PropertyEditors.Aliases.Grid); + x.EditorAlias == Cms.Core.Constants.PropertyEditors.Aliases.TinyMce || + x.EditorAlias == Cms.Core.Constants.PropertyEditors.Aliases.Grid); var properties = Database.Fetch(sqlPropertyData); @@ -46,7 +46,7 @@ namespace Umbraco.Core.Migrations.Upgrade.V_8_1_0 bool propertyChanged = false; - if (property.PropertyTypeDto.DataTypeDto.EditorAlias == Constants.PropertyEditors.Aliases.Grid) + if (property.PropertyTypeDto.DataTypeDto.EditorAlias == Cms.Core.Constants.PropertyEditors.Aliases.Grid) { try { diff --git a/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_1_0/FixContentNuCascade.cs b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_1_0/FixContentNuCascade.cs index 09ea941742..839baadec6 100644 --- a/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_1_0/FixContentNuCascade.cs +++ b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_1_0/FixContentNuCascade.cs @@ -1,6 +1,6 @@ -using Umbraco.Core.Persistence.Dtos; +using Umbraco.Cms.Infrastructure.Persistence.Dtos; -namespace Umbraco.Core.Migrations.Upgrade.V_8_1_0 +namespace Umbraco.Cms.Infrastructure.Migrations.Upgrade.V_8_1_0 { public class FixContentNuCascade : MigrationBase { diff --git a/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_1_0/RenameUserLoginDtoDateIndex.cs b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_1_0/RenameUserLoginDtoDateIndex.cs index c0b9c8f2db..a88426966d 100644 --- a/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_1_0/RenameUserLoginDtoDateIndex.cs +++ b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_1_0/RenameUserLoginDtoDateIndex.cs @@ -1,6 +1,6 @@ -using Umbraco.Core.Persistence.Dtos; +using Umbraco.Cms.Infrastructure.Persistence.Dtos; -namespace Umbraco.Core.Migrations.Upgrade.V_8_1_0 +namespace Umbraco.Cms.Infrastructure.Migrations.Upgrade.V_8_1_0 { public class RenameUserLoginDtoDateIndex : MigrationBase { diff --git a/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_6_0/AddMainDomLock.cs b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_6_0/AddMainDomLock.cs index 6ca493ac7e..00e781c8b2 100644 --- a/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_6_0/AddMainDomLock.cs +++ b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_6_0/AddMainDomLock.cs @@ -1,6 +1,6 @@ -using Umbraco.Core.Persistence.Dtos; +using Umbraco.Cms.Infrastructure.Persistence.Dtos; -namespace Umbraco.Core.Migrations.Upgrade.V_8_6_0 +namespace Umbraco.Cms.Infrastructure.Migrations.Upgrade.V_8_6_0 { public class AddMainDomLock : MigrationBase { @@ -10,7 +10,7 @@ namespace Umbraco.Core.Migrations.Upgrade.V_8_6_0 public override void Migrate() { - Database.Insert(Constants.DatabaseSchema.Tables.Lock, "id", false, new LockDto { Id = Constants.Locks.MainDom, Name = "MainDom" }); + Database.Insert(Cms.Core.Constants.DatabaseSchema.Tables.Lock, "id", false, new LockDto { Id = Cms.Core.Constants.Locks.MainDom, Name = "MainDom" }); } } } diff --git a/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_6_0/AddNewRelationTypes.cs b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_6_0/AddNewRelationTypes.cs index 2e2e00a9bc..5feb6d887a 100644 --- a/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_6_0/AddNewRelationTypes.cs +++ b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_6_0/AddNewRelationTypes.cs @@ -1,6 +1,6 @@ -using Umbraco.Core.Migrations.Install; +using Umbraco.Cms.Infrastructure.Migrations.Install; -namespace Umbraco.Core.Migrations.Upgrade.V_8_6_0 +namespace Umbraco.Cms.Infrastructure.Migrations.Upgrade.V_8_6_0 { /// /// Ensures the new relation types are created @@ -14,18 +14,18 @@ namespace Umbraco.Core.Migrations.Upgrade.V_8_6_0 public override void Migrate() { CreateRelation( - Constants.Conventions.RelationTypes.RelatedMediaAlias, - Constants.Conventions.RelationTypes.RelatedMediaName); + Cms.Core.Constants.Conventions.RelationTypes.RelatedMediaAlias, + Cms.Core.Constants.Conventions.RelationTypes.RelatedMediaName); CreateRelation( - Constants.Conventions.RelationTypes.RelatedDocumentAlias, - Constants.Conventions.RelationTypes.RelatedDocumentName); + Cms.Core.Constants.Conventions.RelationTypes.RelatedDocumentAlias, + Cms.Core.Constants.Conventions.RelationTypes.RelatedDocumentName); } private void CreateRelation(string alias, string name) { var uniqueId = DatabaseDataCreator.CreateUniqueRelationTypeId(alias ,name); //this is the same as how it installs so everything is consistent - Insert.IntoTable(Constants.DatabaseSchema.Tables.RelationType) + Insert.IntoTable(Cms.Core.Constants.DatabaseSchema.Tables.RelationType) .Row(new { typeUniqueId = uniqueId, dual = 0, name, alias }) .Do(); } diff --git a/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_6_0/AddPropertyTypeValidationMessageColumns.cs b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_6_0/AddPropertyTypeValidationMessageColumns.cs index f44695da69..63c4efa49c 100644 --- a/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_6_0/AddPropertyTypeValidationMessageColumns.cs +++ b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_6_0/AddPropertyTypeValidationMessageColumns.cs @@ -1,7 +1,7 @@ using System.Linq; -using Umbraco.Core.Persistence.Dtos; +using Umbraco.Cms.Infrastructure.Persistence.Dtos; -namespace Umbraco.Core.Migrations.Upgrade.V_8_6_0 +namespace Umbraco.Cms.Infrastructure.Migrations.Upgrade.V_8_6_0 { public class AddPropertyTypeValidationMessageColumns : MigrationBase diff --git a/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_6_0/MissingContentVersionsIndexes.cs b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_6_0/MissingContentVersionsIndexes.cs index c744409c2f..68c7d1a174 100644 --- a/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_6_0/MissingContentVersionsIndexes.cs +++ b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_6_0/MissingContentVersionsIndexes.cs @@ -1,6 +1,6 @@ -using Umbraco.Core.Persistence.Dtos; +using Umbraco.Cms.Infrastructure.Persistence.Dtos; -namespace Umbraco.Core.Migrations.Upgrade.V_8_6_0 +namespace Umbraco.Cms.Infrastructure.Migrations.Upgrade.V_8_6_0 { public class MissingContentVersionsIndexes : MigrationBase { diff --git a/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_6_0/UpdateRelationTypeTable.cs b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_6_0/UpdateRelationTypeTable.cs index c79f43d20f..10b741bae8 100644 --- a/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_6_0/UpdateRelationTypeTable.cs +++ b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_6_0/UpdateRelationTypeTable.cs @@ -1,6 +1,4 @@ -using Umbraco.Core.Persistence.Dtos; - -namespace Umbraco.Core.Migrations.Upgrade.V_8_6_0 +namespace Umbraco.Cms.Infrastructure.Migrations.Upgrade.V_8_6_0 { public class UpdateRelationTypeTable : MigrationBase @@ -12,8 +10,8 @@ namespace Umbraco.Core.Migrations.Upgrade.V_8_6_0 public override void Migrate() { - Alter.Table(Constants.DatabaseSchema.Tables.RelationType).AlterColumn("parentObjectType").AsGuid().Nullable().Do(); - Alter.Table(Constants.DatabaseSchema.Tables.RelationType).AlterColumn("childObjectType").AsGuid().Nullable().Do(); + Alter.Table(Cms.Core.Constants.DatabaseSchema.Tables.RelationType).AlterColumn("parentObjectType").AsGuid().Nullable().Do(); + Alter.Table(Cms.Core.Constants.DatabaseSchema.Tables.RelationType).AlterColumn("childObjectType").AsGuid().Nullable().Do(); //TODO: We have to update this field to ensure it's not null, we can just copy across the name since that is not nullable @@ -21,14 +19,14 @@ namespace Umbraco.Core.Migrations.Upgrade.V_8_6_0 if (IndexExists("IX_umbracoRelationType_alias")) Delete .Index("IX_umbracoRelationType_alias") - .OnTable(Constants.DatabaseSchema.Tables.RelationType) + .OnTable(Cms.Core.Constants.DatabaseSchema.Tables.RelationType) .Do(); //change the column to non nullable - Alter.Table(Constants.DatabaseSchema.Tables.RelationType).AlterColumn("alias").AsString(100).NotNullable().Do(); + Alter.Table(Cms.Core.Constants.DatabaseSchema.Tables.RelationType).AlterColumn("alias").AsString(100).NotNullable().Do(); //re-create the index Create .Index("IX_umbracoRelationType_alias") - .OnTable(Constants.DatabaseSchema.Tables.RelationType) + .OnTable(Cms.Core.Constants.DatabaseSchema.Tables.RelationType) .OnColumn("alias") .Ascending() .WithOptions().Unique().WithOptions().NonClustered() diff --git a/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_7_0/MissingDictionaryIndex.cs b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_7_0/MissingDictionaryIndex.cs index fa5116c990..287cb94edb 100644 --- a/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_7_0/MissingDictionaryIndex.cs +++ b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_7_0/MissingDictionaryIndex.cs @@ -1,6 +1,6 @@ -using Umbraco.Core.Persistence.Dtos; +using Umbraco.Cms.Infrastructure.Persistence.Dtos; -namespace Umbraco.Core.Migrations.Upgrade.V_8_6_0 +namespace Umbraco.Cms.Infrastructure.Migrations.Upgrade.V_8_7_0 { public class MissingDictionaryIndex : MigrationBase { @@ -15,7 +15,7 @@ namespace Umbraco.Core.Migrations.Upgrade.V_8_6_0 /// if it doesn't already exist /// public override void Migrate() - { + { var indexName = "IX_" + DictionaryDto.TableName + "_Parent"; if (!IndexExists(indexName)) diff --git a/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_9_0/ExternalLoginTableUserData.cs b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_9_0/ExternalLoginTableUserData.cs index 45bc1c620b..6865a35b7a 100644 --- a/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_9_0/ExternalLoginTableUserData.cs +++ b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_9_0/ExternalLoginTableUserData.cs @@ -1,6 +1,6 @@ -using Umbraco.Core.Persistence.Dtos; +using Umbraco.Cms.Infrastructure.Persistence.Dtos; -namespace Umbraco.Core.Migrations.Upgrade.V_8_9_0 +namespace Umbraco.Cms.Infrastructure.Migrations.Upgrade.V_8_9_0 { public class ExternalLoginTableUserData : MigrationBase { @@ -14,7 +14,7 @@ namespace Umbraco.Core.Migrations.Upgrade.V_8_9_0 /// public override void Migrate() { - AddColumn(Constants.DatabaseSchema.Tables.ExternalLogin, "userData"); + AddColumn(Cms.Core.Constants.DatabaseSchema.Tables.ExternalLogin, "userData"); } } } diff --git a/src/Umbraco.Infrastructure/Models/Blocks/BlockEditorData.cs b/src/Umbraco.Infrastructure/Models/Blocks/BlockEditorData.cs index d8186f0dfa..164f554832 100644 --- a/src/Umbraco.Infrastructure/Models/Blocks/BlockEditorData.cs +++ b/src/Umbraco.Infrastructure/Models/Blocks/BlockEditorData.cs @@ -1,10 +1,9 @@ -using Newtonsoft.Json.Linq; -using System; +using System; using System.Collections.Generic; +using Newtonsoft.Json.Linq; -namespace Umbraco.Core.Models.Blocks +namespace Umbraco.Cms.Core.Models.Blocks { - /// /// Convertable block data from json /// diff --git a/src/Umbraco.Infrastructure/Models/Blocks/BlockEditorDataConverter.cs b/src/Umbraco.Infrastructure/Models/Blocks/BlockEditorDataConverter.cs index 802e8c2ee3..838821b563 100644 --- a/src/Umbraco.Infrastructure/Models/Blocks/BlockEditorDataConverter.cs +++ b/src/Umbraco.Infrastructure/Models/Blocks/BlockEditorDataConverter.cs @@ -1,11 +1,10 @@ -using Newtonsoft.Json; -using Newtonsoft.Json.Linq; +using System.Collections.Generic; using System.Linq; -using System.Collections.Generic; +using Newtonsoft.Json; +using Newtonsoft.Json.Linq; -namespace Umbraco.Core.Models.Blocks +namespace Umbraco.Cms.Core.Models.Blocks { - /// /// Converts the block json data into objects /// diff --git a/src/Umbraco.Infrastructure/Models/Blocks/BlockItemData.cs b/src/Umbraco.Infrastructure/Models/Blocks/BlockItemData.cs index 4459341adc..5771f8c0eb 100644 --- a/src/Umbraco.Infrastructure/Models/Blocks/BlockItemData.cs +++ b/src/Umbraco.Infrastructure/Models/Blocks/BlockItemData.cs @@ -1,9 +1,9 @@ -using Newtonsoft.Json; -using System; +using System; using System.Collections.Generic; -using Umbraco.Core.Serialization; +using Newtonsoft.Json; +using Umbraco.Cms.Infrastructure.Serialization; -namespace Umbraco.Core.Models.Blocks +namespace Umbraco.Cms.Core.Models.Blocks { /// /// Represents a single block's data in raw form diff --git a/src/Umbraco.Infrastructure/Models/Blocks/BlockListEditorDataConverter.cs b/src/Umbraco.Infrastructure/Models/Blocks/BlockListEditorDataConverter.cs index 23f69922d9..be8d1a47ac 100644 --- a/src/Umbraco.Infrastructure/Models/Blocks/BlockListEditorDataConverter.cs +++ b/src/Umbraco.Infrastructure/Models/Blocks/BlockListEditorDataConverter.cs @@ -1,15 +1,15 @@ -using Newtonsoft.Json.Linq; +using System.Collections.Generic; using System.Linq; -using System.Collections.Generic; +using Newtonsoft.Json.Linq; -namespace Umbraco.Core.Models.Blocks +namespace Umbraco.Cms.Core.Models.Blocks { /// /// Data converter for the block list property editor /// public class BlockListEditorDataConverter : BlockEditorDataConverter { - public BlockListEditorDataConverter() : base(Constants.PropertyEditors.Aliases.BlockList) + public BlockListEditorDataConverter() : base(Cms.Core.Constants.PropertyEditors.Aliases.BlockList) { } diff --git a/src/Umbraco.Infrastructure/Models/Blocks/BlockListLayoutItem.cs b/src/Umbraco.Infrastructure/Models/Blocks/BlockListLayoutItem.cs index 5de44e16c1..49c3246d84 100644 --- a/src/Umbraco.Infrastructure/Models/Blocks/BlockListLayoutItem.cs +++ b/src/Umbraco.Infrastructure/Models/Blocks/BlockListLayoutItem.cs @@ -1,7 +1,7 @@ using Newtonsoft.Json; -using Umbraco.Core.Serialization; +using Umbraco.Cms.Infrastructure.Serialization; -namespace Umbraco.Core.Models.Blocks +namespace Umbraco.Cms.Core.Models.Blocks { /// /// Used for deserializing the block list layout diff --git a/src/Umbraco.Infrastructure/Models/Blocks/BlockValue.cs b/src/Umbraco.Infrastructure/Models/Blocks/BlockValue.cs index 4700ddfd3b..c6328bc0c3 100644 --- a/src/Umbraco.Infrastructure/Models/Blocks/BlockValue.cs +++ b/src/Umbraco.Infrastructure/Models/Blocks/BlockValue.cs @@ -1,8 +1,8 @@ -using Newtonsoft.Json; +using System.Collections.Generic; +using Newtonsoft.Json; using Newtonsoft.Json.Linq; -using System.Collections.Generic; -namespace Umbraco.Core.Models.Blocks +namespace Umbraco.Cms.Core.Models.Blocks { public class BlockValue { diff --git a/src/Umbraco.Infrastructure/Models/GridValue.cs b/src/Umbraco.Infrastructure/Models/GridValue.cs index 157304463f..b6caed78f4 100644 --- a/src/Umbraco.Infrastructure/Models/GridValue.cs +++ b/src/Umbraco.Infrastructure/Models/GridValue.cs @@ -3,7 +3,7 @@ using System.Collections.Generic; using Newtonsoft.Json; using Newtonsoft.Json.Linq; -namespace Umbraco.Core.Models +namespace Umbraco.Cms.Core.Models { // TODO: Make a property value converter for this! diff --git a/src/Umbraco.Infrastructure/Models/Mapping/EntityMapDefinition.cs b/src/Umbraco.Infrastructure/Models/Mapping/EntityMapDefinition.cs index 3663095739..4bdd37d6b0 100644 --- a/src/Umbraco.Infrastructure/Models/Mapping/EntityMapDefinition.cs +++ b/src/Umbraco.Infrastructure/Models/Mapping/EntityMapDefinition.cs @@ -1,15 +1,14 @@ using System; using System.Collections.Generic; using Examine; -using Umbraco.Core; -using Umbraco.Core.Mapping; -using Umbraco.Core.Models; -using Umbraco.Core.Models.Entities; -using Umbraco.Core.Models.Membership; -using Umbraco.Web.Models.ContentEditing; -using Umbraco.Examine; +using Umbraco.Cms.Core.Mapping; +using Umbraco.Cms.Core.Models.ContentEditing; +using Umbraco.Cms.Core.Models.Entities; +using Umbraco.Cms.Core.Models.Membership; +using Umbraco.Cms.Infrastructure.Examine; +using Umbraco.Extensions; -namespace Umbraco.Web.Models.Mapping +namespace Umbraco.Cms.Core.Models.Mapping { public class EntityMapDefinition : IMapDefinition { diff --git a/src/Umbraco.Infrastructure/Models/PathValidationExtensions.cs b/src/Umbraco.Infrastructure/Models/PathValidationExtensions.cs index f6ed96fb99..d805eba9d5 100644 --- a/src/Umbraco.Infrastructure/Models/PathValidationExtensions.cs +++ b/src/Umbraco.Infrastructure/Models/PathValidationExtensions.cs @@ -1,10 +1,12 @@ using System; using System.IO; using Microsoft.Extensions.Logging; -using Umbraco.Core.Models.Entities; -using Umbraco.Core.Persistence.Dtos; +using Umbraco.Cms.Core; +using Umbraco.Cms.Core.Models.Entities; +using Umbraco.Cms.Infrastructure.Persistence.Dtos; +using Umbraco.Extensions; -namespace Umbraco.Core.Models +namespace Umbraco.Cms.Core.Models { /// /// Provides extension methods for path validation. diff --git a/src/Umbraco.ModelsBuilder.Embedded/ApiVersion.cs b/src/Umbraco.Infrastructure/ModelsBuilder/ApiVersion.cs similarity index 79% rename from src/Umbraco.ModelsBuilder.Embedded/ApiVersion.cs rename to src/Umbraco.Infrastructure/ModelsBuilder/ApiVersion.cs index 22347edd60..efd7257414 100644 --- a/src/Umbraco.ModelsBuilder.Embedded/ApiVersion.cs +++ b/src/Umbraco.Infrastructure/ModelsBuilder/ApiVersion.cs @@ -1,8 +1,8 @@ -using System; +using System; using System.Reflection; -using Semver; +using Umbraco.Cms.Core.Semver; -namespace Umbraco.ModelsBuilder.Embedded +namespace Umbraco.Cms.Infrastructure.ModelsBuilder { /// /// Manages API version handshake between client and server. @@ -14,10 +14,7 @@ namespace Umbraco.ModelsBuilder.Embedded /// /// The currently executing version. /// - internal ApiVersion(SemVersion executingVersion) - { - Version = executingVersion ?? throw new ArgumentNullException(nameof(executingVersion)); - } + internal ApiVersion(SemVersion executingVersion) => Version = executingVersion ?? throw new ArgumentNullException(nameof(executingVersion)); private static SemVersion CurrentAssemblyVersion => SemVersion.Parse(Assembly.GetExecutingAssembly().GetCustomAttribute().InformationalVersion); diff --git a/src/Umbraco.ModelsBuilder.Embedded/Building/Builder.cs b/src/Umbraco.Infrastructure/ModelsBuilder/Building/Builder.cs similarity index 96% rename from src/Umbraco.ModelsBuilder.Embedded/Building/Builder.cs rename to src/Umbraco.Infrastructure/ModelsBuilder/Building/Builder.cs index aa7ab40ba5..e5d1b9d51f 100644 --- a/src/Umbraco.ModelsBuilder.Embedded/Building/Builder.cs +++ b/src/Umbraco.Infrastructure/ModelsBuilder/Building/Builder.cs @@ -1,11 +1,11 @@ -using System; +using System; using System.Collections.Generic; using System.Linq; -using Umbraco.Core; -using Umbraco.Core.Configuration; -using Umbraco.Core.Configuration.Models; +using Umbraco.Cms.Core; +using Umbraco.Cms.Core.Configuration; +using Umbraco.Cms.Core.Configuration.Models; -namespace Umbraco.ModelsBuilder.Embedded.Building +namespace Umbraco.Cms.Infrastructure.ModelsBuilder.Building { // NOTE // The idea was to have different types of builder, because I wanted to experiment with @@ -28,10 +28,11 @@ namespace Umbraco.ModelsBuilder.Embedded.Building { "System", "System.Linq.Expressions", - "Umbraco.Core.Models.PublishedContent", - "Umbraco.Web.PublishedCache", - "Umbraco.ModelsBuilder.Embedded", - "Umbraco.Core" + "Umbraco.Cms.Core.Models.PublishedContent", + "Umbraco.Cms.Core.PublishedCache", + "Umbraco.Cms.Infrastructure.ModelsBuilder", + "Umbraco.Cms.Core", + "Umbraco.Extensions" }; /// diff --git a/src/Umbraco.ModelsBuilder.Embedded/Building/ModelsGenerator.cs b/src/Umbraco.Infrastructure/ModelsBuilder/Building/ModelsGenerator.cs similarity index 91% rename from src/Umbraco.ModelsBuilder.Embedded/Building/ModelsGenerator.cs rename to src/Umbraco.Infrastructure/ModelsBuilder/Building/ModelsGenerator.cs index 9431b0141a..ac4780cb7c 100644 --- a/src/Umbraco.ModelsBuilder.Embedded/Building/ModelsGenerator.cs +++ b/src/Umbraco.Infrastructure/ModelsBuilder/Building/ModelsGenerator.cs @@ -1,12 +1,11 @@ using System.IO; using System.Text; using Microsoft.Extensions.Options; -using Umbraco.Core.Configuration; -using Umbraco.Core.Configuration.Models; -using Umbraco.Core.Hosting; -using Umbraco.Core.IO; +using Umbraco.Cms.Core.Configuration.Models; +using Umbraco.Cms.Core.Hosting; +using Umbraco.Extensions; -namespace Umbraco.ModelsBuilder.Embedded.Building +namespace Umbraco.Cms.Infrastructure.ModelsBuilder.Building { public class ModelsGenerator { @@ -23,7 +22,7 @@ namespace Umbraco.ModelsBuilder.Embedded.Building _hostingEnvironment = hostingEnvironment; } - internal void GenerateModels() + public void GenerateModels() { var modelsDirectory = _config.ModelsDirectoryAbsolute(_hostingEnvironment); if (!Directory.Exists(modelsDirectory)) diff --git a/src/Umbraco.ModelsBuilder.Embedded/Building/PropertyModel.cs b/src/Umbraco.Infrastructure/ModelsBuilder/Building/PropertyModel.cs similarity index 96% rename from src/Umbraco.ModelsBuilder.Embedded/Building/PropertyModel.cs rename to src/Umbraco.Infrastructure/ModelsBuilder/Building/PropertyModel.cs index af5445b175..fbb29e3ebd 100644 --- a/src/Umbraco.ModelsBuilder.Embedded/Building/PropertyModel.cs +++ b/src/Umbraco.Infrastructure/ModelsBuilder/Building/PropertyModel.cs @@ -1,7 +1,7 @@ -using System; +using System; using System.Collections.Generic; -namespace Umbraco.ModelsBuilder.Embedded.Building +namespace Umbraco.Cms.Infrastructure.ModelsBuilder.Building { /// /// Represents a model property. diff --git a/src/Umbraco.ModelsBuilder.Embedded/Building/TextBuilder.cs b/src/Umbraco.Infrastructure/ModelsBuilder/Building/TextBuilder.cs similarity index 99% rename from src/Umbraco.ModelsBuilder.Embedded/Building/TextBuilder.cs rename to src/Umbraco.Infrastructure/ModelsBuilder/Building/TextBuilder.cs index 8328afb822..7acfbcf26a 100644 --- a/src/Umbraco.ModelsBuilder.Embedded/Building/TextBuilder.cs +++ b/src/Umbraco.Infrastructure/ModelsBuilder/Building/TextBuilder.cs @@ -1,16 +1,16 @@ -using System; +using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Text.RegularExpressions; -using Umbraco.Core.Configuration.Models; +using Umbraco.Cms.Core.Configuration.Models; -namespace Umbraco.ModelsBuilder.Embedded.Building +namespace Umbraco.Cms.Infrastructure.ModelsBuilder.Building { /// /// Implements a builder that works by writing text. /// - internal class TextBuilder : Builder + public class TextBuilder : Builder { /// /// Initializes a new instance of the class with a list of models to generate @@ -194,7 +194,7 @@ namespace Umbraco.ModelsBuilder.Embedded.Building sb.Append("\t\tprivate IPublishedValueFallback _publishedValueFallback;"); // write the ctor - sb.AppendFormat("\n\n\t\t// ctor\n\t\tpublic {0}(IPublished{1} content, IPublishedValueFallback publishedValueFallback)\n\t\t\t: base(content)\n\t\t{{\n\t\t\t_publishedValueFallback = publishedValueFallback; \n\t\t}}\n\n", + sb.AppendFormat("\n\n\t\t// ctor\n\t\tpublic {0}(IPublished{1} content, IPublishedValueFallback publishedValueFallback)\n\t\t\t: base(content)\n\t\t{{\n\t\t\t_publishedValueFallback = publishedValueFallback;\n\t\t}}\n\n", type.ClrName, type.IsElement ? "Element" : "Content"); // write the properties diff --git a/src/Umbraco.ModelsBuilder.Embedded/Building/TextHeaderWriter.cs b/src/Umbraco.Infrastructure/ModelsBuilder/Building/TextHeaderWriter.cs similarity index 92% rename from src/Umbraco.ModelsBuilder.Embedded/Building/TextHeaderWriter.cs rename to src/Umbraco.Infrastructure/ModelsBuilder/Building/TextHeaderWriter.cs index 0ffad1c5bc..a192560f1d 100644 --- a/src/Umbraco.ModelsBuilder.Embedded/Building/TextHeaderWriter.cs +++ b/src/Umbraco.Infrastructure/ModelsBuilder/Building/TextHeaderWriter.cs @@ -1,6 +1,6 @@ -using System.Text; +using System.Text; -namespace Umbraco.ModelsBuilder.Embedded.Building +namespace Umbraco.Cms.Infrastructure.ModelsBuilder.Building { internal static class TextHeaderWriter { diff --git a/src/Umbraco.ModelsBuilder.Embedded/Building/TypeModel.cs b/src/Umbraco.Infrastructure/ModelsBuilder/Building/TypeModel.cs similarity index 98% rename from src/Umbraco.ModelsBuilder.Embedded/Building/TypeModel.cs rename to src/Umbraco.Infrastructure/ModelsBuilder/Building/TypeModel.cs index 95356cf3ff..e5ee0a36b5 100644 --- a/src/Umbraco.ModelsBuilder.Embedded/Building/TypeModel.cs +++ b/src/Umbraco.Infrastructure/ModelsBuilder/Building/TypeModel.cs @@ -1,9 +1,9 @@ -using System; +using System; using System.Collections.Generic; using System.Linq; -using Umbraco.Core.Models.PublishedContent; +using Umbraco.Cms.Core.Models.PublishedContent; -namespace Umbraco.ModelsBuilder.Embedded.Building +namespace Umbraco.Cms.Infrastructure.ModelsBuilder.Building { /// /// Represents a model. diff --git a/src/Umbraco.ModelsBuilder.Embedded/Building/TypeModelHasher.cs b/src/Umbraco.Infrastructure/ModelsBuilder/Building/TypeModelHasher.cs similarity index 92% rename from src/Umbraco.ModelsBuilder.Embedded/Building/TypeModelHasher.cs rename to src/Umbraco.Infrastructure/ModelsBuilder/Building/TypeModelHasher.cs index c5b053ca07..46af457299 100644 --- a/src/Umbraco.ModelsBuilder.Embedded/Building/TypeModelHasher.cs +++ b/src/Umbraco.Infrastructure/ModelsBuilder/Building/TypeModelHasher.cs @@ -1,13 +1,11 @@ -using System; using System.Collections.Generic; using System.Linq; -using System.Security.Cryptography; using System.Text; -using Umbraco.Core; +using Umbraco.Extensions; -namespace Umbraco.ModelsBuilder.Embedded.Building +namespace Umbraco.Cms.Infrastructure.ModelsBuilder.Building { - internal class TypeModelHasher + public class TypeModelHasher { public static string Hash(IEnumerable typeModels) { diff --git a/src/Umbraco.Infrastructure/ModelsBuilder/ImplementPropertyTypeAttribute.cs b/src/Umbraco.Infrastructure/ModelsBuilder/ImplementPropertyTypeAttribute.cs new file mode 100644 index 0000000000..474bea9251 --- /dev/null +++ b/src/Umbraco.Infrastructure/ModelsBuilder/ImplementPropertyTypeAttribute.cs @@ -0,0 +1,16 @@ +using System; + +namespace Umbraco.Cms.Infrastructure.ModelsBuilder +{ + /// + /// Indicates that a property implements a given property alias. + /// + /// And therefore it should not be generated. + [AttributeUsage(AttributeTargets.Property /*, AllowMultiple = false, Inherited = false*/)] + public class ImplementPropertyTypeAttribute : Attribute + { + public ImplementPropertyTypeAttribute(string alias) => Alias = alias; + + public string Alias { get; } + } +} diff --git a/src/Umbraco.ModelsBuilder.Embedded/LiveModelsProvider.cs b/src/Umbraco.Infrastructure/ModelsBuilder/LiveModelsProvider.cs similarity index 94% rename from src/Umbraco.ModelsBuilder.Embedded/LiveModelsProvider.cs rename to src/Umbraco.Infrastructure/ModelsBuilder/LiveModelsProvider.cs index eafc006c26..2c0a71016a 100644 --- a/src/Umbraco.ModelsBuilder.Embedded/LiveModelsProvider.cs +++ b/src/Umbraco.Infrastructure/ModelsBuilder/LiveModelsProvider.cs @@ -2,15 +2,14 @@ using System; using System.Threading; using Microsoft.Extensions.Logging; using Microsoft.Extensions.Options; -using Umbraco.Configuration; -using Umbraco.Core; -using Umbraco.Core.Configuration.Models; -using Umbraco.Core.Events; +using Umbraco.Cms.Core.Cache; +using Umbraco.Cms.Core.Configuration.Models; +using Umbraco.Cms.Core.Events; +using Umbraco.Cms.Core.Runtime; +using Umbraco.Cms.Infrastructure.ModelsBuilder.Building; using Umbraco.Extensions; -using Umbraco.ModelsBuilder.Embedded.Building; -using Umbraco.Web.Cache; -namespace Umbraco.ModelsBuilder.Embedded +namespace Umbraco.Cms.Infrastructure.ModelsBuilder { // supports LiveAppData - but not PureLive public sealed class LiveModelsProvider : INotificationHandler, INotificationHandler diff --git a/src/Umbraco.ModelsBuilder.Embedded/ModelsBuilderAssemblyAttribute.cs b/src/Umbraco.Infrastructure/ModelsBuilder/ModelsBuilderAssemblyAttribute.cs similarity index 92% rename from src/Umbraco.ModelsBuilder.Embedded/ModelsBuilderAssemblyAttribute.cs rename to src/Umbraco.Infrastructure/ModelsBuilder/ModelsBuilderAssemblyAttribute.cs index 7570c0b5b2..6754060d6f 100644 --- a/src/Umbraco.ModelsBuilder.Embedded/ModelsBuilderAssemblyAttribute.cs +++ b/src/Umbraco.Infrastructure/ModelsBuilder/ModelsBuilderAssemblyAttribute.cs @@ -1,6 +1,6 @@ -using System; +using System; -namespace Umbraco.ModelsBuilder.Embedded +namespace Umbraco.Cms.Infrastructure.ModelsBuilder { /// /// Indicates that an Assembly is a Models Builder assembly. diff --git a/src/Umbraco.ModelsBuilder.Embedded/ModelsGenerationError.cs b/src/Umbraco.Infrastructure/ModelsBuilder/ModelsGenerationError.cs similarity index 93% rename from src/Umbraco.ModelsBuilder.Embedded/ModelsGenerationError.cs rename to src/Umbraco.Infrastructure/ModelsBuilder/ModelsGenerationError.cs index 25f48a19cc..18b28c2bba 100644 --- a/src/Umbraco.ModelsBuilder.Embedded/ModelsGenerationError.cs +++ b/src/Umbraco.Infrastructure/ModelsBuilder/ModelsGenerationError.cs @@ -2,11 +2,11 @@ using System; using System.IO; using System.Text; using Microsoft.Extensions.Options; -using Umbraco.Core.Configuration; -using Umbraco.Core.Configuration.Models; -using Umbraco.Core.Hosting; +using Umbraco.Cms.Core.Configuration.Models; +using Umbraco.Cms.Core.Hosting; +using Umbraco.Extensions; -namespace Umbraco.ModelsBuilder.Embedded +namespace Umbraco.Cms.Infrastructure.ModelsBuilder { public sealed class ModelsGenerationError { diff --git a/src/Umbraco.ModelsBuilder.Embedded/OutOfDateModelsStatus.cs b/src/Umbraco.Infrastructure/ModelsBuilder/OutOfDateModelsStatus.cs similarity index 93% rename from src/Umbraco.ModelsBuilder.Embedded/OutOfDateModelsStatus.cs rename to src/Umbraco.Infrastructure/ModelsBuilder/OutOfDateModelsStatus.cs index 83f105a486..65a7ac3ef8 100644 --- a/src/Umbraco.ModelsBuilder.Embedded/OutOfDateModelsStatus.cs +++ b/src/Umbraco.Infrastructure/ModelsBuilder/OutOfDateModelsStatus.cs @@ -1,12 +1,12 @@ using System.IO; using Microsoft.Extensions.Options; -using Umbraco.Core.Configuration; -using Umbraco.Core.Configuration.Models; -using Umbraco.Core.Events; -using Umbraco.Core.Hosting; -using Umbraco.Web.Cache; +using Umbraco.Cms.Core.Cache; +using Umbraco.Cms.Core.Configuration.Models; +using Umbraco.Cms.Core.Events; +using Umbraco.Cms.Core.Hosting; +using Umbraco.Extensions; -namespace Umbraco.ModelsBuilder.Embedded +namespace Umbraco.Cms.Infrastructure.ModelsBuilder { /// /// Used to track if ModelsBuilder models are out of date/stale diff --git a/src/Umbraco.ModelsBuilder.Embedded/PublishedElementExtensions.cs b/src/Umbraco.Infrastructure/ModelsBuilder/PublishedElementExtensions.cs similarity index 93% rename from src/Umbraco.ModelsBuilder.Embedded/PublishedElementExtensions.cs rename to src/Umbraco.Infrastructure/ModelsBuilder/PublishedElementExtensions.cs index 0611d466dc..88e873517b 100644 --- a/src/Umbraco.ModelsBuilder.Embedded/PublishedElementExtensions.cs +++ b/src/Umbraco.Infrastructure/ModelsBuilder/PublishedElementExtensions.cs @@ -1,12 +1,12 @@ -using System; +using System; using System.Linq.Expressions; using System.Reflection; -using Umbraco.Core.Models.PublishedContent; -using Umbraco.ModelsBuilder.Embedded; +using Umbraco.Cms.Core.Models.PublishedContent; +using Umbraco.Cms.Infrastructure.ModelsBuilder; // same namespace as original Umbraco.Web PublishedElementExtensions // ReSharper disable once CheckNamespace -namespace Umbraco.Core +namespace Umbraco.Extensions { /// /// Provides extension methods to models. diff --git a/src/Umbraco.ModelsBuilder.Embedded/PublishedModelUtility.cs b/src/Umbraco.Infrastructure/ModelsBuilder/PublishedModelUtility.cs similarity index 95% rename from src/Umbraco.ModelsBuilder.Embedded/PublishedModelUtility.cs rename to src/Umbraco.Infrastructure/ModelsBuilder/PublishedModelUtility.cs index fd1d5128a0..82cf52a131 100644 --- a/src/Umbraco.ModelsBuilder.Embedded/PublishedModelUtility.cs +++ b/src/Umbraco.Infrastructure/ModelsBuilder/PublishedModelUtility.cs @@ -1,10 +1,10 @@ -using System; +using System; using System.Linq; using System.Linq.Expressions; -using Umbraco.Core.Models.PublishedContent; -using Umbraco.Web.PublishedCache; +using Umbraco.Cms.Core.Models.PublishedContent; +using Umbraco.Cms.Core.PublishedCache; -namespace Umbraco.ModelsBuilder.Embedded +namespace Umbraco.Cms.Infrastructure.ModelsBuilder { /// /// This is called from within the generated model classes @@ -29,7 +29,7 @@ namespace Umbraco.ModelsBuilder.Embedded // var contentType = PublishedContentType.Get(itemType, alias); // // etc... //} - + public static IPublishedContentType GetModelContentType(IPublishedSnapshotAccessor publishedSnapshotAccessor, PublishedItemType itemType, string alias) { var facade = publishedSnapshotAccessor.PublishedSnapshot; diff --git a/src/Umbraco.ModelsBuilder.Embedded/RoslynCompiler.cs b/src/Umbraco.Infrastructure/ModelsBuilder/RoslynCompiler.cs similarity index 98% rename from src/Umbraco.ModelsBuilder.Embedded/RoslynCompiler.cs rename to src/Umbraco.Infrastructure/ModelsBuilder/RoslynCompiler.cs index 37aeb75b35..15d2114f4d 100644 --- a/src/Umbraco.ModelsBuilder.Embedded/RoslynCompiler.cs +++ b/src/Umbraco.Infrastructure/ModelsBuilder/RoslynCompiler.cs @@ -7,7 +7,7 @@ using Microsoft.CodeAnalysis; using Microsoft.CodeAnalysis.CSharp; using Microsoft.CodeAnalysis.Text; -namespace Umbraco.ModelsBuilder.Embedded +namespace Umbraco.Cms.Infrastructure.ModelsBuilder { public class RoslynCompiler { diff --git a/src/Umbraco.ModelsBuilder.Embedded/TypeExtensions.cs b/src/Umbraco.Infrastructure/ModelsBuilder/TypeExtensions.cs similarity index 93% rename from src/Umbraco.ModelsBuilder.Embedded/TypeExtensions.cs rename to src/Umbraco.Infrastructure/ModelsBuilder/TypeExtensions.cs index 1f270a80a6..e9f427b158 100644 --- a/src/Umbraco.ModelsBuilder.Embedded/TypeExtensions.cs +++ b/src/Umbraco.Infrastructure/ModelsBuilder/TypeExtensions.cs @@ -1,6 +1,6 @@ -using System; +using System; -namespace Umbraco.ModelsBuilder.Embedded +namespace Umbraco.Cms.Infrastructure.ModelsBuilder { internal static class TypeExtensions { diff --git a/src/Umbraco.ModelsBuilder.Embedded/UmbracoServices.cs b/src/Umbraco.Infrastructure/ModelsBuilder/UmbracoServices.cs similarity index 96% rename from src/Umbraco.ModelsBuilder.Embedded/UmbracoServices.cs rename to src/Umbraco.Infrastructure/ModelsBuilder/UmbracoServices.cs index 86954a8a85..b4963639c4 100644 --- a/src/Umbraco.ModelsBuilder.Embedded/UmbracoServices.cs +++ b/src/Umbraco.Infrastructure/ModelsBuilder/UmbracoServices.cs @@ -1,15 +1,15 @@ using System; using System.Collections.Generic; using System.Linq; -using Umbraco.Core; -using Umbraco.Core.Exceptions; -using Umbraco.Core.Models; -using Umbraco.Core.Models.PublishedContent; -using Umbraco.Core.Services; -using Umbraco.Core.Strings; -using Umbraco.ModelsBuilder.Embedded.Building; +using Umbraco.Cms.Core.Exceptions; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Core.Models.PublishedContent; +using Umbraco.Cms.Core.Services; +using Umbraco.Cms.Core.Strings; +using Umbraco.Cms.Infrastructure.ModelsBuilder.Building; +using Umbraco.Extensions; -namespace Umbraco.ModelsBuilder.Embedded +namespace Umbraco.Cms.Infrastructure.ModelsBuilder { public sealed class UmbracoServices diff --git a/src/Umbraco.Infrastructure/Packaging/PackageDataInstallation.cs b/src/Umbraco.Infrastructure/Packaging/PackageDataInstallation.cs index f4c3326769..ead0791f08 100644 --- a/src/Umbraco.Infrastructure/Packaging/PackageDataInstallation.cs +++ b/src/Umbraco.Infrastructure/Packaging/PackageDataInstallation.cs @@ -7,18 +7,19 @@ using System.Xml.Linq; using System.Xml.XPath; using Microsoft.Extensions.Logging; using Microsoft.Extensions.Options; -using Umbraco.Core.Collections; -using Umbraco.Core.Configuration.Models; -using Umbraco.Core.Models; -using Umbraco.Core.Models.Entities; -using Umbraco.Core.Models.Packaging; -using Umbraco.Core.PropertyEditors; -using Umbraco.Core.Scoping; -using Umbraco.Core.Serialization; -using Umbraco.Core.Services; -using Umbraco.Core.Strings; +using Umbraco.Cms.Core.Collections; +using Umbraco.Cms.Core.Configuration.Models; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Core.Models.Entities; +using Umbraco.Cms.Core.Models.Packaging; +using Umbraco.Cms.Core.PropertyEditors; +using Umbraco.Cms.Core.Scoping; +using Umbraco.Cms.Core.Serialization; +using Umbraco.Cms.Core.Services; +using Umbraco.Cms.Core.Strings; +using Umbraco.Extensions; -namespace Umbraco.Core.Packaging +namespace Umbraco.Cms.Core.Packaging { public class PackageDataInstallation { @@ -481,11 +482,11 @@ namespace Umbraco.Core.Packaging case IMediaType m: if (parent is null) { - return new Umbraco.Core.Models.Media(name, parentId, m) { Key = key, Level = level, SortOrder = sortOrder, } as T; + return new Models.Media(name, parentId, m) { Key = key, Level = level, SortOrder = sortOrder, } as T; } else { - return new Umbraco.Core.Models.Media(name, (IMedia)parent, m) { Key = key, Level = level, SortOrder = sortOrder, } as T; + return new Models.Media(name, (IMedia)parent, m) { Key = key, Level = level, SortOrder = sortOrder, } as T; } default: @@ -923,7 +924,7 @@ namespace Umbraco.Core.Packaging property.Element("Name").Value, dataTypeDefinitionId, property.Element("Type").Value.Trim()); //convert to a label! - dataTypeDefinition = _dataTypeService.GetByEditorAlias(Constants.PropertyEditors.Aliases.Label).FirstOrDefault(); + dataTypeDefinition = _dataTypeService.GetByEditorAlias(Cms.Core.Constants.PropertyEditors.Aliases.Label).FirstOrDefault(); //if for some odd reason this isn't there then ignore if (dataTypeDefinition == null) continue; } @@ -1482,7 +1483,7 @@ namespace Umbraco.Core.Packaging private string ViewPath(string alias) { - return Constants.SystemDirectories.MvcViews + "/" + alias.Replace(" ", "") + ".cshtml"; + return Cms.Core.Constants.SystemDirectories.MvcViews + "/" + alias.Replace(" ", "") + ".cshtml"; } #endregion diff --git a/src/Umbraco.Infrastructure/Packaging/PackageInstallation.cs b/src/Umbraco.Infrastructure/Packaging/PackageInstallation.cs index df8a58fc8d..5409e2de3f 100644 --- a/src/Umbraco.Infrastructure/Packaging/PackageInstallation.cs +++ b/src/Umbraco.Infrastructure/Packaging/PackageInstallation.cs @@ -3,10 +3,11 @@ using System.Collections.Generic; using System.IO; using System.Linq; using System.Xml.Linq; -using Umbraco.Core.Hosting; -using Umbraco.Core.Models.Packaging; +using Umbraco.Cms.Core.Hosting; +using Umbraco.Cms.Core.Models.Packaging; +using Umbraco.Extensions; -namespace Umbraco.Core.Packaging +namespace Umbraco.Cms.Core.Packaging { public class PackageInstallation : IPackageInstallation { @@ -105,22 +106,39 @@ namespace Umbraco.Core.Packaging private IEnumerable RunPackageActions(PackageDefinition packageDefinition, IEnumerable actions) { - foreach (var n in actions) + var actionsElement = XElement.Parse(packageDefinition.Actions); + foreach (PackageAction action in actions) { //if there is an undo section then save it to the definition so we can run it at uninstallation - var undo = n.Undo; + var undo = action.Undo; if (undo) - packageDefinition.Actions += n.XmlData.ToString(); + { + actionsElement.Add(action.XmlData); + } + //Run the actions tagged only for 'install' - if (n.RunAt != ActionRunAt.Install) continue; + if (action.RunAt != ActionRunAt.Install) + { + continue; + } - if (n.Alias.IsNullOrWhiteSpace()) continue; + if (action.Alias.IsNullOrWhiteSpace()) + { + continue; + } //run the actions and report errors - if (!_packageActionRunner.RunPackageAction(packageDefinition.Name, n.Alias, n.XmlData, out var err)) - foreach (var e in err) yield return e; + if (!_packageActionRunner.RunPackageAction(packageDefinition.Name, action.Alias, action.XmlData, out var err)) + { + foreach (var e in err) + { + yield return e; + } + } } + + packageDefinition.Actions = actionsElement.ToString(); } private IEnumerable UndoPackageActions(IPackageInfo packageDefinition, IEnumerable actions) diff --git a/src/Umbraco.Infrastructure/Persistence/BasicBulkSqlInsertProvider.cs b/src/Umbraco.Infrastructure/Persistence/BasicBulkSqlInsertProvider.cs index b41546668f..4ce6abe7a0 100644 --- a/src/Umbraco.Infrastructure/Persistence/BasicBulkSqlInsertProvider.cs +++ b/src/Umbraco.Infrastructure/Persistence/BasicBulkSqlInsertProvider.cs @@ -1,14 +1,15 @@ using System.Collections.Generic; using System.Linq; +using Umbraco.Extensions; -namespace Umbraco.Core.Persistence +namespace Umbraco.Cms.Infrastructure.Persistence { /// /// A provider that just generates insert commands /// public class BasicBulkSqlInsertProvider : IBulkSqlInsertProvider { - public string ProviderName => Constants.DatabaseProviders.SqlServer; + public string ProviderName => Cms.Core.Constants.DatabaseProviders.SqlServer; public int BulkInsertRecords(IUmbracoDatabase database, IEnumerable records) { diff --git a/src/Umbraco.Infrastructure/Persistence/BulkDataReader.cs b/src/Umbraco.Infrastructure/Persistence/BulkDataReader.cs index 7dbe74922a..61db41a20a 100644 --- a/src/Umbraco.Infrastructure/Persistence/BulkDataReader.cs +++ b/src/Umbraco.Infrastructure/Persistence/BulkDataReader.cs @@ -11,7 +11,7 @@ using System.Linq; using System.Text; using System.Threading.Tasks; -namespace Umbraco.Core.Persistence +namespace Umbraco.Cms.Infrastructure.Persistence { /// /// A base implementation of that is suitable for . diff --git a/src/Umbraco.Infrastructure/Persistence/DatabaseAnnotations/ConstraintAttribute.cs b/src/Umbraco.Infrastructure/Persistence/DatabaseAnnotations/ConstraintAttribute.cs index c191ebe6f0..25744d63eb 100644 --- a/src/Umbraco.Infrastructure/Persistence/DatabaseAnnotations/ConstraintAttribute.cs +++ b/src/Umbraco.Infrastructure/Persistence/DatabaseAnnotations/ConstraintAttribute.cs @@ -1,6 +1,6 @@ using System; -namespace Umbraco.Core.Persistence.DatabaseAnnotations +namespace Umbraco.Cms.Infrastructure.Persistence.DatabaseAnnotations { /// /// Attribute that represents a db constraint diff --git a/src/Umbraco.Infrastructure/Persistence/DatabaseAnnotations/ForeignKeyAttribute.cs b/src/Umbraco.Infrastructure/Persistence/DatabaseAnnotations/ForeignKeyAttribute.cs index 2137b2ff44..6235c1a2b3 100644 --- a/src/Umbraco.Infrastructure/Persistence/DatabaseAnnotations/ForeignKeyAttribute.cs +++ b/src/Umbraco.Infrastructure/Persistence/DatabaseAnnotations/ForeignKeyAttribute.cs @@ -1,7 +1,7 @@ using System; using System.Data; -namespace Umbraco.Core.Persistence.DatabaseAnnotations +namespace Umbraco.Cms.Infrastructure.Persistence.DatabaseAnnotations { /// /// Attribute that represents a Foreign Key reference diff --git a/src/Umbraco.Infrastructure/Persistence/DatabaseAnnotations/IndexAttribute.cs b/src/Umbraco.Infrastructure/Persistence/DatabaseAnnotations/IndexAttribute.cs index 138dceff09..5c9f41b097 100644 --- a/src/Umbraco.Infrastructure/Persistence/DatabaseAnnotations/IndexAttribute.cs +++ b/src/Umbraco.Infrastructure/Persistence/DatabaseAnnotations/IndexAttribute.cs @@ -1,6 +1,6 @@ using System; -namespace Umbraco.Core.Persistence.DatabaseAnnotations +namespace Umbraco.Cms.Infrastructure.Persistence.DatabaseAnnotations { /// /// Attribute that represents an Index diff --git a/src/Umbraco.Infrastructure/Persistence/DatabaseAnnotations/IndexTypes.cs b/src/Umbraco.Infrastructure/Persistence/DatabaseAnnotations/IndexTypes.cs index e2cdd529c4..65516bb8c4 100644 --- a/src/Umbraco.Infrastructure/Persistence/DatabaseAnnotations/IndexTypes.cs +++ b/src/Umbraco.Infrastructure/Persistence/DatabaseAnnotations/IndexTypes.cs @@ -1,4 +1,4 @@ -namespace Umbraco.Core.Persistence.DatabaseAnnotations +namespace Umbraco.Cms.Infrastructure.Persistence.DatabaseAnnotations { /// /// Enum for the 3 types of indexes that can be created diff --git a/src/Umbraco.Infrastructure/Persistence/DatabaseAnnotations/LengthAttribute.cs b/src/Umbraco.Infrastructure/Persistence/DatabaseAnnotations/LengthAttribute.cs index 50e91e35de..8e77b4bf96 100644 --- a/src/Umbraco.Infrastructure/Persistence/DatabaseAnnotations/LengthAttribute.cs +++ b/src/Umbraco.Infrastructure/Persistence/DatabaseAnnotations/LengthAttribute.cs @@ -1,6 +1,6 @@ using System; -namespace Umbraco.Core.Persistence.DatabaseAnnotations +namespace Umbraco.Cms.Infrastructure.Persistence.DatabaseAnnotations { /// /// Attribute that represents the length of a column diff --git a/src/Umbraco.Infrastructure/Persistence/DatabaseAnnotations/NullSettingAttribute.cs b/src/Umbraco.Infrastructure/Persistence/DatabaseAnnotations/NullSettingAttribute.cs index d13b803c33..0db6433e94 100644 --- a/src/Umbraco.Infrastructure/Persistence/DatabaseAnnotations/NullSettingAttribute.cs +++ b/src/Umbraco.Infrastructure/Persistence/DatabaseAnnotations/NullSettingAttribute.cs @@ -1,6 +1,6 @@ using System; -namespace Umbraco.Core.Persistence.DatabaseAnnotations +namespace Umbraco.Cms.Infrastructure.Persistence.DatabaseAnnotations { /// /// Attribute that represents the Null-setting of a column diff --git a/src/Umbraco.Infrastructure/Persistence/DatabaseAnnotations/NullSettings.cs b/src/Umbraco.Infrastructure/Persistence/DatabaseAnnotations/NullSettings.cs index eea7141bb1..70c901c61e 100644 --- a/src/Umbraco.Infrastructure/Persistence/DatabaseAnnotations/NullSettings.cs +++ b/src/Umbraco.Infrastructure/Persistence/DatabaseAnnotations/NullSettings.cs @@ -1,4 +1,4 @@ -namespace Umbraco.Core.Persistence.DatabaseAnnotations +namespace Umbraco.Cms.Infrastructure.Persistence.DatabaseAnnotations { /// /// Enum with the 2 possible Null settings: Null or Not Null diff --git a/src/Umbraco.Infrastructure/Persistence/DatabaseAnnotations/PrimaryKeyColumnAttribute.cs b/src/Umbraco.Infrastructure/Persistence/DatabaseAnnotations/PrimaryKeyColumnAttribute.cs index 526464abb7..2fcc0c85d1 100644 --- a/src/Umbraco.Infrastructure/Persistence/DatabaseAnnotations/PrimaryKeyColumnAttribute.cs +++ b/src/Umbraco.Infrastructure/Persistence/DatabaseAnnotations/PrimaryKeyColumnAttribute.cs @@ -1,6 +1,6 @@ using System; -namespace Umbraco.Core.Persistence.DatabaseAnnotations +namespace Umbraco.Cms.Infrastructure.Persistence.DatabaseAnnotations { /// /// Attribute that represents a Primary Key diff --git a/src/Umbraco.Infrastructure/Persistence/DatabaseAnnotations/ReferencesAttribute.cs b/src/Umbraco.Infrastructure/Persistence/DatabaseAnnotations/ReferencesAttribute.cs index 87b2887258..f008aa7e22 100644 --- a/src/Umbraco.Infrastructure/Persistence/DatabaseAnnotations/ReferencesAttribute.cs +++ b/src/Umbraco.Infrastructure/Persistence/DatabaseAnnotations/ReferencesAttribute.cs @@ -1,6 +1,6 @@ using System; -namespace Umbraco.Core.Persistence.DatabaseAnnotations +namespace Umbraco.Cms.Infrastructure.Persistence.DatabaseAnnotations { /// /// Attribute that represents a reference between two tables/DTOs diff --git a/src/Umbraco.Infrastructure/Persistence/DatabaseAnnotations/SpecialDbTypeAttribute.cs b/src/Umbraco.Infrastructure/Persistence/DatabaseAnnotations/SpecialDbTypeAttribute.cs index 0568e5cd19..158a7ccb9b 100644 --- a/src/Umbraco.Infrastructure/Persistence/DatabaseAnnotations/SpecialDbTypeAttribute.cs +++ b/src/Umbraco.Infrastructure/Persistence/DatabaseAnnotations/SpecialDbTypeAttribute.cs @@ -1,6 +1,6 @@ using System; -namespace Umbraco.Core.Persistence.DatabaseAnnotations +namespace Umbraco.Cms.Infrastructure.Persistence.DatabaseAnnotations { /// /// Attribute that represents the usage of a special type diff --git a/src/Umbraco.Infrastructure/Persistence/DatabaseAnnotations/SpecialDbTypes.cs b/src/Umbraco.Infrastructure/Persistence/DatabaseAnnotations/SpecialDbTypes.cs index 6d211ebbd9..9d07395743 100644 --- a/src/Umbraco.Infrastructure/Persistence/DatabaseAnnotations/SpecialDbTypes.cs +++ b/src/Umbraco.Infrastructure/Persistence/DatabaseAnnotations/SpecialDbTypes.cs @@ -1,4 +1,4 @@ -namespace Umbraco.Core.Persistence.DatabaseAnnotations +namespace Umbraco.Cms.Infrastructure.Persistence.DatabaseAnnotations { /// /// Enum with the two special types that has to be supported because diff --git a/src/Umbraco.Infrastructure/Persistence/DatabaseModelDefinitions/ColumnDefinition.cs b/src/Umbraco.Infrastructure/Persistence/DatabaseModelDefinitions/ColumnDefinition.cs index 7504dc2fb7..2c22863ae5 100644 --- a/src/Umbraco.Infrastructure/Persistence/DatabaseModelDefinitions/ColumnDefinition.cs +++ b/src/Umbraco.Infrastructure/Persistence/DatabaseModelDefinitions/ColumnDefinition.cs @@ -1,8 +1,8 @@ using System; using System.Data; -using Umbraco.Core.Persistence.DatabaseAnnotations; +using Umbraco.Cms.Infrastructure.Persistence.DatabaseAnnotations; -namespace Umbraco.Core.Persistence.DatabaseModelDefinitions +namespace Umbraco.Cms.Infrastructure.Persistence.DatabaseModelDefinitions { public class ColumnDefinition { diff --git a/src/Umbraco.Infrastructure/Persistence/DatabaseModelDefinitions/ConstraintDefinition.cs b/src/Umbraco.Infrastructure/Persistence/DatabaseModelDefinitions/ConstraintDefinition.cs index ee269130f0..fafd9d44e2 100644 --- a/src/Umbraco.Infrastructure/Persistence/DatabaseModelDefinitions/ConstraintDefinition.cs +++ b/src/Umbraco.Infrastructure/Persistence/DatabaseModelDefinitions/ConstraintDefinition.cs @@ -1,6 +1,6 @@ using System.Collections.Generic; -namespace Umbraco.Core.Persistence.DatabaseModelDefinitions +namespace Umbraco.Cms.Infrastructure.Persistence.DatabaseModelDefinitions { public class ConstraintDefinition { diff --git a/src/Umbraco.Infrastructure/Persistence/DatabaseModelDefinitions/ConstraintType.cs b/src/Umbraco.Infrastructure/Persistence/DatabaseModelDefinitions/ConstraintType.cs index 9cb2a518fe..4592f1f14f 100644 --- a/src/Umbraco.Infrastructure/Persistence/DatabaseModelDefinitions/ConstraintType.cs +++ b/src/Umbraco.Infrastructure/Persistence/DatabaseModelDefinitions/ConstraintType.cs @@ -1,4 +1,4 @@ -namespace Umbraco.Core.Persistence.DatabaseModelDefinitions +namespace Umbraco.Cms.Infrastructure.Persistence.DatabaseModelDefinitions { public enum ConstraintType { diff --git a/src/Umbraco.Infrastructure/Persistence/DatabaseModelDefinitions/DbIndexDefinition.cs b/src/Umbraco.Infrastructure/Persistence/DatabaseModelDefinitions/DbIndexDefinition.cs index 3c6915dc34..df73074a35 100644 --- a/src/Umbraco.Infrastructure/Persistence/DatabaseModelDefinitions/DbIndexDefinition.cs +++ b/src/Umbraco.Infrastructure/Persistence/DatabaseModelDefinitions/DbIndexDefinition.cs @@ -1,6 +1,6 @@ using System; -namespace Umbraco.Core.Persistence.DatabaseModelDefinitions +namespace Umbraco.Cms.Infrastructure.Persistence.DatabaseModelDefinitions { /// /// Represents a database index definition retrieved by querying the database diff --git a/src/Umbraco.Infrastructure/Persistence/DatabaseModelDefinitions/DefinitionFactory.cs b/src/Umbraco.Infrastructure/Persistence/DatabaseModelDefinitions/DefinitionFactory.cs index 5925e58afc..986e2d760a 100644 --- a/src/Umbraco.Infrastructure/Persistence/DatabaseModelDefinitions/DefinitionFactory.cs +++ b/src/Umbraco.Infrastructure/Persistence/DatabaseModelDefinitions/DefinitionFactory.cs @@ -1,12 +1,13 @@ using System; -using System.Data; using System.Linq; using System.Reflection; using NPoco; -using Umbraco.Core.Persistence.DatabaseAnnotations; -using Umbraco.Core.Persistence.SqlSyntax; +using Umbraco.Cms.Core; +using Umbraco.Cms.Infrastructure.Persistence.DatabaseAnnotations; +using Umbraco.Cms.Infrastructure.Persistence.SqlSyntax; +using Umbraco.Extensions; -namespace Umbraco.Core.Persistence.DatabaseModelDefinitions +namespace Umbraco.Cms.Infrastructure.Persistence.DatabaseModelDefinitions { internal static class DefinitionFactory { @@ -155,7 +156,7 @@ namespace Umbraco.Core.Persistence.DatabaseModelDefinitions Name = indexName, IndexType = attribute.IndexType, ColumnName = columnName, - TableName = tableName, + TableName = tableName, }; if (string.IsNullOrEmpty(attribute.ForColumns) == false) diff --git a/src/Umbraco.Infrastructure/Persistence/DatabaseModelDefinitions/DeletionDataDefinition.cs b/src/Umbraco.Infrastructure/Persistence/DatabaseModelDefinitions/DeletionDataDefinition.cs index b1508689dc..7a285534ba 100644 --- a/src/Umbraco.Infrastructure/Persistence/DatabaseModelDefinitions/DeletionDataDefinition.cs +++ b/src/Umbraco.Infrastructure/Persistence/DatabaseModelDefinitions/DeletionDataDefinition.cs @@ -1,6 +1,6 @@ using System.Collections.Generic; -namespace Umbraco.Core.Persistence.DatabaseModelDefinitions +namespace Umbraco.Cms.Infrastructure.Persistence.DatabaseModelDefinitions { public class DeletionDataDefinition : List> { diff --git a/src/Umbraco.Infrastructure/Persistence/DatabaseModelDefinitions/ForeignKeyDefinition.cs b/src/Umbraco.Infrastructure/Persistence/DatabaseModelDefinitions/ForeignKeyDefinition.cs index 22bfba88b6..85747ea9e2 100644 --- a/src/Umbraco.Infrastructure/Persistence/DatabaseModelDefinitions/ForeignKeyDefinition.cs +++ b/src/Umbraco.Infrastructure/Persistence/DatabaseModelDefinitions/ForeignKeyDefinition.cs @@ -1,7 +1,7 @@ using System.Collections.Generic; using System.Data; -namespace Umbraco.Core.Persistence.DatabaseModelDefinitions +namespace Umbraco.Cms.Infrastructure.Persistence.DatabaseModelDefinitions { public class ForeignKeyDefinition { diff --git a/src/Umbraco.Infrastructure/Persistence/DatabaseModelDefinitions/IndexColumnDefinition.cs b/src/Umbraco.Infrastructure/Persistence/DatabaseModelDefinitions/IndexColumnDefinition.cs index 3638ca9520..e11129ebf0 100644 --- a/src/Umbraco.Infrastructure/Persistence/DatabaseModelDefinitions/IndexColumnDefinition.cs +++ b/src/Umbraco.Infrastructure/Persistence/DatabaseModelDefinitions/IndexColumnDefinition.cs @@ -1,4 +1,6 @@ -namespace Umbraco.Core.Persistence.DatabaseModelDefinitions +using Umbraco.Cms.Core; + +namespace Umbraco.Cms.Infrastructure.Persistence.DatabaseModelDefinitions { public class IndexColumnDefinition { diff --git a/src/Umbraco.Infrastructure/Persistence/DatabaseModelDefinitions/IndexDefinition.cs b/src/Umbraco.Infrastructure/Persistence/DatabaseModelDefinitions/IndexDefinition.cs index 582f9a40f7..a1e14ac580 100644 --- a/src/Umbraco.Infrastructure/Persistence/DatabaseModelDefinitions/IndexDefinition.cs +++ b/src/Umbraco.Infrastructure/Persistence/DatabaseModelDefinitions/IndexDefinition.cs @@ -1,8 +1,7 @@ -using System; -using System.Collections.Generic; -using Umbraco.Core.Persistence.DatabaseAnnotations; +using System.Collections.Generic; +using Umbraco.Cms.Infrastructure.Persistence.DatabaseAnnotations; -namespace Umbraco.Core.Persistence.DatabaseModelDefinitions +namespace Umbraco.Cms.Infrastructure.Persistence.DatabaseModelDefinitions { public class IndexDefinition { diff --git a/src/Umbraco.Infrastructure/Persistence/DatabaseModelDefinitions/InsertionDataDefinition.cs b/src/Umbraco.Infrastructure/Persistence/DatabaseModelDefinitions/InsertionDataDefinition.cs index 8f837244e9..077d38b9c7 100644 --- a/src/Umbraco.Infrastructure/Persistence/DatabaseModelDefinitions/InsertionDataDefinition.cs +++ b/src/Umbraco.Infrastructure/Persistence/DatabaseModelDefinitions/InsertionDataDefinition.cs @@ -1,6 +1,6 @@ using System.Collections.Generic; -namespace Umbraco.Core.Persistence.DatabaseModelDefinitions +namespace Umbraco.Cms.Infrastructure.Persistence.DatabaseModelDefinitions { public class InsertionDataDefinition : List> { diff --git a/src/Umbraco.Infrastructure/Persistence/DatabaseModelDefinitions/ModificationType.cs b/src/Umbraco.Infrastructure/Persistence/DatabaseModelDefinitions/ModificationType.cs index 506ddcecc7..490b06e41d 100644 --- a/src/Umbraco.Infrastructure/Persistence/DatabaseModelDefinitions/ModificationType.cs +++ b/src/Umbraco.Infrastructure/Persistence/DatabaseModelDefinitions/ModificationType.cs @@ -1,4 +1,4 @@ -namespace Umbraco.Core.Persistence.DatabaseModelDefinitions +namespace Umbraco.Cms.Infrastructure.Persistence.DatabaseModelDefinitions { public enum ModificationType { diff --git a/src/Umbraco.Infrastructure/Persistence/DatabaseModelDefinitions/SystemMethods.cs b/src/Umbraco.Infrastructure/Persistence/DatabaseModelDefinitions/SystemMethods.cs index 18d0bce19d..24daa49f35 100644 --- a/src/Umbraco.Infrastructure/Persistence/DatabaseModelDefinitions/SystemMethods.cs +++ b/src/Umbraco.Infrastructure/Persistence/DatabaseModelDefinitions/SystemMethods.cs @@ -1,4 +1,4 @@ -namespace Umbraco.Core.Persistence.DatabaseModelDefinitions +namespace Umbraco.Cms.Infrastructure.Persistence.DatabaseModelDefinitions { public enum SystemMethods { diff --git a/src/Umbraco.Infrastructure/Persistence/DatabaseModelDefinitions/TableDefinition.cs b/src/Umbraco.Infrastructure/Persistence/DatabaseModelDefinitions/TableDefinition.cs index e79c10d097..abcb6f9700 100644 --- a/src/Umbraco.Infrastructure/Persistence/DatabaseModelDefinitions/TableDefinition.cs +++ b/src/Umbraco.Infrastructure/Persistence/DatabaseModelDefinitions/TableDefinition.cs @@ -1,6 +1,6 @@ using System.Collections.Generic; -namespace Umbraco.Core.Persistence.DatabaseModelDefinitions +namespace Umbraco.Cms.Infrastructure.Persistence.DatabaseModelDefinitions { public class TableDefinition { diff --git a/src/Umbraco.Infrastructure/Persistence/DbCommandExtensions.cs b/src/Umbraco.Infrastructure/Persistence/DbCommandExtensions.cs index a13eed3dcf..f70da7c8fb 100644 --- a/src/Umbraco.Infrastructure/Persistence/DbCommandExtensions.cs +++ b/src/Umbraco.Infrastructure/Persistence/DbCommandExtensions.cs @@ -1,6 +1,6 @@ using System.Data; -namespace Umbraco.Core.Persistence +namespace Umbraco.Cms.Infrastructure.Persistence { internal static class DbCommandExtensions { diff --git a/src/Umbraco.Infrastructure/Persistence/DbConnectionExtensions.cs b/src/Umbraco.Infrastructure/Persistence/DbConnectionExtensions.cs index 82832a3627..5d657ef18b 100644 --- a/src/Umbraco.Infrastructure/Persistence/DbConnectionExtensions.cs +++ b/src/Umbraco.Infrastructure/Persistence/DbConnectionExtensions.cs @@ -1,13 +1,14 @@ using System; using System.Data; using System.Data.Common; -using System.Data.SqlClient; using System.Linq; using Microsoft.Extensions.Logging; using StackExchange.Profiling.Data; -using Umbraco.Core.Persistence.FaultHandling; +using Umbraco.Cms.Core; +using Umbraco.Cms.Infrastructure.Persistence.FaultHandling; +using Umbraco.Extensions; -namespace Umbraco.Core.Persistence +namespace Umbraco.Extensions { public static class DbConnectionExtensions { @@ -20,10 +21,10 @@ namespace Umbraco.Core.Persistence //this dictionary is case insensitive && builder["Data source"].ToString().InvariantContains(".sdf")) { - return Constants.DbProviderNames.SqlCe; + return Cms.Core.Constants.DbProviderNames.SqlCe; } - return Constants.DbProviderNames.SqlServer; + return Cms.Core.Constants.DbProviderNames.SqlServer; } public static bool IsConnectionAvailable(string connectionString, DbProviderFactory factory) diff --git a/src/Umbraco.Infrastructure/Persistence/DbProviderFactoryCreator.cs b/src/Umbraco.Infrastructure/Persistence/DbProviderFactoryCreator.cs index 9ad33d7d88..0bae3494ed 100644 --- a/src/Umbraco.Infrastructure/Persistence/DbProviderFactoryCreator.cs +++ b/src/Umbraco.Infrastructure/Persistence/DbProviderFactoryCreator.cs @@ -2,9 +2,9 @@ using System.Collections.Generic; using System.Data.Common; using System.Linq; -using Umbraco.Core.Persistence.SqlSyntax; +using Umbraco.Cms.Infrastructure.Persistence.SqlSyntax; -namespace Umbraco.Core.Persistence +namespace Umbraco.Cms.Infrastructure.Persistence { public class DbProviderFactoryCreator : IDbProviderFactoryCreator { diff --git a/src/Umbraco.Infrastructure/Persistence/Dtos/AccessDto.cs b/src/Umbraco.Infrastructure/Persistence/Dtos/AccessDto.cs index 98ca37fbf8..cc826bc3c2 100644 --- a/src/Umbraco.Infrastructure/Persistence/Dtos/AccessDto.cs +++ b/src/Umbraco.Infrastructure/Persistence/Dtos/AccessDto.cs @@ -1,12 +1,12 @@ using System; using System.Collections.Generic; using NPoco; -using Umbraco.Core.Persistence.DatabaseAnnotations; -using Umbraco.Core.Persistence.DatabaseModelDefinitions; +using Umbraco.Cms.Infrastructure.Persistence.DatabaseAnnotations; +using Umbraco.Cms.Infrastructure.Persistence.DatabaseModelDefinitions; -namespace Umbraco.Core.Persistence.Dtos +namespace Umbraco.Cms.Infrastructure.Persistence.Dtos { - [TableName(Constants.DatabaseSchema.Tables.Access)] + [TableName(Cms.Core.Constants.DatabaseSchema.Tables.Access)] [PrimaryKey("id", AutoIncrement = false)] [ExplicitColumns] internal class AccessDto diff --git a/src/Umbraco.Infrastructure/Persistence/Dtos/AccessRuleDto.cs b/src/Umbraco.Infrastructure/Persistence/Dtos/AccessRuleDto.cs index 6ec6104581..00312e2cec 100644 --- a/src/Umbraco.Infrastructure/Persistence/Dtos/AccessRuleDto.cs +++ b/src/Umbraco.Infrastructure/Persistence/Dtos/AccessRuleDto.cs @@ -1,11 +1,11 @@ using System; using NPoco; -using Umbraco.Core.Persistence.DatabaseAnnotations; -using Umbraco.Core.Persistence.DatabaseModelDefinitions; +using Umbraco.Cms.Infrastructure.Persistence.DatabaseAnnotations; +using Umbraco.Cms.Infrastructure.Persistence.DatabaseModelDefinitions; -namespace Umbraco.Core.Persistence.Dtos +namespace Umbraco.Cms.Infrastructure.Persistence.Dtos { - [TableName(Constants.DatabaseSchema.Tables.AccessRule)] + [TableName(Cms.Core.Constants.DatabaseSchema.Tables.AccessRule)] [PrimaryKey("id", AutoIncrement = false)] [ExplicitColumns] internal class AccessRuleDto diff --git a/src/Umbraco.Infrastructure/Persistence/Dtos/AuditEntryDto.cs b/src/Umbraco.Infrastructure/Persistence/Dtos/AuditEntryDto.cs index 27eeef8e56..822f21a593 100644 --- a/src/Umbraco.Infrastructure/Persistence/Dtos/AuditEntryDto.cs +++ b/src/Umbraco.Infrastructure/Persistence/Dtos/AuditEntryDto.cs @@ -1,11 +1,11 @@ using System; using NPoco; -using Umbraco.Core.Persistence.DatabaseAnnotations; -using Umbraco.Core.Persistence.DatabaseModelDefinitions; +using Umbraco.Cms.Infrastructure.Persistence.DatabaseAnnotations; +using Umbraco.Cms.Infrastructure.Persistence.DatabaseModelDefinitions; -namespace Umbraco.Core.Persistence.Dtos +namespace Umbraco.Cms.Infrastructure.Persistence.Dtos { - [TableName(Constants.DatabaseSchema.Tables.AuditEntry)] + [TableName(Cms.Core.Constants.DatabaseSchema.Tables.AuditEntry)] [PrimaryKey("id")] [ExplicitColumns] internal class AuditEntryDto diff --git a/src/Umbraco.Infrastructure/Persistence/Dtos/CacheInstructionDto.cs b/src/Umbraco.Infrastructure/Persistence/Dtos/CacheInstructionDto.cs index 7c1af7b522..5dfa432f20 100644 --- a/src/Umbraco.Infrastructure/Persistence/Dtos/CacheInstructionDto.cs +++ b/src/Umbraco.Infrastructure/Persistence/Dtos/CacheInstructionDto.cs @@ -1,10 +1,10 @@ using System; using NPoco; -using Umbraco.Core.Persistence.DatabaseAnnotations; +using Umbraco.Cms.Infrastructure.Persistence.DatabaseAnnotations; -namespace Umbraco.Core.Persistence.Dtos +namespace Umbraco.Cms.Infrastructure.Persistence.Dtos { - [TableName(Constants.DatabaseSchema.Tables.CacheInstruction)] + [TableName(Cms.Core.Constants.DatabaseSchema.Tables.CacheInstruction)] [PrimaryKey("id")] [ExplicitColumns] public class CacheInstructionDto diff --git a/src/Umbraco.Infrastructure/Persistence/Dtos/ConsentDto.cs b/src/Umbraco.Infrastructure/Persistence/Dtos/ConsentDto.cs index b66cd2d020..059a27631d 100644 --- a/src/Umbraco.Infrastructure/Persistence/Dtos/ConsentDto.cs +++ b/src/Umbraco.Infrastructure/Persistence/Dtos/ConsentDto.cs @@ -1,11 +1,11 @@ using System; using NPoco; -using Umbraco.Core.Persistence.DatabaseAnnotations; -using Umbraco.Core.Persistence.DatabaseModelDefinitions; +using Umbraco.Cms.Infrastructure.Persistence.DatabaseAnnotations; +using Umbraco.Cms.Infrastructure.Persistence.DatabaseModelDefinitions; -namespace Umbraco.Core.Persistence.Dtos +namespace Umbraco.Cms.Infrastructure.Persistence.Dtos { - [TableName(Constants.DatabaseSchema.Tables.Consent)] + [TableName(Cms.Core.Constants.DatabaseSchema.Tables.Consent)] [PrimaryKey("id")] [ExplicitColumns] public class ConsentDto diff --git a/src/Umbraco.Infrastructure/Persistence/Dtos/ContentDto.cs b/src/Umbraco.Infrastructure/Persistence/Dtos/ContentDto.cs index 56d87ad296..c5a2b8b9c4 100644 --- a/src/Umbraco.Infrastructure/Persistence/Dtos/ContentDto.cs +++ b/src/Umbraco.Infrastructure/Persistence/Dtos/ContentDto.cs @@ -1,14 +1,14 @@ using NPoco; -using Umbraco.Core.Persistence.DatabaseAnnotations; +using Umbraco.Cms.Infrastructure.Persistence.DatabaseAnnotations; -namespace Umbraco.Core.Persistence.Dtos +namespace Umbraco.Cms.Infrastructure.Persistence.Dtos { [TableName(TableName)] [PrimaryKey("nodeId", AutoIncrement = false)] [ExplicitColumns] public class ContentDto { - public const string TableName = Constants.DatabaseSchema.Tables.Content; + public const string TableName = Cms.Core.Constants.DatabaseSchema.Tables.Content; [Column("nodeId")] [PrimaryKeyColumn(AutoIncrement = false)] diff --git a/src/Umbraco.Infrastructure/Persistence/Dtos/ContentNuDto.cs b/src/Umbraco.Infrastructure/Persistence/Dtos/ContentNuDto.cs index 2aa450b7b9..27f277293c 100644 --- a/src/Umbraco.Infrastructure/Persistence/Dtos/ContentNuDto.cs +++ b/src/Umbraco.Infrastructure/Persistence/Dtos/ContentNuDto.cs @@ -1,10 +1,10 @@ using System.Data; using NPoco; -using Umbraco.Core.Persistence.DatabaseAnnotations; +using Umbraco.Cms.Infrastructure.Persistence.DatabaseAnnotations; -namespace Umbraco.Core.Persistence.Dtos +namespace Umbraco.Cms.Infrastructure.Persistence.Dtos { - [TableName(Constants.DatabaseSchema.Tables.NodeData)] + [TableName(Cms.Core.Constants.DatabaseSchema.Tables.NodeData)] [PrimaryKey("nodeId", AutoIncrement = false)] [ExplicitColumns] public class ContentNuDto diff --git a/src/Umbraco.Infrastructure/Persistence/Dtos/ContentScheduleDto.cs b/src/Umbraco.Infrastructure/Persistence/Dtos/ContentScheduleDto.cs index 492a3d7cbd..4706f0417d 100644 --- a/src/Umbraco.Infrastructure/Persistence/Dtos/ContentScheduleDto.cs +++ b/src/Umbraco.Infrastructure/Persistence/Dtos/ContentScheduleDto.cs @@ -1,15 +1,15 @@ using System; using NPoco; -using Umbraco.Core.Persistence.DatabaseAnnotations; +using Umbraco.Cms.Infrastructure.Persistence.DatabaseAnnotations; -namespace Umbraco.Core.Persistence.Dtos +namespace Umbraco.Cms.Infrastructure.Persistence.Dtos { [TableName(TableName)] [PrimaryKey("id", AutoIncrement = false)] [ExplicitColumns] internal class ContentScheduleDto { - public const string TableName = Constants.DatabaseSchema.Tables.ContentSchedule; + public const string TableName = Cms.Core.Constants.DatabaseSchema.Tables.ContentSchedule; [Column("id")] [PrimaryKeyColumn(AutoIncrement = false)] diff --git a/src/Umbraco.Infrastructure/Persistence/Dtos/ContentType2ContentTypeDto.cs b/src/Umbraco.Infrastructure/Persistence/Dtos/ContentType2ContentTypeDto.cs index 1ce9040f68..2bda31c1fc 100644 --- a/src/Umbraco.Infrastructure/Persistence/Dtos/ContentType2ContentTypeDto.cs +++ b/src/Umbraco.Infrastructure/Persistence/Dtos/ContentType2ContentTypeDto.cs @@ -1,9 +1,9 @@ using NPoco; -using Umbraco.Core.Persistence.DatabaseAnnotations; +using Umbraco.Cms.Infrastructure.Persistence.DatabaseAnnotations; -namespace Umbraco.Core.Persistence.Dtos +namespace Umbraco.Cms.Infrastructure.Persistence.Dtos { - [TableName(Constants.DatabaseSchema.Tables.ElementTypeTree)] + [TableName(Cms.Core.Constants.DatabaseSchema.Tables.ElementTypeTree)] [ExplicitColumns] internal class ContentType2ContentTypeDto { diff --git a/src/Umbraco.Infrastructure/Persistence/Dtos/ContentTypeAllowedContentTypeDto.cs b/src/Umbraco.Infrastructure/Persistence/Dtos/ContentTypeAllowedContentTypeDto.cs index b17b98bf6c..6f503b360c 100644 --- a/src/Umbraco.Infrastructure/Persistence/Dtos/ContentTypeAllowedContentTypeDto.cs +++ b/src/Umbraco.Infrastructure/Persistence/Dtos/ContentTypeAllowedContentTypeDto.cs @@ -1,9 +1,9 @@ using NPoco; -using Umbraco.Core.Persistence.DatabaseAnnotations; +using Umbraco.Cms.Infrastructure.Persistence.DatabaseAnnotations; -namespace Umbraco.Core.Persistence.Dtos +namespace Umbraco.Cms.Infrastructure.Persistence.Dtos { - [TableName(Constants.DatabaseSchema.Tables.ContentChildType)] + [TableName(Cms.Core.Constants.DatabaseSchema.Tables.ContentChildType)] [PrimaryKey("Id", AutoIncrement = false)] [ExplicitColumns] internal class ContentTypeAllowedContentTypeDto diff --git a/src/Umbraco.Infrastructure/Persistence/Dtos/ContentTypeDto.cs b/src/Umbraco.Infrastructure/Persistence/Dtos/ContentTypeDto.cs index e7a14a26e2..a19b6a7231 100644 --- a/src/Umbraco.Infrastructure/Persistence/Dtos/ContentTypeDto.cs +++ b/src/Umbraco.Infrastructure/Persistence/Dtos/ContentTypeDto.cs @@ -1,14 +1,14 @@ using NPoco; -using Umbraco.Core.Persistence.DatabaseAnnotations; +using Umbraco.Cms.Infrastructure.Persistence.DatabaseAnnotations; -namespace Umbraco.Core.Persistence.Dtos +namespace Umbraco.Cms.Infrastructure.Persistence.Dtos { [TableName(TableName)] [PrimaryKey("pk")] [ExplicitColumns] internal class ContentTypeDto { - public const string TableName = Constants.DatabaseSchema.Tables.ContentType; + public const string TableName = Cms.Core.Constants.DatabaseSchema.Tables.ContentType; [Column("pk")] [PrimaryKeyColumn(IdentitySeed = 535)] diff --git a/src/Umbraco.Infrastructure/Persistence/Dtos/ContentTypeTemplateDto.cs b/src/Umbraco.Infrastructure/Persistence/Dtos/ContentTypeTemplateDto.cs index 8b2a267a99..d6fe17f2c6 100644 --- a/src/Umbraco.Infrastructure/Persistence/Dtos/ContentTypeTemplateDto.cs +++ b/src/Umbraco.Infrastructure/Persistence/Dtos/ContentTypeTemplateDto.cs @@ -1,9 +1,9 @@ using NPoco; -using Umbraco.Core.Persistence.DatabaseAnnotations; +using Umbraco.Cms.Infrastructure.Persistence.DatabaseAnnotations; -namespace Umbraco.Core.Persistence.Dtos +namespace Umbraco.Cms.Infrastructure.Persistence.Dtos { - [TableName(Constants.DatabaseSchema.Tables.DocumentType)] + [TableName(Cms.Core.Constants.DatabaseSchema.Tables.DocumentType)] [PrimaryKey("contentTypeNodeId", AutoIncrement = false)] [ExplicitColumns] internal class ContentTypeTemplateDto diff --git a/src/Umbraco.Infrastructure/Persistence/Dtos/ContentVersionCultureVariationDto.cs b/src/Umbraco.Infrastructure/Persistence/Dtos/ContentVersionCultureVariationDto.cs index 65d677d240..4d0c8b2e6e 100644 --- a/src/Umbraco.Infrastructure/Persistence/Dtos/ContentVersionCultureVariationDto.cs +++ b/src/Umbraco.Infrastructure/Persistence/Dtos/ContentVersionCultureVariationDto.cs @@ -1,15 +1,15 @@ using System; using NPoco; -using Umbraco.Core.Persistence.DatabaseAnnotations; +using Umbraco.Cms.Infrastructure.Persistence.DatabaseAnnotations; -namespace Umbraco.Core.Persistence.Dtos +namespace Umbraco.Cms.Infrastructure.Persistence.Dtos { [TableName(TableName)] [PrimaryKey("id")] [ExplicitColumns] internal class ContentVersionCultureVariationDto { - public const string TableName = Constants.DatabaseSchema.Tables.ContentVersionCultureVariation; + public const string TableName = Cms.Core.Constants.DatabaseSchema.Tables.ContentVersionCultureVariation; private int? _updateUserId; [Column("id")] diff --git a/src/Umbraco.Infrastructure/Persistence/Dtos/ContentVersionDto.cs b/src/Umbraco.Infrastructure/Persistence/Dtos/ContentVersionDto.cs index f5292357e8..72e4edf85d 100644 --- a/src/Umbraco.Infrastructure/Persistence/Dtos/ContentVersionDto.cs +++ b/src/Umbraco.Infrastructure/Persistence/Dtos/ContentVersionDto.cs @@ -1,16 +1,16 @@ using System; using NPoco; -using Umbraco.Core.Persistence.DatabaseAnnotations; -using Umbraco.Core.Persistence.DatabaseModelDefinitions; +using Umbraco.Cms.Infrastructure.Persistence.DatabaseAnnotations; +using Umbraco.Cms.Infrastructure.Persistence.DatabaseModelDefinitions; -namespace Umbraco.Core.Persistence.Dtos +namespace Umbraco.Cms.Infrastructure.Persistence.Dtos { [TableName(TableName)] [PrimaryKey("id")] [ExplicitColumns] public class ContentVersionDto { - public const string TableName = Constants.DatabaseSchema.Tables.ContentVersion; + public const string TableName = Cms.Core.Constants.DatabaseSchema.Tables.ContentVersion; private int? _userId; [Column("id")] diff --git a/src/Umbraco.Infrastructure/Persistence/Dtos/DataTypeDto.cs b/src/Umbraco.Infrastructure/Persistence/Dtos/DataTypeDto.cs index 24f0e07295..70c87c175c 100644 --- a/src/Umbraco.Infrastructure/Persistence/Dtos/DataTypeDto.cs +++ b/src/Umbraco.Infrastructure/Persistence/Dtos/DataTypeDto.cs @@ -1,9 +1,9 @@ using NPoco; -using Umbraco.Core.Persistence.DatabaseAnnotations; +using Umbraco.Cms.Infrastructure.Persistence.DatabaseAnnotations; -namespace Umbraco.Core.Persistence.Dtos +namespace Umbraco.Cms.Infrastructure.Persistence.Dtos { - [TableName(Constants.DatabaseSchema.Tables.DataType)] + [TableName(Cms.Core.Constants.DatabaseSchema.Tables.DataType)] [PrimaryKey("nodeId", AutoIncrement = false)] [ExplicitColumns] internal class DataTypeDto diff --git a/src/Umbraco.Infrastructure/Persistence/Dtos/DictionaryDto.cs b/src/Umbraco.Infrastructure/Persistence/Dtos/DictionaryDto.cs index d357e9adbc..50691720c1 100644 --- a/src/Umbraco.Infrastructure/Persistence/Dtos/DictionaryDto.cs +++ b/src/Umbraco.Infrastructure/Persistence/Dtos/DictionaryDto.cs @@ -1,16 +1,16 @@ using System; using System.Collections.Generic; using NPoco; -using Umbraco.Core.Persistence.DatabaseAnnotations; +using Umbraco.Cms.Infrastructure.Persistence.DatabaseAnnotations; -namespace Umbraco.Core.Persistence.Dtos +namespace Umbraco.Cms.Infrastructure.Persistence.Dtos { [TableName(TableName)] [PrimaryKey("pk")] [ExplicitColumns] internal class DictionaryDto { - public const string TableName = Constants.DatabaseSchema.Tables.DictionaryEntry; + public const string TableName = Cms.Core.Constants.DatabaseSchema.Tables.DictionaryEntry; [Column("pk")] [PrimaryKeyColumn] public int PrimaryKey { get; set; } @@ -22,7 +22,7 @@ namespace Umbraco.Core.Persistence.Dtos [Column("parent")] [NullSetting(NullSetting = NullSettings.Null)] [ForeignKey(typeof(DictionaryDto), Column = "id")] - [Index(IndexTypes.NonClustered, Name = "IX_" + TableName + "_Parent")] + [Index(IndexTypes.NonClustered, Name = "IX_" + TableName + "_Parent")] public Guid? Parent { get; set; } [Column("key")] diff --git a/src/Umbraco.Infrastructure/Persistence/Dtos/DocumentCultureVariationDto.cs b/src/Umbraco.Infrastructure/Persistence/Dtos/DocumentCultureVariationDto.cs index ed61ea5622..3a494718b1 100644 --- a/src/Umbraco.Infrastructure/Persistence/Dtos/DocumentCultureVariationDto.cs +++ b/src/Umbraco.Infrastructure/Persistence/Dtos/DocumentCultureVariationDto.cs @@ -1,14 +1,14 @@ using NPoco; -using Umbraco.Core.Persistence.DatabaseAnnotations; +using Umbraco.Cms.Infrastructure.Persistence.DatabaseAnnotations; -namespace Umbraco.Core.Persistence.Dtos +namespace Umbraco.Cms.Infrastructure.Persistence.Dtos { [TableName(TableName)] [PrimaryKey("id")] [ExplicitColumns] internal class DocumentCultureVariationDto { - public const string TableName = Constants.DatabaseSchema.Tables.DocumentCultureVariation; + public const string TableName = Cms.Core.Constants.DatabaseSchema.Tables.DocumentCultureVariation; [Column("id")] [PrimaryKeyColumn] diff --git a/src/Umbraco.Infrastructure/Persistence/Dtos/DocumentDto.cs b/src/Umbraco.Infrastructure/Persistence/Dtos/DocumentDto.cs index 7893d2583a..7f63157c43 100644 --- a/src/Umbraco.Infrastructure/Persistence/Dtos/DocumentDto.cs +++ b/src/Umbraco.Infrastructure/Persistence/Dtos/DocumentDto.cs @@ -1,7 +1,7 @@ using NPoco; -using Umbraco.Core.Persistence.DatabaseAnnotations; +using Umbraco.Cms.Infrastructure.Persistence.DatabaseAnnotations; -namespace Umbraco.Core.Persistence.Dtos +namespace Umbraco.Cms.Infrastructure.Persistence.Dtos { [TableName(TableName)] @@ -9,7 +9,7 @@ namespace Umbraco.Core.Persistence.Dtos [ExplicitColumns] public class DocumentDto { - private const string TableName = Constants.DatabaseSchema.Tables.Document; + private const string TableName = Cms.Core.Constants.DatabaseSchema.Tables.Document; [Column("nodeId")] [PrimaryKeyColumn(AutoIncrement = false)] diff --git a/src/Umbraco.Infrastructure/Persistence/Dtos/DocumentPublishedReadOnlyDto.cs b/src/Umbraco.Infrastructure/Persistence/Dtos/DocumentPublishedReadOnlyDto.cs index 27bb0989cc..a6fcd6b319 100644 --- a/src/Umbraco.Infrastructure/Persistence/Dtos/DocumentPublishedReadOnlyDto.cs +++ b/src/Umbraco.Infrastructure/Persistence/Dtos/DocumentPublishedReadOnlyDto.cs @@ -1,9 +1,9 @@ using System; using NPoco; -namespace Umbraco.Core.Persistence.Dtos +namespace Umbraco.Cms.Infrastructure.Persistence.Dtos { - [TableName(Constants.DatabaseSchema.Tables.Document)] + [TableName(Cms.Core.Constants.DatabaseSchema.Tables.Document)] [PrimaryKey("versionId", AutoIncrement = false)] [ExplicitColumns] internal class DocumentPublishedReadOnlyDto diff --git a/src/Umbraco.Infrastructure/Persistence/Dtos/DocumentVersionDto.cs b/src/Umbraco.Infrastructure/Persistence/Dtos/DocumentVersionDto.cs index 23e784e5fb..decf793b9a 100644 --- a/src/Umbraco.Infrastructure/Persistence/Dtos/DocumentVersionDto.cs +++ b/src/Umbraco.Infrastructure/Persistence/Dtos/DocumentVersionDto.cs @@ -1,14 +1,14 @@ using NPoco; -using Umbraco.Core.Persistence.DatabaseAnnotations; +using Umbraco.Cms.Infrastructure.Persistence.DatabaseAnnotations; -namespace Umbraco.Core.Persistence.Dtos +namespace Umbraco.Cms.Infrastructure.Persistence.Dtos { [TableName(TableName)] [PrimaryKey("id", AutoIncrement = false)] [ExplicitColumns] public class DocumentVersionDto { - private const string TableName = Constants.DatabaseSchema.Tables.DocumentVersion; + private const string TableName = Cms.Core.Constants.DatabaseSchema.Tables.DocumentVersion; [Column("id")] [PrimaryKeyColumn(AutoIncrement = false)] diff --git a/src/Umbraco.Infrastructure/Persistence/Dtos/DomainDto.cs b/src/Umbraco.Infrastructure/Persistence/Dtos/DomainDto.cs index 7ed20defb6..ac85ef8044 100644 --- a/src/Umbraco.Infrastructure/Persistence/Dtos/DomainDto.cs +++ b/src/Umbraco.Infrastructure/Persistence/Dtos/DomainDto.cs @@ -1,9 +1,9 @@ using NPoco; -using Umbraco.Core.Persistence.DatabaseAnnotations; +using Umbraco.Cms.Infrastructure.Persistence.DatabaseAnnotations; -namespace Umbraco.Core.Persistence.Dtos +namespace Umbraco.Cms.Infrastructure.Persistence.Dtos { - [TableName(Constants.DatabaseSchema.Tables.Domain)] + [TableName(Cms.Core.Constants.DatabaseSchema.Tables.Domain)] [PrimaryKey("id")] [ExplicitColumns] internal class DomainDto diff --git a/src/Umbraco.Infrastructure/Persistence/Dtos/ExternalLoginDto.cs b/src/Umbraco.Infrastructure/Persistence/Dtos/ExternalLoginDto.cs index 0a56552000..d7aa4ac173 100644 --- a/src/Umbraco.Infrastructure/Persistence/Dtos/ExternalLoginDto.cs +++ b/src/Umbraco.Infrastructure/Persistence/Dtos/ExternalLoginDto.cs @@ -1,11 +1,11 @@ using System; using NPoco; -using Umbraco.Core.Persistence.DatabaseAnnotations; -using Umbraco.Core.Persistence.DatabaseModelDefinitions; +using Umbraco.Cms.Infrastructure.Persistence.DatabaseAnnotations; +using Umbraco.Cms.Infrastructure.Persistence.DatabaseModelDefinitions; -namespace Umbraco.Core.Persistence.Dtos +namespace Umbraco.Cms.Infrastructure.Persistence.Dtos { - [TableName(Constants.DatabaseSchema.Tables.ExternalLogin)] + [TableName(Cms.Core.Constants.DatabaseSchema.Tables.ExternalLogin)] [ExplicitColumns] [PrimaryKey("Id")] internal class ExternalLoginDto diff --git a/src/Umbraco.Infrastructure/Persistence/Dtos/KeyValueDto.cs b/src/Umbraco.Infrastructure/Persistence/Dtos/KeyValueDto.cs index 5ead6d0d26..415721811d 100644 --- a/src/Umbraco.Infrastructure/Persistence/Dtos/KeyValueDto.cs +++ b/src/Umbraco.Infrastructure/Persistence/Dtos/KeyValueDto.cs @@ -1,11 +1,11 @@ using System; using NPoco; -using Umbraco.Core.Persistence.DatabaseAnnotations; -using Umbraco.Core.Persistence.DatabaseModelDefinitions; +using Umbraco.Cms.Infrastructure.Persistence.DatabaseAnnotations; +using Umbraco.Cms.Infrastructure.Persistence.DatabaseModelDefinitions; -namespace Umbraco.Core.Persistence.Dtos +namespace Umbraco.Cms.Infrastructure.Persistence.Dtos { - [TableName(Constants.DatabaseSchema.Tables.KeyValue)] + [TableName(Cms.Core.Constants.DatabaseSchema.Tables.KeyValue)] [PrimaryKey("key", AutoIncrement = false)] [ExplicitColumns] internal class KeyValueDto diff --git a/src/Umbraco.Infrastructure/Persistence/Dtos/LanguageDto.cs b/src/Umbraco.Infrastructure/Persistence/Dtos/LanguageDto.cs index 488390f985..1cbbda465a 100644 --- a/src/Umbraco.Infrastructure/Persistence/Dtos/LanguageDto.cs +++ b/src/Umbraco.Infrastructure/Persistence/Dtos/LanguageDto.cs @@ -1,14 +1,14 @@ using NPoco; -using Umbraco.Core.Persistence.DatabaseAnnotations; +using Umbraco.Cms.Infrastructure.Persistence.DatabaseAnnotations; -namespace Umbraco.Core.Persistence.Dtos +namespace Umbraco.Cms.Infrastructure.Persistence.Dtos { [TableName(TableName)] [PrimaryKey("id")] [ExplicitColumns] internal class LanguageDto { - public const string TableName = Constants.DatabaseSchema.Tables.Language; + public const string TableName = Cms.Core.Constants.DatabaseSchema.Tables.Language; /// /// Gets or sets the identifier of the language. diff --git a/src/Umbraco.Infrastructure/Persistence/Dtos/LanguageTextDto.cs b/src/Umbraco.Infrastructure/Persistence/Dtos/LanguageTextDto.cs index ff5592a929..4bf349da8e 100644 --- a/src/Umbraco.Infrastructure/Persistence/Dtos/LanguageTextDto.cs +++ b/src/Umbraco.Infrastructure/Persistence/Dtos/LanguageTextDto.cs @@ -1,10 +1,10 @@ using System; using NPoco; -using Umbraco.Core.Persistence.DatabaseAnnotations; +using Umbraco.Cms.Infrastructure.Persistence.DatabaseAnnotations; -namespace Umbraco.Core.Persistence.Dtos +namespace Umbraco.Cms.Infrastructure.Persistence.Dtos { - [TableName(Constants.DatabaseSchema.Tables.DictionaryValue)] + [TableName(Cms.Core.Constants.DatabaseSchema.Tables.DictionaryValue)] [PrimaryKey("pk")] [ExplicitColumns] internal class LanguageTextDto diff --git a/src/Umbraco.Infrastructure/Persistence/Dtos/LockDto.cs b/src/Umbraco.Infrastructure/Persistence/Dtos/LockDto.cs index b5878141f3..89bb5d12af 100644 --- a/src/Umbraco.Infrastructure/Persistence/Dtos/LockDto.cs +++ b/src/Umbraco.Infrastructure/Persistence/Dtos/LockDto.cs @@ -1,9 +1,9 @@ using NPoco; -using Umbraco.Core.Persistence.DatabaseAnnotations; +using Umbraco.Cms.Infrastructure.Persistence.DatabaseAnnotations; -namespace Umbraco.Core.Persistence.Dtos +namespace Umbraco.Cms.Infrastructure.Persistence.Dtos { - [TableName(Constants.DatabaseSchema.Tables.Lock)] + [TableName(Cms.Core.Constants.DatabaseSchema.Tables.Lock)] [PrimaryKey("id", AutoIncrement = false)] [ExplicitColumns] internal class LockDto diff --git a/src/Umbraco.Infrastructure/Persistence/Dtos/LogDto.cs b/src/Umbraco.Infrastructure/Persistence/Dtos/LogDto.cs index bfd96426e2..2174fb6303 100644 --- a/src/Umbraco.Infrastructure/Persistence/Dtos/LogDto.cs +++ b/src/Umbraco.Infrastructure/Persistence/Dtos/LogDto.cs @@ -1,16 +1,16 @@ using System; using NPoco; -using Umbraco.Core.Persistence.DatabaseAnnotations; -using Umbraco.Core.Persistence.DatabaseModelDefinitions; +using Umbraco.Cms.Infrastructure.Persistence.DatabaseAnnotations; +using Umbraco.Cms.Infrastructure.Persistence.DatabaseModelDefinitions; -namespace Umbraco.Core.Persistence.Dtos +namespace Umbraco.Cms.Infrastructure.Persistence.Dtos { [TableName(TableName)] [PrimaryKey("id")] [ExplicitColumns] internal class LogDto { - public const string TableName = Constants.DatabaseSchema.Tables.Log; + public const string TableName = Cms.Core.Constants.DatabaseSchema.Tables.Log; private int? _userId; diff --git a/src/Umbraco.Infrastructure/Persistence/Dtos/MacroDto.cs b/src/Umbraco.Infrastructure/Persistence/Dtos/MacroDto.cs index 8558ce4a35..6e05fb393a 100644 --- a/src/Umbraco.Infrastructure/Persistence/Dtos/MacroDto.cs +++ b/src/Umbraco.Infrastructure/Persistence/Dtos/MacroDto.cs @@ -1,11 +1,11 @@ using System; using System.Collections.Generic; using NPoco; -using Umbraco.Core.Persistence.DatabaseAnnotations; +using Umbraco.Cms.Infrastructure.Persistence.DatabaseAnnotations; -namespace Umbraco.Core.Persistence.Dtos +namespace Umbraco.Cms.Infrastructure.Persistence.Dtos { - [TableName(Constants.DatabaseSchema.Tables.Macro)] + [TableName(Cms.Core.Constants.DatabaseSchema.Tables.Macro)] [PrimaryKey("id")] [ExplicitColumns] internal class MacroDto diff --git a/src/Umbraco.Infrastructure/Persistence/Dtos/MacroPropertyDto.cs b/src/Umbraco.Infrastructure/Persistence/Dtos/MacroPropertyDto.cs index ae8528aec4..afc8136383 100644 --- a/src/Umbraco.Infrastructure/Persistence/Dtos/MacroPropertyDto.cs +++ b/src/Umbraco.Infrastructure/Persistence/Dtos/MacroPropertyDto.cs @@ -1,10 +1,10 @@ using System; using NPoco; -using Umbraco.Core.Persistence.DatabaseAnnotations; +using Umbraco.Cms.Infrastructure.Persistence.DatabaseAnnotations; -namespace Umbraco.Core.Persistence.Dtos +namespace Umbraco.Cms.Infrastructure.Persistence.Dtos { - [TableName(Constants.DatabaseSchema.Tables.MacroProperty)] + [TableName(Cms.Core.Constants.DatabaseSchema.Tables.MacroProperty)] [PrimaryKey("id")] [ExplicitColumns] internal class MacroPropertyDto diff --git a/src/Umbraco.Infrastructure/Persistence/Dtos/MediaDto.cs b/src/Umbraco.Infrastructure/Persistence/Dtos/MediaDto.cs index 6990a891c4..661b9589f8 100644 --- a/src/Umbraco.Infrastructure/Persistence/Dtos/MediaDto.cs +++ b/src/Umbraco.Infrastructure/Persistence/Dtos/MediaDto.cs @@ -1,6 +1,6 @@ using NPoco; -namespace Umbraco.Core.Persistence.Dtos +namespace Umbraco.Cms.Infrastructure.Persistence.Dtos { // this is a special Dto that does not have a corresponding table // and is only used in our code to represent a media item, similar diff --git a/src/Umbraco.Infrastructure/Persistence/Dtos/MediaVersionDto.cs b/src/Umbraco.Infrastructure/Persistence/Dtos/MediaVersionDto.cs index f71b3149cf..06ec7e64b6 100644 --- a/src/Umbraco.Infrastructure/Persistence/Dtos/MediaVersionDto.cs +++ b/src/Umbraco.Infrastructure/Persistence/Dtos/MediaVersionDto.cs @@ -1,14 +1,14 @@ using NPoco; -using Umbraco.Core.Persistence.DatabaseAnnotations; +using Umbraco.Cms.Infrastructure.Persistence.DatabaseAnnotations; -namespace Umbraco.Core.Persistence.Dtos +namespace Umbraco.Cms.Infrastructure.Persistence.Dtos { [TableName(TableName)] [PrimaryKey("id", AutoIncrement = false)] [ExplicitColumns] internal class MediaVersionDto { - public const string TableName = Constants.DatabaseSchema.Tables.MediaVersion; + public const string TableName = Cms.Core.Constants.DatabaseSchema.Tables.MediaVersion; [Column("id")] [PrimaryKeyColumn(AutoIncrement = false)] diff --git a/src/Umbraco.Infrastructure/Persistence/Dtos/Member2MemberGroupDto.cs b/src/Umbraco.Infrastructure/Persistence/Dtos/Member2MemberGroupDto.cs index 6524555966..a32257a087 100644 --- a/src/Umbraco.Infrastructure/Persistence/Dtos/Member2MemberGroupDto.cs +++ b/src/Umbraco.Infrastructure/Persistence/Dtos/Member2MemberGroupDto.cs @@ -1,9 +1,9 @@ using NPoco; -using Umbraco.Core.Persistence.DatabaseAnnotations; +using Umbraco.Cms.Infrastructure.Persistence.DatabaseAnnotations; -namespace Umbraco.Core.Persistence.Dtos +namespace Umbraco.Cms.Infrastructure.Persistence.Dtos { - [TableName(Constants.DatabaseSchema.Tables.Member2MemberGroup)] + [TableName(Cms.Core.Constants.DatabaseSchema.Tables.Member2MemberGroup)] [PrimaryKey("Member", AutoIncrement = false)] [ExplicitColumns] internal class Member2MemberGroupDto diff --git a/src/Umbraco.Infrastructure/Persistence/Dtos/MemberDto.cs b/src/Umbraco.Infrastructure/Persistence/Dtos/MemberDto.cs index df4c9e2542..aebf8f7f1e 100644 --- a/src/Umbraco.Infrastructure/Persistence/Dtos/MemberDto.cs +++ b/src/Umbraco.Infrastructure/Persistence/Dtos/MemberDto.cs @@ -1,14 +1,14 @@ using NPoco; -using Umbraco.Core.Persistence.DatabaseAnnotations; +using Umbraco.Cms.Infrastructure.Persistence.DatabaseAnnotations; -namespace Umbraco.Core.Persistence.Dtos +namespace Umbraco.Cms.Infrastructure.Persistence.Dtos { [TableName(TableName)] [PrimaryKey("nodeId", AutoIncrement = false)] [ExplicitColumns] internal class MemberDto { - private const string TableName = Constants.DatabaseSchema.Tables.Member; + private const string TableName = Cms.Core.Constants.DatabaseSchema.Tables.Member; [Column("nodeId")] [PrimaryKeyColumn(AutoIncrement = false)] diff --git a/src/Umbraco.Infrastructure/Persistence/Dtos/MemberPropertyTypeDto.cs b/src/Umbraco.Infrastructure/Persistence/Dtos/MemberPropertyTypeDto.cs index 7186455489..9e9b97daf3 100644 --- a/src/Umbraco.Infrastructure/Persistence/Dtos/MemberPropertyTypeDto.cs +++ b/src/Umbraco.Infrastructure/Persistence/Dtos/MemberPropertyTypeDto.cs @@ -1,9 +1,9 @@ using NPoco; -using Umbraco.Core.Persistence.DatabaseAnnotations; +using Umbraco.Cms.Infrastructure.Persistence.DatabaseAnnotations; -namespace Umbraco.Core.Persistence.Dtos +namespace Umbraco.Cms.Infrastructure.Persistence.Dtos { - [TableName(Constants.DatabaseSchema.Tables.MemberPropertyType)] + [TableName(Cms.Core.Constants.DatabaseSchema.Tables.MemberPropertyType)] [PrimaryKey("pk")] [ExplicitColumns] internal class MemberPropertyTypeDto diff --git a/src/Umbraco.Infrastructure/Persistence/Dtos/NodeDto.cs b/src/Umbraco.Infrastructure/Persistence/Dtos/NodeDto.cs index 8207d8811d..d401a6f5b8 100644 --- a/src/Umbraco.Infrastructure/Persistence/Dtos/NodeDto.cs +++ b/src/Umbraco.Infrastructure/Persistence/Dtos/NodeDto.cs @@ -1,16 +1,16 @@ using System; using NPoco; -using Umbraco.Core.Persistence.DatabaseAnnotations; -using Umbraco.Core.Persistence.DatabaseModelDefinitions; +using Umbraco.Cms.Infrastructure.Persistence.DatabaseAnnotations; +using Umbraco.Cms.Infrastructure.Persistence.DatabaseModelDefinitions; -namespace Umbraco.Core.Persistence.Dtos +namespace Umbraco.Cms.Infrastructure.Persistence.Dtos { [TableName(TableName)] [PrimaryKey("id")] [ExplicitColumns] public class NodeDto { - public const string TableName = Constants.DatabaseSchema.Tables.Node; + public const string TableName = Cms.Core.Constants.DatabaseSchema.Tables.Node; public const int NodeIdSeed = 1060; private int? _userId; diff --git a/src/Umbraco.Infrastructure/Persistence/Dtos/PropertyDataDto.cs b/src/Umbraco.Infrastructure/Persistence/Dtos/PropertyDataDto.cs index a3b28b5b54..6e45e24d14 100644 --- a/src/Umbraco.Infrastructure/Persistence/Dtos/PropertyDataDto.cs +++ b/src/Umbraco.Infrastructure/Persistence/Dtos/PropertyDataDto.cs @@ -1,15 +1,16 @@ using System; using NPoco; -using Umbraco.Core.Persistence.DatabaseAnnotations; +using Umbraco.Cms.Infrastructure.Persistence.DatabaseAnnotations; +using Umbraco.Extensions; -namespace Umbraco.Core.Persistence.Dtos +namespace Umbraco.Cms.Infrastructure.Persistence.Dtos { [TableName(TableName)] [PrimaryKey("id")] [ExplicitColumns] internal class PropertyDataDto { - public const string TableName = Constants.DatabaseSchema.Tables.PropertyData; + public const string TableName = Cms.Core.Constants.DatabaseSchema.Tables.PropertyData; public const int VarcharLength = 512; public const int SegmentLength = 256; diff --git a/src/Umbraco.Infrastructure/Persistence/Dtos/PropertyTypeCommonDto.cs b/src/Umbraco.Infrastructure/Persistence/Dtos/PropertyTypeCommonDto.cs index 040123353e..8e321fa962 100644 --- a/src/Umbraco.Infrastructure/Persistence/Dtos/PropertyTypeCommonDto.cs +++ b/src/Umbraco.Infrastructure/Persistence/Dtos/PropertyTypeCommonDto.cs @@ -1,6 +1,6 @@ using NPoco; -namespace Umbraco.Core.Persistence.Dtos +namespace Umbraco.Cms.Infrastructure.Persistence.Dtos { // this is PropertyTypeDto + the special property type fields for members // it is used for querying everything needed for a property type, at once diff --git a/src/Umbraco.Infrastructure/Persistence/Dtos/PropertyTypeDto.cs b/src/Umbraco.Infrastructure/Persistence/Dtos/PropertyTypeDto.cs index 572201c94a..62ca6a3250 100644 --- a/src/Umbraco.Infrastructure/Persistence/Dtos/PropertyTypeDto.cs +++ b/src/Umbraco.Infrastructure/Persistence/Dtos/PropertyTypeDto.cs @@ -1,11 +1,11 @@ using System; using NPoco; -using Umbraco.Core.Persistence.DatabaseAnnotations; -using Umbraco.Core.Persistence.DatabaseModelDefinitions; +using Umbraco.Cms.Infrastructure.Persistence.DatabaseAnnotations; +using Umbraco.Cms.Infrastructure.Persistence.DatabaseModelDefinitions; -namespace Umbraco.Core.Persistence.Dtos +namespace Umbraco.Cms.Infrastructure.Persistence.Dtos { - [TableName(Constants.DatabaseSchema.Tables.PropertyType)] + [TableName(Cms.Core.Constants.DatabaseSchema.Tables.PropertyType)] [PrimaryKey("id")] [ExplicitColumns] internal class PropertyTypeDto diff --git a/src/Umbraco.Infrastructure/Persistence/Dtos/PropertyTypeGroupDto.cs b/src/Umbraco.Infrastructure/Persistence/Dtos/PropertyTypeGroupDto.cs index c48a6697ef..5f3b2a9572 100644 --- a/src/Umbraco.Infrastructure/Persistence/Dtos/PropertyTypeGroupDto.cs +++ b/src/Umbraco.Infrastructure/Persistence/Dtos/PropertyTypeGroupDto.cs @@ -1,12 +1,12 @@ using System; using System.Collections.Generic; using NPoco; -using Umbraco.Core.Persistence.DatabaseAnnotations; -using Umbraco.Core.Persistence.DatabaseModelDefinitions; +using Umbraco.Cms.Infrastructure.Persistence.DatabaseAnnotations; +using Umbraco.Cms.Infrastructure.Persistence.DatabaseModelDefinitions; -namespace Umbraco.Core.Persistence.Dtos +namespace Umbraco.Cms.Infrastructure.Persistence.Dtos { - [TableName(Constants.DatabaseSchema.Tables.PropertyTypeGroup)] + [TableName(Cms.Core.Constants.DatabaseSchema.Tables.PropertyTypeGroup)] [PrimaryKey("id", AutoIncrement = true)] [ExplicitColumns] internal class PropertyTypeGroupDto diff --git a/src/Umbraco.Infrastructure/Persistence/Dtos/PropertyTypeGroupReadOnlyDto.cs b/src/Umbraco.Infrastructure/Persistence/Dtos/PropertyTypeGroupReadOnlyDto.cs index f812bd48aa..1dc7956f29 100644 --- a/src/Umbraco.Infrastructure/Persistence/Dtos/PropertyTypeGroupReadOnlyDto.cs +++ b/src/Umbraco.Infrastructure/Persistence/Dtos/PropertyTypeGroupReadOnlyDto.cs @@ -1,9 +1,9 @@ using System; using NPoco; -namespace Umbraco.Core.Persistence.Dtos +namespace Umbraco.Cms.Infrastructure.Persistence.Dtos { - [TableName(Constants.DatabaseSchema.Tables.PropertyTypeGroup)] + [TableName(Cms.Core.Constants.DatabaseSchema.Tables.PropertyTypeGroup)] [PrimaryKey("id", AutoIncrement = true)] [ExplicitColumns] internal class PropertyTypeGroupReadOnlyDto diff --git a/src/Umbraco.Infrastructure/Persistence/Dtos/PropertyTypeReadOnlyDto.cs b/src/Umbraco.Infrastructure/Persistence/Dtos/PropertyTypeReadOnlyDto.cs index d2001c00d5..018fddba33 100644 --- a/src/Umbraco.Infrastructure/Persistence/Dtos/PropertyTypeReadOnlyDto.cs +++ b/src/Umbraco.Infrastructure/Persistence/Dtos/PropertyTypeReadOnlyDto.cs @@ -1,9 +1,9 @@ using System; using NPoco; -namespace Umbraco.Core.Persistence.Dtos +namespace Umbraco.Cms.Infrastructure.Persistence.Dtos { - [TableName(Constants.DatabaseSchema.Tables.PropertyType)] + [TableName(Cms.Core.Constants.DatabaseSchema.Tables.PropertyType)] [PrimaryKey("id")] [ExplicitColumns] internal class PropertyTypeReadOnlyDto diff --git a/src/Umbraco.Infrastructure/Persistence/Dtos/RedirectUrlDto.cs b/src/Umbraco.Infrastructure/Persistence/Dtos/RedirectUrlDto.cs index 57e7138827..a9188a569f 100644 --- a/src/Umbraco.Infrastructure/Persistence/Dtos/RedirectUrlDto.cs +++ b/src/Umbraco.Infrastructure/Persistence/Dtos/RedirectUrlDto.cs @@ -1,10 +1,10 @@ using System; using NPoco; -using Umbraco.Core.Persistence.DatabaseAnnotations; +using Umbraco.Cms.Infrastructure.Persistence.DatabaseAnnotations; -namespace Umbraco.Core.Persistence.Dtos +namespace Umbraco.Cms.Infrastructure.Persistence.Dtos { - [TableName(Constants.DatabaseSchema.Tables.RedirectUrl)] + [TableName(Cms.Core.Constants.DatabaseSchema.Tables.RedirectUrl)] [PrimaryKey("id", AutoIncrement = false)] [ExplicitColumns] class RedirectUrlDto diff --git a/src/Umbraco.Infrastructure/Persistence/Dtos/RelationDto.cs b/src/Umbraco.Infrastructure/Persistence/Dtos/RelationDto.cs index b21866eb8b..8929238665 100644 --- a/src/Umbraco.Infrastructure/Persistence/Dtos/RelationDto.cs +++ b/src/Umbraco.Infrastructure/Persistence/Dtos/RelationDto.cs @@ -1,11 +1,11 @@ using System; using NPoco; -using Umbraco.Core.Persistence.DatabaseAnnotations; -using Umbraco.Core.Persistence.DatabaseModelDefinitions; +using Umbraco.Cms.Infrastructure.Persistence.DatabaseAnnotations; +using Umbraco.Cms.Infrastructure.Persistence.DatabaseModelDefinitions; -namespace Umbraco.Core.Persistence.Dtos +namespace Umbraco.Cms.Infrastructure.Persistence.Dtos { - [TableName(Constants.DatabaseSchema.Tables.Relation)] + [TableName(Cms.Core.Constants.DatabaseSchema.Tables.Relation)] [PrimaryKey("id")] [ExplicitColumns] internal class RelationDto diff --git a/src/Umbraco.Infrastructure/Persistence/Dtos/RelationTypeDto.cs b/src/Umbraco.Infrastructure/Persistence/Dtos/RelationTypeDto.cs index d3e107d23f..50d7960ff8 100644 --- a/src/Umbraco.Infrastructure/Persistence/Dtos/RelationTypeDto.cs +++ b/src/Umbraco.Infrastructure/Persistence/Dtos/RelationTypeDto.cs @@ -1,10 +1,10 @@ using System; using NPoco; -using Umbraco.Core.Persistence.DatabaseAnnotations; +using Umbraco.Cms.Infrastructure.Persistence.DatabaseAnnotations; -namespace Umbraco.Core.Persistence.Dtos +namespace Umbraco.Cms.Infrastructure.Persistence.Dtos { - [TableName(Constants.DatabaseSchema.Tables.RelationType)] + [TableName(Cms.Core.Constants.DatabaseSchema.Tables.RelationType)] [PrimaryKey("id")] [ExplicitColumns] internal class RelationTypeDto diff --git a/src/Umbraco.Infrastructure/Persistence/Dtos/ServerRegistrationDto.cs b/src/Umbraco.Infrastructure/Persistence/Dtos/ServerRegistrationDto.cs index ccf9d26414..26e371dbaf 100644 --- a/src/Umbraco.Infrastructure/Persistence/Dtos/ServerRegistrationDto.cs +++ b/src/Umbraco.Infrastructure/Persistence/Dtos/ServerRegistrationDto.cs @@ -1,11 +1,11 @@ using System; using NPoco; -using Umbraco.Core.Persistence.DatabaseAnnotations; -using Umbraco.Core.Persistence.DatabaseModelDefinitions; +using Umbraco.Cms.Infrastructure.Persistence.DatabaseAnnotations; +using Umbraco.Cms.Infrastructure.Persistence.DatabaseModelDefinitions; -namespace Umbraco.Core.Persistence.Dtos +namespace Umbraco.Cms.Infrastructure.Persistence.Dtos { - [TableName(Constants.DatabaseSchema.Tables.Server)] + [TableName(Cms.Core.Constants.DatabaseSchema.Tables.Server)] [PrimaryKey("id")] [ExplicitColumns] internal class ServerRegistrationDto diff --git a/src/Umbraco.Infrastructure/Persistence/Dtos/TagDto.cs b/src/Umbraco.Infrastructure/Persistence/Dtos/TagDto.cs index f6296e4bd0..6f729c39cf 100644 --- a/src/Umbraco.Infrastructure/Persistence/Dtos/TagDto.cs +++ b/src/Umbraco.Infrastructure/Persistence/Dtos/TagDto.cs @@ -1,14 +1,14 @@ using NPoco; -using Umbraco.Core.Persistence.DatabaseAnnotations; +using Umbraco.Cms.Infrastructure.Persistence.DatabaseAnnotations; -namespace Umbraco.Core.Persistence.Dtos +namespace Umbraco.Cms.Infrastructure.Persistence.Dtos { [TableName(TableName)] [PrimaryKey("id")] [ExplicitColumns] internal class TagDto { - public const string TableName = Constants.DatabaseSchema.Tables.Tag; + public const string TableName = Cms.Core.Constants.DatabaseSchema.Tables.Tag; [Column("id")] [PrimaryKeyColumn] diff --git a/src/Umbraco.Infrastructure/Persistence/Dtos/TagRelationshipDto.cs b/src/Umbraco.Infrastructure/Persistence/Dtos/TagRelationshipDto.cs index cbe4cf0cd4..2cc287ac92 100644 --- a/src/Umbraco.Infrastructure/Persistence/Dtos/TagRelationshipDto.cs +++ b/src/Umbraco.Infrastructure/Persistence/Dtos/TagRelationshipDto.cs @@ -1,14 +1,14 @@ using NPoco; -using Umbraco.Core.Persistence.DatabaseAnnotations; +using Umbraco.Cms.Infrastructure.Persistence.DatabaseAnnotations; -namespace Umbraco.Core.Persistence.Dtos +namespace Umbraco.Cms.Infrastructure.Persistence.Dtos { [TableName(TableName)] [PrimaryKey("nodeId", AutoIncrement = false)] [ExplicitColumns] internal class TagRelationshipDto { - public const string TableName = Constants.DatabaseSchema.Tables.TagRelationship; + public const string TableName = Cms.Core.Constants.DatabaseSchema.Tables.TagRelationship; [Column("nodeId")] [PrimaryKeyColumn(AutoIncrement = false, Name = "PK_cmsTagRelationship", OnColumns = "nodeId, propertyTypeId, tagId")] diff --git a/src/Umbraco.Infrastructure/Persistence/Dtos/TemplateDto.cs b/src/Umbraco.Infrastructure/Persistence/Dtos/TemplateDto.cs index a73425db8d..474d9692d7 100644 --- a/src/Umbraco.Infrastructure/Persistence/Dtos/TemplateDto.cs +++ b/src/Umbraco.Infrastructure/Persistence/Dtos/TemplateDto.cs @@ -1,9 +1,9 @@ using NPoco; -using Umbraco.Core.Persistence.DatabaseAnnotations; +using Umbraco.Cms.Infrastructure.Persistence.DatabaseAnnotations; -namespace Umbraco.Core.Persistence.Dtos +namespace Umbraco.Cms.Infrastructure.Persistence.Dtos { - [TableName(Constants.DatabaseSchema.Tables.Template)] + [TableName(Cms.Core.Constants.DatabaseSchema.Tables.Template)] [PrimaryKey("pk")] [ExplicitColumns] internal class TemplateDto diff --git a/src/Umbraco.Infrastructure/Persistence/Dtos/User2NodeNotifyDto.cs b/src/Umbraco.Infrastructure/Persistence/Dtos/User2NodeNotifyDto.cs index d7c54351b0..59d8cdd2c8 100644 --- a/src/Umbraco.Infrastructure/Persistence/Dtos/User2NodeNotifyDto.cs +++ b/src/Umbraco.Infrastructure/Persistence/Dtos/User2NodeNotifyDto.cs @@ -1,9 +1,9 @@ using NPoco; -using Umbraco.Core.Persistence.DatabaseAnnotations; +using Umbraco.Cms.Infrastructure.Persistence.DatabaseAnnotations; -namespace Umbraco.Core.Persistence.Dtos +namespace Umbraco.Cms.Infrastructure.Persistence.Dtos { - [TableName(Constants.DatabaseSchema.Tables.User2NodeNotify)] + [TableName(Cms.Core.Constants.DatabaseSchema.Tables.User2NodeNotify)] [PrimaryKey("userId", AutoIncrement = false)] [ExplicitColumns] internal class User2NodeNotifyDto diff --git a/src/Umbraco.Infrastructure/Persistence/Dtos/User2UserGroupDto.cs b/src/Umbraco.Infrastructure/Persistence/Dtos/User2UserGroupDto.cs index dabac9dabf..7a8322f561 100644 --- a/src/Umbraco.Infrastructure/Persistence/Dtos/User2UserGroupDto.cs +++ b/src/Umbraco.Infrastructure/Persistence/Dtos/User2UserGroupDto.cs @@ -1,9 +1,9 @@ using NPoco; -using Umbraco.Core.Persistence.DatabaseAnnotations; +using Umbraco.Cms.Infrastructure.Persistence.DatabaseAnnotations; -namespace Umbraco.Core.Persistence.Dtos +namespace Umbraco.Cms.Infrastructure.Persistence.Dtos { - [TableName(Constants.DatabaseSchema.Tables.User2UserGroup)] + [TableName(Cms.Core.Constants.DatabaseSchema.Tables.User2UserGroup)] [ExplicitColumns] internal class User2UserGroupDto { diff --git a/src/Umbraco.Infrastructure/Persistence/Dtos/UserDto.cs b/src/Umbraco.Infrastructure/Persistence/Dtos/UserDto.cs index 46bec34a49..63090f6c29 100644 --- a/src/Umbraco.Infrastructure/Persistence/Dtos/UserDto.cs +++ b/src/Umbraco.Infrastructure/Persistence/Dtos/UserDto.cs @@ -1,17 +1,17 @@ using System; using System.Collections.Generic; using NPoco; -using Umbraco.Core.Persistence.DatabaseAnnotations; -using Umbraco.Core.Persistence.DatabaseModelDefinitions; +using Umbraco.Cms.Infrastructure.Persistence.DatabaseAnnotations; +using Umbraco.Cms.Infrastructure.Persistence.DatabaseModelDefinitions; -namespace Umbraco.Core.Persistence.Dtos +namespace Umbraco.Cms.Infrastructure.Persistence.Dtos { [TableName(TableName)] [PrimaryKey("id", AutoIncrement = true)] [ExplicitColumns] internal class UserDto { - public const string TableName = Constants.DatabaseSchema.Tables.User; + public const string TableName = Cms.Core.Constants.DatabaseSchema.Tables.User; public UserDto() { diff --git a/src/Umbraco.Infrastructure/Persistence/Dtos/UserGroup2AppDto.cs b/src/Umbraco.Infrastructure/Persistence/Dtos/UserGroup2AppDto.cs index 03ba93fe59..4b2af86a53 100644 --- a/src/Umbraco.Infrastructure/Persistence/Dtos/UserGroup2AppDto.cs +++ b/src/Umbraco.Infrastructure/Persistence/Dtos/UserGroup2AppDto.cs @@ -1,9 +1,9 @@ using NPoco; -using Umbraco.Core.Persistence.DatabaseAnnotations; +using Umbraco.Cms.Infrastructure.Persistence.DatabaseAnnotations; -namespace Umbraco.Core.Persistence.Dtos +namespace Umbraco.Cms.Infrastructure.Persistence.Dtos { - [TableName(Constants.DatabaseSchema.Tables.UserGroup2App)] + [TableName(Cms.Core.Constants.DatabaseSchema.Tables.UserGroup2App)] [ExplicitColumns] public class UserGroup2AppDto { diff --git a/src/Umbraco.Infrastructure/Persistence/Dtos/UserGroup2NodePermissionDto.cs b/src/Umbraco.Infrastructure/Persistence/Dtos/UserGroup2NodePermissionDto.cs index bcb2034054..e9b216fdba 100644 --- a/src/Umbraco.Infrastructure/Persistence/Dtos/UserGroup2NodePermissionDto.cs +++ b/src/Umbraco.Infrastructure/Persistence/Dtos/UserGroup2NodePermissionDto.cs @@ -1,9 +1,9 @@ using NPoco; -using Umbraco.Core.Persistence.DatabaseAnnotations; +using Umbraco.Cms.Infrastructure.Persistence.DatabaseAnnotations; -namespace Umbraco.Core.Persistence.Dtos +namespace Umbraco.Cms.Infrastructure.Persistence.Dtos { - [TableName(Constants.DatabaseSchema.Tables.UserGroup2NodePermission)] + [TableName(Cms.Core.Constants.DatabaseSchema.Tables.UserGroup2NodePermission)] [ExplicitColumns] internal class UserGroup2NodePermissionDto { diff --git a/src/Umbraco.Infrastructure/Persistence/Dtos/UserGroupDto.cs b/src/Umbraco.Infrastructure/Persistence/Dtos/UserGroupDto.cs index 0735912c8f..d30d1beca2 100644 --- a/src/Umbraco.Infrastructure/Persistence/Dtos/UserGroupDto.cs +++ b/src/Umbraco.Infrastructure/Persistence/Dtos/UserGroupDto.cs @@ -1,12 +1,12 @@ using System; using System.Collections.Generic; using NPoco; -using Umbraco.Core.Persistence.DatabaseAnnotations; -using Umbraco.Core.Persistence.DatabaseModelDefinitions; +using Umbraco.Cms.Infrastructure.Persistence.DatabaseAnnotations; +using Umbraco.Cms.Infrastructure.Persistence.DatabaseModelDefinitions; -namespace Umbraco.Core.Persistence.Dtos +namespace Umbraco.Cms.Infrastructure.Persistence.Dtos { - [TableName(Constants.DatabaseSchema.Tables.UserGroup)] + [TableName(Cms.Core.Constants.DatabaseSchema.Tables.UserGroup)] [PrimaryKey("id")] [ExplicitColumns] public class UserGroupDto diff --git a/src/Umbraco.Infrastructure/Persistence/Dtos/UserLoginDto.cs b/src/Umbraco.Infrastructure/Persistence/Dtos/UserLoginDto.cs index 8bf254ea31..c0869b967b 100644 --- a/src/Umbraco.Infrastructure/Persistence/Dtos/UserLoginDto.cs +++ b/src/Umbraco.Infrastructure/Persistence/Dtos/UserLoginDto.cs @@ -1,15 +1,15 @@ using System; using NPoco; -using Umbraco.Core.Persistence.DatabaseAnnotations; +using Umbraco.Cms.Infrastructure.Persistence.DatabaseAnnotations; -namespace Umbraco.Core.Persistence.Dtos +namespace Umbraco.Cms.Infrastructure.Persistence.Dtos { [TableName(TableName)] [PrimaryKey("sessionId", AutoIncrement = false)] [ExplicitColumns] internal class UserLoginDto { - public const string TableName = Constants.DatabaseSchema.Tables.UserLogin; + public const string TableName = Cms.Core.Constants.DatabaseSchema.Tables.UserLogin; [Column("sessionId")] [PrimaryKeyColumn(AutoIncrement = false)] diff --git a/src/Umbraco.Infrastructure/Persistence/Dtos/UserStartNodeDto.cs b/src/Umbraco.Infrastructure/Persistence/Dtos/UserStartNodeDto.cs index d8b2206658..053a520d76 100644 --- a/src/Umbraco.Infrastructure/Persistence/Dtos/UserStartNodeDto.cs +++ b/src/Umbraco.Infrastructure/Persistence/Dtos/UserStartNodeDto.cs @@ -1,10 +1,10 @@ using System; using NPoco; -using Umbraco.Core.Persistence.DatabaseAnnotations; +using Umbraco.Cms.Infrastructure.Persistence.DatabaseAnnotations; -namespace Umbraco.Core.Persistence.Dtos +namespace Umbraco.Cms.Infrastructure.Persistence.Dtos { - [TableName(Constants.DatabaseSchema.Tables.UserStartNode)] + [TableName(Cms.Core.Constants.DatabaseSchema.Tables.UserStartNode)] [PrimaryKey("id", AutoIncrement = true)] [ExplicitColumns] internal class UserStartNodeDto : IEquatable diff --git a/src/Umbraco.Infrastructure/Persistence/Factories/AuditEntryFactory.cs b/src/Umbraco.Infrastructure/Persistence/Factories/AuditEntryFactory.cs index bbf6058055..67c60ffb4d 100644 --- a/src/Umbraco.Infrastructure/Persistence/Factories/AuditEntryFactory.cs +++ b/src/Umbraco.Infrastructure/Persistence/Factories/AuditEntryFactory.cs @@ -1,9 +1,9 @@ using System.Collections.Generic; using System.Linq; -using Umbraco.Core.Models; -using Umbraco.Core.Persistence.Dtos; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Infrastructure.Persistence.Dtos; -namespace Umbraco.Core.Persistence.Factories +namespace Umbraco.Cms.Infrastructure.Persistence.Factories { internal static class AuditEntryFactory { diff --git a/src/Umbraco.Infrastructure/Persistence/Factories/ConsentFactory.cs b/src/Umbraco.Infrastructure/Persistence/Factories/ConsentFactory.cs index 5c3b90fee8..33f348a644 100644 --- a/src/Umbraco.Infrastructure/Persistence/Factories/ConsentFactory.cs +++ b/src/Umbraco.Infrastructure/Persistence/Factories/ConsentFactory.cs @@ -1,8 +1,8 @@ using System.Collections.Generic; -using Umbraco.Core.Models; -using Umbraco.Core.Persistence.Dtos; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Infrastructure.Persistence.Dtos; -namespace Umbraco.Core.Persistence.Factories +namespace Umbraco.Cms.Infrastructure.Persistence.Factories { internal static class ConsentFactory { diff --git a/src/Umbraco.Infrastructure/Persistence/Factories/ContentBaseFactory.cs b/src/Umbraco.Infrastructure/Persistence/Factories/ContentBaseFactory.cs index 13f9d3ee5c..6560ea9611 100644 --- a/src/Umbraco.Infrastructure/Persistence/Factories/ContentBaseFactory.cs +++ b/src/Umbraco.Infrastructure/Persistence/Factories/ContentBaseFactory.cs @@ -1,12 +1,12 @@ using System; using System.Collections.Generic; using System.Linq; -using Umbraco.Core.Models; -using Umbraco.Core.Persistence.Dtos; -using Umbraco.Core.Persistence.Repositories; -using Umbraco.Core.PropertyEditors; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Core.Persistence.Repositories; +using Umbraco.Cms.Core.PropertyEditors; +using Umbraco.Cms.Infrastructure.Persistence.Dtos; -namespace Umbraco.Core.Persistence.Factories +namespace Umbraco.Cms.Infrastructure.Persistence.Factories { internal class ContentBaseFactory { @@ -39,8 +39,8 @@ namespace Umbraco.Core.Persistence.Factories content.SortOrder = nodeDto.SortOrder; content.Trashed = nodeDto.Trashed; - content.CreatorId = nodeDto.UserId ?? Constants.Security.UnknownUserId; - content.WriterId = contentVersionDto.UserId ?? Constants.Security.UnknownUserId; + content.CreatorId = nodeDto.UserId ?? Cms.Core.Constants.Security.UnknownUserId; + content.WriterId = contentVersionDto.UserId ?? Cms.Core.Constants.Security.UnknownUserId; content.CreateDate = nodeDto.CreateDate; content.UpdateDate = contentVersionDto.VersionDate; @@ -72,12 +72,12 @@ namespace Umbraco.Core.Persistence.Factories /// /// Builds an IMedia item from a dto and content type. /// - public static Models.Media BuildEntity(ContentDto dto, IMediaType contentType) + public static Core.Models.Media BuildEntity(ContentDto dto, IMediaType contentType) { var nodeDto = dto.NodeDto; var contentVersionDto = dto.ContentVersionDto; - var content = new Models.Media(nodeDto.Text, nodeDto.ParentId, contentType); + var content = new Core.Models.Media(nodeDto.Text, nodeDto.ParentId, contentType); try { @@ -95,8 +95,8 @@ namespace Umbraco.Core.Persistence.Factories content.SortOrder = nodeDto.SortOrder; content.Trashed = nodeDto.Trashed; - content.CreatorId = nodeDto.UserId ?? Constants.Security.UnknownUserId; - content.WriterId = contentVersionDto.UserId ?? Constants.Security.UnknownUserId; + content.CreatorId = nodeDto.UserId ?? Cms.Core.Constants.Security.UnknownUserId; + content.WriterId = contentVersionDto.UserId ?? Cms.Core.Constants.Security.UnknownUserId; content.CreateDate = nodeDto.CreateDate; content.UpdateDate = contentVersionDto.VersionDate; @@ -136,8 +136,8 @@ namespace Umbraco.Core.Persistence.Factories content.SortOrder = nodeDto.SortOrder; content.Trashed = nodeDto.Trashed; - content.CreatorId = nodeDto.UserId ?? Constants.Security.UnknownUserId; - content.WriterId = contentVersionDto.UserId ?? Constants.Security.UnknownUserId; + content.CreatorId = nodeDto.UserId ?? Cms.Core.Constants.Security.UnknownUserId; + content.WriterId = contentVersionDto.UserId ?? Cms.Core.Constants.Security.UnknownUserId; content.CreateDate = nodeDto.CreateDate; content.UpdateDate = contentVersionDto.VersionDate; @@ -187,7 +187,7 @@ namespace Umbraco.Core.Persistence.Factories /// public static MediaDto BuildDto(MediaUrlGeneratorCollection mediaUrlGenerators, IMedia entity) { - var contentDto = BuildContentDto(entity, Constants.ObjectTypes.Media); + var contentDto = BuildContentDto(entity, Cms.Core.Constants.ObjectTypes.Media); var dto = new MediaDto { @@ -204,7 +204,7 @@ namespace Umbraco.Core.Persistence.Factories /// public static MemberDto BuildDto(IMember entity) { - var contentDto = BuildContentDto(entity, Constants.ObjectTypes.Member); + var contentDto = BuildContentDto(entity, Cms.Core.Constants.ObjectTypes.Member); var dto = new MemberDto { @@ -294,7 +294,7 @@ namespace Umbraco.Core.Persistence.Factories string path = null; - if (entity.Properties.TryGetValue(Constants.Conventions.Media.File, out var property) + if (entity.Properties.TryGetValue(Cms.Core.Constants.Conventions.Media.File, out var property) && mediaUrlGenerators.TryGetMediaPath(property.PropertyType.PropertyEditorAlias, property.GetValue(), out var mediaPath)) { path = mediaPath; diff --git a/src/Umbraco.Infrastructure/Persistence/Factories/ContentTypeFactory.cs b/src/Umbraco.Infrastructure/Persistence/Factories/ContentTypeFactory.cs index 60602affbb..bf1234ffb2 100644 --- a/src/Umbraco.Infrastructure/Persistence/Factories/ContentTypeFactory.cs +++ b/src/Umbraco.Infrastructure/Persistence/Factories/ContentTypeFactory.cs @@ -2,12 +2,12 @@ using System.Collections.Generic; using System.Globalization; using System.Linq; -using Umbraco.Core.Models; -using Umbraco.Core.Models.Entities; -using Umbraco.Core.Persistence.Dtos; -using Umbraco.Core.Strings; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Core.Models.Entities; +using Umbraco.Cms.Core.Strings; +using Umbraco.Cms.Infrastructure.Persistence.Dtos; -namespace Umbraco.Core.Persistence.Factories +namespace Umbraco.Cms.Infrastructure.Persistence.Factories { // factory for // IContentType (document types) @@ -118,7 +118,7 @@ namespace Umbraco.Core.Persistence.Factories entity.UpdateDate = dto.NodeDto.CreateDate; entity.Path = dto.NodeDto.Path; entity.Level = dto.NodeDto.Level; - entity.CreatorId = dto.NodeDto.UserId ?? Constants.Security.UnknownUserId; + entity.CreatorId = dto.NodeDto.UserId ?? Cms.Core.Constants.Security.UnknownUserId; entity.AllowedAsRoot = dto.AllowAtRoot; entity.IsContainer = dto.IsContainer; entity.IsElement = dto.IsElement; @@ -132,11 +132,11 @@ namespace Umbraco.Core.Persistence.Factories { Guid nodeObjectType; if (entity is IContentType) - nodeObjectType = Constants.ObjectTypes.DocumentType; + nodeObjectType = Cms.Core.Constants.ObjectTypes.DocumentType; else if (entity is IMediaType) - nodeObjectType = Constants.ObjectTypes.MediaType; + nodeObjectType = Cms.Core.Constants.ObjectTypes.MediaType; else if (entity is IMemberType) - nodeObjectType = Constants.ObjectTypes.MemberType; + nodeObjectType = Cms.Core.Constants.ObjectTypes.MemberType; else throw new Exception("Invalid entity."); diff --git a/src/Umbraco.Infrastructure/Persistence/Factories/DataTypeFactory.cs b/src/Umbraco.Infrastructure/Persistence/Factories/DataTypeFactory.cs index 5f915c18aa..df655d3ade 100644 --- a/src/Umbraco.Infrastructure/Persistence/Factories/DataTypeFactory.cs +++ b/src/Umbraco.Infrastructure/Persistence/Factories/DataTypeFactory.cs @@ -1,11 +1,12 @@ using System; using Microsoft.Extensions.Logging; -using Umbraco.Core.Models; -using Umbraco.Core.Persistence.Dtos; -using Umbraco.Core.PropertyEditors; -using Umbraco.Core.Serialization; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Core.PropertyEditors; +using Umbraco.Cms.Core.Serialization; +using Umbraco.Cms.Infrastructure.Persistence.Dtos; +using Umbraco.Extensions; -namespace Umbraco.Core.Persistence.Factories +namespace Umbraco.Cms.Infrastructure.Persistence.Factories { internal static class DataTypeFactory { @@ -39,7 +40,7 @@ namespace Umbraco.Core.Persistence.Factories dataType.Path = dto.NodeDto.Path; dataType.SortOrder = dto.NodeDto.SortOrder; dataType.Trashed = dto.NodeDto.Trashed; - dataType.CreatorId = dto.NodeDto.UserId ?? Constants.Security.UnknownUserId; + dataType.CreatorId = dto.NodeDto.UserId ?? Cms.Core.Constants.Security.UnknownUserId; dataType.SetLazyConfiguration(dto.Configuration); @@ -74,7 +75,7 @@ namespace Umbraco.Core.Persistence.Factories CreateDate = entity.CreateDate, NodeId = entity.Id, Level = Convert.ToInt16(entity.Level), - NodeObjectType = Constants.ObjectTypes.DataType, + NodeObjectType = Cms.Core.Constants.ObjectTypes.DataType, ParentId = entity.ParentId, Path = entity.Path, SortOrder = entity.SortOrder, diff --git a/src/Umbraco.Infrastructure/Persistence/Factories/DictionaryItemFactory.cs b/src/Umbraco.Infrastructure/Persistence/Factories/DictionaryItemFactory.cs index 4236195402..9cfdc019a8 100644 --- a/src/Umbraco.Infrastructure/Persistence/Factories/DictionaryItemFactory.cs +++ b/src/Umbraco.Infrastructure/Persistence/Factories/DictionaryItemFactory.cs @@ -1,8 +1,8 @@ using System.Collections.Generic; -using Umbraco.Core.Models; -using Umbraco.Core.Persistence.Dtos; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Infrastructure.Persistence.Dtos; -namespace Umbraco.Core.Persistence.Factories +namespace Umbraco.Cms.Infrastructure.Persistence.Factories { internal static class DictionaryItemFactory { diff --git a/src/Umbraco.Infrastructure/Persistence/Factories/DictionaryTranslationFactory.cs b/src/Umbraco.Infrastructure/Persistence/Factories/DictionaryTranslationFactory.cs index 5325813dbf..a53222ad5e 100644 --- a/src/Umbraco.Infrastructure/Persistence/Factories/DictionaryTranslationFactory.cs +++ b/src/Umbraco.Infrastructure/Persistence/Factories/DictionaryTranslationFactory.cs @@ -1,8 +1,8 @@ using System; -using Umbraco.Core.Models; -using Umbraco.Core.Persistence.Dtos; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Infrastructure.Persistence.Dtos; -namespace Umbraco.Core.Persistence.Factories +namespace Umbraco.Cms.Infrastructure.Persistence.Factories { internal static class DictionaryTranslationFactory { diff --git a/src/Umbraco.Infrastructure/Persistence/Factories/ExternalLoginFactory.cs b/src/Umbraco.Infrastructure/Persistence/Factories/ExternalLoginFactory.cs index aa4b20aa40..f356274d04 100644 --- a/src/Umbraco.Infrastructure/Persistence/Factories/ExternalLoginFactory.cs +++ b/src/Umbraco.Infrastructure/Persistence/Factories/ExternalLoginFactory.cs @@ -1,8 +1,8 @@ using System; -using Umbraco.Core.Models.Identity; -using Umbraco.Core.Persistence.Dtos; +using Umbraco.Cms.Core.Models.Identity; +using Umbraco.Cms.Infrastructure.Persistence.Dtos; -namespace Umbraco.Core.Persistence.Factories +namespace Umbraco.Cms.Infrastructure.Persistence.Factories { internal static class ExternalLoginFactory { diff --git a/src/Umbraco.Infrastructure/Persistence/Factories/LanguageFactory.cs b/src/Umbraco.Infrastructure/Persistence/Factories/LanguageFactory.cs index 0b5937a328..847bdd7c9b 100644 --- a/src/Umbraco.Infrastructure/Persistence/Factories/LanguageFactory.cs +++ b/src/Umbraco.Infrastructure/Persistence/Factories/LanguageFactory.cs @@ -1,10 +1,9 @@ using System.Globalization; -using Umbraco.Core.Configuration; -using Umbraco.Core.Configuration.Models; -using Umbraco.Core.Models; -using Umbraco.Core.Persistence.Dtos; +using Umbraco.Cms.Core.Configuration.Models; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Infrastructure.Persistence.Dtos; -namespace Umbraco.Core.Persistence.Factories +namespace Umbraco.Cms.Infrastructure.Persistence.Factories { internal static class LanguageFactory { diff --git a/src/Umbraco.Infrastructure/Persistence/Factories/MacroFactory.cs b/src/Umbraco.Infrastructure/Persistence/Factories/MacroFactory.cs index 5d0cbc9c34..960b809c74 100644 --- a/src/Umbraco.Infrastructure/Persistence/Factories/MacroFactory.cs +++ b/src/Umbraco.Infrastructure/Persistence/Factories/MacroFactory.cs @@ -1,10 +1,11 @@ using System.Collections.Generic; using System.Globalization; -using Umbraco.Core.Models; -using Umbraco.Core.Persistence.Dtos; -using Umbraco.Core.Strings; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Core.Strings; +using Umbraco.Cms.Infrastructure.Persistence.Dtos; +using Umbraco.Extensions; -namespace Umbraco.Core.Persistence.Factories +namespace Umbraco.Cms.Infrastructure.Persistence.Factories { internal static class MacroFactory { diff --git a/src/Umbraco.Infrastructure/Persistence/Factories/MemberGroupFactory.cs b/src/Umbraco.Infrastructure/Persistence/Factories/MemberGroupFactory.cs index cb73f3b3aa..d3ddf40ce3 100644 --- a/src/Umbraco.Infrastructure/Persistence/Factories/MemberGroupFactory.cs +++ b/src/Umbraco.Infrastructure/Persistence/Factories/MemberGroupFactory.cs @@ -1,8 +1,8 @@ using System; -using Umbraco.Core.Models; -using Umbraco.Core.Persistence.Dtos; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Infrastructure.Persistence.Dtos; -namespace Umbraco.Core.Persistence.Factories +namespace Umbraco.Cms.Infrastructure.Persistence.Factories { internal static class MemberGroupFactory { @@ -11,7 +11,7 @@ namespace Umbraco.Core.Persistence.Factories static MemberGroupFactory() { - _nodeObjectTypeId = Constants.ObjectTypes.MemberGroup; + _nodeObjectTypeId = Cms.Core.Constants.ObjectTypes.MemberGroup; } #region Implementation of IEntityFactory diff --git a/src/Umbraco.Infrastructure/Persistence/Factories/PropertyFactory.cs b/src/Umbraco.Infrastructure/Persistence/Factories/PropertyFactory.cs index b360342332..730c24f2f2 100644 --- a/src/Umbraco.Infrastructure/Persistence/Factories/PropertyFactory.cs +++ b/src/Umbraco.Infrastructure/Persistence/Factories/PropertyFactory.cs @@ -1,11 +1,12 @@ using System; using System.Collections.Generic; using System.Linq; -using Umbraco.Core.Models; -using Umbraco.Core.Persistence.Dtos; -using Umbraco.Core.Persistence.Repositories; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Core.Persistence.Repositories; +using Umbraco.Cms.Infrastructure.Persistence.Dtos; +using Umbraco.Extensions; -namespace Umbraco.Core.Persistence.Factories +namespace Umbraco.Cms.Infrastructure.Persistence.Factories { internal static class PropertyFactory { @@ -48,7 +49,7 @@ namespace Umbraco.Core.Persistence.Factories if (property.ValueStorageType == ValueStorageType.Integer) { - if (value is bool || property.PropertyType.PropertyEditorAlias == Constants.PropertyEditors.Aliases.Boolean) + if (value is bool || property.PropertyType.PropertyEditorAlias == Cms.Core.Constants.PropertyEditors.Aliases.Boolean) { dto.IntegerValue = value != null && string.IsNullOrEmpty(value.ToString()) ? 0 : Convert.ToInt32(value); } diff --git a/src/Umbraco.Infrastructure/Persistence/Factories/PropertyGroupFactory.cs b/src/Umbraco.Infrastructure/Persistence/Factories/PropertyGroupFactory.cs index 29243d3a23..46a84000ab 100644 --- a/src/Umbraco.Infrastructure/Persistence/Factories/PropertyGroupFactory.cs +++ b/src/Umbraco.Infrastructure/Persistence/Factories/PropertyGroupFactory.cs @@ -1,10 +1,11 @@ using System; using System.Collections.Generic; using System.Linq; -using Umbraco.Core.Models; -using Umbraco.Core.Persistence.Dtos; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Infrastructure.Persistence.Dtos; +using Umbraco.Extensions; -namespace Umbraco.Core.Persistence.Factories +namespace Umbraco.Cms.Infrastructure.Persistence.Factories { internal static class PropertyGroupFactory { diff --git a/src/Umbraco.Infrastructure/Persistence/Factories/PublicAccessEntryFactory.cs b/src/Umbraco.Infrastructure/Persistence/Factories/PublicAccessEntryFactory.cs index 2a469e4624..0ed16d80da 100644 --- a/src/Umbraco.Infrastructure/Persistence/Factories/PublicAccessEntryFactory.cs +++ b/src/Umbraco.Infrastructure/Persistence/Factories/PublicAccessEntryFactory.cs @@ -1,8 +1,8 @@ using System.Linq; -using Umbraco.Core.Models; -using Umbraco.Core.Persistence.Dtos; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Infrastructure.Persistence.Dtos; -namespace Umbraco.Core.Persistence.Factories +namespace Umbraco.Cms.Infrastructure.Persistence.Factories { internal static class PublicAccessEntryFactory { diff --git a/src/Umbraco.Infrastructure/Persistence/Factories/RelationFactory.cs b/src/Umbraco.Infrastructure/Persistence/Factories/RelationFactory.cs index f4117cc358..63d3292160 100644 --- a/src/Umbraco.Infrastructure/Persistence/Factories/RelationFactory.cs +++ b/src/Umbraco.Infrastructure/Persistence/Factories/RelationFactory.cs @@ -1,7 +1,7 @@ -using Umbraco.Core.Models; -using Umbraco.Core.Persistence.Dtos; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Infrastructure.Persistence.Dtos; -namespace Umbraco.Core.Persistence.Factories +namespace Umbraco.Cms.Infrastructure.Persistence.Factories { internal static class RelationFactory { diff --git a/src/Umbraco.Infrastructure/Persistence/Factories/RelationTypeFactory.cs b/src/Umbraco.Infrastructure/Persistence/Factories/RelationTypeFactory.cs index 177a0494a2..51f5261199 100644 --- a/src/Umbraco.Infrastructure/Persistence/Factories/RelationTypeFactory.cs +++ b/src/Umbraco.Infrastructure/Persistence/Factories/RelationTypeFactory.cs @@ -1,7 +1,7 @@ -using Umbraco.Core.Models; -using Umbraco.Core.Persistence.Dtos; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Infrastructure.Persistence.Dtos; -namespace Umbraco.Core.Persistence.Factories +namespace Umbraco.Cms.Infrastructure.Persistence.Factories { internal static class RelationTypeFactory { diff --git a/src/Umbraco.Infrastructure/Persistence/Factories/ServerRegistrationFactory.cs b/src/Umbraco.Infrastructure/Persistence/Factories/ServerRegistrationFactory.cs index c49c3968ed..6a1aa48162 100644 --- a/src/Umbraco.Infrastructure/Persistence/Factories/ServerRegistrationFactory.cs +++ b/src/Umbraco.Infrastructure/Persistence/Factories/ServerRegistrationFactory.cs @@ -1,7 +1,7 @@ -using Umbraco.Core.Models; -using Umbraco.Core.Persistence.Dtos; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Infrastructure.Persistence.Dtos; -namespace Umbraco.Core.Persistence.Factories +namespace Umbraco.Cms.Infrastructure.Persistence.Factories { internal static class ServerRegistrationFactory { diff --git a/src/Umbraco.Infrastructure/Persistence/Factories/TagFactory.cs b/src/Umbraco.Infrastructure/Persistence/Factories/TagFactory.cs index 10441707ec..e666e53658 100644 --- a/src/Umbraco.Infrastructure/Persistence/Factories/TagFactory.cs +++ b/src/Umbraco.Infrastructure/Persistence/Factories/TagFactory.cs @@ -1,7 +1,7 @@ -using Umbraco.Core.Models; -using Umbraco.Core.Persistence.Dtos; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Infrastructure.Persistence.Dtos; -namespace Umbraco.Core.Persistence.Factories +namespace Umbraco.Cms.Infrastructure.Persistence.Factories { internal static class TagFactory { diff --git a/src/Umbraco.Infrastructure/Persistence/Factories/TemplateFactory.cs b/src/Umbraco.Infrastructure/Persistence/Factories/TemplateFactory.cs index 4c9bfdb45e..0ce7fe53cb 100644 --- a/src/Umbraco.Infrastructure/Persistence/Factories/TemplateFactory.cs +++ b/src/Umbraco.Infrastructure/Persistence/Factories/TemplateFactory.cs @@ -1,12 +1,12 @@ using System; using System.Collections.Generic; using System.Linq; -using Umbraco.Core.Models; -using Umbraco.Core.Models.Entities; -using Umbraco.Core.Persistence.Dtos; -using Umbraco.Core.Strings; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Core.Models.Entities; +using Umbraco.Cms.Core.Strings; +using Umbraco.Cms.Infrastructure.Persistence.Dtos; -namespace Umbraco.Core.Persistence.Factories +namespace Umbraco.Cms.Infrastructure.Persistence.Factories { internal static class TemplateFactory { diff --git a/src/Umbraco.Infrastructure/Persistence/Factories/UserFactory.cs b/src/Umbraco.Infrastructure/Persistence/Factories/UserFactory.cs index 839f7b5ad7..1bf32075eb 100644 --- a/src/Umbraco.Infrastructure/Persistence/Factories/UserFactory.cs +++ b/src/Umbraco.Infrastructure/Persistence/Factories/UserFactory.cs @@ -1,11 +1,11 @@ using System; using System.Linq; -using Umbraco.Core.Configuration; -using Umbraco.Core.Configuration.Models; -using Umbraco.Core.Models.Membership; -using Umbraco.Core.Persistence.Dtos; +using Umbraco.Cms.Core.Configuration.Models; +using Umbraco.Cms.Core.Models.Membership; +using Umbraco.Cms.Infrastructure.Persistence.Dtos; +using Umbraco.Extensions; -namespace Umbraco.Core.Persistence.Factories +namespace Umbraco.Cms.Infrastructure.Persistence.Factories { internal static class UserFactory { @@ -65,7 +65,7 @@ namespace Umbraco.Core.Persistence.Factories Login = entity.Username, NoConsole = entity.IsLockedOut, Password = entity.RawPasswordValue, - PasswordConfig = entity.PasswordConfiguration, + PasswordConfig = entity.PasswordConfiguration, UserLanguage = entity.Language, UserName = entity.Name, SecurityStampToken = entity.SecurityStamp, diff --git a/src/Umbraco.Infrastructure/Persistence/Factories/UserGroupFactory.cs b/src/Umbraco.Infrastructure/Persistence/Factories/UserGroupFactory.cs index 596fba144a..d4c8673a6c 100644 --- a/src/Umbraco.Infrastructure/Persistence/Factories/UserGroupFactory.cs +++ b/src/Umbraco.Infrastructure/Persistence/Factories/UserGroupFactory.cs @@ -1,11 +1,12 @@ using System.Collections.Generic; using System.Globalization; using System.Linq; -using Umbraco.Core.Models.Membership; -using Umbraco.Core.Persistence.Dtos; -using Umbraco.Core.Strings; +using Umbraco.Cms.Core.Models.Membership; +using Umbraco.Cms.Core.Strings; +using Umbraco.Cms.Infrastructure.Persistence.Dtos; +using Umbraco.Extensions; -namespace Umbraco.Core.Persistence.Factories +namespace Umbraco.Cms.Infrastructure.Persistence.Factories { internal static class UserGroupFactory { diff --git a/src/Umbraco.Infrastructure/Persistence/FaultHandling/ITransientErrorDetectionStrategy.cs b/src/Umbraco.Infrastructure/Persistence/FaultHandling/ITransientErrorDetectionStrategy.cs index aa5161b024..59d4f1c0b7 100644 --- a/src/Umbraco.Infrastructure/Persistence/FaultHandling/ITransientErrorDetectionStrategy.cs +++ b/src/Umbraco.Infrastructure/Persistence/FaultHandling/ITransientErrorDetectionStrategy.cs @@ -1,6 +1,6 @@ using System; -namespace Umbraco.Core.Persistence.FaultHandling +namespace Umbraco.Cms.Infrastructure.Persistence.FaultHandling { /// /// Defines an interface which must be implemented by custom components responsible for detecting specific transient conditions. diff --git a/src/Umbraco.Infrastructure/Persistence/FaultHandling/RetryDbConnection.cs b/src/Umbraco.Infrastructure/Persistence/FaultHandling/RetryDbConnection.cs index ca10097ec4..cfd078b81c 100644 --- a/src/Umbraco.Infrastructure/Persistence/FaultHandling/RetryDbConnection.cs +++ b/src/Umbraco.Infrastructure/Persistence/FaultHandling/RetryDbConnection.cs @@ -1,10 +1,9 @@ using System; using System.Data; using System.Data.Common; -using NPoco; using Transaction = System.Transactions.Transaction; -namespace Umbraco.Core.Persistence.FaultHandling +namespace Umbraco.Cms.Infrastructure.Persistence.FaultHandling { class RetryDbConnection : DbConnection { diff --git a/src/Umbraco.Infrastructure/Persistence/FaultHandling/RetryLimitExceededException.cs b/src/Umbraco.Infrastructure/Persistence/FaultHandling/RetryLimitExceededException.cs index a1a0db2983..78c8ab9c25 100644 --- a/src/Umbraco.Infrastructure/Persistence/FaultHandling/RetryLimitExceededException.cs +++ b/src/Umbraco.Infrastructure/Persistence/FaultHandling/RetryLimitExceededException.cs @@ -1,7 +1,7 @@ using System; using System.Runtime.Serialization; -namespace Umbraco.Core.Persistence.FaultHandling +namespace Umbraco.Cms.Infrastructure.Persistence.FaultHandling { /// /// The special type of exception that provides managed exit from a retry loop. The user code can use this exception to notify the retry policy that no further retry attempts are required. diff --git a/src/Umbraco.Infrastructure/Persistence/FaultHandling/RetryPolicy.cs b/src/Umbraco.Infrastructure/Persistence/FaultHandling/RetryPolicy.cs index 58bada0516..3a4c7a4c5f 100644 --- a/src/Umbraco.Infrastructure/Persistence/FaultHandling/RetryPolicy.cs +++ b/src/Umbraco.Infrastructure/Persistence/FaultHandling/RetryPolicy.cs @@ -1,9 +1,8 @@ using System; using System.Threading; -using Umbraco.Core.Logging; -using Umbraco.Core.Persistence.FaultHandling.Strategies; +using Umbraco.Cms.Infrastructure.Persistence.FaultHandling.Strategies; -namespace Umbraco.Core.Persistence.FaultHandling +namespace Umbraco.Cms.Infrastructure.Persistence.FaultHandling { /// /// Provides the base implementation of the retry mechanism for unreliable actions and transient conditions. diff --git a/src/Umbraco.Infrastructure/Persistence/FaultHandling/RetryPolicyFactory.cs b/src/Umbraco.Infrastructure/Persistence/FaultHandling/RetryPolicyFactory.cs index 7ce1a42ad8..a88ae39982 100644 --- a/src/Umbraco.Infrastructure/Persistence/FaultHandling/RetryPolicyFactory.cs +++ b/src/Umbraco.Infrastructure/Persistence/FaultHandling/RetryPolicyFactory.cs @@ -1,6 +1,6 @@ -using Umbraco.Core.Persistence.FaultHandling.Strategies; +using Umbraco.Cms.Infrastructure.Persistence.FaultHandling.Strategies; -namespace Umbraco.Core.Persistence.FaultHandling +namespace Umbraco.Cms.Infrastructure.Persistence.FaultHandling { /// /// Provides a factory class for instantiating application-specific retry policies. diff --git a/src/Umbraco.Infrastructure/Persistence/FaultHandling/RetryStrategy.cs b/src/Umbraco.Infrastructure/Persistence/FaultHandling/RetryStrategy.cs index a327d2a949..1d48c336d3 100644 --- a/src/Umbraco.Infrastructure/Persistence/FaultHandling/RetryStrategy.cs +++ b/src/Umbraco.Infrastructure/Persistence/FaultHandling/RetryStrategy.cs @@ -1,7 +1,7 @@ using System; -using Umbraco.Core.Persistence.FaultHandling.Strategies; +using Umbraco.Cms.Infrastructure.Persistence.FaultHandling.Strategies; -namespace Umbraco.Core.Persistence.FaultHandling +namespace Umbraco.Cms.Infrastructure.Persistence.FaultHandling { /// /// Defines a callback delegate that will be invoked whenever a retry condition is encountered. diff --git a/src/Umbraco.Infrastructure/Persistence/FaultHandling/RetryingEventArgs.cs b/src/Umbraco.Infrastructure/Persistence/FaultHandling/RetryingEventArgs.cs index ae66b2ee19..456dc87391 100644 --- a/src/Umbraco.Infrastructure/Persistence/FaultHandling/RetryingEventArgs.cs +++ b/src/Umbraco.Infrastructure/Persistence/FaultHandling/RetryingEventArgs.cs @@ -1,6 +1,6 @@ using System; -namespace Umbraco.Core.Persistence.FaultHandling +namespace Umbraco.Cms.Infrastructure.Persistence.FaultHandling { /// /// Contains information required for the event. diff --git a/src/Umbraco.Infrastructure/Persistence/FaultHandling/Strategies/ExponentialBackoff.cs b/src/Umbraco.Infrastructure/Persistence/FaultHandling/Strategies/ExponentialBackoff.cs index 88a605955f..33dd9ab137 100644 --- a/src/Umbraco.Infrastructure/Persistence/FaultHandling/Strategies/ExponentialBackoff.cs +++ b/src/Umbraco.Infrastructure/Persistence/FaultHandling/Strategies/ExponentialBackoff.cs @@ -1,6 +1,6 @@ using System; -namespace Umbraco.Core.Persistence.FaultHandling.Strategies +namespace Umbraco.Cms.Infrastructure.Persistence.FaultHandling.Strategies { /// /// A retry strategy with back-off parameters for calculating the exponential delay between retries. diff --git a/src/Umbraco.Infrastructure/Persistence/FaultHandling/Strategies/FixedInterval.cs b/src/Umbraco.Infrastructure/Persistence/FaultHandling/Strategies/FixedInterval.cs index 5e927077e8..0878973cc5 100644 --- a/src/Umbraco.Infrastructure/Persistence/FaultHandling/Strategies/FixedInterval.cs +++ b/src/Umbraco.Infrastructure/Persistence/FaultHandling/Strategies/FixedInterval.cs @@ -1,6 +1,6 @@ using System; -namespace Umbraco.Core.Persistence.FaultHandling.Strategies +namespace Umbraco.Cms.Infrastructure.Persistence.FaultHandling.Strategies { /// /// A retry strategy with a specified number of retry attempts and a default fixed time interval between retries. diff --git a/src/Umbraco.Infrastructure/Persistence/FaultHandling/Strategies/Incremental.cs b/src/Umbraco.Infrastructure/Persistence/FaultHandling/Strategies/Incremental.cs index 126bdaaba2..5cf34f783b 100644 --- a/src/Umbraco.Infrastructure/Persistence/FaultHandling/Strategies/Incremental.cs +++ b/src/Umbraco.Infrastructure/Persistence/FaultHandling/Strategies/Incremental.cs @@ -1,6 +1,6 @@ using System; -namespace Umbraco.Core.Persistence.FaultHandling.Strategies +namespace Umbraco.Cms.Infrastructure.Persistence.FaultHandling.Strategies { /// /// A retry strategy with a specified number of retry attempts and an incremental time interval between retries. diff --git a/src/Umbraco.Infrastructure/Persistence/FaultHandling/Strategies/NetworkConnectivityErrorDetectionStrategy.cs b/src/Umbraco.Infrastructure/Persistence/FaultHandling/Strategies/NetworkConnectivityErrorDetectionStrategy.cs index c6f524eaeb..004ec1f9b2 100644 --- a/src/Umbraco.Infrastructure/Persistence/FaultHandling/Strategies/NetworkConnectivityErrorDetectionStrategy.cs +++ b/src/Umbraco.Infrastructure/Persistence/FaultHandling/Strategies/NetworkConnectivityErrorDetectionStrategy.cs @@ -1,7 +1,7 @@ using System; using System.Data.SqlClient; -namespace Umbraco.Core.Persistence.FaultHandling.Strategies +namespace Umbraco.Cms.Infrastructure.Persistence.FaultHandling.Strategies { /// /// Implements a strategy that detects network connectivity errors such as host not found. diff --git a/src/Umbraco.Infrastructure/Persistence/FaultHandling/Strategies/SqlAzureTransientErrorDetectionStrategy.cs b/src/Umbraco.Infrastructure/Persistence/FaultHandling/Strategies/SqlAzureTransientErrorDetectionStrategy.cs index 086950311b..37968c4376 100644 --- a/src/Umbraco.Infrastructure/Persistence/FaultHandling/Strategies/SqlAzureTransientErrorDetectionStrategy.cs +++ b/src/Umbraco.Infrastructure/Persistence/FaultHandling/Strategies/SqlAzureTransientErrorDetectionStrategy.cs @@ -1,8 +1,7 @@ using System; -using System.Data; using System.Data.SqlClient; -namespace Umbraco.Core.Persistence.FaultHandling.Strategies +namespace Umbraco.Cms.Infrastructure.Persistence.FaultHandling.Strategies { // See https://docs.microsoft.com/en-us/azure/azure-sql/database/troubleshoot-common-connectivity-issues // Also we could just use the nuget package instead https://www.nuget.org/packages/EnterpriseLibrary.TransientFaultHandling/ ? diff --git a/src/Umbraco.Infrastructure/Persistence/FaultHandling/ThrottlingCondition.cs b/src/Umbraco.Infrastructure/Persistence/FaultHandling/ThrottlingCondition.cs index 1b3e1c45c9..9905a35696 100644 --- a/src/Umbraco.Infrastructure/Persistence/FaultHandling/ThrottlingCondition.cs +++ b/src/Umbraco.Infrastructure/Persistence/FaultHandling/ThrottlingCondition.cs @@ -6,7 +6,7 @@ using System.Linq; using System.Text; using System.Text.RegularExpressions; -namespace Umbraco.Core.Persistence.FaultHandling +namespace Umbraco.Cms.Infrastructure.Persistence.FaultHandling { /// /// Defines the possible throttling modes in SQL Azure. diff --git a/src/Umbraco.Infrastructure/Persistence/IBulkSqlInsertProvider.cs b/src/Umbraco.Infrastructure/Persistence/IBulkSqlInsertProvider.cs index 8630c4b4d3..6a928b6859 100644 --- a/src/Umbraco.Infrastructure/Persistence/IBulkSqlInsertProvider.cs +++ b/src/Umbraco.Infrastructure/Persistence/IBulkSqlInsertProvider.cs @@ -1,6 +1,6 @@ using System.Collections.Generic; -namespace Umbraco.Core.Persistence +namespace Umbraco.Cms.Infrastructure.Persistence { public interface IBulkSqlInsertProvider { diff --git a/src/Umbraco.Infrastructure/Persistence/IDbProviderFactoryCreator.cs b/src/Umbraco.Infrastructure/Persistence/IDbProviderFactoryCreator.cs index 4059997abc..47cede9b26 100644 --- a/src/Umbraco.Infrastructure/Persistence/IDbProviderFactoryCreator.cs +++ b/src/Umbraco.Infrastructure/Persistence/IDbProviderFactoryCreator.cs @@ -1,7 +1,7 @@ using System.Data.Common; -using Umbraco.Core.Persistence.SqlSyntax; +using Umbraco.Cms.Infrastructure.Persistence.SqlSyntax; -namespace Umbraco.Core.Persistence +namespace Umbraco.Cms.Infrastructure.Persistence { public interface IDbProviderFactoryCreator diff --git a/src/Umbraco.Infrastructure/Persistence/IEmbeddedDatabaseCreator.cs b/src/Umbraco.Infrastructure/Persistence/IEmbeddedDatabaseCreator.cs index dd1e89a95e..2461644d0a 100644 --- a/src/Umbraco.Infrastructure/Persistence/IEmbeddedDatabaseCreator.cs +++ b/src/Umbraco.Infrastructure/Persistence/IEmbeddedDatabaseCreator.cs @@ -1,4 +1,4 @@ -namespace Umbraco.Core.Persistence +namespace Umbraco.Cms.Infrastructure.Persistence { public interface IEmbeddedDatabaseCreator { diff --git a/src/Umbraco.Infrastructure/Persistence/ISqlContext.cs b/src/Umbraco.Infrastructure/Persistence/ISqlContext.cs index f8a6bfd0fb..8a6bfb8420 100644 --- a/src/Umbraco.Infrastructure/Persistence/ISqlContext.cs +++ b/src/Umbraco.Infrastructure/Persistence/ISqlContext.cs @@ -1,9 +1,9 @@ using NPoco; -using Umbraco.Core.Persistence.Mappers; -using Umbraco.Core.Persistence.Querying; -using Umbraco.Core.Persistence.SqlSyntax; +using Umbraco.Cms.Core.Persistence.Querying; +using Umbraco.Cms.Infrastructure.Persistence.Mappers; +using Umbraco.Cms.Infrastructure.Persistence.SqlSyntax; -namespace Umbraco.Core.Persistence +namespace Umbraco.Cms.Infrastructure.Persistence { /// /// Specifies the Sql context. diff --git a/src/Umbraco.Infrastructure/Persistence/IUmbracoDatabase.cs b/src/Umbraco.Infrastructure/Persistence/IUmbracoDatabase.cs index 3849ae6ebd..c28b0d984d 100644 --- a/src/Umbraco.Infrastructure/Persistence/IUmbracoDatabase.cs +++ b/src/Umbraco.Infrastructure/Persistence/IUmbracoDatabase.cs @@ -1,8 +1,8 @@ using System.Collections.Generic; using NPoco; -using Umbraco.Core.Migrations.Install; +using Umbraco.Cms.Infrastructure.Migrations.Install; -namespace Umbraco.Core.Persistence +namespace Umbraco.Cms.Infrastructure.Persistence { public interface IUmbracoDatabase : IDatabase { diff --git a/src/Umbraco.Infrastructure/Persistence/IUmbracoDatabaseFactory.cs b/src/Umbraco.Infrastructure/Persistence/IUmbracoDatabaseFactory.cs index 92e24a7e65..92afc631f5 100644 --- a/src/Umbraco.Infrastructure/Persistence/IUmbracoDatabaseFactory.cs +++ b/src/Umbraco.Infrastructure/Persistence/IUmbracoDatabaseFactory.cs @@ -1,6 +1,6 @@ using System; -namespace Umbraco.Core.Persistence +namespace Umbraco.Cms.Infrastructure.Persistence { /// /// Creates and manages the "ambient" database. diff --git a/src/Umbraco.Infrastructure/Persistence/LocalDb.cs b/src/Umbraco.Infrastructure/Persistence/LocalDb.cs index 89fce803b2..0c5137d199 100644 --- a/src/Umbraco.Infrastructure/Persistence/LocalDb.cs +++ b/src/Umbraco.Infrastructure/Persistence/LocalDb.cs @@ -6,7 +6,7 @@ using System.Diagnostics; using System.IO; using System.Linq; -namespace Umbraco.Core.Persistence +namespace Umbraco.Cms.Infrastructure.Persistence { /// /// Manages LocalDB databases. diff --git a/src/Umbraco.Infrastructure/Persistence/Mappers/AccessMapper.cs b/src/Umbraco.Infrastructure/Persistence/Mappers/AccessMapper.cs index 55cef3748b..ddfcae09f1 100644 --- a/src/Umbraco.Infrastructure/Persistence/Mappers/AccessMapper.cs +++ b/src/Umbraco.Infrastructure/Persistence/Mappers/AccessMapper.cs @@ -1,10 +1,8 @@ using System; -using System.Collections.Concurrent; -using Umbraco.Core.Models; -using Umbraco.Core.Persistence.Dtos; -using Umbraco.Infrastructure.Persistence.Mappers; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Infrastructure.Persistence.Dtos; -namespace Umbraco.Core.Persistence.Mappers +namespace Umbraco.Cms.Infrastructure.Persistence.Mappers { [MapperFor(typeof(PublicAccessEntry))] public sealed class AccessMapper : BaseMapper diff --git a/src/Umbraco.Infrastructure/Persistence/Mappers/AuditEntryMapper.cs b/src/Umbraco.Infrastructure/Persistence/Mappers/AuditEntryMapper.cs index f70f3d1bc1..25bf413cc9 100644 --- a/src/Umbraco.Infrastructure/Persistence/Mappers/AuditEntryMapper.cs +++ b/src/Umbraco.Infrastructure/Persistence/Mappers/AuditEntryMapper.cs @@ -1,10 +1,8 @@ using System; -using System.Collections.Concurrent; -using Umbraco.Core.Models; -using Umbraco.Core.Persistence.Dtos; -using Umbraco.Infrastructure.Persistence.Mappers; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Infrastructure.Persistence.Dtos; -namespace Umbraco.Core.Persistence.Mappers +namespace Umbraco.Cms.Infrastructure.Persistence.Mappers { /// /// Represents a mapper for audit entry entities. diff --git a/src/Umbraco.Infrastructure/Persistence/Mappers/AuditItemMapper.cs b/src/Umbraco.Infrastructure/Persistence/Mappers/AuditItemMapper.cs index c31c9a421d..3267a5d14a 100644 --- a/src/Umbraco.Infrastructure/Persistence/Mappers/AuditItemMapper.cs +++ b/src/Umbraco.Infrastructure/Persistence/Mappers/AuditItemMapper.cs @@ -1,10 +1,8 @@ using System; -using System.Collections.Concurrent; -using Umbraco.Core.Models; -using Umbraco.Core.Persistence.Dtos; -using Umbraco.Infrastructure.Persistence.Mappers; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Infrastructure.Persistence.Dtos; -namespace Umbraco.Core.Persistence.Mappers +namespace Umbraco.Cms.Infrastructure.Persistence.Mappers { [MapperFor(typeof(AuditItem))] [MapperFor(typeof(IAuditItem))] diff --git a/src/Umbraco.Infrastructure/Persistence/Mappers/BaseMapper.cs b/src/Umbraco.Infrastructure/Persistence/Mappers/BaseMapper.cs index 3085ebe624..239d114184 100644 --- a/src/Umbraco.Infrastructure/Persistence/Mappers/BaseMapper.cs +++ b/src/Umbraco.Infrastructure/Persistence/Mappers/BaseMapper.cs @@ -1,11 +1,10 @@ using System; using System.Collections.Concurrent; using NPoco; -using Umbraco.Core.Persistence.SqlSyntax; -using Umbraco.Core.Composing; -using Umbraco.Infrastructure.Persistence.Mappers; +using Umbraco.Cms.Infrastructure.Persistence.SqlSyntax; +using Umbraco.Extensions; -namespace Umbraco.Core.Persistence.Mappers +namespace Umbraco.Cms.Infrastructure.Persistence.Mappers { public abstract class BaseMapper { diff --git a/src/Umbraco.Infrastructure/Persistence/Mappers/ConsentMapper.cs b/src/Umbraco.Infrastructure/Persistence/Mappers/ConsentMapper.cs index b02a9356af..884db7c09e 100644 --- a/src/Umbraco.Infrastructure/Persistence/Mappers/ConsentMapper.cs +++ b/src/Umbraco.Infrastructure/Persistence/Mappers/ConsentMapper.cs @@ -1,10 +1,8 @@ using System; -using System.Collections.Concurrent; -using Umbraco.Core.Models; -using Umbraco.Core.Persistence.Dtos; -using Umbraco.Infrastructure.Persistence.Mappers; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Infrastructure.Persistence.Dtos; -namespace Umbraco.Core.Persistence.Mappers +namespace Umbraco.Cms.Infrastructure.Persistence.Mappers { /// /// Represents a mapper for consent entities. diff --git a/src/Umbraco.Infrastructure/Persistence/Mappers/ContentMapper.cs b/src/Umbraco.Infrastructure/Persistence/Mappers/ContentMapper.cs index d629a1845b..77e3b4edc4 100644 --- a/src/Umbraco.Infrastructure/Persistence/Mappers/ContentMapper.cs +++ b/src/Umbraco.Infrastructure/Persistence/Mappers/ContentMapper.cs @@ -1,10 +1,8 @@ using System; -using System.Collections.Concurrent; -using Umbraco.Core.Models; -using Umbraco.Core.Persistence.Dtos; -using Umbraco.Infrastructure.Persistence.Mappers; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Infrastructure.Persistence.Dtos; -namespace Umbraco.Core.Persistence.Mappers +namespace Umbraco.Cms.Infrastructure.Persistence.Mappers { /// /// Represents a to DTO mapper used to translate the properties of the public api diff --git a/src/Umbraco.Infrastructure/Persistence/Mappers/ContentTypeMapper.cs b/src/Umbraco.Infrastructure/Persistence/Mappers/ContentTypeMapper.cs index b74aaed560..d24dac2894 100644 --- a/src/Umbraco.Infrastructure/Persistence/Mappers/ContentTypeMapper.cs +++ b/src/Umbraco.Infrastructure/Persistence/Mappers/ContentTypeMapper.cs @@ -1,10 +1,8 @@ using System; -using System.Collections.Concurrent; -using Umbraco.Core.Models; -using Umbraco.Core.Persistence.Dtos; -using Umbraco.Infrastructure.Persistence.Mappers; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Infrastructure.Persistence.Dtos; -namespace Umbraco.Core.Persistence.Mappers +namespace Umbraco.Cms.Infrastructure.Persistence.Mappers { /// /// Represents a to DTO mapper used to translate the properties of the public api diff --git a/src/Umbraco.Infrastructure/Persistence/Mappers/DataTypeMapper.cs b/src/Umbraco.Infrastructure/Persistence/Mappers/DataTypeMapper.cs index aaa390de5a..8a84b8b153 100644 --- a/src/Umbraco.Infrastructure/Persistence/Mappers/DataTypeMapper.cs +++ b/src/Umbraco.Infrastructure/Persistence/Mappers/DataTypeMapper.cs @@ -1,10 +1,8 @@ using System; -using System.Collections.Concurrent; -using Umbraco.Core.Models; -using Umbraco.Core.Persistence.Dtos; -using Umbraco.Infrastructure.Persistence.Mappers; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Infrastructure.Persistence.Dtos; -namespace Umbraco.Core.Persistence.Mappers +namespace Umbraco.Cms.Infrastructure.Persistence.Mappers { /// /// Represents a to DTO mapper used to translate the properties of the public api diff --git a/src/Umbraco.Infrastructure/Persistence/Mappers/DictionaryMapper.cs b/src/Umbraco.Infrastructure/Persistence/Mappers/DictionaryMapper.cs index fb69640d90..da04c254f8 100644 --- a/src/Umbraco.Infrastructure/Persistence/Mappers/DictionaryMapper.cs +++ b/src/Umbraco.Infrastructure/Persistence/Mappers/DictionaryMapper.cs @@ -1,10 +1,8 @@ using System; -using System.Collections.Concurrent; -using Umbraco.Core.Models; -using Umbraco.Core.Persistence.Dtos; -using Umbraco.Infrastructure.Persistence.Mappers; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Infrastructure.Persistence.Dtos; -namespace Umbraco.Core.Persistence.Mappers +namespace Umbraco.Cms.Infrastructure.Persistence.Mappers { /// /// Represents a to DTO mapper used to translate the properties of the public api diff --git a/src/Umbraco.Infrastructure/Persistence/Mappers/DictionaryTranslationMapper.cs b/src/Umbraco.Infrastructure/Persistence/Mappers/DictionaryTranslationMapper.cs index d735014266..ead88959d3 100644 --- a/src/Umbraco.Infrastructure/Persistence/Mappers/DictionaryTranslationMapper.cs +++ b/src/Umbraco.Infrastructure/Persistence/Mappers/DictionaryTranslationMapper.cs @@ -1,10 +1,8 @@ using System; -using System.Collections.Concurrent; -using Umbraco.Core.Models; -using Umbraco.Core.Persistence.Dtos; -using Umbraco.Infrastructure.Persistence.Mappers; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Infrastructure.Persistence.Dtos; -namespace Umbraco.Core.Persistence.Mappers +namespace Umbraco.Cms.Infrastructure.Persistence.Mappers { /// /// Represents a to DTO mapper used to translate the properties of the public api diff --git a/src/Umbraco.Infrastructure/Persistence/Mappers/DomainMapper.cs b/src/Umbraco.Infrastructure/Persistence/Mappers/DomainMapper.cs index 7261b83a26..860d34edbf 100644 --- a/src/Umbraco.Infrastructure/Persistence/Mappers/DomainMapper.cs +++ b/src/Umbraco.Infrastructure/Persistence/Mappers/DomainMapper.cs @@ -1,10 +1,8 @@ using System; -using System.Collections.Concurrent; -using Umbraco.Core.Models; -using Umbraco.Core.Persistence.Dtos; -using Umbraco.Infrastructure.Persistence.Mappers; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Infrastructure.Persistence.Dtos; -namespace Umbraco.Core.Persistence.Mappers +namespace Umbraco.Cms.Infrastructure.Persistence.Mappers { [MapperFor(typeof(IDomain))] [MapperFor(typeof(UmbracoDomain))] diff --git a/src/Umbraco.Infrastructure/Persistence/Mappers/ExternalLoginMapper.cs b/src/Umbraco.Infrastructure/Persistence/Mappers/ExternalLoginMapper.cs index 208de76339..78f321fe4b 100644 --- a/src/Umbraco.Infrastructure/Persistence/Mappers/ExternalLoginMapper.cs +++ b/src/Umbraco.Infrastructure/Persistence/Mappers/ExternalLoginMapper.cs @@ -1,10 +1,8 @@ using System; -using System.Collections.Concurrent; -using Umbraco.Core.Models.Identity; -using Umbraco.Core.Persistence.Dtos; -using Umbraco.Infrastructure.Persistence.Mappers; +using Umbraco.Cms.Core.Models.Identity; +using Umbraco.Cms.Infrastructure.Persistence.Dtos; -namespace Umbraco.Core.Persistence.Mappers +namespace Umbraco.Cms.Infrastructure.Persistence.Mappers { [MapperFor(typeof(IIdentityUserLogin))] [MapperFor(typeof(IdentityUserLogin))] diff --git a/src/Umbraco.Infrastructure/Persistence/Mappers/IMapperCollection.cs b/src/Umbraco.Infrastructure/Persistence/Mappers/IMapperCollection.cs index 62d35c3eb8..110d65392c 100644 --- a/src/Umbraco.Infrastructure/Persistence/Mappers/IMapperCollection.cs +++ b/src/Umbraco.Infrastructure/Persistence/Mappers/IMapperCollection.cs @@ -1,7 +1,7 @@ using System; -using Umbraco.Core.Composing; +using Umbraco.Cms.Core.Composing; -namespace Umbraco.Core.Persistence.Mappers +namespace Umbraco.Cms.Infrastructure.Persistence.Mappers { public interface IMapperCollection : IBuilderCollection { diff --git a/src/Umbraco.Infrastructure/Persistence/Mappers/LanguageMapper.cs b/src/Umbraco.Infrastructure/Persistence/Mappers/LanguageMapper.cs index 38126b0328..d4313ad4d5 100644 --- a/src/Umbraco.Infrastructure/Persistence/Mappers/LanguageMapper.cs +++ b/src/Umbraco.Infrastructure/Persistence/Mappers/LanguageMapper.cs @@ -1,10 +1,8 @@ using System; -using System.Collections.Concurrent; -using Umbraco.Core.Models; -using Umbraco.Core.Persistence.Dtos; -using Umbraco.Infrastructure.Persistence.Mappers; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Infrastructure.Persistence.Dtos; -namespace Umbraco.Core.Persistence.Mappers +namespace Umbraco.Cms.Infrastructure.Persistence.Mappers { /// /// Represents a to DTO mapper used to translate the properties of the public api diff --git a/src/Umbraco.Infrastructure/Persistence/Mappers/MacroMapper.cs b/src/Umbraco.Infrastructure/Persistence/Mappers/MacroMapper.cs index 63980e8622..f40dbdd477 100644 --- a/src/Umbraco.Infrastructure/Persistence/Mappers/MacroMapper.cs +++ b/src/Umbraco.Infrastructure/Persistence/Mappers/MacroMapper.cs @@ -1,10 +1,8 @@ using System; -using System.Collections.Concurrent; -using Umbraco.Core.Models; -using Umbraco.Core.Persistence.Dtos; -using Umbraco.Infrastructure.Persistence.Mappers; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Infrastructure.Persistence.Dtos; -namespace Umbraco.Core.Persistence.Mappers +namespace Umbraco.Cms.Infrastructure.Persistence.Mappers { [MapperFor(typeof(Macro))] [MapperFor(typeof(IMacro))] diff --git a/src/Umbraco.Infrastructure/Persistence/Mappers/MapperCollection.cs b/src/Umbraco.Infrastructure/Persistence/Mappers/MapperCollection.cs index 20929dd188..a719308443 100644 --- a/src/Umbraco.Infrastructure/Persistence/Mappers/MapperCollection.cs +++ b/src/Umbraco.Infrastructure/Persistence/Mappers/MapperCollection.cs @@ -1,10 +1,10 @@ using System; using System.Collections.Concurrent; using System.Collections.Generic; -using System.Linq; -using Umbraco.Core.Composing; +using Umbraco.Cms.Core.Composing; +using Umbraco.Extensions; -namespace Umbraco.Core.Persistence.Mappers +namespace Umbraco.Cms.Infrastructure.Persistence.Mappers { public class MapperCollection : BuilderCollectionBase, IMapperCollection { diff --git a/src/Umbraco.Infrastructure/Persistence/Mappers/MapperCollectionBuilder.cs b/src/Umbraco.Infrastructure/Persistence/Mappers/MapperCollectionBuilder.cs index b5b295299d..c5f0814469 100644 --- a/src/Umbraco.Infrastructure/Persistence/Mappers/MapperCollectionBuilder.cs +++ b/src/Umbraco.Infrastructure/Persistence/Mappers/MapperCollectionBuilder.cs @@ -1,10 +1,7 @@ -using System; -using System.Collections.Concurrent; -using Microsoft.Extensions.DependencyInjection; -using Umbraco.Core.Composing; -using Umbraco.Infrastructure.Persistence.Mappers; +using Microsoft.Extensions.DependencyInjection; +using Umbraco.Cms.Core.Composing; -namespace Umbraco.Core.Persistence.Mappers +namespace Umbraco.Cms.Infrastructure.Persistence.Mappers { public class MapperCollectionBuilder : SetCollectionBuilderBase { diff --git a/src/Umbraco.Infrastructure/Persistence/Mappers/MapperConfigurationStore.cs b/src/Umbraco.Infrastructure/Persistence/Mappers/MapperConfigurationStore.cs index d7fec08be8..460e50677d 100644 --- a/src/Umbraco.Infrastructure/Persistence/Mappers/MapperConfigurationStore.cs +++ b/src/Umbraco.Infrastructure/Persistence/Mappers/MapperConfigurationStore.cs @@ -1,7 +1,7 @@ using System; using System.Collections.Concurrent; -namespace Umbraco.Infrastructure.Persistence.Mappers +namespace Umbraco.Cms.Infrastructure.Persistence.Mappers { public class MapperConfigurationStore : ConcurrentDictionary> { } diff --git a/src/Umbraco.Infrastructure/Persistence/Mappers/MapperForAttribute.cs b/src/Umbraco.Infrastructure/Persistence/Mappers/MapperForAttribute.cs index 146285fc43..5cdf4dfc63 100644 --- a/src/Umbraco.Infrastructure/Persistence/Mappers/MapperForAttribute.cs +++ b/src/Umbraco.Infrastructure/Persistence/Mappers/MapperForAttribute.cs @@ -1,6 +1,6 @@ using System; -namespace Umbraco.Core.Persistence.Mappers +namespace Umbraco.Cms.Infrastructure.Persistence.Mappers { /// /// An attribute used to decorate mappers to be associated with entities diff --git a/src/Umbraco.Infrastructure/Persistence/Mappers/MediaMapper.cs b/src/Umbraco.Infrastructure/Persistence/Mappers/MediaMapper.cs index 42568f2871..a2c5ff305b 100644 --- a/src/Umbraco.Infrastructure/Persistence/Mappers/MediaMapper.cs +++ b/src/Umbraco.Infrastructure/Persistence/Mappers/MediaMapper.cs @@ -1,17 +1,15 @@ using System; -using System.Collections.Concurrent; -using Umbraco.Core.Models; -using Umbraco.Core.Persistence.Dtos; -using Umbraco.Infrastructure.Persistence.Mappers; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Infrastructure.Persistence.Dtos; -namespace Umbraco.Core.Persistence.Mappers +namespace Umbraco.Cms.Infrastructure.Persistence.Mappers { /// - /// Represents a to DTO mapper used to translate the properties of the public api + /// Represents a to DTO mapper used to translate the properties of the public api /// implementation to that of the database's DTO as sql: [tableName].[columnName]. /// [MapperFor(typeof(IMedia))] - [MapperFor(typeof(Umbraco.Core.Models.Media))] + [MapperFor(typeof(Core.Models.Media))] public sealed class MediaMapper : BaseMapper { public MediaMapper(Lazy sqlContext, MapperConfigurationStore maps) @@ -20,21 +18,21 @@ namespace Umbraco.Core.Persistence.Mappers protected override void DefineMaps() { - DefineMap(nameof(Models.Media.Id), nameof(NodeDto.NodeId)); - DefineMap(nameof(Models.Media.Key), nameof(NodeDto.UniqueId)); + DefineMap(nameof(Core.Models.Media.Id), nameof(NodeDto.NodeId)); + DefineMap(nameof(Core.Models.Media.Key), nameof(NodeDto.UniqueId)); DefineMap(nameof(Content.VersionId), nameof(ContentVersionDto.Id)); - DefineMap(nameof(Models.Media.CreateDate), nameof(NodeDto.CreateDate)); - DefineMap(nameof(Models.Media.Level), nameof(NodeDto.Level)); - DefineMap(nameof(Models.Media.ParentId), nameof(NodeDto.ParentId)); - DefineMap(nameof(Models.Media.Path), nameof(NodeDto.Path)); - DefineMap(nameof(Models.Media.SortOrder), nameof(NodeDto.SortOrder)); - DefineMap(nameof(Models.Media.Name), nameof(NodeDto.Text)); - DefineMap(nameof(Models.Media.Trashed), nameof(NodeDto.Trashed)); - DefineMap(nameof(Models.Media.CreatorId), nameof(NodeDto.UserId)); - DefineMap(nameof(Models.Media.ContentTypeId), nameof(ContentDto.ContentTypeId)); - DefineMap(nameof(Models.Media.UpdateDate), nameof(ContentVersionDto.VersionDate)); + DefineMap(nameof(Core.Models.Media.CreateDate), nameof(NodeDto.CreateDate)); + DefineMap(nameof(Core.Models.Media.Level), nameof(NodeDto.Level)); + DefineMap(nameof(Core.Models.Media.ParentId), nameof(NodeDto.ParentId)); + DefineMap(nameof(Core.Models.Media.Path), nameof(NodeDto.Path)); + DefineMap(nameof(Core.Models.Media.SortOrder), nameof(NodeDto.SortOrder)); + DefineMap(nameof(Core.Models.Media.Name), nameof(NodeDto.Text)); + DefineMap(nameof(Core.Models.Media.Trashed), nameof(NodeDto.Trashed)); + DefineMap(nameof(Core.Models.Media.CreatorId), nameof(NodeDto.UserId)); + DefineMap(nameof(Core.Models.Media.ContentTypeId), nameof(ContentDto.ContentTypeId)); + DefineMap(nameof(Core.Models.Media.UpdateDate), nameof(ContentVersionDto.VersionDate)); } } } diff --git a/src/Umbraco.Infrastructure/Persistence/Mappers/MediaTypeMapper.cs b/src/Umbraco.Infrastructure/Persistence/Mappers/MediaTypeMapper.cs index e54ca9f35e..823ee7ce88 100644 --- a/src/Umbraco.Infrastructure/Persistence/Mappers/MediaTypeMapper.cs +++ b/src/Umbraco.Infrastructure/Persistence/Mappers/MediaTypeMapper.cs @@ -1,10 +1,8 @@ using System; -using System.Collections.Concurrent; -using Umbraco.Core.Models; -using Umbraco.Core.Persistence.Dtos; -using Umbraco.Infrastructure.Persistence.Mappers; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Infrastructure.Persistence.Dtos; -namespace Umbraco.Core.Persistence.Mappers +namespace Umbraco.Cms.Infrastructure.Persistence.Mappers { /// /// Represents a to DTO mapper used to translate the properties of the public api diff --git a/src/Umbraco.Infrastructure/Persistence/Mappers/MemberGroupMapper.cs b/src/Umbraco.Infrastructure/Persistence/Mappers/MemberGroupMapper.cs index 5d2a7b22a3..749335b0a2 100644 --- a/src/Umbraco.Infrastructure/Persistence/Mappers/MemberGroupMapper.cs +++ b/src/Umbraco.Infrastructure/Persistence/Mappers/MemberGroupMapper.cs @@ -1,10 +1,8 @@ using System; -using System.Collections.Concurrent; -using Umbraco.Core.Models; -using Umbraco.Core.Persistence.Dtos; -using Umbraco.Infrastructure.Persistence.Mappers; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Infrastructure.Persistence.Dtos; -namespace Umbraco.Core.Persistence.Mappers +namespace Umbraco.Cms.Infrastructure.Persistence.Mappers { [MapperFor(typeof (IMemberGroup))] [MapperFor(typeof (MemberGroup))] diff --git a/src/Umbraco.Infrastructure/Persistence/Mappers/MemberMapper.cs b/src/Umbraco.Infrastructure/Persistence/Mappers/MemberMapper.cs index 30e7502984..066f1584cd 100644 --- a/src/Umbraco.Infrastructure/Persistence/Mappers/MemberMapper.cs +++ b/src/Umbraco.Infrastructure/Persistence/Mappers/MemberMapper.cs @@ -1,11 +1,8 @@ using System; -using System.Collections.Concurrent; -using Umbraco.Core.Models; -using Umbraco.Core.Models.Entities; -using Umbraco.Core.Persistence.Dtos; -using Umbraco.Infrastructure.Persistence.Mappers; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Infrastructure.Persistence.Dtos; -namespace Umbraco.Core.Persistence.Mappers +namespace Umbraco.Cms.Infrastructure.Persistence.Mappers { /// /// Represents a to DTO mapper used to translate the properties of the public api diff --git a/src/Umbraco.Infrastructure/Persistence/Mappers/MemberTypeMapper.cs b/src/Umbraco.Infrastructure/Persistence/Mappers/MemberTypeMapper.cs index 3e675dc665..d23e219e24 100644 --- a/src/Umbraco.Infrastructure/Persistence/Mappers/MemberTypeMapper.cs +++ b/src/Umbraco.Infrastructure/Persistence/Mappers/MemberTypeMapper.cs @@ -1,10 +1,8 @@ using System; -using System.Collections.Concurrent; -using Umbraco.Core.Models; -using Umbraco.Core.Persistence.Dtos; -using Umbraco.Infrastructure.Persistence.Mappers; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Infrastructure.Persistence.Dtos; -namespace Umbraco.Core.Persistence.Mappers +namespace Umbraco.Cms.Infrastructure.Persistence.Mappers { /// /// Represents a to DTO mapper used to translate the properties of the public api diff --git a/src/Umbraco.Infrastructure/Persistence/Mappers/PocoMapper.cs b/src/Umbraco.Infrastructure/Persistence/Mappers/PocoMapper.cs index f531a684d7..835451755b 100644 --- a/src/Umbraco.Infrastructure/Persistence/Mappers/PocoMapper.cs +++ b/src/Umbraco.Infrastructure/Persistence/Mappers/PocoMapper.cs @@ -2,7 +2,7 @@ using System.Reflection; using NPoco; -namespace Umbraco.Core.Persistence.Mappers +namespace Umbraco.Cms.Infrastructure.Persistence.Mappers { /// /// Extends NPoco default mapper and ensures that nullable dates are not saved to the database. diff --git a/src/Umbraco.Infrastructure/Persistence/Mappers/PropertyGroupMapper.cs b/src/Umbraco.Infrastructure/Persistence/Mappers/PropertyGroupMapper.cs index 4b85b8167e..96a63450c9 100644 --- a/src/Umbraco.Infrastructure/Persistence/Mappers/PropertyGroupMapper.cs +++ b/src/Umbraco.Infrastructure/Persistence/Mappers/PropertyGroupMapper.cs @@ -1,10 +1,8 @@ using System; -using System.Collections.Concurrent; -using Umbraco.Core.Models; -using Umbraco.Core.Persistence.Dtos; -using Umbraco.Infrastructure.Persistence.Mappers; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Infrastructure.Persistence.Dtos; -namespace Umbraco.Core.Persistence.Mappers +namespace Umbraco.Cms.Infrastructure.Persistence.Mappers { /// /// Represents a to DTO mapper used to translate the properties of the public api diff --git a/src/Umbraco.Infrastructure/Persistence/Mappers/PropertyMapper.cs b/src/Umbraco.Infrastructure/Persistence/Mappers/PropertyMapper.cs index 436a5bf3c4..08ca8d6a13 100644 --- a/src/Umbraco.Infrastructure/Persistence/Mappers/PropertyMapper.cs +++ b/src/Umbraco.Infrastructure/Persistence/Mappers/PropertyMapper.cs @@ -1,10 +1,8 @@ using System; -using System.Collections.Concurrent; -using Umbraco.Core.Models; -using Umbraco.Core.Persistence.Dtos; -using Umbraco.Infrastructure.Persistence.Mappers; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Infrastructure.Persistence.Dtos; -namespace Umbraco.Core.Persistence.Mappers +namespace Umbraco.Cms.Infrastructure.Persistence.Mappers { [MapperFor(typeof(Property))] public sealed class PropertyMapper : BaseMapper diff --git a/src/Umbraco.Infrastructure/Persistence/Mappers/PropertyTypeMapper.cs b/src/Umbraco.Infrastructure/Persistence/Mappers/PropertyTypeMapper.cs index 6892a26d91..3da3d16fcb 100644 --- a/src/Umbraco.Infrastructure/Persistence/Mappers/PropertyTypeMapper.cs +++ b/src/Umbraco.Infrastructure/Persistence/Mappers/PropertyTypeMapper.cs @@ -1,10 +1,8 @@ using System; -using System.Collections.Concurrent; -using Umbraco.Core.Models; -using Umbraco.Core.Persistence.Dtos; -using Umbraco.Infrastructure.Persistence.Mappers; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Infrastructure.Persistence.Dtos; -namespace Umbraco.Core.Persistence.Mappers +namespace Umbraco.Cms.Infrastructure.Persistence.Mappers { /// /// Represents a to DTO mapper used to translate the properties of the public api diff --git a/src/Umbraco.Infrastructure/Persistence/Mappers/RelationMapper.cs b/src/Umbraco.Infrastructure/Persistence/Mappers/RelationMapper.cs index 22ac0a5583..e75492be18 100644 --- a/src/Umbraco.Infrastructure/Persistence/Mappers/RelationMapper.cs +++ b/src/Umbraco.Infrastructure/Persistence/Mappers/RelationMapper.cs @@ -1,10 +1,8 @@ using System; -using System.Collections.Concurrent; -using Umbraco.Core.Models; -using Umbraco.Core.Persistence.Dtos; -using Umbraco.Infrastructure.Persistence.Mappers; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Infrastructure.Persistence.Dtos; -namespace Umbraco.Core.Persistence.Mappers +namespace Umbraco.Cms.Infrastructure.Persistence.Mappers { /// /// Represents a to DTO mapper used to translate the properties of the public api diff --git a/src/Umbraco.Infrastructure/Persistence/Mappers/RelationTypeMapper.cs b/src/Umbraco.Infrastructure/Persistence/Mappers/RelationTypeMapper.cs index 15b23f27e5..965a659631 100644 --- a/src/Umbraco.Infrastructure/Persistence/Mappers/RelationTypeMapper.cs +++ b/src/Umbraco.Infrastructure/Persistence/Mappers/RelationTypeMapper.cs @@ -1,10 +1,8 @@ using System; -using System.Collections.Concurrent; -using Umbraco.Core.Models; -using Umbraco.Core.Persistence.Dtos; -using Umbraco.Infrastructure.Persistence.Mappers; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Infrastructure.Persistence.Dtos; -namespace Umbraco.Core.Persistence.Mappers +namespace Umbraco.Cms.Infrastructure.Persistence.Mappers { /// /// Represents a to DTO mapper used to translate the properties of the public api diff --git a/src/Umbraco.Infrastructure/Persistence/Mappers/ServerRegistrationMapper.cs b/src/Umbraco.Infrastructure/Persistence/Mappers/ServerRegistrationMapper.cs index 81f495740d..f35116ee81 100644 --- a/src/Umbraco.Infrastructure/Persistence/Mappers/ServerRegistrationMapper.cs +++ b/src/Umbraco.Infrastructure/Persistence/Mappers/ServerRegistrationMapper.cs @@ -1,10 +1,8 @@ using System; -using System.Collections.Concurrent; -using Umbraco.Core.Models; -using Umbraco.Core.Persistence.Dtos; -using Umbraco.Infrastructure.Persistence.Mappers; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Infrastructure.Persistence.Dtos; -namespace Umbraco.Core.Persistence.Mappers +namespace Umbraco.Cms.Infrastructure.Persistence.Mappers { [MapperFor(typeof(ServerRegistration))] [MapperFor(typeof(IServerRegistration))] diff --git a/src/Umbraco.Infrastructure/Persistence/Mappers/SimpleContentTypeMapper.cs b/src/Umbraco.Infrastructure/Persistence/Mappers/SimpleContentTypeMapper.cs index 75dd18c228..b2bcc6098a 100644 --- a/src/Umbraco.Infrastructure/Persistence/Mappers/SimpleContentTypeMapper.cs +++ b/src/Umbraco.Infrastructure/Persistence/Mappers/SimpleContentTypeMapper.cs @@ -1,10 +1,8 @@ using System; -using System.Collections.Concurrent; -using Umbraco.Core.Models; -using Umbraco.Core.Persistence.Dtos; -using Umbraco.Infrastructure.Persistence.Mappers; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Infrastructure.Persistence.Dtos; -namespace Umbraco.Core.Persistence.Mappers +namespace Umbraco.Cms.Infrastructure.Persistence.Mappers { // TODO: This mapper is actually very useless because the only time it would ever be used is when trying to generate a strongly typed query // on an IContentBase object which is what exposes ISimpleContentType, however the queries that we execute in the content repositories don't actually diff --git a/src/Umbraco.Infrastructure/Persistence/Mappers/TagMapper.cs b/src/Umbraco.Infrastructure/Persistence/Mappers/TagMapper.cs index 306f69e6f1..8c6df88a4d 100644 --- a/src/Umbraco.Infrastructure/Persistence/Mappers/TagMapper.cs +++ b/src/Umbraco.Infrastructure/Persistence/Mappers/TagMapper.cs @@ -1,10 +1,8 @@ using System; -using System.Collections.Concurrent; -using Umbraco.Core.Models; -using Umbraco.Core.Persistence.Dtos; -using Umbraco.Infrastructure.Persistence.Mappers; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Infrastructure.Persistence.Dtos; -namespace Umbraco.Core.Persistence.Mappers +namespace Umbraco.Cms.Infrastructure.Persistence.Mappers { /// /// Represents a to DTO mapper used to translate the properties of the public api diff --git a/src/Umbraco.Infrastructure/Persistence/Mappers/TemplateMapper.cs b/src/Umbraco.Infrastructure/Persistence/Mappers/TemplateMapper.cs index c2e30e485f..f2c8627cc9 100644 --- a/src/Umbraco.Infrastructure/Persistence/Mappers/TemplateMapper.cs +++ b/src/Umbraco.Infrastructure/Persistence/Mappers/TemplateMapper.cs @@ -1,10 +1,8 @@ using System; -using System.Collections.Concurrent; -using Umbraco.Core.Models; -using Umbraco.Core.Persistence.Dtos; -using Umbraco.Infrastructure.Persistence.Mappers; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Infrastructure.Persistence.Dtos; -namespace Umbraco.Core.Persistence.Mappers +namespace Umbraco.Cms.Infrastructure.Persistence.Mappers { /// /// Represents a to DTO mapper used to translate the properties of the public api diff --git a/src/Umbraco.Infrastructure/Persistence/Mappers/UmbracoEntityMapper.cs b/src/Umbraco.Infrastructure/Persistence/Mappers/UmbracoEntityMapper.cs index 776443cbd9..5f60861667 100644 --- a/src/Umbraco.Infrastructure/Persistence/Mappers/UmbracoEntityMapper.cs +++ b/src/Umbraco.Infrastructure/Persistence/Mappers/UmbracoEntityMapper.cs @@ -1,10 +1,8 @@ using System; -using System.Collections.Concurrent; -using Umbraco.Core.Models.Entities; -using Umbraco.Core.Persistence.Dtos; -using Umbraco.Infrastructure.Persistence.Mappers; +using Umbraco.Cms.Core.Models.Entities; +using Umbraco.Cms.Infrastructure.Persistence.Dtos; -namespace Umbraco.Core.Persistence.Mappers +namespace Umbraco.Cms.Infrastructure.Persistence.Mappers { [MapperFor(typeof (IUmbracoEntity))] public sealed class UmbracoEntityMapper : BaseMapper diff --git a/src/Umbraco.Infrastructure/Persistence/Mappers/UserGroupMapper.cs b/src/Umbraco.Infrastructure/Persistence/Mappers/UserGroupMapper.cs index addafc5f11..51f4d0bbcc 100644 --- a/src/Umbraco.Infrastructure/Persistence/Mappers/UserGroupMapper.cs +++ b/src/Umbraco.Infrastructure/Persistence/Mappers/UserGroupMapper.cs @@ -1,10 +1,8 @@ using System; -using System.Collections.Concurrent; -using Umbraco.Core.Models.Membership; -using Umbraco.Core.Persistence.Dtos; -using Umbraco.Infrastructure.Persistence.Mappers; +using Umbraco.Cms.Core.Models.Membership; +using Umbraco.Cms.Infrastructure.Persistence.Dtos; -namespace Umbraco.Core.Persistence.Mappers +namespace Umbraco.Cms.Infrastructure.Persistence.Mappers { /// /// Represents a to DTO mapper used to translate the properties of the public api diff --git a/src/Umbraco.Infrastructure/Persistence/Mappers/UserMapper.cs b/src/Umbraco.Infrastructure/Persistence/Mappers/UserMapper.cs index 8af6479362..53c229c935 100644 --- a/src/Umbraco.Infrastructure/Persistence/Mappers/UserMapper.cs +++ b/src/Umbraco.Infrastructure/Persistence/Mappers/UserMapper.cs @@ -1,10 +1,8 @@ using System; -using System.Collections.Concurrent; -using Umbraco.Core.Models.Membership; -using Umbraco.Core.Persistence.Dtos; -using Umbraco.Infrastructure.Persistence.Mappers; +using Umbraco.Cms.Core.Models.Membership; +using Umbraco.Cms.Infrastructure.Persistence.Dtos; -namespace Umbraco.Core.Persistence.Mappers +namespace Umbraco.Cms.Infrastructure.Persistence.Mappers { [MapperFor(typeof(IUser))] [MapperFor(typeof(User))] diff --git a/src/Umbraco.Infrastructure/Persistence/Mappers/UserSectionMapper.cs b/src/Umbraco.Infrastructure/Persistence/Mappers/UserSectionMapper.cs index 9600fd1329..86aeed4b7e 100644 --- a/src/Umbraco.Infrastructure/Persistence/Mappers/UserSectionMapper.cs +++ b/src/Umbraco.Infrastructure/Persistence/Mappers/UserSectionMapper.cs @@ -1,7 +1,4 @@ -using System.Collections.Concurrent; -using Umbraco.Core.Models; - -namespace Umbraco.Core.Persistence.Mappers +namespace Umbraco.Cms.Infrastructure.Persistence.Mappers { //[MapperFor(typeof(UserSection))] //public sealed class UserSectionMapper : BaseMapper diff --git a/src/Umbraco.Infrastructure/Persistence/NPocoDatabaseExtensions-Bulk.cs b/src/Umbraco.Infrastructure/Persistence/NPocoDatabaseExtensions-Bulk.cs index 6a7716ded7..443032c67a 100644 --- a/src/Umbraco.Infrastructure/Persistence/NPocoDatabaseExtensions-Bulk.cs +++ b/src/Umbraco.Infrastructure/Persistence/NPocoDatabaseExtensions-Bulk.cs @@ -4,9 +4,9 @@ using System.Data; using System.Data.SqlClient; using System.Linq; using NPoco; -using Umbraco.Core.Persistence.SqlSyntax; +using Umbraco.Cms.Infrastructure.Persistence; -namespace Umbraco.Core.Persistence +namespace Umbraco.Extensions { /// /// Provides extension methods to NPoco Database class. diff --git a/src/Umbraco.Infrastructure/Persistence/NPocoDatabaseExtensions.cs b/src/Umbraco.Infrastructure/Persistence/NPocoDatabaseExtensions.cs index 6c9fff8798..8f32ad6d72 100644 --- a/src/Umbraco.Infrastructure/Persistence/NPocoDatabaseExtensions.cs +++ b/src/Umbraco.Infrastructure/Persistence/NPocoDatabaseExtensions.cs @@ -5,10 +5,11 @@ using System.Data.SqlClient; using System.Text.RegularExpressions; using NPoco; using StackExchange.Profiling.Data; -using Umbraco.Core.Persistence.FaultHandling; -using Umbraco.Core.Persistence.SqlSyntax; +using Umbraco.Cms.Infrastructure.Persistence; +using Umbraco.Cms.Infrastructure.Persistence.FaultHandling; +using Umbraco.Cms.Infrastructure.Persistence.SqlSyntax; -namespace Umbraco.Core.Persistence +namespace Umbraco.Extensions { /// /// Provides extension methods to NPoco Database class. diff --git a/src/Umbraco.Infrastructure/Persistence/NPocoDatabaseTypeExtensions.cs b/src/Umbraco.Infrastructure/Persistence/NPocoDatabaseTypeExtensions.cs index 70909e2874..d692656f0f 100644 --- a/src/Umbraco.Infrastructure/Persistence/NPocoDatabaseTypeExtensions.cs +++ b/src/Umbraco.Infrastructure/Persistence/NPocoDatabaseTypeExtensions.cs @@ -1,6 +1,6 @@ using NPoco; -namespace Umbraco.Core.Persistence +namespace Umbraco.Cms.Infrastructure.Persistence { internal static class NPocoDatabaseTypeExtensions { diff --git a/src/Umbraco.Infrastructure/Persistence/NPocoSqlExtensions.cs b/src/Umbraco.Infrastructure/Persistence/NPocoSqlExtensions.cs index c8c1aba75c..efe52b0271 100644 --- a/src/Umbraco.Infrastructure/Persistence/NPocoSqlExtensions.cs +++ b/src/Umbraco.Infrastructure/Persistence/NPocoSqlExtensions.cs @@ -7,13 +7,14 @@ using System.Reflection; using System.Text; using System.Text.RegularExpressions; using NPoco; -using Umbraco.Core.Persistence.Querying; +using Umbraco.Cms.Core; +using Umbraco.Cms.Infrastructure.Persistence; +using Umbraco.Cms.Infrastructure.Persistence.Querying; -namespace Umbraco.Core.Persistence +namespace Umbraco.Extensions { public static partial class NPocoSqlExtensions { - #region Where /// diff --git a/src/Umbraco.Infrastructure/Persistence/NoopEmbeddedDatabaseCreator.cs b/src/Umbraco.Infrastructure/Persistence/NoopEmbeddedDatabaseCreator.cs index 8c89f1468f..fd378d44bc 100644 --- a/src/Umbraco.Infrastructure/Persistence/NoopEmbeddedDatabaseCreator.cs +++ b/src/Umbraco.Infrastructure/Persistence/NoopEmbeddedDatabaseCreator.cs @@ -1,8 +1,8 @@ -namespace Umbraco.Core.Persistence +namespace Umbraco.Cms.Infrastructure.Persistence { public class NoopEmbeddedDatabaseCreator : IEmbeddedDatabaseCreator { - public string ProviderName => Constants.DatabaseProviders.SqlServer; + public string ProviderName => Cms.Core.Constants.DatabaseProviders.SqlServer; public string ConnectionString { get; set; } diff --git a/src/Umbraco.Infrastructure/Persistence/PocoDataDataReader.cs b/src/Umbraco.Infrastructure/Persistence/PocoDataDataReader.cs index 460a4d3d90..71e22a4837 100644 --- a/src/Umbraco.Infrastructure/Persistence/PocoDataDataReader.cs +++ b/src/Umbraco.Infrastructure/Persistence/PocoDataDataReader.cs @@ -3,11 +3,11 @@ using System.Collections.Generic; using System.Data; using System.Linq; using NPoco; -using Umbraco.Core.Persistence.DatabaseAnnotations; -using Umbraco.Core.Persistence.DatabaseModelDefinitions; -using Umbraco.Core.Persistence.SqlSyntax; +using Umbraco.Cms.Infrastructure.Persistence.DatabaseAnnotations; +using Umbraco.Cms.Infrastructure.Persistence.DatabaseModelDefinitions; +using Umbraco.Cms.Infrastructure.Persistence.SqlSyntax; -namespace Umbraco.Core.Persistence +namespace Umbraco.Cms.Infrastructure.Persistence { /// /// A data reader used for reading collections of PocoData entity types diff --git a/src/Umbraco.Infrastructure/Persistence/Querying/CachedExpression.cs b/src/Umbraco.Infrastructure/Persistence/Querying/CachedExpression.cs index 76547265b9..ba02920de0 100644 --- a/src/Umbraco.Infrastructure/Persistence/Querying/CachedExpression.cs +++ b/src/Umbraco.Infrastructure/Persistence/Querying/CachedExpression.cs @@ -1,7 +1,7 @@ using System; using System.Linq.Expressions; -namespace Umbraco.Core.Persistence.Querying +namespace Umbraco.Cms.Infrastructure.Persistence.Querying { /// /// Represents an expression which caches the visitor's result. diff --git a/src/Umbraco.Infrastructure/Persistence/Querying/ExpressionVisitorBase.cs b/src/Umbraco.Infrastructure/Persistence/Querying/ExpressionVisitorBase.cs index 91844430a9..6e08bad7c3 100644 --- a/src/Umbraco.Infrastructure/Persistence/Querying/ExpressionVisitorBase.cs +++ b/src/Umbraco.Infrastructure/Persistence/Querying/ExpressionVisitorBase.cs @@ -5,10 +5,12 @@ using System.Collections.ObjectModel; using System.Linq; using System.Linq.Expressions; using System.Text; -using Umbraco.Core.Persistence.SqlSyntax; -using Umbraco.Core.Composing; +using Umbraco.Cms.Core.Composing; +using Umbraco.Cms.Core.Persistence; +using Umbraco.Cms.Infrastructure.Persistence.SqlSyntax; +using Umbraco.Extensions; -namespace Umbraco.Core.Persistence.Querying +namespace Umbraco.Cms.Infrastructure.Persistence.Querying { // TODO: are we basically duplicating entire parts of NPoco just because of SqlSyntax ?! // try to use NPoco's version ! diff --git a/src/Umbraco.Infrastructure/Persistence/Querying/ModelToSqlExpressionVisitor.cs b/src/Umbraco.Infrastructure/Persistence/Querying/ModelToSqlExpressionVisitor.cs index 7ff536caba..5b83c1915f 100644 --- a/src/Umbraco.Infrastructure/Persistence/Querying/ModelToSqlExpressionVisitor.cs +++ b/src/Umbraco.Infrastructure/Persistence/Querying/ModelToSqlExpressionVisitor.cs @@ -1,11 +1,10 @@ using System; using System.Linq.Expressions; -using Umbraco.Core.Persistence.Mappers; -using Umbraco.Core.Persistence.SqlSyntax; -using Umbraco.Core.Composing; -using Umbraco.Core.Models.Entities; +using Umbraco.Cms.Infrastructure.Persistence.Mappers; +using Umbraco.Cms.Infrastructure.Persistence.SqlSyntax; +using Umbraco.Extensions; -namespace Umbraco.Core.Persistence.Querying +namespace Umbraco.Cms.Infrastructure.Persistence.Querying { /// /// An expression tree parser to create SQL statements and SQL parameters based on a strongly typed expression, diff --git a/src/Umbraco.Infrastructure/Persistence/Querying/PocoToSqlExpressionVisitor.cs b/src/Umbraco.Infrastructure/Persistence/Querying/PocoToSqlExpressionVisitor.cs index 971b65c220..3d07e8324b 100644 --- a/src/Umbraco.Infrastructure/Persistence/Querying/PocoToSqlExpressionVisitor.cs +++ b/src/Umbraco.Infrastructure/Persistence/Querying/PocoToSqlExpressionVisitor.cs @@ -3,7 +3,7 @@ using System.Linq; using System.Linq.Expressions; using NPoco; -namespace Umbraco.Core.Persistence.Querying +namespace Umbraco.Cms.Infrastructure.Persistence.Querying { /// /// Represents an expression tree parser used to turn strongly typed expressions into SQL statements. diff --git a/src/Umbraco.Infrastructure/Persistence/Querying/Query.cs b/src/Umbraco.Infrastructure/Persistence/Querying/Query.cs index c7ade3b416..8089b21cc1 100644 --- a/src/Umbraco.Infrastructure/Persistence/Querying/Query.cs +++ b/src/Umbraco.Infrastructure/Persistence/Querying/Query.cs @@ -4,8 +4,9 @@ using System.Collections.Generic; using System.Linq.Expressions; using System.Text; using NPoco; +using Umbraco.Cms.Core.Persistence.Querying; -namespace Umbraco.Core.Persistence.Querying +namespace Umbraco.Cms.Infrastructure.Persistence.Querying { /// /// Represents a query builder. diff --git a/src/Umbraco.Infrastructure/Persistence/Querying/QueryExtensions.cs b/src/Umbraco.Infrastructure/Persistence/Querying/QueryExtensions.cs index c6a0131f9c..6abb97a554 100644 --- a/src/Umbraco.Infrastructure/Persistence/Querying/QueryExtensions.cs +++ b/src/Umbraco.Infrastructure/Persistence/Querying/QueryExtensions.cs @@ -1,7 +1,8 @@ using System; using System.Collections.Generic; +using Umbraco.Cms.Core.Persistence.Querying; -namespace Umbraco.Core.Persistence.Querying +namespace Umbraco.Cms.Infrastructure.Persistence.Querying { /// /// SD: This is a horrible hack but unless we break compatibility with anyone who's actually implemented IQuery{T} there's not much we can do. diff --git a/src/Umbraco.Infrastructure/Persistence/Querying/SqlExpressionExtensions.cs b/src/Umbraco.Infrastructure/Persistence/Querying/SqlExpressionExtensions.cs index 710997472c..03c5acf92f 100644 --- a/src/Umbraco.Infrastructure/Persistence/Querying/SqlExpressionExtensions.cs +++ b/src/Umbraco.Infrastructure/Persistence/Querying/SqlExpressionExtensions.cs @@ -1,8 +1,9 @@ using System.Collections.Generic; using System.Linq; using System.Text.RegularExpressions; +using Umbraco.Extensions; -namespace Umbraco.Core.Persistence.Querying +namespace Umbraco.Cms.Infrastructure.Persistence.Querying { /// /// String extension methods used specifically to translate into SQL diff --git a/src/Umbraco.Infrastructure/Persistence/Querying/SqlTranslator.cs b/src/Umbraco.Infrastructure/Persistence/Querying/SqlTranslator.cs index 880a95b31f..5f6e06884b 100644 --- a/src/Umbraco.Infrastructure/Persistence/Querying/SqlTranslator.cs +++ b/src/Umbraco.Infrastructure/Persistence/Querying/SqlTranslator.cs @@ -1,7 +1,8 @@ using System; using NPoco; +using Umbraco.Cms.Core.Persistence.Querying; -namespace Umbraco.Core.Persistence.Querying +namespace Umbraco.Cms.Infrastructure.Persistence.Querying { /// /// Represents the Sql Translator for translating a IQuery object to Sql diff --git a/src/Umbraco.Infrastructure/Persistence/Querying/TextColumnType.cs b/src/Umbraco.Infrastructure/Persistence/Querying/TextColumnType.cs index b6ba94f7b9..befc1be79f 100644 --- a/src/Umbraco.Infrastructure/Persistence/Querying/TextColumnType.cs +++ b/src/Umbraco.Infrastructure/Persistence/Querying/TextColumnType.cs @@ -1,4 +1,4 @@ -namespace Umbraco.Core.Persistence.Querying +namespace Umbraco.Cms.Infrastructure.Persistence.Querying { public enum TextColumnType { diff --git a/src/Umbraco.Infrastructure/Persistence/RecordPersistenceType.cs b/src/Umbraco.Infrastructure/Persistence/RecordPersistenceType.cs index 8fd29aabaf..3162f58d1e 100644 --- a/src/Umbraco.Infrastructure/Persistence/RecordPersistenceType.cs +++ b/src/Umbraco.Infrastructure/Persistence/RecordPersistenceType.cs @@ -1,4 +1,4 @@ -namespace Umbraco.Core.Persistence +namespace Umbraco.Cms.Infrastructure.Persistence { public enum RecordPersistenceType { diff --git a/src/Umbraco.Infrastructure/Persistence/Repositories/IContentRepository.cs b/src/Umbraco.Infrastructure/Persistence/Repositories/IContentRepository.cs index ad9e2d27c1..dca545d197 100644 --- a/src/Umbraco.Infrastructure/Persistence/Repositories/IContentRepository.cs +++ b/src/Umbraco.Infrastructure/Persistence/Repositories/IContentRepository.cs @@ -1,12 +1,11 @@ using System; using System.Collections.Generic; -using Umbraco.Core.Models; -using Umbraco.Core.Models.Entities; -using Umbraco.Core.Persistence.DatabaseModelDefinitions; -using Umbraco.Core.Persistence.Querying; -using Umbraco.Core.Services; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Core.Models.Entities; +using Umbraco.Cms.Core.Persistence.Querying; +using Umbraco.Cms.Core.Services; -namespace Umbraco.Core.Persistence.Repositories +namespace Umbraco.Cms.Core.Persistence.Repositories { /// /// Defines the base implementation of a repository for content items. diff --git a/src/Umbraco.Infrastructure/Persistence/Repositories/IContentTypeRepository.cs b/src/Umbraco.Infrastructure/Persistence/Repositories/IContentTypeRepository.cs index 203db8df93..148132dc29 100644 --- a/src/Umbraco.Infrastructure/Persistence/Repositories/IContentTypeRepository.cs +++ b/src/Umbraco.Infrastructure/Persistence/Repositories/IContentTypeRepository.cs @@ -1,9 +1,9 @@ using System; using System.Collections.Generic; -using Umbraco.Core.Models; -using Umbraco.Core.Persistence.Querying; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Core.Persistence.Querying; -namespace Umbraco.Core.Persistence.Repositories +namespace Umbraco.Cms.Core.Persistence.Repositories { public interface IContentTypeRepository : IContentTypeRepositoryBase { diff --git a/src/Umbraco.Infrastructure/Persistence/Repositories/IContentTypeRepositoryBase.cs b/src/Umbraco.Infrastructure/Persistence/Repositories/IContentTypeRepositoryBase.cs index 4020244733..e7336156de 100644 --- a/src/Umbraco.Infrastructure/Persistence/Repositories/IContentTypeRepositoryBase.cs +++ b/src/Umbraco.Infrastructure/Persistence/Repositories/IContentTypeRepositoryBase.cs @@ -1,9 +1,12 @@ -using System; -using System.Collections.Generic; -using Umbraco.Core.Events; -using Umbraco.Core.Models; +// Copyright (c) Umbraco. +// See LICENSE for more details. -namespace Umbraco.Core.Persistence.Repositories +using System; +using System.Collections.Generic; +using Umbraco.Cms.Core.Events; +using Umbraco.Cms.Core.Models; + +namespace Umbraco.Cms.Core.Persistence.Repositories { public interface IContentTypeRepositoryBase : IReadWriteQueryRepository, IReadRepository where TItem : IContentTypeComposition diff --git a/src/Umbraco.Infrastructure/Persistence/Repositories/IDataTypeRepository.cs b/src/Umbraco.Infrastructure/Persistence/Repositories/IDataTypeRepository.cs index 3a44cb10b4..108a0d5dc2 100644 --- a/src/Umbraco.Infrastructure/Persistence/Repositories/IDataTypeRepository.cs +++ b/src/Umbraco.Infrastructure/Persistence/Repositories/IDataTypeRepository.cs @@ -1,8 +1,8 @@ using System.Collections.Generic; -using Umbraco.Core.Events; -using Umbraco.Core.Models; +using Umbraco.Cms.Core.Events; +using Umbraco.Cms.Core.Models; -namespace Umbraco.Core.Persistence.Repositories +namespace Umbraco.Cms.Core.Persistence.Repositories { public interface IDataTypeRepository : IReadWriteQueryRepository { diff --git a/src/Umbraco.Infrastructure/Persistence/Repositories/IDocumentBlueprintRepository.cs b/src/Umbraco.Infrastructure/Persistence/Repositories/IDocumentBlueprintRepository.cs index 0148a882fd..e5e6e0f418 100644 --- a/src/Umbraco.Infrastructure/Persistence/Repositories/IDocumentBlueprintRepository.cs +++ b/src/Umbraco.Infrastructure/Persistence/Repositories/IDocumentBlueprintRepository.cs @@ -1,4 +1,4 @@ -namespace Umbraco.Core.Persistence.Repositories +namespace Umbraco.Cms.Core.Persistence.Repositories { public interface IDocumentBlueprintRepository : IDocumentRepository { } diff --git a/src/Umbraco.Infrastructure/Persistence/Repositories/IDocumentRepository.cs b/src/Umbraco.Infrastructure/Persistence/Repositories/IDocumentRepository.cs index 0971b2047a..d49e7402ba 100644 --- a/src/Umbraco.Infrastructure/Persistence/Repositories/IDocumentRepository.cs +++ b/src/Umbraco.Infrastructure/Persistence/Repositories/IDocumentRepository.cs @@ -1,9 +1,9 @@ using System; using System.Collections.Generic; -using Umbraco.Core.Models; -using Umbraco.Core.Models.Membership; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Core.Models.Membership; -namespace Umbraco.Core.Persistence.Repositories +namespace Umbraco.Cms.Core.Persistence.Repositories { public interface IDocumentRepository : IContentRepository, IReadRepository { @@ -67,7 +67,7 @@ namespace Umbraco.Core.Persistence.Repositories /// /// EntityPermissionCollection GetPermissionsForEntity(int entityId); - + /// /// Used to add/update a permission for a content item /// diff --git a/src/Umbraco.Infrastructure/Persistence/Repositories/IEntityRepository.cs b/src/Umbraco.Infrastructure/Persistence/Repositories/IEntityRepository.cs index a0ddcac8e6..a0bfdd8a53 100644 --- a/src/Umbraco.Infrastructure/Persistence/Repositories/IEntityRepository.cs +++ b/src/Umbraco.Infrastructure/Persistence/Repositories/IEntityRepository.cs @@ -1,13 +1,13 @@ -using NPoco; -using System; +using System; using System.Collections.Generic; -using Umbraco.Core.Models; -using Umbraco.Core.Models.Entities; -using Umbraco.Core.Persistence.DatabaseModelDefinitions; -using Umbraco.Core.Persistence.Querying; -using Umbraco.Core.Services; +using NPoco; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Core.Models.Entities; +using Umbraco.Cms.Core.Persistence.Querying; +using Umbraco.Cms.Core.Services; +using Umbraco.Cms.Infrastructure.Persistence; -namespace Umbraco.Core.Persistence.Repositories +namespace Umbraco.Cms.Core.Persistence.Repositories { public interface IEntityRepository : IRepository { @@ -16,7 +16,7 @@ namespace Umbraco.Core.Persistence.Repositories IEntitySlim Get(int id, Guid objectTypeId); IEntitySlim Get(Guid key, Guid objectTypeId); - IEnumerable GetAll(Guid objectType, params int[] ids); + IEnumerable GetAll(Guid objectType, params int[] ids); IEnumerable GetAll(Guid objectType, params Guid[] keys); /// @@ -78,6 +78,6 @@ namespace Umbraco.Core.Persistence.Repositories IEnumerable GetPagedResultsByQuery(IQuery query, Guid objectType, long pageIndex, int pageSize, out long totalRecords, IQuery filter, Ordering ordering); - + } } diff --git a/src/Umbraco.Infrastructure/Persistence/Repositories/IMediaRepository.cs b/src/Umbraco.Infrastructure/Persistence/Repositories/IMediaRepository.cs index d4ec08a0df..0ed7dc7297 100644 --- a/src/Umbraco.Infrastructure/Persistence/Repositories/IMediaRepository.cs +++ b/src/Umbraco.Infrastructure/Persistence/Repositories/IMediaRepository.cs @@ -1,7 +1,7 @@ using System; -using Umbraco.Core.Models; +using Umbraco.Cms.Core.Models; -namespace Umbraco.Core.Persistence.Repositories +namespace Umbraco.Cms.Core.Persistence.Repositories { public interface IMediaRepository : IContentRepository, IReadRepository { diff --git a/src/Umbraco.Infrastructure/Persistence/Repositories/IMediaTypeRepository.cs b/src/Umbraco.Infrastructure/Persistence/Repositories/IMediaTypeRepository.cs index fbaff4f510..2a1168ae57 100644 --- a/src/Umbraco.Infrastructure/Persistence/Repositories/IMediaTypeRepository.cs +++ b/src/Umbraco.Infrastructure/Persistence/Repositories/IMediaTypeRepository.cs @@ -1,7 +1,6 @@ -using System.Collections.Generic; -using Umbraco.Core.Models; +using Umbraco.Cms.Core.Models; -namespace Umbraco.Core.Persistence.Repositories +namespace Umbraco.Cms.Core.Persistence.Repositories { public interface IMediaTypeRepository : IContentTypeRepositoryBase { } diff --git a/src/Umbraco.Infrastructure/Persistence/Repositories/IMemberRepository.cs b/src/Umbraco.Infrastructure/Persistence/Repositories/IMemberRepository.cs index c737c2bf66..24899a5759 100644 --- a/src/Umbraco.Infrastructure/Persistence/Repositories/IMemberRepository.cs +++ b/src/Umbraco.Infrastructure/Persistence/Repositories/IMemberRepository.cs @@ -1,9 +1,9 @@ using System; using System.Collections.Generic; -using Umbraco.Core.Models; -using Umbraco.Core.Persistence.Querying; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Core.Persistence.Querying; -namespace Umbraco.Core.Persistence.Repositories +namespace Umbraco.Cms.Core.Persistence.Repositories { public interface IMemberRepository : IContentRepository { diff --git a/src/Umbraco.Infrastructure/Persistence/Repositories/IMemberTypeRepository.cs b/src/Umbraco.Infrastructure/Persistence/Repositories/IMemberTypeRepository.cs index 3b78d9de57..0b31f0ba46 100644 --- a/src/Umbraco.Infrastructure/Persistence/Repositories/IMemberTypeRepository.cs +++ b/src/Umbraco.Infrastructure/Persistence/Repositories/IMemberTypeRepository.cs @@ -1,6 +1,6 @@ -using Umbraco.Core.Models; +using Umbraco.Cms.Core.Models; -namespace Umbraco.Core.Persistence.Repositories +namespace Umbraco.Cms.Core.Persistence.Repositories { public interface IMemberTypeRepository : IContentTypeRepositoryBase { } diff --git a/src/Umbraco.Infrastructure/Persistence/Repositories/IPublicAccessRepository.cs b/src/Umbraco.Infrastructure/Persistence/Repositories/IPublicAccessRepository.cs index 8ed8b17114..2190782d3b 100644 --- a/src/Umbraco.Infrastructure/Persistence/Repositories/IPublicAccessRepository.cs +++ b/src/Umbraco.Infrastructure/Persistence/Repositories/IPublicAccessRepository.cs @@ -1,7 +1,7 @@ using System; -using Umbraco.Core.Models; +using Umbraco.Cms.Core.Models; -namespace Umbraco.Core.Persistence.Repositories +namespace Umbraco.Cms.Core.Persistence.Repositories { public interface IPublicAccessRepository : IReadWriteQueryRepository { } diff --git a/src/Umbraco.Infrastructure/Persistence/Repositories/Implement/AuditEntryRepository.cs b/src/Umbraco.Infrastructure/Persistence/Repositories/Implement/AuditEntryRepository.cs index 59387fcb9f..91408d0687 100644 --- a/src/Umbraco.Infrastructure/Persistence/Repositories/Implement/AuditEntryRepository.cs +++ b/src/Umbraco.Infrastructure/Persistence/Repositories/Implement/AuditEntryRepository.cs @@ -3,15 +3,17 @@ using System.Collections.Generic; using System.Linq; using Microsoft.Extensions.Logging; using NPoco; -using Umbraco.Core.Cache; -using Umbraco.Core.Models; -using Umbraco.Core.Models.Entities; -using Umbraco.Core.Persistence.Dtos; -using Umbraco.Core.Persistence.Factories; -using Umbraco.Core.Persistence.Querying; -using Umbraco.Core.Scoping; +using Umbraco.Cms.Core.Cache; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Core.Persistence.Querying; +using Umbraco.Cms.Core.Persistence.Repositories; +using Umbraco.Cms.Core.Scoping; +using Umbraco.Cms.Infrastructure.Persistence.Dtos; +using Umbraco.Cms.Infrastructure.Persistence.Factories; +using Umbraco.Cms.Infrastructure.Persistence.Querying; +using Umbraco.Extensions; -namespace Umbraco.Core.Persistence.Repositories.Implement +namespace Umbraco.Cms.Infrastructure.Persistence.Repositories.Implement { /// /// Represents the NPoco implementation of . @@ -88,7 +90,7 @@ namespace Umbraco.Core.Persistence.Repositories.Implement /// protected override string GetBaseWhereClause() { - return $"{Constants.DatabaseSchema.Tables.AuditEntry}.id = @id"; + return $"{Cms.Core.Constants.DatabaseSchema.Tables.AuditEntry}.id = @id"; } /// @@ -131,7 +133,7 @@ namespace Umbraco.Core.Persistence.Repositories.Implement public bool IsAvailable() { var tables = SqlSyntax.GetTablesInSchema(Database).ToArray(); - return tables.InvariantContains(Constants.DatabaseSchema.Tables.AuditEntry); + return tables.InvariantContains(Cms.Core.Constants.DatabaseSchema.Tables.AuditEntry); } } } diff --git a/src/Umbraco.Infrastructure/Persistence/Repositories/Implement/AuditRepository.cs b/src/Umbraco.Infrastructure/Persistence/Repositories/Implement/AuditRepository.cs index 8ad370672e..1558266d55 100644 --- a/src/Umbraco.Infrastructure/Persistence/Repositories/Implement/AuditRepository.cs +++ b/src/Umbraco.Infrastructure/Persistence/Repositories/Implement/AuditRepository.cs @@ -1,16 +1,19 @@ using System; using System.Collections.Generic; using System.Linq; -using NPoco; using Microsoft.Extensions.Logging; -using Umbraco.Core.Cache; -using Umbraco.Core.Models; -using Umbraco.Core.Persistence.DatabaseModelDefinitions; -using Umbraco.Core.Persistence.Dtos; -using Umbraco.Core.Persistence.Querying; -using Umbraco.Core.Scoping; +using NPoco; +using Umbraco.Cms.Core; +using Umbraco.Cms.Core.Cache; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Core.Persistence.Querying; +using Umbraco.Cms.Core.Persistence.Repositories; +using Umbraco.Cms.Core.Scoping; +using Umbraco.Cms.Infrastructure.Persistence.Dtos; +using Umbraco.Cms.Infrastructure.Persistence.Querying; +using Umbraco.Extensions; -namespace Umbraco.Core.Persistence.Repositories.Implement +namespace Umbraco.Cms.Infrastructure.Persistence.Repositories.Implement { internal class AuditRepository : EntityRepositoryBase, IAuditRepository { @@ -55,7 +58,7 @@ namespace Umbraco.Core.Persistence.Repositories.Implement var dto = Database.First(sql); return dto == null ? null - : new AuditItem(dto.NodeId, Enum.Parse(dto.Header), dto.UserId ?? Constants.Security.UnknownUserId, dto.EntityType, dto.Comment, dto.Parameters); + : new AuditItem(dto.NodeId, Enum.Parse(dto.Header), dto.UserId ?? Cms.Core.Constants.Security.UnknownUserId, dto.EntityType, dto.Comment, dto.Parameters); } protected override IEnumerable PerformGetAll(params int[] ids) @@ -71,7 +74,7 @@ namespace Umbraco.Core.Persistence.Repositories.Implement var dtos = Database.Fetch(sql); - return dtos.Select(x => new AuditItem(x.NodeId, Enum.Parse(x.Header), x.UserId ?? Constants.Security.UnknownUserId, x.EntityType, x.Comment, x.Parameters)).ToList(); + return dtos.Select(x => new AuditItem(x.NodeId, Enum.Parse(x.Header), x.UserId ?? Cms.Core.Constants.Security.UnknownUserId, x.EntityType, x.Comment, x.Parameters)).ToList(); } public IEnumerable Get(AuditType type, IQuery query) @@ -84,7 +87,7 @@ namespace Umbraco.Core.Persistence.Repositories.Implement var dtos = Database.Fetch(sql); - return dtos.Select(x => new AuditItem(x.NodeId, Enum.Parse(x.Header), x.UserId ?? Constants.Security.UnknownUserId, x.EntityType, x.Comment, x.Parameters)).ToList(); + return dtos.Select(x => new AuditItem(x.NodeId, Enum.Parse(x.Header), x.UserId ?? Cms.Core.Constants.Security.UnknownUserId, x.EntityType, x.Comment, x.Parameters)).ToList(); } protected override Sql GetBaseQuery(bool isCount) @@ -175,7 +178,7 @@ namespace Umbraco.Core.Persistence.Repositories.Implement totalRecords = page.TotalItems; var items = page.Items.Select( - dto => new AuditItem(dto.NodeId, Enum.ParseOrNull(dto.Header) ?? AuditType.Custom, dto.UserId ?? Constants.Security.UnknownUserId, dto.EntityType, dto.Comment, dto.Parameters)).ToList(); + dto => new AuditItem(dto.NodeId, Enum.ParseOrNull(dto.Header) ?? AuditType.Custom, dto.UserId ?? Cms.Core.Constants.Security.UnknownUserId, dto.EntityType, dto.Comment, dto.Parameters)).ToList(); // map the DateStamp for (var i = 0; i < items.Count; i++) diff --git a/src/Umbraco.Infrastructure/Persistence/Repositories/Implement/ConsentRepository.cs b/src/Umbraco.Infrastructure/Persistence/Repositories/Implement/ConsentRepository.cs index cff06a2126..0c1cc7376d 100644 --- a/src/Umbraco.Infrastructure/Persistence/Repositories/Implement/ConsentRepository.cs +++ b/src/Umbraco.Infrastructure/Persistence/Repositories/Implement/ConsentRepository.cs @@ -2,15 +2,17 @@ using System; using System.Collections.Generic; using Microsoft.Extensions.Logging; using NPoco; -using Umbraco.Core.Cache; -using Umbraco.Core.Models; -using Umbraco.Core.Models.Entities; -using Umbraco.Core.Persistence.Querying; -using Umbraco.Core.Persistence.Dtos; -using Umbraco.Core.Persistence.Factories; -using Umbraco.Core.Scoping; +using Umbraco.Cms.Core.Cache; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Core.Persistence.Querying; +using Umbraco.Cms.Core.Persistence.Repositories; +using Umbraco.Cms.Core.Scoping; +using Umbraco.Cms.Infrastructure.Persistence.Dtos; +using Umbraco.Cms.Infrastructure.Persistence.Factories; +using Umbraco.Cms.Infrastructure.Persistence.Querying; +using Umbraco.Extensions; -namespace Umbraco.Core.Persistence.Repositories.Implement +namespace Umbraco.Cms.Infrastructure.Persistence.Repositories.Implement { /// /// Represents the NPoco implementation of . diff --git a/src/Umbraco.Infrastructure/Persistence/Repositories/Implement/ContentRepositoryBase.cs b/src/Umbraco.Infrastructure/Persistence/Repositories/Implement/ContentRepositoryBase.cs index bd947260ce..d3c28b60de 100644 --- a/src/Umbraco.Infrastructure/Persistence/Repositories/Implement/ContentRepositoryBase.cs +++ b/src/Umbraco.Infrastructure/Persistence/Repositories/Implement/ContentRepositoryBase.cs @@ -3,24 +3,26 @@ using System.Collections.Generic; using System.Linq; using System.Text.RegularExpressions; using Microsoft.Extensions.Logging; -using Newtonsoft.Json; using NPoco; -using Umbraco.Core.Cache; -using Umbraco.Core.Composing; -using Umbraco.Core.Events; -using Umbraco.Core.Models; -using Umbraco.Core.Models.Editors; -using Umbraco.Core.Models.Entities; -using Umbraco.Core.Persistence.Dtos; -using Umbraco.Core.Persistence.Factories; -using Umbraco.Core.Persistence.Querying; -using Umbraco.Core.PropertyEditors; -using Umbraco.Core.Scoping; -using Umbraco.Core.Serialization; -using Umbraco.Core.Services; -using static Umbraco.Core.Persistence.SqlExtensionsStatics; +using Umbraco.Cms.Core; +using Umbraco.Cms.Core.Cache; +using Umbraco.Cms.Core.Events; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Core.Models.Editors; +using Umbraco.Cms.Core.Persistence; +using Umbraco.Cms.Core.Persistence.Querying; +using Umbraco.Cms.Core.Persistence.Repositories; +using Umbraco.Cms.Core.PropertyEditors; +using Umbraco.Cms.Core.Scoping; +using Umbraco.Cms.Core.Serialization; +using Umbraco.Cms.Core.Services; +using Umbraco.Cms.Infrastructure.Persistence.Dtos; +using Umbraco.Cms.Infrastructure.Persistence.Factories; +using Umbraco.Cms.Infrastructure.Persistence.Querying; +using Umbraco.Extensions; +using static Umbraco.Cms.Core.Persistence.SqlExtensionsStatics; -namespace Umbraco.Core.Persistence.Repositories.Implement +namespace Umbraco.Cms.Infrastructure.Persistence.Repositories.Implement { internal sealed class ContentRepositoryBase { @@ -92,7 +94,7 @@ namespace Umbraco.Core.Persistence.Repositories.Implement // gets all version ids, current first public virtual IEnumerable GetVersionIds(int nodeId, int maxRows) { - var template = SqlContext.Templates.Get(Constants.SqlTemplates.VersionableRepository.GetVersionIds, tsql => + var template = SqlContext.Templates.Get(Cms.Core.Constants.SqlTemplates.VersionableRepository.GetVersionIds, tsql => tsql.Select(x => x.Id) .From() .Where(x => x.NodeId == SqlTemplate.Arg("nodeId")) @@ -108,7 +110,7 @@ namespace Umbraco.Core.Persistence.Repositories.Implement // TODO: test object node type? // get the version we want to delete - var template = SqlContext.Templates.Get(Constants.SqlTemplates.VersionableRepository.GetVersion, tsql => + var template = SqlContext.Templates.Get(Cms.Core.Constants.SqlTemplates.VersionableRepository.GetVersion, tsql => tsql.Select().From().Where(x => x.Id == SqlTemplate.Arg("versionId")) ); var versionDto = Database.Fetch(template.Sql(new { versionId })).FirstOrDefault(); @@ -130,7 +132,7 @@ namespace Umbraco.Core.Persistence.Repositories.Implement // TODO: test object node type? // get the versions we want to delete, excluding the current one - var template = SqlContext.Templates.Get(Constants.SqlTemplates.VersionableRepository.GetVersions, tsql => + var template = SqlContext.Templates.Get(Cms.Core.Constants.SqlTemplates.VersionableRepository.GetVersions, tsql => tsql.Select().From().Where(x => x.NodeId == SqlTemplate.Arg("nodeId") && !x.Current && x.VersionDate < SqlTemplate.Arg("versionDate")) ); var versionDtos = Database.Fetch(template.Sql(new { nodeId, versionDate })); @@ -461,7 +463,7 @@ namespace Umbraco.Core.Persistence.Repositories.Implement // create the outer join complete sql fragment var outerJoinTempTable = $@"LEFT OUTER JOIN ({innerSqlString}) AS customPropData - ON customPropData.customPropNodeId = {Constants.DatabaseSchema.Tables.Node}.id "; // trailing space is important! + ON customPropData.customPropNodeId = {Cms.Core.Constants.DatabaseSchema.Tables.Node}.id "; // trailing space is important! // insert this just above the first WHERE var newSql = InsertBefore(sql.SQL, "WHERE", outerJoinTempTable); @@ -498,7 +500,7 @@ namespace Umbraco.Core.Persistence.Repositories.Implement var nodesToRebuild = new Dictionary>(); var validNodes = new Dictionary(); - var rootIds = new[] {Constants.System.Root, Constants.System.RecycleBinContent, Constants.System.RecycleBinMedia}; + var rootIds = new[] {Cms.Core.Constants.System.Root, Cms.Core.Constants.System.RecycleBinContent, Cms.Core.Constants.System.RecycleBinMedia}; var currentParentIds = new HashSet(rootIds); var prevParentIds = currentParentIds; var lastLevel = -1; @@ -944,7 +946,7 @@ namespace Umbraco.Core.Persistence.Repositories.Implement protected virtual string EnsureUniqueNodeName(int parentId, string nodeName, int id = 0) { - var template = SqlContext.Templates.Get(Constants.SqlTemplates.VersionableRepository.EnsureUniqueNodeName, tsql => tsql + var template = SqlContext.Templates.Get(Cms.Core.Constants.SqlTemplates.VersionableRepository.EnsureUniqueNodeName, tsql => tsql .Select(x => Alias(x.NodeId, "id"), x => Alias(x.Text, "name")) .From() .Where(x => x.NodeObjectType == SqlTemplate.Arg("nodeObjectType") && x.ParentId == SqlTemplate.Arg("parentId")) @@ -958,7 +960,7 @@ namespace Umbraco.Core.Persistence.Repositories.Implement protected virtual int GetNewChildSortOrder(int parentId, int first) { - var template = SqlContext.Templates.Get(Constants.SqlTemplates.VersionableRepository.GetSortOrder, tsql => tsql + var template = SqlContext.Templates.Get(Cms.Core.Constants.SqlTemplates.VersionableRepository.GetSortOrder, tsql => tsql .Select("MAX(sortOrder)") .From() .Where(x => x.NodeObjectType == SqlTemplate.Arg("nodeObjectType") && x.ParentId == SqlTemplate.Arg("parentId")) @@ -972,7 +974,7 @@ namespace Umbraco.Core.Persistence.Repositories.Implement protected virtual NodeDto GetParentNodeDto(int parentId) { - var template = SqlContext.Templates.Get(Constants.SqlTemplates.VersionableRepository.GetParentNode, tsql => tsql + var template = SqlContext.Templates.Get(Cms.Core.Constants.SqlTemplates.VersionableRepository.GetParentNode, tsql => tsql .Select() .From() .Where(x => x.NodeId == SqlTemplate.Arg("parentId")) @@ -986,10 +988,10 @@ namespace Umbraco.Core.Persistence.Repositories.Implement protected virtual int GetReservedId(Guid uniqueId) { - var template = SqlContext.Templates.Get(Constants.SqlTemplates.VersionableRepository.GetReservedId, tsql => tsql + var template = SqlContext.Templates.Get(Cms.Core.Constants.SqlTemplates.VersionableRepository.GetReservedId, tsql => tsql .Select(x => x.NodeId) .From() - .Where(x => x.UniqueId == SqlTemplate.Arg("uniqueId") && x.NodeObjectType == Constants.ObjectTypes.IdReservation) + .Where(x => x.UniqueId == SqlTemplate.Arg("uniqueId") && x.NodeObjectType == Cms.Core.Constants.ObjectTypes.IdReservation) ); var sql = template.Sql(new { uniqueId }); @@ -1019,7 +1021,7 @@ namespace Umbraco.Core.Persistence.Repositories.Implement trackedRelations.AddRange(_dataValueReferenceFactories.GetAllReferences(entity.Properties, PropertyEditors)); //First delete all auto-relations for this entity - RelationRepository.DeleteByParent(entity.Id, Constants.Conventions.RelationTypes.AutomaticRelationTypes); + RelationRepository.DeleteByParent(entity.Id, Cms.Core.Constants.Conventions.RelationTypes.AutomaticRelationTypes); if (trackedRelations.Count == 0) return; diff --git a/src/Umbraco.Infrastructure/Persistence/Repositories/Implement/ContentTypeCommonRepository.cs b/src/Umbraco.Infrastructure/Persistence/Repositories/Implement/ContentTypeCommonRepository.cs index 657159acc5..b693a0d85a 100644 --- a/src/Umbraco.Infrastructure/Persistence/Repositories/Implement/ContentTypeCommonRepository.cs +++ b/src/Umbraco.Infrastructure/Persistence/Repositories/Implement/ContentTypeCommonRepository.cs @@ -2,15 +2,18 @@ using System.Collections.Generic; using System.Linq; using NPoco; -using Umbraco.Core.Cache; -using Umbraco.Core.Exceptions; -using Umbraco.Core.Models; -using Umbraco.Core.Persistence.Dtos; -using Umbraco.Core.Persistence.Factories; -using Umbraco.Core.Scoping; -using Umbraco.Core.Strings; +using Umbraco.Cms.Core; +using Umbraco.Cms.Core.Cache; +using Umbraco.Cms.Core.Exceptions; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Core.Persistence.Repositories; +using Umbraco.Cms.Core.Scoping; +using Umbraco.Cms.Core.Strings; +using Umbraco.Cms.Infrastructure.Persistence.Dtos; +using Umbraco.Cms.Infrastructure.Persistence.Factories; +using Umbraco.Extensions; -namespace Umbraco.Core.Persistence.Repositories.Implement +namespace Umbraco.Cms.Infrastructure.Persistence.Repositories.Implement { /// /// Implements . @@ -87,11 +90,11 @@ namespace Umbraco.Core.Persistence.Repositories.Implement { // create content type IContentTypeComposition contentType; - if (contentTypeDto.NodeDto.NodeObjectType == Constants.ObjectTypes.MediaType) + if (contentTypeDto.NodeDto.NodeObjectType == Cms.Core.Constants.ObjectTypes.MediaType) contentType = ContentTypeFactory.BuildMediaTypeEntity(_shortStringHelper, contentTypeDto); - else if (contentTypeDto.NodeDto.NodeObjectType == Constants.ObjectTypes.DocumentType) + else if (contentTypeDto.NodeDto.NodeObjectType == Cms.Core.Constants.ObjectTypes.DocumentType) contentType = ContentTypeFactory.BuildContentTypeEntity(_shortStringHelper, contentTypeDto); - else if (contentTypeDto.NodeDto.NodeObjectType == Constants.ObjectTypes.MemberType) + else if (contentTypeDto.NodeDto.NodeObjectType == Cms.Core.Constants.ObjectTypes.MemberType) contentType = ContentTypeFactory.BuildMemberTypeEntity(_shortStringHelper, contentTypeDto); else throw new PanicException($"The node object type {contentTypeDto.NodeDto.NodeObjectType} is not supported"); contentTypes.Add(contentType.Id, contentType); @@ -250,12 +253,12 @@ namespace Umbraco.Core.Persistence.Repositories.Implement if (contentType is IMemberType memberType) { // ensure that the group exists (ok if it already exists) - memberType.AddPropertyGroup(Constants.Conventions.Member.StandardPropertiesGroupName); + memberType.AddPropertyGroup(Cms.Core.Constants.Conventions.Member.StandardPropertiesGroupName); // ensure that property types exist (ok if they already exist) foreach (var (alias, propertyType) in builtinProperties) { - var added = memberType.AddPropertyType(propertyType, Constants.Conventions.Member.StandardPropertiesGroupName); + var added = memberType.AddPropertyType(propertyType, Cms.Core.Constants.Conventions.Member.StandardPropertiesGroupName); if (added) { diff --git a/src/Umbraco.Infrastructure/Persistence/Repositories/Implement/ContentTypeRepository.cs b/src/Umbraco.Infrastructure/Persistence/Repositories/Implement/ContentTypeRepository.cs index d5243f5019..3c289aa542 100644 --- a/src/Umbraco.Infrastructure/Persistence/Repositories/Implement/ContentTypeRepository.cs +++ b/src/Umbraco.Infrastructure/Persistence/Repositories/Implement/ContentTypeRepository.cs @@ -3,17 +3,18 @@ using System.Collections.Generic; using System.Linq; using Microsoft.Extensions.Logging; using NPoco; -using Umbraco.Core.Cache; -using Umbraco.Core.Exceptions; -using Umbraco.Core.Models; -using Umbraco.Core.Models.Entities; -using Umbraco.Core.Persistence.Dtos; -using Umbraco.Core.Persistence.Querying; -using Umbraco.Core.Persistence.SqlSyntax; -using Umbraco.Core.Scoping; -using Umbraco.Core.Strings; +using Umbraco.Cms.Core.Cache; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Core.Persistence.Querying; +using Umbraco.Cms.Core.Persistence.Repositories; +using Umbraco.Cms.Core.Scoping; +using Umbraco.Cms.Core.Strings; +using Umbraco.Cms.Infrastructure.Persistence.Dtos; +using Umbraco.Cms.Infrastructure.Persistence.Querying; +using Umbraco.Cms.Infrastructure.Persistence.SqlSyntax; +using Umbraco.Extensions; -namespace Umbraco.Core.Persistence.Repositories.Implement +namespace Umbraco.Cms.Infrastructure.Persistence.Repositories.Implement { /// /// Represents a repository for doing CRUD operations for @@ -183,7 +184,7 @@ namespace Umbraco.Core.Persistence.Repositories.Implement return l; } - protected override Guid NodeObjectTypeId => Constants.ObjectTypes.DocumentType; + protected override Guid NodeObjectTypeId => Cms.Core.Constants.ObjectTypes.DocumentType; /// /// Deletes a content type @@ -207,7 +208,7 @@ namespace Umbraco.Core.Persistence.Repositories.Implement // like when we switch a document type, there is property data left over that is linked // to the previous document type. So we need to ensure it's removed. var sql = Sql() - .Select("DISTINCT " + Constants.DatabaseSchema.Tables.PropertyData + ".propertytypeid") + .Select("DISTINCT " + Cms.Core.Constants.DatabaseSchema.Tables.PropertyData + ".propertytypeid") .From() .InnerJoin() .On(dto => dto.PropertyTypeId, dto => dto.Id) @@ -216,7 +217,7 @@ namespace Umbraco.Core.Persistence.Repositories.Implement .Where(dto => dto.NodeId == entity.Id); //Delete all PropertyData where propertytypeid EXISTS in the subquery above - Database.Execute(SqlSyntax.GetDeleteSubquery(Constants.DatabaseSchema.Tables.PropertyData, "propertytypeid", sql)); + Database.Execute(SqlSyntax.GetDeleteSubquery(Cms.Core.Constants.DatabaseSchema.Tables.PropertyData, "propertytypeid", sql)); base.PersistDeletedItem(entity); } diff --git a/src/Umbraco.Infrastructure/Persistence/Repositories/Implement/ContentTypeRepositoryBase.cs b/src/Umbraco.Infrastructure/Persistence/Repositories/Implement/ContentTypeRepositoryBase.cs index c5c38d29bc..ee2e3aee60 100644 --- a/src/Umbraco.Infrastructure/Persistence/Repositories/Implement/ContentTypeRepositoryBase.cs +++ b/src/Umbraco.Infrastructure/Persistence/Repositories/Implement/ContentTypeRepositoryBase.cs @@ -4,20 +4,22 @@ using System.Data; using System.Globalization; using System.Linq; using Microsoft.Extensions.Logging; -using System.Threading.Tasks; using NPoco; -using Umbraco.Core.Cache; -using Umbraco.Core.Events; -using Umbraco.Core.Exceptions; -using Umbraco.Core.Models; -using Umbraco.Core.Persistence.Dtos; -using Umbraco.Core.Persistence.Factories; -using Umbraco.Core.Persistence.Querying; -using Umbraco.Core.Scoping; -using Umbraco.Core.Services; -using Umbraco.Core.Strings; +using Umbraco.Cms.Core.Cache; +using Umbraco.Cms.Core.Events; +using Umbraco.Cms.Core.Exceptions; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Core.Persistence; +using Umbraco.Cms.Core.Persistence.Repositories; +using Umbraco.Cms.Core.Scoping; +using Umbraco.Cms.Core.Services; +using Umbraco.Cms.Core.Strings; +using Umbraco.Cms.Infrastructure.Persistence.Dtos; +using Umbraco.Cms.Infrastructure.Persistence.Factories; +using Umbraco.Cms.Infrastructure.Persistence.Querying; +using Umbraco.Extensions; -namespace Umbraco.Core.Persistence.Repositories.Implement +namespace Umbraco.Cms.Infrastructure.Persistence.Repositories.Implement { /// /// Represent an abstract Repository for ContentType based repositories @@ -43,7 +45,7 @@ namespace Umbraco.Core.Persistence.Repositories.Implement public IEnumerable> Move(TEntity moving, EntityContainer container) { - var parentId = Constants.System.Root; + var parentId = Cms.Core.Constants.System.Root; if (container != null) { // check path @@ -68,7 +70,7 @@ namespace Umbraco.Core.Persistence.Repositories.Implement // move to parent (or -1), update path, save moving.ParentId = parentId; var movingPath = moving.Path + ","; // save before changing - moving.Path = (container == null ? Constants.System.RootString : container.Path) + "," + moving.Id; + moving.Path = (container == null ? Cms.Core.Constants.System.RootString : container.Path) + "," + moving.Id; moving.Level = container == null ? 1 : container.Level + 1; Save(moving); @@ -286,7 +288,7 @@ AND umbracoNode.id <> @id", .SelectAll() .From() .InnerJoin().On(left => left.NodeId, right => right.NodeId) - .Where(x => x.NodeObjectType == Constants.ObjectTypes.Document) + .Where(x => x.NodeObjectType == Cms.Core.Constants.ObjectTypes.Document) .Where(x => x.ContentTypeId == entity.Id); var contentDtos = Database.Fetch(sql); @@ -1345,8 +1347,8 @@ WHERE cmsContentType." + aliasColumn + @" LIKE @pattern", public bool HasContainerInPath(params int[] ids) { var sql = new Sql($@"SELECT COUNT(*) FROM cmsContentType -INNER JOIN {Constants.DatabaseSchema.Tables.Content} ON cmsContentType.nodeId={Constants.DatabaseSchema.Tables.Content}.contentTypeId -WHERE {Constants.DatabaseSchema.Tables.Content}.nodeId IN (@ids) AND cmsContentType.isContainer=@isContainer", new { ids, isContainer = true }); +INNER JOIN {Cms.Core.Constants.DatabaseSchema.Tables.Content} ON cmsContentType.nodeId={Cms.Core.Constants.DatabaseSchema.Tables.Content}.contentTypeId +WHERE {Cms.Core.Constants.DatabaseSchema.Tables.Content}.nodeId IN (@ids) AND cmsContentType.isContainer=@isContainer", new { ids, isContainer = true }); return Database.ExecuteScalar(sql) > 0; } @@ -1356,7 +1358,7 @@ WHERE {Constants.DatabaseSchema.Tables.Content}.nodeId IN (@ids) AND cmsContentT public bool HasContentNodes(int id) { var sql = new Sql( - $"SELECT CASE WHEN EXISTS (SELECT * FROM {Constants.DatabaseSchema.Tables.Content} WHERE contentTypeId = @id) THEN 1 ELSE 0 END", + $"SELECT CASE WHEN EXISTS (SELECT * FROM {Cms.Core.Constants.DatabaseSchema.Tables.Content} WHERE contentTypeId = @id) THEN 1 ELSE 0 END", new { id }); return Database.ExecuteScalar(sql) == 1; } @@ -1376,7 +1378,7 @@ WHERE {Constants.DatabaseSchema.Tables.Content}.nodeId IN (@ids) AND cmsContentT "DELETE FROM cmsContentTypeAllowedContentType WHERE AllowedId = @id", "DELETE FROM cmsContentType2ContentType WHERE parentContentTypeId = @id", "DELETE FROM cmsContentType2ContentType WHERE childContentTypeId = @id", - "DELETE FROM " + Constants.DatabaseSchema.Tables.PropertyData + " WHERE propertyTypeId IN (SELECT id FROM cmsPropertyType WHERE contentTypeId = @id)", + "DELETE FROM " + Cms.Core.Constants.DatabaseSchema.Tables.PropertyData + " WHERE propertyTypeId IN (SELECT id FROM cmsPropertyType WHERE contentTypeId = @id)", "DELETE FROM cmsPropertyType WHERE contentTypeId = @id", "DELETE FROM cmsPropertyTypeGroup WHERE contenttypeNodeId = @id", }; diff --git a/src/Umbraco.Infrastructure/Persistence/Repositories/Implement/DataTypeContainerRepository.cs b/src/Umbraco.Infrastructure/Persistence/Repositories/Implement/DataTypeContainerRepository.cs index 7ac72b0cb3..6128b2e9b2 100644 --- a/src/Umbraco.Infrastructure/Persistence/Repositories/Implement/DataTypeContainerRepository.cs +++ b/src/Umbraco.Infrastructure/Persistence/Repositories/Implement/DataTypeContainerRepository.cs @@ -1,13 +1,14 @@ using Microsoft.Extensions.Logging; -using Umbraco.Core.Cache; -using Umbraco.Core.Scoping; +using Umbraco.Cms.Core.Cache; +using Umbraco.Cms.Core.Persistence.Repositories; +using Umbraco.Cms.Core.Scoping; -namespace Umbraco.Core.Persistence.Repositories.Implement +namespace Umbraco.Cms.Infrastructure.Persistence.Repositories.Implement { internal class DataTypeContainerRepository : EntityContainerRepository, IDataTypeContainerRepository { public DataTypeContainerRepository(IScopeAccessor scopeAccessor, AppCaches cache, ILogger logger) - : base(scopeAccessor, cache, logger, Constants.ObjectTypes.DataTypeContainer) + : base(scopeAccessor, cache, logger, Cms.Core.Constants.ObjectTypes.DataTypeContainer) { } } } diff --git a/src/Umbraco.Infrastructure/Persistence/Repositories/Implement/DataTypeRepository.cs b/src/Umbraco.Infrastructure/Persistence/Repositories/Implement/DataTypeRepository.cs index b50f46e9a6..5647ae4d72 100644 --- a/src/Umbraco.Infrastructure/Persistence/Repositories/Implement/DataTypeRepository.cs +++ b/src/Umbraco.Infrastructure/Persistence/Repositories/Implement/DataTypeRepository.cs @@ -5,21 +5,24 @@ using System.Globalization; using System.Linq; using Microsoft.Extensions.Logging; using NPoco; -using Umbraco.Core.Cache; -using Umbraco.Core.Events; -using Umbraco.Core.Exceptions; -using Umbraco.Core.Models; -using Umbraco.Core.Models.Entities; -using Umbraco.Core.Persistence.Dtos; -using Umbraco.Core.Persistence.Factories; -using Umbraco.Core.Persistence.Querying; -using Umbraco.Core.PropertyEditors; -using Umbraco.Core.Scoping; -using Umbraco.Core.Serialization; -using Umbraco.Core.Services; -using static Umbraco.Core.Persistence.SqlExtensionsStatics; +using Umbraco.Cms.Core; +using Umbraco.Cms.Core.Cache; +using Umbraco.Cms.Core.Events; +using Umbraco.Cms.Core.Exceptions; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Core.Persistence.Querying; +using Umbraco.Cms.Core.Persistence.Repositories; +using Umbraco.Cms.Core.PropertyEditors; +using Umbraco.Cms.Core.Scoping; +using Umbraco.Cms.Core.Serialization; +using Umbraco.Cms.Core.Services; +using Umbraco.Cms.Infrastructure.Persistence.Dtos; +using Umbraco.Cms.Infrastructure.Persistence.Factories; +using Umbraco.Cms.Infrastructure.Persistence.Querying; +using Umbraco.Extensions; +using static Umbraco.Cms.Core.Persistence.SqlExtensionsStatics; -namespace Umbraco.Core.Persistence.Repositories.Implement +namespace Umbraco.Cms.Infrastructure.Persistence.Repositories.Implement { /// /// Represents a repository for doing CRUD operations for @@ -109,7 +112,7 @@ namespace Umbraco.Core.Persistence.Repositories.Implement return Array.Empty(); } - protected override Guid NodeObjectTypeId => Constants.ObjectTypes.DataType; + protected override Guid NodeObjectTypeId => Cms.Core.Constants.ObjectTypes.DataType; #endregion @@ -313,7 +316,7 @@ namespace Umbraco.Core.Persistence.Repositories.Implement private string EnsureUniqueNodeName(string nodeName, int id = 0) { - var template = SqlContext.Templates.Get(Constants.SqlTemplates.DataTypeRepository.EnsureUniqueNodeName, tsql => tsql + var template = SqlContext.Templates.Get(Cms.Core.Constants.SqlTemplates.DataTypeRepository.EnsureUniqueNodeName, tsql => tsql .Select(x => Alias(x.NodeId, "id"), x => Alias(x.Text, "name")) .From() .Where(x => x.NodeObjectType == SqlTemplate.Arg("nodeObjectType"))); @@ -325,7 +328,7 @@ namespace Umbraco.Core.Persistence.Repositories.Implement } - [TableName(Constants.DatabaseSchema.Tables.ContentType)] + [TableName(Cms.Core.Constants.DatabaseSchema.Tables.ContentType)] private class ContentTypeReferenceDto : ContentTypeDto { [ResultColumn] @@ -333,7 +336,7 @@ namespace Umbraco.Core.Persistence.Repositories.Implement public List PropertyTypes { get; set; } } - [TableName(Constants.DatabaseSchema.Tables.PropertyType)] + [TableName(Cms.Core.Constants.DatabaseSchema.Tables.PropertyType)] private class PropertyTypeReferenceDto { [Column("ptAlias")] diff --git a/src/Umbraco.Infrastructure/Persistence/Repositories/Implement/DictionaryRepository.cs b/src/Umbraco.Infrastructure/Persistence/Repositories/Implement/DictionaryRepository.cs index abab07a7bb..3cb9662a89 100644 --- a/src/Umbraco.Infrastructure/Persistence/Repositories/Implement/DictionaryRepository.cs +++ b/src/Umbraco.Infrastructure/Persistence/Repositories/Implement/DictionaryRepository.cs @@ -3,15 +3,18 @@ using System.Collections.Generic; using System.Linq; using Microsoft.Extensions.Logging; using NPoco; -using Umbraco.Core.Cache; -using Umbraco.Core.Models; -using Umbraco.Core.Models.Entities; -using Umbraco.Core.Persistence.Dtos; -using Umbraco.Core.Persistence.Factories; -using Umbraco.Core.Persistence.Querying; -using Umbraco.Core.Scoping; +using Umbraco.Cms.Core.Cache; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Core.Models.Entities; +using Umbraco.Cms.Core.Persistence.Querying; +using Umbraco.Cms.Core.Persistence.Repositories; +using Umbraco.Cms.Core.Scoping; +using Umbraco.Cms.Infrastructure.Persistence.Dtos; +using Umbraco.Cms.Infrastructure.Persistence.Factories; +using Umbraco.Cms.Infrastructure.Persistence.Querying; +using Umbraco.Extensions; -namespace Umbraco.Core.Persistence.Repositories.Implement +namespace Umbraco.Cms.Infrastructure.Persistence.Repositories.Implement { /// /// Represents a repository for doing CRUD operations for diff --git a/src/Umbraco.Infrastructure/Persistence/Repositories/Implement/DocumentBlueprintRepository.cs b/src/Umbraco.Infrastructure/Persistence/Repositories/Implement/DocumentBlueprintRepository.cs index a647ba49d3..d7f3e6cddd 100644 --- a/src/Umbraco.Infrastructure/Persistence/Repositories/Implement/DocumentBlueprintRepository.cs +++ b/src/Umbraco.Infrastructure/Persistence/Repositories/Implement/DocumentBlueprintRepository.cs @@ -1,13 +1,13 @@ using System; using Microsoft.Extensions.Logging; -using Umbraco.Core.Cache; -using Umbraco.Core.Configuration.UmbracoSettings; -using Umbraco.Core.PropertyEditors; -using Umbraco.Core.Scoping; -using Umbraco.Core.Serialization; -using Umbraco.Core.Services; +using Umbraco.Cms.Core.Cache; +using Umbraco.Cms.Core.Persistence.Repositories; +using Umbraco.Cms.Core.PropertyEditors; +using Umbraco.Cms.Core.Scoping; +using Umbraco.Cms.Core.Serialization; +using Umbraco.Cms.Core.Services; -namespace Umbraco.Core.Persistence.Repositories.Implement +namespace Umbraco.Cms.Infrastructure.Persistence.Repositories.Implement { /// /// Override the base content repository so we can change the node object type @@ -43,6 +43,6 @@ namespace Umbraco.Core.Persistence.Repositories.Implement protected override bool EnsureUniqueNaming => false; // duplicates are allowed - protected override Guid NodeObjectTypeId => Constants.ObjectTypes.DocumentBlueprint; + protected override Guid NodeObjectTypeId => Cms.Core.Constants.ObjectTypes.DocumentBlueprint; } } diff --git a/src/Umbraco.Infrastructure/Persistence/Repositories/Implement/DocumentRepository.cs b/src/Umbraco.Infrastructure/Persistence/Repositories/Implement/DocumentRepository.cs index f3b9ca58d6..43ee275e7f 100644 --- a/src/Umbraco.Infrastructure/Persistence/Repositories/Implement/DocumentRepository.cs +++ b/src/Umbraco.Infrastructure/Persistence/Repositories/Implement/DocumentRepository.cs @@ -3,20 +3,23 @@ using System.Collections.Generic; using System.Linq; using Microsoft.Extensions.Logging; using NPoco; -using Umbraco.Core.Cache; -using Umbraco.Core.Models; -using Umbraco.Core.Models.Entities; -using Umbraco.Core.Models.Membership; -using Umbraco.Core.Persistence.Dtos; -using Umbraco.Core.Persistence.Factories; -using Umbraco.Core.Persistence.Querying; -using Umbraco.Core.Persistence.SqlSyntax; -using Umbraco.Core.PropertyEditors; -using Umbraco.Core.Scoping; -using Umbraco.Core.Serialization; -using Umbraco.Core.Services; +using Umbraco.Cms.Core.Cache; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Core.Models.Membership; +using Umbraco.Cms.Core.Persistence; +using Umbraco.Cms.Core.Persistence.Querying; +using Umbraco.Cms.Core.Persistence.Repositories; +using Umbraco.Cms.Core.PropertyEditors; +using Umbraco.Cms.Core.Scoping; +using Umbraco.Cms.Core.Serialization; +using Umbraco.Cms.Core.Services; +using Umbraco.Cms.Infrastructure.Persistence.Dtos; +using Umbraco.Cms.Infrastructure.Persistence.Factories; +using Umbraco.Cms.Infrastructure.Persistence.Querying; +using Umbraco.Cms.Infrastructure.Persistence.SqlSyntax; +using Umbraco.Extensions; -namespace Umbraco.Core.Persistence.Repositories.Implement +namespace Umbraco.Cms.Infrastructure.Persistence.Repositories.Implement { /// /// Represents a repository for doing CRUD operations for . @@ -87,7 +90,7 @@ namespace Umbraco.Core.Persistence.Repositories.Implement #region Repository Base - protected override Guid NodeObjectTypeId => Constants.ObjectTypes.Document; + protected override Guid NodeObjectTypeId => Cms.Core.Constants.ObjectTypes.Document; protected override IContent PerformGet(int id) { @@ -215,35 +218,35 @@ namespace Umbraco.Core.Persistence.Repositories.Implement // ah maybe not, that what's used for eg Exists in base repo protected override string GetBaseWhereClause() { - return $"{Constants.DatabaseSchema.Tables.Node}.id = @id"; + return $"{Cms.Core.Constants.DatabaseSchema.Tables.Node}.id = @id"; } protected override IEnumerable GetDeleteClauses() { var list = new List { - "DELETE FROM " + Constants.DatabaseSchema.Tables.ContentSchedule + " WHERE nodeId = @id", - "DELETE FROM " + Constants.DatabaseSchema.Tables.RedirectUrl + " WHERE contentKey IN (SELECT uniqueId FROM " + Constants.DatabaseSchema.Tables.Node + " WHERE id = @id)", - "DELETE FROM " + Constants.DatabaseSchema.Tables.User2NodeNotify + " WHERE nodeId = @id", - "DELETE FROM " + Constants.DatabaseSchema.Tables.UserGroup2NodePermission + " WHERE nodeId = @id", - "DELETE FROM " + Constants.DatabaseSchema.Tables.UserStartNode + " WHERE startNode = @id", - "UPDATE " + Constants.DatabaseSchema.Tables.UserGroup + " SET startContentId = NULL WHERE startContentId = @id", - "DELETE FROM " + Constants.DatabaseSchema.Tables.Relation + " WHERE parentId = @id", - "DELETE FROM " + Constants.DatabaseSchema.Tables.Relation + " WHERE childId = @id", - "DELETE FROM " + Constants.DatabaseSchema.Tables.TagRelationship + " WHERE nodeId = @id", - "DELETE FROM " + Constants.DatabaseSchema.Tables.Domain + " WHERE domainRootStructureID = @id", - "DELETE FROM " + Constants.DatabaseSchema.Tables.Document + " WHERE nodeId = @id", - "DELETE FROM " + Constants.DatabaseSchema.Tables.DocumentCultureVariation + " WHERE nodeId = @id", - "DELETE FROM " + Constants.DatabaseSchema.Tables.DocumentVersion + " WHERE id IN (SELECT id FROM " + Constants.DatabaseSchema.Tables.ContentVersion + " WHERE nodeId = @id)", - "DELETE FROM " + Constants.DatabaseSchema.Tables.PropertyData + " WHERE versionId IN (SELECT id FROM " + Constants.DatabaseSchema.Tables.ContentVersion + " WHERE nodeId = @id)", - "DELETE FROM " + Constants.DatabaseSchema.Tables.ContentVersionCultureVariation + " WHERE versionId IN (SELECT id FROM " + Constants.DatabaseSchema.Tables.ContentVersion + " WHERE nodeId = @id)", - "DELETE FROM " + Constants.DatabaseSchema.Tables.ContentVersion + " WHERE nodeId = @id", - "DELETE FROM " + Constants.DatabaseSchema.Tables.Content + " WHERE nodeId = @id", - "DELETE FROM " + Constants.DatabaseSchema.Tables.AccessRule + " WHERE accessId IN (SELECT id FROM " + Constants.DatabaseSchema.Tables.Access + " WHERE nodeId = @id OR loginNodeId = @id OR noAccessNodeId = @id)", - "DELETE FROM " + Constants.DatabaseSchema.Tables.Access + " WHERE nodeId = @id", - "DELETE FROM " + Constants.DatabaseSchema.Tables.Access + " WHERE loginNodeId = @id", - "DELETE FROM " + Constants.DatabaseSchema.Tables.Access + " WHERE noAccessNodeId = @id", - "DELETE FROM " + Constants.DatabaseSchema.Tables.Node + " WHERE id = @id" + "DELETE FROM " + Cms.Core.Constants.DatabaseSchema.Tables.ContentSchedule + " WHERE nodeId = @id", + "DELETE FROM " + Cms.Core.Constants.DatabaseSchema.Tables.RedirectUrl + " WHERE contentKey IN (SELECT uniqueId FROM " + Cms.Core.Constants.DatabaseSchema.Tables.Node + " WHERE id = @id)", + "DELETE FROM " + Cms.Core.Constants.DatabaseSchema.Tables.User2NodeNotify + " WHERE nodeId = @id", + "DELETE FROM " + Cms.Core.Constants.DatabaseSchema.Tables.UserGroup2NodePermission + " WHERE nodeId = @id", + "DELETE FROM " + Cms.Core.Constants.DatabaseSchema.Tables.UserStartNode + " WHERE startNode = @id", + "UPDATE " + Cms.Core.Constants.DatabaseSchema.Tables.UserGroup + " SET startContentId = NULL WHERE startContentId = @id", + "DELETE FROM " + Cms.Core.Constants.DatabaseSchema.Tables.Relation + " WHERE parentId = @id", + "DELETE FROM " + Cms.Core.Constants.DatabaseSchema.Tables.Relation + " WHERE childId = @id", + "DELETE FROM " + Cms.Core.Constants.DatabaseSchema.Tables.TagRelationship + " WHERE nodeId = @id", + "DELETE FROM " + Cms.Core.Constants.DatabaseSchema.Tables.Domain + " WHERE domainRootStructureID = @id", + "DELETE FROM " + Cms.Core.Constants.DatabaseSchema.Tables.Document + " WHERE nodeId = @id", + "DELETE FROM " + Cms.Core.Constants.DatabaseSchema.Tables.DocumentCultureVariation + " WHERE nodeId = @id", + "DELETE FROM " + Cms.Core.Constants.DatabaseSchema.Tables.DocumentVersion + " WHERE id IN (SELECT id FROM " + Cms.Core.Constants.DatabaseSchema.Tables.ContentVersion + " WHERE nodeId = @id)", + "DELETE FROM " + Cms.Core.Constants.DatabaseSchema.Tables.PropertyData + " WHERE versionId IN (SELECT id FROM " + Cms.Core.Constants.DatabaseSchema.Tables.ContentVersion + " WHERE nodeId = @id)", + "DELETE FROM " + Cms.Core.Constants.DatabaseSchema.Tables.ContentVersionCultureVariation + " WHERE versionId IN (SELECT id FROM " + Cms.Core.Constants.DatabaseSchema.Tables.ContentVersion + " WHERE nodeId = @id)", + "DELETE FROM " + Cms.Core.Constants.DatabaseSchema.Tables.ContentVersion + " WHERE nodeId = @id", + "DELETE FROM " + Cms.Core.Constants.DatabaseSchema.Tables.Content + " WHERE nodeId = @id", + "DELETE FROM " + Cms.Core.Constants.DatabaseSchema.Tables.AccessRule + " WHERE accessId IN (SELECT id FROM " + Cms.Core.Constants.DatabaseSchema.Tables.Access + " WHERE nodeId = @id OR loginNodeId = @id OR noAccessNodeId = @id)", + "DELETE FROM " + Cms.Core.Constants.DatabaseSchema.Tables.Access + " WHERE nodeId = @id", + "DELETE FROM " + Cms.Core.Constants.DatabaseSchema.Tables.Access + " WHERE loginNodeId = @id", + "DELETE FROM " + Cms.Core.Constants.DatabaseSchema.Tables.Access + " WHERE noAccessNodeId = @id", + "DELETE FROM " + Cms.Core.Constants.DatabaseSchema.Tables.Node + " WHERE id = @id" }; return list; } @@ -929,7 +932,7 @@ namespace Umbraco.Core.Persistence.Repositories.Implement #region Recycle Bin - public override int RecycleBinId => Constants.System.RecycleBinContent; + public override int RecycleBinId => Cms.Core.Constants.System.RecycleBinContent; #endregion diff --git a/src/Umbraco.Infrastructure/Persistence/Repositories/Implement/DocumentTypeContainerRepository.cs b/src/Umbraco.Infrastructure/Persistence/Repositories/Implement/DocumentTypeContainerRepository.cs index a79247d17d..c6c0df848c 100644 --- a/src/Umbraco.Infrastructure/Persistence/Repositories/Implement/DocumentTypeContainerRepository.cs +++ b/src/Umbraco.Infrastructure/Persistence/Repositories/Implement/DocumentTypeContainerRepository.cs @@ -1,13 +1,14 @@ using Microsoft.Extensions.Logging; -using Umbraco.Core.Cache; -using Umbraco.Core.Scoping; +using Umbraco.Cms.Core.Cache; +using Umbraco.Cms.Core.Persistence.Repositories; +using Umbraco.Cms.Core.Scoping; -namespace Umbraco.Core.Persistence.Repositories.Implement +namespace Umbraco.Cms.Infrastructure.Persistence.Repositories.Implement { internal class DocumentTypeContainerRepository : EntityContainerRepository, IDocumentTypeContainerRepository { public DocumentTypeContainerRepository(IScopeAccessor scopeAccessor, AppCaches cache, ILogger logger) - : base(scopeAccessor, cache, logger, Constants.ObjectTypes.DocumentTypeContainer) + : base(scopeAccessor, cache, logger, Cms.Core.Constants.ObjectTypes.DocumentTypeContainer) { } } } diff --git a/src/Umbraco.Infrastructure/Persistence/Repositories/Implement/DomainRepository.cs b/src/Umbraco.Infrastructure/Persistence/Repositories/Implement/DomainRepository.cs index e9e62d76c9..fe9f74cd4a 100644 --- a/src/Umbraco.Infrastructure/Persistence/Repositories/Implement/DomainRepository.cs +++ b/src/Umbraco.Infrastructure/Persistence/Repositories/Implement/DomainRepository.cs @@ -4,14 +4,15 @@ using System.Data; using System.Linq; using Microsoft.Extensions.Logging; using NPoco; -using Umbraco.Core.Cache; -using Umbraco.Core.Models; -using Umbraco.Core.Models.Entities; -using Umbraco.Core.Persistence.Dtos; -using Umbraco.Core.Persistence.Querying; -using Umbraco.Core.Scoping; +using Umbraco.Cms.Core.Cache; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Core.Persistence.Querying; +using Umbraco.Cms.Core.Persistence.Repositories; +using Umbraco.Cms.Core.Scoping; +using Umbraco.Cms.Infrastructure.Persistence.Dtos; +using Umbraco.Extensions; -namespace Umbraco.Core.Persistence.Repositories.Implement +namespace Umbraco.Cms.Infrastructure.Persistence.Repositories.Implement { // TODO: We need to get a readonly ISO code for the domain assigned @@ -92,7 +93,7 @@ namespace Umbraco.Core.Persistence.Repositories.Implement if (entity.RootContentId.HasValue) { - var contentExists = Database.ExecuteScalar($"SELECT COUNT(*) FROM {Constants.DatabaseSchema.Tables.Content} WHERE nodeId = @id", new { id = entity.RootContentId.Value }); + var contentExists = Database.ExecuteScalar($"SELECT COUNT(*) FROM {Cms.Core.Constants.DatabaseSchema.Tables.Content} WHERE nodeId = @id", new { id = entity.RootContentId.Value }); if (contentExists == 0) throw new NullReferenceException("No content exists with id " + entity.RootContentId.Value); } @@ -130,7 +131,7 @@ namespace Umbraco.Core.Persistence.Repositories.Implement if (entity.RootContentId.HasValue) { - var contentExists = Database.ExecuteScalar($"SELECT COUNT(*) FROM {Constants.DatabaseSchema.Tables.Content} WHERE nodeId = @id", new { id = entity.RootContentId.Value }); + var contentExists = Database.ExecuteScalar($"SELECT COUNT(*) FROM {Cms.Core.Constants.DatabaseSchema.Tables.Content} WHERE nodeId = @id", new { id = entity.RootContentId.Value }); if (contentExists == 0) throw new NullReferenceException("No content exists with id " + entity.RootContentId.Value); } diff --git a/src/Umbraco.Infrastructure/Persistence/Repositories/Implement/EntityContainerRepository.cs b/src/Umbraco.Infrastructure/Persistence/Repositories/Implement/EntityContainerRepository.cs index 26159c4fdf..9f6912c0fe 100644 --- a/src/Umbraco.Infrastructure/Persistence/Repositories/Implement/EntityContainerRepository.cs +++ b/src/Umbraco.Infrastructure/Persistence/Repositories/Implement/EntityContainerRepository.cs @@ -3,13 +3,15 @@ using System.Collections.Generic; using System.Linq; using Microsoft.Extensions.Logging; using NPoco; -using Umbraco.Core.Cache; -using Umbraco.Core.Models; -using Umbraco.Core.Persistence.Dtos; -using Umbraco.Core.Persistence.Querying; -using Umbraco.Core.Scoping; +using Umbraco.Cms.Core.Cache; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Core.Persistence.Querying; +using Umbraco.Cms.Core.Persistence.Repositories; +using Umbraco.Cms.Core.Scoping; +using Umbraco.Cms.Infrastructure.Persistence.Dtos; +using Umbraco.Extensions; -namespace Umbraco.Core.Persistence.Repositories.Implement +namespace Umbraco.Cms.Infrastructure.Persistence.Repositories.Implement { /// /// An internal repository for managing entity containers such as doc type, media type, data type containers. @@ -21,7 +23,7 @@ namespace Umbraco.Core.Persistence.Repositories.Implement public EntityContainerRepository(IScopeAccessor scopeAccessor, AppCaches cache, ILogger logger, Guid containerObjectType) : base(scopeAccessor, cache, logger) { - var allowedContainers = new[] { Constants.ObjectTypes.DocumentTypeContainer, Constants.ObjectTypes.MediaTypeContainer, Constants.ObjectTypes.DataTypeContainer }; + var allowedContainers = new[] { Cms.Core.Constants.ObjectTypes.DocumentTypeContainer, Cms.Core.Constants.ObjectTypes.MediaTypeContainer, Cms.Core.Constants.ObjectTypes.DataTypeContainer }; _containerObjectType = containerObjectType; if (allowedContainers.Contains(_containerObjectType) == false) throw new InvalidOperationException("No container type exists with ID: " + _containerObjectType); @@ -92,7 +94,7 @@ namespace Umbraco.Core.Persistence.Repositories.Implement var entity = new EntityContainer(nodeDto.NodeId, nodeDto.UniqueId, nodeDto.ParentId, nodeDto.Path, nodeDto.Level, nodeDto.SortOrder, containedObjectType, - nodeDto.Text, nodeDto.UserId ?? Constants.Security.UnknownUserId); + nodeDto.Text, nodeDto.UserId ?? Cms.Core.Constants.Security.UnknownUserId); // reset dirty initial properties (U4-1946) entity.ResetDirtyProperties(false); diff --git a/src/Umbraco.Infrastructure/Persistence/Repositories/Implement/EntityRepository.cs b/src/Umbraco.Infrastructure/Persistence/Repositories/Implement/EntityRepository.cs index 41f6a065d4..4eb4f108ce 100644 --- a/src/Umbraco.Infrastructure/Persistence/Repositories/Implement/EntityRepository.cs +++ b/src/Umbraco.Infrastructure/Persistence/Repositories/Implement/EntityRepository.cs @@ -2,17 +2,21 @@ using System; using System.Collections.Generic; using System.Linq; using NPoco; -using Umbraco.Core.Cache; -using Umbraco.Core.Models; -using Umbraco.Core.Models.Entities; -using Umbraco.Core.Persistence.Dtos; -using Umbraco.Core.Persistence.Querying; -using Umbraco.Core.Persistence.SqlSyntax; -using Umbraco.Core.Scoping; -using Umbraco.Core.Services; -using static Umbraco.Core.Persistence.SqlExtensionsStatics; +using Umbraco.Cms.Core; +using Umbraco.Cms.Core.Cache; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Core.Models.Entities; +using Umbraco.Cms.Core.Persistence.Querying; +using Umbraco.Cms.Core.Persistence.Repositories; +using Umbraco.Cms.Core.Scoping; +using Umbraco.Cms.Core.Services; +using Umbraco.Cms.Infrastructure.Persistence.Dtos; +using Umbraco.Cms.Infrastructure.Persistence.Querying; +using Umbraco.Cms.Infrastructure.Persistence.SqlSyntax; +using Umbraco.Extensions; +using static Umbraco.Cms.Core.Persistence.SqlExtensionsStatics; -namespace Umbraco.Core.Persistence.Repositories.Implement +namespace Umbraco.Cms.Infrastructure.Persistence.Repositories.Implement { /// /// Represents the EntityRepository used to query entity objects. @@ -40,9 +44,9 @@ namespace Umbraco.Core.Persistence.Repositories.Implement public IEnumerable GetPagedResultsByQuery(IQuery query, Guid[] objectTypes, long pageIndex, int pageSize, out long totalRecords, IQuery filter, Ordering ordering, Action> sqlCustomization = null) { - var isContent = objectTypes.Any(objectType => objectType == Constants.ObjectTypes.Document || objectType == Constants.ObjectTypes.DocumentBlueprint); - var isMedia = objectTypes.Any(objectType => objectType == Constants.ObjectTypes.Media); - var isMember = objectTypes.Any(objectType => objectType == Constants.ObjectTypes.Member); + var isContent = objectTypes.Any(objectType => objectType == Cms.Core.Constants.ObjectTypes.Document || objectType == Cms.Core.Constants.ObjectTypes.DocumentBlueprint); + var isMedia = objectTypes.Any(objectType => objectType == Cms.Core.Constants.ObjectTypes.Media); + var isMember = objectTypes.Any(objectType => objectType == Cms.Core.Constants.ObjectTypes.Member); Sql sql = GetBaseWhere(isContent, isMedia, isMember, false, s => { @@ -118,9 +122,9 @@ namespace Umbraco.Core.Persistence.Repositories.Implement public IEntitySlim Get(Guid key, Guid objectTypeId) { - var isContent = objectTypeId == Constants.ObjectTypes.Document || objectTypeId == Constants.ObjectTypes.DocumentBlueprint; - var isMedia = objectTypeId == Constants.ObjectTypes.Media; - var isMember = objectTypeId == Constants.ObjectTypes.Member; + var isContent = objectTypeId == Cms.Core.Constants.ObjectTypes.Document || objectTypeId == Cms.Core.Constants.ObjectTypes.DocumentBlueprint; + var isMedia = objectTypeId == Cms.Core.Constants.ObjectTypes.Media; + var isMember = objectTypeId == Cms.Core.Constants.ObjectTypes.Member; var sql = GetFullSqlForEntityType(isContent, isMedia, isMember, objectTypeId, key); return GetEntity(sql, isContent, isMedia, isMember); @@ -135,9 +139,9 @@ namespace Umbraco.Core.Persistence.Repositories.Implement public IEntitySlim Get(int id, Guid objectTypeId) { - var isContent = objectTypeId == Constants.ObjectTypes.Document || objectTypeId == Constants.ObjectTypes.DocumentBlueprint; - var isMedia = objectTypeId == Constants.ObjectTypes.Media; - var isMember = objectTypeId == Constants.ObjectTypes.Member; + var isContent = objectTypeId == Cms.Core.Constants.ObjectTypes.Document || objectTypeId == Cms.Core.Constants.ObjectTypes.DocumentBlueprint; + var isMedia = objectTypeId == Cms.Core.Constants.ObjectTypes.Media; + var isMember = objectTypeId == Cms.Core.Constants.ObjectTypes.Member; var sql = GetFullSqlForEntityType(isContent, isMedia, isMember, objectTypeId, id); return GetEntity(sql, isContent, isMedia, isMember); @@ -180,9 +184,9 @@ namespace Umbraco.Core.Persistence.Repositories.Implement private IEnumerable PerformGetAll(Guid objectType, Action> filter = null) { - var isContent = objectType == Constants.ObjectTypes.Document || objectType == Constants.ObjectTypes.DocumentBlueprint; - var isMedia = objectType == Constants.ObjectTypes.Media; - var isMember = objectType == Constants.ObjectTypes.Member; + var isContent = objectType == Cms.Core.Constants.ObjectTypes.Document || objectType == Cms.Core.Constants.ObjectTypes.DocumentBlueprint; + var isMedia = objectType == Cms.Core.Constants.ObjectTypes.Media; + var isMember = objectType == Cms.Core.Constants.ObjectTypes.Member; var sql = GetFullSqlForEntityType(isContent, isMedia, isMember, objectType, filter); return GetEntities(sql, isContent, isMedia, isMember); @@ -222,9 +226,9 @@ namespace Umbraco.Core.Persistence.Repositories.Implement public IEnumerable GetByQuery(IQuery query, Guid objectType) { - var isContent = objectType == Constants.ObjectTypes.Document || objectType == Constants.ObjectTypes.DocumentBlueprint; - var isMedia = objectType == Constants.ObjectTypes.Media; - var isMember = objectType == Constants.ObjectTypes.Member; + var isContent = objectType == Cms.Core.Constants.ObjectTypes.Document || objectType == Cms.Core.Constants.ObjectTypes.DocumentBlueprint; + var isMedia = objectType == Cms.Core.Constants.ObjectTypes.Media; + var isMember = objectType == Cms.Core.Constants.ObjectTypes.Member; var sql = GetBaseWhere(isContent, isMedia, isMember, false, null, new[] { objectType }); @@ -510,7 +514,7 @@ namespace Umbraco.Core.Persistence.Repositories.Implement default: orderBy = ordering.OrderBy; break; - } + } if (ordering.Direction == Direction.Ascending) sql.OrderBy(orderBy); @@ -605,11 +609,11 @@ namespace Umbraco.Core.Persistence.Repositories.Implement private EntitySlim BuildEntity(BaseDto dto) { - if (dto.NodeObjectType == Constants.ObjectTypes.Document) + if (dto.NodeObjectType == Cms.Core.Constants.ObjectTypes.Document) return BuildDocumentEntity(dto); - if (dto.NodeObjectType == Constants.ObjectTypes.Media) + if (dto.NodeObjectType == Cms.Core.Constants.ObjectTypes.Media) return BuildMediaEntity(dto); - if (dto.NodeObjectType == Constants.ObjectTypes.Member) + if (dto.NodeObjectType == Cms.Core.Constants.ObjectTypes.Member) return BuildMemberEntity(dto); // EntitySlim does not track changes @@ -623,7 +627,7 @@ namespace Umbraco.Core.Persistence.Repositories.Implement entity.Trashed = dto.Trashed; entity.CreateDate = dto.CreateDate; entity.UpdateDate = dto.VersionDate; - entity.CreatorId = dto.UserId ?? Constants.Security.UnknownUserId; + entity.CreatorId = dto.UserId ?? Cms.Core.Constants.Security.UnknownUserId; entity.Id = dto.NodeId; entity.Key = dto.UniqueId; entity.Level = dto.Level; diff --git a/src/Umbraco.Infrastructure/Persistence/Repositories/Implement/EntityRepositoryBase.cs b/src/Umbraco.Infrastructure/Persistence/Repositories/Implement/EntityRepositoryBase.cs index 8f9c5102ab..3b93e09867 100644 --- a/src/Umbraco.Infrastructure/Persistence/Repositories/Implement/EntityRepositoryBase.cs +++ b/src/Umbraco.Infrastructure/Persistence/Repositories/Implement/EntityRepositoryBase.cs @@ -3,14 +3,16 @@ using System.Collections.Generic; using System.Linq; using Microsoft.Extensions.Logging; using NPoco; -using Umbraco.Core.Cache; -using Umbraco.Core.Models.Entities; -using Umbraco.Core.Persistence.Querying; -using Umbraco.Core.Scoping; +using Umbraco.Cms.Core.Cache; +using Umbraco.Cms.Core.Models.Entities; +using Umbraco.Cms.Core.Persistence; +using Umbraco.Cms.Core.Persistence.Querying; +using Umbraco.Cms.Core.Scoping; +using Umbraco.Cms.Infrastructure.Persistence.Querying; +using Umbraco.Extensions; -namespace Umbraco.Core.Persistence.Repositories.Implement +namespace Umbraco.Cms.Infrastructure.Persistence.Repositories.Implement { - /// /// Provides a base class to all based repositories. /// diff --git a/src/Umbraco.Infrastructure/Persistence/Repositories/Implement/ExternalLoginRepository.cs b/src/Umbraco.Infrastructure/Persistence/Repositories/Implement/ExternalLoginRepository.cs index 29cbdf04e5..ff64fb0d49 100644 --- a/src/Umbraco.Infrastructure/Persistence/Repositories/Implement/ExternalLoginRepository.cs +++ b/src/Umbraco.Infrastructure/Persistence/Repositories/Implement/ExternalLoginRepository.cs @@ -3,15 +3,18 @@ using System.Collections.Generic; using System.Linq; using Microsoft.Extensions.Logging; using NPoco; -using Umbraco.Core.Cache; -using Umbraco.Core.Models.Entities; -using Umbraco.Core.Models.Identity; -using Umbraco.Core.Persistence.Dtos; -using Umbraco.Core.Persistence.Factories; -using Umbraco.Core.Persistence.Querying; -using Umbraco.Core.Scoping; +using Umbraco.Cms.Core.Cache; +using Umbraco.Cms.Core.Models.Entities; +using Umbraco.Cms.Core.Models.Identity; +using Umbraco.Cms.Core.Persistence.Querying; +using Umbraco.Cms.Core.Persistence.Repositories; +using Umbraco.Cms.Core.Scoping; +using Umbraco.Cms.Infrastructure.Persistence.Dtos; +using Umbraco.Cms.Infrastructure.Persistence.Factories; +using Umbraco.Cms.Infrastructure.Persistence.Querying; +using Umbraco.Extensions; -namespace Umbraco.Core.Persistence.Repositories.Implement +namespace Umbraco.Cms.Infrastructure.Persistence.Repositories.Implement { // TODO: We should update this to support both users and members. It means we would remove referential integrity from users // and the user/member key would be a GUID (we also need to add a GUID to users) diff --git a/src/Umbraco.Infrastructure/Persistence/Repositories/Implement/FileRepository.cs b/src/Umbraco.Infrastructure/Persistence/Repositories/Implement/FileRepository.cs index fb7ccff420..742f4ab94c 100644 --- a/src/Umbraco.Infrastructure/Persistence/Repositories/Implement/FileRepository.cs +++ b/src/Umbraco.Infrastructure/Persistence/Repositories/Implement/FileRepository.cs @@ -1,12 +1,13 @@ using System.Collections.Generic; using System.IO; using System.Text; -using Umbraco.Core.IO; -using Umbraco.Core.Models; -using Umbraco.Core.Models.Entities; -using Umbraco.Core.Scoping; +using Umbraco.Cms.Core.IO; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Core.Models.Entities; +using Umbraco.Cms.Core.Persistence; +using Umbraco.Extensions; -namespace Umbraco.Core.Persistence.Repositories.Implement +namespace Umbraco.Cms.Infrastructure.Persistence.Repositories.Implement { internal abstract class FileRepository : IReadRepository, IWriteRepository where TEntity : IFile diff --git a/src/Umbraco.Infrastructure/Persistence/Repositories/Implement/KeyValueRepository.cs b/src/Umbraco.Infrastructure/Persistence/Repositories/Implement/KeyValueRepository.cs index ba3754486c..40dfb4cecf 100644 --- a/src/Umbraco.Infrastructure/Persistence/Repositories/Implement/KeyValueRepository.cs +++ b/src/Umbraco.Infrastructure/Persistence/Repositories/Implement/KeyValueRepository.cs @@ -3,14 +3,15 @@ using System.Collections.Generic; using System.Linq; using Microsoft.Extensions.Logging; using NPoco; -using Umbraco.Core.Cache; -using Umbraco.Core.Models; -using Umbraco.Core.Persistence; -using Umbraco.Core.Persistence.Dtos; -using Umbraco.Core.Persistence.Querying; -using Umbraco.Core.Scoping; +using Umbraco.Cms.Core.Cache; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Core.Persistence.Querying; +using Umbraco.Cms.Core.Persistence.Repositories; +using Umbraco.Cms.Core.Scoping; +using Umbraco.Cms.Infrastructure.Persistence.Dtos; +using Umbraco.Extensions; -namespace Umbraco.Core.Persistence.Repositories.Implement +namespace Umbraco.Cms.Infrastructure.Persistence.Repositories.Implement { internal class KeyValueRepository : EntityRepositoryBase, IKeyValueRepository { @@ -50,7 +51,7 @@ namespace Umbraco.Core.Persistence.Repositories.Implement protected override string GetBaseWhereClause() { - return Constants.DatabaseSchema.Tables.KeyValue + ".key = @id"; + return Cms.Core.Constants.DatabaseSchema.Tables.KeyValue + ".key = @id"; } protected override IEnumerable GetDeleteClauses() diff --git a/src/Umbraco.Infrastructure/Persistence/Repositories/Implement/LanguageRepository.cs b/src/Umbraco.Infrastructure/Persistence/Repositories/Implement/LanguageRepository.cs index bd72a3faf5..73c77e9e05 100644 --- a/src/Umbraco.Infrastructure/Persistence/Repositories/Implement/LanguageRepository.cs +++ b/src/Umbraco.Infrastructure/Persistence/Repositories/Implement/LanguageRepository.cs @@ -4,17 +4,18 @@ using System.Linq; using Microsoft.Extensions.Logging; using Microsoft.Extensions.Options; using NPoco; -using Umbraco.Core.Cache; -using Umbraco.Core.Configuration; -using Umbraco.Core.Configuration.Models; -using Umbraco.Core.Models; -using Umbraco.Core.Models.Entities; -using Umbraco.Core.Persistence.Dtos; -using Umbraco.Core.Persistence.Factories; -using Umbraco.Core.Persistence.Querying; -using Umbraco.Core.Scoping; +using Umbraco.Cms.Core.Cache; +using Umbraco.Cms.Core.Configuration.Models; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Core.Persistence.Querying; +using Umbraco.Cms.Core.Persistence.Repositories; +using Umbraco.Cms.Core.Scoping; +using Umbraco.Cms.Infrastructure.Persistence.Dtos; +using Umbraco.Cms.Infrastructure.Persistence.Factories; +using Umbraco.Cms.Infrastructure.Persistence.Querying; +using Umbraco.Extensions; -namespace Umbraco.Core.Persistence.Repositories.Implement +namespace Umbraco.Cms.Infrastructure.Persistence.Repositories.Implement { /// /// Represents a repository for doing CRUD operations for @@ -112,13 +113,13 @@ namespace Umbraco.Core.Persistence.Repositories.Implement { //NOTE: There is no constraint between the Language and cmsDictionary/cmsLanguageText tables (?) // but we still need to remove them - "DELETE FROM " + Constants.DatabaseSchema.Tables.DictionaryValue + " WHERE languageId = @id", - "DELETE FROM " + Constants.DatabaseSchema.Tables.PropertyData + " WHERE languageId = @id", - "DELETE FROM " + Constants.DatabaseSchema.Tables.ContentVersionCultureVariation + " WHERE languageId = @id", - "DELETE FROM " + Constants.DatabaseSchema.Tables.DocumentCultureVariation + " WHERE languageId = @id", - "DELETE FROM " + Constants.DatabaseSchema.Tables.TagRelationship + " WHERE tagId IN (SELECT id FROM " + Constants.DatabaseSchema.Tables.Tag + " WHERE languageId = @id)", - "DELETE FROM " + Constants.DatabaseSchema.Tables.Tag + " WHERE languageId = @id", - "DELETE FROM " + Constants.DatabaseSchema.Tables.Language + " WHERE id = @id" + "DELETE FROM " + Cms.Core.Constants.DatabaseSchema.Tables.DictionaryValue + " WHERE languageId = @id", + "DELETE FROM " + Cms.Core.Constants.DatabaseSchema.Tables.PropertyData + " WHERE languageId = @id", + "DELETE FROM " + Cms.Core.Constants.DatabaseSchema.Tables.ContentVersionCultureVariation + " WHERE languageId = @id", + "DELETE FROM " + Cms.Core.Constants.DatabaseSchema.Tables.DocumentCultureVariation + " WHERE languageId = @id", + "DELETE FROM " + Cms.Core.Constants.DatabaseSchema.Tables.TagRelationship + " WHERE tagId IN (SELECT id FROM " + Cms.Core.Constants.DatabaseSchema.Tables.Tag + " WHERE languageId = @id)", + "DELETE FROM " + Cms.Core.Constants.DatabaseSchema.Tables.Tag + " WHERE languageId = @id", + "DELETE FROM " + Cms.Core.Constants.DatabaseSchema.Tables.Language + " WHERE id = @id" }; return list; } diff --git a/src/Umbraco.Infrastructure/Persistence/Repositories/Implement/LanguageRepositoryExtensions.cs b/src/Umbraco.Infrastructure/Persistence/Repositories/Implement/LanguageRepositoryExtensions.cs index b48b5588de..72324eb874 100644 --- a/src/Umbraco.Infrastructure/Persistence/Repositories/Implement/LanguageRepositoryExtensions.cs +++ b/src/Umbraco.Infrastructure/Persistence/Repositories/Implement/LanguageRepositoryExtensions.cs @@ -1,4 +1,7 @@ -namespace Umbraco.Core.Persistence.Repositories.Implement +using Umbraco.Cms.Core.Persistence.Repositories; +using Umbraco.Extensions; + +namespace Umbraco.Cms.Infrastructure.Persistence.Repositories.Implement { internal static class LanguageRepositoryExtensions { diff --git a/src/Umbraco.Infrastructure/Persistence/Repositories/Implement/MacroRepository.cs b/src/Umbraco.Infrastructure/Persistence/Repositories/Implement/MacroRepository.cs index 678f826fb4..d4ee347c98 100644 --- a/src/Umbraco.Infrastructure/Persistence/Repositories/Implement/MacroRepository.cs +++ b/src/Umbraco.Infrastructure/Persistence/Repositories/Implement/MacroRepository.cs @@ -3,16 +3,19 @@ using System.Collections.Generic; using System.Linq; using Microsoft.Extensions.Logging; using NPoco; -using Umbraco.Core.Cache; -using Umbraco.Core.Models; -using Umbraco.Core.Models.Entities; -using Umbraco.Core.Persistence.Dtos; -using Umbraco.Core.Persistence.Factories; -using Umbraco.Core.Persistence.Querying; -using Umbraco.Core.Scoping; -using Umbraco.Core.Strings; +using Umbraco.Cms.Core.Cache; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Core.Models.Entities; +using Umbraco.Cms.Core.Persistence.Querying; +using Umbraco.Cms.Core.Persistence.Repositories; +using Umbraco.Cms.Core.Scoping; +using Umbraco.Cms.Core.Strings; +using Umbraco.Cms.Infrastructure.Persistence.Dtos; +using Umbraco.Cms.Infrastructure.Persistence.Factories; +using Umbraco.Cms.Infrastructure.Persistence.Querying; +using Umbraco.Extensions; -namespace Umbraco.Core.Persistence.Repositories.Implement +namespace Umbraco.Cms.Infrastructure.Persistence.Repositories.Implement { internal class MacroRepository : EntityRepositoryBase, IMacroRepository { diff --git a/src/Umbraco.Infrastructure/Persistence/Repositories/Implement/MediaRepository.cs b/src/Umbraco.Infrastructure/Persistence/Repositories/Implement/MediaRepository.cs index 7e3425707a..ba1fe05d0c 100644 --- a/src/Umbraco.Infrastructure/Persistence/Repositories/Implement/MediaRepository.cs +++ b/src/Umbraco.Infrastructure/Persistence/Repositories/Implement/MediaRepository.cs @@ -4,20 +4,22 @@ using System.Linq; using System.Text.RegularExpressions; using Microsoft.Extensions.Logging; using NPoco; -using Umbraco.Core.Cache; -using Umbraco.Core.Exceptions; -using Umbraco.Core.Models; -using Umbraco.Core.Models.Entities; -using Umbraco.Core.Persistence.Dtos; -using Umbraco.Core.Persistence.Factories; -using Umbraco.Core.Persistence.Querying; -using Umbraco.Core.PropertyEditors; -using Umbraco.Core.Scoping; -using Umbraco.Core.Serialization; -using Umbraco.Core.Services; -using static Umbraco.Core.Persistence.SqlExtensionsStatics; +using Umbraco.Cms.Core.Cache; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Core.Persistence; +using Umbraco.Cms.Core.Persistence.Querying; +using Umbraco.Cms.Core.Persistence.Repositories; +using Umbraco.Cms.Core.PropertyEditors; +using Umbraco.Cms.Core.Scoping; +using Umbraco.Cms.Core.Serialization; +using Umbraco.Cms.Core.Services; +using Umbraco.Cms.Infrastructure.Persistence.Dtos; +using Umbraco.Cms.Infrastructure.Persistence.Factories; +using Umbraco.Cms.Infrastructure.Persistence.Querying; +using Umbraco.Extensions; +using static Umbraco.Cms.Core.Persistence.SqlExtensionsStatics; -namespace Umbraco.Core.Persistence.Repositories.Implement +namespace Umbraco.Cms.Infrastructure.Persistence.Repositories.Implement { /// /// Represents a repository for doing CRUD operations for @@ -59,7 +61,7 @@ namespace Umbraco.Core.Persistence.Repositories.Implement #region Repository Base - protected override Guid NodeObjectTypeId => Constants.ObjectTypes.Media; + protected override Guid NodeObjectTypeId => Cms.Core.Constants.ObjectTypes.Media; protected override IMedia PerformGet(int id) { @@ -150,26 +152,26 @@ namespace Umbraco.Core.Persistence.Repositories.Implement // ah maybe not, that what's used for eg Exists in base repo protected override string GetBaseWhereClause() { - return $"{Constants.DatabaseSchema.Tables.Node}.id = @id"; + return $"{Cms.Core.Constants.DatabaseSchema.Tables.Node}.id = @id"; } protected override IEnumerable GetDeleteClauses() { var list = new List { - "DELETE FROM " + Constants.DatabaseSchema.Tables.User2NodeNotify + " WHERE nodeId = @id", - "DELETE FROM " + Constants.DatabaseSchema.Tables.UserGroup2NodePermission + " WHERE nodeId = @id", - "DELETE FROM " + Constants.DatabaseSchema.Tables.UserStartNode + " WHERE startNode = @id", - "UPDATE " + Constants.DatabaseSchema.Tables.UserGroup + " SET startContentId = NULL WHERE startContentId = @id", - "DELETE FROM " + Constants.DatabaseSchema.Tables.Relation + " WHERE parentId = @id", - "DELETE FROM " + Constants.DatabaseSchema.Tables.Relation + " WHERE childId = @id", - "DELETE FROM " + Constants.DatabaseSchema.Tables.TagRelationship + " WHERE nodeId = @id", - "DELETE FROM " + Constants.DatabaseSchema.Tables.Document + " WHERE nodeId = @id", - "DELETE FROM " + Constants.DatabaseSchema.Tables.MediaVersion + " WHERE id IN (SELECT id FROM " + Constants.DatabaseSchema.Tables.ContentVersion + " WHERE nodeId = @id)", - "DELETE FROM " + Constants.DatabaseSchema.Tables.PropertyData + " WHERE versionId IN (SELECT id FROM " + Constants.DatabaseSchema.Tables.ContentVersion + " WHERE nodeId = @id)", - "DELETE FROM " + Constants.DatabaseSchema.Tables.ContentVersion + " WHERE nodeId = @id", - "DELETE FROM " + Constants.DatabaseSchema.Tables.Content + " WHERE nodeId = @id", - "DELETE FROM " + Constants.DatabaseSchema.Tables.Node + " WHERE id = @id" + "DELETE FROM " + Cms.Core.Constants.DatabaseSchema.Tables.User2NodeNotify + " WHERE nodeId = @id", + "DELETE FROM " + Cms.Core.Constants.DatabaseSchema.Tables.UserGroup2NodePermission + " WHERE nodeId = @id", + "DELETE FROM " + Cms.Core.Constants.DatabaseSchema.Tables.UserStartNode + " WHERE startNode = @id", + "UPDATE " + Cms.Core.Constants.DatabaseSchema.Tables.UserGroup + " SET startContentId = NULL WHERE startContentId = @id", + "DELETE FROM " + Cms.Core.Constants.DatabaseSchema.Tables.Relation + " WHERE parentId = @id", + "DELETE FROM " + Cms.Core.Constants.DatabaseSchema.Tables.Relation + " WHERE childId = @id", + "DELETE FROM " + Cms.Core.Constants.DatabaseSchema.Tables.TagRelationship + " WHERE nodeId = @id", + "DELETE FROM " + Cms.Core.Constants.DatabaseSchema.Tables.Document + " WHERE nodeId = @id", + "DELETE FROM " + Cms.Core.Constants.DatabaseSchema.Tables.MediaVersion + " WHERE id IN (SELECT id FROM " + Cms.Core.Constants.DatabaseSchema.Tables.ContentVersion + " WHERE nodeId = @id)", + "DELETE FROM " + Cms.Core.Constants.DatabaseSchema.Tables.PropertyData + " WHERE versionId IN (SELECT id FROM " + Cms.Core.Constants.DatabaseSchema.Tables.ContentVersion + " WHERE nodeId = @id)", + "DELETE FROM " + Cms.Core.Constants.DatabaseSchema.Tables.ContentVersion + " WHERE nodeId = @id", + "DELETE FROM " + Cms.Core.Constants.DatabaseSchema.Tables.Content + " WHERE nodeId = @id", + "DELETE FROM " + Cms.Core.Constants.DatabaseSchema.Tables.Node + " WHERE id = @id" }; return list; } @@ -384,7 +386,7 @@ namespace Umbraco.Core.Persistence.Repositories.Implement #region Recycle Bin - public override int RecycleBinId => Constants.System.RecycleBinMedia; + public override int RecycleBinId => Cms.Core.Constants.System.RecycleBinMedia; #endregion @@ -503,9 +505,9 @@ namespace Umbraco.Core.Persistence.Repositories.Implement private IEnumerable MapDtosToContent(List dtos, bool withCache = false) { - var temps = new List>(); + var temps = new List>(); var contentTypes = new Dictionary(); - var content = new Models.Media[dtos.Count]; + var content = new Core.Models.Media[dtos.Count]; for (var i = 0; i < dtos.Count; i++) { @@ -517,7 +519,7 @@ namespace Umbraco.Core.Persistence.Repositories.Implement var cached = IsolatedCache.GetCacheItem(RepositoryCacheKeys.GetKey(dto.NodeId)); if (cached != null && cached.VersionId == dto.ContentVersionDto.Id) { - content[i] = (Models.Media) cached; + content[i] = (Core.Models.Media) cached; continue; } } @@ -534,7 +536,7 @@ namespace Umbraco.Core.Persistence.Repositories.Implement // need properties var versionId = dto.ContentVersionDto.Id; - temps.Add(new TempContent(dto.NodeId, versionId, 0, contentType, c)); + temps.Add(new TempContent(dto.NodeId, versionId, 0, contentType, c)); } // load all properties for all documents from database in 1 query - indexed by version id @@ -559,8 +561,8 @@ namespace Umbraco.Core.Persistence.Repositories.Implement // get properties - indexed by version id var versionId = dto.ContentVersionDto.Id; - var temp = new TempContent(dto.NodeId, versionId, 0, contentType); - var properties = GetPropertyCollections(new List> { temp }); + var temp = new TempContent(dto.NodeId, versionId, 0, contentType); + var properties = GetPropertyCollections(new List> { temp }); media.Properties = properties[versionId]; // reset dirty initial properties (U4-1946) diff --git a/src/Umbraco.Infrastructure/Persistence/Repositories/Implement/MediaTypeContainerRepository.cs b/src/Umbraco.Infrastructure/Persistence/Repositories/Implement/MediaTypeContainerRepository.cs index d660ebb0b0..7710f3efb1 100644 --- a/src/Umbraco.Infrastructure/Persistence/Repositories/Implement/MediaTypeContainerRepository.cs +++ b/src/Umbraco.Infrastructure/Persistence/Repositories/Implement/MediaTypeContainerRepository.cs @@ -1,13 +1,14 @@ using Microsoft.Extensions.Logging; -using Umbraco.Core.Cache; -using Umbraco.Core.Scoping; +using Umbraco.Cms.Core.Cache; +using Umbraco.Cms.Core.Persistence.Repositories; +using Umbraco.Cms.Core.Scoping; -namespace Umbraco.Core.Persistence.Repositories.Implement +namespace Umbraco.Cms.Infrastructure.Persistence.Repositories.Implement { class MediaTypeContainerRepository : EntityContainerRepository, IMediaTypeContainerRepository { public MediaTypeContainerRepository(IScopeAccessor scopeAccessor, AppCaches cache, ILogger logger) - : base(scopeAccessor, cache, logger, Constants.ObjectTypes.MediaTypeContainer) + : base(scopeAccessor, cache, logger, Cms.Core.Constants.ObjectTypes.MediaTypeContainer) { } } } diff --git a/src/Umbraco.Infrastructure/Persistence/Repositories/Implement/MediaTypeRepository.cs b/src/Umbraco.Infrastructure/Persistence/Repositories/Implement/MediaTypeRepository.cs index fdb4817aeb..48659829ee 100644 --- a/src/Umbraco.Infrastructure/Persistence/Repositories/Implement/MediaTypeRepository.cs +++ b/src/Umbraco.Infrastructure/Persistence/Repositories/Implement/MediaTypeRepository.cs @@ -3,16 +3,17 @@ using System.Collections.Generic; using System.Linq; using Microsoft.Extensions.Logging; using NPoco; -using Umbraco.Core.Cache; -using Umbraco.Core.Exceptions; -using Umbraco.Core.Models; -using Umbraco.Core.Models.Entities; -using Umbraco.Core.Persistence.Dtos; -using Umbraco.Core.Persistence.Querying; -using Umbraco.Core.Scoping; -using Umbraco.Core.Strings; +using Umbraco.Cms.Core.Cache; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Core.Persistence.Querying; +using Umbraco.Cms.Core.Persistence.Repositories; +using Umbraco.Cms.Core.Scoping; +using Umbraco.Cms.Core.Strings; +using Umbraco.Cms.Infrastructure.Persistence.Dtos; +using Umbraco.Cms.Infrastructure.Persistence.Querying; +using Umbraco.Extensions; -namespace Umbraco.Core.Persistence.Repositories.Implement +namespace Umbraco.Cms.Infrastructure.Persistence.Repositories.Implement { /// /// Represents a repository for doing CRUD operations for @@ -98,7 +99,7 @@ namespace Umbraco.Core.Persistence.Repositories.Implement return l; } - protected override Guid NodeObjectTypeId => Constants.ObjectTypes.MediaType; + protected override Guid NodeObjectTypeId => Cms.Core.Constants.ObjectTypes.MediaType; protected override void PersistNewItem(IMediaType entity) { diff --git a/src/Umbraco.Infrastructure/Persistence/Repositories/Implement/MemberGroupRepository.cs b/src/Umbraco.Infrastructure/Persistence/Repositories/Implement/MemberGroupRepository.cs index 6916203e93..84523777ee 100644 --- a/src/Umbraco.Infrastructure/Persistence/Repositories/Implement/MemberGroupRepository.cs +++ b/src/Umbraco.Infrastructure/Persistence/Repositories/Implement/MemberGroupRepository.cs @@ -3,16 +3,18 @@ using System.Collections.Generic; using System.Linq; using Microsoft.Extensions.Logging; using NPoco; -using Umbraco.Core.Cache; -using Umbraco.Core.Events; -using Umbraco.Core.Models; -using Umbraco.Core.Models.Entities; -using Umbraco.Core.Persistence.Dtos; -using Umbraco.Core.Persistence.Factories; -using Umbraco.Core.Persistence.Querying; -using Umbraco.Core.Scoping; +using Umbraco.Cms.Core.Cache; +using Umbraco.Cms.Core.Events; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Core.Persistence.Querying; +using Umbraco.Cms.Core.Persistence.Repositories; +using Umbraco.Cms.Core.Scoping; +using Umbraco.Cms.Infrastructure.Persistence.Dtos; +using Umbraco.Cms.Infrastructure.Persistence.Factories; +using Umbraco.Cms.Infrastructure.Persistence.Querying; +using Umbraco.Extensions; -namespace Umbraco.Core.Persistence.Repositories.Implement +namespace Umbraco.Cms.Infrastructure.Persistence.Repositories.Implement { internal class MemberGroupRepository : EntityRepositoryBase, IMemberGroupRepository { @@ -69,7 +71,7 @@ namespace Umbraco.Core.Persistence.Repositories.Implement protected override string GetBaseWhereClause() { - return $"{Constants.DatabaseSchema.Tables.Node}.id = @id"; + return $"{Cms.Core.Constants.DatabaseSchema.Tables.Node}.id = @id"; } protected override IEnumerable GetDeleteClauses() @@ -87,7 +89,7 @@ namespace Umbraco.Core.Persistence.Repositories.Implement return list; } - protected override Guid NodeObjectTypeId => Constants.ObjectTypes.MemberGroup; + protected override Guid NodeObjectTypeId => Cms.Core.Constants.ObjectTypes.MemberGroup; protected override void PersistNewItem(IMemberGroup entity) { @@ -195,7 +197,7 @@ namespace Umbraco.Core.Persistence.Repositories.Implement public int[] GetMemberIds(string[] usernames) { - var memberObjectType = Constants.ObjectTypes.Member; + var memberObjectType = Cms.Core.Constants.ObjectTypes.Member; var memberSql = Sql() .Select("umbracoNode.id") diff --git a/src/Umbraco.Infrastructure/Persistence/Repositories/Implement/MemberRepository.cs b/src/Umbraco.Infrastructure/Persistence/Repositories/Implement/MemberRepository.cs index 58da62be1b..e97add3f5e 100644 --- a/src/Umbraco.Infrastructure/Persistence/Repositories/Implement/MemberRepository.cs +++ b/src/Umbraco.Infrastructure/Persistence/Repositories/Implement/MemberRepository.cs @@ -3,20 +3,22 @@ using System.Collections.Generic; using System.Linq; using Microsoft.Extensions.Logging; using NPoco; -using Umbraco.Core.Cache; -using Umbraco.Core.Models; -using Umbraco.Core.Models.Entities; -using Umbraco.Core.Persistence.Dtos; -using Umbraco.Core.Persistence.Factories; -using Umbraco.Core.Persistence.Querying; -using Umbraco.Core.PropertyEditors; -using Umbraco.Core.Scoping; -using Umbraco.Core.Security; -using Umbraco.Core.Serialization; -using Umbraco.Core.Services; -using static Umbraco.Core.Persistence.SqlExtensionsStatics; +using Umbraco.Cms.Core.Cache; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Core.Persistence.Querying; +using Umbraco.Cms.Core.Persistence.Repositories; +using Umbraco.Cms.Core.PropertyEditors; +using Umbraco.Cms.Core.Scoping; +using Umbraco.Cms.Core.Security; +using Umbraco.Cms.Core.Serialization; +using Umbraco.Cms.Core.Services; +using Umbraco.Cms.Infrastructure.Persistence.Dtos; +using Umbraco.Cms.Infrastructure.Persistence.Factories; +using Umbraco.Cms.Infrastructure.Persistence.Querying; +using Umbraco.Extensions; +using static Umbraco.Cms.Core.Persistence.SqlExtensionsStatics; -namespace Umbraco.Core.Persistence.Repositories.Implement +namespace Umbraco.Cms.Infrastructure.Persistence.Repositories.Implement { /// /// Represents a repository for doing CRUD operations for @@ -54,7 +56,7 @@ namespace Umbraco.Core.Persistence.Repositories.Implement #region Repository Base - protected override Guid NodeObjectTypeId => Constants.ObjectTypes.Member; + protected override Guid NodeObjectTypeId => Cms.Core.Constants.ObjectTypes.Member; protected override IMember PerformGet(int id) { @@ -200,11 +202,11 @@ namespace Umbraco.Core.Persistence.Repositories.Implement "DELETE FROM umbracoRelation WHERE parentId = @id", "DELETE FROM umbracoRelation WHERE childId = @id", "DELETE FROM cmsTagRelationship WHERE nodeId = @id", - "DELETE FROM " + Constants.DatabaseSchema.Tables.PropertyData + " WHERE versionId IN (SELECT id FROM " + Constants.DatabaseSchema.Tables.ContentVersion + " WHERE nodeId = @id)", + "DELETE FROM " + Cms.Core.Constants.DatabaseSchema.Tables.PropertyData + " WHERE versionId IN (SELECT id FROM " + Cms.Core.Constants.DatabaseSchema.Tables.ContentVersion + " WHERE nodeId = @id)", "DELETE FROM cmsMember2MemberGroup WHERE Member = @id", "DELETE FROM cmsMember WHERE nodeId = @id", - "DELETE FROM " + Constants.DatabaseSchema.Tables.ContentVersion + " WHERE nodeId = @id", - "DELETE FROM " + Constants.DatabaseSchema.Tables.Content + " WHERE nodeId = @id", + "DELETE FROM " + Cms.Core.Constants.DatabaseSchema.Tables.ContentVersion + " WHERE nodeId = @id", + "DELETE FROM " + Cms.Core.Constants.DatabaseSchema.Tables.Content + " WHERE nodeId = @id", "DELETE FROM umbracoNode WHERE id = @id" }; return list; @@ -317,7 +319,7 @@ namespace Umbraco.Core.Persistence.Repositories.Implement if (entity.RawPasswordValue.IsNullOrWhiteSpace()) { - dto.Password = Constants.Security.EmptyPasswordPrefix + _passwordHasher.HashPassword(Guid.NewGuid().ToString("N")); + dto.Password = Cms.Core.Constants.Security.EmptyPasswordPrefix + _passwordHasher.HashPassword(Guid.NewGuid().ToString("N")); entity.RawPasswordValue = dto.Password; } @@ -528,7 +530,7 @@ namespace Umbraco.Core.Persistence.Repositories.Implement .Where(x => x.Alias == SqlTemplate.Arg("propertyTypeAlias")) .Where(x => x.LoginName == SqlTemplate.Arg("username")) .ForUpdate()); - var sqlSelectProperty = sqlSelectTemplateProperty.Sql(Constants.ObjectTypes.Member, Constants.Conventions.Member.LastLoginDate, username); + var sqlSelectProperty = sqlSelectTemplateProperty.Sql(Cms.Core.Constants.ObjectTypes.Member, Cms.Core.Constants.Conventions.Member.LastLoginDate, username); var update = Sql() .Update(u => u @@ -546,7 +548,7 @@ namespace Umbraco.Core.Persistence.Repositories.Implement .InnerJoin().On((l, r) => l.NodeId == r.NodeId) .Where(x => x.NodeObjectType == SqlTemplate.Arg("nodeObjectType")) .Where(x => x.LoginName == SqlTemplate.Arg("username"))); - var sqlSelectVersion = sqlSelectTemplateVersion.Sql(Constants.ObjectTypes.Member, username); + var sqlSelectVersion = sqlSelectTemplateVersion.Sql(Cms.Core.Constants.ObjectTypes.Member, username); Database.Execute(Sql() .Update(u => u diff --git a/src/Umbraco.Infrastructure/Persistence/Repositories/Implement/MemberTypeRepository.cs b/src/Umbraco.Infrastructure/Persistence/Repositories/Implement/MemberTypeRepository.cs index 28b364129d..342b1e025c 100644 --- a/src/Umbraco.Infrastructure/Persistence/Repositories/Implement/MemberTypeRepository.cs +++ b/src/Umbraco.Infrastructure/Persistence/Repositories/Implement/MemberTypeRepository.cs @@ -3,17 +3,19 @@ using System.Collections.Generic; using System.Linq; using Microsoft.Extensions.Logging; using NPoco; -using Umbraco.Core.Cache; -using Umbraco.Core.Exceptions; -using Umbraco.Core.Models; -using Umbraco.Core.Models.Entities; -using Umbraco.Core.Persistence.Dtos; -using Umbraco.Core.Persistence.Factories; -using Umbraco.Core.Persistence.Querying; -using Umbraco.Core.Scoping; -using Umbraco.Core.Strings; +using Umbraco.Cms.Core; +using Umbraco.Cms.Core.Cache; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Core.Persistence.Querying; +using Umbraco.Cms.Core.Persistence.Repositories; +using Umbraco.Cms.Core.Scoping; +using Umbraco.Cms.Core.Strings; +using Umbraco.Cms.Infrastructure.Persistence.Dtos; +using Umbraco.Cms.Infrastructure.Persistence.Factories; +using Umbraco.Cms.Infrastructure.Persistence.Querying; +using Umbraco.Extensions; -namespace Umbraco.Core.Persistence.Repositories.Implement +namespace Umbraco.Cms.Infrastructure.Persistence.Repositories.Implement { /// /// Represents a repository for doing CRUD operations for @@ -129,7 +131,7 @@ namespace Umbraco.Core.Persistence.Repositories.Implement return l; } - protected override Guid NodeObjectTypeId => Constants.ObjectTypes.MemberType; + protected override Guid NodeObjectTypeId => Cms.Core.Constants.ObjectTypes.MemberType; protected override void PersistNewItem(IMemberType entity) { @@ -140,15 +142,15 @@ namespace Umbraco.Core.Persistence.Repositories.Implement //set a default icon if one is not specified if (entity.Icon.IsNullOrWhiteSpace()) { - entity.Icon = Constants.Icons.Member; + entity.Icon = Cms.Core.Constants.Icons.Member; } //By Convention we add 9 standard PropertyTypes to an Umbraco MemberType - entity.AddPropertyGroup(Constants.Conventions.Member.StandardPropertiesGroupName); + entity.AddPropertyGroup(Cms.Core.Constants.Conventions.Member.StandardPropertiesGroupName); var standardPropertyTypes = ConventionsHelper.GetStandardPropertyTypeStubs(_shortStringHelper); foreach (var standardPropertyType in standardPropertyTypes) { - entity.AddPropertyType(standardPropertyType.Value, Constants.Conventions.Member.StandardPropertiesGroupName); + entity.AddPropertyType(standardPropertyType.Value, Cms.Core.Constants.Conventions.Member.StandardPropertiesGroupName); } EnsureExplicitDataTypeForBuiltInProperties(entity); diff --git a/src/Umbraco.Infrastructure/Persistence/Repositories/Implement/NotificationsRepository.cs b/src/Umbraco.Infrastructure/Persistence/Repositories/Implement/NotificationsRepository.cs index e24d964d2d..e5f3d84e2e 100644 --- a/src/Umbraco.Infrastructure/Persistence/Repositories/Implement/NotificationsRepository.cs +++ b/src/Umbraco.Infrastructure/Persistence/Repositories/Implement/NotificationsRepository.cs @@ -1,13 +1,15 @@ using System; using System.Collections.Generic; using System.Linq; -using Umbraco.Core.Models; -using Umbraco.Core.Models.Entities; -using Umbraco.Core.Models.Membership; -using Umbraco.Core.Persistence.Dtos; -using Umbraco.Core.Scoping; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Core.Models.Entities; +using Umbraco.Cms.Core.Models.Membership; +using Umbraco.Cms.Core.Persistence.Repositories; +using Umbraco.Cms.Core.Scoping; +using Umbraco.Cms.Infrastructure.Persistence.Dtos; +using Umbraco.Extensions; -namespace Umbraco.Core.Persistence.Repositories.Implement +namespace Umbraco.Cms.Infrastructure.Persistence.Repositories.Implement { public class NotificationsRepository : INotificationsRepository { diff --git a/src/Umbraco.Infrastructure/Persistence/Repositories/Implement/PartialViewMacroRepository.cs b/src/Umbraco.Infrastructure/Persistence/Repositories/Implement/PartialViewMacroRepository.cs index 03de23004e..d13e4c6945 100644 --- a/src/Umbraco.Infrastructure/Persistence/Repositories/Implement/PartialViewMacroRepository.cs +++ b/src/Umbraco.Infrastructure/Persistence/Repositories/Implement/PartialViewMacroRepository.cs @@ -1,7 +1,8 @@ -using Umbraco.Core.IO; -using Umbraco.Core.Models; +using Umbraco.Cms.Core.IO; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Core.Persistence.Repositories; -namespace Umbraco.Core.Persistence.Repositories.Implement +namespace Umbraco.Cms.Infrastructure.Persistence.Repositories.Implement { internal class PartialViewMacroRepository : PartialViewRepository, IPartialViewMacroRepository { diff --git a/src/Umbraco.Infrastructure/Persistence/Repositories/Implement/PartialViewRepository.cs b/src/Umbraco.Infrastructure/Persistence/Repositories/Implement/PartialViewRepository.cs index d327cdd78c..eee199e252 100644 --- a/src/Umbraco.Infrastructure/Persistence/Repositories/Implement/PartialViewRepository.cs +++ b/src/Umbraco.Infrastructure/Persistence/Repositories/Implement/PartialViewRepository.cs @@ -2,11 +2,12 @@ using System.IO; using System.Linq; using System.Text; -using Umbraco.Core.Composing; -using Umbraco.Core.IO; -using Umbraco.Core.Models; +using Umbraco.Cms.Core.IO; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Core.Persistence.Repositories; +using Umbraco.Extensions; -namespace Umbraco.Core.Persistence.Repositories.Implement +namespace Umbraco.Cms.Infrastructure.Persistence.Repositories.Implement { internal class PartialViewRepository : FileRepository, IPartialViewRepository { @@ -109,7 +110,7 @@ namespace Umbraco.Core.Persistence.Repositories.Implement } // validate path & extension - var validDir = Constants.SystemDirectories.MvcViews; + var validDir = Cms.Core.Constants.SystemDirectories.MvcViews; var isValidPath = _ioHelper.VerifyEditPath(fullPath, validDir); var isValidExtension = _ioHelper.VerifyFileExtension(fullPath, ValidExtensions); return isValidPath && isValidExtension; diff --git a/src/Umbraco.Infrastructure/Persistence/Repositories/Implement/PermissionRepository.cs b/src/Umbraco.Infrastructure/Persistence/Repositories/Implement/PermissionRepository.cs index 161de8c58e..34fe764203 100644 --- a/src/Umbraco.Infrastructure/Persistence/Repositories/Implement/PermissionRepository.cs +++ b/src/Umbraco.Infrastructure/Persistence/Repositories/Implement/PermissionRepository.cs @@ -2,17 +2,17 @@ using System.Collections.Generic; using System.Globalization; using System.Linq; -using NPoco; -using Umbraco.Core.Cache; -using Umbraco.Core.Exceptions; -using Umbraco.Core.Models.Entities; -using Umbraco.Core.Models.Membership; -using Umbraco.Core.Persistence.Dtos; -using Umbraco.Core.Persistence.Querying; -using Umbraco.Core.Scoping; using Microsoft.Extensions.Logging; +using NPoco; +using Umbraco.Cms.Core.Cache; +using Umbraco.Cms.Core.Models.Entities; +using Umbraco.Cms.Core.Models.Membership; +using Umbraco.Cms.Core.Persistence.Querying; +using Umbraco.Cms.Core.Scoping; +using Umbraco.Cms.Infrastructure.Persistence.Dtos; +using Umbraco.Extensions; -namespace Umbraco.Core.Persistence.Repositories.Implement +namespace Umbraco.Cms.Infrastructure.Persistence.Repositories.Implement { /// /// A (sub) repository that exposes functionality to modify assigned permissions to a node diff --git a/src/Umbraco.Infrastructure/Persistence/Repositories/Implement/PublicAccessRepository.cs b/src/Umbraco.Infrastructure/Persistence/Repositories/Implement/PublicAccessRepository.cs index 5730272dd9..c8bb10e7d9 100644 --- a/src/Umbraco.Infrastructure/Persistence/Repositories/Implement/PublicAccessRepository.cs +++ b/src/Umbraco.Infrastructure/Persistence/Repositories/Implement/PublicAccessRepository.cs @@ -3,15 +3,17 @@ using System.Collections.Generic; using System.Linq; using Microsoft.Extensions.Logging; using NPoco; -using Umbraco.Core.Cache; -using Umbraco.Core.Models; -using Umbraco.Core.Models.Entities; -using Umbraco.Core.Persistence.Dtos; -using Umbraco.Core.Persistence.Factories; -using Umbraco.Core.Persistence.Querying; -using Umbraco.Core.Scoping; +using Umbraco.Cms.Core.Cache; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Core.Persistence.Querying; +using Umbraco.Cms.Core.Persistence.Repositories; +using Umbraco.Cms.Core.Scoping; +using Umbraco.Cms.Infrastructure.Persistence.Dtos; +using Umbraco.Cms.Infrastructure.Persistence.Factories; +using Umbraco.Cms.Infrastructure.Persistence.Querying; +using Umbraco.Extensions; -namespace Umbraco.Core.Persistence.Repositories.Implement +namespace Umbraco.Cms.Infrastructure.Persistence.Repositories.Implement { internal class PublicAccessRepository : EntityRepositoryBase, IPublicAccessRepository { diff --git a/src/Umbraco.Infrastructure/Persistence/Repositories/Implement/QueryType.cs b/src/Umbraco.Infrastructure/Persistence/Repositories/Implement/QueryType.cs index 7b44bd3955..72d7d2dfcc 100644 --- a/src/Umbraco.Infrastructure/Persistence/Repositories/Implement/QueryType.cs +++ b/src/Umbraco.Infrastructure/Persistence/Repositories/Implement/QueryType.cs @@ -1,4 +1,4 @@ -namespace Umbraco.Core.Persistence.Repositories.Implement +namespace Umbraco.Cms.Infrastructure.Persistence.Repositories.Implement { /// /// Specifies the type of base query. diff --git a/src/Umbraco.Infrastructure/Persistence/Repositories/Implement/RedirectUrlRepository.cs b/src/Umbraco.Infrastructure/Persistence/Repositories/Implement/RedirectUrlRepository.cs index 84e5cb864f..5048812a3a 100644 --- a/src/Umbraco.Infrastructure/Persistence/Repositories/Implement/RedirectUrlRepository.cs +++ b/src/Umbraco.Infrastructure/Persistence/Repositories/Implement/RedirectUrlRepository.cs @@ -4,13 +4,15 @@ using System.Linq; using System.Security.Cryptography; using Microsoft.Extensions.Logging; using NPoco; -using Umbraco.Core.Cache; -using Umbraco.Core.Models; -using Umbraco.Core.Persistence.Dtos; -using Umbraco.Core.Persistence.Querying; -using Umbraco.Core.Scoping; +using Umbraco.Cms.Core.Cache; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Core.Persistence.Querying; +using Umbraco.Cms.Core.Persistence.Repositories; +using Umbraco.Cms.Core.Scoping; +using Umbraco.Cms.Infrastructure.Persistence.Dtos; +using Umbraco.Extensions; -namespace Umbraco.Core.Persistence.Repositories.Implement +namespace Umbraco.Cms.Infrastructure.Persistence.Repositories.Implement { internal class RedirectUrlRepository : EntityRepositoryBase, IRedirectUrlRepository { diff --git a/src/Umbraco.Infrastructure/Persistence/Repositories/Implement/RelationRepository.cs b/src/Umbraco.Infrastructure/Persistence/Repositories/Implement/RelationRepository.cs index 80ca2edd11..0927fe66af 100644 --- a/src/Umbraco.Infrastructure/Persistence/Repositories/Implement/RelationRepository.cs +++ b/src/Umbraco.Infrastructure/Persistence/Repositories/Implement/RelationRepository.cs @@ -3,18 +3,22 @@ using System.Collections.Generic; using System.Linq; using Microsoft.Extensions.Logging; using NPoco; -using Umbraco.Core.Cache; -using Umbraco.Core.Models; -using Umbraco.Core.Models.Entities; -using Umbraco.Core.Persistence.Dtos; -using Umbraco.Core.Persistence.Factories; -using Umbraco.Core.Persistence.Querying; -using Umbraco.Core.Persistence.SqlSyntax; -using Umbraco.Core.Scoping; -using Umbraco.Core.Services; -using static Umbraco.Core.Persistence.SqlExtensionsStatics; +using Umbraco.Cms.Core; +using Umbraco.Cms.Core.Cache; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Core.Models.Entities; +using Umbraco.Cms.Core.Persistence.Querying; +using Umbraco.Cms.Core.Persistence.Repositories; +using Umbraco.Cms.Core.Scoping; +using Umbraco.Cms.Core.Services; +using Umbraco.Cms.Infrastructure.Persistence.Dtos; +using Umbraco.Cms.Infrastructure.Persistence.Factories; +using Umbraco.Cms.Infrastructure.Persistence.Querying; +using Umbraco.Cms.Infrastructure.Persistence.SqlSyntax; +using Umbraco.Extensions; +using static Umbraco.Cms.Core.Persistence.SqlExtensionsStatics; -namespace Umbraco.Core.Persistence.Repositories.Implement +namespace Umbraco.Cms.Infrastructure.Persistence.Repositories.Implement { /// /// Represents a repository for doing CRUD operations for @@ -285,7 +289,7 @@ namespace Umbraco.Core.Persistence.Repositories.Implement var sql = GetBaseQuery(false); if (ordering == null || ordering.IsEmpty) - ordering = Ordering.By(SqlSyntax.GetQuotedColumn(Constants.DatabaseSchema.Tables.Relation, "id")); + ordering = Ordering.By(SqlSyntax.GetQuotedColumn(Cms.Core.Constants.DatabaseSchema.Tables.Relation, "id")); var translator = new SqlTranslator(sql, query); sql = translator.Translate(); @@ -334,7 +338,7 @@ namespace Umbraco.Core.Persistence.Repositories.Implement if (relationTypeAliases.Length > 0) { var template = SqlContext.Templates.Get( - Constants.SqlTemplates.RelationRepository.DeleteByParentIn, + Cms.Core.Constants.SqlTemplates.RelationRepository.DeleteByParentIn, tsql => Sql().Delete() .From() .InnerJoin().On(x => x.RelationType, x => x.Id) @@ -348,7 +352,7 @@ namespace Umbraco.Core.Persistence.Repositories.Implement else { var template = SqlContext.Templates.Get( - Constants.SqlTemplates.RelationRepository.DeleteByParentAll, + Cms.Core.Constants.SqlTemplates.RelationRepository.DeleteByParentAll, tsql => Sql().Delete() .From() .InnerJoin().On(x => x.RelationType, x => x.Id) diff --git a/src/Umbraco.Infrastructure/Persistence/Repositories/Implement/RelationTypeRepository.cs b/src/Umbraco.Infrastructure/Persistence/Repositories/Implement/RelationTypeRepository.cs index 953999eaf2..7ae651cc9e 100644 --- a/src/Umbraco.Infrastructure/Persistence/Repositories/Implement/RelationTypeRepository.cs +++ b/src/Umbraco.Infrastructure/Persistence/Repositories/Implement/RelationTypeRepository.cs @@ -3,15 +3,18 @@ using System.Collections.Generic; using System.Linq; using Microsoft.Extensions.Logging; using NPoco; -using Umbraco.Core.Cache; -using Umbraco.Core.Models; -using Umbraco.Core.Models.Entities; -using Umbraco.Core.Persistence.Dtos; -using Umbraco.Core.Persistence.Factories; -using Umbraco.Core.Persistence.Querying; -using Umbraco.Core.Scoping; +using Umbraco.Cms.Core.Cache; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Core.Models.Entities; +using Umbraco.Cms.Core.Persistence.Querying; +using Umbraco.Cms.Core.Persistence.Repositories; +using Umbraco.Cms.Core.Scoping; +using Umbraco.Cms.Infrastructure.Persistence.Dtos; +using Umbraco.Cms.Infrastructure.Persistence.Factories; +using Umbraco.Cms.Infrastructure.Persistence.Querying; +using Umbraco.Extensions; -namespace Umbraco.Core.Persistence.Repositories.Implement +namespace Umbraco.Cms.Infrastructure.Persistence.Repositories.Implement { /// /// Represents a repository for doing CRUD operations for diff --git a/src/Umbraco.Infrastructure/Persistence/Repositories/Implement/RepositoryBase.cs b/src/Umbraco.Infrastructure/Persistence/Repositories/Implement/RepositoryBase.cs index 8b9d8fe77c..6e550f9362 100644 --- a/src/Umbraco.Infrastructure/Persistence/Repositories/Implement/RepositoryBase.cs +++ b/src/Umbraco.Infrastructure/Persistence/Repositories/Implement/RepositoryBase.cs @@ -1,11 +1,12 @@ using System; using NPoco; -using Umbraco.Core.Cache; -using Umbraco.Core.Persistence.Querying; -using Umbraco.Core.Persistence.SqlSyntax; -using Umbraco.Core.Scoping; +using Umbraco.Cms.Core.Cache; +using Umbraco.Cms.Core.Persistence; +using Umbraco.Cms.Core.Persistence.Querying; +using Umbraco.Cms.Core.Scoping; +using Umbraco.Cms.Infrastructure.Persistence.SqlSyntax; -namespace Umbraco.Core.Persistence.Repositories.Implement +namespace Umbraco.Cms.Infrastructure.Persistence.Repositories.Implement { /// /// Base repository class for all instances diff --git a/src/Umbraco.Infrastructure/Persistence/Repositories/Implement/ScriptRepository.cs b/src/Umbraco.Infrastructure/Persistence/Repositories/Implement/ScriptRepository.cs index aae888e0c5..161b7a90a8 100644 --- a/src/Umbraco.Infrastructure/Persistence/Repositories/Implement/ScriptRepository.cs +++ b/src/Umbraco.Infrastructure/Persistence/Repositories/Implement/ScriptRepository.cs @@ -3,12 +3,13 @@ using System.Collections.Generic; using System.IO; using System.Linq; using Microsoft.Extensions.Options; -using Umbraco.Core.Configuration; -using Umbraco.Core.Configuration.Models; -using Umbraco.Core.IO; -using Umbraco.Core.Models; +using Umbraco.Cms.Core.Configuration.Models; +using Umbraco.Cms.Core.IO; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Core.Persistence.Repositories; +using Umbraco.Extensions; -namespace Umbraco.Core.Persistence.Repositories.Implement +namespace Umbraco.Cms.Infrastructure.Persistence.Repositories.Implement { /// /// Represents the Script Repository diff --git a/src/Umbraco.Infrastructure/Persistence/Repositories/Implement/ServerRegistrationRepository.cs b/src/Umbraco.Infrastructure/Persistence/Repositories/Implement/ServerRegistrationRepository.cs index 556f837245..44cdd445d1 100644 --- a/src/Umbraco.Infrastructure/Persistence/Repositories/Implement/ServerRegistrationRepository.cs +++ b/src/Umbraco.Infrastructure/Persistence/Repositories/Implement/ServerRegistrationRepository.cs @@ -3,15 +3,16 @@ using System.Collections.Generic; using System.Linq; using Microsoft.Extensions.Logging; using NPoco; -using Umbraco.Core.Cache; -using Umbraco.Core.Models; -using Umbraco.Core.Models.Entities; -using Umbraco.Core.Persistence.Dtos; -using Umbraco.Core.Persistence.Factories; -using Umbraco.Core.Persistence.Querying; -using Umbraco.Core.Scoping; +using Umbraco.Cms.Core.Cache; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Core.Persistence.Querying; +using Umbraco.Cms.Core.Persistence.Repositories; +using Umbraco.Cms.Core.Scoping; +using Umbraco.Cms.Infrastructure.Persistence.Dtos; +using Umbraco.Cms.Infrastructure.Persistence.Factories; +using Umbraco.Extensions; -namespace Umbraco.Core.Persistence.Repositories.Implement +namespace Umbraco.Cms.Infrastructure.Persistence.Repositories.Implement { internal class ServerRegistrationRepository : EntityRepositoryBase, IServerRegistrationRepository { diff --git a/src/Umbraco.Infrastructure/Persistence/Repositories/Implement/SimilarNodeName.cs b/src/Umbraco.Infrastructure/Persistence/Repositories/Implement/SimilarNodeName.cs index b613ea84aa..8dc8a7783d 100644 --- a/src/Umbraco.Infrastructure/Persistence/Repositories/Implement/SimilarNodeName.cs +++ b/src/Umbraco.Infrastructure/Persistence/Repositories/Implement/SimilarNodeName.cs @@ -1,9 +1,10 @@ using System.Collections.Generic; using System.Linq; using System.Text.RegularExpressions; -using static Umbraco.Core.Persistence.Repositories.Implement.SimilarNodeName; +using Umbraco.Extensions; +using static Umbraco.Cms.Infrastructure.Persistence.Repositories.Implement.SimilarNodeName; -namespace Umbraco.Core.Persistence.Repositories.Implement +namespace Umbraco.Cms.Infrastructure.Persistence.Repositories.Implement { internal class SimilarNodeName { @@ -196,7 +197,7 @@ namespace Umbraco.Core.Persistence.Repositories.Implement { Text = name; } - } + } internal bool IsEmptyName() { diff --git a/src/Umbraco.Infrastructure/Persistence/Repositories/Implement/SimpleGetRepository.cs b/src/Umbraco.Infrastructure/Persistence/Repositories/Implement/SimpleGetRepository.cs index 9ddb5c5b60..7fe013290b 100644 --- a/src/Umbraco.Infrastructure/Persistence/Repositories/Implement/SimpleGetRepository.cs +++ b/src/Umbraco.Infrastructure/Persistence/Repositories/Implement/SimpleGetRepository.cs @@ -3,13 +3,14 @@ using System.Collections.Generic; using System.Linq; using Microsoft.Extensions.Logging; using NPoco; -using Umbraco.Core.Cache; -using Umbraco.Core.Exceptions; -using Umbraco.Core.Models.Entities; -using Umbraco.Core.Persistence.Querying; -using Umbraco.Core.Scoping; +using Umbraco.Cms.Core.Cache; +using Umbraco.Cms.Core.Models.Entities; +using Umbraco.Cms.Core.Persistence.Querying; +using Umbraco.Cms.Core.Scoping; +using Umbraco.Cms.Infrastructure.Persistence.Querying; +using Umbraco.Extensions; -namespace Umbraco.Core.Persistence.Repositories.Implement +namespace Umbraco.Cms.Infrastructure.Persistence.Repositories.Implement { // TODO: Obsolete this, change all implementations of this like in Dictionary to just use custom Cache policies like in the member repository. diff --git a/src/Umbraco.Infrastructure/Persistence/Repositories/Implement/StylesheetRepository.cs b/src/Umbraco.Infrastructure/Persistence/Repositories/Implement/StylesheetRepository.cs index ecb9eef1a2..03c729b51c 100644 --- a/src/Umbraco.Infrastructure/Persistence/Repositories/Implement/StylesheetRepository.cs +++ b/src/Umbraco.Infrastructure/Persistence/Repositories/Implement/StylesheetRepository.cs @@ -4,12 +4,13 @@ using System.IO; using System.Linq; using Microsoft.Extensions.Logging; using Microsoft.Extensions.Options; -using Umbraco.Core.Configuration; -using Umbraco.Core.Configuration.Models; -using Umbraco.Core.IO; -using Umbraco.Core.Models; +using Umbraco.Cms.Core.Configuration.Models; +using Umbraco.Cms.Core.IO; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Core.Persistence.Repositories; +using Umbraco.Extensions; -namespace Umbraco.Core.Persistence.Repositories.Implement +namespace Umbraco.Cms.Infrastructure.Persistence.Repositories.Implement { /// /// Represents the Stylesheet Repository diff --git a/src/Umbraco.Infrastructure/Persistence/Repositories/Implement/TagRepository.cs b/src/Umbraco.Infrastructure/Persistence/Repositories/Implement/TagRepository.cs index 94c2f4289a..9557383347 100644 --- a/src/Umbraco.Infrastructure/Persistence/Repositories/Implement/TagRepository.cs +++ b/src/Umbraco.Infrastructure/Persistence/Repositories/Implement/TagRepository.cs @@ -4,16 +4,18 @@ using System.Linq; using System.Text; using Microsoft.Extensions.Logging; using NPoco; -using Umbraco.Core.Cache; -using Umbraco.Core.Models; -using Umbraco.Core.Models.Entities; -using Umbraco.Core.Persistence.Dtos; -using Umbraco.Core.Persistence.Factories; -using Umbraco.Core.Persistence.Querying; -using Umbraco.Core.Scoping; -using static Umbraco.Core.Persistence.SqlExtensionsStatics; +using Umbraco.Cms.Core.Cache; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Core.Persistence.Querying; +using Umbraco.Cms.Core.Persistence.Repositories; +using Umbraco.Cms.Core.Scoping; +using Umbraco.Cms.Infrastructure.Persistence.Dtos; +using Umbraco.Cms.Infrastructure.Persistence.Factories; +using Umbraco.Cms.Infrastructure.Persistence.Querying; +using Umbraco.Extensions; +using static Umbraco.Cms.Core.Persistence.SqlExtensionsStatics; -namespace Umbraco.Core.Persistence.Repositories.Implement +namespace Umbraco.Cms.Infrastructure.Persistence.Repositories.Implement { internal class TagRepository : EntityRepositoryBase, ITagRepository { @@ -517,11 +519,11 @@ WHERE r.tagId IS NULL"; switch (type) { case TaggableObjectTypes.Content: - return Constants.ObjectTypes.Document; + return Cms.Core.Constants.ObjectTypes.Document; case TaggableObjectTypes.Media: - return Constants.ObjectTypes.Media; + return Cms.Core.Constants.ObjectTypes.Media; case TaggableObjectTypes.Member: - return Constants.ObjectTypes.Member; + return Cms.Core.Constants.ObjectTypes.Member; default: throw new ArgumentOutOfRangeException(nameof(type)); } diff --git a/src/Umbraco.Infrastructure/Persistence/Repositories/Implement/TemplateRepository.cs b/src/Umbraco.Infrastructure/Persistence/Repositories/Implement/TemplateRepository.cs index d391bb9e4d..e39a5eb7b7 100644 --- a/src/Umbraco.Infrastructure/Persistence/Repositories/Implement/TemplateRepository.cs +++ b/src/Umbraco.Infrastructure/Persistence/Repositories/Implement/TemplateRepository.cs @@ -5,17 +5,20 @@ using System.Linq; using System.Text; using Microsoft.Extensions.Logging; using NPoco; -using Umbraco.Core.Cache; -using Umbraco.Core.IO; -using Umbraco.Core.Models; -using Umbraco.Core.Models.Entities; -using Umbraco.Core.Persistence.Dtos; -using Umbraco.Core.Persistence.Factories; -using Umbraco.Core.Persistence.Querying; -using Umbraco.Core.Scoping; -using Umbraco.Core.Strings; +using Umbraco.Cms.Core.Cache; +using Umbraco.Cms.Core.IO; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Core.Models.Entities; +using Umbraco.Cms.Core.Persistence.Querying; +using Umbraco.Cms.Core.Persistence.Repositories; +using Umbraco.Cms.Core.Scoping; +using Umbraco.Cms.Core.Strings; +using Umbraco.Cms.Infrastructure.Persistence.Dtos; +using Umbraco.Cms.Infrastructure.Persistence.Factories; +using Umbraco.Cms.Infrastructure.Persistence.Querying; +using Umbraco.Extensions; -namespace Umbraco.Core.Persistence.Repositories.Implement +namespace Umbraco.Cms.Infrastructure.Persistence.Repositories.Implement { /// /// Represents the Template Repository @@ -120,24 +123,24 @@ namespace Umbraco.Core.Persistence.Repositories.Implement protected override string GetBaseWhereClause() { - return Constants.DatabaseSchema.Tables.Node + ".id = @id"; + return Cms.Core.Constants.DatabaseSchema.Tables.Node + ".id = @id"; } protected override IEnumerable GetDeleteClauses() { var list = new List { - "DELETE FROM " + Constants.DatabaseSchema.Tables.User2NodeNotify + " WHERE nodeId = @id", - "DELETE FROM " + Constants.DatabaseSchema.Tables.UserGroup2NodePermission + " WHERE nodeId = @id", - "UPDATE " + Constants.DatabaseSchema.Tables.DocumentVersion + " SET templateId = NULL WHERE templateId = @id", - "DELETE FROM " + Constants.DatabaseSchema.Tables.DocumentType + " WHERE templateNodeId = @id", - "DELETE FROM " + Constants.DatabaseSchema.Tables.Template + " WHERE nodeId = @id", - "DELETE FROM " + Constants.DatabaseSchema.Tables.Node + " WHERE id = @id" + "DELETE FROM " + Cms.Core.Constants.DatabaseSchema.Tables.User2NodeNotify + " WHERE nodeId = @id", + "DELETE FROM " + Cms.Core.Constants.DatabaseSchema.Tables.UserGroup2NodePermission + " WHERE nodeId = @id", + "UPDATE " + Cms.Core.Constants.DatabaseSchema.Tables.DocumentVersion + " SET templateId = NULL WHERE templateId = @id", + "DELETE FROM " + Cms.Core.Constants.DatabaseSchema.Tables.DocumentType + " WHERE templateNodeId = @id", + "DELETE FROM " + Cms.Core.Constants.DatabaseSchema.Tables.Template + " WHERE nodeId = @id", + "DELETE FROM " + Cms.Core.Constants.DatabaseSchema.Tables.Node + " WHERE id = @id" }; return list; } - protected override Guid NodeObjectTypeId => Constants.ObjectTypes.Template; + protected override Guid NodeObjectTypeId => Cms.Core.Constants.ObjectTypes.Template; protected override void PersistNewItem(ITemplate entity) { @@ -587,7 +590,7 @@ namespace Umbraco.Core.Persistence.Repositories.Implement var path = template.VirtualPath; // get valid paths - var validDirs = new[] { Constants.SystemDirectories.MvcViews }; + var validDirs = new[] { Cms.Core.Constants.SystemDirectories.MvcViews }; // get valid extensions var validExts = new List(); diff --git a/src/Umbraco.Infrastructure/Persistence/Repositories/Implement/TupleExtensions.cs b/src/Umbraco.Infrastructure/Persistence/Repositories/Implement/TupleExtensions.cs index c40060456c..a5a3fe4f21 100644 --- a/src/Umbraco.Infrastructure/Persistence/Repositories/Implement/TupleExtensions.cs +++ b/src/Umbraco.Infrastructure/Persistence/Repositories/Implement/TupleExtensions.cs @@ -2,7 +2,7 @@ using System.Collections.Generic; using System.Linq; -namespace Umbraco.Core.Persistence.Repositories.Implement +namespace Umbraco.Cms.Infrastructure.Persistence.Repositories.Implement { static class TupleExtensions { diff --git a/src/Umbraco.Infrastructure/Persistence/Repositories/Implement/UserGroupRepository.cs b/src/Umbraco.Infrastructure/Persistence/Repositories/Implement/UserGroupRepository.cs index 4786548e57..d396fdcff7 100644 --- a/src/Umbraco.Infrastructure/Persistence/Repositories/Implement/UserGroupRepository.cs +++ b/src/Umbraco.Infrastructure/Persistence/Repositories/Implement/UserGroupRepository.cs @@ -3,17 +3,20 @@ using System.Collections.Generic; using System.Linq; using Microsoft.Extensions.Logging; using NPoco; -using Umbraco.Core.Cache; -using Umbraco.Core.Models; -using Umbraco.Core.Models.Entities; -using Umbraco.Core.Models.Membership; -using Umbraco.Core.Persistence.Dtos; -using Umbraco.Core.Persistence.Factories; -using Umbraco.Core.Persistence.Querying; -using Umbraco.Core.Scoping; -using Umbraco.Core.Strings; +using Umbraco.Cms.Core.Cache; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Core.Models.Entities; +using Umbraco.Cms.Core.Models.Membership; +using Umbraco.Cms.Core.Persistence.Querying; +using Umbraco.Cms.Core.Persistence.Repositories; +using Umbraco.Cms.Core.Scoping; +using Umbraco.Cms.Core.Strings; +using Umbraco.Cms.Infrastructure.Persistence.Dtos; +using Umbraco.Cms.Infrastructure.Persistence.Factories; +using Umbraco.Cms.Infrastructure.Persistence.Querying; +using Umbraco.Extensions; -namespace Umbraco.Core.Persistence.Repositories.Implement +namespace Umbraco.Cms.Infrastructure.Persistence.Repositories.Implement { /// /// Represents the UserGroupRepository for doing CRUD operations for diff --git a/src/Umbraco.Infrastructure/Persistence/Repositories/Implement/UserRepository.cs b/src/Umbraco.Infrastructure/Persistence/Repositories/Implement/UserRepository.cs index 1557dcc1d1..80201360c3 100644 --- a/src/Umbraco.Infrastructure/Persistence/Repositories/Implement/UserRepository.cs +++ b/src/Umbraco.Infrastructure/Persistence/Repositories/Implement/UserRepository.cs @@ -6,19 +6,22 @@ using System.Text; using Microsoft.Extensions.Logging; using Microsoft.Extensions.Options; using NPoco; -using Umbraco.Core.Cache; -using Umbraco.Core.Configuration; -using Umbraco.Core.Configuration.Models; -using Umbraco.Core.Models.Entities; -using Umbraco.Core.Models.Membership; -using Umbraco.Core.Persistence.Dtos; -using Umbraco.Core.Persistence.Factories; -using Umbraco.Core.Persistence.Mappers; -using Umbraco.Core.Persistence.Querying; -using Umbraco.Core.Scoping; -using Umbraco.Core.Serialization; +using Umbraco.Cms.Core; +using Umbraco.Cms.Core.Cache; +using Umbraco.Cms.Core.Configuration.Models; +using Umbraco.Cms.Core.Models.Entities; +using Umbraco.Cms.Core.Models.Membership; +using Umbraco.Cms.Core.Persistence.Querying; +using Umbraco.Cms.Core.Persistence.Repositories; +using Umbraco.Cms.Core.Scoping; +using Umbraco.Cms.Core.Serialization; +using Umbraco.Cms.Infrastructure.Persistence.Dtos; +using Umbraco.Cms.Infrastructure.Persistence.Factories; +using Umbraco.Cms.Infrastructure.Persistence.Mappers; +using Umbraco.Cms.Infrastructure.Persistence.Querying; +using Umbraco.Extensions; -namespace Umbraco.Core.Persistence.Repositories.Implement +namespace Umbraco.Cms.Infrastructure.Persistence.Repositories.Implement { /// /// Represents the UserRepository for doing CRUD operations for @@ -168,7 +171,7 @@ ORDER BY colName"; } public Guid CreateLoginSession(int userId, string requestingIpAddress, bool cleanStaleSessions = true) - { + { var now = DateTime.UtcNow; var dto = new UserLoginDto { diff --git a/src/Umbraco.Infrastructure/Persistence/SqlContext.cs b/src/Umbraco.Infrastructure/Persistence/SqlContext.cs index 6f9f91114c..e1ced4f375 100644 --- a/src/Umbraco.Infrastructure/Persistence/SqlContext.cs +++ b/src/Umbraco.Infrastructure/Persistence/SqlContext.cs @@ -1,11 +1,13 @@ using System; using System.Linq; using NPoco; -using Umbraco.Core.Persistence.Mappers; -using Umbraco.Core.Persistence.Querying; -using Umbraco.Core.Persistence.SqlSyntax; +using Umbraco.Cms.Core.Persistence.Querying; +using Umbraco.Cms.Infrastructure.Persistence.Mappers; +using Umbraco.Cms.Infrastructure.Persistence.Querying; +using Umbraco.Cms.Infrastructure.Persistence.SqlSyntax; +using MapperCollection = Umbraco.Cms.Infrastructure.Persistence.Mappers.MapperCollection; -namespace Umbraco.Core.Persistence +namespace Umbraco.Cms.Infrastructure.Persistence { /// /// Implements . @@ -22,7 +24,7 @@ namespace Umbraco.Core.Persistence /// The database type. /// The mappers. public SqlContext(ISqlSyntaxProvider sqlSyntax, DatabaseType databaseType, IPocoDataFactory pocoDataFactory, IMapperCollection mappers = null) - : this(sqlSyntax, databaseType, pocoDataFactory, new Lazy(() => mappers ?? new Mappers.MapperCollection(Enumerable.Empty()))) + : this(sqlSyntax, databaseType, pocoDataFactory, new Lazy(() => mappers ?? new MapperCollection(Enumerable.Empty()))) { } /// diff --git a/src/Umbraco.Infrastructure/Persistence/SqlContextExtensions.cs b/src/Umbraco.Infrastructure/Persistence/SqlContextExtensions.cs index 249e2cafd0..3dce72f592 100644 --- a/src/Umbraco.Infrastructure/Persistence/SqlContextExtensions.cs +++ b/src/Umbraco.Infrastructure/Persistence/SqlContextExtensions.cs @@ -1,8 +1,9 @@ using System; using System.Linq.Expressions; -using Umbraco.Core.Persistence.Querying; +using Umbraco.Cms.Infrastructure.Persistence; +using Umbraco.Cms.Infrastructure.Persistence.Querying; -namespace Umbraco.Core.Persistence +namespace Umbraco.Extensions { /// /// Provides extension methods to . diff --git a/src/Umbraco.Infrastructure/Persistence/SqlServerBulkSqlInsertProvider.cs b/src/Umbraco.Infrastructure/Persistence/SqlServerBulkSqlInsertProvider.cs index e8126dd7f5..8b80010335 100644 --- a/src/Umbraco.Infrastructure/Persistence/SqlServerBulkSqlInsertProvider.cs +++ b/src/Umbraco.Infrastructure/Persistence/SqlServerBulkSqlInsertProvider.cs @@ -4,16 +4,17 @@ using System.Data; using System.Data.SqlClient; using System.Linq; using NPoco; -using Umbraco.Core.Persistence.SqlSyntax; +using Umbraco.Cms.Infrastructure.Persistence.SqlSyntax; +using Umbraco.Extensions; -namespace Umbraco.Core.Persistence +namespace Umbraco.Cms.Infrastructure.Persistence { /// /// A bulk sql insert provider for Sql Server /// public class SqlServerBulkSqlInsertProvider : IBulkSqlInsertProvider { - public string ProviderName => Constants.DatabaseProviders.SqlServer; + public string ProviderName => Cms.Core.Constants.DatabaseProviders.SqlServer; public int BulkInsertRecords(IUmbracoDatabase database, IEnumerable records) { diff --git a/src/Umbraco.Infrastructure/Persistence/SqlServerDbProviderFactoryCreator.cs b/src/Umbraco.Infrastructure/Persistence/SqlServerDbProviderFactoryCreator.cs index 68d0ec3d90..a036321c38 100644 --- a/src/Umbraco.Infrastructure/Persistence/SqlServerDbProviderFactoryCreator.cs +++ b/src/Umbraco.Infrastructure/Persistence/SqlServerDbProviderFactoryCreator.cs @@ -1,8 +1,8 @@ using System; using System.Data.Common; -using Umbraco.Core.Persistence.SqlSyntax; +using Umbraco.Cms.Infrastructure.Persistence.SqlSyntax; -namespace Umbraco.Core.Persistence +namespace Umbraco.Cms.Infrastructure.Persistence { public class SqlServerDbProviderFactoryCreator : IDbProviderFactoryCreator { @@ -24,8 +24,8 @@ namespace Umbraco.Core.Persistence { return providerName switch { - Constants.DbProviderNames.SqlCe => throw new NotSupportedException("SqlCe is not supported"), - Constants.DbProviderNames.SqlServer => new SqlServerSyntaxProvider(), + Cms.Core.Constants.DbProviderNames.SqlCe => throw new NotSupportedException("SqlCe is not supported"), + Cms.Core.Constants.DbProviderNames.SqlServer => new SqlServerSyntaxProvider(), _ => throw new InvalidOperationException($"Unknown provider name \"{providerName}\""), }; } @@ -34,9 +34,9 @@ namespace Umbraco.Core.Persistence { switch (providerName) { - case Constants.DbProviderNames.SqlCe: + case Cms.Core.Constants.DbProviderNames.SqlCe: throw new NotSupportedException("SqlCe is not supported"); - case Constants.DbProviderNames.SqlServer: + case Cms.Core.Constants.DbProviderNames.SqlServer: return new SqlServerBulkSqlInsertProvider(); default: return new BasicBulkSqlInsertProvider(); diff --git a/src/Umbraco.Infrastructure/Persistence/SqlSyntax/ColumnInfo.cs b/src/Umbraco.Infrastructure/Persistence/SqlSyntax/ColumnInfo.cs index 6ca0805158..46d21e5894 100644 --- a/src/Umbraco.Infrastructure/Persistence/SqlSyntax/ColumnInfo.cs +++ b/src/Umbraco.Infrastructure/Persistence/SqlSyntax/ColumnInfo.cs @@ -1,4 +1,4 @@ -namespace Umbraco.Core.Persistence.SqlSyntax +namespace Umbraco.Cms.Infrastructure.Persistence.SqlSyntax { public class ColumnInfo { diff --git a/src/Umbraco.Infrastructure/Persistence/SqlSyntax/DbTypes.cs b/src/Umbraco.Infrastructure/Persistence/SqlSyntax/DbTypes.cs index 1402c6562b..004c4f11f4 100644 --- a/src/Umbraco.Infrastructure/Persistence/SqlSyntax/DbTypes.cs +++ b/src/Umbraco.Infrastructure/Persistence/SqlSyntax/DbTypes.cs @@ -2,7 +2,7 @@ using System.Collections.Generic; using System.Data; -namespace Umbraco.Core.Persistence.SqlSyntax +namespace Umbraco.Cms.Infrastructure.Persistence.SqlSyntax { public class DbTypes { diff --git a/src/Umbraco.Infrastructure/Persistence/SqlSyntax/ISqlSyntaxProvider.cs b/src/Umbraco.Infrastructure/Persistence/SqlSyntax/ISqlSyntaxProvider.cs index f37e22fc0a..37038255a0 100644 --- a/src/Umbraco.Infrastructure/Persistence/SqlSyntax/ISqlSyntaxProvider.cs +++ b/src/Umbraco.Infrastructure/Persistence/SqlSyntax/ISqlSyntaxProvider.cs @@ -3,11 +3,11 @@ using System.Collections.Generic; using System.Data; using System.Text.RegularExpressions; using NPoco; -using Umbraco.Core.Persistence.DatabaseAnnotations; -using Umbraco.Core.Persistence.DatabaseModelDefinitions; -using Umbraco.Core.Persistence.Querying; +using Umbraco.Cms.Infrastructure.Persistence.DatabaseAnnotations; +using Umbraco.Cms.Infrastructure.Persistence.DatabaseModelDefinitions; +using Umbraco.Cms.Infrastructure.Persistence.Querying; -namespace Umbraco.Core.Persistence.SqlSyntax +namespace Umbraco.Cms.Infrastructure.Persistence.SqlSyntax { /// /// Defines an SqlSyntaxProvider diff --git a/src/Umbraco.Infrastructure/Persistence/SqlSyntax/MicrosoftSqlSyntaxProviderBase.cs b/src/Umbraco.Infrastructure/Persistence/SqlSyntax/MicrosoftSqlSyntaxProviderBase.cs index be7b2cf069..8a80a33ad0 100644 --- a/src/Umbraco.Infrastructure/Persistence/SqlSyntax/MicrosoftSqlSyntaxProviderBase.cs +++ b/src/Umbraco.Infrastructure/Persistence/SqlSyntax/MicrosoftSqlSyntaxProviderBase.cs @@ -1,9 +1,9 @@ using System; using System.Data; using System.Linq; -using Umbraco.Core.Persistence.Querying; +using Umbraco.Cms.Infrastructure.Persistence.Querying; -namespace Umbraco.Core.Persistence.SqlSyntax +namespace Umbraco.Cms.Infrastructure.Persistence.SqlSyntax { /// /// Abstract class for defining MS sql implementations diff --git a/src/Umbraco.Infrastructure/Persistence/SqlSyntax/SqlServerSyntaxProvider.cs b/src/Umbraco.Infrastructure/Persistence/SqlSyntax/SqlServerSyntaxProvider.cs index 2c0a4c7c63..58a283a142 100644 --- a/src/Umbraco.Infrastructure/Persistence/SqlSyntax/SqlServerSyntaxProvider.cs +++ b/src/Umbraco.Infrastructure/Persistence/SqlSyntax/SqlServerSyntaxProvider.cs @@ -5,16 +5,17 @@ using System.Data.SqlClient; using System.Linq; using Microsoft.Extensions.Logging; using NPoco; -using Umbraco.Core.Persistence.DatabaseModelDefinitions; +using Umbraco.Cms.Infrastructure.Persistence.DatabaseModelDefinitions; +using Umbraco.Extensions; -namespace Umbraco.Core.Persistence.SqlSyntax +namespace Umbraco.Cms.Infrastructure.Persistence.SqlSyntax { /// /// Represents an SqlSyntaxProvider for Sql Server. /// public class SqlServerSyntaxProvider : MicrosoftSqlSyntaxProviderBase { - public override string ProviderName => Constants.DatabaseProviders.SqlServer; + public override string ProviderName => Cms.Core.Constants.DatabaseProviders.SqlServer; public ServerVersionInfo ServerVersion { get; private set; } diff --git a/src/Umbraco.Infrastructure/Persistence/SqlSyntax/SqlServerVersionName.cs b/src/Umbraco.Infrastructure/Persistence/SqlSyntax/SqlServerVersionName.cs index 86ef343786..a3efde1731 100644 --- a/src/Umbraco.Infrastructure/Persistence/SqlSyntax/SqlServerVersionName.cs +++ b/src/Umbraco.Infrastructure/Persistence/SqlSyntax/SqlServerVersionName.cs @@ -1,4 +1,4 @@ -namespace Umbraco.Core.Persistence.SqlSyntax +namespace Umbraco.Cms.Infrastructure.Persistence.SqlSyntax { /// /// Represents the version name of SQL server (i.e. the year 2008, 2005, etc...) diff --git a/src/Umbraco.Infrastructure/Persistence/SqlSyntax/SqlSyntaxProviderBase.cs b/src/Umbraco.Infrastructure/Persistence/SqlSyntax/SqlSyntaxProviderBase.cs index a9377d696b..f926a9d60f 100644 --- a/src/Umbraco.Infrastructure/Persistence/SqlSyntax/SqlSyntaxProviderBase.cs +++ b/src/Umbraco.Infrastructure/Persistence/SqlSyntax/SqlSyntaxProviderBase.cs @@ -6,11 +6,12 @@ using System.Linq; using System.Text; using System.Text.RegularExpressions; using NPoco; -using Umbraco.Core.Persistence.DatabaseAnnotations; -using Umbraco.Core.Persistence.DatabaseModelDefinitions; -using Umbraco.Core.Persistence.Querying; +using Umbraco.Cms.Infrastructure.Persistence.DatabaseAnnotations; +using Umbraco.Cms.Infrastructure.Persistence.DatabaseModelDefinitions; +using Umbraco.Cms.Infrastructure.Persistence.Querying; +using Umbraco.Extensions; -namespace Umbraco.Core.Persistence.SqlSyntax +namespace Umbraco.Cms.Infrastructure.Persistence.SqlSyntax { /// /// Represents the Base Sql Syntax provider implementation. diff --git a/src/Umbraco.Infrastructure/Persistence/SqlSyntax/SqlSyntaxProviderExtensions.cs b/src/Umbraco.Infrastructure/Persistence/SqlSyntax/SqlSyntaxProviderExtensions.cs index b829f1fbc5..9a28686ced 100644 --- a/src/Umbraco.Infrastructure/Persistence/SqlSyntax/SqlSyntaxProviderExtensions.cs +++ b/src/Umbraco.Infrastructure/Persistence/SqlSyntax/SqlSyntaxProviderExtensions.cs @@ -1,9 +1,9 @@ -using NPoco; -using System.Collections.Generic; +using System.Collections.Generic; using System.Linq; -using Umbraco.Core.Persistence.DatabaseModelDefinitions; +using NPoco; +using Umbraco.Cms.Infrastructure.Persistence.DatabaseModelDefinitions; -namespace Umbraco.Core.Persistence.SqlSyntax +namespace Umbraco.Cms.Infrastructure.Persistence.SqlSyntax { internal static class SqlSyntaxProviderExtensions { diff --git a/src/Umbraco.Infrastructure/Persistence/SqlSyntaxExtensions.cs b/src/Umbraco.Infrastructure/Persistence/SqlSyntaxExtensions.cs index 2fba8e7d49..93978cee8b 100644 --- a/src/Umbraco.Infrastructure/Persistence/SqlSyntaxExtensions.cs +++ b/src/Umbraco.Infrastructure/Persistence/SqlSyntaxExtensions.cs @@ -2,9 +2,10 @@ using System.Linq.Expressions; using System.Reflection; using NPoco; -using Umbraco.Core.Persistence.SqlSyntax; +using Umbraco.Cms.Core; +using Umbraco.Cms.Infrastructure.Persistence.SqlSyntax; -namespace Umbraco.Core.Persistence +namespace Umbraco.Extensions { /// /// Provides extension methods to . diff --git a/src/Umbraco.Infrastructure/Persistence/SqlTemplate.cs b/src/Umbraco.Infrastructure/Persistence/SqlTemplate.cs index 6a7d1a8d6c..8939a44cbe 100644 --- a/src/Umbraco.Infrastructure/Persistence/SqlTemplate.cs +++ b/src/Umbraco.Infrastructure/Persistence/SqlTemplate.cs @@ -3,8 +3,9 @@ using System.Collections; using System.Collections.Generic; using System.Linq; using NPoco; +using Umbraco.Extensions; -namespace Umbraco.Core.Persistence +namespace Umbraco.Cms.Infrastructure.Persistence { public class SqlTemplate { diff --git a/src/Umbraco.Infrastructure/Persistence/SqlTemplates.cs b/src/Umbraco.Infrastructure/Persistence/SqlTemplates.cs index 021f3a4670..3c180b439f 100644 --- a/src/Umbraco.Infrastructure/Persistence/SqlTemplates.cs +++ b/src/Umbraco.Infrastructure/Persistence/SqlTemplates.cs @@ -2,7 +2,7 @@ using System.Collections.Concurrent; using NPoco; -namespace Umbraco.Core.Persistence +namespace Umbraco.Cms.Infrastructure.Persistence { public class SqlTemplates { diff --git a/src/Umbraco.Infrastructure/Persistence/UmbracoDatabase.cs b/src/Umbraco.Infrastructure/Persistence/UmbracoDatabase.cs index 74aba854e3..aecd0f4c2b 100644 --- a/src/Umbraco.Infrastructure/Persistence/UmbracoDatabase.cs +++ b/src/Umbraco.Infrastructure/Persistence/UmbracoDatabase.cs @@ -7,10 +7,11 @@ using System.Text; using Microsoft.Extensions.Logging; using NPoco; using StackExchange.Profiling; -using Umbraco.Core.Migrations.Install; -using Umbraco.Core.Persistence.FaultHandling; +using Umbraco.Cms.Infrastructure.Migrations.Install; +using Umbraco.Cms.Infrastructure.Persistence.FaultHandling; +using Umbraco.Extensions; -namespace Umbraco.Core.Persistence +namespace Umbraco.Cms.Infrastructure.Persistence { /// /// Extends NPoco Database for Umbraco. diff --git a/src/Umbraco.Infrastructure/Persistence/UmbracoDatabaseExtensions.cs b/src/Umbraco.Infrastructure/Persistence/UmbracoDatabaseExtensions.cs index 204f904f68..f2cc2031d5 100644 --- a/src/Umbraco.Infrastructure/Persistence/UmbracoDatabaseExtensions.cs +++ b/src/Umbraco.Infrastructure/Persistence/UmbracoDatabaseExtensions.cs @@ -1,8 +1,9 @@ using System; using System.Linq; -using Umbraco.Core.Persistence.Dtos; +using Umbraco.Cms.Infrastructure.Persistence.Dtos; +using Umbraco.Extensions; -namespace Umbraco.Core.Persistence +namespace Umbraco.Cms.Infrastructure.Persistence { internal static class UmbracoDatabaseExtensions { diff --git a/src/Umbraco.Infrastructure/Persistence/UmbracoDatabaseFactory.cs b/src/Umbraco.Infrastructure/Persistence/UmbracoDatabaseFactory.cs index 69c8975ed5..581517326f 100644 --- a/src/Umbraco.Infrastructure/Persistence/UmbracoDatabaseFactory.cs +++ b/src/Umbraco.Infrastructure/Persistence/UmbracoDatabaseFactory.cs @@ -5,13 +5,15 @@ using Microsoft.Extensions.Logging; using Microsoft.Extensions.Options; using NPoco; using NPoco.FluentMappings; -using Umbraco.Core.Configuration.Models; -using Umbraco.Core.Migrations.Install; -using Umbraco.Core.Persistence.FaultHandling; -using Umbraco.Core.Persistence.Mappers; -using Umbraco.Core.Persistence.SqlSyntax; +using Umbraco.Cms.Core; +using Umbraco.Cms.Core.Configuration.Models; +using Umbraco.Cms.Infrastructure.Migrations.Install; +using Umbraco.Cms.Infrastructure.Persistence.FaultHandling; +using Umbraco.Cms.Infrastructure.Persistence.Mappers; +using Umbraco.Cms.Infrastructure.Persistence.SqlSyntax; +using Umbraco.Extensions; -namespace Umbraco.Core.Persistence +namespace Umbraco.Cms.Infrastructure.Persistence { /// /// Default implementation of . diff --git a/src/Umbraco.Infrastructure/Persistence/UmbracoPocoDataBuilder.cs b/src/Umbraco.Infrastructure/Persistence/UmbracoPocoDataBuilder.cs index db99d55b3d..3e34a77d7b 100644 --- a/src/Umbraco.Infrastructure/Persistence/UmbracoPocoDataBuilder.cs +++ b/src/Umbraco.Infrastructure/Persistence/UmbracoPocoDataBuilder.cs @@ -1,9 +1,9 @@ using System; using System.Reflection; using NPoco; -using Umbraco.Core.Persistence.Dtos; +using Umbraco.Cms.Infrastructure.Persistence.Dtos; -namespace Umbraco.Core.Persistence +namespace Umbraco.Cms.Infrastructure.Persistence { /// /// Umbraco's implementation of NPoco . diff --git a/src/Umbraco.Infrastructure/PropertyEditors/BlockEditorPropertyEditor.cs b/src/Umbraco.Infrastructure/PropertyEditors/BlockEditorPropertyEditor.cs index 81281a3302..4e8483d5fc 100644 --- a/src/Umbraco.Infrastructure/PropertyEditors/BlockEditorPropertyEditor.cs +++ b/src/Umbraco.Infrastructure/PropertyEditors/BlockEditorPropertyEditor.cs @@ -1,22 +1,22 @@ -using System; +// Copyright (c) Umbraco. +// See LICENSE for more details. + +using System; using System.Collections.Generic; using System.ComponentModel.DataAnnotations; using System.Linq; using Microsoft.Extensions.Logging; using Newtonsoft.Json; -using Umbraco.Core; -using Umbraco.Core.Models; -using Umbraco.Core.Models.Blocks; -using Umbraco.Core.Models.Editors; -using Umbraco.Core.PropertyEditors; -using Umbraco.Core.Serialization; -using Umbraco.Core.Services; -using Umbraco.Core.Strings; -using static Umbraco.Core.Models.Blocks.BlockItemData; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Core.Models.Blocks; +using Umbraco.Cms.Core.Models.Editors; +using Umbraco.Cms.Core.Serialization; +using Umbraco.Cms.Core.Services; +using Umbraco.Cms.Core.Strings; +using Umbraco.Extensions; -namespace Umbraco.Web.PropertyEditors +namespace Umbraco.Cms.Core.PropertyEditors { - /// /// Abstract class for block editor based editors /// @@ -314,7 +314,7 @@ namespace Umbraco.Web.PropertyEditors if (!row.PropertyValues.ContainsKey(elementTypeProp.Alias)) { // set values to null - row.PropertyValues[elementTypeProp.Alias] = new BlockPropertyValue(null, elementTypeProp); + row.PropertyValues[elementTypeProp.Alias] = new BlockItemData.BlockPropertyValue(null, elementTypeProp); row.RawPropertyValues[elementTypeProp.Alias] = null; } } @@ -398,7 +398,7 @@ namespace Umbraco.Web.PropertyEditors if (!contentTypePropertyTypes.TryGetValue(contentType.Alias, out var propertyTypes)) propertyTypes = contentTypePropertyTypes[contentType.Alias] = contentType.CompositionPropertyTypes.ToDictionary(x => x.Alias, x => x); - var propValues = new Dictionary(); + var propValues = new Dictionary(); // find any keys that are not real property types and remove them foreach (var prop in block.RawPropertyValues.ToList()) @@ -413,7 +413,7 @@ namespace Umbraco.Web.PropertyEditors else { // set the value to include the resolved property type - propValues[prop.Key] = new BlockPropertyValue(prop.Value, propType); + propValues[prop.Key] = new BlockItemData.BlockPropertyValue(prop.Value, propType); } } diff --git a/src/Umbraco.Infrastructure/PropertyEditors/BlockListConfigurationEditor.cs b/src/Umbraco.Infrastructure/PropertyEditors/BlockListConfigurationEditor.cs index 050bcfbfd2..68c3f778dc 100644 --- a/src/Umbraco.Infrastructure/PropertyEditors/BlockListConfigurationEditor.cs +++ b/src/Umbraco.Infrastructure/PropertyEditors/BlockListConfigurationEditor.cs @@ -1,7 +1,9 @@ -using Umbraco.Core.IO; -using Umbraco.Core.PropertyEditors; +// Copyright (c) Umbraco. +// See LICENSE for more details. -namespace Umbraco.Web.PropertyEditors +using Umbraco.Cms.Core.IO; + +namespace Umbraco.Cms.Core.PropertyEditors { internal class BlockListConfigurationEditor : ConfigurationEditor { diff --git a/src/Umbraco.Infrastructure/PropertyEditors/BlockListPropertyEditor.cs b/src/Umbraco.Infrastructure/PropertyEditors/BlockListPropertyEditor.cs index 1657b4098d..6d2bbd4eff 100644 --- a/src/Umbraco.Infrastructure/PropertyEditors/BlockListPropertyEditor.cs +++ b/src/Umbraco.Infrastructure/PropertyEditors/BlockListPropertyEditor.cs @@ -1,13 +1,14 @@ -using System; -using Microsoft.Extensions.Logging; -using Umbraco.Core; -using Umbraco.Core.IO; -using Umbraco.Core.PropertyEditors; -using Umbraco.Core.Serialization; -using Umbraco.Core.Services; -using Umbraco.Core.Strings; +// Copyright (c) Umbraco. +// See LICENSE for more details. -namespace Umbraco.Web.PropertyEditors +using System; +using Microsoft.Extensions.Logging; +using Umbraco.Cms.Core.IO; +using Umbraco.Cms.Core.Serialization; +using Umbraco.Cms.Core.Services; +using Umbraco.Cms.Core.Strings; + +namespace Umbraco.Cms.Core.PropertyEditors { /// /// Represents a block list property editor. diff --git a/src/Umbraco.Infrastructure/PropertyEditors/CheckBoxListPropertyEditor.cs b/src/Umbraco.Infrastructure/PropertyEditors/CheckBoxListPropertyEditor.cs index 27d729e319..b7a825b01b 100644 --- a/src/Umbraco.Infrastructure/PropertyEditors/CheckBoxListPropertyEditor.cs +++ b/src/Umbraco.Infrastructure/PropertyEditors/CheckBoxListPropertyEditor.cs @@ -1,12 +1,14 @@ -using Microsoft.Extensions.Logging; -using Umbraco.Core; -using Umbraco.Core.IO; -using Umbraco.Core.PropertyEditors; -using Umbraco.Core.Serialization; -using Umbraco.Core.Services; -using Umbraco.Core.Strings; +// Copyright (c) Umbraco. +// See LICENSE for more details. -namespace Umbraco.Web.PropertyEditors +using Microsoft.Extensions.Logging; +using Umbraco.Cms.Core.IO; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Core.Serialization; +using Umbraco.Cms.Core.Services; +using Umbraco.Cms.Core.Strings; + +namespace Umbraco.Cms.Core.PropertyEditors { /// /// A property editor to allow multiple checkbox selection of pre-defined items. diff --git a/src/Umbraco.Infrastructure/PropertyEditors/ColorPickerConfigurationEditor.cs b/src/Umbraco.Infrastructure/PropertyEditors/ColorPickerConfigurationEditor.cs index f5776b7c28..36f11f5ce8 100644 --- a/src/Umbraco.Infrastructure/PropertyEditors/ColorPickerConfigurationEditor.cs +++ b/src/Umbraco.Infrastructure/PropertyEditors/ColorPickerConfigurationEditor.cs @@ -1,15 +1,17 @@ -using System.Collections.Generic; +// Copyright (c) Umbraco. +// See LICENSE for more details. + +using System.Collections.Generic; using System.ComponentModel.DataAnnotations; using System.Linq; using System.Runtime.Serialization; using System.Text.RegularExpressions; using Newtonsoft.Json.Linq; -using Umbraco.Core; -using Umbraco.Core.IO; -using Umbraco.Core.PropertyEditors; -using Umbraco.Core.Serialization; +using Umbraco.Cms.Core.IO; +using Umbraco.Cms.Core.Serialization; +using Umbraco.Extensions; -namespace Umbraco.Web.PropertyEditors +namespace Umbraco.Cms.Core.PropertyEditors { internal class ColorPickerConfigurationEditor : ConfigurationEditor { diff --git a/src/Umbraco.Infrastructure/PropertyEditors/ColorPickerPropertyEditor.cs b/src/Umbraco.Infrastructure/PropertyEditors/ColorPickerPropertyEditor.cs index aec8e4b137..a80ea7c322 100644 --- a/src/Umbraco.Infrastructure/PropertyEditors/ColorPickerPropertyEditor.cs +++ b/src/Umbraco.Infrastructure/PropertyEditors/ColorPickerPropertyEditor.cs @@ -1,12 +1,13 @@ -using Microsoft.Extensions.Logging; -using Umbraco.Core; -using Umbraco.Core.IO; -using Umbraco.Core.PropertyEditors; -using Umbraco.Core.Serialization; -using Umbraco.Core.Services; -using Umbraco.Core.Strings; +// Copyright (c) Umbraco. +// See LICENSE for more details. -namespace Umbraco.Web.PropertyEditors +using Microsoft.Extensions.Logging; +using Umbraco.Cms.Core.IO; +using Umbraco.Cms.Core.Serialization; +using Umbraco.Cms.Core.Services; +using Umbraco.Cms.Core.Strings; + +namespace Umbraco.Cms.Core.PropertyEditors { [DataEditor( Constants.PropertyEditors.Aliases.ColorPicker, diff --git a/src/Umbraco.Infrastructure/PropertyEditors/ComplexEditorValidator.cs b/src/Umbraco.Infrastructure/PropertyEditors/ComplexEditorValidator.cs index 06fc6f55fd..cfac709d47 100644 --- a/src/Umbraco.Infrastructure/PropertyEditors/ComplexEditorValidator.cs +++ b/src/Umbraco.Infrastructure/PropertyEditors/ComplexEditorValidator.cs @@ -1,14 +1,17 @@ -using System; +// Copyright (c) Umbraco. +// See LICENSE for more details. + +using System; using System.Collections.Generic; using System.ComponentModel.DataAnnotations; using System.Linq; -using Umbraco.Core; -using Umbraco.Core.Models; -using Umbraco.Core.PropertyEditors; -using Umbraco.Core.Services; -using Umbraco.Web.PropertyEditors.Validation; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Core.PropertyEditors.Validation; +using Umbraco.Cms.Core.Services; +using Umbraco.Cms.Core.Services.Implement; +using Umbraco.Extensions; -namespace Umbraco.Web.PropertyEditors +namespace Umbraco.Cms.Core.PropertyEditors { /// /// Used to validate complex editors that contain nested editors diff --git a/src/Umbraco.Infrastructure/PropertyEditors/ComplexPropertyEditorContentEventHandler.cs b/src/Umbraco.Infrastructure/PropertyEditors/ComplexPropertyEditorContentEventHandler.cs index d7fd184329..8098a5f8d4 100644 --- a/src/Umbraco.Infrastructure/PropertyEditors/ComplexPropertyEditorContentEventHandler.cs +++ b/src/Umbraco.Infrastructure/PropertyEditors/ComplexPropertyEditorContentEventHandler.cs @@ -1,11 +1,15 @@ -using System; -using System.Collections.Generic; -using Umbraco.Core.Events; -using Umbraco.Core.Models; -using Umbraco.Core.Services; -using Umbraco.Core.Services.Implement; +// Copyright (c) Umbraco. +// See LICENSE for more details. -namespace Umbraco.Core.PropertyEditors +using System; +using System.Collections.Generic; +using Umbraco.Cms.Core.Events; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Core.Services; +using Umbraco.Cms.Core.Services.Implement; +using Umbraco.Extensions; + +namespace Umbraco.Cms.Core.PropertyEditors { /// /// Utility class for dealing with Copying/Saving events for complex editors diff --git a/src/Umbraco.Infrastructure/PropertyEditors/ConfigurationEditorOfTConfiguration.cs b/src/Umbraco.Infrastructure/PropertyEditors/ConfigurationEditorOfTConfiguration.cs index 7ccf39abcf..53a3c63510 100644 --- a/src/Umbraco.Infrastructure/PropertyEditors/ConfigurationEditorOfTConfiguration.cs +++ b/src/Umbraco.Infrastructure/PropertyEditors/ConfigurationEditorOfTConfiguration.cs @@ -1,13 +1,17 @@ -using System; +// Copyright (c) Umbraco. +// See LICENSE for more details. + +using System; using System.Collections.Generic; using System.Reflection; using Newtonsoft.Json; using Newtonsoft.Json.Linq; -using Umbraco.Core.Composing; -using Umbraco.Core.IO; -using Umbraco.Core.Serialization; +using Umbraco.Cms.Core.Composing; +using Umbraco.Cms.Core.IO; +using Umbraco.Cms.Core.Serialization; +using Umbraco.Extensions; -namespace Umbraco.Core.PropertyEditors +namespace Umbraco.Cms.Core.PropertyEditors { /// /// Represents a data type configuration editor with a typed configuration. diff --git a/src/Umbraco.Infrastructure/PropertyEditors/ContentPickerConfigurationEditor.cs b/src/Umbraco.Infrastructure/PropertyEditors/ContentPickerConfigurationEditor.cs index 9e434bb279..8e2031b718 100644 --- a/src/Umbraco.Infrastructure/PropertyEditors/ContentPickerConfigurationEditor.cs +++ b/src/Umbraco.Infrastructure/PropertyEditors/ContentPickerConfigurationEditor.cs @@ -1,8 +1,10 @@ -using System.Collections.Generic; -using Umbraco.Core.IO; -using Umbraco.Core.PropertyEditors; +// Copyright (c) Umbraco. +// See LICENSE for more details. -namespace Umbraco.Web.PropertyEditors +using System.Collections.Generic; +using Umbraco.Cms.Core.IO; + +namespace Umbraco.Cms.Core.PropertyEditors { internal class ContentPickerConfigurationEditor : ConfigurationEditor { diff --git a/src/Umbraco.Infrastructure/PropertyEditors/ContentPickerPropertyEditor.cs b/src/Umbraco.Infrastructure/PropertyEditors/ContentPickerPropertyEditor.cs index c95f14e8e0..318c6ccdcb 100644 --- a/src/Umbraco.Infrastructure/PropertyEditors/ContentPickerPropertyEditor.cs +++ b/src/Umbraco.Infrastructure/PropertyEditors/ContentPickerPropertyEditor.cs @@ -1,14 +1,16 @@ -using System.Collections.Generic; -using Microsoft.Extensions.Logging; -using Umbraco.Core; -using Umbraco.Core.IO; -using Umbraco.Core.Models.Editors; -using Umbraco.Core.PropertyEditors; -using Umbraco.Core.Serialization; -using Umbraco.Core.Services; -using Umbraco.Core.Strings; +// Copyright (c) Umbraco. +// See LICENSE for more details. -namespace Umbraco.Web.PropertyEditors +using System.Collections.Generic; +using Microsoft.Extensions.Logging; +using Umbraco.Cms.Core.IO; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Core.Models.Editors; +using Umbraco.Cms.Core.Serialization; +using Umbraco.Cms.Core.Services; +using Umbraco.Cms.Core.Strings; + +namespace Umbraco.Cms.Core.PropertyEditors { /// /// Content property editor that stores UDI diff --git a/src/Umbraco.Infrastructure/PropertyEditors/DateTimeConfigurationEditor.cs b/src/Umbraco.Infrastructure/PropertyEditors/DateTimeConfigurationEditor.cs index 2758064973..1c2677e533 100644 --- a/src/Umbraco.Infrastructure/PropertyEditors/DateTimeConfigurationEditor.cs +++ b/src/Umbraco.Infrastructure/PropertyEditors/DateTimeConfigurationEditor.cs @@ -1,9 +1,11 @@ -using System.Collections.Generic; -using Umbraco.Core; -using Umbraco.Core.IO; -using Umbraco.Core.PropertyEditors; +// Copyright (c) Umbraco. +// See LICENSE for more details. -namespace Umbraco.Web.PropertyEditors +using System.Collections.Generic; +using Umbraco.Cms.Core.IO; +using Umbraco.Extensions; + +namespace Umbraco.Cms.Core.PropertyEditors { /// /// Represents the configuration editor for the datetime value editor. diff --git a/src/Umbraco.Infrastructure/PropertyEditors/DateTimePropertyEditor.cs b/src/Umbraco.Infrastructure/PropertyEditors/DateTimePropertyEditor.cs index 40ece10a1e..2cb7b8f0d2 100644 --- a/src/Umbraco.Infrastructure/PropertyEditors/DateTimePropertyEditor.cs +++ b/src/Umbraco.Infrastructure/PropertyEditors/DateTimePropertyEditor.cs @@ -1,12 +1,15 @@ -using Microsoft.Extensions.Logging; -using Umbraco.Core; -using Umbraco.Core.IO; -using Umbraco.Core.PropertyEditors; -using Umbraco.Core.Serialization; -using Umbraco.Core.Services; -using Umbraco.Core.Strings; +// Copyright (c) Umbraco. +// See LICENSE for more details. -namespace Umbraco.Web.PropertyEditors +using Microsoft.Extensions.Logging; +using Umbraco.Cms.Core.IO; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Core.PropertyEditors.Validators; +using Umbraco.Cms.Core.Serialization; +using Umbraco.Cms.Core.Services; +using Umbraco.Cms.Core.Strings; + +namespace Umbraco.Cms.Core.PropertyEditors { /// /// Represents a date and time property editor. diff --git a/src/Umbraco.Infrastructure/PropertyEditors/DropDownFlexibleConfigurationEditor.cs b/src/Umbraco.Infrastructure/PropertyEditors/DropDownFlexibleConfigurationEditor.cs index f3ad0e6335..cc755f7ed1 100644 --- a/src/Umbraco.Infrastructure/PropertyEditors/DropDownFlexibleConfigurationEditor.cs +++ b/src/Umbraco.Infrastructure/PropertyEditors/DropDownFlexibleConfigurationEditor.cs @@ -1,12 +1,14 @@ -using System.Collections.Generic; +// Copyright (c) Umbraco. +// See LICENSE for more details. + +using System.Collections.Generic; using System.Linq; using Newtonsoft.Json.Linq; -using Umbraco.Core; -using Umbraco.Core.IO; -using Umbraco.Core.PropertyEditors; -using Umbraco.Core.Services; +using Umbraco.Cms.Core.IO; +using Umbraco.Cms.Core.Services; +using Umbraco.Extensions; -namespace Umbraco.Web.PropertyEditors +namespace Umbraco.Cms.Core.PropertyEditors { internal class DropDownFlexibleConfigurationEditor : ConfigurationEditor { diff --git a/src/Umbraco.Infrastructure/PropertyEditors/DropDownFlexiblePropertyEditor.cs b/src/Umbraco.Infrastructure/PropertyEditors/DropDownFlexiblePropertyEditor.cs index 186730775e..6e970a9cba 100644 --- a/src/Umbraco.Infrastructure/PropertyEditors/DropDownFlexiblePropertyEditor.cs +++ b/src/Umbraco.Infrastructure/PropertyEditors/DropDownFlexiblePropertyEditor.cs @@ -1,12 +1,14 @@ -using Microsoft.Extensions.Logging; -using Umbraco.Core; -using Umbraco.Core.IO; -using Umbraco.Core.PropertyEditors; -using Umbraco.Core.Serialization; -using Umbraco.Core.Services; -using Umbraco.Core.Strings; +// Copyright (c) Umbraco. +// See LICENSE for more details. -namespace Umbraco.Web.PropertyEditors +using Microsoft.Extensions.Logging; +using Umbraco.Cms.Core.IO; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Core.Serialization; +using Umbraco.Cms.Core.Services; +using Umbraco.Cms.Core.Strings; + +namespace Umbraco.Cms.Core.PropertyEditors { [DataEditor( Constants.PropertyEditors.Aliases.DropDownListFlexible, diff --git a/src/Umbraco.Infrastructure/PropertyEditors/EmailAddressConfigurationEditor.cs b/src/Umbraco.Infrastructure/PropertyEditors/EmailAddressConfigurationEditor.cs index 27287881ff..1f05ab45af 100644 --- a/src/Umbraco.Infrastructure/PropertyEditors/EmailAddressConfigurationEditor.cs +++ b/src/Umbraco.Infrastructure/PropertyEditors/EmailAddressConfigurationEditor.cs @@ -1,7 +1,9 @@ -using Umbraco.Core.IO; -using Umbraco.Core.PropertyEditors; +// Copyright (c) Umbraco. +// See LICENSE for more details. -namespace Umbraco.Web.PropertyEditors +using Umbraco.Cms.Core.IO; + +namespace Umbraco.Cms.Core.PropertyEditors { /// /// Represents the configuration editor for the email address value editor. diff --git a/src/Umbraco.Infrastructure/PropertyEditors/EmailAddressPropertyEditor.cs b/src/Umbraco.Infrastructure/PropertyEditors/EmailAddressPropertyEditor.cs index 120a522cd7..0f4f7e1834 100644 --- a/src/Umbraco.Infrastructure/PropertyEditors/EmailAddressPropertyEditor.cs +++ b/src/Umbraco.Infrastructure/PropertyEditors/EmailAddressPropertyEditor.cs @@ -1,13 +1,15 @@ -using Microsoft.Extensions.Logging; -using Umbraco.Core; -using Umbraco.Core.IO; -using Umbraco.Core.PropertyEditors; -using Umbraco.Core.PropertyEditors.Validators; -using Umbraco.Core.Serialization; -using Umbraco.Core.Services; -using Umbraco.Core.Strings; +// Copyright (c) Umbraco. +// See LICENSE for more details. -namespace Umbraco.Web.PropertyEditors +using Microsoft.Extensions.Logging; +using Umbraco.Cms.Core.IO; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Core.PropertyEditors.Validators; +using Umbraco.Cms.Core.Serialization; +using Umbraco.Cms.Core.Services; +using Umbraco.Cms.Core.Strings; + +namespace Umbraco.Cms.Core.PropertyEditors { [DataEditor( Constants.PropertyEditors.Aliases.EmailAddress, diff --git a/src/Umbraco.Infrastructure/PropertyEditors/FileUploadPropertyEditor.cs b/src/Umbraco.Infrastructure/PropertyEditors/FileUploadPropertyEditor.cs index b425432b01..28d35e60d2 100644 --- a/src/Umbraco.Infrastructure/PropertyEditors/FileUploadPropertyEditor.cs +++ b/src/Umbraco.Infrastructure/PropertyEditors/FileUploadPropertyEditor.cs @@ -1,20 +1,22 @@ -using System; +// Copyright (c) Umbraco. +// See LICENSE for more details. + +using System; using System.Collections.Generic; using System.Linq; using Microsoft.Extensions.Logging; using Microsoft.Extensions.Options; -using Umbraco.Core; -using Umbraco.Core.Configuration; -using Umbraco.Core.Configuration.Models; -using Umbraco.Core.IO; -using Umbraco.Core.Models; -using Umbraco.Core.PropertyEditors; -using Umbraco.Core.Serialization; -using Umbraco.Core.Services; -using Umbraco.Core.Strings; -using Umbraco.Web.Media; +using Umbraco.Cms.Core.Configuration.Models; +using Umbraco.Cms.Core.Events; +using Umbraco.Cms.Core.IO; +using Umbraco.Cms.Core.Media; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Core.Serialization; +using Umbraco.Cms.Core.Services; +using Umbraco.Cms.Core.Strings; +using Umbraco.Extensions; -namespace Umbraco.Web.PropertyEditors +namespace Umbraco.Cms.Core.PropertyEditors { [DataEditor( Constants.PropertyEditors.Aliases.UploadField, @@ -122,7 +124,7 @@ namespace Umbraco.Web.PropertyEditors /// /// The event sender. /// The event arguments. - internal void ContentServiceCopied(IContentService sender, Core.Events.CopyEventArgs args) + internal void ContentServiceCopied(IContentService sender, CopyEventArgs args) { // get the upload field properties with a value var properties = args.Original.Properties.Where(IsUploadField); @@ -153,7 +155,7 @@ namespace Umbraco.Web.PropertyEditors /// /// The event sender. /// The event arguments. - internal void MediaServiceCreated(IMediaService sender, Core.Events.NewEventArgs args) + internal void MediaServiceCreated(IMediaService sender, NewEventArgs args) { AutoFillProperties(args.Entity); } @@ -163,7 +165,7 @@ namespace Umbraco.Web.PropertyEditors /// /// The event sender. /// The event arguments. - public void MediaServiceSaving(IMediaService sender, Core.Events.SaveEventArgs args) + public void MediaServiceSaving(IMediaService sender, SaveEventArgs args) { foreach (var entity in args.SavedEntities) AutoFillProperties(entity); @@ -174,7 +176,7 @@ namespace Umbraco.Web.PropertyEditors /// /// The event sender. /// The event arguments. - public void ContentServiceSaving(IContentService sender, Core.Events.SaveEventArgs args) + public void ContentServiceSaving(IContentService sender, SaveEventArgs args) { foreach (var entity in args.SavedEntities) AutoFillProperties(entity); diff --git a/src/Umbraco.Infrastructure/PropertyEditors/FileUploadPropertyValueEditor.cs b/src/Umbraco.Infrastructure/PropertyEditors/FileUploadPropertyValueEditor.cs index 8ccb59988d..3f892dd000 100644 --- a/src/Umbraco.Infrastructure/PropertyEditors/FileUploadPropertyValueEditor.cs +++ b/src/Umbraco.Infrastructure/PropertyEditors/FileUploadPropertyValueEditor.cs @@ -1,16 +1,18 @@ -using System; +// Copyright (c) Umbraco. +// See LICENSE for more details. + +using System; using System.IO; using Microsoft.Extensions.Options; -using Umbraco.Core; -using Umbraco.Core.Configuration.Models; -using Umbraco.Core.IO; -using Umbraco.Core.Models.Editors; -using Umbraco.Core.PropertyEditors; -using Umbraco.Core.Serialization; -using Umbraco.Core.Services; -using Umbraco.Core.Strings; +using Umbraco.Cms.Core.Configuration.Models; +using Umbraco.Cms.Core.IO; +using Umbraco.Cms.Core.Models.Editors; +using Umbraco.Cms.Core.Serialization; +using Umbraco.Cms.Core.Services; +using Umbraco.Cms.Core.Strings; +using Umbraco.Extensions; -namespace Umbraco.Web.PropertyEditors +namespace Umbraco.Cms.Core.PropertyEditors { /// /// The value editor for the file upload property editor. diff --git a/src/Umbraco.Infrastructure/PropertyEditors/GridConfiguration.cs b/src/Umbraco.Infrastructure/PropertyEditors/GridConfiguration.cs index d00f1b5e18..a019c75b7e 100644 --- a/src/Umbraco.Infrastructure/PropertyEditors/GridConfiguration.cs +++ b/src/Umbraco.Infrastructure/PropertyEditors/GridConfiguration.cs @@ -1,8 +1,9 @@ -using Newtonsoft.Json.Linq; -using Umbraco.Core; -using Umbraco.Core.PropertyEditors; +// Copyright (c) Umbraco. +// See LICENSE for more details. -namespace Umbraco.Web.PropertyEditors +using Newtonsoft.Json.Linq; + +namespace Umbraco.Cms.Core.PropertyEditors { /// /// Represents the configuration for the grid value editor. @@ -17,7 +18,7 @@ namespace Umbraco.Web.PropertyEditors [ConfigurationField("rte", "Rich text editor", "views/propertyeditors/rte/rte.prevalues.html", Description = "Rich text editor configuration", HideLabel = true)] public JObject Rte { get; set; } - [ConfigurationField(Core.Constants.DataTypes.ReservedPreValueKeys.IgnoreUserStartNodes, + [ConfigurationField(Constants.DataTypes.ReservedPreValueKeys.IgnoreUserStartNodes, "Ignore User Start Nodes", "boolean", Description = "Selecting this option allows a user to choose nodes that they normally don't have access to.")] public bool IgnoreUserStartNodes { get; set; } diff --git a/src/Umbraco.Infrastructure/PropertyEditors/GridConfigurationEditor.cs b/src/Umbraco.Infrastructure/PropertyEditors/GridConfigurationEditor.cs index f9ff1ad0c4..b29365a6f5 100644 --- a/src/Umbraco.Infrastructure/PropertyEditors/GridConfigurationEditor.cs +++ b/src/Umbraco.Infrastructure/PropertyEditors/GridConfigurationEditor.cs @@ -1,11 +1,13 @@ -using System.Collections.Generic; +// Copyright (c) Umbraco. +// See LICENSE for more details. + +using System.Collections.Generic; using System.ComponentModel.DataAnnotations; using System.Linq; using Newtonsoft.Json; -using Umbraco.Core.IO; -using Umbraco.Core.PropertyEditors; +using Umbraco.Cms.Core.IO; -namespace Umbraco.Web.PropertyEditors +namespace Umbraco.Cms.Core.PropertyEditors { /// /// Represents the configuration editor for the grid value editor. diff --git a/src/Umbraco.Infrastructure/PropertyEditors/GridPropertyEditor.cs b/src/Umbraco.Infrastructure/PropertyEditors/GridPropertyEditor.cs index 2bac76e6f9..a40ab92ca8 100644 --- a/src/Umbraco.Infrastructure/PropertyEditors/GridPropertyEditor.cs +++ b/src/Umbraco.Infrastructure/PropertyEditors/GridPropertyEditor.cs @@ -1,21 +1,23 @@ -using System; +// Copyright (c) Umbraco. +// See LICENSE for more details. + +using System; using System.Collections.Generic; using System.Linq; using Microsoft.Extensions.Logging; using Newtonsoft.Json; -using Umbraco.Core; -using Umbraco.Core.IO; -using Umbraco.Core.Media; -using Umbraco.Core.Models; -using Umbraco.Core.Models.Editors; -using Umbraco.Core.PropertyEditors; -using Umbraco.Core.Security; -using Umbraco.Core.Serialization; -using Umbraco.Core.Services; -using Umbraco.Core.Strings; -using Umbraco.Web.Templates; +using Umbraco.Cms.Core.IO; +using Umbraco.Cms.Core.Media; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Core.Models.Editors; +using Umbraco.Cms.Core.Security; +using Umbraco.Cms.Core.Serialization; +using Umbraco.Cms.Core.Services; +using Umbraco.Cms.Core.Strings; +using Umbraco.Cms.Core.Templates; +using Umbraco.Extensions; -namespace Umbraco.Web.PropertyEditors +namespace Umbraco.Cms.Core.PropertyEditors { /// /// Represents a grid property and parameter editor. diff --git a/src/Umbraco.Infrastructure/PropertyEditors/GridPropertyIndexValueFactory.cs b/src/Umbraco.Infrastructure/PropertyEditors/GridPropertyIndexValueFactory.cs index 195764fbbf..0d098c3140 100644 --- a/src/Umbraco.Infrastructure/PropertyEditors/GridPropertyIndexValueFactory.cs +++ b/src/Umbraco.Infrastructure/PropertyEditors/GridPropertyIndexValueFactory.cs @@ -1,16 +1,18 @@ -using System; +// Copyright (c) Umbraco. +// See LICENSE for more details. + +using System; using System.Collections.Generic; using System.Linq; using System.Text; using Newtonsoft.Json; using Newtonsoft.Json.Linq; -using Umbraco.Core; -using Umbraco.Core.Models; -using Umbraco.Core.PropertyEditors; -using Umbraco.Core.Xml; -using Umbraco.Examine; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Core.Xml; +using Umbraco.Cms.Infrastructure.Examine; +using Umbraco.Extensions; -namespace Umbraco.Web.PropertyEditors +namespace Umbraco.Cms.Core.PropertyEditors { /// /// Parses the grid value into indexable values diff --git a/src/Umbraco.Infrastructure/PropertyEditors/ImageCropperConfiguration.cs b/src/Umbraco.Infrastructure/PropertyEditors/ImageCropperConfiguration.cs index f291326dc5..1ffa38d94d 100644 --- a/src/Umbraco.Infrastructure/PropertyEditors/ImageCropperConfiguration.cs +++ b/src/Umbraco.Infrastructure/PropertyEditors/ImageCropperConfiguration.cs @@ -1,6 +1,9 @@ -using System.Runtime.Serialization; +// Copyright (c) Umbraco. +// See LICENSE for more details. -namespace Umbraco.Core.PropertyEditors +using System.Runtime.Serialization; + +namespace Umbraco.Cms.Core.PropertyEditors { /// /// Represents the configuration for the image cropper value editor. diff --git a/src/Umbraco.Infrastructure/PropertyEditors/ImageCropperConfigurationEditor.cs b/src/Umbraco.Infrastructure/PropertyEditors/ImageCropperConfigurationEditor.cs index 42abfa0307..4d655c6731 100644 --- a/src/Umbraco.Infrastructure/PropertyEditors/ImageCropperConfigurationEditor.cs +++ b/src/Umbraco.Infrastructure/PropertyEditors/ImageCropperConfigurationEditor.cs @@ -1,8 +1,10 @@ -using System.Collections.Generic; -using Umbraco.Core.IO; -using Umbraco.Core.PropertyEditors; +// Copyright (c) Umbraco. +// See LICENSE for more details. -namespace Umbraco.Web.PropertyEditors +using System.Collections.Generic; +using Umbraco.Cms.Core.IO; + +namespace Umbraco.Cms.Core.PropertyEditors { /// /// Represents the configuration editor for the image cropper value editor. diff --git a/src/Umbraco.Infrastructure/PropertyEditors/ImageCropperPropertyEditor.cs b/src/Umbraco.Infrastructure/PropertyEditors/ImageCropperPropertyEditor.cs index 1f35b9d88a..74bd7823e3 100644 --- a/src/Umbraco.Infrastructure/PropertyEditors/ImageCropperPropertyEditor.cs +++ b/src/Umbraco.Infrastructure/PropertyEditors/ImageCropperPropertyEditor.cs @@ -1,22 +1,24 @@ -using System; +// Copyright (c) Umbraco. +// See LICENSE for more details. + +using System; using System.Collections.Generic; using System.Linq; using Microsoft.Extensions.Logging; using Microsoft.Extensions.Options; using Newtonsoft.Json; using Newtonsoft.Json.Linq; -using Umbraco.Core; -using Umbraco.Core.Configuration; -using Umbraco.Core.Configuration.Models; -using Umbraco.Core.IO; -using Umbraco.Core.Models; -using Umbraco.Core.PropertyEditors; -using Umbraco.Core.Serialization; -using Umbraco.Core.Services; -using Umbraco.Core.Strings; -using Umbraco.Web.Media; +using Umbraco.Cms.Core.Configuration.Models; +using Umbraco.Cms.Core.Events; +using Umbraco.Cms.Core.IO; +using Umbraco.Cms.Core.Media; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Core.Serialization; +using Umbraco.Cms.Core.Services; +using Umbraco.Cms.Core.Strings; +using Umbraco.Extensions; -namespace Umbraco.Web.PropertyEditors +namespace Umbraco.Cms.Core.PropertyEditors { /// /// Represents an image cropper property editor. @@ -175,7 +177,7 @@ namespace Umbraco.Web.PropertyEditors /// /// The event sender. /// The event arguments. - public void ContentServiceCopied(IContentService sender, Core.Events.CopyEventArgs args) + public void ContentServiceCopied(IContentService sender, CopyEventArgs args) { // get the image cropper field properties var properties = args.Original.Properties.Where(IsCropperField); @@ -207,7 +209,7 @@ namespace Umbraco.Web.PropertyEditors /// /// The event sender. /// The event arguments. - public void MediaServiceCreated(IMediaService sender, Core.Events.NewEventArgs args) + public void MediaServiceCreated(IMediaService sender, NewEventArgs args) { AutoFillProperties(args.Entity); } @@ -217,7 +219,7 @@ namespace Umbraco.Web.PropertyEditors /// /// The event sender. /// The event arguments. - public void MediaServiceSaving(IMediaService sender, Core.Events.SaveEventArgs args) + public void MediaServiceSaving(IMediaService sender, SaveEventArgs args) { foreach (var entity in args.SavedEntities) AutoFillProperties(entity); @@ -228,7 +230,7 @@ namespace Umbraco.Web.PropertyEditors /// /// The event sender. /// The event arguments. - public void ContentServiceSaving(IContentService sender, Core.Events.SaveEventArgs args) + public void ContentServiceSaving(IContentService sender, SaveEventArgs args) { foreach (var entity in args.SavedEntities) AutoFillProperties(entity); diff --git a/src/Umbraco.Infrastructure/PropertyEditors/ImageCropperPropertyValueEditor.cs b/src/Umbraco.Infrastructure/PropertyEditors/ImageCropperPropertyValueEditor.cs index c058856ebd..5cbbdf8e31 100644 --- a/src/Umbraco.Infrastructure/PropertyEditors/ImageCropperPropertyValueEditor.cs +++ b/src/Umbraco.Infrastructure/PropertyEditors/ImageCropperPropertyValueEditor.cs @@ -1,20 +1,22 @@ -using System; +// Copyright (c) Umbraco. +// See LICENSE for more details. + +using System; using Microsoft.Extensions.Logging; using Newtonsoft.Json; using Newtonsoft.Json.Linq; -using Umbraco.Core; -using Umbraco.Core.Configuration.Models; -using Umbraco.Core.IO; -using Umbraco.Core.Models; -using Umbraco.Core.Models.Editors; -using Umbraco.Core.PropertyEditors; -using Umbraco.Core.PropertyEditors.ValueConverters; -using Umbraco.Core.Serialization; -using Umbraco.Core.Services; -using Umbraco.Core.Strings; +using Umbraco.Cms.Core.Configuration.Models; +using Umbraco.Cms.Core.IO; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Core.Models.Editors; +using Umbraco.Cms.Core.PropertyEditors.ValueConverters; +using Umbraco.Cms.Core.Serialization; +using Umbraco.Cms.Core.Services; +using Umbraco.Cms.Core.Strings; +using Umbraco.Extensions; using File = System.IO.File; -namespace Umbraco.Web.PropertyEditors +namespace Umbraco.Cms.Core.PropertyEditors { /// /// The value editor for the image cropper property editor. diff --git a/src/Umbraco.Infrastructure/PropertyEditors/LabelConfigurationEditor.cs b/src/Umbraco.Infrastructure/PropertyEditors/LabelConfigurationEditor.cs index 8ec2e32965..fb1ee554bd 100644 --- a/src/Umbraco.Infrastructure/PropertyEditors/LabelConfigurationEditor.cs +++ b/src/Umbraco.Infrastructure/PropertyEditors/LabelConfigurationEditor.cs @@ -1,7 +1,10 @@ -using System.Collections.Generic; -using Umbraco.Core.IO; +// Copyright (c) Umbraco. +// See LICENSE for more details. -namespace Umbraco.Core.PropertyEditors +using System.Collections.Generic; +using Umbraco.Cms.Core.IO; + +namespace Umbraco.Cms.Core.PropertyEditors { /// /// Represents the configuration for the label value editor. @@ -20,7 +23,7 @@ namespace Umbraco.Core.PropertyEditors // get the value type // not simply deserializing Json because we want to validate the valueType - if (editorValues.TryGetValue(Constants.PropertyEditors.ConfigurationKeys.DataValueType, out var valueTypeObj) + if (editorValues.TryGetValue(Cms.Core.Constants.PropertyEditors.ConfigurationKeys.DataValueType, out var valueTypeObj) && valueTypeObj is string stringValue) { if (!string.IsNullOrWhiteSpace(stringValue) && ValueTypes.IsValue(stringValue)) // validate diff --git a/src/Umbraco.Infrastructure/PropertyEditors/LabelPropertyEditor.cs b/src/Umbraco.Infrastructure/PropertyEditors/LabelPropertyEditor.cs index 78c5087c66..c08d64dd50 100644 --- a/src/Umbraco.Infrastructure/PropertyEditors/LabelPropertyEditor.cs +++ b/src/Umbraco.Infrastructure/PropertyEditors/LabelPropertyEditor.cs @@ -1,16 +1,20 @@ -using Microsoft.Extensions.Logging; -using Umbraco.Core.IO; -using Umbraco.Core.Serialization; -using Umbraco.Core.Services; -using Umbraco.Core.Strings; +// Copyright (c) Umbraco. +// See LICENSE for more details. -namespace Umbraco.Core.PropertyEditors +using Microsoft.Extensions.Logging; +using Umbraco.Cms.Core.IO; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Core.Serialization; +using Umbraco.Cms.Core.Services; +using Umbraco.Cms.Core.Strings; + +namespace Umbraco.Cms.Core.PropertyEditors { /// /// Represents a property editor for label properties. /// [DataEditor( - Constants.PropertyEditors.Aliases.Label, + Cms.Core.Constants.PropertyEditors.Aliases.Label, "Label", "readonlyvalue", Icon = "icon-readonly")] diff --git a/src/Umbraco.Infrastructure/PropertyEditors/ListViewConfigurationEditor.cs b/src/Umbraco.Infrastructure/PropertyEditors/ListViewConfigurationEditor.cs index d6b1b6f533..8c84cff632 100644 --- a/src/Umbraco.Infrastructure/PropertyEditors/ListViewConfigurationEditor.cs +++ b/src/Umbraco.Infrastructure/PropertyEditors/ListViewConfigurationEditor.cs @@ -1,7 +1,9 @@ -using Umbraco.Core.IO; -using Umbraco.Core.PropertyEditors; +// Copyright (c) Umbraco. +// See LICENSE for more details. -namespace Umbraco.Web.PropertyEditors +using Umbraco.Cms.Core.IO; + +namespace Umbraco.Cms.Core.PropertyEditors { /// /// Represents the configuration editor for the listview value editor. diff --git a/src/Umbraco.Infrastructure/PropertyEditors/ListViewPropertyEditor.cs b/src/Umbraco.Infrastructure/PropertyEditors/ListViewPropertyEditor.cs index d7fd2d9340..2592c52513 100644 --- a/src/Umbraco.Infrastructure/PropertyEditors/ListViewPropertyEditor.cs +++ b/src/Umbraco.Infrastructure/PropertyEditors/ListViewPropertyEditor.cs @@ -1,12 +1,13 @@ -using Microsoft.Extensions.Logging; -using Umbraco.Core; -using Umbraco.Core.IO; -using Umbraco.Core.PropertyEditors; -using Umbraco.Core.Serialization; -using Umbraco.Core.Services; -using Umbraco.Core.Strings; +// Copyright (c) Umbraco. +// See LICENSE for more details. -namespace Umbraco.Web.PropertyEditors +using Microsoft.Extensions.Logging; +using Umbraco.Cms.Core.IO; +using Umbraco.Cms.Core.Serialization; +using Umbraco.Cms.Core.Services; +using Umbraco.Cms.Core.Strings; + +namespace Umbraco.Cms.Core.PropertyEditors { /// /// Represents a list-view editor. diff --git a/src/Umbraco.Infrastructure/PropertyEditors/MarkdownConfigurationEditor.cs b/src/Umbraco.Infrastructure/PropertyEditors/MarkdownConfigurationEditor.cs index adff49c040..088a36b6c8 100644 --- a/src/Umbraco.Infrastructure/PropertyEditors/MarkdownConfigurationEditor.cs +++ b/src/Umbraco.Infrastructure/PropertyEditors/MarkdownConfigurationEditor.cs @@ -1,7 +1,9 @@ -using Umbraco.Core.IO; -using Umbraco.Core.PropertyEditors; +// Copyright (c) Umbraco. +// See LICENSE for more details. -namespace Umbraco.Web.PropertyEditors +using Umbraco.Cms.Core.IO; + +namespace Umbraco.Cms.Core.PropertyEditors { /// /// Represents the configuration editorfor the markdown value editor. diff --git a/src/Umbraco.Infrastructure/PropertyEditors/MarkdownPropertyEditor.cs b/src/Umbraco.Infrastructure/PropertyEditors/MarkdownPropertyEditor.cs index 97386de326..fca74a7873 100644 --- a/src/Umbraco.Infrastructure/PropertyEditors/MarkdownPropertyEditor.cs +++ b/src/Umbraco.Infrastructure/PropertyEditors/MarkdownPropertyEditor.cs @@ -1,12 +1,13 @@ -using Microsoft.Extensions.Logging; -using Umbraco.Core; -using Umbraco.Core.IO; -using Umbraco.Core.PropertyEditors; -using Umbraco.Core.Serialization; -using Umbraco.Core.Services; -using Umbraco.Core.Strings; +// Copyright (c) Umbraco. +// See LICENSE for more details. -namespace Umbraco.Web.PropertyEditors +using Microsoft.Extensions.Logging; +using Umbraco.Cms.Core.IO; +using Umbraco.Cms.Core.Serialization; +using Umbraco.Cms.Core.Services; +using Umbraco.Cms.Core.Strings; + +namespace Umbraco.Cms.Core.PropertyEditors { /// /// Represents a markdown editor. diff --git a/src/Umbraco.Infrastructure/PropertyEditors/MediaPickerConfigurationEditor.cs b/src/Umbraco.Infrastructure/PropertyEditors/MediaPickerConfigurationEditor.cs index 98cc3c51b8..ed560a64b8 100644 --- a/src/Umbraco.Infrastructure/PropertyEditors/MediaPickerConfigurationEditor.cs +++ b/src/Umbraco.Infrastructure/PropertyEditors/MediaPickerConfigurationEditor.cs @@ -1,8 +1,10 @@ -using System.Collections.Generic; -using Umbraco.Core.IO; -using Umbraco.Core.PropertyEditors; +// Copyright (c) Umbraco. +// See LICENSE for more details. -namespace Umbraco.Web.PropertyEditors +using System.Collections.Generic; +using Umbraco.Cms.Core.IO; + +namespace Umbraco.Cms.Core.PropertyEditors { /// /// Represents the configuration editor for the media picker value editor. diff --git a/src/Umbraco.Infrastructure/PropertyEditors/MediaPickerPropertyEditor.cs b/src/Umbraco.Infrastructure/PropertyEditors/MediaPickerPropertyEditor.cs index e69ff5be9d..3ebf64e965 100644 --- a/src/Umbraco.Infrastructure/PropertyEditors/MediaPickerPropertyEditor.cs +++ b/src/Umbraco.Infrastructure/PropertyEditors/MediaPickerPropertyEditor.cs @@ -1,14 +1,16 @@ -using System.Collections.Generic; -using Microsoft.Extensions.Logging; -using Umbraco.Core; -using Umbraco.Core.IO; -using Umbraco.Core.Models.Editors; -using Umbraco.Core.PropertyEditors; -using Umbraco.Core.Serialization; -using Umbraco.Core.Services; -using Umbraco.Core.Strings; +// Copyright (c) Umbraco. +// See LICENSE for more details. -namespace Umbraco.Web.PropertyEditors +using System.Collections.Generic; +using Microsoft.Extensions.Logging; +using Umbraco.Cms.Core.IO; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Core.Models.Editors; +using Umbraco.Cms.Core.Serialization; +using Umbraco.Cms.Core.Services; +using Umbraco.Cms.Core.Strings; + +namespace Umbraco.Cms.Core.PropertyEditors { /// /// Represents a media picker property editor. diff --git a/src/Umbraco.Infrastructure/PropertyEditors/MultiNodePickerConfigurationEditor.cs b/src/Umbraco.Infrastructure/PropertyEditors/MultiNodePickerConfigurationEditor.cs index ba0375c691..77a2a69c9b 100644 --- a/src/Umbraco.Infrastructure/PropertyEditors/MultiNodePickerConfigurationEditor.cs +++ b/src/Umbraco.Infrastructure/PropertyEditors/MultiNodePickerConfigurationEditor.cs @@ -1,8 +1,10 @@ -using System.Collections.Generic; -using Umbraco.Core.IO; -using Umbraco.Core.PropertyEditors; +// Copyright (c) Umbraco. +// See LICENSE for more details. -namespace Umbraco.Web.PropertyEditors +using System.Collections.Generic; +using Umbraco.Cms.Core.IO; + +namespace Umbraco.Cms.Core.PropertyEditors { /// /// Represents the configuration for the multinode picker value editor. diff --git a/src/Umbraco.Infrastructure/PropertyEditors/MultiNodeTreePickerPropertyEditor.cs b/src/Umbraco.Infrastructure/PropertyEditors/MultiNodeTreePickerPropertyEditor.cs index b7ec4813b2..e8973d1d89 100644 --- a/src/Umbraco.Infrastructure/PropertyEditors/MultiNodeTreePickerPropertyEditor.cs +++ b/src/Umbraco.Infrastructure/PropertyEditors/MultiNodeTreePickerPropertyEditor.cs @@ -1,14 +1,16 @@ -using System.Collections.Generic; -using Microsoft.Extensions.Logging; -using Umbraco.Core; -using Umbraco.Core.IO; -using Umbraco.Core.Models.Editors; -using Umbraco.Core.PropertyEditors; -using Umbraco.Core.Serialization; -using Umbraco.Core.Services; -using Umbraco.Core.Strings; +// Copyright (c) Umbraco. +// See LICENSE for more details. -namespace Umbraco.Web.PropertyEditors +using System.Collections.Generic; +using Microsoft.Extensions.Logging; +using Umbraco.Cms.Core.IO; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Core.Models.Editors; +using Umbraco.Cms.Core.Serialization; +using Umbraco.Cms.Core.Services; +using Umbraco.Cms.Core.Strings; + +namespace Umbraco.Cms.Core.PropertyEditors { [DataEditor( Constants.PropertyEditors.Aliases.MultiNodeTreePicker, diff --git a/src/Umbraco.Infrastructure/PropertyEditors/MultiUrlPickerConfigurationEditor.cs b/src/Umbraco.Infrastructure/PropertyEditors/MultiUrlPickerConfigurationEditor.cs index 6cedae94fe..d79e0d57f1 100644 --- a/src/Umbraco.Infrastructure/PropertyEditors/MultiUrlPickerConfigurationEditor.cs +++ b/src/Umbraco.Infrastructure/PropertyEditors/MultiUrlPickerConfigurationEditor.cs @@ -1,7 +1,9 @@ -using Umbraco.Core.IO; -using Umbraco.Core.PropertyEditors; +// Copyright (c) Umbraco. +// See LICENSE for more details. -namespace Umbraco.Web.PropertyEditors +using Umbraco.Cms.Core.IO; + +namespace Umbraco.Cms.Core.PropertyEditors { public class MultiUrlPickerConfigurationEditor : ConfigurationEditor { diff --git a/src/Umbraco.Infrastructure/PropertyEditors/MultiUrlPickerPropertyEditor.cs b/src/Umbraco.Infrastructure/PropertyEditors/MultiUrlPickerPropertyEditor.cs index fdb908e2be..59f9ce8c86 100644 --- a/src/Umbraco.Infrastructure/PropertyEditors/MultiUrlPickerPropertyEditor.cs +++ b/src/Umbraco.Infrastructure/PropertyEditors/MultiUrlPickerPropertyEditor.cs @@ -1,15 +1,18 @@ +// Copyright (c) Umbraco. +// See LICENSE for more details. + using System; using Microsoft.Extensions.Logging; -using Umbraco.Core; -using Umbraco.Core.IO; -using Umbraco.Core.PropertyEditors; -using Umbraco.Core.Serialization; -using Umbraco.Core.Services; -using Umbraco.Core.Strings; -using Umbraco.Web.PublishedCache; -using Umbraco.Web.Routing; +using Umbraco.Cms.Core.IO; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Core.PublishedCache; +using Umbraco.Cms.Core.Routing; +using Umbraco.Cms.Core.Serialization; +using Umbraco.Cms.Core.Services; +using Umbraco.Cms.Core.Strings; +using Umbraco.Cms.Core.Web; -namespace Umbraco.Web.PropertyEditors +namespace Umbraco.Cms.Core.PropertyEditors { [DataEditor( Constants.PropertyEditors.Aliases.MultiUrlPicker, diff --git a/src/Umbraco.Infrastructure/PropertyEditors/MultiUrlPickerValueEditor.cs b/src/Umbraco.Infrastructure/PropertyEditors/MultiUrlPickerValueEditor.cs index a4427cd26d..02b268682d 100644 --- a/src/Umbraco.Infrastructure/PropertyEditors/MultiUrlPickerValueEditor.cs +++ b/src/Umbraco.Infrastructure/PropertyEditors/MultiUrlPickerValueEditor.cs @@ -1,22 +1,25 @@ +// Copyright (c) Umbraco. +// See LICENSE for more details. + using System; using System.Collections.Generic; using System.Linq; using System.Runtime.Serialization; using Microsoft.Extensions.Logging; using Newtonsoft.Json; -using Umbraco.Core; -using Umbraco.Core.Models; -using Umbraco.Core.Models.Editors; -using Umbraco.Core.Models.Entities; -using Umbraco.Core.PropertyEditors; -using Umbraco.Core.Serialization; -using Umbraco.Core.Services; -using Umbraco.Core.Strings; -using Umbraco.Web.Models.ContentEditing; -using Umbraco.Web.PublishedCache; -using Umbraco.Web.Routing; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Core.Models.ContentEditing; +using Umbraco.Cms.Core.Models.Editors; +using Umbraco.Cms.Core.Models.Entities; +using Umbraco.Cms.Core.PublishedCache; +using Umbraco.Cms.Core.Routing; +using Umbraco.Cms.Core.Serialization; +using Umbraco.Cms.Core.Services; +using Umbraco.Cms.Core.Strings; +using Umbraco.Cms.Core.Web; +using Umbraco.Extensions; -namespace Umbraco.Web.PropertyEditors +namespace Umbraco.Cms.Core.PropertyEditors { public class MultiUrlPickerValueEditor : DataValueEditor, IDataValueReference { diff --git a/src/Umbraco.Infrastructure/PropertyEditors/MultipleTextStringConfigurationEditor.cs b/src/Umbraco.Infrastructure/PropertyEditors/MultipleTextStringConfigurationEditor.cs index 243f668cb3..1ee06ecfbc 100644 --- a/src/Umbraco.Infrastructure/PropertyEditors/MultipleTextStringConfigurationEditor.cs +++ b/src/Umbraco.Infrastructure/PropertyEditors/MultipleTextStringConfigurationEditor.cs @@ -1,10 +1,12 @@ -using System.Collections.Generic; -using Umbraco.Core; -using Umbraco.Core.IO; -using Umbraco.Core.PropertyEditors; -using Umbraco.Core.PropertyEditors.Validators; +// Copyright (c) Umbraco. +// See LICENSE for more details. -namespace Umbraco.Web.PropertyEditors +using System.Collections.Generic; +using Umbraco.Cms.Core.IO; +using Umbraco.Cms.Core.PropertyEditors.Validators; +using Umbraco.Extensions; + +namespace Umbraco.Cms.Core.PropertyEditors { /// /// Represents the configuration editor for a multiple textstring value editor. diff --git a/src/Umbraco.Infrastructure/PropertyEditors/MultipleTextStringPropertyEditor.cs b/src/Umbraco.Infrastructure/PropertyEditors/MultipleTextStringPropertyEditor.cs index c9aeb0e59a..7c23be6428 100644 --- a/src/Umbraco.Infrastructure/PropertyEditors/MultipleTextStringPropertyEditor.cs +++ b/src/Umbraco.Infrastructure/PropertyEditors/MultipleTextStringPropertyEditor.cs @@ -1,21 +1,22 @@ -using System; +// Copyright (c) Umbraco. +// See LICENSE for more details. + +using System; using System.Collections.Generic; using System.ComponentModel.DataAnnotations; using System.Linq; using Microsoft.Extensions.Logging; using Newtonsoft.Json.Linq; -using Umbraco.Core; -using Umbraco.Core.Exceptions; -using Umbraco.Core.IO; -using Umbraco.Core.Models; -using Umbraco.Core.Models.Editors; -using Umbraco.Core.PropertyEditors; -using Umbraco.Core.PropertyEditors.Validators; -using Umbraco.Core.Serialization; -using Umbraco.Core.Services; -using Umbraco.Core.Strings; +using Umbraco.Cms.Core.Exceptions; +using Umbraco.Cms.Core.IO; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Core.Models.Editors; +using Umbraco.Cms.Core.PropertyEditors.Validators; +using Umbraco.Cms.Core.Serialization; +using Umbraco.Cms.Core.Services; +using Umbraco.Cms.Core.Strings; -namespace Umbraco.Web.PropertyEditors +namespace Umbraco.Cms.Core.PropertyEditors { /// /// Represents a multiple text string property editor. diff --git a/src/Umbraco.Infrastructure/PropertyEditors/MultipleValueEditor.cs b/src/Umbraco.Infrastructure/PropertyEditors/MultipleValueEditor.cs index 5f82ed940f..b222956657 100644 --- a/src/Umbraco.Infrastructure/PropertyEditors/MultipleValueEditor.cs +++ b/src/Umbraco.Infrastructure/PropertyEditors/MultipleValueEditor.cs @@ -1,15 +1,18 @@ -using System; +// Copyright (c) Umbraco. +// See LICENSE for more details. + +using System; using System.Linq; using Microsoft.Extensions.Logging; using Newtonsoft.Json; using Newtonsoft.Json.Linq; -using Umbraco.Core.Models; -using Umbraco.Core.PropertyEditors; -using Umbraco.Core.Serialization; -using Umbraco.Core.Services; -using Umbraco.Core.Strings; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Core.Models.Editors; +using Umbraco.Cms.Core.Serialization; +using Umbraco.Cms.Core.Services; +using Umbraco.Cms.Core.Strings; -namespace Umbraco.Web.PropertyEditors +namespace Umbraco.Cms.Core.PropertyEditors { /// /// A value editor to handle posted json array data and to return array data for the multiple selected csv items @@ -56,7 +59,7 @@ namespace Umbraco.Web.PropertyEditors /// /// /// - public override object FromEditor(Core.Models.Editors.ContentPropertyData editorValue, object currentValue) + public override object FromEditor(ContentPropertyData editorValue, object currentValue) { var json = editorValue.Value as JArray; if (json == null) diff --git a/src/Umbraco.Infrastructure/PropertyEditors/NestedContentConfigurationEditor.cs b/src/Umbraco.Infrastructure/PropertyEditors/NestedContentConfigurationEditor.cs index 7eeee68b07..1ce9e2a235 100644 --- a/src/Umbraco.Infrastructure/PropertyEditors/NestedContentConfigurationEditor.cs +++ b/src/Umbraco.Infrastructure/PropertyEditors/NestedContentConfigurationEditor.cs @@ -1,7 +1,9 @@ -using Umbraco.Core.IO; -using Umbraco.Core.PropertyEditors; +// Copyright (c) Umbraco. +// See LICENSE for more details. -namespace Umbraco.Web.PropertyEditors +using Umbraco.Cms.Core.IO; + +namespace Umbraco.Cms.Core.PropertyEditors { /// /// Represents the configuration editor for the nested content value editor. diff --git a/src/Umbraco.Infrastructure/PropertyEditors/NestedContentPropertyEditor.cs b/src/Umbraco.Infrastructure/PropertyEditors/NestedContentPropertyEditor.cs index 8afc08c423..bf64b3b334 100644 --- a/src/Umbraco.Infrastructure/PropertyEditors/NestedContentPropertyEditor.cs +++ b/src/Umbraco.Infrastructure/PropertyEditors/NestedContentPropertyEditor.cs @@ -1,21 +1,22 @@ -using System; +// Copyright (c) Umbraco. +// See LICENSE for more details. + +using System; using System.Collections.Generic; using System.Linq; using Microsoft.Extensions.Logging; using Newtonsoft.Json; using Newtonsoft.Json.Linq; -using Umbraco.Core; -using Umbraco.Core.IO; -using Umbraco.Core.Models; -using Umbraco.Core.Models.Editors; -using Umbraco.Core.PropertyEditors; -using Umbraco.Core.Serialization; -using Umbraco.Core.Services; -using Umbraco.Core.Strings; +using Umbraco.Cms.Core.IO; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Core.Models.Editors; +using Umbraco.Cms.Core.Serialization; +using Umbraco.Cms.Core.Services; +using Umbraco.Cms.Core.Strings; +using Umbraco.Extensions; -namespace Umbraco.Web.PropertyEditors +namespace Umbraco.Cms.Core.PropertyEditors { - /// /// Represents a nested content property editor. /// diff --git a/src/Umbraco.Infrastructure/PropertyEditors/PropertyEditorsComponent.cs b/src/Umbraco.Infrastructure/PropertyEditors/PropertyEditorsComponent.cs index 4ad4d91283..f9cb83118d 100644 --- a/src/Umbraco.Infrastructure/PropertyEditors/PropertyEditorsComponent.cs +++ b/src/Umbraco.Infrastructure/PropertyEditors/PropertyEditorsComponent.cs @@ -1,15 +1,16 @@ -using System; +// Copyright (c) Umbraco. +// See LICENSE for more details. + +using System; using System.Collections.Generic; using System.Linq; -using Umbraco.Core.Composing; -using Umbraco.Core.Events; -using Umbraco.Core.Models; -using Umbraco.Core.PropertyEditors; -using Umbraco.Core.Services; -using Umbraco.Core.Services.Implement; -using Umbraco.Infrastructure.Services.Implement; +using Umbraco.Cms.Core.Composing; +using Umbraco.Cms.Core.Events; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Core.Services; +using Umbraco.Cms.Core.Services.Implement; -namespace Umbraco.Web.PropertyEditors +namespace Umbraco.Cms.Core.PropertyEditors { public sealed class PropertyEditorsComponent : IComponent { diff --git a/src/Umbraco.Infrastructure/PropertyEditors/PropertyEditorsComposer.cs b/src/Umbraco.Infrastructure/PropertyEditors/PropertyEditorsComposer.cs index 77d4f6dcc0..4e876ad554 100644 --- a/src/Umbraco.Infrastructure/PropertyEditors/PropertyEditorsComposer.cs +++ b/src/Umbraco.Infrastructure/PropertyEditors/PropertyEditorsComposer.cs @@ -1,6 +1,9 @@ -using Umbraco.Core.Composing; +// Copyright (c) Umbraco. +// See LICENSE for more details. -namespace Umbraco.Web.PropertyEditors +using Umbraco.Cms.Core.Composing; + +namespace Umbraco.Cms.Core.PropertyEditors { public sealed class PropertyEditorsComposer : ComponentComposer, ICoreComposer { } diff --git a/src/Umbraco.Infrastructure/PropertyEditors/RadioButtonsPropertyEditor.cs b/src/Umbraco.Infrastructure/PropertyEditors/RadioButtonsPropertyEditor.cs index 444e99bd23..d96ffef56d 100644 --- a/src/Umbraco.Infrastructure/PropertyEditors/RadioButtonsPropertyEditor.cs +++ b/src/Umbraco.Infrastructure/PropertyEditors/RadioButtonsPropertyEditor.cs @@ -1,12 +1,13 @@ -using Microsoft.Extensions.Logging; -using Umbraco.Core; -using Umbraco.Core.IO; -using Umbraco.Core.PropertyEditors; -using Umbraco.Core.Serialization; -using Umbraco.Core.Services; -using Umbraco.Core.Strings; +// Copyright (c) Umbraco. +// See LICENSE for more details. -namespace Umbraco.Web.PropertyEditors +using Microsoft.Extensions.Logging; +using Umbraco.Cms.Core.IO; +using Umbraco.Cms.Core.Serialization; +using Umbraco.Cms.Core.Services; +using Umbraco.Cms.Core.Strings; + +namespace Umbraco.Cms.Core.PropertyEditors { /// /// A property editor to allow the individual selection of pre-defined items. diff --git a/src/Umbraco.Infrastructure/PropertyEditors/RichTextConfigurationEditor.cs b/src/Umbraco.Infrastructure/PropertyEditors/RichTextConfigurationEditor.cs index 752ae97334..09d6290605 100644 --- a/src/Umbraco.Infrastructure/PropertyEditors/RichTextConfigurationEditor.cs +++ b/src/Umbraco.Infrastructure/PropertyEditors/RichTextConfigurationEditor.cs @@ -1,7 +1,9 @@ -using Umbraco.Core.IO; -using Umbraco.Core.PropertyEditors; +// Copyright (c) Umbraco. +// See LICENSE for more details. -namespace Umbraco.Web.PropertyEditors +using Umbraco.Cms.Core.IO; + +namespace Umbraco.Cms.Core.PropertyEditors { /// /// Represents the configuration editor for the rich text value editor. diff --git a/src/Umbraco.Infrastructure/PropertyEditors/RichTextEditorPastedImages.cs b/src/Umbraco.Infrastructure/PropertyEditors/RichTextEditorPastedImages.cs index d881d55f7d..94140d00f2 100644 --- a/src/Umbraco.Infrastructure/PropertyEditors/RichTextEditorPastedImages.cs +++ b/src/Umbraco.Infrastructure/PropertyEditors/RichTextEditorPastedImages.cs @@ -1,21 +1,24 @@ -using System; +// Copyright (c) Umbraco. +// See LICENSE for more details. + +using System; using System.Collections.Generic; using System.IO; -using Microsoft.Extensions.Logging; using HtmlAgilityPack; -using Umbraco.Core; -using Umbraco.Core.Exceptions; -using Umbraco.Core.IO; -using Umbraco.Core.Media; -using Umbraco.Core.Models; -using Umbraco.Core.Serialization; -using Umbraco.Core.Services; -using Umbraco.Core.Strings; -using Umbraco.Web.Models; -using Umbraco.Web.Routing; -using Umbraco.Core.Hosting; +using Microsoft.Extensions.Logging; +using Umbraco.Cms.Core.Exceptions; +using Umbraco.Cms.Core.Hosting; +using Umbraco.Cms.Core.IO; +using Umbraco.Cms.Core.Media; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Core.Routing; +using Umbraco.Cms.Core.Serialization; +using Umbraco.Cms.Core.Services; +using Umbraco.Cms.Core.Strings; +using Umbraco.Cms.Core.Web; +using Umbraco.Extensions; -namespace Umbraco.Web.PropertyEditors +namespace Umbraco.Cms.Core.PropertyEditors { public sealed class RichTextEditorPastedImages { diff --git a/src/Umbraco.Infrastructure/PropertyEditors/RichTextPropertyEditor.cs b/src/Umbraco.Infrastructure/PropertyEditors/RichTextPropertyEditor.cs index e97b8c0520..213697ed33 100644 --- a/src/Umbraco.Infrastructure/PropertyEditors/RichTextPropertyEditor.cs +++ b/src/Umbraco.Infrastructure/PropertyEditors/RichTextPropertyEditor.cs @@ -1,21 +1,23 @@ -using System; +// Copyright (c) Umbraco. +// See LICENSE for more details. + +using System; using System.Collections.Generic; using Microsoft.Extensions.Logging; -using Umbraco.Core; -using Umbraco.Core.IO; -using Umbraco.Core.Media; -using Umbraco.Core.Models; -using Umbraco.Core.Models.Editors; -using Umbraco.Core.PropertyEditors; -using Umbraco.Core.Security; -using Umbraco.Core.Serialization; -using Umbraco.Core.Services; -using Umbraco.Core.Strings; -using Umbraco.Examine; -using Umbraco.Web.Macros; -using Umbraco.Web.Templates; +using Umbraco.Cms.Core.IO; +using Umbraco.Cms.Core.Media; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Core.Models.Editors; +using Umbraco.Cms.Core.Security; +using Umbraco.Cms.Core.Serialization; +using Umbraco.Cms.Core.Services; +using Umbraco.Cms.Core.Strings; +using Umbraco.Cms.Core.Templates; +using Umbraco.Cms.Infrastructure.Examine; +using Umbraco.Cms.Infrastructure.Macros; +using Umbraco.Extensions; -namespace Umbraco.Web.PropertyEditors +namespace Umbraco.Cms.Core.PropertyEditors { /// /// Represents a rich text property editor. @@ -145,7 +147,7 @@ namespace Umbraco.Web.PropertyEditors /// /// /// - public override object FromEditor(Core.Models.Editors.ContentPropertyData editorValue, object currentValue) + public override object FromEditor(ContentPropertyData editorValue, object currentValue) { if (editorValue.Value == null) return null; diff --git a/src/Umbraco.Infrastructure/PropertyEditors/SliderConfigurationEditor.cs b/src/Umbraco.Infrastructure/PropertyEditors/SliderConfigurationEditor.cs index fe34c16449..aa3014c98d 100644 --- a/src/Umbraco.Infrastructure/PropertyEditors/SliderConfigurationEditor.cs +++ b/src/Umbraco.Infrastructure/PropertyEditors/SliderConfigurationEditor.cs @@ -1,7 +1,9 @@ -using Umbraco.Core.IO; -using Umbraco.Core.PropertyEditors; +// Copyright (c) Umbraco. +// See LICENSE for more details. -namespace Umbraco.Web.PropertyEditors +using Umbraco.Cms.Core.IO; + +namespace Umbraco.Cms.Core.PropertyEditors { /// /// Represents the configuration editor for the slider value editor. diff --git a/src/Umbraco.Infrastructure/PropertyEditors/SliderPropertyEditor.cs b/src/Umbraco.Infrastructure/PropertyEditors/SliderPropertyEditor.cs index 48197691a2..dc4942d51b 100644 --- a/src/Umbraco.Infrastructure/PropertyEditors/SliderPropertyEditor.cs +++ b/src/Umbraco.Infrastructure/PropertyEditors/SliderPropertyEditor.cs @@ -1,12 +1,13 @@ -using Microsoft.Extensions.Logging; -using Umbraco.Core; -using Umbraco.Core.IO; -using Umbraco.Core.PropertyEditors; -using Umbraco.Core.Serialization; -using Umbraco.Core.Services; -using Umbraco.Core.Strings; +// Copyright (c) Umbraco. +// See LICENSE for more details. -namespace Umbraco.Web.PropertyEditors +using Microsoft.Extensions.Logging; +using Umbraco.Cms.Core.IO; +using Umbraco.Cms.Core.Serialization; +using Umbraco.Cms.Core.Services; +using Umbraco.Cms.Core.Strings; + +namespace Umbraco.Cms.Core.PropertyEditors { /// /// Represents a slider editor. diff --git a/src/Umbraco.Infrastructure/PropertyEditors/TagConfigurationEditor.cs b/src/Umbraco.Infrastructure/PropertyEditors/TagConfigurationEditor.cs index 3877611a68..1417890452 100644 --- a/src/Umbraco.Infrastructure/PropertyEditors/TagConfigurationEditor.cs +++ b/src/Umbraco.Infrastructure/PropertyEditors/TagConfigurationEditor.cs @@ -1,12 +1,14 @@ -using System; -using System.Collections.Generic; -using Umbraco.Core.IO; -using Umbraco.Core.Models; -using Umbraco.Core.PropertyEditors; -using Umbraco.Core.PropertyEditors.Validators; -using Umbraco.Core.Services; +// Copyright (c) Umbraco. +// See LICENSE for more details. -namespace Umbraco.Web.PropertyEditors +using System; +using System.Collections.Generic; +using Umbraco.Cms.Core.IO; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Core.PropertyEditors.Validators; +using Umbraco.Cms.Core.Services; + +namespace Umbraco.Cms.Core.PropertyEditors { /// /// Represents the configuration editor for the tag value editor. diff --git a/src/Umbraco.Infrastructure/PropertyEditors/TagsPropertyEditor.cs b/src/Umbraco.Infrastructure/PropertyEditors/TagsPropertyEditor.cs index a2fb340d14..a849289feb 100644 --- a/src/Umbraco.Infrastructure/PropertyEditors/TagsPropertyEditor.cs +++ b/src/Umbraco.Infrastructure/PropertyEditors/TagsPropertyEditor.cs @@ -1,18 +1,21 @@ -using System; +// Copyright (c) Umbraco. +// See LICENSE for more details. + +using System; using System.Collections.Generic; using System.ComponentModel.DataAnnotations; using System.Linq; using Microsoft.Extensions.Logging; using Newtonsoft.Json.Linq; -using Umbraco.Core; -using Umbraco.Core.IO; -using Umbraco.Core.Models.Editors; -using Umbraco.Core.PropertyEditors; -using Umbraco.Core.Serialization; -using Umbraco.Core.Services; -using Umbraco.Core.Strings; +using Umbraco.Cms.Core.IO; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Core.Models.Editors; +using Umbraco.Cms.Core.Serialization; +using Umbraco.Cms.Core.Services; +using Umbraco.Cms.Core.Strings; +using Umbraco.Extensions; -namespace Umbraco.Web.PropertyEditors +namespace Umbraco.Cms.Core.PropertyEditors { /// /// Represents a tags property editor. diff --git a/src/Umbraco.Infrastructure/PropertyEditors/TextAreaConfigurationEditor.cs b/src/Umbraco.Infrastructure/PropertyEditors/TextAreaConfigurationEditor.cs index 3a90354339..f8f87a7fb0 100644 --- a/src/Umbraco.Infrastructure/PropertyEditors/TextAreaConfigurationEditor.cs +++ b/src/Umbraco.Infrastructure/PropertyEditors/TextAreaConfigurationEditor.cs @@ -1,7 +1,9 @@ -using Umbraco.Core.IO; -using Umbraco.Core.PropertyEditors; +// Copyright (c) Umbraco. +// See LICENSE for more details. -namespace Umbraco.Web.PropertyEditors +using Umbraco.Cms.Core.IO; + +namespace Umbraco.Cms.Core.PropertyEditors { /// /// Represents the configuration editor for the textarea value editor. diff --git a/src/Umbraco.Infrastructure/PropertyEditors/TextAreaPropertyEditor.cs b/src/Umbraco.Infrastructure/PropertyEditors/TextAreaPropertyEditor.cs index d65f6f3a1d..a742d0abba 100644 --- a/src/Umbraco.Infrastructure/PropertyEditors/TextAreaPropertyEditor.cs +++ b/src/Umbraco.Infrastructure/PropertyEditors/TextAreaPropertyEditor.cs @@ -1,12 +1,14 @@ -using Microsoft.Extensions.Logging; -using Umbraco.Core; -using Umbraco.Core.IO; -using Umbraco.Core.PropertyEditors; -using Umbraco.Core.Serialization; -using Umbraco.Core.Services; -using Umbraco.Core.Strings; +// Copyright (c) Umbraco. +// See LICENSE for more details. -namespace Umbraco.Web.PropertyEditors +using Microsoft.Extensions.Logging; +using Umbraco.Cms.Core.IO; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Core.Serialization; +using Umbraco.Cms.Core.Services; +using Umbraco.Cms.Core.Strings; + +namespace Umbraco.Cms.Core.PropertyEditors { /// /// Represents a textarea property and parameter editor. diff --git a/src/Umbraco.Infrastructure/PropertyEditors/TextboxConfigurationEditor.cs b/src/Umbraco.Infrastructure/PropertyEditors/TextboxConfigurationEditor.cs index 0696d7238c..0e6da0f2d1 100644 --- a/src/Umbraco.Infrastructure/PropertyEditors/TextboxConfigurationEditor.cs +++ b/src/Umbraco.Infrastructure/PropertyEditors/TextboxConfigurationEditor.cs @@ -1,7 +1,9 @@ -using Umbraco.Core.IO; -using Umbraco.Core.PropertyEditors; +// Copyright (c) Umbraco. +// See LICENSE for more details. -namespace Umbraco.Web.PropertyEditors +using Umbraco.Cms.Core.IO; + +namespace Umbraco.Cms.Core.PropertyEditors { /// /// Represents the configuration editor for the textbox value editor. diff --git a/src/Umbraco.Infrastructure/PropertyEditors/TextboxPropertyEditor.cs b/src/Umbraco.Infrastructure/PropertyEditors/TextboxPropertyEditor.cs index 350dd4a1ff..02b49fd339 100644 --- a/src/Umbraco.Infrastructure/PropertyEditors/TextboxPropertyEditor.cs +++ b/src/Umbraco.Infrastructure/PropertyEditors/TextboxPropertyEditor.cs @@ -1,12 +1,14 @@ -using Microsoft.Extensions.Logging; -using Umbraco.Core; -using Umbraco.Core.IO; -using Umbraco.Core.PropertyEditors; -using Umbraco.Core.Serialization; -using Umbraco.Core.Services; -using Umbraco.Core.Strings; +// Copyright (c) Umbraco. +// See LICENSE for more details. -namespace Umbraco.Web.PropertyEditors +using Microsoft.Extensions.Logging; +using Umbraco.Cms.Core.IO; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Core.Serialization; +using Umbraco.Cms.Core.Services; +using Umbraco.Cms.Core.Strings; + +namespace Umbraco.Cms.Core.PropertyEditors { /// /// Represents a textbox property and parameter editor. diff --git a/src/Umbraco.Infrastructure/PropertyEditors/TrueFalseConfigurationEditor.cs b/src/Umbraco.Infrastructure/PropertyEditors/TrueFalseConfigurationEditor.cs index 594a3f4d6e..0b46402ca8 100644 --- a/src/Umbraco.Infrastructure/PropertyEditors/TrueFalseConfigurationEditor.cs +++ b/src/Umbraco.Infrastructure/PropertyEditors/TrueFalseConfigurationEditor.cs @@ -1,7 +1,9 @@ -using Umbraco.Core.IO; -using Umbraco.Core.PropertyEditors; +// Copyright (c) Umbraco. +// See LICENSE for more details. -namespace Umbraco.Web.PropertyEditors +using Umbraco.Cms.Core.IO; + +namespace Umbraco.Cms.Core.PropertyEditors { /// /// Represents the configuration editor for the boolean value editor. diff --git a/src/Umbraco.Infrastructure/PropertyEditors/TrueFalsePropertyEditor.cs b/src/Umbraco.Infrastructure/PropertyEditors/TrueFalsePropertyEditor.cs index 3c9599c643..b0f2e3ea97 100644 --- a/src/Umbraco.Infrastructure/PropertyEditors/TrueFalsePropertyEditor.cs +++ b/src/Umbraco.Infrastructure/PropertyEditors/TrueFalsePropertyEditor.cs @@ -1,12 +1,13 @@ -using Microsoft.Extensions.Logging; -using Umbraco.Core; -using Umbraco.Core.IO; -using Umbraco.Core.PropertyEditors; -using Umbraco.Core.Serialization; -using Umbraco.Core.Services; -using Umbraco.Core.Strings; +// Copyright (c) Umbraco. +// See LICENSE for more details. -namespace Umbraco.Web.PropertyEditors +using Microsoft.Extensions.Logging; +using Umbraco.Cms.Core.IO; +using Umbraco.Cms.Core.Serialization; +using Umbraco.Cms.Core.Services; +using Umbraco.Cms.Core.Strings; + +namespace Umbraco.Cms.Core.PropertyEditors { /// /// Represents a checkbox property and parameter editor. diff --git a/src/Umbraco.Infrastructure/PropertyEditors/UploadFileTypeValidator.cs b/src/Umbraco.Infrastructure/PropertyEditors/UploadFileTypeValidator.cs index d3e1e7aabe..c8fdc06a42 100644 --- a/src/Umbraco.Infrastructure/PropertyEditors/UploadFileTypeValidator.cs +++ b/src/Umbraco.Infrastructure/PropertyEditors/UploadFileTypeValidator.cs @@ -1,16 +1,17 @@ -using System; +// Copyright (c) Umbraco. +// See LICENSE for more details. + +using System; using System.Collections.Generic; using System.ComponentModel.DataAnnotations; using System.Linq; using Microsoft.Extensions.Options; using Newtonsoft.Json.Linq; -using Umbraco.Core; -using Umbraco.Core.Configuration; -using Umbraco.Core.Configuration.Models; -using Umbraco.Core.PropertyEditors; -using Umbraco.Core.Services; +using Umbraco.Cms.Core.Configuration.Models; +using Umbraco.Cms.Core.Services; +using Umbraco.Extensions; -namespace Umbraco.Web.PropertyEditors +namespace Umbraco.Cms.Core.PropertyEditors { internal class UploadFileTypeValidator : IValueValidator { diff --git a/src/Umbraco.Infrastructure/PropertyEditors/ValueConverters/BlockEditorConverter.cs b/src/Umbraco.Infrastructure/PropertyEditors/ValueConverters/BlockEditorConverter.cs index 717f1a43ef..76cfb10943 100644 --- a/src/Umbraco.Infrastructure/PropertyEditors/ValueConverters/BlockEditorConverter.cs +++ b/src/Umbraco.Infrastructure/PropertyEditors/ValueConverters/BlockEditorConverter.cs @@ -1,13 +1,12 @@ -using Newtonsoft.Json.Linq; -using System; -using System.Collections.Generic; -using Umbraco.Core; -using Umbraco.Core.Models.Blocks; -using Umbraco.Core.Models.PublishedContent; -using Umbraco.Core.PropertyEditors; -using Umbraco.Web.PublishedCache; +// Copyright (c) Umbraco. +// See LICENSE for more details. -namespace Umbraco.Web.PropertyEditors.ValueConverters +using System; +using Umbraco.Cms.Core.Models.Blocks; +using Umbraco.Cms.Core.Models.PublishedContent; +using Umbraco.Cms.Core.PublishedCache; + +namespace Umbraco.Cms.Core.PropertyEditors.ValueConverters { /// /// Converts json block objects into diff --git a/src/Umbraco.Infrastructure/PropertyEditors/ValueConverters/BlockListPropertyValueConverter.cs b/src/Umbraco.Infrastructure/PropertyEditors/ValueConverters/BlockListPropertyValueConverter.cs index f35f9b9469..f1995c6732 100644 --- a/src/Umbraco.Infrastructure/PropertyEditors/ValueConverters/BlockListPropertyValueConverter.cs +++ b/src/Umbraco.Infrastructure/PropertyEditors/ValueConverters/BlockListPropertyValueConverter.cs @@ -1,18 +1,16 @@ -using Newtonsoft.Json; -using Newtonsoft.Json.Linq; +// Copyright (c) Umbraco. +// See LICENSE for more details. + using System; using System.Collections.Generic; using System.Linq; -using Umbraco.Core; -using Umbraco.Core.Logging; -using Umbraco.Core.Models.Blocks; -using Umbraco.Core.Models.PublishedContent; -using Umbraco.Core.PropertyEditors; -using Umbraco.Core.PropertyEditors.ValueConverters; +using Umbraco.Cms.Core.Logging; +using Umbraco.Cms.Core.Models.Blocks; +using Umbraco.Cms.Core.Models.PublishedContent; +using Umbraco.Extensions; -namespace Umbraco.Web.PropertyEditors.ValueConverters +namespace Umbraco.Cms.Core.PropertyEditors.ValueConverters { - [DefaultPropertyValueConverter(typeof(JsonValueConverter))] public class BlockListPropertyValueConverter : PropertyValueConverterBase { @@ -93,7 +91,7 @@ namespace Umbraco.Web.PropertyEditors.ValueConverters foreach (var layoutItem in blockListLayout) { // get the content reference - var contentGuidUdi = (GuidUdi)layoutItem.ContentUdi; + var contentGuidUdi = (GuidUdi)layoutItem.ContentUdi; if (!contentPublishedElements.TryGetValue(contentGuidUdi.Guid, out var contentData)) continue; diff --git a/src/Umbraco.Infrastructure/PropertyEditors/ValueConverters/ColorPickerValueConverter.cs b/src/Umbraco.Infrastructure/PropertyEditors/ValueConverters/ColorPickerValueConverter.cs index 46dae3e4f0..e35da5b1aa 100644 --- a/src/Umbraco.Infrastructure/PropertyEditors/ValueConverters/ColorPickerValueConverter.cs +++ b/src/Umbraco.Infrastructure/PropertyEditors/ValueConverters/ColorPickerValueConverter.cs @@ -1,15 +1,19 @@ -using System; +// Copyright (c) Umbraco. +// See LICENSE for more details. + +using System; using Newtonsoft.Json; using Newtonsoft.Json.Linq; -using Umbraco.Core.Models.PublishedContent; +using Umbraco.Cms.Core.Models.PublishedContent; +using Umbraco.Extensions; -namespace Umbraco.Core.PropertyEditors.ValueConverters +namespace Umbraco.Cms.Core.PropertyEditors.ValueConverters { [DefaultPropertyValueConverter] public class ColorPickerValueConverter : PropertyValueConverterBase { public override bool IsConverter(IPublishedPropertyType propertyType) - => propertyType.EditorAlias.InvariantEquals(Constants.PropertyEditors.Aliases.ColorPicker); + => propertyType.EditorAlias.InvariantEquals(Cms.Core.Constants.PropertyEditors.Aliases.ColorPicker); public override Type GetPropertyValueType(IPublishedPropertyType propertyType) => UseLabel(propertyType) ? typeof(PickedColor) : typeof(string); diff --git a/src/Umbraco.Infrastructure/PropertyEditors/ValueConverters/FlexibleDropdownPropertyValueConverter.cs b/src/Umbraco.Infrastructure/PropertyEditors/ValueConverters/FlexibleDropdownPropertyValueConverter.cs index 164ce185ae..8a2980bd9c 100644 --- a/src/Umbraco.Infrastructure/PropertyEditors/ValueConverters/FlexibleDropdownPropertyValueConverter.cs +++ b/src/Umbraco.Infrastructure/PropertyEditors/ValueConverters/FlexibleDropdownPropertyValueConverter.cs @@ -1,11 +1,12 @@ -using System; +// Copyright (c) Umbraco. +// See LICENSE for more details. + +using System; using System.Collections.Generic; using Newtonsoft.Json; -using Umbraco.Core; -using Umbraco.Core.Models.PublishedContent; -using Umbraco.Core.PropertyEditors; +using Umbraco.Cms.Core.Models.PublishedContent; -namespace Umbraco.Web.PropertyEditors.ValueConverters +namespace Umbraco.Cms.Core.PropertyEditors.ValueConverters { [DefaultPropertyValueConverter] public class FlexibleDropdownPropertyValueConverter : PropertyValueConverterBase diff --git a/src/Umbraco.Infrastructure/PropertyEditors/ValueConverters/GridValueConverter.cs b/src/Umbraco.Infrastructure/PropertyEditors/ValueConverters/GridValueConverter.cs index f601dac6d9..10f2de5581 100644 --- a/src/Umbraco.Infrastructure/PropertyEditors/ValueConverters/GridValueConverter.cs +++ b/src/Umbraco.Infrastructure/PropertyEditors/ValueConverters/GridValueConverter.cs @@ -1,13 +1,16 @@ -using System; +// Copyright (c) Umbraco. +// See LICENSE for more details. + +using System; using System.Linq; using Microsoft.Extensions.Logging; using Newtonsoft.Json; using Newtonsoft.Json.Linq; -using Umbraco.Core.Composing; -using Umbraco.Core.Configuration.Grid; -using Umbraco.Core.Models.PublishedContent; +using Umbraco.Cms.Core.Configuration.Grid; +using Umbraco.Cms.Core.Models.PublishedContent; +using Umbraco.Extensions; -namespace Umbraco.Core.PropertyEditors.ValueConverters +namespace Umbraco.Cms.Core.PropertyEditors.ValueConverters { /// /// This ensures that the grid config is merged in with the front-end value @@ -24,7 +27,7 @@ namespace Umbraco.Core.PropertyEditors.ValueConverters } public override bool IsConverter(IPublishedPropertyType propertyType) - => propertyType.EditorAlias.InvariantEquals(Constants.PropertyEditors.Aliases.Grid); + => propertyType.EditorAlias.InvariantEquals(Cms.Core.Constants.PropertyEditors.Aliases.Grid); public override Type GetPropertyValueType(IPublishedPropertyType propertyType) => typeof (JToken); diff --git a/src/Umbraco.Infrastructure/PropertyEditors/ValueConverters/ImageCropperValue.cs b/src/Umbraco.Infrastructure/PropertyEditors/ValueConverters/ImageCropperValue.cs index 94cb074ade..c61289bcc9 100644 --- a/src/Umbraco.Infrastructure/PropertyEditors/ValueConverters/ImageCropperValue.cs +++ b/src/Umbraco.Infrastructure/PropertyEditors/ValueConverters/ImageCropperValue.cs @@ -1,15 +1,19 @@ -using System; +// Copyright (c) Umbraco. +// See LICENSE for more details. + +using System; using System.Collections.Generic; using System.ComponentModel; using System.Linq; using System.Runtime.Serialization; using Newtonsoft.Json; -using Umbraco.Core.Media; -using Umbraco.Core.Models; -using Umbraco.Core.Serialization; -using Umbraco.Core.Strings; +using Umbraco.Cms.Core.Media; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Core.Strings; +using Umbraco.Cms.Infrastructure.Serialization; +using Umbraco.Extensions; -namespace Umbraco.Core.PropertyEditors.ValueConverters +namespace Umbraco.Cms.Core.PropertyEditors.ValueConverters { /// /// Represents a value of the image cropper value editor. diff --git a/src/Umbraco.Infrastructure/PropertyEditors/ValueConverters/ImageCropperValueConverter.cs b/src/Umbraco.Infrastructure/PropertyEditors/ValueConverters/ImageCropperValueConverter.cs index a0e73be09b..20f44ae433 100644 --- a/src/Umbraco.Infrastructure/PropertyEditors/ValueConverters/ImageCropperValueConverter.cs +++ b/src/Umbraco.Infrastructure/PropertyEditors/ValueConverters/ImageCropperValueConverter.cs @@ -1,10 +1,14 @@ -using System; +// Copyright (c) Umbraco. +// See LICENSE for more details. + +using System; using System.Globalization; using Microsoft.Extensions.Logging; using Newtonsoft.Json; -using Umbraco.Core.Models.PublishedContent; +using Umbraco.Cms.Core.Models.PublishedContent; +using Umbraco.Extensions; -namespace Umbraco.Core.PropertyEditors.ValueConverters +namespace Umbraco.Cms.Core.PropertyEditors.ValueConverters { /// /// Represents a value converter for the image cropper value editor. @@ -21,7 +25,7 @@ namespace Umbraco.Core.PropertyEditors.ValueConverters /// public override bool IsConverter(IPublishedPropertyType propertyType) - => propertyType.EditorAlias.InvariantEquals(Constants.PropertyEditors.Aliases.ImageCropper); + => propertyType.EditorAlias.InvariantEquals(Cms.Core.Constants.PropertyEditors.Aliases.ImageCropper); /// public override Type GetPropertyValueType(IPublishedPropertyType propertyType) diff --git a/src/Umbraco.Infrastructure/PropertyEditors/ValueConverters/ImageCropperValueTypeConverter.cs b/src/Umbraco.Infrastructure/PropertyEditors/ValueConverters/ImageCropperValueTypeConverter.cs index 7631d32efc..e10725bd4b 100644 --- a/src/Umbraco.Infrastructure/PropertyEditors/ValueConverters/ImageCropperValueTypeConverter.cs +++ b/src/Umbraco.Infrastructure/PropertyEditors/ValueConverters/ImageCropperValueTypeConverter.cs @@ -1,11 +1,14 @@ -using System; +// Copyright (c) Umbraco. +// See LICENSE for more details. + +using System; using System.ComponentModel; using System.Globalization; using System.Linq; using Newtonsoft.Json.Linq; -using Umbraco.Core.Composing; +using Umbraco.Cms.Core.Composing; -namespace Umbraco.Core.PropertyEditors.ValueConverters +namespace Umbraco.Cms.Core.PropertyEditors.ValueConverters { /// /// Converts to string or JObject (why?). diff --git a/src/Umbraco.Infrastructure/PropertyEditors/ValueConverters/JsonValueConverter.cs b/src/Umbraco.Infrastructure/PropertyEditors/ValueConverters/JsonValueConverter.cs index f5228bd47e..28771a09cf 100644 --- a/src/Umbraco.Infrastructure/PropertyEditors/ValueConverters/JsonValueConverter.cs +++ b/src/Umbraco.Infrastructure/PropertyEditors/ValueConverters/JsonValueConverter.cs @@ -1,10 +1,14 @@ -using System; +// Copyright (c) Umbraco. +// See LICENSE for more details. + +using System; using Microsoft.Extensions.Logging; using Newtonsoft.Json; using Newtonsoft.Json.Linq; -using Umbraco.Core.Models.PublishedContent; +using Umbraco.Cms.Core.Models.PublishedContent; +using Umbraco.Extensions; -namespace Umbraco.Core.PropertyEditors.ValueConverters +namespace Umbraco.Cms.Core.PropertyEditors.ValueConverters { /// /// The default converter for all property editors that expose a JSON value type diff --git a/src/Umbraco.Infrastructure/PropertyEditors/ValueConverters/MarkdownEditorValueConverter.cs b/src/Umbraco.Infrastructure/PropertyEditors/ValueConverters/MarkdownEditorValueConverter.cs index 1b4b0a3acb..420a3156d0 100644 --- a/src/Umbraco.Infrastructure/PropertyEditors/ValueConverters/MarkdownEditorValueConverter.cs +++ b/src/Umbraco.Infrastructure/PropertyEditors/ValueConverters/MarkdownEditorValueConverter.cs @@ -1,10 +1,13 @@ -using System; -using HeyRed.MarkdownSharp; -using Umbraco.Core.Models.PublishedContent; -using Umbraco.Core.Strings; -using Umbraco.Web.Templates; +// Copyright (c) Umbraco. +// See LICENSE for more details. -namespace Umbraco.Core.PropertyEditors.ValueConverters +using System; +using HeyRed.MarkdownSharp; +using Umbraco.Cms.Core.Models.PublishedContent; +using Umbraco.Cms.Core.Strings; +using Umbraco.Cms.Core.Templates; + +namespace Umbraco.Cms.Core.PropertyEditors.ValueConverters { [DefaultPropertyValueConverter] public class MarkdownEditorValueConverter : PropertyValueConverterBase @@ -19,7 +22,7 @@ namespace Umbraco.Core.PropertyEditors.ValueConverters } public override bool IsConverter(IPublishedPropertyType propertyType) - => Constants.PropertyEditors.Aliases.MarkdownEditor.Equals(propertyType.EditorAlias); + => Cms.Core.Constants.PropertyEditors.Aliases.MarkdownEditor.Equals(propertyType.EditorAlias); public override Type GetPropertyValueType(IPublishedPropertyType propertyType) => typeof (IHtmlEncodedString); diff --git a/src/Umbraco.Infrastructure/PropertyEditors/ValueConverters/MultiUrlPickerValueConverter.cs b/src/Umbraco.Infrastructure/PropertyEditors/ValueConverters/MultiUrlPickerValueConverter.cs index 72beb0106a..947b1fc3e4 100644 --- a/src/Umbraco.Infrastructure/PropertyEditors/ValueConverters/MultiUrlPickerValueConverter.cs +++ b/src/Umbraco.Infrastructure/PropertyEditors/ValueConverters/MultiUrlPickerValueConverter.cs @@ -1,16 +1,19 @@ +// Copyright (c) Umbraco. +// See LICENSE for more details. + using System; using System.Collections.Generic; using System.Linq; -using Umbraco.Core; -using Umbraco.Core.Logging; -using Umbraco.Core.Models.PublishedContent; -using Umbraco.Core.PropertyEditors; -using Umbraco.Core.Serialization; -using Umbraco.Web.Models; -using Umbraco.Web.PublishedCache; -using Umbraco.Web.Routing; +using Umbraco.Cms.Core.Logging; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Core.Models.PublishedContent; +using Umbraco.Cms.Core.PublishedCache; +using Umbraco.Cms.Core.Routing; +using Umbraco.Cms.Core.Serialization; +using Umbraco.Cms.Core.Web; +using Umbraco.Extensions; -namespace Umbraco.Web.PropertyEditors.ValueConverters +namespace Umbraco.Cms.Core.PropertyEditors.ValueConverters { public class MultiUrlPickerValueConverter : PropertyValueConverterBase { @@ -63,7 +66,7 @@ namespace Umbraco.Web.PropertyEditors.ValueConverters if (dto.Udi != null) { - type = dto.Udi.EntityType == Core.Constants.UdiEntityType.Media + type = dto.Udi.EntityType == Constants.UdiEntityType.Media ? LinkType.Media : LinkType.Content; diff --git a/src/Umbraco.Infrastructure/PropertyEditors/ValueConverters/NestedContentManyValueConverter.cs b/src/Umbraco.Infrastructure/PropertyEditors/ValueConverters/NestedContentManyValueConverter.cs index 11b924552e..3406b1e6ff 100644 --- a/src/Umbraco.Infrastructure/PropertyEditors/ValueConverters/NestedContentManyValueConverter.cs +++ b/src/Umbraco.Infrastructure/PropertyEditors/ValueConverters/NestedContentManyValueConverter.cs @@ -1,15 +1,15 @@ -using System; +// Copyright (c) Umbraco. +// See LICENSE for more details. + +using System; using System.Collections.Generic; -using System.Linq; using Newtonsoft.Json; using Newtonsoft.Json.Linq; -using Umbraco.Core.Logging; -using Umbraco.Core.Models.PublishedContent; -using Umbraco.Core.PropertyEditors; -using Umbraco.Core.PropertyEditors.ValueConverters; -using Umbraco.Web.PublishedCache; +using Umbraco.Cms.Core.Logging; +using Umbraco.Cms.Core.Models.PublishedContent; +using Umbraco.Cms.Core.PublishedCache; -namespace Umbraco.Web.PropertyEditors.ValueConverters +namespace Umbraco.Cms.Core.PropertyEditors.ValueConverters { /// /// diff --git a/src/Umbraco.Infrastructure/PropertyEditors/ValueConverters/NestedContentSingleValueConverter.cs b/src/Umbraco.Infrastructure/PropertyEditors/ValueConverters/NestedContentSingleValueConverter.cs index c9859c9770..705ff516ef 100644 --- a/src/Umbraco.Infrastructure/PropertyEditors/ValueConverters/NestedContentSingleValueConverter.cs +++ b/src/Umbraco.Infrastructure/PropertyEditors/ValueConverters/NestedContentSingleValueConverter.cs @@ -1,14 +1,15 @@ -using System; +// Copyright (c) Umbraco. +// See LICENSE for more details. + +using System; using System.Collections.Generic; using Newtonsoft.Json; using Newtonsoft.Json.Linq; -using Umbraco.Core.Logging; -using Umbraco.Core.Models.PublishedContent; -using Umbraco.Core.PropertyEditors; -using Umbraco.Core.PropertyEditors.ValueConverters; -using Umbraco.Web.PublishedCache; +using Umbraco.Cms.Core.Logging; +using Umbraco.Cms.Core.Models.PublishedContent; +using Umbraco.Cms.Core.PublishedCache; -namespace Umbraco.Web.PropertyEditors.ValueConverters +namespace Umbraco.Cms.Core.PropertyEditors.ValueConverters { /// /// diff --git a/src/Umbraco.Infrastructure/PropertyEditors/ValueConverters/NestedContentValueConverterBase.cs b/src/Umbraco.Infrastructure/PropertyEditors/ValueConverters/NestedContentValueConverterBase.cs index 7c18d8ebca..e46b830af0 100644 --- a/src/Umbraco.Infrastructure/PropertyEditors/ValueConverters/NestedContentValueConverterBase.cs +++ b/src/Umbraco.Infrastructure/PropertyEditors/ValueConverters/NestedContentValueConverterBase.cs @@ -1,12 +1,14 @@ -using System; +// Copyright (c) Umbraco. +// See LICENSE for more details. + +using System; using System.Collections.Generic; using Newtonsoft.Json.Linq; -using Umbraco.Core; -using Umbraco.Core.Models.PublishedContent; -using Umbraco.Core.PropertyEditors; -using Umbraco.Web.PublishedCache; +using Umbraco.Cms.Core.Models.PublishedContent; +using Umbraco.Cms.Core.PublishedCache; +using Umbraco.Extensions; -namespace Umbraco.Web.PropertyEditors.ValueConverters +namespace Umbraco.Cms.Core.PropertyEditors.ValueConverters { public abstract class NestedContentValueConverterBase : PropertyValueConverterBase { diff --git a/src/Umbraco.Infrastructure/PropertyEditors/ValueConverters/RteMacroRenderingValueConverter.cs b/src/Umbraco.Infrastructure/PropertyEditors/ValueConverters/RteMacroRenderingValueConverter.cs index d0713b46ff..dd5bb30722 100644 --- a/src/Umbraco.Infrastructure/PropertyEditors/ValueConverters/RteMacroRenderingValueConverter.cs +++ b/src/Umbraco.Infrastructure/PropertyEditors/ValueConverters/RteMacroRenderingValueConverter.cs @@ -1,15 +1,18 @@ +// Copyright (c) Umbraco. +// See LICENSE for more details. + using System.Linq; using System.Text; using HtmlAgilityPack; -using Umbraco.Core; -using Umbraco.Core.Models.PublishedContent; -using Umbraco.Core.PropertyEditors; -using Umbraco.Core.PropertyEditors.ValueConverters; -using Umbraco.Core.Strings; -using Umbraco.Web.Macros; -using Umbraco.Web.Templates; +using Umbraco.Cms.Core.Macros; +using Umbraco.Cms.Core.Models.PublishedContent; +using Umbraco.Cms.Core.Strings; +using Umbraco.Cms.Core.Templates; +using Umbraco.Cms.Core.Web; +using Umbraco.Cms.Infrastructure.Macros; +using Umbraco.Extensions; -namespace Umbraco.Web.PropertyEditors.ValueConverters +namespace Umbraco.Cms.Core.PropertyEditors.ValueConverters { /// /// A value converter for TinyMCE that will ensure any macro content is rendered properly even when diff --git a/src/Umbraco.Infrastructure/PropertyEditors/ValueListConfigurationEditor.cs b/src/Umbraco.Infrastructure/PropertyEditors/ValueListConfigurationEditor.cs index 7802767ad6..1acd039b93 100644 --- a/src/Umbraco.Infrastructure/PropertyEditors/ValueListConfigurationEditor.cs +++ b/src/Umbraco.Infrastructure/PropertyEditors/ValueListConfigurationEditor.cs @@ -1,11 +1,14 @@ -using System.Collections.Generic; +// Copyright (c) Umbraco. +// See LICENSE for more details. + +using System.Collections.Generic; using System.Linq; using Newtonsoft.Json.Linq; -using Umbraco.Core.IO; -using Umbraco.Core.PropertyEditors; -using Umbraco.Core.Services; +using Umbraco.Cms.Core.IO; +using Umbraco.Cms.Core.Services; +using Umbraco.Extensions; -namespace Umbraco.Web.PropertyEditors +namespace Umbraco.Cms.Core.PropertyEditors { /// /// Pre-value editor used to create a list of items diff --git a/src/Umbraco.Infrastructure/PropertyEditors/ValueListUniqueValueValidator.cs b/src/Umbraco.Infrastructure/PropertyEditors/ValueListUniqueValueValidator.cs index c4f105fd02..dd5ba9ef92 100644 --- a/src/Umbraco.Infrastructure/PropertyEditors/ValueListUniqueValueValidator.cs +++ b/src/Umbraco.Infrastructure/PropertyEditors/ValueListUniqueValueValidator.cs @@ -1,11 +1,13 @@ -using System.Collections.Generic; +// Copyright (c) Umbraco. +// See LICENSE for more details. + +using System.Collections.Generic; using System.ComponentModel.DataAnnotations; using System.Linq; using Newtonsoft.Json.Linq; -using Umbraco.Core; -using Umbraco.Core.PropertyEditors; +using Umbraco.Extensions; -namespace Umbraco.Web.PropertyEditors +namespace Umbraco.Cms.Core.PropertyEditors { /// /// Represents a validator which ensures that all values in the list are unique. diff --git a/src/Umbraco.Infrastructure/PublishedCache/PublishedContentTypeCache.cs b/src/Umbraco.Infrastructure/PublishedCache/PublishedContentTypeCache.cs index ae99243a2c..e37a31f1f6 100644 --- a/src/Umbraco.Infrastructure/PublishedCache/PublishedContentTypeCache.cs +++ b/src/Umbraco.Infrastructure/PublishedCache/PublishedContentTypeCache.cs @@ -2,12 +2,12 @@ using System; using System.Collections.Generic; using System.Linq; using System.Threading; -using Umbraco.Core.Models; -using Umbraco.Core.Models.PublishedContent; -using Umbraco.Core.Services; using Microsoft.Extensions.Logging; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Core.Models.PublishedContent; +using Umbraco.Cms.Core.Services; -namespace Umbraco.Web.PublishedCache +namespace Umbraco.Cms.Core.PublishedCache { /// /// Represents a content type cache. diff --git a/src/Umbraco.Infrastructure/PublishedContentQuery.cs b/src/Umbraco.Infrastructure/PublishedContentQuery.cs index e995850a1f..1d13748aeb 100644 --- a/src/Umbraco.Infrastructure/PublishedContentQuery.cs +++ b/src/Umbraco.Infrastructure/PublishedContentQuery.cs @@ -5,13 +5,15 @@ using System.Linq; using System.Xml.XPath; using Examine; using Examine.Search; -using Umbraco.Core; -using Umbraco.Core.Models.PublishedContent; -using Umbraco.Core.Xml; -using Umbraco.Examine; -using Umbraco.Web.PublishedCache; +using Umbraco.Cms.Core; +using Umbraco.Cms.Core.Models.PublishedContent; +using Umbraco.Cms.Core.PublishedCache; +using Umbraco.Cms.Core.Xml; +using Umbraco.Cms.Infrastructure.Examine; +using Umbraco.Extensions; +using Constants = Umbraco.Cms.Core.Constants; -namespace Umbraco.Web +namespace Umbraco.Cms.Infrastructure { /// /// A class used to query for published content, media items diff --git a/src/Umbraco.Infrastructure/Routing/ContentFinderByConfigured404.cs b/src/Umbraco.Infrastructure/Routing/ContentFinderByConfigured404.cs index bc9f9f3857..ef392f1644 100644 --- a/src/Umbraco.Infrastructure/Routing/ContentFinderByConfigured404.cs +++ b/src/Umbraco.Infrastructure/Routing/ContentFinderByConfigured404.cs @@ -3,12 +3,13 @@ using System.Linq; using Examine; using Microsoft.Extensions.Logging; using Microsoft.Extensions.Options; -using Umbraco.Core; -using Umbraco.Core.Configuration.Models; -using Umbraco.Core.Models.PublishedContent; -using Umbraco.Core.Services; +using Umbraco.Cms.Core.Configuration.Models; +using Umbraco.Cms.Core.Models.PublishedContent; +using Umbraco.Cms.Core.Services; +using Umbraco.Cms.Core.Web; +using Umbraco.Cms.Infrastructure; -namespace Umbraco.Web.Routing +namespace Umbraco.Cms.Core.Routing { /// /// Provides an implementation of that runs the legacy 404 logic. diff --git a/src/Umbraco.Infrastructure/Routing/NotFoundHandlerHelper.cs b/src/Umbraco.Infrastructure/Routing/NotFoundHandlerHelper.cs index d73b780974..85a27af0e8 100644 --- a/src/Umbraco.Infrastructure/Routing/NotFoundHandlerHelper.cs +++ b/src/Umbraco.Infrastructure/Routing/NotFoundHandlerHelper.cs @@ -1,16 +1,15 @@ using System; -using System.Globalization; using System.Linq; using Microsoft.Extensions.Logging; -using Umbraco.Core; -using Umbraco.Core.Configuration.Models; -using Umbraco.Core.Configuration.UmbracoSettings; -using Umbraco.Core.Models; -using Umbraco.Core.Models.PublishedContent; -using Umbraco.Core.Services; -using Umbraco.Core.Xml; +using Umbraco.Cms.Core.Configuration.Models; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Core.Models.Entities; +using Umbraco.Cms.Core.Models.PublishedContent; +using Umbraco.Cms.Core.Services; +using Umbraco.Cms.Core.Xml; +using Umbraco.Extensions; -namespace Umbraco.Web.Routing +namespace Umbraco.Cms.Core.Routing { /// /// Used to determine the node to display when content is not found based on the configured error404 elements in umbracoSettings.config @@ -77,7 +76,7 @@ namespace Umbraco.Web.Routing nodeContextId: null, getPath: nodeid => { - Core.Models.Entities.IEntitySlim ent = entityService.Get(nodeid); + IEntitySlim ent = entityService.Get(nodeid); return ent.Path.Split(',').Reverse(); }, publishedContentExists: i => publishedContentQuery.Content(i) != null); diff --git a/src/Umbraco.Infrastructure/Routing/RedirectTrackingComponent.cs b/src/Umbraco.Infrastructure/Routing/RedirectTrackingComponent.cs index 861aeea2e5..f6d48fa057 100644 --- a/src/Umbraco.Infrastructure/Routing/RedirectTrackingComponent.cs +++ b/src/Umbraco.Infrastructure/Routing/RedirectTrackingComponent.cs @@ -2,18 +2,17 @@ using System.Collections.Generic; using System.Linq; using Microsoft.Extensions.Options; -using Umbraco.Core; -using Umbraco.Core.Composing; -using Umbraco.Core.Configuration.Models; -using Umbraco.Core.Configuration.UmbracoSettings; -using Umbraco.Core.Events; -using Umbraco.Core.Models; -using Umbraco.Core.Models.PublishedContent; -using Umbraco.Core.Services; -using Umbraco.Core.Services.Implement; -using Umbraco.Web.PublishedCache; +using Umbraco.Cms.Core.Composing; +using Umbraco.Cms.Core.Configuration.Models; +using Umbraco.Cms.Core.Events; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Core.Models.PublishedContent; +using Umbraco.Cms.Core.PublishedCache; +using Umbraco.Cms.Core.Services; +using Umbraco.Cms.Core.Services.Implement; +using Umbraco.Extensions; -namespace Umbraco.Web.Routing +namespace Umbraco.Cms.Core.Routing { /// Implements an Application Event Handler for managing redirect URLs tracking. /// when content is renamed or moved, we want to create a permanent 301 redirect from it's old URL @@ -26,14 +25,14 @@ namespace Umbraco.Web.Routing { private const string _eventStateKey = "Umbraco.Web.Redirects.RedirectTrackingEventHandler"; - private readonly WebRoutingSettings _webRoutingSettings; + private readonly IOptionsMonitor _webRoutingSettings; private readonly IPublishedSnapshotAccessor _publishedSnapshotAccessor; private readonly IRedirectUrlService _redirectUrlService; private readonly IVariationContextAccessor _variationContextAccessor; - public RedirectTrackingComponent(IOptions webRoutingSettings, IPublishedSnapshotAccessor publishedSnapshotAccessor, IRedirectUrlService redirectUrlService, IVariationContextAccessor variationContextAccessor) + public RedirectTrackingComponent(IOptionsMonitor webRoutingSettings, IPublishedSnapshotAccessor publishedSnapshotAccessor, IRedirectUrlService redirectUrlService, IVariationContextAccessor variationContextAccessor) { - _webRoutingSettings = webRoutingSettings.Value; + _webRoutingSettings = webRoutingSettings; _publishedSnapshotAccessor = publishedSnapshotAccessor; _redirectUrlService = redirectUrlService; _variationContextAccessor = variationContextAccessor; @@ -65,7 +64,7 @@ namespace Umbraco.Web.Routing private void ContentService_Publishing(IContentService sender, PublishEventArgs args) { // don't let the event handlers kick in if Redirect Tracking is turned off in the config - if (_webRoutingSettings.DisableRedirectUrlTracking) return; + if (_webRoutingSettings.CurrentValue.DisableRedirectUrlTracking) return; var oldRoutes = GetOldRoutes(args.EventState); foreach (var entity in args.PublishedEntities) @@ -77,7 +76,7 @@ namespace Umbraco.Web.Routing private void ContentService_Published(IContentService sender, ContentPublishedEventArgs args) { // don't let the event handlers kick in if Redirect Tracking is turned off in the config - if (_webRoutingSettings.DisableRedirectUrlTracking) return; + if (_webRoutingSettings.CurrentValue.DisableRedirectUrlTracking) return; var oldRoutes = GetOldRoutes(args.EventState); CreateRedirects(oldRoutes); @@ -86,7 +85,7 @@ namespace Umbraco.Web.Routing private void ContentService_Moving(IContentService sender, MoveEventArgs args) { // don't let the event handlers kick in if Redirect Tracking is turned off in the config - if (_webRoutingSettings.DisableRedirectUrlTracking) return; + if (_webRoutingSettings.CurrentValue.DisableRedirectUrlTracking) return; var oldRoutes = GetOldRoutes(args.EventState); foreach (var info in args.MoveInfoCollection) @@ -98,7 +97,7 @@ namespace Umbraco.Web.Routing private void ContentService_Moved(IContentService sender, MoveEventArgs args) { // don't let the event handlers kick in if Redirect Tracking is turned off in the config - if (_webRoutingSettings.DisableRedirectUrlTracking) return; + if (_webRoutingSettings.CurrentValue.DisableRedirectUrlTracking) return; var oldRoutes = GetOldRoutes(args.EventState); CreateRedirects(oldRoutes); diff --git a/src/Umbraco.Infrastructure/Routing/RedirectTrackingComposer.cs b/src/Umbraco.Infrastructure/Routing/RedirectTrackingComposer.cs index 0680a4c97f..e56fbda4d7 100644 --- a/src/Umbraco.Infrastructure/Routing/RedirectTrackingComposer.cs +++ b/src/Umbraco.Infrastructure/Routing/RedirectTrackingComposer.cs @@ -1,6 +1,6 @@ -using Umbraco.Core.Composing; +using Umbraco.Cms.Core.Composing; -namespace Umbraco.Web.Routing +namespace Umbraco.Cms.Core.Routing { /// /// Implements an Application Event Handler for managing redirect URLs tracking. diff --git a/src/Umbraco.Infrastructure/Runtime/CoreRuntime.cs b/src/Umbraco.Infrastructure/Runtime/CoreRuntime.cs index de0be4ca25..4c05f56d5c 100644 --- a/src/Umbraco.Infrastructure/Runtime/CoreRuntime.cs +++ b/src/Umbraco.Infrastructure/Runtime/CoreRuntime.cs @@ -2,14 +2,17 @@ using System; using System.Threading; using System.Threading.Tasks; using Microsoft.Extensions.Logging; -using Umbraco.Core; -using Umbraco.Core.Composing; -using Umbraco.Core.Events; -using Umbraco.Core.Hosting; -using Umbraco.Core.Logging; -using Umbraco.Core.Persistence; +using Umbraco.Cms.Core; +using Umbraco.Cms.Core.Composing; +using Umbraco.Cms.Core.Events; +using Umbraco.Cms.Core.Hosting; +using Umbraco.Cms.Core.Logging; +using Umbraco.Cms.Core.Runtime; +using Umbraco.Cms.Core.Services; +using Umbraco.Cms.Infrastructure.Persistence; +using Constants = Umbraco.Cms.Core.Constants; -namespace Umbraco.Infrastructure.Runtime +namespace Umbraco.Cms.Infrastructure.Runtime { public class CoreRuntime : IRuntime { @@ -76,7 +79,7 @@ namespace Umbraco.Infrastructure.Runtime _logger.LogError(exception, msg); }; - AppDomain.CurrentDomain.SetData("DataDirectory", _hostingEnvironment?.MapPathContentRoot(Core.Constants.SystemDirectories.Data)); + AppDomain.CurrentDomain.SetData("DataDirectory", _hostingEnvironment?.MapPathContentRoot(Constants.SystemDirectories.Data)); DoUnattendedInstall(); DetermineRuntimeLevel(); diff --git a/src/Umbraco.Infrastructure/Runtime/SqlMainDomLock.cs b/src/Umbraco.Infrastructure/Runtime/SqlMainDomLock.cs index a150afa095..22fa172874 100644 --- a/src/Umbraco.Infrastructure/Runtime/SqlMainDomLock.cs +++ b/src/Umbraco.Infrastructure/Runtime/SqlMainDomLock.cs @@ -8,16 +8,19 @@ using System.Threading; using System.Threading.Tasks; using Microsoft.Extensions.Logging; using NPoco; -using Umbraco.Core.Configuration.Models; -using Umbraco.Core.Hosting; -using Umbraco.Core.Migrations.Install; -using Umbraco.Core.Persistence; -using Umbraco.Core.Persistence.Dtos; -using Umbraco.Core.Persistence.Mappers; -using Umbraco.Core.Persistence.SqlSyntax; -using MapperCollection = Umbraco.Core.Persistence.Mappers.MapperCollection; +using Umbraco.Cms.Core; +using Umbraco.Cms.Core.Configuration.Models; +using Umbraco.Cms.Core.Hosting; +using Umbraco.Cms.Core.Runtime; +using Umbraco.Cms.Infrastructure.Migrations.Install; +using Umbraco.Cms.Infrastructure.Persistence; +using Umbraco.Cms.Infrastructure.Persistence.Dtos; +using Umbraco.Cms.Infrastructure.Persistence.Mappers; +using Umbraco.Cms.Infrastructure.Persistence.SqlSyntax; +using Umbraco.Extensions; +using MapperCollection = Umbraco.Cms.Infrastructure.Persistence.Mappers.MapperCollection; -namespace Umbraco.Core.Runtime +namespace Umbraco.Cms.Infrastructure.Runtime { public class SqlMainDomLock : IMainDomLock { @@ -77,7 +80,7 @@ _hostingEnvironment = hostingEnvironment; { db = _dbFactory.CreateDatabase(); - _hasTable = db.HasTable(Constants.DatabaseSchema.Tables.KeyValue); + _hasTable = db.HasTable(Cms.Core.Constants.DatabaseSchema.Tables.KeyValue); if (!_hasTable) { // the Db does not contain the required table, we must be in an install state we have no choice but to assume we can acquire @@ -89,7 +92,7 @@ _hostingEnvironment = hostingEnvironment; try { // wait to get a write lock - _sqlServerSyntax.WriteLock(db, TimeSpan.FromMilliseconds(millisecondsTimeout), Constants.Locks.MainDom); + _sqlServerSyntax.WriteLock(db, TimeSpan.FromMilliseconds(millisecondsTimeout), Cms.Core.Constants.Locks.MainDom); } catch(SqlException ex) { @@ -198,7 +201,7 @@ _hostingEnvironment = hostingEnvironment; { // re-check if its still false, we don't want to re-query once we know its there since this // loop needs to use minimal resources - _hasTable = db.HasTable(Constants.DatabaseSchema.Tables.KeyValue); + _hasTable = db.HasTable(Cms.Core.Constants.DatabaseSchema.Tables.KeyValue); if (!_hasTable) { // the Db does not contain the required table, we just keep looping since we can't query the db @@ -208,7 +211,7 @@ _hostingEnvironment = hostingEnvironment; db.BeginTransaction(IsolationLevel.ReadCommitted); // get a read lock - _sqlServerSyntax.ReadLock(db, Constants.Locks.MainDom); + _sqlServerSyntax.ReadLock(db, Cms.Core.Constants.Locks.MainDom); if (!IsMainDomValue(_lockId, db)) { @@ -294,7 +297,7 @@ _hostingEnvironment = hostingEnvironment; { transaction = db.GetTransaction(IsolationLevel.ReadCommitted); // get a read lock - _sqlServerSyntax.ReadLock(db, Constants.Locks.MainDom); + _sqlServerSyntax.ReadLock(db, Cms.Core.Constants.Locks.MainDom); // the row var mainDomRows = db.Fetch("SELECT * FROM umbracoKeyValue WHERE [key] = @key", new { key = MainDomKey }); @@ -306,7 +309,7 @@ _hostingEnvironment = hostingEnvironment; // which indicates that we // can acquire it and it has shutdown. - _sqlServerSyntax.WriteLock(db, Constants.Locks.MainDom); + _sqlServerSyntax.WriteLock(db, Cms.Core.Constants.Locks.MainDom); // so now we update the row with our appdomain id InsertLockRecord(_lockId, db); @@ -365,7 +368,7 @@ _hostingEnvironment = hostingEnvironment; { transaction = db.GetTransaction(IsolationLevel.ReadCommitted); - _sqlServerSyntax.WriteLock(db, Constants.Locks.MainDom); + _sqlServerSyntax.WriteLock(db, Cms.Core.Constants.Locks.MainDom); // so now we update the row with our appdomain id InsertLockRecord(_lockId, db); @@ -448,7 +451,7 @@ _hostingEnvironment = hostingEnvironment; db.BeginTransaction(IsolationLevel.ReadCommitted); // get a write lock - _sqlServerSyntax.WriteLock(db, Constants.Locks.MainDom); + _sqlServerSyntax.WriteLock(db, Cms.Core.Constants.Locks.MainDom); // When we are disposed, it means we have released the MainDom lock // and called all MainDom release callbacks, in this case diff --git a/src/Umbraco.Infrastructure/RuntimeState.cs b/src/Umbraco.Infrastructure/RuntimeState.cs index 8b5e0abdc0..b62c30e4d2 100644 --- a/src/Umbraco.Infrastructure/RuntimeState.cs +++ b/src/Umbraco.Infrastructure/RuntimeState.cs @@ -1,16 +1,18 @@ -using System; +using System; using System.Threading; -using Semver; using Microsoft.Extensions.Logging; using Microsoft.Extensions.Options; -using Umbraco.Core.Configuration; -using Umbraco.Core.Configuration.Models; -using Umbraco.Core.Exceptions; -using Umbraco.Core.Migrations.Install; -using Umbraco.Core.Migrations.Upgrade; -using Umbraco.Core.Persistence; +using Umbraco.Cms.Core; +using Umbraco.Cms.Core.Configuration; +using Umbraco.Cms.Core.Configuration.Models; +using Umbraco.Cms.Core.Exceptions; +using Umbraco.Cms.Core.Semver; +using Umbraco.Cms.Core.Services; +using Umbraco.Cms.Infrastructure.Migrations.Install; +using Umbraco.Cms.Infrastructure.Migrations.Upgrade; +using Umbraco.Cms.Infrastructure.Persistence; -namespace Umbraco.Core +namespace Umbraco.Cms.Core { /// /// Represents the state of the Umbraco runtime. @@ -51,7 +53,7 @@ namespace Umbraco.Core /// - public Version Version => _umbracoVersion.Current; + public Version Version => _umbracoVersion.Version; /// public string VersionComment => _umbracoVersion.Comment; diff --git a/src/Umbraco.Infrastructure/Scoping/IScope.cs b/src/Umbraco.Infrastructure/Scoping/IScope.cs index de4eef0a08..7a6a62a6c7 100644 --- a/src/Umbraco.Infrastructure/Scoping/IScope.cs +++ b/src/Umbraco.Infrastructure/Scoping/IScope.cs @@ -1,9 +1,9 @@ using System; -using Umbraco.Core.Cache; -using Umbraco.Core.Events; -using Umbraco.Core.Persistence; +using Umbraco.Cms.Core.Cache; +using Umbraco.Cms.Core.Events; +using Umbraco.Cms.Infrastructure.Persistence; -namespace Umbraco.Core.Scoping +namespace Umbraco.Cms.Core.Scoping { /// /// Represents a scope. diff --git a/src/Umbraco.Infrastructure/Scoping/IScopeAccessor.cs b/src/Umbraco.Infrastructure/Scoping/IScopeAccessor.cs index aa830967d3..a699a8bc3e 100644 --- a/src/Umbraco.Infrastructure/Scoping/IScopeAccessor.cs +++ b/src/Umbraco.Infrastructure/Scoping/IScopeAccessor.cs @@ -1,4 +1,7 @@ -namespace Umbraco.Core.Scoping +// Copyright (c) Umbraco. +// See LICENSE for more details. + +namespace Umbraco.Cms.Core.Scoping { /// /// Provides access to the ambient scope. diff --git a/src/Umbraco.Infrastructure/Scoping/IScopeProvider.cs b/src/Umbraco.Infrastructure/Scoping/IScopeProvider.cs index 712b90affa..06cf16d221 100644 --- a/src/Umbraco.Infrastructure/Scoping/IScopeProvider.cs +++ b/src/Umbraco.Infrastructure/Scoping/IScopeProvider.cs @@ -1,13 +1,12 @@ -using System; using System.Data; -using Umbraco.Core.Events; -using Umbraco.Core.Persistence; +using Umbraco.Cms.Core.Events; +using Umbraco.Cms.Infrastructure.Persistence; #if DEBUG_SCOPES using System.Collections.Generic; #endif -namespace Umbraco.Core.Scoping +namespace Umbraco.Cms.Core.Scoping { /// /// Provides scopes. diff --git a/src/Umbraco.Infrastructure/Scoping/Scope.cs b/src/Umbraco.Infrastructure/Scoping/Scope.cs index 84945c78d4..7d50f5e55a 100644 --- a/src/Umbraco.Infrastructure/Scoping/Scope.cs +++ b/src/Umbraco.Infrastructure/Scoping/Scope.cs @@ -1,14 +1,14 @@ using System; using System.Data; using Microsoft.Extensions.Logging; -using Umbraco.Core.Cache; -using Umbraco.Core.Composing; -using Umbraco.Core.Events; -using Umbraco.Core.IO; -using Umbraco.Core.Persistence; -using CoreDebugSettings = Umbraco.Core.Configuration.Models.CoreDebugSettings; +using Umbraco.Cms.Core.Cache; +using Umbraco.Cms.Core.Events; +using Umbraco.Cms.Core.IO; +using Umbraco.Cms.Infrastructure.Persistence; +using Umbraco.Extensions; +using CoreDebugSettings = Umbraco.Cms.Core.Configuration.Models.CoreDebugSettings; -namespace Umbraco.Core.Scoping +namespace Umbraco.Cms.Core.Scoping { /// /// Implements . diff --git a/src/Umbraco.Infrastructure/Scoping/ScopeContext.cs b/src/Umbraco.Infrastructure/Scoping/ScopeContext.cs index 7b62c5c7a2..0ec966d18f 100644 --- a/src/Umbraco.Infrastructure/Scoping/ScopeContext.cs +++ b/src/Umbraco.Infrastructure/Scoping/ScopeContext.cs @@ -1,8 +1,9 @@ using System; using System.Collections.Generic; using System.Linq; +using Umbraco.Cms.Core.Scoping; -namespace Umbraco.Core.Scoping +namespace Umbraco.Cms.Core.Scoping { internal class ScopeContext : IScopeContext, IInstanceIdentifiable { diff --git a/src/Umbraco.Infrastructure/Scoping/ScopeContextualBase.cs b/src/Umbraco.Infrastructure/Scoping/ScopeContextualBase.cs index 25f176d471..bde8f79012 100644 --- a/src/Umbraco.Infrastructure/Scoping/ScopeContextualBase.cs +++ b/src/Umbraco.Infrastructure/Scoping/ScopeContextualBase.cs @@ -1,6 +1,6 @@ using System; -namespace Umbraco.Core.Scoping +namespace Umbraco.Cms.Core.Scoping { /// /// Provides a base class for scope contextual objects. diff --git a/src/Umbraco.Infrastructure/Scoping/ScopeProvider.cs b/src/Umbraco.Infrastructure/Scoping/ScopeProvider.cs index 151c4cfb3c..b0b1868a0d 100644 --- a/src/Umbraco.Infrastructure/Scoping/ScopeProvider.cs +++ b/src/Umbraco.Infrastructure/Scoping/ScopeProvider.cs @@ -2,19 +2,18 @@ using System; using System.Data; using Microsoft.Extensions.Logging; using Microsoft.Extensions.Options; -using Umbraco.Core.Cache; -using Umbraco.Core.Composing; -using Umbraco.Core.Events; -using Umbraco.Core.IO; -using Umbraco.Core.Persistence; -using CoreDebugSettings = Umbraco.Core.Configuration.Models.CoreDebugSettings; +using Umbraco.Cms.Core.Cache; +using Umbraco.Cms.Core.Events; +using Umbraco.Cms.Core.IO; +using Umbraco.Cms.Infrastructure.Persistence; +using CoreDebugSettings = Umbraco.Cms.Core.Configuration.Models.CoreDebugSettings; #if DEBUG_SCOPES using System.Linq; using System.Text; #endif -namespace Umbraco.Core.Scoping +namespace Umbraco.Cms.Core.Scoping { /// /// Implements . diff --git a/src/Umbraco.Infrastructure/Scoping/ScopeReference.cs b/src/Umbraco.Infrastructure/Scoping/ScopeReference.cs index e1bfc21adc..54d41d1efa 100644 --- a/src/Umbraco.Infrastructure/Scoping/ScopeReference.cs +++ b/src/Umbraco.Infrastructure/Scoping/ScopeReference.cs @@ -1,4 +1,7 @@ -namespace Umbraco.Core.Scoping +// Copyright (c) Umbraco. +// See LICENSE for more details. + +namespace Umbraco.Cms.Core.Scoping { /// /// References a scope. diff --git a/src/Umbraco.Infrastructure/Search/BackgroundIndexRebuilder.cs b/src/Umbraco.Infrastructure/Search/BackgroundIndexRebuilder.cs index 6f69dd0ad8..2fbceb2f9a 100644 --- a/src/Umbraco.Infrastructure/Search/BackgroundIndexRebuilder.cs +++ b/src/Umbraco.Infrastructure/Search/BackgroundIndexRebuilder.cs @@ -5,11 +5,11 @@ using System; using System.Threading; using System.Threading.Tasks; using Microsoft.Extensions.Logging; -using Umbraco.Core; -using Umbraco.Examine; -using Umbraco.Infrastructure.HostedServices; +using Umbraco.Cms.Core.Runtime; +using Umbraco.Cms.Infrastructure.Examine; +using Umbraco.Cms.Infrastructure.HostedServices; -namespace Umbraco.Web.Search +namespace Umbraco.Cms.Infrastructure.Search { /// /// Utility to rebuild all indexes on a background thread diff --git a/src/Umbraco.Infrastructure/Search/ExamineComponent.cs b/src/Umbraco.Infrastructure/Search/ExamineComponent.cs index a5fc5253f2..1eb1d3bc29 100644 --- a/src/Umbraco.Infrastructure/Search/ExamineComponent.cs +++ b/src/Umbraco.Infrastructure/Search/ExamineComponent.cs @@ -4,22 +4,22 @@ using System.Globalization; using System.Linq; using Examine; using Microsoft.Extensions.Logging; -using Umbraco.Core; -using Umbraco.Core.Cache; -using Umbraco.Core.Logging; -using Umbraco.Core.Models; -using Umbraco.Core.Scoping; -using Umbraco.Core.Services; -using Umbraco.Core.Services.Changes; -using Umbraco.Core.Sync; -using Umbraco.Examine; -using Umbraco.Web.Cache; +using Umbraco.Cms.Core; +using Umbraco.Cms.Core.Cache; +using Umbraco.Cms.Core.Composing; +using Umbraco.Cms.Core.Logging; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Core.Runtime; +using Umbraco.Cms.Core.Scoping; +using Umbraco.Cms.Core.Services; +using Umbraco.Cms.Core.Services.Changes; +using Umbraco.Cms.Core.Sync; +using Umbraco.Cms.Infrastructure.Examine; +using Umbraco.Extensions; -namespace Umbraco.Web.Search +namespace Umbraco.Cms.Infrastructure.Search { - - - public sealed class ExamineComponent : Umbraco.Core.Composing.IComponent + public sealed class ExamineComponent : IComponent { private readonly IExamineManager _examineManager; private readonly IContentValueSetBuilder _contentValueSetBuilder; diff --git a/src/Umbraco.Infrastructure/Search/ExamineComposer.cs b/src/Umbraco.Infrastructure/Search/ExamineComposer.cs index c961aa6e72..45ba3c461e 100644 --- a/src/Umbraco.Infrastructure/Search/ExamineComposer.cs +++ b/src/Umbraco.Infrastructure/Search/ExamineComposer.cs @@ -1,16 +1,16 @@ using Microsoft.Extensions.DependencyInjection; -using Umbraco.Core.DependencyInjection; -using Umbraco.Core.Composing; -using Umbraco.Core.Models; -using Umbraco.Core.PropertyEditors; -using Umbraco.Core.Scoping; -using Umbraco.Core.Services; -using Umbraco.Core.Strings; -using Umbraco.Examine; +using Umbraco.Cms.Core.Composing; +using Umbraco.Cms.Core.DependencyInjection; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Core.PropertyEditors; +using Umbraco.Cms.Core.Scoping; +using Umbraco.Cms.Core.Services; +using Umbraco.Cms.Core.Strings; +using Umbraco.Cms.Infrastructure.Examine; +using Umbraco.Extensions; -namespace Umbraco.Web.Search +namespace Umbraco.Cms.Infrastructure.Search { - /// /// Configures and installs Examine. /// @@ -22,10 +22,10 @@ namespace Umbraco.Web.Search // populators are not a collection: one cannot remove ours, and can only add more // the container can inject IEnumerable and get them all - builder.Services.AddSingleton(); - builder.Services.AddSingleton(); - builder.Services.AddSingleton(); - builder.Services.AddSingleton(); + builder.Services.AddSingleton(); + builder.Services.AddSingleton(); + builder.Services.AddSingleton(); + builder.Services.AddSingleton(); builder.Services.AddSingleton(); builder.Services.AddUnique(); diff --git a/src/Umbraco.Infrastructure/Search/ExamineFinalComponent.cs b/src/Umbraco.Infrastructure/Search/ExamineFinalComponent.cs index 199c6482f4..441d8af038 100644 --- a/src/Umbraco.Infrastructure/Search/ExamineFinalComponent.cs +++ b/src/Umbraco.Infrastructure/Search/ExamineFinalComponent.cs @@ -1,10 +1,9 @@ using System; -using Umbraco.Core; -using Umbraco.Core.Composing; +using Umbraco.Cms.Core.Composing; +using Umbraco.Cms.Core.Runtime; -namespace Umbraco.Web.Search +namespace Umbraco.Cms.Infrastructure.Search { - /// /// Executes after all other examine components have executed /// diff --git a/src/Umbraco.Infrastructure/Search/ExamineFinalComposer.cs b/src/Umbraco.Infrastructure/Search/ExamineFinalComposer.cs index 6b33459159..037a3d1622 100644 --- a/src/Umbraco.Infrastructure/Search/ExamineFinalComposer.cs +++ b/src/Umbraco.Infrastructure/Search/ExamineFinalComposer.cs @@ -1,6 +1,6 @@ -using Umbraco.Core.Composing; +using Umbraco.Cms.Core.Composing; -namespace Umbraco.Web.Search +namespace Umbraco.Cms.Infrastructure.Search { // examine's final composer composes after all user composers // and *also* after ICoreComposer (in case IUserComposer is disabled) diff --git a/src/Umbraco.Infrastructure/Search/ExamineIndexModel.cs b/src/Umbraco.Infrastructure/Search/ExamineIndexModel.cs index 13cd2cbc12..d14cef8ccf 100644 --- a/src/Umbraco.Infrastructure/Search/ExamineIndexModel.cs +++ b/src/Umbraco.Infrastructure/Search/ExamineIndexModel.cs @@ -1,12 +1,10 @@ -using System; -using System.Collections.Generic; +using System.Collections.Generic; using System.Runtime.Serialization; -using Examine; -namespace Umbraco.Web.Search +namespace Umbraco.Cms.Infrastructure.Search { [DataContract(Name = "indexer", Namespace = "")] - public class ExamineIndexModel + public class ExamineIndexModel { [DataMember(Name = "name")] public string Name { get; set; } diff --git a/src/Umbraco.Infrastructure/Search/ExamineSearcherModel.cs b/src/Umbraco.Infrastructure/Search/ExamineSearcherModel.cs index 8b9badfcfa..8e6ea30c0c 100644 --- a/src/Umbraco.Infrastructure/Search/ExamineSearcherModel.cs +++ b/src/Umbraco.Infrastructure/Search/ExamineSearcherModel.cs @@ -1,10 +1,6 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Runtime.Serialization; -using System.Text; +using System.Runtime.Serialization; -namespace Umbraco.Web.Search +namespace Umbraco.Cms.Infrastructure.Search { [DataContract(Name = "searcher", Namespace = "")] public class ExamineSearcherModel diff --git a/src/Umbraco.Infrastructure/Search/ExamineUserComponent.cs b/src/Umbraco.Infrastructure/Search/ExamineUserComponent.cs index 35bc3f59ea..6c39da44c7 100644 --- a/src/Umbraco.Infrastructure/Search/ExamineUserComponent.cs +++ b/src/Umbraco.Infrastructure/Search/ExamineUserComponent.cs @@ -1,7 +1,7 @@ -using Umbraco.Core; -using Umbraco.Core.Composing; +using Umbraco.Cms.Core.Composing; +using Umbraco.Cms.Core.Runtime; -namespace Umbraco.Web.Search +namespace Umbraco.Cms.Infrastructure.Search { /// /// An abstract class for custom index authors to inherit from diff --git a/src/Umbraco.Infrastructure/Search/UmbracoTreeSearcher.cs b/src/Umbraco.Infrastructure/Search/UmbracoTreeSearcher.cs index a2955dfef5..4e13bbf3bb 100644 --- a/src/Umbraco.Infrastructure/Search/UmbracoTreeSearcher.cs +++ b/src/Umbraco.Infrastructure/Search/UmbracoTreeSearcher.cs @@ -2,19 +2,19 @@ using System.Collections.Generic; using System.Linq; using Examine; -using Umbraco.Core; -using Umbraco.Core.Mapping; -using Umbraco.Core.Models; -using Umbraco.Core.Models.Entities; -using Umbraco.Core.Persistence; -using Umbraco.Core.Services; -using Umbraco.Core.Trees; -using Umbraco.Examine; -using Umbraco.Web.Models.ContentEditing; -using Umbraco.Web.Models.Mapping; -using Umbraco.Web.Routing; +using Umbraco.Cms.Core.Mapping; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Core.Models.ContentEditing; +using Umbraco.Cms.Core.Models.Entities; +using Umbraco.Cms.Core.Routing; +using Umbraco.Cms.Core.Services; +using Umbraco.Cms.Core.Trees; +using Umbraco.Cms.Infrastructure.Examine; +using Umbraco.Cms.Infrastructure.Persistence; +using Umbraco.Extensions; +using Constants = Umbraco.Cms.Core.Constants; -namespace Umbraco.Web.Search +namespace Umbraco.Cms.Infrastructure.Search { /// diff --git a/src/Umbraco.Infrastructure/Search/UmbracoTreeSearcherFields.cs b/src/Umbraco.Infrastructure/Search/UmbracoTreeSearcherFields.cs index a1c9936542..aa11c1ad54 100644 --- a/src/Umbraco.Infrastructure/Search/UmbracoTreeSearcherFields.cs +++ b/src/Umbraco.Infrastructure/Search/UmbracoTreeSearcherFields.cs @@ -1,8 +1,8 @@ using System.Collections.Generic; using System.Linq; -using Umbraco.Examine; +using Umbraco.Cms.Infrastructure.Examine; -namespace Umbraco.Web.Search +namespace Umbraco.Cms.Infrastructure.Search { public class UmbracoTreeSearcherFields : IUmbracoTreeSearcherFields { diff --git a/src/Umbraco.Infrastructure/Security/BackOfficeClaimsPrincipalFactory.cs b/src/Umbraco.Infrastructure/Security/BackOfficeClaimsPrincipalFactory.cs index 0746e82076..505052b514 100644 --- a/src/Umbraco.Infrastructure/Security/BackOfficeClaimsPrincipalFactory.cs +++ b/src/Umbraco.Infrastructure/Security/BackOfficeClaimsPrincipalFactory.cs @@ -4,16 +4,15 @@ using System.Security.Claims; using System.Threading.Tasks; using Microsoft.AspNetCore.Identity; using Microsoft.Extensions.Options; -using Umbraco.Core.Security; +using Umbraco.Extensions; -namespace Umbraco.Infrastructure.Security +namespace Umbraco.Cms.Core.Security { /// /// A /// public class BackOfficeClaimsPrincipalFactory : UserClaimsPrincipalFactory { - /// /// Initializes a new instance of the class. /// @@ -26,7 +25,7 @@ namespace Umbraco.Infrastructure.Security /// /// - /// Returns a custom and allows flowing claims from the external identity + /// Returns a ClaimsIdentity that has the required claims, and allows flowing of claims from external identity /// public override async Task CreateAsync(BackOfficeIdentityUser user) { @@ -43,10 +42,7 @@ namespace Umbraco.Infrastructure.Security baseIdentity.AddClaim(new Claim(claim.ClaimType, claim.ClaimValue)); } - // TODO: We want to remove UmbracoBackOfficeIdentity and only rely on ClaimsIdentity, once - // that is done then we'll create a ClaimsIdentity with all of the requirements here instead - var umbracoIdentity = new UmbracoBackOfficeIdentity( - baseIdentity, + baseIdentity.AddRequiredClaims( user.Id, user.UserName, user.Name, @@ -57,7 +53,7 @@ namespace Umbraco.Infrastructure.Security user.AllowedSections, user.Roles.Select(x => x.RoleId).ToArray()); - return new ClaimsPrincipal(umbracoIdentity); + return new ClaimsPrincipal(baseIdentity); } /// diff --git a/src/Umbraco.Infrastructure/Security/BackOfficeIdentityBuilder.cs b/src/Umbraco.Infrastructure/Security/BackOfficeIdentityBuilder.cs index bf0f61bf35..e6b214ea8a 100644 --- a/src/Umbraco.Infrastructure/Security/BackOfficeIdentityBuilder.cs +++ b/src/Umbraco.Infrastructure/Security/BackOfficeIdentityBuilder.cs @@ -3,7 +3,7 @@ using System.Reflection; using Microsoft.AspNetCore.Identity; using Microsoft.Extensions.DependencyInjection; -namespace Umbraco.Infrastructure.Security +namespace Umbraco.Cms.Core.Security { public class BackOfficeIdentityBuilder : IdentityBuilder { diff --git a/src/Umbraco.Infrastructure/Security/BackOfficeIdentityErrorDescriber.cs b/src/Umbraco.Infrastructure/Security/BackOfficeIdentityErrorDescriber.cs index 38472c38d7..67287e9858 100644 --- a/src/Umbraco.Infrastructure/Security/BackOfficeIdentityErrorDescriber.cs +++ b/src/Umbraco.Infrastructure/Security/BackOfficeIdentityErrorDescriber.cs @@ -1,6 +1,6 @@ using Microsoft.AspNetCore.Identity; -namespace Umbraco.Infrastructure.Security +namespace Umbraco.Cms.Core.Security { /// /// Umbraco back office specific diff --git a/src/Umbraco.Infrastructure/Security/BackOfficeIdentityOptions.cs b/src/Umbraco.Infrastructure/Security/BackOfficeIdentityOptions.cs index f599769938..e4eacaf9d6 100644 --- a/src/Umbraco.Infrastructure/Security/BackOfficeIdentityOptions.cs +++ b/src/Umbraco.Infrastructure/Security/BackOfficeIdentityOptions.cs @@ -1,6 +1,6 @@ using Microsoft.AspNetCore.Identity; -namespace Umbraco.Infrastructure.Security +namespace Umbraco.Cms.Core.Security { /// /// Identity options specifically for the back office identity implementation diff --git a/src/Umbraco.Infrastructure/Security/BackOfficeIdentityUser.cs b/src/Umbraco.Infrastructure/Security/BackOfficeIdentityUser.cs index 740777f820..843349b9fd 100644 --- a/src/Umbraco.Infrastructure/Security/BackOfficeIdentityUser.cs +++ b/src/Umbraco.Infrastructure/Security/BackOfficeIdentityUser.cs @@ -2,12 +2,12 @@ using System; using System.Collections.Generic; using System.Linq; using Microsoft.AspNetCore.Identity; -using Umbraco.Core; -using Umbraco.Core.Configuration.Models; -using Umbraco.Core.Models.Identity; -using Umbraco.Core.Models.Membership; +using Umbraco.Cms.Core.Configuration.Models; +using Umbraco.Cms.Core.Models.Identity; +using Umbraco.Cms.Core.Models.Membership; +using Umbraco.Extensions; -namespace Umbraco.Infrastructure.Security +namespace Umbraco.Cms.Core.Security { /// /// The identity user used for the back office diff --git a/src/Umbraco.Infrastructure/Security/BackOfficeUserStore.cs b/src/Umbraco.Infrastructure/Security/BackOfficeUserStore.cs index a36282ffb1..41f7f94113 100644 --- a/src/Umbraco.Infrastructure/Security/BackOfficeUserStore.cs +++ b/src/Umbraco.Infrastructure/Security/BackOfficeUserStore.cs @@ -8,16 +8,17 @@ using System.Threading; using System.Threading.Tasks; using Microsoft.AspNetCore.Identity; using Microsoft.Extensions.Options; -using Umbraco.Core; -using Umbraco.Core.Configuration.Models; -using Umbraco.Core.Mapping; -using Umbraco.Core.Models; -using Umbraco.Core.Models.Identity; -using Umbraco.Core.Models.Membership; -using Umbraco.Core.Scoping; -using Umbraco.Core.Services; +using Umbraco.Cms.Core; +using Umbraco.Cms.Core.Configuration.Models; +using Umbraco.Cms.Core.Mapping; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Core.Models.Identity; +using Umbraco.Cms.Core.Models.Membership; +using Umbraco.Cms.Core.Scoping; +using Umbraco.Cms.Core.Services; +using Umbraco.Extensions; -namespace Umbraco.Infrastructure.Security +namespace Umbraco.Cms.Core.Security { // TODO: Make this into a base class that can be re-used @@ -84,7 +85,7 @@ namespace Umbraco.Infrastructure.Security // prefix will help us determine if the password hasn't actually been specified yet. // this will hash the guid with a salt so should be nicely random var aspHasher = new PasswordHasher(); - var emptyPasswordValue = Constants.Security.EmptyPasswordPrefix + + var emptyPasswordValue = Cms.Core.Constants.Security.EmptyPasswordPrefix + aspHasher.HashPassword(user, Guid.NewGuid().ToString("N")); var userEntity = new User(_globalSettings, user.Name, user.Email, user.UserName, emptyPasswordValue) diff --git a/src/Umbraco.Infrastructure/Security/BackOfficeUserValidator.cs b/src/Umbraco.Infrastructure/Security/BackOfficeUserValidator.cs index a1953159e9..99668d8425 100644 --- a/src/Umbraco.Infrastructure/Security/BackOfficeUserValidator.cs +++ b/src/Umbraco.Infrastructure/Security/BackOfficeUserValidator.cs @@ -1,9 +1,7 @@ using System.Threading.Tasks; using Microsoft.AspNetCore.Identity; -using Umbraco.Core.Security; -using Umbraco.Infrastructure.Security; -namespace Umbraco.Core.Security +namespace Umbraco.Cms.Core.Security { public class BackOfficeUserValidator : UserValidator where T : BackOfficeIdentityUser diff --git a/src/Umbraco.Infrastructure/Security/IBackOfficeUserManager.cs b/src/Umbraco.Infrastructure/Security/IBackOfficeUserManager.cs index c65570405f..d47a471426 100644 --- a/src/Umbraco.Infrastructure/Security/IBackOfficeUserManager.cs +++ b/src/Umbraco.Infrastructure/Security/IBackOfficeUserManager.cs @@ -1,4 +1,4 @@ -namespace Umbraco.Infrastructure.Security +namespace Umbraco.Cms.Core.Security { /// /// The user manager for the back office diff --git a/src/Umbraco.Infrastructure/Security/IBackOfficeUserPasswordChecker.cs b/src/Umbraco.Infrastructure/Security/IBackOfficeUserPasswordChecker.cs index f6f90ef82d..a61ed9be99 100644 --- a/src/Umbraco.Infrastructure/Security/IBackOfficeUserPasswordChecker.cs +++ b/src/Umbraco.Infrastructure/Security/IBackOfficeUserPasswordChecker.cs @@ -1,7 +1,7 @@ using System.Threading.Tasks; -using Umbraco.Core.Security; +using Umbraco.Cms.Core.Security; -namespace Umbraco.Infrastructure.Security +namespace Umbraco.Cms.Core.Security { /// /// Used by the BackOfficeUserManager to check the username/password which allows for developers to more easily diff --git a/src/Umbraco.Infrastructure/Security/IMemberManager.cs b/src/Umbraco.Infrastructure/Security/IMemberManager.cs index 47d8a4f2fb..85b4c0c300 100644 --- a/src/Umbraco.Infrastructure/Security/IMemberManager.cs +++ b/src/Umbraco.Infrastructure/Security/IMemberManager.cs @@ -1,4 +1,4 @@ -namespace Umbraco.Infrastructure.Security +namespace Umbraco.Cms.Core.Security { /// /// The user manager for members diff --git a/src/Umbraco.Infrastructure/Security/IUmbracoUserManager.cs b/src/Umbraco.Infrastructure/Security/IUmbracoUserManager.cs index 587b7cd8c5..2cfc00d9b2 100644 --- a/src/Umbraco.Infrastructure/Security/IUmbracoUserManager.cs +++ b/src/Umbraco.Infrastructure/Security/IUmbracoUserManager.cs @@ -4,13 +4,12 @@ using System.Security.Claims; using System.Security.Principal; using System.Threading.Tasks; using Microsoft.AspNetCore.Identity; -using Umbraco.Core.Models.Identity; -using Umbraco.Core.Models.Membership; -using Umbraco.Web.Models.ContentEditing; +using Umbraco.Cms.Core.Models.ContentEditing; +using Umbraco.Cms.Core.Models.Identity; +using Umbraco.Cms.Core.Models.Membership; -namespace Umbraco.Infrastructure.Security +namespace Umbraco.Cms.Core.Security { - /// /// A user manager for Umbraco (either back office users or front-end members) /// @@ -257,7 +256,7 @@ namespace Umbraco.Infrastructure.Security /// of the operation. /// Task CreateAsync(TUser user, string password); - + /// /// Generate a password for a user based on the current password validator /// diff --git a/src/Umbraco.Infrastructure/Security/IUserSessionStore.cs b/src/Umbraco.Infrastructure/Security/IUserSessionStore.cs index bfdf296156..9bcda2c2c4 100644 --- a/src/Umbraco.Infrastructure/Security/IUserSessionStore.cs +++ b/src/Umbraco.Infrastructure/Security/IUserSessionStore.cs @@ -1,6 +1,6 @@ using System.Threading.Tasks; -namespace Umbraco.Infrastructure.Security +namespace Umbraco.Cms.Core.Security { /// /// An IUserStore interface part to implement if the store supports validating user session Ids diff --git a/src/Umbraco.Infrastructure/Security/IdentityExtensions.cs b/src/Umbraco.Infrastructure/Security/IdentityExtensions.cs index 911baf2c33..95a63c6001 100644 --- a/src/Umbraco.Infrastructure/Security/IdentityExtensions.cs +++ b/src/Umbraco.Infrastructure/Security/IdentityExtensions.cs @@ -1,9 +1,9 @@ -using System; +using System; using System.Collections.Generic; using System.Linq; using Microsoft.AspNetCore.Identity; -namespace Umbraco.Infrastructure.Security +namespace Umbraco.Extensions { public static class IdentityExtensions { diff --git a/src/Umbraco.Infrastructure/Security/IdentityMapDefinition.cs b/src/Umbraco.Infrastructure/Security/IdentityMapDefinition.cs index 6477c184c6..1a76dec2d5 100644 --- a/src/Umbraco.Infrastructure/Security/IdentityMapDefinition.cs +++ b/src/Umbraco.Infrastructure/Security/IdentityMapDefinition.cs @@ -1,13 +1,17 @@ +// Copyright (c) Umbraco. +// See LICENSE for more details. + using System; using Microsoft.Extensions.Options; -using Umbraco.Core; -using Umbraco.Core.Configuration.Models; -using Umbraco.Core.Mapping; -using Umbraco.Core.Models; -using Umbraco.Core.Models.Membership; -using Umbraco.Core.Services; +using Umbraco.Cms.Core; +using Umbraco.Cms.Core.Configuration.Models; +using Umbraco.Cms.Core.Mapping; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Core.Models.Membership; +using Umbraco.Cms.Core.Services; +using Umbraco.Extensions; -namespace Umbraco.Infrastructure.Security +namespace Umbraco.Cms.Core.Security { public class IdentityMapDefinition : IMapDefinition { diff --git a/src/Umbraco.Infrastructure/Security/MemberRolesUserStore.cs b/src/Umbraco.Infrastructure/Security/MemberRolesUserStore.cs index 771005b09b..65b3cf1ef9 100644 --- a/src/Umbraco.Infrastructure/Security/MemberRolesUserStore.cs +++ b/src/Umbraco.Infrastructure/Security/MemberRolesUserStore.cs @@ -5,10 +5,10 @@ using System.Security.Claims; using System.Threading; using System.Threading.Tasks; using Microsoft.AspNetCore.Identity; -using Umbraco.Core.Scoping; -using Umbraco.Core.Services; +using Umbraco.Cms.Core.Scoping; +using Umbraco.Cms.Core.Services; -namespace Umbraco.Infrastructure.Security +namespace Umbraco.Cms.Core.Security { /// /// A custom user store that uses Umbraco member data diff --git a/src/Umbraco.Infrastructure/Security/MembersIdentityBuilder.cs b/src/Umbraco.Infrastructure/Security/MembersIdentityBuilder.cs index dde340f563..726b999b89 100644 --- a/src/Umbraco.Infrastructure/Security/MembersIdentityBuilder.cs +++ b/src/Umbraco.Infrastructure/Security/MembersIdentityBuilder.cs @@ -3,7 +3,7 @@ using System.Reflection; using Microsoft.AspNetCore.Identity; using Microsoft.Extensions.DependencyInjection; -namespace Umbraco.Infrastructure.Security +namespace Umbraco.Cms.Core.Security { public class MembersIdentityBuilder : IdentityBuilder { diff --git a/src/Umbraco.Infrastructure/Security/MembersIdentityOptions.cs b/src/Umbraco.Infrastructure/Security/MembersIdentityOptions.cs index 0510096bb2..8f993a1f76 100644 --- a/src/Umbraco.Infrastructure/Security/MembersIdentityOptions.cs +++ b/src/Umbraco.Infrastructure/Security/MembersIdentityOptions.cs @@ -1,6 +1,6 @@ using Microsoft.AspNetCore.Identity; -namespace Umbraco.Infrastructure.Security +namespace Umbraco.Cms.Core.Security { /// /// Identity options specifically for the Umbraco members identity implementation diff --git a/src/Umbraco.Infrastructure/Security/MembersIdentityUser.cs b/src/Umbraco.Infrastructure/Security/MembersIdentityUser.cs index c3376279b7..6e3473c3ce 100644 --- a/src/Umbraco.Infrastructure/Security/MembersIdentityUser.cs +++ b/src/Umbraco.Infrastructure/Security/MembersIdentityUser.cs @@ -2,11 +2,11 @@ using System; using System.Collections.Generic; using System.Linq; using Microsoft.AspNetCore.Identity; -using Umbraco.Core; -using Umbraco.Core.Models.Identity; -using Umbraco.Core.Models.Membership; +using Umbraco.Cms.Core.Models.Identity; +using Umbraco.Cms.Core.Models.Membership; +using Umbraco.Extensions; -namespace Umbraco.Infrastructure.Security +namespace Umbraco.Cms.Core.Security { /// /// The identity user used for the member diff --git a/src/Umbraco.Infrastructure/Security/MembersUserStore.cs b/src/Umbraco.Infrastructure/Security/MembersUserStore.cs index 7690eed210..9405992ba8 100644 --- a/src/Umbraco.Infrastructure/Security/MembersUserStore.cs +++ b/src/Umbraco.Infrastructure/Security/MembersUserStore.cs @@ -7,14 +7,14 @@ using System.Security.Claims; using System.Threading; using System.Threading.Tasks; using Microsoft.AspNetCore.Identity; -using Umbraco.Core; -using Umbraco.Core.Mapping; -using Umbraco.Core.Models; -using Umbraco.Core.Models.Identity; -using Umbraco.Core.Scoping; -using Umbraco.Core.Services; +using Umbraco.Cms.Core.Mapping; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Core.Models.Identity; +using Umbraco.Cms.Core.Scoping; +using Umbraco.Cms.Core.Services; +using Umbraco.Extensions; -namespace Umbraco.Infrastructure.Security +namespace Umbraco.Cms.Core.Security { /// /// A custom user store that uses Umbraco member data @@ -523,7 +523,7 @@ namespace Umbraco.Infrastructure.Security { if (user != null) { - //TODO: when to + //TODO: when to //user.SetLoginsCallback(new Lazy>(() => _externalLoginService.GetAll(UserIdToInt(user.Id)))); } diff --git a/src/Umbraco.Infrastructure/Security/NoOpLookupNormalizer.cs b/src/Umbraco.Infrastructure/Security/NoOpLookupNormalizer.cs index 7c114835d7..abc8758fb8 100644 --- a/src/Umbraco.Infrastructure/Security/NoOpLookupNormalizer.cs +++ b/src/Umbraco.Infrastructure/Security/NoOpLookupNormalizer.cs @@ -1,8 +1,7 @@ using Microsoft.AspNetCore.Identity; -namespace Umbraco.Infrastructure.Security +namespace Umbraco.Cms.Core.Security { - /// /// No-op lookup normalizer to maintain compatibility with ASP.NET Identity 2 /// diff --git a/src/Umbraco.Infrastructure/Security/SignOutAuditEventArgs.cs b/src/Umbraco.Infrastructure/Security/SignOutAuditEventArgs.cs index dfdf3bff7d..5e86d48d5d 100644 --- a/src/Umbraco.Infrastructure/Security/SignOutAuditEventArgs.cs +++ b/src/Umbraco.Infrastructure/Security/SignOutAuditEventArgs.cs @@ -1,14 +1,11 @@ -using Umbraco.Core; -using Umbraco.Core.Security; - -namespace Umbraco.Infrastructure.Security +namespace Umbraco.Cms.Core.Security { /// /// Event args used when signing out /// public class SignOutAuditEventArgs : IdentityAuditEventArgs { - public SignOutAuditEventArgs(AuditEvent action, string ipAddress, string comment = null, string performingUser = Constants.Security.SuperUserIdAsString, string affectedUser = Constants.Security.SuperUserIdAsString) + public SignOutAuditEventArgs(AuditEvent action, string ipAddress, string comment = null, string performingUser = Cms.Core.Constants.Security.SuperUserIdAsString, string affectedUser = Cms.Core.Constants.Security.SuperUserIdAsString) : base(action, ipAddress, performingUser, comment, affectedUser, null) { } diff --git a/src/Umbraco.Infrastructure/Security/UmbracoIdentityUser.cs b/src/Umbraco.Infrastructure/Security/UmbracoIdentityUser.cs index 1b888123be..9d3c1ad7c9 100644 --- a/src/Umbraco.Infrastructure/Security/UmbracoIdentityUser.cs +++ b/src/Umbraco.Infrastructure/Security/UmbracoIdentityUser.cs @@ -4,11 +4,10 @@ using System.Collections.ObjectModel; using System.Collections.Specialized; using System.ComponentModel; using Microsoft.AspNetCore.Identity; -using Umbraco.Core.Models.Entities; +using Umbraco.Cms.Core.Models.Entities; -namespace Umbraco.Core.Models.Identity +namespace Umbraco.Cms.Core.Models.Identity { - /// /// Abstract class for use in Umbraco Identity for users and members /// @@ -251,7 +250,7 @@ namespace Umbraco.Core.Models.Identity public void EnableChangeTracking() => BeingDirty.EnableChangeTracking(); /// - /// Adds a role + /// Adds a role /// /// The role to add /// diff --git a/src/Umbraco.Infrastructure/Security/UmbracoUserManager.cs b/src/Umbraco.Infrastructure/Security/UmbracoUserManager.cs index 528c24ed46..1af7896281 100644 --- a/src/Umbraco.Infrastructure/Security/UmbracoUserManager.cs +++ b/src/Umbraco.Infrastructure/Security/UmbracoUserManager.cs @@ -6,12 +6,11 @@ using System.Threading.Tasks; using Microsoft.AspNetCore.Identity; using Microsoft.Extensions.Logging; using Microsoft.Extensions.Options; -using Umbraco.Core.Configuration; -using Umbraco.Core.Models.Identity; -using Umbraco.Core.Security; -using Umbraco.Net; +using Umbraco.Cms.Core.Configuration; +using Umbraco.Cms.Core.Models.Identity; +using Umbraco.Cms.Core.Net; -namespace Umbraco.Infrastructure.Security +namespace Umbraco.Cms.Core.Security { /// /// Abstract class for Umbraco User Managers for back office users or front-end members @@ -49,7 +48,7 @@ namespace Umbraco.Infrastructure.Security /// public override bool SupportsQueryableUsers => false; // It would be nice to support this but we don't need to currently and that would require IQueryable support for our user service/repository - + /// /// Developers will need to override this to support custom 2 factor auth /// diff --git a/src/Umbraco.Infrastructure/Security/UserInviteEventArgs.cs b/src/Umbraco.Infrastructure/Security/UserInviteEventArgs.cs index ee2930a71b..2d21b03187 100644 --- a/src/Umbraco.Infrastructure/Security/UserInviteEventArgs.cs +++ b/src/Umbraco.Infrastructure/Security/UserInviteEventArgs.cs @@ -1,8 +1,7 @@ -using Umbraco.Core.Models.Membership; -using Umbraco.Core.Security; -using Umbraco.Web.Models.ContentEditing; +using Umbraco.Cms.Core.Models.ContentEditing; +using Umbraco.Cms.Core.Models.Membership; -namespace Umbraco.Infrastructure.Security +namespace Umbraco.Cms.Core.Security { public class UserInviteEventArgs : IdentityAuditEventArgs { diff --git a/src/Umbraco.Infrastructure/Serialization/CaseInsensitiveDictionaryConverter.cs b/src/Umbraco.Infrastructure/Serialization/CaseInsensitiveDictionaryConverter.cs index a92d562a52..3531d4da12 100644 --- a/src/Umbraco.Infrastructure/Serialization/CaseInsensitiveDictionaryConverter.cs +++ b/src/Umbraco.Infrastructure/Serialization/CaseInsensitiveDictionaryConverter.cs @@ -3,7 +3,7 @@ using System.Collections; using System.Collections.Generic; using Newtonsoft.Json.Converters; -namespace Umbraco.Core.Serialization +namespace Umbraco.Cms.Infrastructure.Serialization { /// /// Marks dictionaries so they are deserialized as case-insensitive. diff --git a/src/Umbraco.Infrastructure/Serialization/ConfigurationEditorJsonSerializer.cs b/src/Umbraco.Infrastructure/Serialization/ConfigurationEditorJsonSerializer.cs index ec40848fb5..e8e32fe7da 100644 --- a/src/Umbraco.Infrastructure/Serialization/ConfigurationEditorJsonSerializer.cs +++ b/src/Umbraco.Infrastructure/Serialization/ConfigurationEditorJsonSerializer.cs @@ -1,9 +1,10 @@ using System.Reflection; using Newtonsoft.Json; using Newtonsoft.Json.Serialization; -using Umbraco.Core.PropertyEditors; +using Umbraco.Cms.Core.PropertyEditors; +using Umbraco.Cms.Core.Serialization; -namespace Umbraco.Core.Serialization +namespace Umbraco.Cms.Infrastructure.Serialization { public class ConfigurationEditorJsonSerializer : JsonNetSerializer, IConfigurationEditorJsonSerializer { diff --git a/src/Umbraco.Infrastructure/Serialization/ForceInt32Converter.cs b/src/Umbraco.Infrastructure/Serialization/ForceInt32Converter.cs index ace7f82ab2..e6d8499910 100644 --- a/src/Umbraco.Infrastructure/Serialization/ForceInt32Converter.cs +++ b/src/Umbraco.Infrastructure/Serialization/ForceInt32Converter.cs @@ -2,7 +2,7 @@ using Newtonsoft.Json; using Newtonsoft.Json.Linq; -namespace Umbraco.Core.Serialization +namespace Umbraco.Cms.Infrastructure.Serialization { public class ForceInt32Converter : JsonConverter { diff --git a/src/Umbraco.Infrastructure/Serialization/FuzzyBooleanConverter.cs b/src/Umbraco.Infrastructure/Serialization/FuzzyBooleanConverter.cs index db94f41845..b98e8c93a0 100644 --- a/src/Umbraco.Infrastructure/Serialization/FuzzyBooleanConverter.cs +++ b/src/Umbraco.Infrastructure/Serialization/FuzzyBooleanConverter.cs @@ -1,7 +1,7 @@ using System; using Newtonsoft.Json; -namespace Umbraco.Core.Serialization +namespace Umbraco.Cms.Infrastructure.Serialization { public class FuzzyBooleanConverter : JsonConverter { diff --git a/src/Umbraco.Infrastructure/Serialization/JsonNetSerializer.cs b/src/Umbraco.Infrastructure/Serialization/JsonNetSerializer.cs index 1974619a70..a728630680 100644 --- a/src/Umbraco.Infrastructure/Serialization/JsonNetSerializer.cs +++ b/src/Umbraco.Infrastructure/Serialization/JsonNetSerializer.cs @@ -3,8 +3,9 @@ using System.Collections.Generic; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; +using Umbraco.Cms.Core.Serialization; -namespace Umbraco.Core.Serialization +namespace Umbraco.Cms.Infrastructure.Serialization { public class JsonNetSerializer : IJsonSerializer { diff --git a/src/Umbraco.Infrastructure/Serialization/JsonReadConverter.cs b/src/Umbraco.Infrastructure/Serialization/JsonReadConverter.cs index 9404d7fe36..fe684bd784 100644 --- a/src/Umbraco.Infrastructure/Serialization/JsonReadConverter.cs +++ b/src/Umbraco.Infrastructure/Serialization/JsonReadConverter.cs @@ -1,9 +1,8 @@ using System; using Newtonsoft.Json; using Newtonsoft.Json.Linq; -using Umbraco.Core.Exceptions; -namespace Umbraco.Core.Serialization +namespace Umbraco.Cms.Infrastructure.Serialization { /// /// Provides a base class for custom implementations. diff --git a/src/Umbraco.Infrastructure/Serialization/JsonToStringConverter.cs b/src/Umbraco.Infrastructure/Serialization/JsonToStringConverter.cs index 08c9a44d00..e4c17ab918 100644 --- a/src/Umbraco.Infrastructure/Serialization/JsonToStringConverter.cs +++ b/src/Umbraco.Infrastructure/Serialization/JsonToStringConverter.cs @@ -2,7 +2,7 @@ using Newtonsoft.Json; using Newtonsoft.Json.Linq; -namespace Umbraco.Core.Serialization +namespace Umbraco.Cms.Infrastructure.Serialization { /// /// This is used in order to deserialize a json object on a property into a json string since the property's type is 'string' diff --git a/src/Umbraco.Infrastructure/Serialization/KnownTypeUdiJsonConverter.cs b/src/Umbraco.Infrastructure/Serialization/KnownTypeUdiJsonConverter.cs index 79ff90c734..c79071bc8d 100644 --- a/src/Umbraco.Infrastructure/Serialization/KnownTypeUdiJsonConverter.cs +++ b/src/Umbraco.Infrastructure/Serialization/KnownTypeUdiJsonConverter.cs @@ -1,8 +1,9 @@ using System; using Newtonsoft.Json; using Newtonsoft.Json.Linq; +using Umbraco.Cms.Core; -namespace Umbraco.Core.Serialization +namespace Umbraco.Cms.Infrastructure.Serialization { public class KnownTypeUdiJsonConverter : JsonConverter { diff --git a/src/Umbraco.Infrastructure/Serialization/NoTypeConverterJsonConverter.cs b/src/Umbraco.Infrastructure/Serialization/NoTypeConverterJsonConverter.cs index 4402cb4043..ebdc84b39a 100644 --- a/src/Umbraco.Infrastructure/Serialization/NoTypeConverterJsonConverter.cs +++ b/src/Umbraco.Infrastructure/Serialization/NoTypeConverterJsonConverter.cs @@ -2,7 +2,7 @@ using Newtonsoft.Json; using Newtonsoft.Json.Serialization; -namespace Umbraco.Core.Serialization +namespace Umbraco.Cms.Infrastructure.Serialization { /// /// This is required if we want to force JSON.Net to not use .Net TypeConverters during serialization/deserialization diff --git a/src/Umbraco.Infrastructure/Serialization/UdiJsonConverter.cs b/src/Umbraco.Infrastructure/Serialization/UdiJsonConverter.cs index eac5dd8c26..0b1f74918b 100644 --- a/src/Umbraco.Infrastructure/Serialization/UdiJsonConverter.cs +++ b/src/Umbraco.Infrastructure/Serialization/UdiJsonConverter.cs @@ -1,8 +1,9 @@ using System; using Newtonsoft.Json; using Newtonsoft.Json.Linq; +using Umbraco.Cms.Core; -namespace Umbraco.Core.Serialization +namespace Umbraco.Cms.Infrastructure.Serialization { public class UdiJsonConverter : JsonConverter { diff --git a/src/Umbraco.Infrastructure/Serialization/UdiRangeJsonConverter.cs b/src/Umbraco.Infrastructure/Serialization/UdiRangeJsonConverter.cs index bc5b315c55..4cf71b9c5a 100644 --- a/src/Umbraco.Infrastructure/Serialization/UdiRangeJsonConverter.cs +++ b/src/Umbraco.Infrastructure/Serialization/UdiRangeJsonConverter.cs @@ -1,8 +1,9 @@ using System; using Newtonsoft.Json; using Newtonsoft.Json.Linq; +using Umbraco.Cms.Core; -namespace Umbraco.Core.Serialization +namespace Umbraco.Cms.Infrastructure.Serialization { public class UdiRangeJsonConverter : JsonConverter { diff --git a/src/Umbraco.Infrastructure/Services/IdKeyMap.cs b/src/Umbraco.Infrastructure/Services/IdKeyMap.cs index 62c135e717..3850e607b3 100644 --- a/src/Umbraco.Infrastructure/Services/IdKeyMap.cs +++ b/src/Umbraco.Infrastructure/Services/IdKeyMap.cs @@ -2,10 +2,10 @@ using System.Collections.Concurrent; using System.Collections.Generic; using System.Threading; -using Umbraco.Core.Models; -using Umbraco.Core.Scoping; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Core.Scoping; -namespace Umbraco.Core.Services +namespace Umbraco.Cms.Core.Services { public class IdKeyMap : IIdKeyMap { @@ -174,7 +174,7 @@ namespace Umbraco.Core.Services else { val = scope.Database.ExecuteScalar("SELECT id FROM umbracoNode WHERE uniqueId=@id AND (nodeObjectType=@type OR nodeObjectType=@reservation)", - new { id = key, type = GetNodeObjectTypeGuid(umbracoObjectType), reservation = Constants.ObjectTypes.IdReservation }); + new { id = key, type = GetNodeObjectTypeGuid(umbracoObjectType), reservation = Cms.Core.Constants.ObjectTypes.IdReservation }); } scope.Complete(); } @@ -262,7 +262,7 @@ namespace Umbraco.Core.Services else { val = scope.Database.ExecuteScalar("SELECT uniqueId FROM umbracoNode WHERE id=@id AND (nodeObjectType=@type OR nodeObjectType=@reservation)", - new { id, type = GetNodeObjectTypeGuid(umbracoObjectType), reservation = Constants.ObjectTypes.IdReservation }); + new { id, type = GetNodeObjectTypeGuid(umbracoObjectType), reservation = Cms.Core.Constants.ObjectTypes.IdReservation }); } scope.Complete(); } diff --git a/src/Umbraco.Infrastructure/Services/Implement/AuditService.cs b/src/Umbraco.Infrastructure/Services/Implement/AuditService.cs index 77c7b6610f..cc8110f38e 100644 --- a/src/Umbraco.Infrastructure/Services/Implement/AuditService.cs +++ b/src/Umbraco.Infrastructure/Services/Implement/AuditService.cs @@ -2,14 +2,14 @@ using System.Collections.Generic; using System.Linq; using Microsoft.Extensions.Logging; -using Umbraco.Core.Events; -using Umbraco.Core.Models; -using Umbraco.Core.Persistence.Dtos; -using Umbraco.Core.Persistence.Querying; -using Umbraco.Core.Persistence.Repositories; -using Umbraco.Core.Scoping; +using Umbraco.Cms.Core.Events; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Core.Persistence.Querying; +using Umbraco.Cms.Core.Persistence.Repositories; +using Umbraco.Cms.Core.Scoping; +using Umbraco.Cms.Infrastructure.Persistence.Dtos; -namespace Umbraco.Core.Services.Implement +namespace Umbraco.Cms.Core.Services.Implement { public sealed class AuditService : ScopeRepositoryService, IAuditService { @@ -104,7 +104,7 @@ namespace Umbraco.Core.Services.Implement if (pageIndex < 0) throw new ArgumentOutOfRangeException(nameof(pageIndex)); if (pageSize <= 0) throw new ArgumentOutOfRangeException(nameof(pageSize)); - if (entityId == Constants.System.Root || entityId <= 0) + if (entityId == Cms.Core.Constants.System.Root || entityId <= 0) { totalRecords = 0; return Enumerable.Empty(); @@ -141,7 +141,7 @@ namespace Umbraco.Core.Services.Implement if (pageIndex < 0) throw new ArgumentOutOfRangeException(nameof(pageIndex)); if (pageSize <= 0) throw new ArgumentOutOfRangeException(nameof(pageSize)); - if (userId < Constants.Security.SuperUserId) + if (userId < Cms.Core.Constants.Security.SuperUserId) { totalRecords = 0; return Enumerable.Empty(); @@ -158,7 +158,7 @@ namespace Umbraco.Core.Services.Implement /// public IAuditEntry Write(int performingUserId, string perfomingDetails, string performingIp, DateTime eventDateUtc, int affectedUserId, string affectedDetails, string eventType, string eventDetails) { - if (performingUserId < 0 && performingUserId != Constants.Security.SuperUserId) throw new ArgumentOutOfRangeException(nameof(performingUserId)); + if (performingUserId < 0 && performingUserId != Cms.Core.Constants.Security.SuperUserId) throw new ArgumentOutOfRangeException(nameof(performingUserId)); if (string.IsNullOrWhiteSpace(perfomingDetails)) throw new ArgumentException("Value cannot be null or whitespace.", nameof(perfomingDetails)); if (string.IsNullOrWhiteSpace(eventType)) throw new ArgumentException("Value cannot be null or whitespace.", nameof(eventType)); if (string.IsNullOrWhiteSpace(eventDetails)) throw new ArgumentException("Value cannot be null or whitespace.", nameof(eventDetails)); diff --git a/src/Umbraco.Infrastructure/Services/Implement/ConsentService.cs b/src/Umbraco.Infrastructure/Services/Implement/ConsentService.cs index 1f33d1fe58..aebef075a5 100644 --- a/src/Umbraco.Infrastructure/Services/Implement/ConsentService.cs +++ b/src/Umbraco.Infrastructure/Services/Implement/ConsentService.cs @@ -1,12 +1,12 @@ using System; using System.Collections.Generic; using Microsoft.Extensions.Logging; -using Umbraco.Core.Events; -using Umbraco.Core.Models; -using Umbraco.Core.Persistence.Repositories; -using Umbraco.Core.Scoping; +using Umbraco.Cms.Core.Events; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Core.Persistence.Repositories; +using Umbraco.Cms.Core.Scoping; -namespace Umbraco.Core.Services.Implement +namespace Umbraco.Cms.Core.Services.Implement { /// /// Implements . diff --git a/src/Umbraco.Infrastructure/Services/Implement/ContentService.cs b/src/Umbraco.Infrastructure/Services/Implement/ContentService.cs index 69dadb2b21..017540ae3f 100644 --- a/src/Umbraco.Infrastructure/Services/Implement/ContentService.cs +++ b/src/Umbraco.Infrastructure/Services/Implement/ContentService.cs @@ -3,17 +3,19 @@ using System.Collections.Generic; using System.Globalization; using System.Linq; using Microsoft.Extensions.Logging; -using Umbraco.Core.Events; -using Umbraco.Core.Exceptions; -using Umbraco.Core.Models; -using Umbraco.Core.Models.Membership; -using Umbraco.Core.Persistence.Querying; -using Umbraco.Core.Persistence.Repositories; -using Umbraco.Core.Scoping; -using Umbraco.Core.Services.Changes; -using Umbraco.Core.Strings; +using Umbraco.Cms.Core.Events; +using Umbraco.Cms.Core.Exceptions; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Core.Models.Membership; +using Umbraco.Cms.Core.Persistence.Querying; +using Umbraco.Cms.Core.Persistence.Repositories; +using Umbraco.Cms.Core.Scoping; +using Umbraco.Cms.Core.Services.Changes; +using Umbraco.Cms.Core.Strings; +using Umbraco.Cms.Infrastructure.Persistence.Querying; +using Umbraco.Extensions; -namespace Umbraco.Core.Services.Implement +namespace Umbraco.Cms.Core.Services.Implement { /// /// Implements the content service. @@ -67,7 +69,7 @@ namespace Umbraco.Core.Services.Implement { using (var scope = ScopeProvider.CreateScope(autoComplete: true)) { - scope.ReadLock(Constants.Locks.ContentTree); + scope.ReadLock(Cms.Core.Constants.Locks.ContentTree); return _documentRepository.CountPublished(contentTypeAlias); } } @@ -76,7 +78,7 @@ namespace Umbraco.Core.Services.Implement { using (var scope = ScopeProvider.CreateScope(autoComplete: true)) { - scope.ReadLock(Constants.Locks.ContentTree); + scope.ReadLock(Cms.Core.Constants.Locks.ContentTree); return _documentRepository.Count(contentTypeAlias); } } @@ -85,7 +87,7 @@ namespace Umbraco.Core.Services.Implement { using (var scope = ScopeProvider.CreateScope(autoComplete: true)) { - scope.ReadLock(Constants.Locks.ContentTree); + scope.ReadLock(Cms.Core.Constants.Locks.ContentTree); return _documentRepository.CountChildren(parentId, contentTypeAlias); } } @@ -94,7 +96,7 @@ namespace Umbraco.Core.Services.Implement { using (var scope = ScopeProvider.CreateScope(autoComplete: true)) { - scope.ReadLock(Constants.Locks.ContentTree); + scope.ReadLock(Cms.Core.Constants.Locks.ContentTree); return _documentRepository.CountDescendants(parentId, contentTypeAlias); } } @@ -112,7 +114,7 @@ namespace Umbraco.Core.Services.Implement { using (var scope = ScopeProvider.CreateScope()) { - scope.WriteLock(Constants.Locks.ContentTree); + scope.WriteLock(Cms.Core.Constants.Locks.ContentTree); _documentRepository.ReplaceContentPermissions(permissionSet); scope.Complete(); } @@ -128,7 +130,7 @@ namespace Umbraco.Core.Services.Implement { using (var scope = ScopeProvider.CreateScope()) { - scope.WriteLock(Constants.Locks.ContentTree); + scope.WriteLock(Cms.Core.Constants.Locks.ContentTree); _documentRepository.AssignEntityPermission(entity, permission, groupIds); scope.Complete(); } @@ -143,7 +145,7 @@ namespace Umbraco.Core.Services.Implement { using (var scope = ScopeProvider.CreateScope(autoComplete: true)) { - scope.ReadLock(Constants.Locks.ContentTree); + scope.ReadLock(Cms.Core.Constants.Locks.ContentTree); return _documentRepository.GetPermissionsForEntity(content.Id); } } @@ -166,7 +168,7 @@ namespace Umbraco.Core.Services.Implement /// Alias of the /// Optional id of the user creating the content /// - public IContent Create(string name, Guid parentId, string contentTypeAlias, int userId = Constants.Security.SuperUserId) + public IContent Create(string name, Guid parentId, string contentTypeAlias, int userId = Cms.Core.Constants.Security.SuperUserId) { // TODO: what about culture? @@ -186,7 +188,7 @@ namespace Umbraco.Core.Services.Implement /// The alias of the content type. /// The optional id of the user creating the content. /// The content object. - public IContent Create(string name, int parentId, string contentTypeAlias, int userId = Constants.Security.SuperUserId) + public IContent Create(string name, int parentId, string contentTypeAlias, int userId = Cms.Core.Constants.Security.SuperUserId) { // TODO: what about culture? @@ -197,12 +199,7 @@ namespace Umbraco.Core.Services.Implement if (parentId > 0 && parent == null) throw new ArgumentException("No content with that id.", nameof(parentId)); - var content = new Content(name, parentId, contentType); - using (var scope = ScopeProvider.CreateScope()) - { - CreateContent(scope, content, userId, false); - scope.Complete(); - } + var content = new Content(name, parentId, contentType, userId); return content; } @@ -219,26 +216,19 @@ namespace Umbraco.Core.Services.Implement /// The alias of the content type. /// The optional id of the user creating the content. /// The content object. - public IContent Create(string name, IContent parent, string contentTypeAlias, int userId = Constants.Security.SuperUserId) + public IContent Create(string name, IContent parent, string contentTypeAlias, int userId = Cms.Core.Constants.Security.SuperUserId) { // TODO: what about culture? if (parent == null) throw new ArgumentNullException(nameof(parent)); - using (var scope = ScopeProvider.CreateScope()) - { - // not locking since not saving anything + var contentType = GetContentType(contentTypeAlias); + if (contentType == null) + throw new ArgumentException("No content type with that alias.", nameof(contentTypeAlias)); // causes rollback - var contentType = GetContentType(contentTypeAlias); - if (contentType == null) - throw new ArgumentException("No content type with that alias.", nameof(contentTypeAlias)); // causes rollback + var content = new Content(name, parent, contentType, userId); - var content = new Content(name, parent, contentType); - CreateContent(scope, content, userId, false); - - scope.Complete(); - return content; - } + return content; } /// @@ -250,14 +240,14 @@ namespace Umbraco.Core.Services.Implement /// The alias of the content type. /// The optional id of the user creating the content. /// The content object. - public IContent CreateAndSave(string name, int parentId, string contentTypeAlias, int userId = Constants.Security.SuperUserId) + public IContent CreateAndSave(string name, int parentId, string contentTypeAlias, int userId = Cms.Core.Constants.Security.SuperUserId) { // TODO: what about culture? - using (var scope = ScopeProvider.CreateScope()) + using (var scope = ScopeProvider.CreateScope(autoComplete:true)) { // locking the content tree secures content types too - scope.WriteLock(Constants.Locks.ContentTree); + scope.WriteLock(Cms.Core.Constants.Locks.ContentTree); var contentType = GetContentType(contentTypeAlias); // + locks if (contentType == null) @@ -267,10 +257,10 @@ namespace Umbraco.Core.Services.Implement if (parentId > 0 && parent == null) throw new ArgumentException("No content with that id.", nameof(parentId)); // causes rollback - var content = parentId > 0 ? new Content(name, parent, contentType) : new Content(name, parentId, contentType); - CreateContent(scope, content, userId, true); + var content = parentId > 0 ? new Content(name, parent, contentType, userId) : new Content(name, parentId, contentType, userId); + + Save(content, userId); - scope.Complete(); return content; } } @@ -284,55 +274,29 @@ namespace Umbraco.Core.Services.Implement /// The alias of the content type. /// The optional id of the user creating the content. /// The content object. - public IContent CreateAndSave(string name, IContent parent, string contentTypeAlias, int userId = Constants.Security.SuperUserId) + public IContent CreateAndSave(string name, IContent parent, string contentTypeAlias, int userId = Cms.Core.Constants.Security.SuperUserId) { // TODO: what about culture? if (parent == null) throw new ArgumentNullException(nameof(parent)); - using (var scope = ScopeProvider.CreateScope()) + using (var scope = ScopeProvider.CreateScope(autoComplete:true)) { // locking the content tree secures content types too - scope.WriteLock(Constants.Locks.ContentTree); + scope.WriteLock(Cms.Core.Constants.Locks.ContentTree); var contentType = GetContentType(contentTypeAlias); // + locks if (contentType == null) throw new ArgumentException("No content type with that alias.", nameof(contentTypeAlias)); // causes rollback - var content = new Content(name, parent, contentType); - CreateContent(scope, content, userId, true); + var content = new Content(name, parent, contentType, userId); + + Save(content, userId); - scope.Complete(); return content; } } - private void CreateContent(IScope scope, IContent content, int userId, bool withIdentity) - { - content.CreatorId = userId; - content.WriterId = userId; - - if (withIdentity) - { - var evtMsgs = EventMessagesFactory.Get(); - - // if saving is cancelled, content remains without an identity - var saveEventArgs = new ContentSavingEventArgs(content, evtMsgs); - if (scope.Events.DispatchCancelable(Saving, this, saveEventArgs, nameof(Saving))) - return; - - _documentRepository.Save(content); - - scope.Events.Dispatch(Saved, this, saveEventArgs.ToContentSavedEventArgs(), nameof(Saved)); - scope.Events.Dispatch(TreeChanged, this, new TreeChange(content, TreeChangeTypes.RefreshNode).ToEventArgs()); - } - - if (withIdentity == false) - return; - - Audit(AuditType.New, content.CreatorId, content.Id, $"Content '{content.Name}' was created with Id {content.Id}"); - } - #endregion #region Get, Has, Is @@ -346,7 +310,7 @@ namespace Umbraco.Core.Services.Implement { using (var scope = ScopeProvider.CreateScope(autoComplete: true)) { - scope.ReadLock(Constants.Locks.ContentTree); + scope.ReadLock(Cms.Core.Constants.Locks.ContentTree); return _documentRepository.Get(id); } } @@ -363,7 +327,7 @@ namespace Umbraco.Core.Services.Implement using (var scope = ScopeProvider.CreateScope(autoComplete: true)) { - scope.ReadLock(Constants.Locks.ContentTree); + scope.ReadLock(Cms.Core.Constants.Locks.ContentTree); var items = _documentRepository.GetMany(idsA); var index = items.ToDictionary(x => x.Id, x => x); @@ -381,7 +345,7 @@ namespace Umbraco.Core.Services.Implement { using (var scope = ScopeProvider.CreateScope(autoComplete: true)) { - scope.ReadLock(Constants.Locks.ContentTree); + scope.ReadLock(Cms.Core.Constants.Locks.ContentTree); return _documentRepository.Get(key); } } @@ -408,7 +372,7 @@ namespace Umbraco.Core.Services.Implement using (var scope = ScopeProvider.CreateScope(autoComplete: true)) { - scope.ReadLock(Constants.Locks.ContentTree); + scope.ReadLock(Cms.Core.Constants.Locks.ContentTree); var items = _documentRepository.GetMany(idsA); var index = items.ToDictionary(x => x.Key, x => x); @@ -429,7 +393,7 @@ namespace Umbraco.Core.Services.Implement using (var scope = ScopeProvider.CreateScope(autoComplete: true)) { - scope.ReadLock(Constants.Locks.ContentTree); + scope.ReadLock(Cms.Core.Constants.Locks.ContentTree); return _documentRepository.GetPage( Query().Where(x => x.ContentTypeId == contentTypeId), pageIndex, pageSize, out totalRecords, filter, ordering); @@ -447,7 +411,7 @@ namespace Umbraco.Core.Services.Implement using (var scope = ScopeProvider.CreateScope(autoComplete: true)) { - scope.ReadLock(Constants.Locks.ContentTree); + scope.ReadLock(Cms.Core.Constants.Locks.ContentTree); return _documentRepository.GetPage( Query().Where(x => contentTypeIds.Contains(x.ContentTypeId)), pageIndex, pageSize, out totalRecords, filter, ordering); @@ -464,7 +428,7 @@ namespace Umbraco.Core.Services.Implement { using (var scope = ScopeProvider.CreateScope(autoComplete: true)) { - scope.ReadLock(Constants.Locks.ContentTree); + scope.ReadLock(Cms.Core.Constants.Locks.ContentTree); var query = Query().Where(x => x.Level == level && x.Trashed == false); return _documentRepository.Get(query); } @@ -479,7 +443,7 @@ namespace Umbraco.Core.Services.Implement { using (var scope = ScopeProvider.CreateScope(autoComplete: true)) { - scope.ReadLock(Constants.Locks.ContentTree); + scope.ReadLock(Cms.Core.Constants.Locks.ContentTree); return _documentRepository.GetVersion(versionId); } } @@ -493,7 +457,7 @@ namespace Umbraco.Core.Services.Implement { using (var scope = ScopeProvider.CreateScope(autoComplete: true)) { - scope.ReadLock(Constants.Locks.ContentTree); + scope.ReadLock(Cms.Core.Constants.Locks.ContentTree); return _documentRepository.GetAllVersions(id); } } @@ -506,7 +470,7 @@ namespace Umbraco.Core.Services.Implement { using (var scope = ScopeProvider.CreateScope(autoComplete: true)) { - scope.ReadLock(Constants.Locks.ContentTree); + scope.ReadLock(Cms.Core.Constants.Locks.ContentTree); return _documentRepository.GetAllVersionsSlim(id, skip, take); } } @@ -547,7 +511,7 @@ namespace Umbraco.Core.Services.Implement //null check otherwise we get exceptions if (content.Path.IsNullOrWhiteSpace()) return Enumerable.Empty(); - var rootId = Constants.System.RootString; + var rootId = Cms.Core.Constants.System.RootString; var ids = content.Path.Split(',') .Where(x => x != rootId && x != content.Id.ToString(CultureInfo.InvariantCulture)).Select(int.Parse).ToArray(); if (ids.Any() == false) @@ -555,7 +519,7 @@ namespace Umbraco.Core.Services.Implement using (var scope = ScopeProvider.CreateScope(autoComplete: true)) { - scope.ReadLock(Constants.Locks.ContentTree); + scope.ReadLock(Cms.Core.Constants.Locks.ContentTree); return _documentRepository.GetMany(ids); } } @@ -569,7 +533,7 @@ namespace Umbraco.Core.Services.Implement { using (var scope = ScopeProvider.CreateScope(autoComplete: true)) { - scope.ReadLock(Constants.Locks.ContentTree); + scope.ReadLock(Cms.Core.Constants.Locks.ContentTree); var query = Query().Where(x => x.ParentId == id && x.Published); return _documentRepository.Get(query).OrderBy(x => x.SortOrder); } @@ -587,7 +551,7 @@ namespace Umbraco.Core.Services.Implement using (var scope = ScopeProvider.CreateScope(autoComplete: true)) { - scope.ReadLock(Constants.Locks.ContentTree); + scope.ReadLock(Cms.Core.Constants.Locks.ContentTree); var query = Query().Where(x => x.ParentId == id); return _documentRepository.GetPage(query, pageIndex, pageSize, out totalChildren, filter, ordering); @@ -603,12 +567,12 @@ namespace Umbraco.Core.Services.Implement using (var scope = ScopeProvider.CreateScope(autoComplete: true)) { - scope.ReadLock(Constants.Locks.ContentTree); + scope.ReadLock(Cms.Core.Constants.Locks.ContentTree); //if the id is System Root, then just get all - if (id != Constants.System.Root) + if (id != Cms.Core.Constants.System.Root) { - var contentPath = _entityRepository.GetAllPaths(Constants.ObjectTypes.Document, id).ToArray(); + var contentPath = _entityRepository.GetAllPaths(Cms.Core.Constants.ObjectTypes.Document, id).ToArray(); if (contentPath.Length == 0) { totalChildren = 0; @@ -657,7 +621,7 @@ namespace Umbraco.Core.Services.Implement /// Parent object public IContent GetParent(IContent content) { - if (content.ParentId == Constants.System.Root || content.ParentId == Constants.System.RecycleBinContent) + if (content.ParentId == Cms.Core.Constants.System.Root || content.ParentId == Cms.Core.Constants.System.RecycleBinContent) return null; return GetById(content.ParentId); @@ -671,8 +635,8 @@ namespace Umbraco.Core.Services.Implement { using (var scope = ScopeProvider.CreateScope(autoComplete: true)) { - scope.ReadLock(Constants.Locks.ContentTree); - var query = Query().Where(x => x.ParentId == Constants.System.Root); + scope.ReadLock(Cms.Core.Constants.Locks.ContentTree); + var query = Query().Where(x => x.ParentId == Cms.Core.Constants.System.Root); return _documentRepository.Get(query); } } @@ -685,7 +649,7 @@ namespace Umbraco.Core.Services.Implement { using (var scope = ScopeProvider.CreateScope(autoComplete: true)) { - scope.ReadLock(Constants.Locks.ContentTree); + scope.ReadLock(Cms.Core.Constants.Locks.ContentTree); return _documentRepository.Get(QueryNotTrashed); } } @@ -695,7 +659,7 @@ namespace Umbraco.Core.Services.Implement { using (var scope = ScopeProvider.CreateScope(autoComplete: true)) { - scope.ReadLock(Constants.Locks.ContentTree); + scope.ReadLock(Cms.Core.Constants.Locks.ContentTree); return _documentRepository.GetContentForExpiration(date); } } @@ -705,7 +669,7 @@ namespace Umbraco.Core.Services.Implement { using (var scope = ScopeProvider.CreateScope(autoComplete: true)) { - scope.ReadLock(Constants.Locks.ContentTree); + scope.ReadLock(Cms.Core.Constants.Locks.ContentTree); return _documentRepository.GetContentForRelease(date); } } @@ -722,8 +686,8 @@ namespace Umbraco.Core.Services.Implement if (ordering == null) ordering = Ordering.By("Path"); - scope.ReadLock(Constants.Locks.ContentTree); - var query = Query().Where(x => x.Path.StartsWith(Constants.System.RecycleBinContentPathPrefix)); + scope.ReadLock(Cms.Core.Constants.Locks.ContentTree); + var query = Query().Where(x => x.Path.StartsWith(Cms.Core.Constants.System.RecycleBinContentPathPrefix)); return _documentRepository.GetPage(query, pageIndex, pageSize, out totalRecords, filter, ordering); } } @@ -746,7 +710,7 @@ namespace Umbraco.Core.Services.Implement public bool IsPathPublishable(IContent content) { // fast - if (content.ParentId == Constants.System.Root) return true; // root content is always publishable + if (content.ParentId == Cms.Core.Constants.System.Root) return true; // root content is always publishable if (content.Trashed) return false; // trashed content is never publishable // not trashed and has a parent: publishable if the parent is path-published @@ -758,7 +722,7 @@ namespace Umbraco.Core.Services.Implement { using (var scope = ScopeProvider.CreateScope(autoComplete: true)) { - scope.ReadLock(Constants.Locks.ContentTree); + scope.ReadLock(Cms.Core.Constants.Locks.ContentTree); return _documentRepository.IsPathPublished(content); } } @@ -768,7 +732,7 @@ namespace Umbraco.Core.Services.Implement #region Save, Publish, Unpublish /// - public OperationResult Save(IContent content, int userId = Constants.Security.SuperUserId, bool raiseEvents = true) + public OperationResult Save(IContent content, int userId = Cms.Core.Constants.Security.SuperUserId, bool raiseEvents = true) { var publishedState = content.PublishedState; if (publishedState != PublishedState.Published && publishedState != PublishedState.Unpublished) @@ -790,7 +754,7 @@ namespace Umbraco.Core.Services.Implement return OperationResult.Cancel(evtMsgs); } - scope.WriteLock(Constants.Locks.ContentTree); + scope.WriteLock(Cms.Core.Constants.Locks.ContentTree); if (content.HasIdentity == false) content.CreatorId = userId; @@ -831,7 +795,7 @@ namespace Umbraco.Core.Services.Implement } /// - public OperationResult Save(IEnumerable contents, int userId = Constants.Security.SuperUserId, bool raiseEvents = true) + public OperationResult Save(IEnumerable contents, int userId = Cms.Core.Constants.Security.SuperUserId, bool raiseEvents = true) { var evtMsgs = EventMessagesFactory.Get(); var contentsA = contents.ToArray(); @@ -847,7 +811,7 @@ namespace Umbraco.Core.Services.Implement var treeChanges = contentsA.Select(x => new TreeChange(x, TreeChangeTypes.RefreshNode)); - scope.WriteLock(Constants.Locks.ContentTree); + scope.WriteLock(Cms.Core.Constants.Locks.ContentTree); foreach (var content in contentsA) { if (content.HasIdentity == false) @@ -862,7 +826,7 @@ namespace Umbraco.Core.Services.Implement scope.Events.Dispatch(Saved, this, saveEventArgs.ToContentSavedEventArgs(), nameof(Saved)); } scope.Events.Dispatch(TreeChanged, this, treeChanges.ToEventArgs()); - Audit(AuditType.Save, userId == -1 ? 0 : userId, Constants.System.Root, "Saved multiple content"); + Audit(AuditType.Save, userId == -1 ? 0 : userId, Cms.Core.Constants.System.Root, "Saved multiple content"); scope.Complete(); } @@ -871,7 +835,7 @@ namespace Umbraco.Core.Services.Implement } /// - public PublishResult SaveAndPublish(IContent content, string culture = "*", int userId = Constants.Security.SuperUserId, bool raiseEvents = true) + public PublishResult SaveAndPublish(IContent content, string culture = "*", int userId = Cms.Core.Constants.Security.SuperUserId, bool raiseEvents = true) { var evtMsgs = EventMessagesFactory.Get(); @@ -899,7 +863,7 @@ namespace Umbraco.Core.Services.Implement using (var scope = ScopeProvider.CreateScope()) { - scope.WriteLock(Constants.Locks.ContentTree); + scope.WriteLock(Cms.Core.Constants.Locks.ContentTree); var allLangs = _languageRepository.GetMany().ToList(); @@ -936,7 +900,7 @@ namespace Umbraco.Core.Services.Implement using (var scope = ScopeProvider.CreateScope()) { - scope.WriteLock(Constants.Locks.ContentTree); + scope.WriteLock(Cms.Core.Constants.Locks.ContentTree); var allLangs = _languageRepository.GetMany().ToList(); @@ -970,7 +934,7 @@ namespace Umbraco.Core.Services.Implement } /// - public PublishResult Unpublish(IContent content, string culture = "*", int userId = Constants.Security.SuperUserId) + public PublishResult Unpublish(IContent content, string culture = "*", int userId = Cms.Core.Constants.Security.SuperUserId) { if (content == null) throw new ArgumentNullException(nameof(content)); @@ -1001,7 +965,7 @@ namespace Umbraco.Core.Services.Implement using (var scope = ScopeProvider.CreateScope()) { - scope.WriteLock(Constants.Locks.ContentTree); + scope.WriteLock(Cms.Core.Constants.Locks.ContentTree); var allLangs = _languageRepository.GetMany().ToList(); @@ -1067,13 +1031,13 @@ namespace Umbraco.Core.Services.Implement /// The document is *always* saved, even when publishing fails. /// internal PublishResult CommitDocumentChanges(IContent content, - int userId = Constants.Security.SuperUserId, bool raiseEvents = true) + int userId = Cms.Core.Constants.Security.SuperUserId, bool raiseEvents = true) { using (var scope = ScopeProvider.CreateScope()) { var evtMsgs = EventMessagesFactory.Get(); - scope.WriteLock(Constants.Locks.ContentTree); + scope.WriteLock(Cms.Core.Constants.Locks.ContentTree); var saveEventArgs = new ContentSavingEventArgs(content, evtMsgs); if (raiseEvents && scope.Events.DispatchCancelable(Saving, this, saveEventArgs, nameof(Saving))) @@ -1106,7 +1070,7 @@ namespace Umbraco.Core.Services.Implement /// private PublishResult CommitDocumentChangesInternal(IScope scope, IContent content, ContentSavingEventArgs saveEventArgs, IReadOnlyCollection allLangs, - int userId = Constants.Security.SuperUserId, + int userId = Cms.Core.Constants.Security.SuperUserId, bool raiseEvents = true, bool branchOne = false, bool branchRoot = false) { if (scope == null) throw new ArgumentNullException(nameof(scope)); @@ -1396,7 +1360,7 @@ namespace Umbraco.Core.Services.Implement if (_documentRepository.HasContentForExpiration(date)) { // now take a write lock since we'll be updating - scope.WriteLock(Constants.Locks.ContentTree); + scope.WriteLock(Cms.Core.Constants.Locks.ContentTree); foreach (var d in _documentRepository.GetContentForExpiration(date)) { @@ -1457,7 +1421,7 @@ namespace Umbraco.Core.Services.Implement if (_documentRepository.HasContentForRelease(date)) { // now take a write lock since we'll be updating - scope.WriteLock(Constants.Locks.ContentTree); + scope.WriteLock(Cms.Core.Constants.Locks.ContentTree); foreach (var d in _documentRepository.GetContentForRelease(date)) { @@ -1576,7 +1540,7 @@ namespace Umbraco.Core.Services.Implement } /// - public IEnumerable SaveAndPublishBranch(IContent content, bool force, string culture = "*", int userId = Constants.Security.SuperUserId) + public IEnumerable SaveAndPublishBranch(IContent content, bool force, string culture = "*", int userId = Cms.Core.Constants.Security.SuperUserId) { // note: EditedValue and PublishedValue are objects here, so it is important to .Equals() // and not to == them, else we would be comparing references, and that is a bad thing @@ -1618,7 +1582,7 @@ namespace Umbraco.Core.Services.Implement } /// - public IEnumerable SaveAndPublishBranch(IContent content, bool force, string[] cultures, int userId = Constants.Security.SuperUserId) + public IEnumerable SaveAndPublishBranch(IContent content, bool force, string[] cultures, int userId = Cms.Core.Constants.Security.SuperUserId) { // note: EditedValue and PublishedValue are objects here, so it is important to .Equals() // and not to == them, else we would be comparing references, and that is a bad thing @@ -1657,7 +1621,7 @@ namespace Umbraco.Core.Services.Implement internal IEnumerable SaveAndPublishBranch(IContent document, bool force, Func> shouldPublish, Func, IReadOnlyCollection, bool> publishCultures, - int userId = Constants.Security.SuperUserId) + int userId = Cms.Core.Constants.Security.SuperUserId) { if (shouldPublish == null) throw new ArgumentNullException(nameof(shouldPublish)); if (publishCultures == null) throw new ArgumentNullException(nameof(publishCultures)); @@ -1668,7 +1632,7 @@ namespace Umbraco.Core.Services.Implement using (var scope = ScopeProvider.CreateScope()) { - scope.WriteLock(Constants.Locks.ContentTree); + scope.WriteLock(Cms.Core.Constants.Locks.ContentTree); var allLangs = _languageRepository.GetMany().ToList(); @@ -1776,7 +1740,7 @@ namespace Umbraco.Core.Services.Implement #region Delete /// - public OperationResult Delete(IContent content, int userId = Constants.Security.SuperUserId) + public OperationResult Delete(IContent content, int userId = Cms.Core.Constants.Security.SuperUserId) { var evtMsgs = EventMessagesFactory.Get(); @@ -1789,7 +1753,7 @@ namespace Umbraco.Core.Services.Implement return OperationResult.Cancel(evtMsgs); } - scope.WriteLock(Constants.Locks.ContentTree); + scope.WriteLock(Cms.Core.Constants.Locks.ContentTree); // if it's not trashed yet, and published, we should unpublish // but... Unpublishing event makes no sense (not going to cancel?) and no need to save @@ -1843,7 +1807,7 @@ namespace Umbraco.Core.Services.Implement /// Id of the object to delete versions from /// Latest version date /// Optional Id of the User deleting versions of a Content object - public void DeleteVersions(int id, DateTime versionDate, int userId = Constants.Security.SuperUserId) + public void DeleteVersions(int id, DateTime versionDate, int userId = Cms.Core.Constants.Security.SuperUserId) { using (var scope = ScopeProvider.CreateScope()) { @@ -1854,12 +1818,12 @@ namespace Umbraco.Core.Services.Implement return; } - scope.WriteLock(Constants.Locks.ContentTree); + scope.WriteLock(Cms.Core.Constants.Locks.ContentTree); _documentRepository.DeleteVersions(id, versionDate); deleteRevisionsEventArgs.CanCancel = false; scope.Events.Dispatch(DeletedVersions, this, deleteRevisionsEventArgs); - Audit(AuditType.Delete, userId, Constants.System.Root, "Delete (by version date)"); + Audit(AuditType.Delete, userId, Cms.Core.Constants.System.Root, "Delete (by version date)"); scope.Complete(); } @@ -1873,7 +1837,7 @@ namespace Umbraco.Core.Services.Implement /// Id of the version to delete /// Boolean indicating whether to delete versions prior to the versionId /// Optional Id of the User deleting versions of a Content object - public void DeleteVersion(int id, int versionId, bool deletePriorVersions, int userId = Constants.Security.SuperUserId) + public void DeleteVersion(int id, int versionId, bool deletePriorVersions, int userId = Cms.Core.Constants.Security.SuperUserId) { using (var scope = ScopeProvider.CreateScope()) { @@ -1889,13 +1853,13 @@ namespace Umbraco.Core.Services.Implement DeleteVersions(id, content.UpdateDate, userId); } - scope.WriteLock(Constants.Locks.ContentTree); + scope.WriteLock(Cms.Core.Constants.Locks.ContentTree); var c = _documentRepository.Get(id); if (c.VersionId != versionId && c.PublishedVersionId != versionId) // don't delete the current or published version _documentRepository.DeleteVersion(versionId); scope.Events.Dispatch(DeletedVersions, this, new DeleteRevisionsEventArgs(id, false,/* specificVersion:*/ versionId)); - Audit(AuditType.Delete, userId, Constants.System.Root, "Delete (by version)"); + Audit(AuditType.Delete, userId, Cms.Core.Constants.System.Root, "Delete (by version)"); scope.Complete(); } @@ -1906,17 +1870,17 @@ namespace Umbraco.Core.Services.Implement #region Move, RecycleBin /// - public OperationResult MoveToRecycleBin(IContent content, int userId = Constants.Security.SuperUserId) + public OperationResult MoveToRecycleBin(IContent content, int userId = Cms.Core.Constants.Security.SuperUserId) { var evtMsgs = EventMessagesFactory.Get(); var moves = new List<(IContent, string)>(); using (var scope = ScopeProvider.CreateScope()) { - scope.WriteLock(Constants.Locks.ContentTree); + scope.WriteLock(Cms.Core.Constants.Locks.ContentTree); var originalPath = content.Path; - var moveEventInfo = new MoveEventInfo(content, originalPath, Constants.System.RecycleBinContent); + var moveEventInfo = new MoveEventInfo(content, originalPath, Cms.Core.Constants.System.RecycleBinContent); var moveEventArgs = new MoveEventArgs(evtMsgs, moveEventInfo); if (scope.Events.DispatchCancelable(Trashing, this, moveEventArgs, nameof(Trashing))) { @@ -1930,7 +1894,7 @@ namespace Umbraco.Core.Services.Implement //if (content.HasPublishedVersion) //{ } - PerformMoveLocked(content, Constants.System.RecycleBinContent, null, userId, moves, true); + PerformMoveLocked(content, Cms.Core.Constants.System.RecycleBinContent, null, userId, moves, true); scope.Events.Dispatch(TreeChanged, this, new TreeChange(content, TreeChangeTypes.RefreshBranch).ToEventArgs()); var moveInfo = moves @@ -1959,10 +1923,10 @@ namespace Umbraco.Core.Services.Implement /// The to move /// Id of the Content's new Parent /// Optional Id of the User moving the Content - public void Move(IContent content, int parentId, int userId = Constants.Security.SuperUserId) + public void Move(IContent content, int parentId, int userId = Cms.Core.Constants.Security.SuperUserId) { // if moving to the recycle bin then use the proper method - if (parentId == Constants.System.RecycleBinContent) + if (parentId == Cms.Core.Constants.System.RecycleBinContent) { MoveToRecycleBin(content, userId); return; @@ -1972,10 +1936,10 @@ namespace Umbraco.Core.Services.Implement using (var scope = ScopeProvider.CreateScope()) { - scope.WriteLock(Constants.Locks.ContentTree); + scope.WriteLock(Cms.Core.Constants.Locks.ContentTree); - var parent = parentId == Constants.System.Root ? null : GetById(parentId); - if (parentId != Constants.System.Root && (parent == null || parent.Trashed)) + var parent = parentId == Cms.Core.Constants.System.Root ? null : GetById(parentId); + if (parentId != Cms.Core.Constants.System.Root && (parent == null || parent.Trashed)) throw new InvalidOperationException("Parent does not exist or is trashed."); // causes rollback var moveEventInfo = new MoveEventInfo(content, content.Path, parentId); @@ -2047,7 +2011,7 @@ namespace Umbraco.Core.Services.Implement // if uow is not immediate, content.Path will be updated only when the UOW commits, // and because we want it now, we have to calculate it by ourselves //paths[content.Id] = content.Path; - paths[content.Id] = (parent == null ? (parentId == Constants.System.RecycleBinContent ? "-1,-20" : Constants.System.RootString) : parent.Path) + "," + content.Id; + paths[content.Id] = (parent == null ? (parentId == Cms.Core.Constants.System.RecycleBinContent ? "-1,-20" : Cms.Core.Constants.System.RootString) : parent.Path) + "," + content.Id; const int pageSize = 500; var query = GetPagedDescendantQuery(originalPath); @@ -2081,15 +2045,15 @@ namespace Umbraco.Core.Services.Implement /// /// Empties the Recycle Bin by deleting all that resides in the bin /// - public OperationResult EmptyRecycleBin(int userId = Constants.Security.SuperUserId) + public OperationResult EmptyRecycleBin(int userId = Cms.Core.Constants.Security.SuperUserId) { - var nodeObjectType = Constants.ObjectTypes.Document; + var nodeObjectType = Cms.Core.Constants.ObjectTypes.Document; var deleted = new List(); var evtMsgs = EventMessagesFactory.Get(); using (var scope = ScopeProvider.CreateScope()) { - scope.WriteLock(Constants.Locks.ContentTree); + scope.WriteLock(Cms.Core.Constants.Locks.ContentTree); // v7 EmptyingRecycleBin and EmptiedRecycleBin events are greatly simplified since // each deleted items will have its own deleting/deleted events. so, files and such @@ -2104,7 +2068,7 @@ namespace Umbraco.Core.Services.Implement } // emptying the recycle bin means deleting whatever is in there - do it properly! - var query = Query().Where(x => x.ParentId == Constants.System.RecycleBinContent); + var query = Query().Where(x => x.ParentId == Cms.Core.Constants.System.RecycleBinContent); var contents = _documentRepository.Get(query).ToArray(); foreach (var content in contents) { @@ -2116,7 +2080,7 @@ namespace Umbraco.Core.Services.Implement recycleBinEventArgs.RecycleBinEmptiedSuccessfully = true; // oh my?! scope.Events.Dispatch(EmptiedRecycleBin, this, recycleBinEventArgs); scope.Events.Dispatch(TreeChanged, this, deleted.Select(x => new TreeChange(x, TreeChangeTypes.Remove)).ToEventArgs()); - Audit(AuditType.Delete, userId, Constants.System.RecycleBinContent, "Recycle bin emptied"); + Audit(AuditType.Delete, userId, Cms.Core.Constants.System.RecycleBinContent, "Recycle bin emptied"); scope.Complete(); } @@ -2137,7 +2101,7 @@ namespace Umbraco.Core.Services.Implement /// Boolean indicating whether the copy should be related to the original /// Optional Id of the User copying the Content /// The newly created object - public IContent Copy(IContent content, int parentId, bool relateToOriginal, int userId = Constants.Security.SuperUserId) + public IContent Copy(IContent content, int parentId, bool relateToOriginal, int userId = Cms.Core.Constants.Security.SuperUserId) { return Copy(content, parentId, relateToOriginal, true, userId); } @@ -2152,7 +2116,7 @@ namespace Umbraco.Core.Services.Implement /// A value indicating whether to recursively copy children. /// Optional Id of the User copying the Content /// The newly created object - public IContent Copy(IContent content, int parentId, bool relateToOriginal, bool recursive, int userId = Constants.Security.SuperUserId) + public IContent Copy(IContent content, int parentId, bool relateToOriginal, bool recursive, int userId = Cms.Core.Constants.Security.SuperUserId) { var copy = content.DeepCloneWithResetIdentities(); copy.ParentId = parentId; @@ -2172,7 +2136,7 @@ namespace Umbraco.Core.Services.Implement var copies = new List>(); - scope.WriteLock(Constants.Locks.ContentTree); + scope.WriteLock(Cms.Core.Constants.Locks.ContentTree); // a copy is not published (but not really unpublishing either) // update the create author and last edit author @@ -2255,7 +2219,7 @@ namespace Umbraco.Core.Services.Implement /// The to send to publication /// Optional Id of the User issuing the send to publication /// True if sending publication was successful otherwise false - public bool SendToPublication(IContent content, int userId = Constants.Security.SuperUserId) + public bool SendToPublication(IContent content, int userId = Cms.Core.Constants.Security.SuperUserId) { using (var scope = ScopeProvider.CreateScope()) { @@ -2309,7 +2273,7 @@ namespace Umbraco.Core.Services.Implement /// /// /// Result indicating what action was taken when handling the command. - public OperationResult Sort(IEnumerable items, int userId = Constants.Security.SuperUserId, bool raiseEvents = true) + public OperationResult Sort(IEnumerable items, int userId = Cms.Core.Constants.Security.SuperUserId, bool raiseEvents = true) { var evtMsgs = EventMessagesFactory.Get(); @@ -2318,7 +2282,7 @@ namespace Umbraco.Core.Services.Implement using (var scope = ScopeProvider.CreateScope()) { - scope.WriteLock(Constants.Locks.ContentTree); + scope.WriteLock(Cms.Core.Constants.Locks.ContentTree); var ret = Sort(scope, itemsA, userId, evtMsgs, raiseEvents); scope.Complete(); @@ -2338,7 +2302,7 @@ namespace Umbraco.Core.Services.Implement /// /// /// Result indicating what action was taken when handling the command. - public OperationResult Sort(IEnumerable ids, int userId = Constants.Security.SuperUserId, bool raiseEvents = true) + public OperationResult Sort(IEnumerable ids, int userId = Cms.Core.Constants.Security.SuperUserId, bool raiseEvents = true) { var evtMsgs = EventMessagesFactory.Get(); @@ -2347,7 +2311,7 @@ namespace Umbraco.Core.Services.Implement using (var scope = ScopeProvider.CreateScope()) { - scope.WriteLock(Constants.Locks.ContentTree); + scope.WriteLock(Cms.Core.Constants.Locks.ContentTree); var itemsA = GetByIds(idsA).ToArray(); var ret = Sort(scope, itemsA, userId, evtMsgs, raiseEvents); @@ -2419,7 +2383,7 @@ namespace Umbraco.Core.Services.Implement { using (var scope = ScopeProvider.CreateScope(autoComplete: true)) { - scope.WriteLock(Constants.Locks.ContentTree); + scope.WriteLock(Cms.Core.Constants.Locks.ContentTree); var report = _documentRepository.CheckDataIntegrity(options); @@ -2447,7 +2411,7 @@ namespace Umbraco.Core.Services.Implement { using (var scope = ScopeProvider.CreateScope(autoComplete: true)) { - scope.ReadLock(Constants.Locks.ContentTree); + scope.ReadLock(Cms.Core.Constants.Locks.ContentTree); return GetPublishedDescendantsLocked(content).ToArray(); // ToArray important in uow! } } @@ -2734,7 +2698,7 @@ namespace Umbraco.Core.Services.Implement // check if the content can be path-published // root content can be published // else check ancestors - we know we are not trashed - var pathIsOk = content.ParentId == Constants.System.Root || IsPathPublished(GetParent(content)); + var pathIsOk = content.ParentId == Cms.Core.Constants.System.Root || IsPathPublished(GetParent(content)); if (!pathIsOk) { _logger.LogInformation("Document {ContentName} (id={ContentId}) cannot be published: {Reason}", content.Name, content.Id, "parent is not published"); @@ -2861,7 +2825,7 @@ namespace Umbraco.Core.Services.Implement /// /// Id of the /// Optional Id of the user issuing the delete operation - public void DeleteOfTypes(IEnumerable contentTypeIds, int userId = Constants.Security.SuperUserId) + public void DeleteOfTypes(IEnumerable contentTypeIds, int userId = Cms.Core.Constants.Security.SuperUserId) { // TODO: This currently this is called from the ContentTypeService but that needs to change, // if we are deleting a content type, we should just delete the data and do this operation slightly differently. @@ -2880,7 +2844,7 @@ namespace Umbraco.Core.Services.Implement // using (var scope = ScopeProvider.CreateScope()) { - scope.WriteLock(Constants.Locks.ContentTree); + scope.WriteLock(Cms.Core.Constants.Locks.ContentTree); var query = Query().WhereIn(x => x.ContentTypeId, contentTypeIdsA); var contents = _documentRepository.Get(query).ToArray(); @@ -2908,7 +2872,7 @@ namespace Umbraco.Core.Services.Implement foreach (var child in children) { // see MoveToRecycleBin - PerformMoveLocked(child, Constants.System.RecycleBinContent, null, userId, moves, true); + PerformMoveLocked(child, Cms.Core.Constants.System.RecycleBinContent, null, userId, moves, true); changes.Add(new TreeChange(content, TreeChangeTypes.RefreshBranch)); } @@ -2925,7 +2889,7 @@ namespace Umbraco.Core.Services.Implement scope.Events.Dispatch(Trashed, this, new MoveEventArgs(false, moveInfos), nameof(Trashed)); scope.Events.Dispatch(TreeChanged, this, changes.ToEventArgs()); - Audit(AuditType.Delete, userId, Constants.System.Root, $"Delete content of type {string.Join(",", contentTypeIdsA)}"); + Audit(AuditType.Delete, userId, Cms.Core.Constants.System.Root, $"Delete content of type {string.Join(",", contentTypeIdsA)}"); scope.Complete(); } @@ -2937,7 +2901,7 @@ namespace Umbraco.Core.Services.Implement /// This needs extra care and attention as its potentially a dangerous and extensive operation /// Id of the /// Optional id of the user deleting the media - public void DeleteOfType(int contentTypeId, int userId = Constants.Security.SuperUserId) + public void DeleteOfType(int contentTypeId, int userId = Cms.Core.Constants.Security.SuperUserId) { DeleteOfTypes(new[] { contentTypeId }, userId); } @@ -2947,7 +2911,7 @@ namespace Umbraco.Core.Services.Implement if (contentTypeAlias == null) throw new ArgumentNullException(nameof(contentTypeAlias)); if (string.IsNullOrWhiteSpace(contentTypeAlias)) throw new ArgumentException("Value can't be empty or consist only of white-space characters.", nameof(contentTypeAlias)); - scope.ReadLock(Constants.Locks.ContentTypes); + scope.ReadLock(Cms.Core.Constants.Locks.ContentTypes); var query = Query().Where(x => x.Alias == contentTypeAlias); var contentType = _contentTypeRepository.Get(query).FirstOrDefault(); @@ -2977,7 +2941,7 @@ namespace Umbraco.Core.Services.Implement { using (var scope = ScopeProvider.CreateScope(autoComplete: true)) { - scope.ReadLock(Constants.Locks.ContentTree); + scope.ReadLock(Cms.Core.Constants.Locks.ContentTree); var blueprint = _documentBlueprintRepository.Get(id); if (blueprint != null) blueprint.Blueprint = true; @@ -2989,7 +2953,7 @@ namespace Umbraco.Core.Services.Implement { using (var scope = ScopeProvider.CreateScope(autoComplete: true)) { - scope.ReadLock(Constants.Locks.ContentTree); + scope.ReadLock(Cms.Core.Constants.Locks.ContentTree); var blueprint = _documentBlueprintRepository.Get(id); if (blueprint != null) blueprint.Blueprint = true; @@ -2997,7 +2961,7 @@ namespace Umbraco.Core.Services.Implement } } - public void SaveBlueprint(IContent content, int userId = Constants.Security.SuperUserId) + public void SaveBlueprint(IContent content, int userId = Cms.Core.Constants.Security.SuperUserId) { //always ensure the blueprint is at the root if (content.ParentId != -1) @@ -3007,7 +2971,7 @@ namespace Umbraco.Core.Services.Implement using (var scope = ScopeProvider.CreateScope()) { - scope.WriteLock(Constants.Locks.ContentTree); + scope.WriteLock(Cms.Core.Constants.Locks.ContentTree); if (content.HasIdentity == false) { @@ -3017,7 +2981,7 @@ namespace Umbraco.Core.Services.Implement _documentBlueprintRepository.Save(content); - Audit(AuditType.Save, Constants.Security.SuperUserId, content.Id, $"Saved content template: {content.Name}"); + Audit(AuditType.Save, Cms.Core.Constants.Security.SuperUserId, content.Id, $"Saved content template: {content.Name}"); scope.Events.Dispatch(SavedBlueprint, this, new SaveEventArgs(content), "SavedBlueprint"); @@ -3025,11 +2989,11 @@ namespace Umbraco.Core.Services.Implement } } - public void DeleteBlueprint(IContent content, int userId = Constants.Security.SuperUserId) + public void DeleteBlueprint(IContent content, int userId = Cms.Core.Constants.Security.SuperUserId) { using (var scope = ScopeProvider.CreateScope()) { - scope.WriteLock(Constants.Locks.ContentTree); + scope.WriteLock(Cms.Core.Constants.Locks.ContentTree); _documentBlueprintRepository.Delete(content); scope.Events.Dispatch(DeletedBlueprint, this, new DeleteEventArgs(content), nameof(DeletedBlueprint)); scope.Complete(); @@ -3038,7 +3002,7 @@ namespace Umbraco.Core.Services.Implement private static readonly string[] ArrayOfOneNullString = { null }; - public IContent CreateContentFromBlueprint(IContent blueprint, string name, int userId = Constants.Security.SuperUserId) + public IContent CreateContentFromBlueprint(IContent blueprint, string name, int userId = Cms.Core.Constants.Security.SuperUserId) { if (blueprint == null) throw new ArgumentNullException(nameof(blueprint)); @@ -3099,11 +3063,11 @@ namespace Umbraco.Core.Services.Implement } } - public void DeleteBlueprintsOfTypes(IEnumerable contentTypeIds, int userId = Constants.Security.SuperUserId) + public void DeleteBlueprintsOfTypes(IEnumerable contentTypeIds, int userId = Cms.Core.Constants.Security.SuperUserId) { using (var scope = ScopeProvider.CreateScope()) { - scope.WriteLock(Constants.Locks.ContentTree); + scope.WriteLock(Cms.Core.Constants.Locks.ContentTree); var contentTypeIdsA = contentTypeIds.ToArray(); var query = Query(); @@ -3126,7 +3090,7 @@ namespace Umbraco.Core.Services.Implement } } - public void DeleteBlueprintsOfType(int contentTypeId, int userId = Constants.Security.SuperUserId) + public void DeleteBlueprintsOfType(int contentTypeId, int userId = Cms.Core.Constants.Security.SuperUserId) { DeleteBlueprintsOfTypes(new[] { contentTypeId }, userId); } @@ -3135,7 +3099,7 @@ namespace Umbraco.Core.Services.Implement #region Rollback - public OperationResult Rollback(int id, int versionId, string culture = "*", int userId = Constants.Security.SuperUserId) + public OperationResult Rollback(int id, int versionId, string culture = "*", int userId = Cms.Core.Constants.Security.SuperUserId) { var evtMsgs = EventMessagesFactory.Get(); diff --git a/src/Umbraco.Infrastructure/Services/Implement/ContentTypeBaseServiceProvider.cs b/src/Umbraco.Infrastructure/Services/Implement/ContentTypeBaseServiceProvider.cs index 5a56dfe3bc..619070c297 100644 --- a/src/Umbraco.Infrastructure/Services/Implement/ContentTypeBaseServiceProvider.cs +++ b/src/Umbraco.Infrastructure/Services/Implement/ContentTypeBaseServiceProvider.cs @@ -1,7 +1,7 @@ using System; -using Umbraco.Core.Models; +using Umbraco.Cms.Core.Models; -namespace Umbraco.Core.Services.Implement +namespace Umbraco.Cms.Core.Services.Implement { public class ContentTypeBaseServiceProvider : IContentTypeBaseServiceProvider { diff --git a/src/Umbraco.Infrastructure/Services/Implement/ContentTypeService.cs b/src/Umbraco.Infrastructure/Services/Implement/ContentTypeService.cs index ab7e70e852..e698b0c68b 100644 --- a/src/Umbraco.Infrastructure/Services/Implement/ContentTypeService.cs +++ b/src/Umbraco.Infrastructure/Services/Implement/ContentTypeService.cs @@ -2,12 +2,12 @@ using System.Collections.Generic; using System.Linq; using Microsoft.Extensions.Logging; -using Umbraco.Core.Events; -using Umbraco.Core.Models; -using Umbraco.Core.Persistence.Repositories; -using Umbraco.Core.Scoping; +using Umbraco.Cms.Core.Events; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Core.Persistence.Repositories; +using Umbraco.Cms.Core.Scoping; -namespace Umbraco.Core.Services.Implement +namespace Umbraco.Cms.Core.Services.Implement { /// /// Represents the ContentType Service, which is an easy access to operations involving @@ -24,12 +24,12 @@ namespace Umbraco.Core.Services.Implement protected override IContentTypeService This => this; // beware! order is important to avoid deadlocks - protected override int[] ReadLockIds { get; } = { Constants.Locks.ContentTypes }; - protected override int[] WriteLockIds { get; } = { Constants.Locks.ContentTree, Constants.Locks.ContentTypes }; + protected override int[] ReadLockIds { get; } = { Cms.Core.Constants.Locks.ContentTypes }; + protected override int[] WriteLockIds { get; } = { Cms.Core.Constants.Locks.ContentTree, Cms.Core.Constants.Locks.ContentTypes }; private IContentService ContentService { get; } - protected override Guid ContainedObjectType => Constants.ObjectTypes.DocumentType; + protected override Guid ContainedObjectType => Cms.Core.Constants.ObjectTypes.DocumentType; protected override void DeleteItemsOfTypes(IEnumerable typeIds) { @@ -52,7 +52,7 @@ namespace Umbraco.Core.Services.Implement using (var scope = ScopeProvider.CreateScope(autoComplete: true)) { // that one is special because it works across content, media and member types - scope.ReadLock(Constants.Locks.ContentTypes, Constants.Locks.MediaTypes, Constants.Locks.MemberTypes); + scope.ReadLock(Cms.Core.Constants.Locks.ContentTypes, Cms.Core.Constants.Locks.MediaTypes, Cms.Core.Constants.Locks.MemberTypes); return Repository.GetAllPropertyTypeAliases(); } } @@ -68,7 +68,7 @@ namespace Umbraco.Core.Services.Implement using (var scope = ScopeProvider.CreateScope(autoComplete: true)) { // that one is special because it works across content, media and member types - scope.ReadLock(Constants.Locks.ContentTypes, Constants.Locks.MediaTypes, Constants.Locks.MemberTypes); + scope.ReadLock(Cms.Core.Constants.Locks.ContentTypes, Cms.Core.Constants.Locks.MediaTypes, Cms.Core.Constants.Locks.MemberTypes); return Repository.GetAllContentTypeAliases(guids); } } @@ -84,7 +84,7 @@ namespace Umbraco.Core.Services.Implement using (var scope = ScopeProvider.CreateScope(autoComplete: true)) { // that one is special because it works across content, media and member types - scope.ReadLock(Constants.Locks.ContentTypes, Constants.Locks.MediaTypes, Constants.Locks.MemberTypes); + scope.ReadLock(Cms.Core.Constants.Locks.ContentTypes, Cms.Core.Constants.Locks.MediaTypes, Cms.Core.Constants.Locks.MemberTypes); return Repository.GetAllContentTypeIds(aliases); } } diff --git a/src/Umbraco.Infrastructure/Services/Implement/ContentTypeServiceBase.cs b/src/Umbraco.Infrastructure/Services/Implement/ContentTypeServiceBase.cs index 7067e27f59..3886050432 100644 --- a/src/Umbraco.Infrastructure/Services/Implement/ContentTypeServiceBase.cs +++ b/src/Umbraco.Infrastructure/Services/Implement/ContentTypeServiceBase.cs @@ -1,8 +1,8 @@ using Microsoft.Extensions.Logging; -using Umbraco.Core.Events; -using Umbraco.Core.Scoping; +using Umbraco.Cms.Core.Events; +using Umbraco.Cms.Core.Scoping; -namespace Umbraco.Core.Services.Implement +namespace Umbraco.Cms.Core.Services.Implement { public abstract class ContentTypeServiceBase : ScopeRepositoryService { diff --git a/src/Umbraco.Infrastructure/Services/Implement/ContentTypeServiceBaseOfTItemTService.cs b/src/Umbraco.Infrastructure/Services/Implement/ContentTypeServiceBaseOfTItemTService.cs index be541486ff..90174317d6 100644 --- a/src/Umbraco.Infrastructure/Services/Implement/ContentTypeServiceBaseOfTItemTService.cs +++ b/src/Umbraco.Infrastructure/Services/Implement/ContentTypeServiceBaseOfTItemTService.cs @@ -1,10 +1,10 @@ using Microsoft.Extensions.Logging; -using Umbraco.Core.Events; -using Umbraco.Core.Models; -using Umbraco.Core.Scoping; -using Umbraco.Core.Services.Changes; +using Umbraco.Cms.Core.Events; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Core.Scoping; +using Umbraco.Cms.Core.Services.Changes; -namespace Umbraco.Core.Services.Implement +namespace Umbraco.Cms.Core.Services.Implement { public abstract class ContentTypeServiceBase : ContentTypeServiceBase where TItem : class, IContentTypeComposition diff --git a/src/Umbraco.Infrastructure/Services/Implement/ContentTypeServiceBaseOfTRepositoryTItemTService.cs b/src/Umbraco.Infrastructure/Services/Implement/ContentTypeServiceBaseOfTRepositoryTItemTService.cs index a3e3687b10..b23887fb18 100644 --- a/src/Umbraco.Infrastructure/Services/Implement/ContentTypeServiceBaseOfTRepositoryTItemTService.cs +++ b/src/Umbraco.Infrastructure/Services/Implement/ContentTypeServiceBaseOfTRepositoryTItemTService.cs @@ -2,16 +2,17 @@ using System.Collections.Generic; using System.Linq; using Microsoft.Extensions.Logging; -using Umbraco.Core.Events; -using Umbraco.Core.Exceptions; -using Umbraco.Core.Models; -using Umbraco.Core.Models.Entities; -using Umbraco.Core.Persistence.Repositories; -using Umbraco.Core.Persistence.Repositories.Implement; -using Umbraco.Core.Scoping; -using Umbraco.Core.Services.Changes; +using Umbraco.Cms.Core.Events; +using Umbraco.Cms.Core.Exceptions; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Core.Models.Entities; +using Umbraco.Cms.Core.Persistence.Repositories; +using Umbraco.Cms.Core.Scoping; +using Umbraco.Cms.Core.Services.Changes; +using Umbraco.Cms.Infrastructure.Persistence.Repositories.Implement; +using Umbraco.Extensions; -namespace Umbraco.Core.Services.Implement +namespace Umbraco.Cms.Core.Services.Implement { public abstract class ContentTypeServiceBase : ContentTypeServiceBase, IContentTypeBaseService where TRepository : IContentTypeRepositoryBase @@ -391,7 +392,7 @@ namespace Umbraco.Core.Services.Implement #region Save - public void Save(TItem item, int userId = Constants.Security.SuperUserId) + public void Save(TItem item, int userId = Cms.Core.Constants.Security.SuperUserId) { using (var scope = ScopeProvider.CreateScope()) { @@ -434,7 +435,7 @@ namespace Umbraco.Core.Services.Implement } } - public void Save(IEnumerable items, int userId = Constants.Security.SuperUserId) + public void Save(IEnumerable items, int userId = Cms.Core.Constants.Security.SuperUserId) { var itemsA = items.ToArray(); @@ -480,7 +481,7 @@ namespace Umbraco.Core.Services.Implement #region Delete - public void Delete(TItem item, int userId = Constants.Security.SuperUserId) + public void Delete(TItem item, int userId = Cms.Core.Constants.Security.SuperUserId) { using (var scope = ScopeProvider.CreateScope()) { @@ -544,7 +545,7 @@ namespace Umbraco.Core.Services.Implement } } - public void Delete(IEnumerable items, int userId = Constants.Security.SuperUserId) + public void Delete(IEnumerable items, int userId = Cms.Core.Constants.Security.SuperUserId) { var itemsA = items.ToArray(); @@ -764,7 +765,7 @@ namespace Umbraco.Core.Services.Implement protected Guid ContainerObjectType => EntityContainer.GetContainerObjectType(ContainedObjectType); - public Attempt> CreateContainer(int parentId, string name, int userId = Constants.Security.SuperUserId) + public Attempt> CreateContainer(int parentId, string name, int userId = Cms.Core.Constants.Security.SuperUserId) { var evtMsgs = EventMessagesFactory.Get(); using (var scope = ScopeProvider.CreateScope()) @@ -804,7 +805,7 @@ namespace Umbraco.Core.Services.Implement } } - public Attempt SaveContainer(EntityContainer container, int userId = Constants.Security.SuperUserId) + public Attempt SaveContainer(EntityContainer container, int userId = Cms.Core.Constants.Security.SuperUserId) { var evtMsgs = EventMessagesFactory.Get(); @@ -898,7 +899,7 @@ namespace Umbraco.Core.Services.Implement } } - public Attempt DeleteContainer(int containerId, int userId = Constants.Security.SuperUserId) + public Attempt DeleteContainer(int containerId, int userId = Cms.Core.Constants.Security.SuperUserId) { var evtMsgs = EventMessagesFactory.Get(); using (var scope = ScopeProvider.CreateScope()) @@ -935,7 +936,7 @@ namespace Umbraco.Core.Services.Implement } } - public Attempt> RenameContainer(int id, string name, int userId = Constants.Security.SuperUserId) + public Attempt> RenameContainer(int id, string name, int userId = Cms.Core.Constants.Security.SuperUserId) { var evtMsgs = EventMessagesFactory.Get(); using (var scope = ScopeProvider.CreateScope()) diff --git a/src/Umbraco.Infrastructure/Services/Implement/DataTypeService.cs b/src/Umbraco.Infrastructure/Services/Implement/DataTypeService.cs index 042128558b..dacaa7e228 100644 --- a/src/Umbraco.Infrastructure/Services/Implement/DataTypeService.cs +++ b/src/Umbraco.Infrastructure/Services/Implement/DataTypeService.cs @@ -2,18 +2,19 @@ using System.Collections.Generic; using System.Linq; using Microsoft.Extensions.Logging; -using Umbraco.Core.Events; -using Umbraco.Core.Exceptions; -using Umbraco.Core.IO; -using Umbraco.Core.Models; -using Umbraco.Core.Persistence.Repositories; -using Umbraco.Core.Persistence.Repositories.Implement; -using Umbraco.Core.PropertyEditors; -using Umbraco.Core.Scoping; -using Umbraco.Core.Serialization; -using Umbraco.Core.Strings; +using Umbraco.Cms.Core.Events; +using Umbraco.Cms.Core.Exceptions; +using Umbraco.Cms.Core.IO; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Core.Persistence.Repositories; +using Umbraco.Cms.Core.PropertyEditors; +using Umbraco.Cms.Core.Scoping; +using Umbraco.Cms.Core.Serialization; +using Umbraco.Cms.Core.Strings; +using Umbraco.Cms.Infrastructure.Persistence.Repositories.Implement; +using Umbraco.Extensions; -namespace Umbraco.Core.Services.Implement +namespace Umbraco.Cms.Core.Services.Implement { /// /// Represents the DataType Service, which is an easy access to operations involving @@ -53,14 +54,14 @@ namespace Umbraco.Core.Services.Implement #region Containers - public Attempt> CreateContainer(int parentId, string name, int userId = Constants.Security.SuperUserId) + public Attempt> CreateContainer(int parentId, string name, int userId = Cms.Core.Constants.Security.SuperUserId) { var evtMsgs = EventMessagesFactory.Get(); using (var scope = ScopeProvider.CreateScope()) { try { - var container = new EntityContainer(Constants.ObjectTypes.DataType) + var container = new EntityContainer(Cms.Core.Constants.ObjectTypes.DataType) { Name = name, ParentId = parentId, @@ -134,13 +135,13 @@ namespace Umbraco.Core.Services.Implement } } - public Attempt SaveContainer(EntityContainer container, int userId = Constants.Security.SuperUserId) + public Attempt SaveContainer(EntityContainer container, int userId = Cms.Core.Constants.Security.SuperUserId) { var evtMsgs = EventMessagesFactory.Get(); - if (container.ContainedObjectType != Constants.ObjectTypes.DataType) + if (container.ContainedObjectType != Cms.Core.Constants.ObjectTypes.DataType) { - var ex = new InvalidOperationException("Not a " + Constants.ObjectTypes.DataType + " container."); + var ex = new InvalidOperationException("Not a " + Cms.Core.Constants.ObjectTypes.DataType + " container."); return OperationResult.Attempt.Fail(evtMsgs, ex); } @@ -168,7 +169,7 @@ namespace Umbraco.Core.Services.Implement return OperationResult.Attempt.Succeed(evtMsgs); } - public Attempt DeleteContainer(int containerId, int userId = Constants.Security.SuperUserId) + public Attempt DeleteContainer(int containerId, int userId = Cms.Core.Constants.Security.SuperUserId) { var evtMsgs = EventMessagesFactory.Get(); using (var scope = ScopeProvider.CreateScope()) @@ -201,7 +202,7 @@ namespace Umbraco.Core.Services.Implement return OperationResult.Attempt.Succeed(evtMsgs); } - public Attempt> RenameContainer(int id, string name, int userId = Constants.Security.SuperUserId) + public Attempt> RenameContainer(int id, string name, int userId = Cms.Core.Constants.Security.SuperUserId) { var evtMsgs = EventMessagesFactory.Get(); using (var scope = ScopeProvider.CreateScope()) @@ -378,7 +379,7 @@ namespace Umbraco.Core.Services.Implement /// /// to save /// Id of the user issuing the save - public void Save(IDataType dataType, int userId = Constants.Security.SuperUserId) + public void Save(IDataType dataType, int userId = Cms.Core.Constants.Security.SuperUserId) { dataType.CreatorId = userId; @@ -415,7 +416,7 @@ namespace Umbraco.Core.Services.Implement /// /// to save /// Id of the user issuing the save - public void Save(IEnumerable dataTypeDefinitions, int userId = Constants.Security.SuperUserId) + public void Save(IEnumerable dataTypeDefinitions, int userId = Cms.Core.Constants.Security.SuperUserId) { Save(dataTypeDefinitions, userId, true); } @@ -465,7 +466,7 @@ namespace Umbraco.Core.Services.Implement /// /// to delete /// Optional Id of the user issuing the deletion - public void Delete(IDataType dataType, int userId = Constants.Security.SuperUserId) + public void Delete(IDataType dataType, int userId = Cms.Core.Constants.Security.SuperUserId) { using (var scope = ScopeProvider.CreateScope()) { diff --git a/src/Umbraco.Infrastructure/Services/Implement/DomainService.cs b/src/Umbraco.Infrastructure/Services/Implement/DomainService.cs index 7bdce6f6cb..ce0d2ee0ed 100644 --- a/src/Umbraco.Infrastructure/Services/Implement/DomainService.cs +++ b/src/Umbraco.Infrastructure/Services/Implement/DomainService.cs @@ -1,11 +1,11 @@ using System.Collections.Generic; using Microsoft.Extensions.Logging; -using Umbraco.Core.Events; -using Umbraco.Core.Models; -using Umbraco.Core.Persistence.Repositories; -using Umbraco.Core.Scoping; +using Umbraco.Cms.Core.Events; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Core.Persistence.Repositories; +using Umbraco.Cms.Core.Scoping; -namespace Umbraco.Core.Services.Implement +namespace Umbraco.Cms.Core.Services.Implement { public class DomainService : ScopeRepositoryService, IDomainService { diff --git a/src/Umbraco.Infrastructure/Services/Implement/EntityService.cs b/src/Umbraco.Infrastructure/Services/Implement/EntityService.cs index ccfbe4aacd..b7ff4f4d5f 100644 --- a/src/Umbraco.Infrastructure/Services/Implement/EntityService.cs +++ b/src/Umbraco.Infrastructure/Services/Implement/EntityService.cs @@ -3,16 +3,17 @@ using System.Collections.Generic; using System.Linq; using System.Linq.Expressions; using Microsoft.Extensions.Logging; -using Umbraco.Core.Events; -using Umbraco.Core.Models; -using Umbraco.Core.Models.Entities; -using Umbraco.Core.Persistence; -using Umbraco.Core.Persistence.Dtos; -using Umbraco.Core.Persistence.Querying; -using Umbraco.Core.Persistence.Repositories; -using Umbraco.Core.Scoping; +using Umbraco.Cms.Core.Events; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Core.Models.Entities; +using Umbraco.Cms.Core.Persistence.Querying; +using Umbraco.Cms.Core.Persistence.Repositories; +using Umbraco.Cms.Core.Scoping; +using Umbraco.Cms.Infrastructure.Persistence.Dtos; +using Umbraco.Cms.Infrastructure.Persistence.Querying; +using Umbraco.Extensions; -namespace Umbraco.Core.Services.Implement +namespace Umbraco.Cms.Core.Services.Implement { public class EntityService : ScopeRepositoryService, IEntityService { @@ -318,7 +319,7 @@ namespace Umbraco.Core.Services.Implement var objectTypeGuid = objectType.GetGuid(); var query = Query(); - if (id != Constants.System.Root) + if (id != Cms.Core.Constants.System.Root) { // lookup the path so we can use it in the prefix query below var paths = _entityRepository.GetAllPaths(objectTypeGuid, id).ToArray(); @@ -350,7 +351,7 @@ namespace Umbraco.Core.Services.Implement var objectTypeGuid = objectType.GetGuid(); var query = Query(); - if (idsA.All(x => x != Constants.System.Root)) + if (idsA.All(x => x != Cms.Core.Constants.System.Root)) { var paths = _entityRepository.GetAllPaths(objectTypeGuid, idsA).ToArray(); if (paths.Length == 0) @@ -362,7 +363,7 @@ namespace Umbraco.Core.Services.Implement foreach (var id in idsA) { // if the id is root then don't add any clauses - if (id == Constants.System.Root) continue; + if (id == Cms.Core.Constants.System.Root) continue; var entityPath = paths.FirstOrDefault(x => x.Id == id); if (entityPath == null) continue; @@ -488,7 +489,7 @@ namespace Umbraco.Core.Services.Implement var sql = scope.SqlContext.Sql() .Select() .From() - .Where(x => x.UniqueId == key && x.NodeObjectType == Constants.ObjectTypes.IdReservation); + .Where(x => x.UniqueId == key && x.NodeObjectType == Cms.Core.Constants.ObjectTypes.IdReservation); node = scope.Database.SingleOrDefault(sql); if (node != null) @@ -498,7 +499,7 @@ namespace Umbraco.Core.Services.Implement { UniqueId = key, Text = "RESERVED.ID", - NodeObjectType = Constants.ObjectTypes.IdReservation, + NodeObjectType = Cms.Core.Constants.ObjectTypes.IdReservation, CreateDate = DateTime.Now, UserId = null, diff --git a/src/Umbraco.Infrastructure/Services/Implement/EntityXmlSerializer.cs b/src/Umbraco.Infrastructure/Services/Implement/EntityXmlSerializer.cs index c33265c987..bc8b4f25ce 100644 --- a/src/Umbraco.Infrastructure/Services/Implement/EntityXmlSerializer.cs +++ b/src/Umbraco.Infrastructure/Services/Implement/EntityXmlSerializer.cs @@ -4,12 +4,13 @@ using System.Globalization; using System.Linq; using System.Net; using System.Xml.Linq; -using Umbraco.Core.Models; -using Umbraco.Core.PropertyEditors; -using Umbraco.Core.Serialization; -using Umbraco.Core.Strings; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Core.PropertyEditors; +using Umbraco.Cms.Core.Serialization; +using Umbraco.Cms.Core.Strings; +using Umbraco.Extensions; -namespace Umbraco.Core.Services.Implement +namespace Umbraco.Cms.Core.Services.Implement { /// /// Serializes entities to XML diff --git a/src/Umbraco.Infrastructure/Services/Implement/ExternalLoginService.cs b/src/Umbraco.Infrastructure/Services/Implement/ExternalLoginService.cs index 5edbe77cdb..bbec75338b 100644 --- a/src/Umbraco.Infrastructure/Services/Implement/ExternalLoginService.cs +++ b/src/Umbraco.Infrastructure/Services/Implement/ExternalLoginService.cs @@ -1,13 +1,12 @@ -using System; using System.Collections.Generic; using System.Linq; using Microsoft.Extensions.Logging; -using Umbraco.Core.Events; -using Umbraco.Core.Models.Identity; -using Umbraco.Core.Persistence.Repositories; -using Umbraco.Core.Scoping; +using Umbraco.Cms.Core.Events; +using Umbraco.Cms.Core.Models.Identity; +using Umbraco.Cms.Core.Persistence.Repositories; +using Umbraco.Cms.Core.Scoping; -namespace Umbraco.Core.Services.Implement +namespace Umbraco.Cms.Core.Services.Implement { public class ExternalLoginService : ScopeRepositoryService, IExternalLoginService { diff --git a/src/Umbraco.Infrastructure/Services/Implement/FileService.cs b/src/Umbraco.Infrastructure/Services/Implement/FileService.cs index e1f4a017b3..364454f876 100644 --- a/src/Umbraco.Infrastructure/Services/Implement/FileService.cs +++ b/src/Umbraco.Infrastructure/Services/Implement/FileService.cs @@ -1,23 +1,20 @@ -using System; +using System; using System.Collections.Generic; using System.IO; using System.Linq; using System.Text.RegularExpressions; -using Microsoft.Extensions.Options; using Microsoft.Extensions.Logging; -using Umbraco.Core.Composing; -using Umbraco.Core.Configuration; -using Umbraco.Core.Configuration.Models; -using Umbraco.Core.Events; -using Umbraco.Core.Hosting; -using Umbraco.Core.IO; -using Umbraco.Core.Models; -using Umbraco.Core.Persistence.Repositories; -using Umbraco.Core.Persistence.Repositories.Implement; -using Umbraco.Core.Scoping; -using Umbraco.Core.Strings; +using Microsoft.Extensions.Options; +using Umbraco.Cms.Core.Configuration.Models; +using Umbraco.Cms.Core.Events; +using Umbraco.Cms.Core.Hosting; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Core.Persistence.Repositories; +using Umbraco.Cms.Core.Scoping; +using Umbraco.Cms.Core.Strings; +using Umbraco.Extensions; -namespace Umbraco.Core.Services.Implement +namespace Umbraco.Cms.Core.Services.Implement { /// /// Represents the File Service, which is an easy access to operations involving objects like Scripts, Stylesheets and Templates @@ -34,8 +31,8 @@ namespace Umbraco.Core.Services.Implement private readonly GlobalSettings _globalSettings; private readonly IHostingEnvironment _hostingEnvironment; - private const string PartialViewHeader = "@inherits Umbraco.Web.Common.AspNetCore.UmbracoViewPage"; - private const string PartialViewMacroHeader = "@inherits Umbraco.Web.Common.Macros.PartialViewMacroPage"; + private const string PartialViewHeader = "@inherits Umbraco.Cms.Web.Common.Views.UmbracoViewPage"; + private const string PartialViewMacroHeader = "@inherits Umbraco.Cms.Web.Common.Macros.PartialViewMacroPage"; public FileService(IScopeProvider uowProvider, ILoggerFactory loggerFactory, IEventMessagesFactory eventMessagesFactory, IStylesheetRepository stylesheetRepository, IScriptRepository scriptRepository, ITemplateRepository templateRepository, @@ -75,7 +72,7 @@ namespace Umbraco.Core.Services.Implement } /// - public void SaveStylesheet(IStylesheet stylesheet, int userId = Constants.Security.SuperUserId) + public void SaveStylesheet(IStylesheet stylesheet, int userId = Cms.Core.Constants.Security.SuperUserId) { using (var scope = ScopeProvider.CreateScope()) { @@ -97,7 +94,7 @@ namespace Umbraco.Core.Services.Implement } /// - public void DeleteStylesheet(string path, int userId = Constants.Security.SuperUserId) + public void DeleteStylesheet(string path, int userId = Cms.Core.Constants.Security.SuperUserId) { using (var scope = ScopeProvider.CreateScope()) { @@ -199,7 +196,7 @@ namespace Umbraco.Core.Services.Implement } /// - public void SaveScript(IScript script, int userId = Constants.Security.SuperUserId) + public void SaveScript(IScript script, int userId = Cms.Core.Constants.Security.SuperUserId) { using (var scope = ScopeProvider.CreateScope()) { @@ -220,7 +217,7 @@ namespace Umbraco.Core.Services.Implement } /// - public void DeleteScript(string path, int userId = Constants.Security.SuperUserId) + public void DeleteScript(string path, int userId = Cms.Core.Constants.Security.SuperUserId) { using (var scope = ScopeProvider.CreateScope()) { @@ -312,7 +309,7 @@ namespace Umbraco.Core.Services.Implement /// /// The template created /// - public Attempt> CreateTemplateForContentType(string contentTypeAlias, string contentTypeName, int userId = Constants.Security.SuperUserId) + public Attempt> CreateTemplateForContentType(string contentTypeAlias, string contentTypeName, int userId = Cms.Core.Constants.Security.SuperUserId) { var template = new Template(_shortStringHelper, contentTypeName, //NOTE: We are NOT passing in the content type alias here, we want to use it's name since we don't @@ -377,7 +374,7 @@ namespace Umbraco.Core.Services.Implement /// /// /// - public ITemplate CreateTemplateWithIdentity(string name, string alias, string content, ITemplate masterTemplate = null, int userId = Constants.Security.SuperUserId) + public ITemplate CreateTemplateWithIdentity(string name, string alias, string content, ITemplate masterTemplate = null, int userId = Cms.Core.Constants.Security.SuperUserId) { if (name == null) { @@ -526,7 +523,7 @@ namespace Umbraco.Core.Services.Implement /// /// to save /// - public void SaveTemplate(ITemplate template, int userId = Constants.Security.SuperUserId) + public void SaveTemplate(ITemplate template, int userId = Cms.Core.Constants.Security.SuperUserId) { if (template == null) { @@ -561,7 +558,7 @@ namespace Umbraco.Core.Services.Implement /// /// List of to save /// Optional id of the user - public void SaveTemplate(IEnumerable templates, int userId = Constants.Security.SuperUserId) + public void SaveTemplate(IEnumerable templates, int userId = Cms.Core.Constants.Security.SuperUserId) { var templatesA = templates.ToArray(); using (var scope = ScopeProvider.CreateScope()) @@ -587,7 +584,7 @@ namespace Umbraco.Core.Services.Implement /// /// Alias of the to delete /// - public void DeleteTemplate(string alias, int userId = Constants.Security.SuperUserId) + public void DeleteTemplate(string alias, int userId = Cms.Core.Constants.Security.SuperUserId) { using (var scope = ScopeProvider.CreateScope()) { @@ -731,17 +728,17 @@ namespace Umbraco.Core.Services.Implement } } - public Attempt CreatePartialView(IPartialView partialView, string snippetName = null, int userId = Constants.Security.SuperUserId) + public Attempt CreatePartialView(IPartialView partialView, string snippetName = null, int userId = Cms.Core.Constants.Security.SuperUserId) { return CreatePartialViewMacro(partialView, PartialViewType.PartialView, snippetName, userId); } - public Attempt CreatePartialViewMacro(IPartialView partialView, string snippetName = null, int userId = Constants.Security.SuperUserId) + public Attempt CreatePartialViewMacro(IPartialView partialView, string snippetName = null, int userId = Cms.Core.Constants.Security.SuperUserId) { return CreatePartialViewMacro(partialView, PartialViewType.PartialViewMacro, snippetName, userId); } - private Attempt CreatePartialViewMacro(IPartialView partialView, PartialViewType partialViewType, string snippetName = null, int userId = Constants.Security.SuperUserId) + private Attempt CreatePartialViewMacro(IPartialView partialView, PartialViewType partialViewType, string snippetName = null, int userId = Cms.Core.Constants.Security.SuperUserId) { string partialViewHeader; switch (partialViewType) @@ -807,17 +804,17 @@ namespace Umbraco.Core.Services.Implement return Attempt.Succeed(partialView); } - public bool DeletePartialView(string path, int userId = Constants.Security.SuperUserId) + public bool DeletePartialView(string path, int userId = Cms.Core.Constants.Security.SuperUserId) { return DeletePartialViewMacro(path, PartialViewType.PartialView, userId); } - public bool DeletePartialViewMacro(string path, int userId = Constants.Security.SuperUserId) + public bool DeletePartialViewMacro(string path, int userId = Cms.Core.Constants.Security.SuperUserId) { return DeletePartialViewMacro(path, PartialViewType.PartialViewMacro, userId); } - private bool DeletePartialViewMacro(string path, PartialViewType partialViewType, int userId = Constants.Security.SuperUserId) + private bool DeletePartialViewMacro(string path, PartialViewType partialViewType, int userId = Cms.Core.Constants.Security.SuperUserId) { using (var scope = ScopeProvider.CreateScope()) { @@ -847,17 +844,17 @@ namespace Umbraco.Core.Services.Implement return true; } - public Attempt SavePartialView(IPartialView partialView, int userId = Constants.Security.SuperUserId) + public Attempt SavePartialView(IPartialView partialView, int userId = Cms.Core.Constants.Security.SuperUserId) { return SavePartialView(partialView, PartialViewType.PartialView, userId); } - public Attempt SavePartialViewMacro(IPartialView partialView, int userId = Constants.Security.SuperUserId) + public Attempt SavePartialViewMacro(IPartialView partialView, int userId = Cms.Core.Constants.Security.SuperUserId) { return SavePartialView(partialView, PartialViewType.PartialViewMacro, userId); } - private Attempt SavePartialView(IPartialView partialView, PartialViewType partialViewType, int userId = Constants.Security.SuperUserId) + private Attempt SavePartialView(IPartialView partialView, PartialViewType partialViewType, int userId = Cms.Core.Constants.Security.SuperUserId) { using (var scope = ScopeProvider.CreateScope()) { diff --git a/src/Umbraco.Infrastructure/Services/Implement/KeyValueService.cs b/src/Umbraco.Infrastructure/Services/Implement/KeyValueService.cs index 3030e9b818..bcd35ee7f4 100644 --- a/src/Umbraco.Infrastructure/Services/Implement/KeyValueService.cs +++ b/src/Umbraco.Infrastructure/Services/Implement/KeyValueService.cs @@ -1,9 +1,9 @@ using System; -using Umbraco.Core.Models; -using Umbraco.Core.Persistence.Repositories; -using Umbraco.Core.Scoping; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Core.Persistence.Repositories; +using Umbraco.Cms.Core.Scoping; -namespace Umbraco.Core.Services.Implement +namespace Umbraco.Cms.Core.Services.Implement { internal class KeyValueService : IKeyValueService { @@ -30,7 +30,7 @@ namespace Umbraco.Core.Services.Implement { using (var scope = _scopeProvider.CreateScope()) { - scope.WriteLock(Constants.Locks.KeyValues); + scope.WriteLock(Cms.Core.Constants.Locks.KeyValues); var keyValue = _repository.Get(key); if (keyValue == null) @@ -66,7 +66,7 @@ namespace Umbraco.Core.Services.Implement { using (var scope = _scopeProvider.CreateScope()) { - scope.WriteLock(Constants.Locks.KeyValues); + scope.WriteLock(Cms.Core.Constants.Locks.KeyValues); var keyValue = _repository.Get(key); if (keyValue == null || keyValue.Value != originalValue) diff --git a/src/Umbraco.Infrastructure/Services/Implement/LocalizationService.cs b/src/Umbraco.Infrastructure/Services/Implement/LocalizationService.cs index 07fa0e1e77..a88c883eef 100644 --- a/src/Umbraco.Infrastructure/Services/Implement/LocalizationService.cs +++ b/src/Umbraco.Infrastructure/Services/Implement/LocalizationService.cs @@ -2,12 +2,13 @@ using System.Collections.Generic; using System.Linq; using Microsoft.Extensions.Logging; -using Umbraco.Core.Events; -using Umbraco.Core.Models; -using Umbraco.Core.Persistence.Repositories; -using Umbraco.Core.Scoping; +using Umbraco.Cms.Core.Events; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Core.Persistence.Repositories; +using Umbraco.Cms.Core.Scoping; +using Umbraco.Extensions; -namespace Umbraco.Core.Services.Implement +namespace Umbraco.Cms.Core.Services.Implement { /// /// Represents the Localization Service, which is an easy access to operations involving and @@ -227,7 +228,7 @@ namespace Umbraco.Core.Services.Implement /// /// to save /// Optional id of the user saving the dictionary item - public void Save(IDictionaryItem dictionaryItem, int userId = Constants.Security.SuperUserId) + public void Save(IDictionaryItem dictionaryItem, int userId = Cms.Core.Constants.Security.SuperUserId) { using (var scope = ScopeProvider.CreateScope()) { @@ -256,7 +257,7 @@ namespace Umbraco.Core.Services.Implement /// /// to delete /// Optional id of the user deleting the dictionary item - public void Delete(IDictionaryItem dictionaryItem, int userId = Constants.Security.SuperUserId) + public void Delete(IDictionaryItem dictionaryItem, int userId = Cms.Core.Constants.Security.SuperUserId) { using (var scope = ScopeProvider.CreateScope()) { @@ -356,12 +357,12 @@ namespace Umbraco.Core.Services.Implement /// /// to save /// Optional id of the user saving the language - public void Save(ILanguage language, int userId = Constants.Security.SuperUserId) + public void Save(ILanguage language, int userId = Cms.Core.Constants.Security.SuperUserId) { using (var scope = ScopeProvider.CreateScope()) { // write-lock languages to guard against race conds when dealing with default language - scope.WriteLock(Constants.Locks.Languages); + scope.WriteLock(Cms.Core.Constants.Locks.Languages); // look for cycles - within write-lock if (language.FallbackLanguageId.HasValue) @@ -409,12 +410,12 @@ namespace Umbraco.Core.Services.Implement /// /// to delete /// Optional id of the user deleting the language - public void Delete(ILanguage language, int userId = Constants.Security.SuperUserId) + public void Delete(ILanguage language, int userId = Cms.Core.Constants.Security.SuperUserId) { using (var scope = ScopeProvider.CreateScope()) { // write-lock languages to guard against race conds when dealing with default language - scope.WriteLock(Constants.Locks.Languages); + scope.WriteLock(Cms.Core.Constants.Locks.Languages); var deleteEventArgs = new DeleteEventArgs(language); if (scope.Events.DispatchCancelable(DeletingLanguage, this, deleteEventArgs)) diff --git a/src/Umbraco.Infrastructure/Services/Implement/LocalizedTextService.cs b/src/Umbraco.Infrastructure/Services/Implement/LocalizedTextService.cs index 8547830ac7..b8588ba969 100644 --- a/src/Umbraco.Infrastructure/Services/Implement/LocalizedTextService.cs +++ b/src/Umbraco.Infrastructure/Services/Implement/LocalizedTextService.cs @@ -5,8 +5,9 @@ using System.Linq; using System.Xml.Linq; using System.Xml.XPath; using Microsoft.Extensions.Logging; +using Umbraco.Extensions; -namespace Umbraco.Core.Services.Implement +namespace Umbraco.Cms.Core.Services.Implement { // TODO: Convert all of this over to Niels K's localization framework one day diff --git a/src/Umbraco.Infrastructure/Services/Implement/LocalizedTextServiceFileSources.cs b/src/Umbraco.Infrastructure/Services/Implement/LocalizedTextServiceFileSources.cs index 78bb71bcf1..5dac893cf4 100644 --- a/src/Umbraco.Infrastructure/Services/Implement/LocalizedTextServiceFileSources.cs +++ b/src/Umbraco.Infrastructure/Services/Implement/LocalizedTextServiceFileSources.cs @@ -5,11 +5,11 @@ using System.IO; using System.Linq; using System.Xml; using System.Xml.Linq; -using Umbraco.Core.Cache; -using Umbraco.Core.Composing; using Microsoft.Extensions.Logging; +using Umbraco.Cms.Core.Cache; +using Umbraco.Extensions; -namespace Umbraco.Core.Services.Implement +namespace Umbraco.Cms.Core.Services.Implement { /// /// Exposes the XDocument sources from files for the default localization text service and ensure caching is taken care of diff --git a/src/Umbraco.Infrastructure/Services/Implement/LocalizedTextServiceSupplementaryFileSource.cs b/src/Umbraco.Infrastructure/Services/Implement/LocalizedTextServiceSupplementaryFileSource.cs index 5e2e4d3880..3e847167ce 100644 --- a/src/Umbraco.Infrastructure/Services/Implement/LocalizedTextServiceSupplementaryFileSource.cs +++ b/src/Umbraco.Infrastructure/Services/Implement/LocalizedTextServiceSupplementaryFileSource.cs @@ -1,7 +1,7 @@ using System; using System.IO; -namespace Umbraco.Core.Services.Implement +namespace Umbraco.Cms.Core.Services.Implement { public class LocalizedTextServiceSupplementaryFileSource { diff --git a/src/Umbraco.Infrastructure/Services/Implement/MacroService.cs b/src/Umbraco.Infrastructure/Services/Implement/MacroService.cs index 98bc633fa9..92308e671f 100644 --- a/src/Umbraco.Infrastructure/Services/Implement/MacroService.cs +++ b/src/Umbraco.Infrastructure/Services/Implement/MacroService.cs @@ -2,12 +2,12 @@ using System.Collections.Generic; using System.Linq; using Microsoft.Extensions.Logging; -using Umbraco.Core.Events; -using Umbraco.Core.Models; -using Umbraco.Core.Persistence.Repositories; -using Umbraco.Core.Scoping; +using Umbraco.Cms.Core.Events; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Core.Persistence.Repositories; +using Umbraco.Cms.Core.Scoping; -namespace Umbraco.Core.Services.Implement +namespace Umbraco.Cms.Core.Services.Implement { /// /// Represents the Macro Service, which is an easy access to operations involving @@ -81,7 +81,7 @@ namespace Umbraco.Core.Services.Implement /// /// to delete /// Optional id of the user deleting the macro - public void Delete(IMacro macro, int userId = Constants.Security.SuperUserId) + public void Delete(IMacro macro, int userId = Cms.Core.Constants.Security.SuperUserId) { using (var scope = ScopeProvider.CreateScope()) { @@ -106,7 +106,7 @@ namespace Umbraco.Core.Services.Implement /// /// to save /// Optional Id of the user deleting the macro - public void Save(IMacro macro, int userId = Constants.Security.SuperUserId) + public void Save(IMacro macro, int userId = Cms.Core.Constants.Security.SuperUserId) { using (var scope = ScopeProvider.CreateScope()) { diff --git a/src/Umbraco.Infrastructure/Services/Implement/MediaService.cs b/src/Umbraco.Infrastructure/Services/Implement/MediaService.cs index 5d5d4b7bd1..60061ed9bf 100644 --- a/src/Umbraco.Infrastructure/Services/Implement/MediaService.cs +++ b/src/Umbraco.Infrastructure/Services/Implement/MediaService.cs @@ -4,16 +4,18 @@ using System.Globalization; using System.IO; using System.Linq; using Microsoft.Extensions.Logging; -using Umbraco.Core.Events; -using Umbraco.Core.IO; -using Umbraco.Core.Models; -using Umbraco.Core.Persistence.Querying; -using Umbraco.Core.Persistence.Repositories; -using Umbraco.Core.Scoping; -using Umbraco.Core.Services.Changes; -using Umbraco.Core.Strings; +using Umbraco.Cms.Core.Events; +using Umbraco.Cms.Core.IO; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Core.Persistence.Querying; +using Umbraco.Cms.Core.Persistence.Repositories; +using Umbraco.Cms.Core.Scoping; +using Umbraco.Cms.Core.Services.Changes; +using Umbraco.Cms.Core.Strings; +using Umbraco.Cms.Infrastructure.Persistence.Querying; +using Umbraco.Extensions; -namespace Umbraco.Core.Services.Implement +namespace Umbraco.Cms.Core.Services.Implement { /// /// Represents the Media Service, which is an easy access to operations involving @@ -51,7 +53,7 @@ namespace Umbraco.Core.Services.Implement { using (var scope = ScopeProvider.CreateScope(autoComplete: true)) { - scope.ReadLock(Constants.Locks.MediaTree); + scope.ReadLock(Cms.Core.Constants.Locks.MediaTree); return _mediaRepository.Count(mediaTypeAlias); } } @@ -60,7 +62,7 @@ namespace Umbraco.Core.Services.Implement { using (var scope = ScopeProvider.CreateScope(autoComplete: true)) { - scope.ReadLock(Constants.Locks.MediaTree); + scope.ReadLock(Cms.Core.Constants.Locks.MediaTree); var mediaTypeId = 0; if (string.IsNullOrWhiteSpace(mediaTypeAlias) == false) @@ -81,7 +83,7 @@ namespace Umbraco.Core.Services.Implement { using (var scope = ScopeProvider.CreateScope(autoComplete: true)) { - scope.ReadLock(Constants.Locks.MediaTree); + scope.ReadLock(Cms.Core.Constants.Locks.MediaTree); return _mediaRepository.CountChildren(parentId, mediaTypeAlias); } } @@ -90,7 +92,7 @@ namespace Umbraco.Core.Services.Implement { using (var scope = ScopeProvider.CreateScope(autoComplete: true)) { - scope.ReadLock(Constants.Locks.MediaTree); + scope.ReadLock(Cms.Core.Constants.Locks.MediaTree); return _mediaRepository.CountDescendants(parentId, mediaTypeAlias); } } @@ -113,7 +115,7 @@ namespace Umbraco.Core.Services.Implement /// Alias of the /// Optional id of the user creating the media item /// - public IMedia CreateMedia(string name, Guid parentId, string mediaTypeAlias, int userId = Constants.Security.SuperUserId) + public IMedia CreateMedia(string name, Guid parentId, string mediaTypeAlias, int userId = Cms.Core.Constants.Security.SuperUserId) { var parent = GetById(parentId); return CreateMedia(name, parent, mediaTypeAlias, userId); @@ -131,7 +133,7 @@ namespace Umbraco.Core.Services.Implement /// The alias of the media type. /// The optional id of the user creating the media. /// The media object. - public IMedia CreateMedia(string name, int parentId, string mediaTypeAlias, int userId = Constants.Security.SuperUserId) + public IMedia CreateMedia(string name, int parentId, string mediaTypeAlias, int userId = Cms.Core.Constants.Security.SuperUserId) { var mediaType = GetMediaType(mediaTypeAlias); if (mediaType == null) @@ -144,7 +146,7 @@ namespace Umbraco.Core.Services.Implement throw new InvalidOperationException("Name cannot be more than 255 characters in length."); throw new InvalidOperationException("Name cannot be more than 255 characters in length."); } - var media = new Models.Media(name, parentId, mediaType); + var media = new Core.Models.Media(name, parentId, mediaType); using (var scope = ScopeProvider.CreateScope()) { CreateMedia(scope, media, parent, userId, false); @@ -165,7 +167,7 @@ namespace Umbraco.Core.Services.Implement /// The alias of the media type. /// The optional id of the user creating the media. /// The media object. - public IMedia CreateMedia(string name, string mediaTypeAlias, int userId = Constants.Security.SuperUserId) + public IMedia CreateMedia(string name, string mediaTypeAlias, int userId = Cms.Core.Constants.Security.SuperUserId) { // not locking since not saving anything @@ -177,7 +179,7 @@ namespace Umbraco.Core.Services.Implement throw new InvalidOperationException("Name cannot be more than 255 characters in length."); throw new InvalidOperationException("Name cannot be more than 255 characters in length."); } - var media = new Models.Media(name, -1, mediaType); + var media = new Core.Models.Media(name, -1, mediaType); using (var scope = ScopeProvider.CreateScope()) { CreateMedia(scope, media, null, userId, false); @@ -199,7 +201,7 @@ namespace Umbraco.Core.Services.Implement /// The alias of the media type. /// The optional id of the user creating the media. /// The media object. - public IMedia CreateMedia(string name, IMedia parent, string mediaTypeAlias, int userId = Constants.Security.SuperUserId) + public IMedia CreateMedia(string name, IMedia parent, string mediaTypeAlias, int userId = Cms.Core.Constants.Security.SuperUserId) { if (parent == null) throw new ArgumentNullException(nameof(parent)); @@ -215,7 +217,7 @@ namespace Umbraco.Core.Services.Implement throw new InvalidOperationException("Name cannot be more than 255 characters in length."); throw new InvalidOperationException("Name cannot be more than 255 characters in length."); } - var media = new Models.Media(name, parent, mediaType); + var media = new Core.Models.Media(name, parent, mediaType); CreateMedia(scope, media, parent, userId, false); scope.Complete(); @@ -232,12 +234,12 @@ namespace Umbraco.Core.Services.Implement /// The alias of the media type. /// The optional id of the user creating the media. /// The media object. - public IMedia CreateMediaWithIdentity(string name, int parentId, string mediaTypeAlias, int userId = Constants.Security.SuperUserId) + public IMedia CreateMediaWithIdentity(string name, int parentId, string mediaTypeAlias, int userId = Cms.Core.Constants.Security.SuperUserId) { using (var scope = ScopeProvider.CreateScope()) { // locking the media tree secures media types too - scope.WriteLock(Constants.Locks.MediaTree); + scope.WriteLock(Cms.Core.Constants.Locks.MediaTree); var mediaType = GetMediaType(mediaTypeAlias); // + locks if (mediaType == null) @@ -247,7 +249,7 @@ namespace Umbraco.Core.Services.Implement if (parentId > 0 && parent == null) throw new ArgumentException("No media with that id.", nameof(parentId)); // causes rollback - var media = parentId > 0 ? new Models.Media(name, parent, mediaType) : new Models.Media(name, parentId, mediaType); + var media = parentId > 0 ? new Core.Models.Media(name, parent, mediaType) : new Core.Models.Media(name, parentId, mediaType); CreateMedia(scope, media, parent, userId, true); scope.Complete(); @@ -264,20 +266,20 @@ namespace Umbraco.Core.Services.Implement /// The alias of the media type. /// The optional id of the user creating the media. /// The media object. - public IMedia CreateMediaWithIdentity(string name, IMedia parent, string mediaTypeAlias, int userId = Constants.Security.SuperUserId) + public IMedia CreateMediaWithIdentity(string name, IMedia parent, string mediaTypeAlias, int userId = Cms.Core.Constants.Security.SuperUserId) { if (parent == null) throw new ArgumentNullException(nameof(parent)); using (var scope = ScopeProvider.CreateScope()) { // locking the media tree secures media types too - scope.WriteLock(Constants.Locks.MediaTree); + scope.WriteLock(Cms.Core.Constants.Locks.MediaTree); var mediaType = GetMediaType(mediaTypeAlias); // + locks if (mediaType == null) throw new ArgumentException("No media type with that alias.", nameof(mediaTypeAlias)); // causes rollback - var media = new Models.Media(name, parent, mediaType); + var media = new Core.Models.Media(name, parent, mediaType); CreateMedia(scope, media, parent, userId, true); scope.Complete(); @@ -285,7 +287,7 @@ namespace Umbraco.Core.Services.Implement } } - private void CreateMedia(IScope scope, Models.Media media, IMedia parent, int userId, bool withIdentity) + private void CreateMedia(IScope scope, Core.Models.Media media, IMedia parent, int userId, bool withIdentity) { media.CreatorId = userId; @@ -322,7 +324,7 @@ namespace Umbraco.Core.Services.Implement { using (var scope = ScopeProvider.CreateScope(autoComplete: true)) { - scope.ReadLock(Constants.Locks.MediaTree); + scope.ReadLock(Cms.Core.Constants.Locks.MediaTree); return _mediaRepository.Get(id); } } @@ -339,7 +341,7 @@ namespace Umbraco.Core.Services.Implement using (var scope = ScopeProvider.CreateScope(autoComplete: true)) { - scope.ReadLock(Constants.Locks.MediaTree); + scope.ReadLock(Cms.Core.Constants.Locks.MediaTree); return _mediaRepository.GetMany(idsA); } } @@ -353,7 +355,7 @@ namespace Umbraco.Core.Services.Implement { using (var scope = ScopeProvider.CreateScope(autoComplete: true)) { - scope.ReadLock(Constants.Locks.MediaTree); + scope.ReadLock(Cms.Core.Constants.Locks.MediaTree); return _mediaRepository.Get(key); } } @@ -372,7 +374,7 @@ namespace Umbraco.Core.Services.Implement using (var scope = ScopeProvider.CreateScope(autoComplete: true)) { - scope.ReadLock(Constants.Locks.MediaTree); + scope.ReadLock(Cms.Core.Constants.Locks.MediaTree); return _mediaRepository.GetMany(idsA); } } @@ -388,7 +390,7 @@ namespace Umbraco.Core.Services.Implement using (var scope = ScopeProvider.CreateScope(autoComplete: true)) { - scope.ReadLock(Constants.Locks.ContentTree); + scope.ReadLock(Cms.Core.Constants.Locks.ContentTree); return _mediaRepository.GetPage( Query().Where(x => x.ContentTypeId == contentTypeId), pageIndex, pageSize, out totalRecords, filter, ordering); @@ -406,7 +408,7 @@ namespace Umbraco.Core.Services.Implement using (var scope = ScopeProvider.CreateScope(autoComplete: true)) { - scope.ReadLock(Constants.Locks.ContentTree); + scope.ReadLock(Cms.Core.Constants.Locks.ContentTree); return _mediaRepository.GetPage( Query().Where(x => contentTypeIds.Contains(x.ContentTypeId)), pageIndex, pageSize, out totalRecords, filter, ordering); @@ -423,7 +425,7 @@ namespace Umbraco.Core.Services.Implement { using (var scope = ScopeProvider.CreateScope(autoComplete: true)) { - scope.ReadLock(Constants.Locks.MediaTree); + scope.ReadLock(Cms.Core.Constants.Locks.MediaTree); var query = Query().Where(x => x.Level == level && x.Trashed == false); return _mediaRepository.Get(query); } @@ -438,7 +440,7 @@ namespace Umbraco.Core.Services.Implement { using (var scope = ScopeProvider.CreateScope(autoComplete: true)) { - scope.ReadLock(Constants.Locks.MediaTree); + scope.ReadLock(Cms.Core.Constants.Locks.MediaTree); return _mediaRepository.GetVersion(versionId); } } @@ -452,7 +454,7 @@ namespace Umbraco.Core.Services.Implement { using (var scope = ScopeProvider.CreateScope(autoComplete: true)) { - scope.ReadLock(Constants.Locks.MediaTree); + scope.ReadLock(Cms.Core.Constants.Locks.MediaTree); return _mediaRepository.GetAllVersions(id); } } @@ -479,7 +481,7 @@ namespace Umbraco.Core.Services.Implement //null check otherwise we get exceptions if (media.Path.IsNullOrWhiteSpace()) return Enumerable.Empty(); - var rootId = Constants.System.RootString; + var rootId = Cms.Core.Constants.System.RootString; var ids = media.Path.Split(',') .Where(x => x != rootId && x != media.Id.ToString(CultureInfo.InvariantCulture)) .Select(int.Parse) @@ -489,7 +491,7 @@ namespace Umbraco.Core.Services.Implement using (var scope = ScopeProvider.CreateScope(autoComplete: true)) { - scope.ReadLock(Constants.Locks.MediaTree); + scope.ReadLock(Cms.Core.Constants.Locks.MediaTree); return _mediaRepository.GetMany(ids); } } @@ -506,7 +508,7 @@ namespace Umbraco.Core.Services.Implement using (var scope = ScopeProvider.CreateScope(autoComplete: true)) { - scope.ReadLock(Constants.Locks.MediaTree); + scope.ReadLock(Cms.Core.Constants.Locks.MediaTree); var query = Query().Where(x => x.ParentId == id); return _mediaRepository.GetPage(query, pageIndex, pageSize, out totalChildren, filter, ordering); @@ -522,12 +524,12 @@ namespace Umbraco.Core.Services.Implement using (var scope = ScopeProvider.CreateScope(autoComplete: true)) { - scope.ReadLock(Constants.Locks.MediaTree); + scope.ReadLock(Cms.Core.Constants.Locks.MediaTree); //if the id is System Root, then just get all - if (id != Constants.System.Root) + if (id != Cms.Core.Constants.System.Root) { - var mediaPath = _entityRepository.GetAllPaths(Constants.ObjectTypes.Media, id).ToArray(); + var mediaPath = _entityRepository.GetAllPaths(Cms.Core.Constants.ObjectTypes.Media, id).ToArray(); if (mediaPath.Length == 0) { totalChildren = 0; @@ -576,7 +578,7 @@ namespace Umbraco.Core.Services.Implement /// Parent object public IMedia GetParent(IMedia media) { - if (media.ParentId == Constants.System.Root || media.ParentId == Constants.System.RecycleBinMedia) + if (media.ParentId == Cms.Core.Constants.System.Root || media.ParentId == Cms.Core.Constants.System.RecycleBinMedia) return null; return GetById(media.ParentId); @@ -590,8 +592,8 @@ namespace Umbraco.Core.Services.Implement { using (var scope = ScopeProvider.CreateScope(autoComplete: true)) { - scope.ReadLock(Constants.Locks.MediaTree); - var query = Query().Where(x => x.ParentId == Constants.System.Root); + scope.ReadLock(Cms.Core.Constants.Locks.MediaTree); + var query = Query().Where(x => x.ParentId == Cms.Core.Constants.System.Root); return _mediaRepository.Get(query); } } @@ -605,8 +607,8 @@ namespace Umbraco.Core.Services.Implement if (ordering == null) ordering = Ordering.By("Path"); - scope.ReadLock(Constants.Locks.MediaTree); - var query = Query().Where(x => x.Path.StartsWith(Constants.System.RecycleBinMediaPathPrefix)); + scope.ReadLock(Cms.Core.Constants.Locks.MediaTree); + var query = Query().Where(x => x.Path.StartsWith(Cms.Core.Constants.System.RecycleBinMediaPathPrefix)); return _mediaRepository.GetPage(query, pageIndex, pageSize, out totalRecords, filter, ordering); } } @@ -651,7 +653,7 @@ namespace Umbraco.Core.Services.Implement /// The to save /// Id of the User saving the Media /// Optional boolean indicating whether or not to raise events. - public Attempt Save(IMedia media, int userId = Constants.Security.SuperUserId, bool raiseEvents = true) + public Attempt Save(IMedia media, int userId = Cms.Core.Constants.Security.SuperUserId, bool raiseEvents = true) { var evtMsgs = EventMessagesFactory.Get(); @@ -673,7 +675,7 @@ namespace Umbraco.Core.Services.Implement throw new InvalidOperationException("Name cannot be more than 255 characters in length."); throw new InvalidOperationException("Name cannot be more than 255 characters in length."); } - scope.WriteLock(Constants.Locks.MediaTree); + scope.WriteLock(Cms.Core.Constants.Locks.MediaTree); if (media.HasIdentity == false) media.CreatorId = userId; @@ -699,7 +701,7 @@ namespace Umbraco.Core.Services.Implement /// Collection of to save /// Id of the User saving the Media /// Optional boolean indicating whether or not to raise events. - public Attempt Save(IEnumerable medias, int userId = Constants.Security.SuperUserId, bool raiseEvents = true) + public Attempt Save(IEnumerable medias, int userId = Cms.Core.Constants.Security.SuperUserId, bool raiseEvents = true) { var evtMsgs = EventMessagesFactory.Get(); var mediasA = medias.ToArray(); @@ -715,7 +717,7 @@ namespace Umbraco.Core.Services.Implement var treeChanges = mediasA.Select(x => new TreeChange(x, TreeChangeTypes.RefreshNode)); - scope.WriteLock(Constants.Locks.MediaTree); + scope.WriteLock(Cms.Core.Constants.Locks.MediaTree); foreach (var media in mediasA) { if (media.HasIdentity == false) @@ -729,7 +731,7 @@ namespace Umbraco.Core.Services.Implement scope.Events.Dispatch(Saved, this, saveEventArgs); } scope.Events.Dispatch(TreeChanged, this, treeChanges.ToEventArgs()); - Audit(AuditType.Save, userId == -1 ? 0 : userId, Constants.System.Root, "Bulk save media"); + Audit(AuditType.Save, userId == -1 ? 0 : userId, Cms.Core.Constants.System.Root, "Bulk save media"); scope.Complete(); } @@ -746,7 +748,7 @@ namespace Umbraco.Core.Services.Implement /// /// The to delete /// Id of the User deleting the Media - public Attempt Delete(IMedia media, int userId = Constants.Security.SuperUserId) + public Attempt Delete(IMedia media, int userId = Cms.Core.Constants.Security.SuperUserId) { var evtMsgs = EventMessagesFactory.Get(); @@ -758,7 +760,7 @@ namespace Umbraco.Core.Services.Implement return OperationResult.Attempt.Cancel(evtMsgs); } - scope.WriteLock(Constants.Locks.MediaTree); + scope.WriteLock(Cms.Core.Constants.Locks.MediaTree); DeleteLocked(scope, media); @@ -807,7 +809,7 @@ namespace Umbraco.Core.Services.Implement /// Id of the object to delete versions from /// Latest version date /// Optional Id of the User deleting versions of a Media object - public void DeleteVersions(int id, DateTime versionDate, int userId = Constants.Security.SuperUserId) + public void DeleteVersions(int id, DateTime versionDate, int userId = Cms.Core.Constants.Security.SuperUserId) { using (var scope = ScopeProvider.CreateScope()) { @@ -831,19 +833,19 @@ namespace Umbraco.Core.Services.Implement } } - private void DeleteVersions(IScope scope, bool wlock, int id, DateTime versionDate, int userId = Constants.Security.SuperUserId) + private void DeleteVersions(IScope scope, bool wlock, int id, DateTime versionDate, int userId = Cms.Core.Constants.Security.SuperUserId) { var args = new DeleteRevisionsEventArgs(id, dateToRetain: versionDate); if (scope.Events.DispatchCancelable(DeletingVersions, this, args)) return; if (wlock) - scope.WriteLock(Constants.Locks.MediaTree); + scope.WriteLock(Cms.Core.Constants.Locks.MediaTree); _mediaRepository.DeleteVersions(id, versionDate); args.CanCancel = false; scope.Events.Dispatch(DeletedVersions, this, args); - Audit(AuditType.Delete, userId, Constants.System.Root, "Delete Media by version date"); + Audit(AuditType.Delete, userId, Cms.Core.Constants.System.Root, "Delete Media by version date"); } /// @@ -854,7 +856,7 @@ namespace Umbraco.Core.Services.Implement /// Id of the version to delete /// Boolean indicating whether to delete versions prior to the versionId /// Optional Id of the User deleting versions of a Media object - public void DeleteVersion(int id, int versionId, bool deletePriorVersions, int userId = Constants.Security.SuperUserId) + public void DeleteVersion(int id, int versionId, bool deletePriorVersions, int userId = Cms.Core.Constants.Security.SuperUserId) { using (var scope = ScopeProvider.CreateScope()) { @@ -872,14 +874,14 @@ namespace Umbraco.Core.Services.Implement } else { - scope.WriteLock(Constants.Locks.MediaTree); + scope.WriteLock(Cms.Core.Constants.Locks.MediaTree); } _mediaRepository.DeleteVersion(versionId); args.CanCancel = false; scope.Events.Dispatch(DeletedVersions, this, args); - Audit(AuditType.Delete, userId, Constants.System.Root, "Delete Media by version"); + Audit(AuditType.Delete, userId, Cms.Core.Constants.System.Root, "Delete Media by version"); scope.Complete(); } @@ -894,21 +896,21 @@ namespace Umbraco.Core.Services.Implement /// /// The to delete /// Id of the User deleting the Media - public Attempt MoveToRecycleBin(IMedia media, int userId = Constants.Security.SuperUserId) + public Attempt MoveToRecycleBin(IMedia media, int userId = Cms.Core.Constants.Security.SuperUserId) { var evtMsgs = EventMessagesFactory.Get(); var moves = new List<(IMedia, string)>(); using (var scope = ScopeProvider.CreateScope()) { - scope.WriteLock(Constants.Locks.MediaTree); + scope.WriteLock(Cms.Core.Constants.Locks.MediaTree); // TODO: missing 7.6 "ensure valid path" thing here? // but then should be in PerformMoveLocked on every moved item? var originalPath = media.Path; - var moveEventInfo = new MoveEventInfo(media, originalPath, Constants.System.RecycleBinMedia); + var moveEventInfo = new MoveEventInfo(media, originalPath, Cms.Core.Constants.System.RecycleBinMedia); var moveEventArgs = new MoveEventArgs(true, evtMsgs, moveEventInfo); if (scope.Events.DispatchCancelable(Trashing, this, moveEventArgs, nameof(Trashing))) { @@ -916,7 +918,7 @@ namespace Umbraco.Core.Services.Implement return OperationResult.Attempt.Cancel(evtMsgs); } - PerformMoveLocked(media, Constants.System.RecycleBinMedia, null, userId, moves, true); + PerformMoveLocked(media, Cms.Core.Constants.System.RecycleBinMedia, null, userId, moves, true); scope.Events.Dispatch(TreeChanged, this, new TreeChange(media, TreeChangeTypes.RefreshBranch).ToEventArgs()); var moveInfo = moves.Select(x => new MoveEventInfo(x.Item1, x.Item2, x.Item1.ParentId)) @@ -938,12 +940,12 @@ namespace Umbraco.Core.Services.Implement /// The to move /// Id of the Media's new Parent /// Id of the User moving the Media - public Attempt Move(IMedia media, int parentId, int userId = Constants.Security.SuperUserId) + public Attempt Move(IMedia media, int parentId, int userId = Cms.Core.Constants.Security.SuperUserId) { var evtMsgs = EventMessagesFactory.Get(); // if moving to the recycle bin then use the proper method - if (parentId == Constants.System.RecycleBinMedia) + if (parentId == Cms.Core.Constants.System.RecycleBinMedia) { MoveToRecycleBin(media, userId); return OperationResult.Attempt.Succeed(evtMsgs); @@ -953,10 +955,10 @@ namespace Umbraco.Core.Services.Implement using (var scope = ScopeProvider.CreateScope()) { - scope.WriteLock(Constants.Locks.MediaTree); + scope.WriteLock(Cms.Core.Constants.Locks.MediaTree); - var parent = parentId == Constants.System.Root ? null : GetById(parentId); - if (parentId != Constants.System.Root && (parent == null || parent.Trashed)) + var parent = parentId == Cms.Core.Constants.System.Root ? null : GetById(parentId); + if (parentId != Cms.Core.Constants.System.Root && (parent == null || parent.Trashed)) throw new InvalidOperationException("Parent does not exist or is trashed."); // causes rollback var moveEventInfo = new MoveEventInfo(media, media.Path, parentId); @@ -1012,7 +1014,7 @@ namespace Umbraco.Core.Services.Implement // if uow is not immediate, content.Path will be updated only when the UOW commits, // and because we want it now, we have to calculate it by ourselves //paths[media.Id] = media.Path; - paths[media.Id] = (parent == null ? (parentId == Constants.System.RecycleBinMedia ? "-1,-21" : Constants.System.RootString) : parent.Path) + "," + media.Id; + paths[media.Id] = (parent == null ? (parentId == Cms.Core.Constants.System.RecycleBinMedia ? "-1,-21" : Cms.Core.Constants.System.RootString) : parent.Path) + "," + media.Id; const int pageSize = 500; var query = GetPagedDescendantQuery(originalPath); @@ -1046,15 +1048,15 @@ namespace Umbraco.Core.Services.Implement /// Empties the Recycle Bin by deleting all that resides in the bin /// /// Optional Id of the User emptying the Recycle Bin - public OperationResult EmptyRecycleBin(int userId = Constants.Security.SuperUserId) + public OperationResult EmptyRecycleBin(int userId = Cms.Core.Constants.Security.SuperUserId) { - var nodeObjectType = Constants.ObjectTypes.Media; + var nodeObjectType = Cms.Core.Constants.ObjectTypes.Media; var deleted = new List(); var evtMsgs = EventMessagesFactory.Get(); // TODO: and then? using (var scope = ScopeProvider.CreateScope()) { - scope.WriteLock(Constants.Locks.MediaTree); + scope.WriteLock(Cms.Core.Constants.Locks.MediaTree); // no idea what those events are for, keep a simplified version @@ -1069,7 +1071,7 @@ namespace Umbraco.Core.Services.Implement return OperationResult.Cancel(evtMsgs); } // emptying the recycle bin means deleting whatever is in there - do it properly! - var query = Query().Where(x => x.ParentId == Constants.System.RecycleBinMedia); + var query = Query().Where(x => x.ParentId == Cms.Core.Constants.System.RecycleBinMedia); var medias = _mediaRepository.Get(query).ToArray(); foreach (var media in medias) { @@ -1079,7 +1081,7 @@ namespace Umbraco.Core.Services.Implement args.CanCancel = false; scope.Events.Dispatch(EmptiedRecycleBin, this, args); scope.Events.Dispatch(TreeChanged, this, deleted.Select(x => new TreeChange(x, TreeChangeTypes.Remove)).ToEventArgs()); - Audit(AuditType.Delete, userId, Constants.System.RecycleBinMedia, "Empty Media recycle bin"); + Audit(AuditType.Delete, userId, Cms.Core.Constants.System.RecycleBinMedia, "Empty Media recycle bin"); scope.Complete(); } @@ -1098,7 +1100,7 @@ namespace Umbraco.Core.Services.Implement /// /// /// True if sorting succeeded, otherwise False - public bool Sort(IEnumerable items, int userId = Constants.Security.SuperUserId, bool raiseEvents = true) + public bool Sort(IEnumerable items, int userId = Cms.Core.Constants.Security.SuperUserId, bool raiseEvents = true) { var itemsA = items.ToArray(); if (itemsA.Length == 0) return true; @@ -1114,7 +1116,7 @@ namespace Umbraco.Core.Services.Implement var saved = new List(); - scope.WriteLock(Constants.Locks.MediaTree); + scope.WriteLock(Cms.Core.Constants.Locks.MediaTree); var sortOrder = 0; foreach (var media in itemsA) @@ -1152,14 +1154,14 @@ namespace Umbraco.Core.Services.Implement { using (var scope = ScopeProvider.CreateScope(autoComplete: true)) { - scope.WriteLock(Constants.Locks.MediaTree); + scope.WriteLock(Cms.Core.Constants.Locks.MediaTree); var report = _mediaRepository.CheckDataIntegrity(options); if (report.FixedIssues.Count > 0) { //The event args needs a content item so we'll make a fake one with enough properties to not cause a null ref - var root = new Models.Media("root", -1, new MediaType(_shortStringHelper, -1)) { Id = -1, Key = Guid.Empty }; + var root = new Core.Models.Media("root", -1, new MediaType(_shortStringHelper, -1)) { Id = -1, Key = Guid.Empty }; scope.Events.Dispatch(TreeChanged, this, new TreeChange.EventArgs(new TreeChange(root, TreeChangeTypes.RefreshAll))); } @@ -1293,7 +1295,7 @@ namespace Umbraco.Core.Services.Implement /// /// Id of the /// Optional id of the user deleting the media - public void DeleteMediaOfTypes(IEnumerable mediaTypeIds, int userId = Constants.Security.SuperUserId) + public void DeleteMediaOfTypes(IEnumerable mediaTypeIds, int userId = Cms.Core.Constants.Security.SuperUserId) { // TODO: This currently this is called from the ContentTypeService but that needs to change, // if we are deleting a content type, we should just delete the data and do this operation slightly differently. @@ -1308,7 +1310,7 @@ namespace Umbraco.Core.Services.Implement using (var scope = ScopeProvider.CreateScope()) { - scope.WriteLock(Constants.Locks.MediaTree); + scope.WriteLock(Cms.Core.Constants.Locks.MediaTree); var query = Query().WhereIn(x => x.ContentTypeId, mediaTypeIdsA); var medias = _mediaRepository.Get(query).ToArray(); @@ -1330,7 +1332,7 @@ namespace Umbraco.Core.Services.Implement foreach (var child in children.Where(x => mediaTypeIdsA.Contains(x.ContentTypeId) == false)) { // see MoveToRecycleBin - PerformMoveLocked(child, Constants.System.RecycleBinMedia, null, userId, moves, true); + PerformMoveLocked(child, Cms.Core.Constants.System.RecycleBinMedia, null, userId, moves, true); changes.Add(new TreeChange(media, TreeChangeTypes.RefreshBranch)); } @@ -1346,7 +1348,7 @@ namespace Umbraco.Core.Services.Implement scope.Events.Dispatch(Trashed, this, new MoveEventArgs(false, moveInfos), nameof(Trashed)); scope.Events.Dispatch(TreeChanged, this, changes.ToEventArgs()); - Audit(AuditType.Delete, userId, Constants.System.Root, $"Delete Media of types {string.Join(",", mediaTypeIdsA)}"); + Audit(AuditType.Delete, userId, Cms.Core.Constants.System.Root, $"Delete Media of types {string.Join(",", mediaTypeIdsA)}"); scope.Complete(); } @@ -1358,7 +1360,7 @@ namespace Umbraco.Core.Services.Implement /// This needs extra care and attention as its potentially a dangerous and extensive operation /// Id of the /// Optional id of the user deleting the media - public void DeleteMediaOfType(int mediaTypeId, int userId = Constants.Security.SuperUserId) + public void DeleteMediaOfType(int mediaTypeId, int userId = Cms.Core.Constants.Security.SuperUserId) { DeleteMediaOfTypes(new[] { mediaTypeId }, userId); } @@ -1370,7 +1372,7 @@ namespace Umbraco.Core.Services.Implement using (var scope = ScopeProvider.CreateScope()) { - scope.ReadLock(Constants.Locks.MediaTypes); + scope.ReadLock(Cms.Core.Constants.Locks.MediaTypes); var query = Query().Where(x => x.Alias == mediaTypeAlias); var mediaType = _mediaTypeRepository.Get(query).FirstOrDefault(); diff --git a/src/Umbraco.Infrastructure/Services/Implement/MediaTypeService.cs b/src/Umbraco.Infrastructure/Services/Implement/MediaTypeService.cs index 73ce6822a1..f95f7dcb34 100644 --- a/src/Umbraco.Infrastructure/Services/Implement/MediaTypeService.cs +++ b/src/Umbraco.Infrastructure/Services/Implement/MediaTypeService.cs @@ -1,12 +1,12 @@ using System; using System.Collections.Generic; using Microsoft.Extensions.Logging; -using Umbraco.Core.Events; -using Umbraco.Core.Models; -using Umbraco.Core.Persistence.Repositories; -using Umbraco.Core.Scoping; +using Umbraco.Cms.Core.Events; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Core.Persistence.Repositories; +using Umbraco.Cms.Core.Scoping; -namespace Umbraco.Core.Services.Implement +namespace Umbraco.Cms.Core.Services.Implement { public class MediaTypeService : ContentTypeServiceBase, IMediaTypeService { @@ -21,12 +21,12 @@ namespace Umbraco.Core.Services.Implement protected override IMediaTypeService This => this; // beware! order is important to avoid deadlocks - protected override int[] ReadLockIds { get; } = { Constants.Locks.MediaTypes }; - protected override int[] WriteLockIds { get; } = { Constants.Locks.MediaTree, Constants.Locks.MediaTypes }; + protected override int[] ReadLockIds { get; } = { Cms.Core.Constants.Locks.MediaTypes }; + protected override int[] WriteLockIds { get; } = { Cms.Core.Constants.Locks.MediaTree, Cms.Core.Constants.Locks.MediaTypes }; private IMediaService MediaService { get; } - protected override Guid ContainedObjectType => Constants.ObjectTypes.MediaType; + protected override Guid ContainedObjectType => Cms.Core.Constants.ObjectTypes.MediaType; protected override void DeleteItemsOfTypes(IEnumerable typeIds) { diff --git a/src/Umbraco.Infrastructure/Services/Implement/MemberGroupService.cs b/src/Umbraco.Infrastructure/Services/Implement/MemberGroupService.cs index 9947e50661..5e6138980a 100644 --- a/src/Umbraco.Infrastructure/Services/Implement/MemberGroupService.cs +++ b/src/Umbraco.Infrastructure/Services/Implement/MemberGroupService.cs @@ -2,13 +2,13 @@ using System.Collections.Generic; using System.Linq; using Microsoft.Extensions.Logging; -using Umbraco.Core.Events; -using Umbraco.Core.Models; -using Umbraco.Core.Persistence.Repositories; -using Umbraco.Core.Persistence.Repositories.Implement; -using Umbraco.Core.Scoping; +using Umbraco.Cms.Core.Events; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Core.Persistence.Repositories; +using Umbraco.Cms.Core.Scoping; +using Umbraco.Cms.Infrastructure.Persistence.Repositories.Implement; -namespace Umbraco.Core.Services.Implement +namespace Umbraco.Cms.Core.Services.Implement { public class MemberGroupService : RepositoryService, IMemberGroupService { diff --git a/src/Umbraco.Infrastructure/Services/Implement/MemberService.cs b/src/Umbraco.Infrastructure/Services/Implement/MemberService.cs index 4f3c77efb4..96ba494790 100644 --- a/src/Umbraco.Infrastructure/Services/Implement/MemberService.cs +++ b/src/Umbraco.Infrastructure/Services/Implement/MemberService.cs @@ -1,18 +1,17 @@ -using System; +using System; using System.Collections.Generic; using System.Linq; using Microsoft.Extensions.Logging; -using Umbraco.Core; -using Umbraco.Core.Events; -using Umbraco.Core.Models; -using Umbraco.Core.Models.Membership; -using Umbraco.Core.Persistence.Querying; -using Umbraco.Core.Persistence.Repositories; -using Umbraco.Core.Scoping; -using Umbraco.Core.Services; -using Umbraco.Core.Services.Implement; +using Umbraco.Cms.Core.Events; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Core.Models.Membership; +using Umbraco.Cms.Core.Persistence.Querying; +using Umbraco.Cms.Core.Persistence.Repositories; +using Umbraco.Cms.Core.Scoping; +using Umbraco.Cms.Infrastructure.Persistence.Querying; +using Umbraco.Extensions; -namespace Umbraco.Infrastructure.Services.Implement +namespace Umbraco.Cms.Core.Services.Implement { /// /// Represents the MemberService. @@ -120,10 +119,7 @@ namespace Umbraco.Infrastructure.Services.Implement throw new ArgumentException("No member type with that alias.", nameof(memberTypeAlias)); } - var member = new Member(name, email.ToLower().Trim(), username, memberType); - using IScope scope = ScopeProvider.CreateScope(); - CreateMember(scope, member, 0, false); - scope.Complete(); + var member = new Member(name, email.ToLower().Trim(), username, memberType, 0); return member; } @@ -143,12 +139,7 @@ namespace Umbraco.Infrastructure.Services.Implement { if (memberType == null) throw new ArgumentNullException(nameof(memberType)); - var member = new Member(name, email.ToLower().Trim(), username, memberType); - using (var scope = ScopeProvider.CreateScope()) - { - CreateMember(scope, member, 0, false); - scope.Complete(); - } + var member = new Member(name, email.ToLower().Trim(), username, memberType, 0); return member; } @@ -225,10 +216,9 @@ namespace Umbraco.Infrastructure.Services.Implement if (memberType == null) throw new ArgumentException("No member type with that alias.", nameof(memberTypeAlias)); // causes rollback // causes rollback - var member = new Member(name, email.ToLower().Trim(), username, passwordValue, memberType, isApproved); - CreateMember(scope, member, -1, true); + var member = new Member(name, email.ToLower().Trim(), username, passwordValue, memberType, isApproved, -1); - scope.Complete(); + Save(member); return member; } } @@ -297,41 +287,13 @@ namespace Umbraco.Infrastructure.Services.Implement if (vrfy == null || vrfy.Id != memberType.Id) throw new ArgumentException($"Member type with alias {memberType.Alias} does not exist or is a different member type."); // causes rollback - var member = new Member(name, email.ToLower().Trim(), username, passwordValue, memberType, isApproved); + var member = new Member(name, email.ToLower().Trim(), username, passwordValue, memberType, isApproved, -1); - CreateMember(scope, member, -1, true); - scope.Complete(); + Save(member); return member; } } - private void CreateMember(IScope scope, Member member, int userId, bool withIdentity) - { - member.CreatorId = userId; - - if (withIdentity) - { - // if saving is cancelled, media remains without an identity - var saveEventArgs = new SaveEventArgs(member); - if (scope.Events.DispatchCancelable(Saving, this, saveEventArgs)) - { - return; - } - - _memberRepository.Save(member); - - saveEventArgs.CanCancel = false; - scope.Events.Dispatch(Saved, this, saveEventArgs); - } - - if (withIdentity == false) - { - return; - } - - Audit(AuditType.New, member.CreatorId, member.Id, $"Member '{member.Name}' was created with Id {member.Id}"); - } - #endregion #region Get, Has, Is, Exists... @@ -443,7 +405,7 @@ namespace Umbraco.Infrastructure.Services.Implement { using (var scope = ScopeProvider.CreateScope(autoComplete: true)) { - scope.ReadLock(Constants.Locks.MemberTree); + scope.ReadLock(Constants.Locks.MemberTree); return _memberRepository.GetByUsername(username); } } @@ -798,7 +760,7 @@ namespace Umbraco.Infrastructure.Services.Implement public void SetLastLogin(string username, DateTime date) { using (var scope = ScopeProvider.CreateScope()) - { + { _memberRepository.SetLastLogin(username, date); scope.Complete(); } diff --git a/src/Umbraco.Infrastructure/Services/Implement/MemberTypeService.cs b/src/Umbraco.Infrastructure/Services/Implement/MemberTypeService.cs index b3c443b9a4..9a1c909787 100644 --- a/src/Umbraco.Infrastructure/Services/Implement/MemberTypeService.cs +++ b/src/Umbraco.Infrastructure/Services/Implement/MemberTypeService.cs @@ -1,12 +1,13 @@ using System; using System.Collections.Generic; using Microsoft.Extensions.Logging; -using Umbraco.Core.Events; -using Umbraco.Core.Models; -using Umbraco.Core.Persistence.Repositories; -using Umbraco.Core.Scoping; +using Umbraco.Cms.Core.Events; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Core.Persistence.Repositories; +using Umbraco.Cms.Core.Scoping; +using Umbraco.Extensions; -namespace Umbraco.Core.Services.Implement +namespace Umbraco.Cms.Core.Services.Implement { public class MemberTypeService : ContentTypeServiceBase, IMemberTypeService { @@ -23,12 +24,12 @@ namespace Umbraco.Core.Services.Implement protected override IMemberTypeService This => this; // beware! order is important to avoid deadlocks - protected override int[] ReadLockIds { get; } = { Constants.Locks.MemberTypes }; - protected override int[] WriteLockIds { get; } = { Constants.Locks.MemberTree, Constants.Locks.MemberTypes }; + protected override int[] ReadLockIds { get; } = { Cms.Core.Constants.Locks.MemberTypes }; + protected override int[] WriteLockIds { get; } = { Cms.Core.Constants.Locks.MemberTree, Cms.Core.Constants.Locks.MemberTypes }; private IMemberService MemberService { get; } - protected override Guid ContainedObjectType => Constants.ObjectTypes.MemberType; + protected override Guid ContainedObjectType => Cms.Core.Constants.ObjectTypes.MemberType; protected override void DeleteItemsOfTypes(IEnumerable typeIds) { diff --git a/src/Umbraco.Infrastructure/Services/Implement/NotificationService.cs b/src/Umbraco.Infrastructure/Services/Implement/NotificationService.cs index 653a878ab9..e91aa8ce33 100644 --- a/src/Umbraco.Infrastructure/Services/Implement/NotificationService.cs +++ b/src/Umbraco.Infrastructure/Services/Implement/NotificationService.cs @@ -5,18 +5,19 @@ using System.Globalization; using System.Linq; using System.Text; using System.Threading; -using Microsoft.Extensions.Options; using Microsoft.Extensions.Logging; -using Umbraco.Core.Configuration.Models; -using Umbraco.Core.IO; -using Umbraco.Core.Models; -using Umbraco.Core.Models.Entities; -using Umbraco.Core.Models.Membership; -using Umbraco.Core.Persistence.Repositories; -using Umbraco.Core.Scoping; -using Umbraco.Core.Mail; +using Microsoft.Extensions.Options; +using Umbraco.Cms.Core.Configuration.Models; +using Umbraco.Cms.Core.IO; +using Umbraco.Cms.Core.Mail; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Core.Models.Entities; +using Umbraco.Cms.Core.Models.Membership; +using Umbraco.Cms.Core.Persistence.Repositories; +using Umbraco.Cms.Core.Scoping; +using Umbraco.Extensions; -namespace Umbraco.Core.Services.Implement +namespace Umbraco.Cms.Core.Services.Implement { public class NotificationService : INotificationService { @@ -87,13 +88,13 @@ namespace Umbraco.Core.Services.Implement var prevVersionDictionary = new Dictionary(); // see notes above - var id = Constants.Security.SuperUserId; + var id = Cms.Core.Constants.Security.SuperUserId; const int pagesz = 400; // load batches of 400 users do { // users are returned ordered by id, notifications are returned ordered by user id var users = _userService.GetNextUsers(id, pagesz).Where(x => x.IsApproved).ToList(); - var notifications = GetUsersNotifications(users.Select(x => x.Id), action, Enumerable.Empty(), Constants.ObjectTypes.Document).ToList(); + var notifications = GetUsersNotifications(users.Select(x => x.Id), action, Enumerable.Empty(), Cms.Core.Constants.ObjectTypes.Document).ToList(); if (notifications.Count == 0) break; var i = 0; diff --git a/src/Umbraco.Infrastructure/Services/Implement/PackagingService.cs b/src/Umbraco.Infrastructure/Services/Implement/PackagingService.cs index a286a1cf50..4a6e1eb8e3 100644 --- a/src/Umbraco.Infrastructure/Services/Implement/PackagingService.cs +++ b/src/Umbraco.Infrastructure/Services/Implement/PackagingService.cs @@ -4,14 +4,15 @@ using System.IO; using System.Linq; using System.Net.Http; using System.Threading.Tasks; -using Semver; -using Umbraco.Core.Events; -using Umbraco.Core.Hosting; -using Umbraco.Core.Models; -using Umbraco.Core.Models.Packaging; -using Umbraco.Core.Packaging; +using Umbraco.Cms.Core.Events; +using Umbraco.Cms.Core.Hosting; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Core.Models.Packaging; +using Umbraco.Cms.Core.Packaging; +using Umbraco.Cms.Core.Semver; +using Umbraco.Extensions; -namespace Umbraco.Core.Services.Implement +namespace Umbraco.Cms.Core.Services.Implement { /// /// Represents the Packaging Service, which provides import/export functionality for the Core models of the API @@ -46,7 +47,7 @@ namespace Umbraco.Core.Services.Implement public async Task FetchPackageFileAsync(Guid packageId, Version umbracoVersion, int userId) { //includeHidden = true because we don't care if it's hidden we want to get the file regardless - var url = $"{Constants.PackageRepository.RestApiBaseUrl}/{packageId}?version={umbracoVersion.ToString(3)}&includeHidden=true&asFile=true"; + var url = $"{Cms.Core.Constants.PackageRepository.RestApiBaseUrl}/{packageId}?version={umbracoVersion.ToString(3)}&includeHidden=true&asFile=true"; byte[] bytes; try { @@ -64,7 +65,7 @@ namespace Umbraco.Core.Services.Implement //successful if (bytes.Length > 0) { - var packagePath = _hostingEnvironment.MapPathContentRoot(Constants.SystemDirectories.Packages); + var packagePath = _hostingEnvironment.MapPathContentRoot(Cms.Core.Constants.SystemDirectories.Packages); // Check for package directory if (Directory.Exists(packagePath) == false) @@ -79,7 +80,7 @@ namespace Umbraco.Core.Services.Implement } } - _auditService.Add(AuditType.PackagerInstall, userId, -1, "Package", $"Package {packageId} fetched from {Constants.PackageRepository.DefaultRepositoryId}"); + _auditService.Add(AuditType.PackagerInstall, userId, -1, "Package", $"Package {packageId} fetched from {Cms.Core.Constants.PackageRepository.DefaultRepositoryId}"); return null; } @@ -89,7 +90,7 @@ namespace Umbraco.Core.Services.Implement public CompiledPackage GetCompiledPackageInfo(FileInfo packageFile) => _packageInstallation.ReadPackage(packageFile); - public IEnumerable InstallCompiledPackageFiles(PackageDefinition packageDefinition, FileInfo packageFile, int userId = Constants.Security.SuperUserId) + public IEnumerable InstallCompiledPackageFiles(PackageDefinition packageDefinition, FileInfo packageFile, int userId = Cms.Core.Constants.Security.SuperUserId) { if (packageDefinition == null) throw new ArgumentNullException(nameof(packageDefinition)); if (packageDefinition.Id == default) throw new ArgumentException("The package definition has not been persisted"); @@ -107,7 +108,7 @@ namespace Umbraco.Core.Services.Implement return files; } - public InstallationSummary InstallCompiledPackageData(PackageDefinition packageDefinition, FileInfo packageFile, int userId = Constants.Security.SuperUserId) + public InstallationSummary InstallCompiledPackageData(PackageDefinition packageDefinition, FileInfo packageFile, int userId = Cms.Core.Constants.Security.SuperUserId) { if (packageDefinition == null) throw new ArgumentNullException(nameof(packageDefinition)); if (packageDefinition.Id == default) throw new ArgumentException("The package definition has not been persisted"); @@ -130,7 +131,7 @@ namespace Umbraco.Core.Services.Implement return summary; } - public UninstallationSummary UninstallPackage(string packageName, int userId = Constants.Security.SuperUserId) + public UninstallationSummary UninstallPackage(string packageName, int userId = Cms.Core.Constants.Security.SuperUserId) { //this is ordered by descending version var allPackageVersions = GetInstalledPackageByName(packageName)?.ToList(); @@ -176,7 +177,7 @@ namespace Umbraco.Core.Services.Implement #region Created/Installed Package Repositories - public void DeleteCreatedPackage(int id, int userId = Constants.Security.SuperUserId) + public void DeleteCreatedPackage(int id, int userId = Cms.Core.Constants.Security.SuperUserId) { var package = GetCreatedPackageById(id); if (package == null) return; @@ -225,7 +226,7 @@ namespace Umbraco.Core.Services.Implement public bool SaveInstalledPackage(PackageDefinition definition) => _installedPackages.SavePackage(definition); - public void DeleteInstalledPackage(int packageId, int userId = Constants.Security.SuperUserId) + public void DeleteInstalledPackage(int packageId, int userId = Cms.Core.Constants.Security.SuperUserId) { var package = GetInstalledPackageById(packageId); if (package == null) return; diff --git a/src/Umbraco.Infrastructure/Services/Implement/PropertyValidationService.cs b/src/Umbraco.Infrastructure/Services/Implement/PropertyValidationService.cs index c08c1322d3..e196f2d70d 100644 --- a/src/Umbraco.Infrastructure/Services/Implement/PropertyValidationService.cs +++ b/src/Umbraco.Infrastructure/Services/Implement/PropertyValidationService.cs @@ -1,12 +1,12 @@ -using System.Linq; -using System; +using System; using System.Collections.Generic; using System.ComponentModel.DataAnnotations; -using Umbraco.Core.Composing; -using Umbraco.Core.Models; -using Umbraco.Core.PropertyEditors; +using System.Linq; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Core.PropertyEditors; +using Umbraco.Extensions; -namespace Umbraco.Core.Services +namespace Umbraco.Cms.Core.Services.Implement { public class PropertyValidationService : IPropertyValidationService { diff --git a/src/Umbraco.Infrastructure/Services/Implement/PublicAccessService.cs b/src/Umbraco.Infrastructure/Services/Implement/PublicAccessService.cs index 2143d638fe..4c8615f442 100644 --- a/src/Umbraco.Infrastructure/Services/Implement/PublicAccessService.cs +++ b/src/Umbraco.Infrastructure/Services/Implement/PublicAccessService.cs @@ -2,12 +2,13 @@ using System.Collections.Generic; using System.Linq; using Microsoft.Extensions.Logging; -using Umbraco.Core.Events; -using Umbraco.Core.Models; -using Umbraco.Core.Persistence.Repositories; -using Umbraco.Core.Scoping; +using Umbraco.Cms.Core.Events; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Core.Persistence.Repositories; +using Umbraco.Cms.Core.Scoping; +using Umbraco.Extensions; -namespace Umbraco.Core.Services.Implement +namespace Umbraco.Cms.Core.Services.Implement { public class PublicAccessService : ScopeRepositoryService, IPublicAccessService { diff --git a/src/Umbraco.Infrastructure/Services/Implement/RedirectUrlService.cs b/src/Umbraco.Infrastructure/Services/Implement/RedirectUrlService.cs index 640852b69e..d2ea10df49 100644 --- a/src/Umbraco.Infrastructure/Services/Implement/RedirectUrlService.cs +++ b/src/Umbraco.Infrastructure/Services/Implement/RedirectUrlService.cs @@ -1,12 +1,12 @@ using System; using System.Collections.Generic; using Microsoft.Extensions.Logging; -using Umbraco.Core.Events; -using Umbraco.Core.Models; -using Umbraco.Core.Persistence.Repositories; -using Umbraco.Core.Scoping; +using Umbraco.Cms.Core.Events; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Core.Persistence.Repositories; +using Umbraco.Cms.Core.Scoping; -namespace Umbraco.Core.Services.Implement +namespace Umbraco.Cms.Core.Services.Implement { internal class RedirectUrlService : ScopeRepositoryService, IRedirectUrlService { diff --git a/src/Umbraco.Infrastructure/Services/Implement/RelationService.cs b/src/Umbraco.Infrastructure/Services/Implement/RelationService.cs index f00478b668..b83d3f286c 100644 --- a/src/Umbraco.Infrastructure/Services/Implement/RelationService.cs +++ b/src/Umbraco.Infrastructure/Services/Implement/RelationService.cs @@ -2,13 +2,14 @@ using System.Collections.Generic; using System.Linq; using Microsoft.Extensions.Logging; -using Umbraco.Core.Events; -using Umbraco.Core.Models; -using Umbraco.Core.Models.Entities; -using Umbraco.Core.Persistence.Repositories; -using Umbraco.Core.Scoping; +using Umbraco.Cms.Core.Events; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Core.Models.Entities; +using Umbraco.Cms.Core.Persistence.Repositories; +using Umbraco.Cms.Core.Scoping; +using Umbraco.Extensions; -namespace Umbraco.Core.Services.Implement +namespace Umbraco.Cms.Core.Services.Implement { public class RelationService : ScopeRepositoryService, IRelationService { @@ -490,7 +491,7 @@ namespace Umbraco.Core.Services.Implement } _relationTypeRepository.Save(relationType); - Audit(AuditType.Save, Constants.Security.SuperUserId, relationType.Id, $"Saved relation type: {relationType.Name}"); + Audit(AuditType.Save, Cms.Core.Constants.Security.SuperUserId, relationType.Id, $"Saved relation type: {relationType.Name}"); scope.Complete(); saveEventArgs.CanCancel = false; scope.Events.Dispatch(SavedRelationType, this, saveEventArgs); diff --git a/src/Umbraco.Infrastructure/Services/Implement/RepositoryService.cs b/src/Umbraco.Infrastructure/Services/Implement/RepositoryService.cs index 3be66fea27..b1e60b73f4 100644 --- a/src/Umbraco.Infrastructure/Services/Implement/RepositoryService.cs +++ b/src/Umbraco.Infrastructure/Services/Implement/RepositoryService.cs @@ -1,10 +1,10 @@ using System; using Microsoft.Extensions.Logging; -using Umbraco.Core.Events; -using Umbraco.Core.Persistence.Querying; -using Umbraco.Core.Scoping; +using Umbraco.Cms.Core.Events; +using Umbraco.Cms.Core.Persistence.Querying; +using Umbraco.Cms.Core.Scoping; -namespace Umbraco.Core.Services.Implement +namespace Umbraco.Cms.Core.Services.Implement { /// /// Represents a service that works on top of repositories. diff --git a/src/Umbraco.Infrastructure/Services/Implement/ScopeRepositoryService.cs b/src/Umbraco.Infrastructure/Services/Implement/ScopeRepositoryService.cs index 9e1cf94b19..ca8e074b04 100644 --- a/src/Umbraco.Infrastructure/Services/Implement/ScopeRepositoryService.cs +++ b/src/Umbraco.Infrastructure/Services/Implement/ScopeRepositoryService.cs @@ -1,8 +1,8 @@ using Microsoft.Extensions.Logging; -using Umbraco.Core.Events; -using Umbraco.Core.Scoping; +using Umbraco.Cms.Core.Events; +using Umbraco.Cms.Core.Scoping; -namespace Umbraco.Core.Services.Implement +namespace Umbraco.Cms.Core.Services.Implement { // TODO: that one does not add anything = kill public abstract class ScopeRepositoryService : RepositoryService diff --git a/src/Umbraco.Infrastructure/Services/Implement/ServerRegistrationService.cs b/src/Umbraco.Infrastructure/Services/Implement/ServerRegistrationService.cs index 14197762c6..75466c2013 100644 --- a/src/Umbraco.Infrastructure/Services/Implement/ServerRegistrationService.cs +++ b/src/Umbraco.Infrastructure/Services/Implement/ServerRegistrationService.cs @@ -2,15 +2,16 @@ using System; using System.Collections.Generic; using System.Linq; using Microsoft.Extensions.Logging; -using Umbraco.Core.Events; -using Umbraco.Core.Hosting; -using Umbraco.Core.Models; -using Umbraco.Core.Persistence.Repositories; -using Umbraco.Core.Persistence.Repositories.Implement; -using Umbraco.Core.Scoping; -using Umbraco.Core.Sync; +using Umbraco.Cms.Core.Events; +using Umbraco.Cms.Core.Hosting; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Core.Persistence.Repositories; +using Umbraco.Cms.Core.Scoping; +using Umbraco.Cms.Core.Sync; +using Umbraco.Cms.Infrastructure.Persistence.Repositories.Implement; +using Umbraco.Extensions; -namespace Umbraco.Core.Services.Implement +namespace Umbraco.Cms.Core.Services.Implement { /// /// Manages server registrations in the database. @@ -47,7 +48,7 @@ namespace Umbraco.Core.Services.Implement var serverIdentity = GetCurrentServerIdentity(); using (var scope = ScopeProvider.CreateScope()) { - scope.WriteLock(Constants.Locks.Servers); + scope.WriteLock(Cms.Core.Constants.Locks.Servers); ((ServerRegistrationRepository) _serverRegistrationRepository).ClearCache(); // ensure we have up-to-date cache @@ -98,7 +99,7 @@ namespace Umbraco.Core.Services.Implement using (var scope = ScopeProvider.CreateScope()) { - scope.WriteLock(Constants.Locks.Servers); + scope.WriteLock(Cms.Core.Constants.Locks.Servers); ((ServerRegistrationRepository) _serverRegistrationRepository).ClearCache(); // ensure we have up-to-date cache // ensure we have up-to-date cache @@ -119,7 +120,7 @@ namespace Umbraco.Core.Services.Implement { using (var scope = ScopeProvider.CreateScope()) { - scope.WriteLock(Constants.Locks.Servers); + scope.WriteLock(Cms.Core.Constants.Locks.Servers); _serverRegistrationRepository.DeactiveStaleServers(staleTimeout); scope.Complete(); } @@ -138,7 +139,7 @@ namespace Umbraco.Core.Services.Implement { using (var scope = ScopeProvider.CreateScope(autoComplete: true)) { - scope.ReadLock(Constants.Locks.Servers); + scope.ReadLock(Cms.Core.Constants.Locks.Servers); if (refresh) ((ServerRegistrationRepository) _serverRegistrationRepository).ClearCache(); return _serverRegistrationRepository.GetMany().Where(x => x.IsActive).ToArray(); // fast, cached // fast, cached } diff --git a/src/Umbraco.Infrastructure/Services/Implement/TagService.cs b/src/Umbraco.Infrastructure/Services/Implement/TagService.cs index a5161b22d6..2d2cf082c6 100644 --- a/src/Umbraco.Infrastructure/Services/Implement/TagService.cs +++ b/src/Umbraco.Infrastructure/Services/Implement/TagService.cs @@ -1,12 +1,12 @@ using System; using System.Collections.Generic; using Microsoft.Extensions.Logging; -using Umbraco.Core.Events; -using Umbraco.Core.Models; -using Umbraco.Core.Persistence.Repositories; -using Umbraco.Core.Scoping; +using Umbraco.Cms.Core.Events; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Core.Persistence.Repositories; +using Umbraco.Cms.Core.Scoping; -namespace Umbraco.Core.Services.Implement +namespace Umbraco.Cms.Core.Services.Implement { /// /// Tag service to query for tags in the tags db table. The tags returned are only relevant for published content & saved media or members diff --git a/src/Umbraco.Infrastructure/Services/Implement/UserService.cs b/src/Umbraco.Infrastructure/Services/Implement/UserService.cs index cae3c95b92..751581e068 100644 --- a/src/Umbraco.Infrastructure/Services/Implement/UserService.cs +++ b/src/Umbraco.Infrastructure/Services/Implement/UserService.cs @@ -6,16 +6,17 @@ using System.Linq; using System.Linq.Expressions; using Microsoft.Extensions.Logging; using Microsoft.Extensions.Options; -using Umbraco.Core.Configuration; -using Umbraco.Core.Configuration.Models; -using Umbraco.Core.Events; -using Umbraco.Core.Models.Membership; -using Umbraco.Core.Persistence.Querying; -using Umbraco.Core.Persistence.Repositories; -using Umbraco.Core.Persistence.Repositories.Implement; -using Umbraco.Core.Scoping; +using Umbraco.Cms.Core.Configuration.Models; +using Umbraco.Cms.Core.Events; +using Umbraco.Cms.Core.Models.Membership; +using Umbraco.Cms.Core.Persistence.Querying; +using Umbraco.Cms.Core.Persistence.Repositories; +using Umbraco.Cms.Core.Scoping; +using Umbraco.Cms.Infrastructure.Persistence.Querying; +using Umbraco.Cms.Infrastructure.Persistence.Repositories.Implement; +using Umbraco.Extensions; -namespace Umbraco.Core.Services.Implement +namespace Umbraco.Cms.Core.Services.Implement { /// /// Represents the UserService, which is an easy access to operations involving , and eventually Backoffice Users. @@ -358,7 +359,7 @@ namespace Umbraco.Core.Services.Implement /// public string GetDefaultMemberType() { - return Constants.Security.WriterGroupAlias; + return Cms.Core.Constants.Security.WriterGroupAlias; } /// diff --git a/src/Umbraco.Infrastructure/Suspendable.cs b/src/Umbraco.Infrastructure/Suspendable.cs index 33677062f1..73798f8cf1 100644 --- a/src/Umbraco.Infrastructure/Suspendable.cs +++ b/src/Umbraco.Infrastructure/Suspendable.cs @@ -1,11 +1,10 @@ using Microsoft.Extensions.Logging; -using Umbraco.Core; -using Umbraco.Core.Cache; -using Umbraco.Examine; -using Umbraco.Web.Cache; -using Umbraco.Web.Search; +using Umbraco.Cms.Core; +using Umbraco.Cms.Core.Cache; +using Umbraco.Cms.Infrastructure.Examine; +using Umbraco.Cms.Infrastructure.Search; -namespace Umbraco.Web +namespace Umbraco.Cms.Infrastructure { internal static class Suspendable { diff --git a/src/Umbraco.Infrastructure/Sync/BatchedDatabaseServerMessenger.cs b/src/Umbraco.Infrastructure/Sync/BatchedDatabaseServerMessenger.cs index d1a9481f47..96bdeea82d 100644 --- a/src/Umbraco.Infrastructure/Sync/BatchedDatabaseServerMessenger.cs +++ b/src/Umbraco.Infrastructure/Sync/BatchedDatabaseServerMessenger.cs @@ -4,15 +4,18 @@ using System.Linq; using Microsoft.Extensions.Logging; using Microsoft.Extensions.Options; using Newtonsoft.Json; -using Umbraco.Core.Cache; -using Umbraco.Core.Configuration.Models; -using Umbraco.Core.Hosting; -using Umbraco.Core.Logging; -using Umbraco.Core.Persistence.Dtos; -using Umbraco.Core.Scoping; -using Umbraco.Web; +using Umbraco.Cms.Core.Cache; +using Umbraco.Cms.Core.Configuration.Models; +using Umbraco.Cms.Core.Hosting; +using Umbraco.Cms.Core.Logging; +using Umbraco.Cms.Core.Runtime; +using Umbraco.Cms.Core.Scoping; +using Umbraco.Cms.Core.Sync; +using Umbraco.Cms.Core.Web; +using Umbraco.Cms.Infrastructure.Persistence.Dtos; +using Umbraco.Extensions; -namespace Umbraco.Core.Sync +namespace Umbraco.Cms.Infrastructure.Sync { /// /// An implementation that works by storing messages in the database. diff --git a/src/Umbraco.Infrastructure/Sync/DatabaseServerMessenger.cs b/src/Umbraco.Infrastructure/Sync/DatabaseServerMessenger.cs index 0b1a8340a2..92bd732246 100644 --- a/src/Umbraco.Infrastructure/Sync/DatabaseServerMessenger.cs +++ b/src/Umbraco.Infrastructure/Sync/DatabaseServerMessenger.cs @@ -10,15 +10,19 @@ using Microsoft.Extensions.Options; using Newtonsoft.Json; using Newtonsoft.Json.Linq; using NPoco; -using Umbraco.Core.Cache; -using Umbraco.Core.Configuration.Models; -using Umbraco.Core.Hosting; -using Umbraco.Core.Logging; -using Umbraco.Core.Persistence; -using Umbraco.Core.Persistence.Dtos; -using Umbraco.Core.Scoping; +using Umbraco.Cms.Core; +using Umbraco.Cms.Core.Cache; +using Umbraco.Cms.Core.Configuration.Models; +using Umbraco.Cms.Core.Hosting; +using Umbraco.Cms.Core.Logging; +using Umbraco.Cms.Core.Runtime; +using Umbraco.Cms.Core.Scoping; +using Umbraco.Cms.Core.Sync; +using Umbraco.Cms.Infrastructure.Persistence; +using Umbraco.Cms.Infrastructure.Persistence.Dtos; +using Umbraco.Extensions; -namespace Umbraco.Core.Sync +namespace Umbraco.Cms.Infrastructure.Sync { /// /// An that works by storing messages in the database. diff --git a/src/Umbraco.Infrastructure/Sync/RefreshInstruction.cs b/src/Umbraco.Infrastructure/Sync/RefreshInstruction.cs index 3038f95e65..ec6ffd0ed8 100644 --- a/src/Umbraco.Infrastructure/Sync/RefreshInstruction.cs +++ b/src/Umbraco.Infrastructure/Sync/RefreshInstruction.cs @@ -2,9 +2,10 @@ using System.Collections.Generic; using System.Linq; using Newtonsoft.Json; -using Umbraco.Core.Cache; +using Umbraco.Cms.Core.Cache; +using Umbraco.Cms.Core.Sync; -namespace Umbraco.Core.Sync +namespace Umbraco.Cms.Infrastructure.Sync { [Serializable] public class RefreshInstruction @@ -64,7 +65,7 @@ namespace Umbraco.Core.Sync /// /// /// When the refresh method is we know how many Ids are being refreshed so we know the instruction - /// count which will be taken into account when we store this count in the database. + /// count which will be taken into account when we store this count in the database. /// private RefreshInstruction(ICacheRefresher refresher, RefreshMethodType refreshType, string json, int idCount = 1) : this(refresher, refreshType) diff --git a/src/Umbraco.Infrastructure/Sync/RefreshInstructionEnvelope.cs b/src/Umbraco.Infrastructure/Sync/RefreshInstructionEnvelope.cs index 9cd442da2d..6dc6fea279 100644 --- a/src/Umbraco.Infrastructure/Sync/RefreshInstructionEnvelope.cs +++ b/src/Umbraco.Infrastructure/Sync/RefreshInstructionEnvelope.cs @@ -1,7 +1,8 @@ using System.Collections.Generic; -using Umbraco.Core.Cache; +using Umbraco.Cms.Core.Cache; +using Umbraco.Cms.Core.Sync; -namespace Umbraco.Core.Sync +namespace Umbraco.Cms.Infrastructure.Sync { /// /// Used for any 'Batched' instances which specifies a set of targeting a collection of diff --git a/src/Umbraco.Infrastructure/Sync/ServerMessengerBase.cs b/src/Umbraco.Infrastructure/Sync/ServerMessengerBase.cs index dfba90291b..536d1d9aa0 100644 --- a/src/Umbraco.Infrastructure/Sync/ServerMessengerBase.cs +++ b/src/Umbraco.Infrastructure/Sync/ServerMessengerBase.cs @@ -1,11 +1,13 @@ using System; using System.Collections.Generic; using System.Linq; -using Newtonsoft.Json; -using Umbraco.Core.Cache; using Microsoft.Extensions.Logging; +using Newtonsoft.Json; +using Umbraco.Cms.Core; +using Umbraco.Cms.Core.Cache; +using Umbraco.Cms.Core.Sync; -namespace Umbraco.Core.Sync +namespace Umbraco.Cms.Infrastructure.Sync { /// /// Provides a base class for all implementations. diff --git a/src/Umbraco.Infrastructure/TagQuery.cs b/src/Umbraco.Infrastructure/TagQuery.cs index 4a7ee8e7eb..ea2e41005d 100644 --- a/src/Umbraco.Infrastructure/TagQuery.cs +++ b/src/Umbraco.Infrastructure/TagQuery.cs @@ -1,13 +1,13 @@ using System; using System.Collections.Generic; using System.Linq; -using Umbraco.Core.Mapping; -using Umbraco.Core.Models; -using Umbraco.Core.Models.PublishedContent; -using Umbraco.Core.Services; -using Umbraco.Web.Models; +using Umbraco.Cms.Core.Mapping; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Core.Models.PublishedContent; +using Umbraco.Cms.Core.PublishedCache; +using Umbraco.Cms.Core.Services; -namespace Umbraco.Web +namespace Umbraco.Cms.Core { /// /// Implements . diff --git a/src/Umbraco.Infrastructure/Trees/TreeRootNode.cs b/src/Umbraco.Infrastructure/Trees/TreeRootNode.cs index 386ff9e99b..63ad681969 100644 --- a/src/Umbraco.Infrastructure/Trees/TreeRootNode.cs +++ b/src/Umbraco.Infrastructure/Trees/TreeRootNode.cs @@ -1,8 +1,7 @@ -using System.Globalization; -using System.Linq; -using System.Runtime.Serialization; +using System.Runtime.Serialization; +using Umbraco.Cms.Core.Trees; -namespace Umbraco.Web.Models.Trees +namespace Umbraco.Cms.Core.Models.Trees { /// /// A tree node that represents various types of root nodes @@ -26,7 +25,7 @@ namespace Umbraco.Web.Models.Trees [DataContract(Name = "node", Namespace = "")] public sealed class TreeRootNode : TreeNode { - private static readonly string RootId = Core.Constants.System.RootString; + private static readonly string RootId = Constants.System.RootString; private bool _isGroup; private bool _isSingleNodeTree; diff --git a/src/Umbraco.Infrastructure/Umbraco.Infrastructure.csproj b/src/Umbraco.Infrastructure/Umbraco.Infrastructure.csproj index 8115c95c50..cd49b2abb1 100644 --- a/src/Umbraco.Infrastructure/Umbraco.Infrastructure.csproj +++ b/src/Umbraco.Infrastructure/Umbraco.Infrastructure.csproj @@ -1,8 +1,9 @@ - + netstandard2.0 8 + Umbraco.Cms.Infrastructure @@ -13,6 +14,7 @@ + diff --git a/src/Umbraco.Infrastructure/WebAssets/BackOfficeJavaScriptInitializer.cs b/src/Umbraco.Infrastructure/WebAssets/BackOfficeJavaScriptInitializer.cs index 77db7bcbfd..7296e08ab1 100644 --- a/src/Umbraco.Infrastructure/WebAssets/BackOfficeJavaScriptInitializer.cs +++ b/src/Umbraco.Infrastructure/WebAssets/BackOfficeJavaScriptInitializer.cs @@ -1,12 +1,10 @@ using System.Collections.Generic; using System.Text; using System.Text.RegularExpressions; -using Umbraco.Core.Configuration; -using Umbraco.Core.Configuration.Models; -using Umbraco.Core.Hosting; -using Umbraco.Core.IO; +using Umbraco.Cms.Core.Configuration.Models; +using Umbraco.Cms.Core.Hosting; -namespace Umbraco.Web.WebAssets +namespace Umbraco.Cms.Infrastructure.WebAssets { /// /// Creates a JavaScript block to initialize the back office @@ -44,7 +42,6 @@ namespace Umbraco.Web.WebAssets jarray.Append("\""); jarray.Append(file); jarray.Append("\""); - } jarray.Append("]"); diff --git a/src/Umbraco.Infrastructure/WebAssets/BackOfficeWebAssets.cs b/src/Umbraco.Infrastructure/WebAssets/BackOfficeWebAssets.cs index 93250ef981..6fffc5a693 100644 --- a/src/Umbraco.Infrastructure/WebAssets/BackOfficeWebAssets.cs +++ b/src/Umbraco.Infrastructure/WebAssets/BackOfficeWebAssets.cs @@ -4,16 +4,14 @@ using System.Linq; using Microsoft.Extensions.Options; using Newtonsoft.Json; using Newtonsoft.Json.Linq; -using Umbraco.Core; -using Umbraco.Core.Configuration; -using Umbraco.Core.Configuration.Models; -using Umbraco.Core.Hosting; -using Umbraco.Core.IO; -using Umbraco.Core.Manifest; -using Umbraco.Core.PropertyEditors; -using Umbraco.Core.WebAssets; +using Umbraco.Cms.Core.Configuration.Models; +using Umbraco.Cms.Core.Hosting; +using Umbraco.Cms.Core.Manifest; +using Umbraco.Cms.Core.PropertyEditors; +using Umbraco.Cms.Core.WebAssets; +using Umbraco.Extensions; -namespace Umbraco.Web.WebAssets +namespace Umbraco.Cms.Infrastructure.WebAssets { public class BackOfficeWebAssets { diff --git a/src/Umbraco.Infrastructure/WebAssets/PropertyEditorAssetAttribute.cs b/src/Umbraco.Infrastructure/WebAssets/PropertyEditorAssetAttribute.cs index 74bb792653..06913d4204 100644 --- a/src/Umbraco.Infrastructure/WebAssets/PropertyEditorAssetAttribute.cs +++ b/src/Umbraco.Infrastructure/WebAssets/PropertyEditorAssetAttribute.cs @@ -1,7 +1,7 @@ using System; -using Umbraco.Core.WebAssets; +using Umbraco.Cms.Core.WebAssets; -namespace Umbraco.Web.WebAssets +namespace Umbraco.Cms.Infrastructure.WebAssets { /// /// Indicates that the property editor requires this asset be loaded when the back office is loaded diff --git a/src/Umbraco.Infrastructure/WebAssets/Resources.Designer.cs b/src/Umbraco.Infrastructure/WebAssets/Resources.Designer.cs index 5e29355948..554ae98929 100644 --- a/src/Umbraco.Infrastructure/WebAssets/Resources.Designer.cs +++ b/src/Umbraco.Infrastructure/WebAssets/Resources.Designer.cs @@ -8,11 +8,10 @@ // //------------------------------------------------------------------------------ -namespace Umbraco.Web.WebAssets -{ +namespace Umbraco.Cms.Infrastructure.WebAssets { using System; - - + + /// /// A strongly-typed resource class, for looking up localized strings, etc. /// @@ -24,15 +23,15 @@ namespace Umbraco.Web.WebAssets [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] internal class Resources { - + private static global::System.Resources.ResourceManager resourceMan; - + private static global::System.Globalization.CultureInfo resourceCulture; - + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] internal Resources() { } - + /// /// Returns the cached ResourceManager instance used by this class. /// @@ -40,13 +39,13 @@ namespace Umbraco.Web.WebAssets internal static global::System.Resources.ResourceManager ResourceManager { get { if (object.ReferenceEquals(resourceMan, null)) { - global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Umbraco.Infrastructure.WebAssets.Resources", typeof(Resources).Assembly); + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Umbraco.Cms.Infrastructure.WebAssets.Resources", typeof(Resources).Assembly); resourceMan = temp; } return resourceMan; } } - + /// /// Overrides the current thread's CurrentUICulture property for all /// resource lookups using this strongly typed resource class. @@ -60,9 +59,10 @@ namespace Umbraco.Web.WebAssets resourceCulture = value; } } - + /// /// Looks up a localized string similar to [ + /// /// 'lib/jquery/jquery.min.js', /// 'lib/jquery-ui/jquery-ui.min.js', /// 'lib/jquery-ui-touch-punch/jquery.ui.touch-punch.min.js', @@ -79,14 +79,14 @@ namespace Umbraco.Web.WebAssets /// 'lib/angular-cookies/angular-cookies.js', /// 'lib/angular-aria/angular-aria.min.js', /// 'lib/angular-touch/angular-touch.js', - /// 'lib/angula [rest of string was truncated]";. + /// 'lib/ [rest of string was truncated]";. /// internal static string JsInitialize { get { return ResourceManager.GetString("JsInitialize", resourceCulture); } } - + /// /// Looks up a localized string similar to LazyLoad.js("##JsInitialize##", function () { /// //we need to set the legacy UmbClientMgr path @@ -107,21 +107,21 @@ namespace Umbraco.Web.WebAssets return ResourceManager.GetString("Main", resourceCulture); } } - + /// /// Looks up a localized string similar to [ - /// '../lib/jquery/jquery.min.js', - /// '../lib/angular/angular.js', - /// '../lib/underscore/underscore-min.js', - /// '../lib/umbraco/Extensions.js', - /// '../js/app.js', - /// '../js/umbraco.resources.js', - /// '../js/umbraco.services.js', - /// '../js/umbraco.interceptors.js', - /// '../ServerVariables', - /// '../lib/signalr/jquery.signalR.js', - /// '../BackOffice/signalr/hubs', - /// '../js/umbraco.preview.js' + /// 'lib/jquery/jquery.min.js', + /// 'lib/angular/angular.js', + /// 'lib/underscore/underscore-min.js', + /// 'lib/umbraco/Extensions.js', + /// 'js/utilities.js', + /// 'js/app.js', + /// 'js/umbraco.resources.js', + /// 'js/umbraco.services.js', + /// 'js/umbraco.interceptors.js', + /// 'ServerVariables', + /// 'lib/signalr/signalr.min.js', + /// 'js/umbraco.preview.js' ///] ///. /// @@ -130,7 +130,7 @@ namespace Umbraco.Web.WebAssets return ResourceManager.GetString("PreviewInitialize", resourceCulture); } } - + /// /// Looks up a localized string similar to // TODO: This would be nicer as an angular module so it can be injected into stuff... that'd be heaps nicer, but ///// how to do that when this is not a regular JS file, it is a server side JS file and RequireJS seems to only want @@ -147,7 +147,7 @@ namespace Umbraco.Web.WebAssets return ResourceManager.GetString("ServerVariables", resourceCulture); } } - + /// /// Looks up a localized string similar to [ /// 'lib/tinymce/tinymce.min.js', diff --git a/src/Umbraco.Infrastructure/WebAssets/RuntimeMinifierExtensions.cs b/src/Umbraco.Infrastructure/WebAssets/RuntimeMinifierExtensions.cs index cc3be4d785..f37dd0bb8c 100644 --- a/src/Umbraco.Infrastructure/WebAssets/RuntimeMinifierExtensions.cs +++ b/src/Umbraco.Infrastructure/WebAssets/RuntimeMinifierExtensions.cs @@ -1,11 +1,12 @@ using System; using System.Text; using System.Threading.Tasks; -using Umbraco.Core.Configuration.Models; -using Umbraco.Core.Hosting; -using Umbraco.Core.WebAssets; +using Umbraco.Cms.Core.Configuration.Models; +using Umbraco.Cms.Core.Hosting; +using Umbraco.Cms.Core.WebAssets; +using Umbraco.Cms.Infrastructure.WebAssets; -namespace Umbraco.Web.WebAssets +namespace Umbraco.Extensions { public static class RuntimeMinifierExtensions { diff --git a/src/Umbraco.Infrastructure/WebAssets/ServerVariablesParser.cs b/src/Umbraco.Infrastructure/WebAssets/ServerVariablesParser.cs index ba43667fbe..c5f4eb128d 100644 --- a/src/Umbraco.Infrastructure/WebAssets/ServerVariablesParser.cs +++ b/src/Umbraco.Infrastructure/WebAssets/ServerVariablesParser.cs @@ -1,9 +1,9 @@ using System.Collections.Generic; using System.Threading.Tasks; using Newtonsoft.Json.Linq; -using Umbraco.Core.Events; +using Umbraco.Cms.Core.Events; -namespace Umbraco.Web.WebAssets +namespace Umbraco.Cms.Infrastructure.WebAssets { /// /// Ensures the server variables are included in the outgoing JS script diff --git a/src/Umbraco.Infrastructure/WebAssets/ServerVariablesParsing.cs b/src/Umbraco.Infrastructure/WebAssets/ServerVariablesParsing.cs index 2fae2b13e0..ffa8713add 100644 --- a/src/Umbraco.Infrastructure/WebAssets/ServerVariablesParsing.cs +++ b/src/Umbraco.Infrastructure/WebAssets/ServerVariablesParsing.cs @@ -1,7 +1,7 @@ using System.Collections.Generic; -using Umbraco.Core.Events; +using Umbraco.Cms.Core.Events; -namespace Umbraco.Web.WebAssets +namespace Umbraco.Cms.Infrastructure.WebAssets { /// /// A notification for when server variables are parsing diff --git a/src/Umbraco.Infrastructure/WebAssets/WebAssetsComponent.cs b/src/Umbraco.Infrastructure/WebAssets/WebAssetsComponent.cs index 54ba82a1fc..2eba85a3c3 100644 --- a/src/Umbraco.Infrastructure/WebAssets/WebAssetsComponent.cs +++ b/src/Umbraco.Infrastructure/WebAssets/WebAssetsComponent.cs @@ -1,6 +1,6 @@ -using Umbraco.Core.Composing; +using Umbraco.Cms.Core.Composing; -namespace Umbraco.Web.WebAssets +namespace Umbraco.Cms.Infrastructure.WebAssets { public sealed class WebAssetsComponent : IComponent { diff --git a/src/Umbraco.Infrastructure/WebAssets/WebAssetsComposer.cs b/src/Umbraco.Infrastructure/WebAssets/WebAssetsComposer.cs index 5db66fdf78..1298340a73 100644 --- a/src/Umbraco.Infrastructure/WebAssets/WebAssetsComposer.cs +++ b/src/Umbraco.Infrastructure/WebAssets/WebAssetsComposer.cs @@ -1,7 +1,8 @@ -using Umbraco.Core.DependencyInjection; -using Umbraco.Core.Composing; +using Umbraco.Cms.Core.Composing; +using Umbraco.Cms.Core.DependencyInjection; +using Umbraco.Extensions; -namespace Umbraco.Web.WebAssets +namespace Umbraco.Cms.Infrastructure.WebAssets { public sealed class WebAssetsComposer : ComponentComposer { diff --git a/src/Umbraco.ModelsBuilder.Embedded/ImplementPropertyTypeAttribute.cs b/src/Umbraco.ModelsBuilder.Embedded/ImplementPropertyTypeAttribute.cs deleted file mode 100644 index 6f52a7faa9..0000000000 --- a/src/Umbraco.ModelsBuilder.Embedded/ImplementPropertyTypeAttribute.cs +++ /dev/null @@ -1,19 +0,0 @@ -using System; - -namespace Umbraco.ModelsBuilder.Embedded -{ - /// - /// Indicates that a property implements a given property alias. - /// - /// And therefore it should not be generated. - [AttributeUsage(AttributeTargets.Property , AllowMultiple = false, Inherited = false)] - public class ImplementPropertyTypeAttribute : Attribute - { - public ImplementPropertyTypeAttribute(string alias) - { - Alias = alias; - } - - public string Alias { get; private set; } - } -} diff --git a/src/Umbraco.ModelsBuilder.Embedded/Umbraco.ModelsBuilder.Embedded.csproj b/src/Umbraco.ModelsBuilder.Embedded/Umbraco.ModelsBuilder.Embedded.csproj deleted file mode 100644 index f2c34adc0b..0000000000 --- a/src/Umbraco.ModelsBuilder.Embedded/Umbraco.ModelsBuilder.Embedded.csproj +++ /dev/null @@ -1,38 +0,0 @@ - - - - net5.0 - Library - latest - - - - bin\Release\Umbraco.ModelsBuilder.Embedded.xml - - - - - - - - - - - - - - - - <_Parameter1>Umbraco.Tests - - - <_Parameter1>Umbraco.Tests.UnitTests - - - <_Parameter1>Umbraco.Tests.Benchmarks - - - <_Parameter1>Umbraco.Tests.Integration - - - diff --git a/src/Umbraco.Persistence.SqlCe/SqlCeBulkSqlInsertProvider.cs b/src/Umbraco.Persistence.SqlCe/SqlCeBulkSqlInsertProvider.cs index f22c86f13b..4073366fea 100644 --- a/src/Umbraco.Persistence.SqlCe/SqlCeBulkSqlInsertProvider.cs +++ b/src/Umbraco.Persistence.SqlCe/SqlCeBulkSqlInsertProvider.cs @@ -4,10 +4,11 @@ using System.Data; using System.Data.SqlServerCe; using System.Linq; using NPoco; -using Umbraco.Core; -using Umbraco.Core.Persistence; +using Umbraco.Cms.Infrastructure.Persistence; +using Umbraco.Extensions; +using Constants = Umbraco.Cms.Core.Constants; -namespace Umbraco.Persistence.SqlCe +namespace Umbraco.Cms.Persistence.SqlCe { public class SqlCeBulkSqlInsertProvider : IBulkSqlInsertProvider { diff --git a/src/Umbraco.Persistence.SqlCe/SqlCeEmbeddedDatabaseCreator.cs b/src/Umbraco.Persistence.SqlCe/SqlCeEmbeddedDatabaseCreator.cs index 44cfd81d11..ee2d888109 100644 --- a/src/Umbraco.Persistence.SqlCe/SqlCeEmbeddedDatabaseCreator.cs +++ b/src/Umbraco.Persistence.SqlCe/SqlCeEmbeddedDatabaseCreator.cs @@ -1,8 +1,8 @@ -using Umbraco.Core; -using Umbraco.Core.Migrations.Install; -using Umbraco.Core.Persistence; +using Umbraco.Cms.Infrastructure.Migrations.Install; +using Umbraco.Cms.Infrastructure.Persistence; +using Constants = Umbraco.Cms.Core.Constants; -namespace Umbraco.Persistence.SqlCe +namespace Umbraco.Cms.Persistence.SqlCe { public class SqlCeEmbeddedDatabaseCreator : IEmbeddedDatabaseCreator { diff --git a/src/Umbraco.Persistence.SqlCe/SqlCeSyntaxProvider.cs b/src/Umbraco.Persistence.SqlCe/SqlCeSyntaxProvider.cs index fbeeb4dd96..c46b2ef6f2 100644 --- a/src/Umbraco.Persistence.SqlCe/SqlCeSyntaxProvider.cs +++ b/src/Umbraco.Persistence.SqlCe/SqlCeSyntaxProvider.cs @@ -3,14 +3,14 @@ using System.Collections.Generic; using System.Data; using System.Linq; using NPoco; -using Umbraco.Core; -using Umbraco.Core.Persistence; -using Umbraco.Core.Persistence.DatabaseAnnotations; -using Umbraco.Core.Persistence.DatabaseModelDefinitions; -using Umbraco.Core.Persistence.SqlSyntax; -using ColumnInfo = Umbraco.Core.Persistence.SqlSyntax.ColumnInfo; +using Umbraco.Cms.Infrastructure.Persistence; +using Umbraco.Cms.Infrastructure.Persistence.DatabaseAnnotations; +using Umbraco.Cms.Infrastructure.Persistence.DatabaseModelDefinitions; +using Umbraco.Cms.Infrastructure.Persistence.SqlSyntax; +using ColumnInfo = Umbraco.Cms.Infrastructure.Persistence.SqlSyntax.ColumnInfo; +using Constants = Umbraco.Cms.Core.Constants; -namespace Umbraco.Persistence.SqlCe +namespace Umbraco.Cms.Persistence.SqlCe { /// /// Represents an SqlSyntaxProvider for Sql Ce diff --git a/src/Umbraco.Persistence.SqlCe/Umbraco.Persistence.SqlCe.csproj b/src/Umbraco.Persistence.SqlCe/Umbraco.Persistence.SqlCe.csproj index effcc77a20..93622540e4 100644 --- a/src/Umbraco.Persistence.SqlCe/Umbraco.Persistence.SqlCe.csproj +++ b/src/Umbraco.Persistence.SqlCe/Umbraco.Persistence.SqlCe.csproj @@ -1,8 +1,8 @@  - 8 net472 + Umbraco.Cms.Persistence.SqlCe diff --git a/src/Umbraco.PublishedCache.NuCache/CacheKeys.cs b/src/Umbraco.PublishedCache.NuCache/CacheKeys.cs index 0b67c3a1e2..df129d7214 100644 --- a/src/Umbraco.PublishedCache.NuCache/CacheKeys.cs +++ b/src/Umbraco.PublishedCache.NuCache/CacheKeys.cs @@ -1,8 +1,7 @@ using System; -using System.Globalization; using System.Runtime.CompilerServices; -namespace Umbraco.Web.PublishedCache.NuCache +namespace Umbraco.Cms.Infrastructure.PublishedCache { internal static class CacheKeys { diff --git a/src/Umbraco.PublishedCache.NuCache/ContentCache.cs b/src/Umbraco.PublishedCache.NuCache/ContentCache.cs index f1c4f1d85b..e4c43b1067 100644 --- a/src/Umbraco.PublishedCache.NuCache/ContentCache.cs +++ b/src/Umbraco.PublishedCache.NuCache/ContentCache.cs @@ -4,16 +4,18 @@ using System.Globalization; using System.Linq; using System.Xml.XPath; using Microsoft.Extensions.Options; -using Umbraco.Core; -using Umbraco.Core.Cache; -using Umbraco.Core.Configuration; -using Umbraco.Core.Configuration.Models; -using Umbraco.Core.Models.PublishedContent; -using Umbraco.Core.Xml; -using Umbraco.Core.Xml.XPath; -using Umbraco.Web.PublishedCache.NuCache.Navigable; +using Umbraco.Cms.Core; +using Umbraco.Cms.Core.Cache; +using Umbraco.Cms.Core.Configuration.Models; +using Umbraco.Cms.Core.Models.PublishedContent; +using Umbraco.Cms.Core.PublishedCache; +using Umbraco.Cms.Core.Xml; +using Umbraco.Cms.Core.Xml.XPath; +using Umbraco.Cms.Infrastructure.PublishedCache.Navigable; +using Umbraco.Extensions; +using Constants = Umbraco.Cms.Core.Constants; -namespace Umbraco.Web.PublishedCache.NuCache +namespace Umbraco.Cms.Infrastructure.PublishedCache { internal class ContentCache : PublishedCacheBase, IPublishedContentCache, INavigableData, IDisposable { diff --git a/src/Umbraco.PublishedCache.NuCache/ContentNode.cs b/src/Umbraco.PublishedCache.NuCache/ContentNode.cs index 38ba78caae..9386b7faf1 100644 --- a/src/Umbraco.PublishedCache.NuCache/ContentNode.cs +++ b/src/Umbraco.PublishedCache.NuCache/ContentNode.cs @@ -1,9 +1,11 @@ using System; using System.Diagnostics; -using Umbraco.Core.Models.PublishedContent; -using Umbraco.Web.PublishedCache.NuCache.DataSource; +using Umbraco.Cms.Core.Models.PublishedContent; +using Umbraco.Cms.Core.PublishedCache; +using Umbraco.Cms.Infrastructure.PublishedCache.DataSource; +using Umbraco.Extensions; -namespace Umbraco.Web.PublishedCache.NuCache +namespace Umbraco.Cms.Infrastructure.PublishedCache { // represents a content "node" ie a pair of draft + published versions // internal, never exposed, to be accessed from ContentStore (only!) diff --git a/src/Umbraco.PublishedCache.NuCache/ContentNodeKit.cs b/src/Umbraco.PublishedCache.NuCache/ContentNodeKit.cs index 8e24afd620..c97d312c8f 100644 --- a/src/Umbraco.PublishedCache.NuCache/ContentNodeKit.cs +++ b/src/Umbraco.PublishedCache.NuCache/ContentNodeKit.cs @@ -1,7 +1,8 @@ -using Umbraco.Core.Models.PublishedContent; -using Umbraco.Web.PublishedCache.NuCache.DataSource; +using Umbraco.Cms.Core.Models.PublishedContent; +using Umbraco.Cms.Core.PublishedCache; +using Umbraco.Cms.Infrastructure.PublishedCache.DataSource; -namespace Umbraco.Web.PublishedCache.NuCache +namespace Umbraco.Cms.Infrastructure.PublishedCache { // what's needed to actually build a content node public struct ContentNodeKit diff --git a/src/Umbraco.PublishedCache.NuCache/ContentStore.cs b/src/Umbraco.PublishedCache.NuCache/ContentStore.cs index bb03693adf..f7c3b987e4 100644 --- a/src/Umbraco.PublishedCache.NuCache/ContentStore.cs +++ b/src/Umbraco.PublishedCache.NuCache/ContentStore.cs @@ -6,13 +6,13 @@ using System.Threading; using System.Threading.Tasks; using CSharpTest.Net.Collections; using Microsoft.Extensions.Logging; -using Umbraco.Core; -using Umbraco.Core.Exceptions; -using Umbraco.Core.Models.PublishedContent; -using Umbraco.Core.Scoping; -using Umbraco.Web.PublishedCache.NuCache.Snap; +using Umbraco.Cms.Core.Exceptions; +using Umbraco.Cms.Core.Models.PublishedContent; +using Umbraco.Cms.Core.PublishedCache; +using Umbraco.Cms.Core.Scoping; +using Umbraco.Cms.Infrastructure.PublishedCache.Snap; -namespace Umbraco.Web.PublishedCache.NuCache +namespace Umbraco.Cms.Infrastructure.PublishedCache { /// /// Stores content in memory and persists it back to disk diff --git a/src/Umbraco.PublishedCache.NuCache/DataSource/BTree.ContentDataSerializer.cs b/src/Umbraco.PublishedCache.NuCache/DataSource/BTree.ContentDataSerializer.cs index 056eacd717..f0b58d0712 100644 --- a/src/Umbraco.PublishedCache.NuCache/DataSource/BTree.ContentDataSerializer.cs +++ b/src/Umbraco.PublishedCache.NuCache/DataSource/BTree.ContentDataSerializer.cs @@ -1,7 +1,7 @@ using System.IO; using CSharpTest.Net.Serialization; -namespace Umbraco.Web.PublishedCache.NuCache.DataSource +namespace Umbraco.Cms.Infrastructure.PublishedCache.DataSource { class ContentDataSerializer : ISerializer { diff --git a/src/Umbraco.PublishedCache.NuCache/DataSource/BTree.ContentNodeKitSerializer.cs b/src/Umbraco.PublishedCache.NuCache/DataSource/BTree.ContentNodeKitSerializer.cs index f799869850..bb473fd34d 100644 --- a/src/Umbraco.PublishedCache.NuCache/DataSource/BTree.ContentNodeKitSerializer.cs +++ b/src/Umbraco.PublishedCache.NuCache/DataSource/BTree.ContentNodeKitSerializer.cs @@ -1,7 +1,7 @@ using System.IO; using CSharpTest.Net.Serialization; -namespace Umbraco.Web.PublishedCache.NuCache.DataSource +namespace Umbraco.Cms.Infrastructure.PublishedCache.DataSource { internal class ContentNodeKitSerializer : ISerializer { diff --git a/src/Umbraco.PublishedCache.NuCache/DataSource/BTree.DictionaryOfCultureVariationSerializer.cs b/src/Umbraco.PublishedCache.NuCache/DataSource/BTree.DictionaryOfCultureVariationSerializer.cs index 4521311302..835fa47e34 100644 --- a/src/Umbraco.PublishedCache.NuCache/DataSource/BTree.DictionaryOfCultureVariationSerializer.cs +++ b/src/Umbraco.PublishedCache.NuCache/DataSource/BTree.DictionaryOfCultureVariationSerializer.cs @@ -2,9 +2,9 @@ using System.Collections.Generic; using System.IO; using CSharpTest.Net.Serialization; -using Umbraco.Core; +using Umbraco.Extensions; -namespace Umbraco.Web.PublishedCache.NuCache.DataSource +namespace Umbraco.Cms.Infrastructure.PublishedCache.DataSource { internal class DictionaryOfCultureVariationSerializer : SerializerBase, ISerializer> { diff --git a/src/Umbraco.PublishedCache.NuCache/DataSource/BTree.DictionaryOfPropertyDataSerializer.cs b/src/Umbraco.PublishedCache.NuCache/DataSource/BTree.DictionaryOfPropertyDataSerializer.cs index aa5dc9eb30..b7c23eca04 100644 --- a/src/Umbraco.PublishedCache.NuCache/DataSource/BTree.DictionaryOfPropertyDataSerializer.cs +++ b/src/Umbraco.PublishedCache.NuCache/DataSource/BTree.DictionaryOfPropertyDataSerializer.cs @@ -2,9 +2,9 @@ using System.Collections.Generic; using System.IO; using CSharpTest.Net.Serialization; -using Umbraco.Core; +using Umbraco.Extensions; -namespace Umbraco.Web.PublishedCache.NuCache.DataSource +namespace Umbraco.Cms.Infrastructure.PublishedCache.DataSource { internal class DictionaryOfPropertyDataSerializer : SerializerBase, ISerializer> { diff --git a/src/Umbraco.PublishedCache.NuCache/DataSource/BTree.cs b/src/Umbraco.PublishedCache.NuCache/DataSource/BTree.cs index 99d0e9da38..ace3e571d3 100644 --- a/src/Umbraco.PublishedCache.NuCache/DataSource/BTree.cs +++ b/src/Umbraco.PublishedCache.NuCache/DataSource/BTree.cs @@ -1,10 +1,9 @@ using System.Configuration; using CSharpTest.Net.Collections; using CSharpTest.Net.Serialization; -using Umbraco.Core.Configuration; -using Umbraco.Core.Configuration.Models; +using Umbraco.Cms.Core.Configuration.Models; -namespace Umbraco.Web.PublishedCache.NuCache.DataSource +namespace Umbraco.Cms.Infrastructure.PublishedCache.DataSource { internal class BTree { diff --git a/src/Umbraco.PublishedCache.NuCache/DataSource/ContentData.cs b/src/Umbraco.PublishedCache.NuCache/DataSource/ContentData.cs index 42e7e340cd..f135ee8bb4 100644 --- a/src/Umbraco.PublishedCache.NuCache/DataSource/ContentData.cs +++ b/src/Umbraco.PublishedCache.NuCache/DataSource/ContentData.cs @@ -1,7 +1,7 @@ using System; using System.Collections.Generic; -namespace Umbraco.Web.PublishedCache.NuCache.DataSource +namespace Umbraco.Cms.Infrastructure.PublishedCache.DataSource { // represents everything that is specific to edited or published version public class ContentData diff --git a/src/Umbraco.PublishedCache.NuCache/DataSource/ContentNestedData.cs b/src/Umbraco.PublishedCache.NuCache/DataSource/ContentNestedData.cs index 98d423680b..12e289660e 100644 --- a/src/Umbraco.PublishedCache.NuCache/DataSource/ContentNestedData.cs +++ b/src/Umbraco.PublishedCache.NuCache/DataSource/ContentNestedData.cs @@ -1,8 +1,8 @@ -using Newtonsoft.Json; using System.Collections.Generic; -using Umbraco.Core.Serialization; +using Newtonsoft.Json; +using Umbraco.Cms.Infrastructure.Serialization; -namespace Umbraco.Web.PublishedCache.NuCache.DataSource +namespace Umbraco.Cms.Infrastructure.PublishedCache.DataSource { /// /// The content item 1:M data that is serialized to JSON diff --git a/src/Umbraco.PublishedCache.NuCache/DataSource/ContentSourceDto.cs b/src/Umbraco.PublishedCache.NuCache/DataSource/ContentSourceDto.cs index 37fb9df8bb..2c3f8160f5 100644 --- a/src/Umbraco.PublishedCache.NuCache/DataSource/ContentSourceDto.cs +++ b/src/Umbraco.PublishedCache.NuCache/DataSource/ContentSourceDto.cs @@ -1,6 +1,6 @@ using System; -namespace Umbraco.Web.PublishedCache.NuCache.DataSource +namespace Umbraco.Cms.Infrastructure.PublishedCache.DataSource { // read-only dto internal class ContentSourceDto diff --git a/src/Umbraco.PublishedCache.NuCache/DataSource/CultureVariation.cs b/src/Umbraco.PublishedCache.NuCache/DataSource/CultureVariation.cs index b59e8c403c..fc6da41fe3 100644 --- a/src/Umbraco.PublishedCache.NuCache/DataSource/CultureVariation.cs +++ b/src/Umbraco.PublishedCache.NuCache/DataSource/CultureVariation.cs @@ -1,7 +1,7 @@ using System; using Newtonsoft.Json; -namespace Umbraco.Web.PublishedCache.NuCache.DataSource +namespace Umbraco.Cms.Infrastructure.PublishedCache.DataSource { /// /// Represents the culture variation information on a content item diff --git a/src/Umbraco.PublishedCache.NuCache/DataSource/PropertyData.cs b/src/Umbraco.PublishedCache.NuCache/DataSource/PropertyData.cs index 42e038c744..4320ce89bd 100644 --- a/src/Umbraco.PublishedCache.NuCache/DataSource/PropertyData.cs +++ b/src/Umbraco.PublishedCache.NuCache/DataSource/PropertyData.cs @@ -2,7 +2,7 @@ using System; using System.ComponentModel; using Newtonsoft.Json; -namespace Umbraco.Web.PublishedCache.NuCache.DataSource +namespace Umbraco.Cms.Infrastructure.PublishedCache.DataSource { public class PropertyData { diff --git a/src/Umbraco.PublishedCache.NuCache/DataSource/SerializerBase.cs b/src/Umbraco.PublishedCache.NuCache/DataSource/SerializerBase.cs index ed17420645..48fadce476 100644 --- a/src/Umbraco.PublishedCache.NuCache/DataSource/SerializerBase.cs +++ b/src/Umbraco.PublishedCache.NuCache/DataSource/SerializerBase.cs @@ -2,7 +2,7 @@ using System.IO; using CSharpTest.Net.Serialization; -namespace Umbraco.Web.PublishedCache.NuCache.DataSource +namespace Umbraco.Cms.Infrastructure.PublishedCache.DataSource { internal abstract class SerializerBase { diff --git a/src/Umbraco.PublishedCache.NuCache/DependencyInjection/UmbracoBuilderExtensions.cs b/src/Umbraco.PublishedCache.NuCache/DependencyInjection/UmbracoBuilderExtensions.cs index 6f6e0d0c0e..82e62b2328 100644 --- a/src/Umbraco.PublishedCache.NuCache/DependencyInjection/UmbracoBuilderExtensions.cs +++ b/src/Umbraco.PublishedCache.NuCache/DependencyInjection/UmbracoBuilderExtensions.cs @@ -1,14 +1,14 @@ using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.DependencyInjection.Extensions; -using Umbraco.Core.DependencyInjection; -using Umbraco.Core.Models; -using Umbraco.Core.Scoping; -using Umbraco.Core.Services; -using Umbraco.Infrastructure.PublishedCache.Persistence; -using Umbraco.Web.PublishedCache; -using Umbraco.Web.PublishedCache.NuCache; +using Umbraco.Cms.Core.DependencyInjection; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Core.PublishedCache; +using Umbraco.Cms.Core.Scoping; +using Umbraco.Cms.Core.Services; +using Umbraco.Cms.Infrastructure.PublishedCache; +using Umbraco.Cms.Infrastructure.PublishedCache.Persistence; -namespace Umbraco.Infrastructure.PublishedCache.DependencyInjection +namespace Umbraco.Extensions { /// /// Extension methods for for the Umbraco's NuCache diff --git a/src/Umbraco.PublishedCache.NuCache/DomainCache.cs b/src/Umbraco.PublishedCache.NuCache/DomainCache.cs index 6bc0de7268..e957efdbcc 100644 --- a/src/Umbraco.PublishedCache.NuCache/DomainCache.cs +++ b/src/Umbraco.PublishedCache.NuCache/DomainCache.cs @@ -1,8 +1,9 @@ using System.Collections.Generic; using System.Linq; -using Umbraco.Web.Routing; +using Umbraco.Cms.Core.PublishedCache; +using Umbraco.Cms.Core.Routing; -namespace Umbraco.Web.PublishedCache.NuCache +namespace Umbraco.Cms.Infrastructure.PublishedCache { /// /// Implements for NuCache. diff --git a/src/Umbraco.PublishedCache.NuCache/MediaCache.cs b/src/Umbraco.PublishedCache.NuCache/MediaCache.cs index 8e76eb2fbb..1d422bec9a 100644 --- a/src/Umbraco.PublishedCache.NuCache/MediaCache.cs +++ b/src/Umbraco.PublishedCache.NuCache/MediaCache.cs @@ -2,14 +2,16 @@ using System.Collections.Generic; using System.Linq; using System.Xml.XPath; -using Umbraco.Core; -using Umbraco.Core.Cache; -using Umbraco.Core.Models.PublishedContent; -using Umbraco.Core.Xml; -using Umbraco.Core.Xml.XPath; -using Umbraco.Web.PublishedCache.NuCache.Navigable; +using Umbraco.Cms.Core; +using Umbraco.Cms.Core.Models.PublishedContent; +using Umbraco.Cms.Core.PublishedCache; +using Umbraco.Cms.Core.Xml; +using Umbraco.Cms.Core.Xml.XPath; +using Umbraco.Cms.Infrastructure.PublishedCache.Navigable; +using Umbraco.Extensions; +using Constants = Umbraco.Cms.Core.Constants; -namespace Umbraco.Web.PublishedCache.NuCache +namespace Umbraco.Cms.Infrastructure.PublishedCache { public class MediaCache : PublishedCacheBase, IPublishedMediaCache, INavigableData, IDisposable { diff --git a/src/Umbraco.PublishedCache.NuCache/MemberCache.cs b/src/Umbraco.PublishedCache.NuCache/MemberCache.cs index 68d82731d8..f3ea2aad21 100644 --- a/src/Umbraco.PublishedCache.NuCache/MemberCache.cs +++ b/src/Umbraco.PublishedCache.NuCache/MemberCache.cs @@ -2,15 +2,16 @@ using System.Collections.Generic; using System.Linq; using System.Xml.XPath; -using Umbraco.Core; -using Umbraco.Core.Cache; -using Umbraco.Core.Models; -using Umbraco.Core.Models.PublishedContent; -using Umbraco.Core.Services; -using Umbraco.Core.Xml.XPath; -using Umbraco.Web.PublishedCache.NuCache.Navigable; +using Umbraco.Cms.Core.Cache; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Core.Models.PublishedContent; +using Umbraco.Cms.Core.PublishedCache; +using Umbraco.Cms.Core.Services; +using Umbraco.Cms.Core.Xml.XPath; +using Umbraco.Cms.Infrastructure.PublishedCache.Navigable; +using Umbraco.Extensions; -namespace Umbraco.Web.PublishedCache.NuCache +namespace Umbraco.Cms.Infrastructure.PublishedCache { internal class MemberCache : IPublishedMemberCache, INavigableData { diff --git a/src/Umbraco.PublishedCache.NuCache/Navigable/INavigableData.cs b/src/Umbraco.PublishedCache.NuCache/Navigable/INavigableData.cs index 6651f9dcee..2dc238d1e4 100644 --- a/src/Umbraco.PublishedCache.NuCache/Navigable/INavigableData.cs +++ b/src/Umbraco.PublishedCache.NuCache/Navigable/INavigableData.cs @@ -1,7 +1,7 @@ using System.Collections.Generic; -using Umbraco.Core.Models.PublishedContent; +using Umbraco.Cms.Core.Models.PublishedContent; -namespace Umbraco.Web.PublishedCache.NuCache.Navigable +namespace Umbraco.Cms.Infrastructure.PublishedCache.Navigable { internal interface INavigableData { diff --git a/src/Umbraco.PublishedCache.NuCache/Navigable/NavigableContent.cs b/src/Umbraco.PublishedCache.NuCache/Navigable/NavigableContent.cs index 51badc8b9a..9d2b2bbbe5 100644 --- a/src/Umbraco.PublishedCache.NuCache/Navigable/NavigableContent.cs +++ b/src/Umbraco.PublishedCache.NuCache/Navigable/NavigableContent.cs @@ -1,9 +1,9 @@ using System; using System.Collections.Generic; -using Umbraco.Core.Models.PublishedContent; -using Umbraco.Core.Xml.XPath; +using Umbraco.Cms.Core.Models.PublishedContent; +using Umbraco.Cms.Core.Xml.XPath; -namespace Umbraco.Web.PublishedCache.NuCache.Navigable +namespace Umbraco.Cms.Infrastructure.PublishedCache.Navigable { internal class NavigableContent : INavigableContent { diff --git a/src/Umbraco.PublishedCache.NuCache/Navigable/NavigableContentType.cs b/src/Umbraco.PublishedCache.NuCache/Navigable/NavigableContentType.cs index 310dae9dd2..9062f66b92 100644 --- a/src/Umbraco.PublishedCache.NuCache/Navigable/NavigableContentType.cs +++ b/src/Umbraco.PublishedCache.NuCache/Navigable/NavigableContentType.cs @@ -2,10 +2,10 @@ using System.Linq; using System.Runtime.CompilerServices; using System.Xml; -using Umbraco.Core.Models.PublishedContent; -using Umbraco.Core.Xml.XPath; +using Umbraco.Cms.Core.Models.PublishedContent; +using Umbraco.Cms.Core.Xml.XPath; -namespace Umbraco.Web.PublishedCache.NuCache.Navigable +namespace Umbraco.Cms.Infrastructure.PublishedCache.Navigable { internal class NavigableContentType : INavigableContentType { diff --git a/src/Umbraco.PublishedCache.NuCache/Navigable/NavigablePropertyType.cs b/src/Umbraco.PublishedCache.NuCache/Navigable/NavigablePropertyType.cs index 082ebd1fde..eed3d1a08d 100644 --- a/src/Umbraco.PublishedCache.NuCache/Navigable/NavigablePropertyType.cs +++ b/src/Umbraco.PublishedCache.NuCache/Navigable/NavigablePropertyType.cs @@ -1,7 +1,7 @@ using System; -using Umbraco.Core.Xml.XPath; +using Umbraco.Cms.Core.Xml.XPath; -namespace Umbraco.Web.PublishedCache.NuCache.Navigable +namespace Umbraco.Cms.Infrastructure.PublishedCache.Navigable { internal class NavigablePropertyType : INavigableFieldType { diff --git a/src/Umbraco.PublishedCache.NuCache/Navigable/RootContent.cs b/src/Umbraco.PublishedCache.NuCache/Navigable/RootContent.cs index 1e6da0a23f..68eb41a66a 100644 --- a/src/Umbraco.PublishedCache.NuCache/Navigable/RootContent.cs +++ b/src/Umbraco.PublishedCache.NuCache/Navigable/RootContent.cs @@ -1,8 +1,8 @@ using System.Collections.Generic; using System.Linq; -using Umbraco.Core.Xml.XPath; +using Umbraco.Cms.Core.Xml.XPath; -namespace Umbraco.Web.PublishedCache.NuCache.Navigable +namespace Umbraco.Cms.Infrastructure.PublishedCache.Navigable { internal class RootContent : INavigableContent { diff --git a/src/Umbraco.PublishedCache.NuCache/Navigable/Source.cs b/src/Umbraco.PublishedCache.NuCache/Navigable/Source.cs index 436a89c803..ad4f1a2b13 100644 --- a/src/Umbraco.PublishedCache.NuCache/Navigable/Source.cs +++ b/src/Umbraco.PublishedCache.NuCache/Navigable/Source.cs @@ -1,7 +1,7 @@ using System.Linq; -using Umbraco.Core.Xml.XPath; +using Umbraco.Cms.Core.Xml.XPath; -namespace Umbraco.Web.PublishedCache.NuCache.Navigable +namespace Umbraco.Cms.Infrastructure.PublishedCache.Navigable { internal class Source : INavigableSource { diff --git a/src/Umbraco.PublishedCache.NuCache/Persistence/INuCacheContentRepository.cs b/src/Umbraco.PublishedCache.NuCache/Persistence/INuCacheContentRepository.cs index 7bce5e138c..ab15515d55 100644 --- a/src/Umbraco.PublishedCache.NuCache/Persistence/INuCacheContentRepository.cs +++ b/src/Umbraco.PublishedCache.NuCache/Persistence/INuCacheContentRepository.cs @@ -1,8 +1,7 @@ using System.Collections.Generic; -using Umbraco.Core.Models; -using Umbraco.Web.PublishedCache.NuCache; +using Umbraco.Cms.Core.Models; -namespace Umbraco.Infrastructure.PublishedCache.Persistence +namespace Umbraco.Cms.Infrastructure.PublishedCache.Persistence { public interface INuCacheContentRepository { diff --git a/src/Umbraco.PublishedCache.NuCache/Persistence/INuCacheContentService.cs b/src/Umbraco.PublishedCache.NuCache/Persistence/INuCacheContentService.cs index 4a3f5b2b5d..67c0bec35f 100644 --- a/src/Umbraco.PublishedCache.NuCache/Persistence/INuCacheContentService.cs +++ b/src/Umbraco.PublishedCache.NuCache/Persistence/INuCacheContentService.cs @@ -1,8 +1,7 @@ using System.Collections.Generic; -using Umbraco.Core.Models; -using Umbraco.Web.PublishedCache.NuCache; +using Umbraco.Cms.Core.Models; -namespace Umbraco.Infrastructure.PublishedCache.Persistence +namespace Umbraco.Cms.Infrastructure.PublishedCache.Persistence { /// /// Defines a data source for NuCache. diff --git a/src/Umbraco.PublishedCache.NuCache/Persistence/NuCacheContentRepository.cs b/src/Umbraco.PublishedCache.NuCache/Persistence/NuCacheContentRepository.cs index 60370e9be8..00346233ba 100644 --- a/src/Umbraco.PublishedCache.NuCache/Persistence/NuCacheContentRepository.cs +++ b/src/Umbraco.PublishedCache.NuCache/Persistence/NuCacheContentRepository.cs @@ -5,23 +5,23 @@ using System.Linq; using Microsoft.Extensions.Logging; using Newtonsoft.Json; using NPoco; -using Umbraco.Core; -using Umbraco.Core.Cache; -using Umbraco.Core.Models; -using Umbraco.Core.Persistence; -using Umbraco.Core.Persistence.Dtos; -using Umbraco.Core.Persistence.Querying; -using Umbraco.Core.Persistence.Repositories; -using Umbraco.Core.Persistence.Repositories.Implement; -using Umbraco.Core.Scoping; -using Umbraco.Core.Serialization; -using Umbraco.Core.Services; -using Umbraco.Core.Strings; -using Umbraco.Web.PublishedCache.NuCache; -using Umbraco.Web.PublishedCache.NuCache.DataSource; -using static Umbraco.Core.Persistence.SqlExtensionsStatics; +using Umbraco.Cms.Core.Cache; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Core.Persistence.Querying; +using Umbraco.Cms.Core.Persistence.Repositories; +using Umbraco.Cms.Core.Scoping; +using Umbraco.Cms.Core.Services; +using Umbraco.Cms.Core.Strings; +using Umbraco.Cms.Infrastructure.Persistence; +using Umbraco.Cms.Infrastructure.Persistence.Dtos; +using Umbraco.Cms.Infrastructure.Persistence.Repositories.Implement; +using Umbraco.Cms.Infrastructure.PublishedCache.DataSource; +using Umbraco.Cms.Infrastructure.Serialization; +using Umbraco.Extensions; +using static Umbraco.Cms.Core.Persistence.SqlExtensionsStatics; +using Constants = Umbraco.Cms.Core.Constants; -namespace Umbraco.Infrastructure.PublishedCache.Persistence +namespace Umbraco.Cms.Infrastructure.PublishedCache.Persistence { public class NuCacheContentRepository : RepositoryBase, INuCacheContentRepository { diff --git a/src/Umbraco.PublishedCache.NuCache/Persistence/NuCacheContentService.cs b/src/Umbraco.PublishedCache.NuCache/Persistence/NuCacheContentService.cs index 00c3671217..a6120bbe38 100644 --- a/src/Umbraco.PublishedCache.NuCache/Persistence/NuCacheContentService.cs +++ b/src/Umbraco.PublishedCache.NuCache/Persistence/NuCacheContentService.cs @@ -1,13 +1,12 @@ using System.Collections.Generic; using Microsoft.Extensions.Logging; -using Umbraco.Core; -using Umbraco.Core.Events; -using Umbraco.Core.Models; -using Umbraco.Core.Scoping; -using Umbraco.Core.Services.Implement; -using Umbraco.Web.PublishedCache.NuCache; +using Umbraco.Cms.Core; +using Umbraco.Cms.Core.Events; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Core.Scoping; +using Umbraco.Cms.Core.Services.Implement; -namespace Umbraco.Infrastructure.PublishedCache.Persistence +namespace Umbraco.Cms.Infrastructure.PublishedCache.Persistence { public class NuCacheContentService : RepositoryService, INuCacheContentService { diff --git a/src/Umbraco.PublishedCache.NuCache/Property.cs b/src/Umbraco.PublishedCache.NuCache/Property.cs index 1b70c6504c..2b5655b314 100644 --- a/src/Umbraco.PublishedCache.NuCache/Property.cs +++ b/src/Umbraco.PublishedCache.NuCache/Property.cs @@ -1,15 +1,16 @@ using System; using System.Collections.Generic; using System.Xml.Serialization; -using Umbraco.Core; -using Umbraco.Core.Cache; -using Umbraco.Core.Collections; -using Umbraco.Core.Models; -using Umbraco.Core.Models.PublishedContent; -using Umbraco.Core.PropertyEditors; -using Umbraco.Web.PublishedCache.NuCache.DataSource; +using Umbraco.Cms.Core.Cache; +using Umbraco.Cms.Core.Collections; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Core.Models.PublishedContent; +using Umbraco.Cms.Core.PropertyEditors; +using Umbraco.Cms.Core.PublishedCache; +using Umbraco.Cms.Infrastructure.PublishedCache.DataSource; +using Umbraco.Extensions; -namespace Umbraco.Web.PublishedCache.NuCache +namespace Umbraco.Cms.Infrastructure.PublishedCache { [Serializable] [XmlType(Namespace = "http://umbraco.org/webservices/")] diff --git a/src/Umbraco.PublishedCache.NuCache/PublishedContent.cs b/src/Umbraco.PublishedCache.NuCache/PublishedContent.cs index 9cdc0db4fa..bf34fca4e7 100644 --- a/src/Umbraco.PublishedCache.NuCache/PublishedContent.cs +++ b/src/Umbraco.PublishedCache.NuCache/PublishedContent.cs @@ -1,15 +1,14 @@ using System; using System.Collections.Generic; using System.Linq; -using Umbraco.Core; -using Umbraco.Core.Cache; -using Umbraco.Core.Exceptions; -using Umbraco.Core.Models.PublishedContent; -using Umbraco.Core.Services; -using Umbraco.Web.Models; -using Umbraco.Web.PublishedCache.NuCache.DataSource; +using Umbraco.Cms.Core.Cache; +using Umbraco.Cms.Core.Exceptions; +using Umbraco.Cms.Core.Models.PublishedContent; +using Umbraco.Cms.Core.PublishedCache; +using Umbraco.Cms.Infrastructure.PublishedCache.DataSource; +using Umbraco.Extensions; -namespace Umbraco.Web.PublishedCache.NuCache +namespace Umbraco.Cms.Infrastructure.PublishedCache { internal class PublishedContent : PublishedContentBase { diff --git a/src/Umbraco.PublishedCache.NuCache/PublishedMember.cs b/src/Umbraco.PublishedCache.NuCache/PublishedMember.cs index aa03bf2702..dfd347168a 100644 --- a/src/Umbraco.PublishedCache.NuCache/PublishedMember.cs +++ b/src/Umbraco.PublishedCache.NuCache/PublishedMember.cs @@ -1,16 +1,17 @@ using System; using System.Collections.Generic; using System.Linq; -using Umbraco.Core.Models; -using Umbraco.Core.Models.PublishedContent; -using Umbraco.Web.PublishedCache.NuCache.DataSource; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Core.Models.PublishedContent; +using Umbraco.Cms.Core.PublishedCache; +using Umbraco.Cms.Infrastructure.PublishedCache.DataSource; +using Umbraco.Extensions; -namespace Umbraco.Web.PublishedCache.NuCache +namespace Umbraco.Cms.Infrastructure.PublishedCache { // note // the whole PublishedMember thing should be refactored because as soon as a member // is wrapped on in a model, the inner IMember and all associated properties are lost - internal class PublishedMember : PublishedContent //, IPublishedMember { private readonly IMember _member; diff --git a/src/Umbraco.PublishedCache.NuCache/PublishedSnapshot.cs b/src/Umbraco.PublishedCache.NuCache/PublishedSnapshot.cs index 3f5c1aa4d5..6c158daf31 100644 --- a/src/Umbraco.PublishedCache.NuCache/PublishedSnapshot.cs +++ b/src/Umbraco.PublishedCache.NuCache/PublishedSnapshot.cs @@ -1,8 +1,9 @@ using System; -using Umbraco.Core; -using Umbraco.Core.Cache; +using Umbraco.Cms.Core; +using Umbraco.Cms.Core.Cache; +using Umbraco.Cms.Core.PublishedCache; -namespace Umbraco.Web.PublishedCache.NuCache +namespace Umbraco.Cms.Infrastructure.PublishedCache { // implements published snapshot internal class PublishedSnapshot : IPublishedSnapshot, IDisposable diff --git a/src/Umbraco.PublishedCache.NuCache/PublishedSnapshotService.cs b/src/Umbraco.PublishedCache.NuCache/PublishedSnapshotService.cs index 6cc0416dbb..c507f5af68 100644 --- a/src/Umbraco.PublishedCache.NuCache/PublishedSnapshotService.cs +++ b/src/Umbraco.PublishedCache.NuCache/PublishedSnapshotService.cs @@ -1,6 +1,5 @@ using System; using System.Collections.Generic; -using System.Globalization; using System.IO; using System.Linq; using System.Threading; @@ -8,27 +7,26 @@ using System.Threading.Tasks; using CSharpTest.Net.Collections; using Microsoft.Extensions.Logging; using Microsoft.Extensions.Options; -using Umbraco.Core; -using Umbraco.Core.Cache; -using Umbraco.Core.Configuration.Models; -using Umbraco.Core.Hosting; -using Umbraco.Core.IO; -using Umbraco.Core.Logging; -using Umbraco.Core.Models; -using Umbraco.Core.Models.PublishedContent; -using Umbraco.Core.Persistence; -using Umbraco.Core.Scoping; -using Umbraco.Core.Services; -using Umbraco.Core.Services.Changes; -using Umbraco.Infrastructure.PublishedCache.Persistence; -using Umbraco.Web.Cache; -using Umbraco.Web.PublishedCache.NuCache.DataSource; -using Umbraco.Web.Routing; +using Umbraco.Cms.Core.Cache; +using Umbraco.Cms.Core.Configuration.Models; +using Umbraco.Cms.Core.Hosting; +using Umbraco.Cms.Core.Logging; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Core.Models.PublishedContent; +using Umbraco.Cms.Core.PublishedCache; +using Umbraco.Cms.Core.Routing; +using Umbraco.Cms.Core.Runtime; +using Umbraco.Cms.Core.Scoping; +using Umbraco.Cms.Core.Services; +using Umbraco.Cms.Core.Services.Changes; +using Umbraco.Cms.Infrastructure.PublishedCache.DataSource; +using Umbraco.Cms.Infrastructure.PublishedCache.Persistence; +using Umbraco.Extensions; +using Constants = Umbraco.Cms.Core.Constants; using File = System.IO.File; -namespace Umbraco.Web.PublishedCache.NuCache +namespace Umbraco.Cms.Infrastructure.PublishedCache { - internal class PublishedSnapshotService : IPublishedSnapshotService { private readonly ServiceContext _serviceContext; diff --git a/src/Umbraco.PublishedCache.NuCache/PublishedSnapshotServiceEventHandler.cs b/src/Umbraco.PublishedCache.NuCache/PublishedSnapshotServiceEventHandler.cs index a8f3f9338b..25ceb9fb6a 100644 --- a/src/Umbraco.PublishedCache.NuCache/PublishedSnapshotServiceEventHandler.cs +++ b/src/Umbraco.PublishedCache.NuCache/PublishedSnapshotServiceEventHandler.cs @@ -1,15 +1,17 @@ using System; using System.Linq; -using Umbraco.Core; -using Umbraco.Core.Models; -using Umbraco.Core.Persistence; -using Umbraco.Core.Persistence.Repositories.Implement; -using Umbraco.Core.Services; -using Umbraco.Core.Services.Changes; -using Umbraco.Core.Services.Implement; -using Umbraco.Infrastructure.PublishedCache.Persistence; +using Umbraco.Cms.Core; +using Umbraco.Cms.Core.Events; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Core.PublishedCache; +using Umbraco.Cms.Core.Services; +using Umbraco.Cms.Core.Services.Changes; +using Umbraco.Cms.Core.Services.Implement; +using Umbraco.Cms.Infrastructure.Persistence.Repositories.Implement; +using Umbraco.Cms.Infrastructure.PublishedCache.Persistence; +using Umbraco.Extensions; -namespace Umbraco.Web.PublishedCache.NuCache +namespace Umbraco.Cms.Infrastructure.PublishedCache { /// /// Subscribes to Umbraco events to ensure nucache remains consistent with the source data @@ -157,7 +159,7 @@ namespace Umbraco.Web.PublishedCache.NuCache /// /// If a is ever saved with a different culture, we need to rebuild all of the content nucache database table /// - private void OnLanguageSaved(ILocalizationService sender, Core.Events.SaveEventArgs e) + private void OnLanguageSaved(ILocalizationService sender, SaveEventArgs e) { // culture changed on an existing language var cultureChanged = e.SavedEntities.Any(x => !x.WasPropertyDirty(nameof(ILanguage.Id)) && x.WasPropertyDirty(nameof(ILanguage.IsoCode))); diff --git a/src/Umbraco.PublishedCache.NuCache/PublishedSnapshotServiceOptions.cs b/src/Umbraco.PublishedCache.NuCache/PublishedSnapshotServiceOptions.cs index ef9d83a802..8fcb4e410d 100644 --- a/src/Umbraco.PublishedCache.NuCache/PublishedSnapshotServiceOptions.cs +++ b/src/Umbraco.PublishedCache.NuCache/PublishedSnapshotServiceOptions.cs @@ -1,4 +1,6 @@ -namespace Umbraco.Web.PublishedCache.NuCache +using Umbraco.Cms.Core.PublishedCache; + +namespace Umbraco.Cms.Infrastructure.PublishedCache { /// /// Options class for configuring the diff --git a/src/Umbraco.PublishedCache.NuCache/PublishedSnapshotStatus.cs b/src/Umbraco.PublishedCache.NuCache/PublishedSnapshotStatus.cs index dff40275d8..df4f803006 100644 --- a/src/Umbraco.PublishedCache.NuCache/PublishedSnapshotStatus.cs +++ b/src/Umbraco.PublishedCache.NuCache/PublishedSnapshotStatus.cs @@ -1,6 +1,7 @@ -using Umbraco.Infrastructure.PublishedCache.Persistence; +using Umbraco.Cms.Core.PublishedCache; +using Umbraco.Cms.Infrastructure.PublishedCache.Persistence; -namespace Umbraco.Web.PublishedCache.NuCache +namespace Umbraco.Cms.Infrastructure.PublishedCache { /// /// Generates a status report for diff --git a/src/Umbraco.PublishedCache.NuCache/Snap/GenObj.cs b/src/Umbraco.PublishedCache.NuCache/Snap/GenObj.cs index b69dab7dac..a5dc6ae06b 100644 --- a/src/Umbraco.PublishedCache.NuCache/Snap/GenObj.cs +++ b/src/Umbraco.PublishedCache.NuCache/Snap/GenObj.cs @@ -1,7 +1,7 @@ using System; using System.Threading; -namespace Umbraco.Web.PublishedCache.NuCache.Snap +namespace Umbraco.Cms.Infrastructure.PublishedCache.Snap { internal class GenObj { diff --git a/src/Umbraco.PublishedCache.NuCache/Snap/GenRef.cs b/src/Umbraco.PublishedCache.NuCache/Snap/GenRef.cs index ade0251b8d..7bf0fc8574 100644 --- a/src/Umbraco.PublishedCache.NuCache/Snap/GenRef.cs +++ b/src/Umbraco.PublishedCache.NuCache/Snap/GenRef.cs @@ -1,4 +1,4 @@ -namespace Umbraco.Web.PublishedCache.NuCache.Snap +namespace Umbraco.Cms.Infrastructure.PublishedCache.Snap { internal class GenRef { diff --git a/src/Umbraco.PublishedCache.NuCache/Snap/LinkedNode.cs b/src/Umbraco.PublishedCache.NuCache/Snap/LinkedNode.cs index 94f83ac4e5..df82b47e94 100644 --- a/src/Umbraco.PublishedCache.NuCache/Snap/LinkedNode.cs +++ b/src/Umbraco.PublishedCache.NuCache/Snap/LinkedNode.cs @@ -1,4 +1,4 @@ -namespace Umbraco.Web.PublishedCache.NuCache.Snap +namespace Umbraco.Cms.Infrastructure.PublishedCache.Snap { //NOTE: This cannot be struct because it references itself diff --git a/src/Umbraco.PublishedCache.NuCache/SnapDictionary.cs b/src/Umbraco.PublishedCache.NuCache/SnapDictionary.cs index 589cd06d8a..192eb65768 100644 --- a/src/Umbraco.PublishedCache.NuCache/SnapDictionary.cs +++ b/src/Umbraco.PublishedCache.NuCache/SnapDictionary.cs @@ -4,11 +4,11 @@ using System.Collections.Generic; using System.Linq; using System.Threading; using System.Threading.Tasks; -using Umbraco.Core.Exceptions; -using Umbraco.Core.Scoping; -using Umbraco.Web.PublishedCache.NuCache.Snap; +using Umbraco.Cms.Core.Exceptions; +using Umbraco.Cms.Core.Scoping; +using Umbraco.Cms.Infrastructure.PublishedCache.Snap; -namespace Umbraco.Web.PublishedCache.NuCache +namespace Umbraco.Cms.Infrastructure.PublishedCache { internal class SnapDictionary where TValue : class @@ -90,7 +90,7 @@ namespace Umbraco.Web.PublishedCache.NuCache { private readonly WriteLockInfo _lockinfo = new WriteLockInfo(); private readonly SnapDictionary _dictionary; - + public ScopedWriteLock(SnapDictionary dictionary, bool scoped) { _dictionary = dictionary; @@ -167,7 +167,7 @@ namespace Umbraco.Web.PublishedCache.NuCache _liveGen -= 1; } } - + foreach (var item in _items) { var link = item.Value; diff --git a/src/Umbraco.PublishedCache.NuCache/Umbraco.PublishedCache.NuCache.csproj b/src/Umbraco.PublishedCache.NuCache/Umbraco.PublishedCache.NuCache.csproj index 9f63604b0e..8973054260 100644 --- a/src/Umbraco.PublishedCache.NuCache/Umbraco.PublishedCache.NuCache.csproj +++ b/src/Umbraco.PublishedCache.NuCache/Umbraco.PublishedCache.NuCache.csproj @@ -2,8 +2,9 @@ netstandard2.0 - Umbraco.Infrastructure.PublishedCache + Umbraco.Cms.Infrastructure.PublishedCache 8 + Umbraco.Infrastructure.PublishedCache diff --git a/src/Umbraco.TestData/LoadTestController.cs b/src/Umbraco.TestData/LoadTestController.cs index 1d03c8bb2a..817b7a1d76 100644 --- a/src/Umbraco.TestData/LoadTestController.cs +++ b/src/Umbraco.TestData/LoadTestController.cs @@ -1,18 +1,18 @@ using System; -using System.Threading; +using System.Configuration; +using System.Diagnostics; using System.Linq; -using System.Web.Mvc; -using Umbraco.Core.Services; -using Umbraco.Core.Models; +using System.Threading; using System.Web; using System.Web.Hosting; +using System.Web.Mvc; using System.Web.Routing; -using System.Diagnostics; -using Umbraco.Core.Composing; -using System.Configuration; using Microsoft.Extensions.DependencyInjection; -using Umbraco.Core.Strings; -using Umbraco.Core.DependencyInjection; +using Umbraco.Cms.Core.Composing; +using Umbraco.Cms.Core.DependencyInjection; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Core.Services; +using Umbraco.Cms.Core.Strings; // see https://github.com/Shazwazza/UmbracoScripts/tree/master/src/LoadTesting @@ -61,7 +61,7 @@ namespace Umbraco.TestData "; private static readonly string _containerTemplateText = @" -@inherits Umbraco.Web.Mvc.UmbracoViewPage +@inherits Umbraco.Cms.Web.Common.Views.UmbracoViewPage @{ Layout = null; var container = Umbraco.ContentAtRoot().OfTypes(""" + _containerAlias + @""").FirstOrDefault(); diff --git a/src/Umbraco.TestData/SegmentTestController.cs b/src/Umbraco.TestData/SegmentTestController.cs index 650820760e..35c1acb69b 100644 --- a/src/Umbraco.TestData/SegmentTestController.cs +++ b/src/Umbraco.TestData/SegmentTestController.cs @@ -1,12 +1,9 @@ -using System; -using System.Collections.Generic; -using System.Configuration; +using System.Configuration; using System.Linq; -using System.Text; -using System.Threading.Tasks; using System.Web.Mvc; -using Umbraco.Core; -using Umbraco.Core.Models; +using Umbraco.Cms.Core; +using Umbraco.Cms.Core.Models; +using Umbraco.Extensions; using Umbraco.Web.Mvc; namespace Umbraco.TestData diff --git a/src/Umbraco.TestData/UmbracoTestDataController.cs b/src/Umbraco.TestData/UmbracoTestDataController.cs index 5ce90c9d69..5f02db21b9 100644 --- a/src/Umbraco.TestData/UmbracoTestDataController.cs +++ b/src/Umbraco.TestData/UmbracoTestDataController.cs @@ -1,23 +1,23 @@ using System; using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using Umbraco.Core; -using System.Web.Mvc; -using Umbraco.Core.Cache; -using Umbraco.Core.Logging; -using Umbraco.Core.Models; -using Umbraco.Core.Persistence; -using Umbraco.Core.PropertyEditors; -using Umbraco.Core.Services; -using Umbraco.Web; -using Umbraco.Web.Mvc; using System.Configuration; +using System.Linq; +using System.Web.Mvc; using Bogus; -using Umbraco.Core.Scoping; -using Umbraco.Core.Serialization; -using Umbraco.Core.Strings; +using Umbraco.Cms.Core; +using Umbraco.Cms.Core.Cache; +using Umbraco.Cms.Core.Logging; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Core.PropertyEditors; +using Umbraco.Cms.Core.Scoping; +using Umbraco.Cms.Core.Services; +using Umbraco.Cms.Core.Strings; +using Umbraco.Cms.Core.Web; +using Umbraco.Cms.Infrastructure.Persistence; +using Umbraco.Cms.Infrastructure.Serialization; +using Umbraco.Extensions; +using Umbraco.Web.Mvc; +using Constants = Umbraco.Cms.Core.Constants; namespace Umbraco.TestData { diff --git a/src/Umbraco.Tests.AcceptanceTest/cypress/integration/Content/content.ts b/src/Umbraco.Tests.AcceptanceTest/cypress/integration/Content/content.ts index 22f1f883d0..c862708bbe 100644 --- a/src/Umbraco.Tests.AcceptanceTest/cypress/integration/Content/content.ts +++ b/src/Umbraco.Tests.AcceptanceTest/cypress/integration/Content/content.ts @@ -1,5 +1,6 @@ /// -import { DocumentTypeBuilder, ContentBuilder, AliasHelper } from 'umbraco-cypress-testhelpers'; +import {AliasHelper, ContentBuilder, DocumentTypeBuilder} from 'umbraco-cypress-testhelpers'; + context('Content', () => { beforeEach(() => { @@ -558,7 +559,7 @@ context('Content', () => { cy.saveDocumentType(pickerDocType); // Edit it the template to allow us to verify the rendered view. - cy.editTemplate(pickerDocTypeName, `@inherits Umbraco.Web.Mvc.UmbracoViewPage + cy.editTemplate(pickerDocTypeName, `@inherits Umbraco.Cms.Web.Common.Views.UmbracoViewPage @using ContentModels = Umbraco.Web.PublishedModels; @{ Layout = null; diff --git a/src/Umbraco.Tests.AcceptanceTest/cypress/integration/Settings/partialsViews.ts b/src/Umbraco.Tests.AcceptanceTest/cypress/integration/Settings/partialsViews.ts index 068338f8fa..f664123d3b 100644 --- a/src/Umbraco.Tests.AcceptanceTest/cypress/integration/Settings/partialsViews.ts +++ b/src/Umbraco.Tests.AcceptanceTest/cypress/integration/Settings/partialsViews.ts @@ -1,5 +1,5 @@ /// -import { PartialViewBuilder } from "umbraco-cypress-testhelpers"; +import {PartialViewBuilder} from "umbraco-cypress-testhelpers"; context('Partial Views', () => { @@ -95,7 +95,7 @@ context('Partial Views', () => { // Build and save partial view const partialView = new PartialViewBuilder() .withName(name) - .withContent("@inherits Umbraco.Web.Mvc.UmbracoViewPage") + .withContent("@inherits UUmbraco.Cms.Web.Common.Views.UmbracoViewPage") .build(); cy.savePartialView(partialView); @@ -123,7 +123,7 @@ context('Partial Views', () => { const partialView = new PartialViewBuilder() .withName(name) - .withContent("@inherits Umbraco.Web.Mvc.UmbracoViewPage\n") + .withContent("@inherits Umbraco.Cms.Web.Common.Views.UmbracoViewPage\n") .build(); cy.savePartialView(partialView); diff --git a/src/Umbraco.Tests.AcceptanceTest/cypress/integration/Settings/templates.ts b/src/Umbraco.Tests.AcceptanceTest/cypress/integration/Settings/templates.ts index c586384af7..3122c3ebf7 100644 --- a/src/Umbraco.Tests.AcceptanceTest/cypress/integration/Settings/templates.ts +++ b/src/Umbraco.Tests.AcceptanceTest/cypress/integration/Settings/templates.ts @@ -1,5 +1,5 @@ /// -import { TemplateBuilder } from 'umbraco-cypress-testhelpers'; +import {TemplateBuilder} from 'umbraco-cypress-testhelpers'; context('Templates', () => { @@ -54,7 +54,7 @@ context('Templates', () => { const template = new TemplateBuilder() .withName(name) - .withContent('@inherits Umbraco.Web.Mvc.UmbracoViewPage\n') + .withContent('@inherits Umbraco.Cms.Web.Common.Views.UmbracoViewPage\n') .build(); cy.saveTemplate(template); @@ -87,7 +87,7 @@ context('Templates', () => { const template = new TemplateBuilder() .withName(name) - .withContent('@inherits Umbraco.Web.Mvc.UmbracoViewPage\n') + .withContent('@inherits Umbraco.Cms.Web.Common.Views.UmbracoViewPage\n') .build(); cy.saveTemplate(template); diff --git a/src/Umbraco.Tests.Benchmarks/CombineGuidBenchmarks.cs b/src/Umbraco.Tests.Benchmarks/CombineGuidBenchmarks.cs index ce55f6890d..67b6f42250 100644 --- a/src/Umbraco.Tests.Benchmarks/CombineGuidBenchmarks.cs +++ b/src/Umbraco.Tests.Benchmarks/CombineGuidBenchmarks.cs @@ -1,5 +1,6 @@ using System; using BenchmarkDotNet.Attributes; +using Umbraco.Cms.Core; using Umbraco.Core; using Umbraco.Tests.Benchmarks.Config; diff --git a/src/Umbraco.Tests.Benchmarks/ConcurrentDictionaryBenchmarks.cs b/src/Umbraco.Tests.Benchmarks/ConcurrentDictionaryBenchmarks.cs index 4e8476bb6d..c59cb04500 100644 --- a/src/Umbraco.Tests.Benchmarks/ConcurrentDictionaryBenchmarks.cs +++ b/src/Umbraco.Tests.Benchmarks/ConcurrentDictionaryBenchmarks.cs @@ -5,7 +5,7 @@ using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; -using Umbraco.Core.Collections; +using Umbraco.Cms.Core.Collections; namespace Umbraco.Tests.Benchmarks { diff --git a/src/Umbraco.Tests.Benchmarks/CtorInvokeBenchmarks.cs b/src/Umbraco.Tests.Benchmarks/CtorInvokeBenchmarks.cs index 02696b9b7b..34d885a27d 100644 --- a/src/Umbraco.Tests.Benchmarks/CtorInvokeBenchmarks.cs +++ b/src/Umbraco.Tests.Benchmarks/CtorInvokeBenchmarks.cs @@ -7,6 +7,7 @@ using BenchmarkDotNet.Configs; using BenchmarkDotNet.Diagnosers; using BenchmarkDotNet.Jobs; using Perfolizer.Horology; +using Umbraco.Cms.Core; using Umbraco.Core; namespace Umbraco.Tests.Benchmarks diff --git a/src/Umbraco.Tests.Benchmarks/HexStringBenchmarks.cs b/src/Umbraco.Tests.Benchmarks/HexStringBenchmarks.cs index e29a5a24f3..d5d079f318 100644 --- a/src/Umbraco.Tests.Benchmarks/HexStringBenchmarks.cs +++ b/src/Umbraco.Tests.Benchmarks/HexStringBenchmarks.cs @@ -1,6 +1,7 @@ using System; using System.Text; using BenchmarkDotNet.Attributes; +using Umbraco.Cms.Core; using Umbraco.Core; using Umbraco.Tests.Benchmarks.Config; diff --git a/src/Umbraco.Tests.Benchmarks/ModelToSqlExpressionHelperBenchmarks.cs b/src/Umbraco.Tests.Benchmarks/ModelToSqlExpressionHelperBenchmarks.cs index bc892c34ed..3a0cc8f66e 100644 --- a/src/Umbraco.Tests.Benchmarks/ModelToSqlExpressionHelperBenchmarks.cs +++ b/src/Umbraco.Tests.Benchmarks/ModelToSqlExpressionHelperBenchmarks.cs @@ -2,13 +2,12 @@ using System.Linq.Expressions; using BenchmarkDotNet.Attributes; using Moq; -using Umbraco.Core.Models; -using Umbraco.Core.Persistence; -using Umbraco.Core.Persistence.Mappers; -using Umbraco.Core.Persistence.Querying; -using Umbraco.Core.Persistence.SqlSyntax; -using Umbraco.Infrastructure.Persistence.Mappers; -using Umbraco.Persistence.SqlCe; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Infrastructure.Persistence; +using Umbraco.Cms.Infrastructure.Persistence.Mappers; +using Umbraco.Cms.Infrastructure.Persistence.Querying; +using Umbraco.Cms.Infrastructure.Persistence.SqlSyntax; +using Umbraco.Cms.Persistence.SqlCe; namespace Umbraco.Tests.Benchmarks { diff --git a/src/Umbraco.Tests.Benchmarks/SqlTemplatesBenchmark.cs b/src/Umbraco.Tests.Benchmarks/SqlTemplatesBenchmark.cs index d62ca25bf6..286307aa17 100644 --- a/src/Umbraco.Tests.Benchmarks/SqlTemplatesBenchmark.cs +++ b/src/Umbraco.Tests.Benchmarks/SqlTemplatesBenchmark.cs @@ -2,9 +2,10 @@ using BenchmarkDotNet.Configs; using BenchmarkDotNet.Diagnosers; using NPoco; -using Umbraco.Core.Persistence; -using Umbraco.Core.Persistence.Mappers; -using Umbraco.Persistence.SqlCe; +using Umbraco.Cms.Infrastructure.Persistence; +using Umbraco.Cms.Infrastructure.Persistence.Mappers; +using Umbraco.Cms.Persistence.SqlCe; +using Umbraco.Extensions; namespace Umbraco.Tests.Benchmarks { diff --git a/src/Umbraco.Tests.Benchmarks/TryConvertToBenchmarks.cs b/src/Umbraco.Tests.Benchmarks/TryConvertToBenchmarks.cs index 7e73c5e438..579afc761b 100644 --- a/src/Umbraco.Tests.Benchmarks/TryConvertToBenchmarks.cs +++ b/src/Umbraco.Tests.Benchmarks/TryConvertToBenchmarks.cs @@ -2,8 +2,7 @@ using System.Collections.Generic; using System.Linq; using BenchmarkDotNet.Attributes; -using BenchmarkDotNet.Engines; -using Umbraco.Core; +using Umbraco.Extensions; namespace Umbraco.Tests.Benchmarks { diff --git a/src/Umbraco.Tests.Benchmarks/TypeFinderBenchmarks.cs b/src/Umbraco.Tests.Benchmarks/TypeFinderBenchmarks.cs index 203e19fc6e..907c21f136 100644 --- a/src/Umbraco.Tests.Benchmarks/TypeFinderBenchmarks.cs +++ b/src/Umbraco.Tests.Benchmarks/TypeFinderBenchmarks.cs @@ -1,10 +1,8 @@ -using BenchmarkDotNet.Attributes; -using System; -using System.Linq; -using Microsoft.Extensions.Logging; +using System.Linq; +using BenchmarkDotNet.Attributes; using Microsoft.Extensions.Logging.Abstractions; -using Umbraco.Core.Composing; -using Umbraco.Tests.Benchmarks.Config; +using Umbraco.Cms.Core.Composing; +using Umbraco.Extensions; namespace Umbraco.Tests.Benchmarks { @@ -16,14 +14,14 @@ namespace Umbraco.Tests.Benchmarks [Benchmark(Baseline = true)] public void WithGetReferencingAssembliesCheck() { - var typeFinder1 = new TypeFinder(new NullLogger(), new DefaultUmbracoAssemblyProvider(GetType().Assembly), new VaryingRuntimeHash()); + var typeFinder1 = new TypeFinder(new NullLogger(), new DefaultUmbracoAssemblyProvider(GetType().Assembly, NullLoggerFactory.Instance), new VaryingRuntimeHash()); var found = typeFinder1.FindClassesOfType().Count(); } [Benchmark] public void WithoutGetReferencingAssembliesCheck() { - var typeFinder2 = new TypeFinder(new NullLogger(), new DefaultUmbracoAssemblyProvider(GetType().Assembly), new VaryingRuntimeHash()); + var typeFinder2 = new TypeFinder(new NullLogger(), new DefaultUmbracoAssemblyProvider(GetType().Assembly, NullLoggerFactory.Instance), new VaryingRuntimeHash()); typeFinder2.QueryWithReferencingAssemblies = false; var found = typeFinder2.FindClassesOfType().Count(); } diff --git a/src/Umbraco.Tests.Benchmarks/Umbraco.Tests.Benchmarks.csproj b/src/Umbraco.Tests.Benchmarks/Umbraco.Tests.Benchmarks.csproj index 8b180f5a37..fce12ded71 100644 --- a/src/Umbraco.Tests.Benchmarks/Umbraco.Tests.Benchmarks.csproj +++ b/src/Umbraco.Tests.Benchmarks/Umbraco.Tests.Benchmarks.csproj @@ -36,9 +36,6 @@ 7.3 - - C:\Users\Berg\.nuget\packages\perfolizer\0.2.1\lib\netstandard2.0\Perfolizer.dll - @@ -111,4 +108,4 @@ - + \ No newline at end of file diff --git a/src/Umbraco.Tests.Common/Builders/AuditEntryBuilder.cs b/src/Umbraco.Tests.Common/Builders/AuditEntryBuilder.cs index 447aab3fe9..de8d81904a 100644 --- a/src/Umbraco.Tests.Common/Builders/AuditEntryBuilder.cs +++ b/src/Umbraco.Tests.Common/Builders/AuditEntryBuilder.cs @@ -2,10 +2,10 @@ // See LICENSE for more details. using System; -using Umbraco.Core.Models; -using Umbraco.Tests.Common.Builders.Interfaces; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Tests.Common.Builders.Interfaces; -namespace Umbraco.Tests.Common.Builders +namespace Umbraco.Cms.Tests.Common.Builders { public class AuditEntryBuilder : AuditEntryBuilder { diff --git a/src/Umbraco.Tests.Common/Builders/BuilderBase.cs b/src/Umbraco.Tests.Common/Builders/BuilderBase.cs index 102e5eaf05..9b48e63b56 100644 --- a/src/Umbraco.Tests.Common/Builders/BuilderBase.cs +++ b/src/Umbraco.Tests.Common/Builders/BuilderBase.cs @@ -3,7 +3,7 @@ using System; -namespace Umbraco.Tests.Common.Builders +namespace Umbraco.Cms.Tests.Common.Builders { public abstract class BuilderBase { diff --git a/src/Umbraco.Tests.Common/Builders/ChildBuilderBase.cs b/src/Umbraco.Tests.Common/Builders/ChildBuilderBase.cs index feb87f9556..fb5904a21a 100644 --- a/src/Umbraco.Tests.Common/Builders/ChildBuilderBase.cs +++ b/src/Umbraco.Tests.Common/Builders/ChildBuilderBase.cs @@ -1,7 +1,7 @@ // Copyright (c) Umbraco. // See LICENSE for more details. -namespace Umbraco.Tests.Common.Builders +namespace Umbraco.Cms.Tests.Common.Builders { public abstract class ChildBuilderBase : BuilderBase { diff --git a/src/Umbraco.Tests.Common/Builders/ConfigurationEditorBuilder.cs b/src/Umbraco.Tests.Common/Builders/ConfigurationEditorBuilder.cs index 2d8a93e772..8e910ee39b 100644 --- a/src/Umbraco.Tests.Common/Builders/ConfigurationEditorBuilder.cs +++ b/src/Umbraco.Tests.Common/Builders/ConfigurationEditorBuilder.cs @@ -2,9 +2,9 @@ // See LICENSE for more details. using System.Collections.Generic; -using Umbraco.Core.PropertyEditors; +using Umbraco.Cms.Core.PropertyEditors; -namespace Umbraco.Tests.Common.Builders +namespace Umbraco.Cms.Tests.Common.Builders { public class ConfigurationEditorBuilder : ChildBuilderBase { diff --git a/src/Umbraco.Tests.Common/Builders/ContentBuilder.cs b/src/Umbraco.Tests.Common/Builders/ContentBuilder.cs index 715b504d71..6602c7b25c 100644 --- a/src/Umbraco.Tests.Common/Builders/ContentBuilder.cs +++ b/src/Umbraco.Tests.Common/Builders/ContentBuilder.cs @@ -4,13 +4,14 @@ using System; using System.Collections.Generic; using System.Globalization; -using Umbraco.Core; -using Umbraco.Core.Models; -using Umbraco.Tests.Common.Builders.Extensions; -using Umbraco.Tests.Common.Builders.Interfaces; -using Umbraco.Tests.Testing; +using Umbraco.Cms.Core; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Tests.Common.Builders.Extensions; +using Umbraco.Cms.Tests.Common.Builders.Interfaces; +using Umbraco.Cms.Tests.Common.Extensions; +using Constants = Umbraco.Cms.Core.Constants; -namespace Umbraco.Tests.Common.Builders +namespace Umbraco.Cms.Tests.Common.Builders { public class ContentBuilder : BuilderBase, diff --git a/src/Umbraco.Tests.Common/Builders/ContentItemSaveBuilder.cs b/src/Umbraco.Tests.Common/Builders/ContentItemSaveBuilder.cs index 5eadd01608..bcd73451f3 100644 --- a/src/Umbraco.Tests.Common/Builders/ContentItemSaveBuilder.cs +++ b/src/Umbraco.Tests.Common/Builders/ContentItemSaveBuilder.cs @@ -3,10 +3,10 @@ using System.Collections.Generic; using System.Linq; -using Umbraco.Tests.Common.Builders.Interfaces; -using Umbraco.Web.Models.ContentEditing; +using Umbraco.Cms.Core.Models.ContentEditing; +using Umbraco.Cms.Tests.Common.Builders.Interfaces; -namespace Umbraco.Tests.Common.Builders +namespace Umbraco.Cms.Tests.Common.Builders { public class ContentItemSaveBuilder : BuilderBase, IWithIdBuilder, diff --git a/src/Umbraco.Tests.Common/Builders/ContentPropertyBasicBuilder.cs b/src/Umbraco.Tests.Common/Builders/ContentPropertyBasicBuilder.cs index a9ff520228..7f4a57f0bf 100644 --- a/src/Umbraco.Tests.Common/Builders/ContentPropertyBasicBuilder.cs +++ b/src/Umbraco.Tests.Common/Builders/ContentPropertyBasicBuilder.cs @@ -1,10 +1,10 @@ // Copyright (c) Umbraco. // See LICENSE for more details. -using Umbraco.Tests.Common.Builders.Interfaces; -using Umbraco.Web.Models.ContentEditing; +using Umbraco.Cms.Core.Models.ContentEditing; +using Umbraco.Cms.Tests.Common.Builders.Interfaces; -namespace Umbraco.Tests.Common.Builders +namespace Umbraco.Cms.Tests.Common.Builders { public class ContentPropertyBasicBuilder : ChildBuilderBase, IWithIdBuilder, IWithAliasBuilder diff --git a/src/Umbraco.Tests.Common/Builders/ContentTypeBaseBuilder.cs b/src/Umbraco.Tests.Common/Builders/ContentTypeBaseBuilder.cs index 0f00cc53d7..6c8a14dff2 100644 --- a/src/Umbraco.Tests.Common/Builders/ContentTypeBaseBuilder.cs +++ b/src/Umbraco.Tests.Common/Builders/ContentTypeBaseBuilder.cs @@ -3,12 +3,12 @@ using System; using System.Collections.Generic; -using Umbraco.Core.Models; -using Umbraco.Core.Strings; -using Umbraco.Tests.Common.Builders.Extensions; -using Umbraco.Tests.Common.Builders.Interfaces; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Core.Strings; +using Umbraco.Cms.Tests.Common.Builders.Extensions; +using Umbraco.Cms.Tests.Common.Builders.Interfaces; -namespace Umbraco.Tests.Common.Builders +namespace Umbraco.Cms.Tests.Common.Builders { public abstract class ContentTypeBaseBuilder : ChildBuilderBase, diff --git a/src/Umbraco.Tests.Common/Builders/ContentTypeBuilder.cs b/src/Umbraco.Tests.Common/Builders/ContentTypeBuilder.cs index 80aa414e46..39d0179825 100644 --- a/src/Umbraco.Tests.Common/Builders/ContentTypeBuilder.cs +++ b/src/Umbraco.Tests.Common/Builders/ContentTypeBuilder.cs @@ -3,12 +3,12 @@ using System.Collections.Generic; using System.Linq; -using Umbraco.Core; -using Umbraco.Core.Models; -using Umbraco.Tests.Common.Builders.Extensions; -using Umbraco.Tests.Common.Builders.Interfaces; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Tests.Common.Builders.Extensions; +using Umbraco.Cms.Tests.Common.Builders.Interfaces; +using Constants = Umbraco.Cms.Core.Constants; -namespace Umbraco.Tests.Common.Builders +namespace Umbraco.Cms.Tests.Common.Builders { public class ContentTypeBuilder : ContentTypeBaseBuilder, diff --git a/src/Umbraco.Tests.Common/Builders/ContentTypeSortBuilder.cs b/src/Umbraco.Tests.Common/Builders/ContentTypeSortBuilder.cs index 3e7c886623..b880c4fee6 100644 --- a/src/Umbraco.Tests.Common/Builders/ContentTypeSortBuilder.cs +++ b/src/Umbraco.Tests.Common/Builders/ContentTypeSortBuilder.cs @@ -2,11 +2,11 @@ // See LICENSE for more details. using System; -using Umbraco.Core.Models; -using Umbraco.Tests.Common.Builders.Extensions; -using Umbraco.Tests.Common.Builders.Interfaces; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Tests.Common.Builders.Extensions; +using Umbraco.Cms.Tests.Common.Builders.Interfaces; -namespace Umbraco.Tests.Common.Builders +namespace Umbraco.Cms.Tests.Common.Builders { public class ContentTypeSortBuilder : ChildBuilderBase, diff --git a/src/Umbraco.Tests.Common/Builders/ContentVariantSaveBuilder.cs b/src/Umbraco.Tests.Common/Builders/ContentVariantSaveBuilder.cs index 3408e6a244..89241127ed 100644 --- a/src/Umbraco.Tests.Common/Builders/ContentVariantSaveBuilder.cs +++ b/src/Umbraco.Tests.Common/Builders/ContentVariantSaveBuilder.cs @@ -4,10 +4,10 @@ using System.Collections.Generic; using System.Globalization; using System.Linq; -using Umbraco.Tests.Common.Builders.Interfaces; -using Umbraco.Web.Models.ContentEditing; +using Umbraco.Cms.Core.Models.ContentEditing; +using Umbraco.Cms.Tests.Common.Builders.Interfaces; -namespace Umbraco.Tests.Common.Builders +namespace Umbraco.Cms.Tests.Common.Builders { public class ContentVariantSaveBuilder : ChildBuilderBase, IWithNameBuilder, diff --git a/src/Umbraco.Tests.Common/Builders/DataEditorBuilder.cs b/src/Umbraco.Tests.Common/Builders/DataEditorBuilder.cs index b4db018322..6a5cb84048 100644 --- a/src/Umbraco.Tests.Common/Builders/DataEditorBuilder.cs +++ b/src/Umbraco.Tests.Common/Builders/DataEditorBuilder.cs @@ -4,12 +4,13 @@ using System.Collections.Generic; using Microsoft.Extensions.Logging.Abstractions; using Moq; -using Umbraco.Core.PropertyEditors; -using Umbraco.Core.Serialization; -using Umbraco.Core.Services; -using Umbraco.Core.Strings; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Core.PropertyEditors; +using Umbraco.Cms.Core.Serialization; +using Umbraco.Cms.Core.Services; +using Umbraco.Cms.Core.Strings; -namespace Umbraco.Tests.Common.Builders +namespace Umbraco.Cms.Tests.Common.Builders { public class DataEditorBuilder : ChildBuilderBase { diff --git a/src/Umbraco.Tests.Common/Builders/DataTypeBuilder.cs b/src/Umbraco.Tests.Common/Builders/DataTypeBuilder.cs index d853b2a5c2..e5cab30986 100644 --- a/src/Umbraco.Tests.Common/Builders/DataTypeBuilder.cs +++ b/src/Umbraco.Tests.Common/Builders/DataTypeBuilder.cs @@ -2,11 +2,12 @@ // See LICENSE for more details. using System; -using Umbraco.Core.Models; -using Umbraco.Core.Serialization; -using Umbraco.Tests.Common.Builders.Interfaces; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Core.PropertyEditors; +using Umbraco.Cms.Infrastructure.Serialization; +using Umbraco.Cms.Tests.Common.Builders.Interfaces; -namespace Umbraco.Tests.Common.Builders +namespace Umbraco.Cms.Tests.Common.Builders { public class DataTypeBuilder : BuilderBase, @@ -50,7 +51,7 @@ namespace Umbraco.Tests.Common.Builders public override DataType Build() { - Core.PropertyEditors.IDataEditor editor = _dataEditorBuilder.Build(); + IDataEditor editor = _dataEditorBuilder.Build(); var parentId = _parentId ?? -1; var id = _id ?? 1; Guid key = _key ?? Guid.NewGuid(); diff --git a/src/Umbraco.Tests.Common/Builders/DataValueEditorBuilder.cs b/src/Umbraco.Tests.Common/Builders/DataValueEditorBuilder.cs index 70a8e2c706..7560ac9b2b 100644 --- a/src/Umbraco.Tests.Common/Builders/DataValueEditorBuilder.cs +++ b/src/Umbraco.Tests.Common/Builders/DataValueEditorBuilder.cs @@ -3,12 +3,13 @@ using System; using Moq; -using Umbraco.Core.PropertyEditors; -using Umbraco.Core.Serialization; -using Umbraco.Core.Services; -using Umbraco.Core.Strings; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Core.PropertyEditors; +using Umbraco.Cms.Core.Serialization; +using Umbraco.Cms.Core.Services; +using Umbraco.Cms.Core.Strings; -namespace Umbraco.Tests.Common.Builders +namespace Umbraco.Cms.Tests.Common.Builders { public class DataValueEditorBuilder : ChildBuilderBase { diff --git a/src/Umbraco.Tests.Common/Builders/DictionaryItemBuilder.cs b/src/Umbraco.Tests.Common/Builders/DictionaryItemBuilder.cs index 9ad4c4178e..7c7e68a9cb 100644 --- a/src/Umbraco.Tests.Common/Builders/DictionaryItemBuilder.cs +++ b/src/Umbraco.Tests.Common/Builders/DictionaryItemBuilder.cs @@ -4,10 +4,10 @@ using System; using System.Collections.Generic; using System.Linq; -using Umbraco.Core.Models; -using Umbraco.Tests.Common.Builders.Interfaces; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Tests.Common.Builders.Interfaces; -namespace Umbraco.Tests.Common.Builders +namespace Umbraco.Cms.Tests.Common.Builders { public class DictionaryItemBuilder : BuilderBase, diff --git a/src/Umbraco.Tests.Common/Builders/DictionaryTranslationBuilder.cs b/src/Umbraco.Tests.Common/Builders/DictionaryTranslationBuilder.cs index 6029097307..ea3dbe02c0 100644 --- a/src/Umbraco.Tests.Common/Builders/DictionaryTranslationBuilder.cs +++ b/src/Umbraco.Tests.Common/Builders/DictionaryTranslationBuilder.cs @@ -2,10 +2,10 @@ // See LICENSE for more details. using System; -using Umbraco.Core.Models; -using Umbraco.Tests.Common.Builders.Interfaces; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Tests.Common.Builders.Interfaces; -namespace Umbraco.Tests.Common.Builders +namespace Umbraco.Cms.Tests.Common.Builders { public class DictionaryTranslationBuilder : ChildBuilderBase, diff --git a/src/Umbraco.Tests.Common/Builders/DocumentEntitySlimBuilder.cs b/src/Umbraco.Tests.Common/Builders/DocumentEntitySlimBuilder.cs index 490f94f789..b597600301 100644 --- a/src/Umbraco.Tests.Common/Builders/DocumentEntitySlimBuilder.cs +++ b/src/Umbraco.Tests.Common/Builders/DocumentEntitySlimBuilder.cs @@ -3,10 +3,10 @@ using System; using System.Collections.Generic; -using Umbraco.Core.Models.Entities; -using Umbraco.Tests.Common.Builders.Interfaces; +using Umbraco.Cms.Core.Models.Entities; +using Umbraco.Cms.Tests.Common.Builders.Interfaces; -namespace Umbraco.Tests.Common.Builders +namespace Umbraco.Cms.Tests.Common.Builders { public class DocumentEntitySlimBuilder : BuilderBase, diff --git a/src/Umbraco.Tests.Common/Builders/EntitySlimBuilder.cs b/src/Umbraco.Tests.Common/Builders/EntitySlimBuilder.cs index ce35bb21b1..e5053db676 100644 --- a/src/Umbraco.Tests.Common/Builders/EntitySlimBuilder.cs +++ b/src/Umbraco.Tests.Common/Builders/EntitySlimBuilder.cs @@ -1,10 +1,10 @@ // Copyright (c) Umbraco. // See LICENSE for more details. -using Umbraco.Core.Models.Entities; -using Umbraco.Tests.Common.Builders.Interfaces; +using Umbraco.Cms.Core.Models.Entities; +using Umbraco.Cms.Tests.Common.Builders.Interfaces; -namespace Umbraco.Tests.Common.Builders +namespace Umbraco.Cms.Tests.Common.Builders { public class EntitySlimBuilder : BuilderBase, diff --git a/src/Umbraco.Tests.Common/Builders/Extensions/BuilderExtensions.cs b/src/Umbraco.Tests.Common/Builders/Extensions/BuilderExtensions.cs index c93b150647..b563cc3ec4 100644 --- a/src/Umbraco.Tests.Common/Builders/Extensions/BuilderExtensions.cs +++ b/src/Umbraco.Tests.Common/Builders/Extensions/BuilderExtensions.cs @@ -3,10 +3,10 @@ using System; using System.Globalization; -using Umbraco.Core.Models; -using Umbraco.Tests.Common.Builders.Interfaces; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Tests.Common.Builders.Interfaces; -namespace Umbraco.Tests.Common.Builders.Extensions +namespace Umbraco.Cms.Tests.Common.Builders.Extensions { public static class BuilderExtensions { diff --git a/src/Umbraco.Tests.Common/Builders/Extensions/ContentItemSaveBuilderExtensions.cs b/src/Umbraco.Tests.Common/Builders/Extensions/ContentItemSaveBuilderExtensions.cs index 04e95bd8a4..9167d3a77f 100644 --- a/src/Umbraco.Tests.Common/Builders/Extensions/ContentItemSaveBuilderExtensions.cs +++ b/src/Umbraco.Tests.Common/Builders/Extensions/ContentItemSaveBuilderExtensions.cs @@ -1,9 +1,9 @@ // Copyright (c) Umbraco. // See LICENSE for more details. -using Umbraco.Core.Models; +using Umbraco.Cms.Core.Models; -namespace Umbraco.Tests.Common.Builders.Extensions +namespace Umbraco.Cms.Tests.Common.Builders.Extensions { public static class ContentItemSaveBuilderExtensions { diff --git a/src/Umbraco.Tests.Common/Builders/Extensions/ContentTypeBuilderExtensions.cs b/src/Umbraco.Tests.Common/Builders/Extensions/ContentTypeBuilderExtensions.cs index 4ff0bae60c..92adfd3d67 100644 --- a/src/Umbraco.Tests.Common/Builders/Extensions/ContentTypeBuilderExtensions.cs +++ b/src/Umbraco.Tests.Common/Builders/Extensions/ContentTypeBuilderExtensions.cs @@ -1,10 +1,10 @@ // Copyright (c) Umbraco. // See LICENSE for more details. -using Umbraco.Core; -using Umbraco.Core.Models; +using Umbraco.Cms.Core.Models; +using Constants = Umbraco.Cms.Core.Constants; -namespace Umbraco.Tests.Common.Builders.Extensions +namespace Umbraco.Cms.Tests.Common.Builders.Extensions { public static class ContentTypeBuilderExtensions { diff --git a/src/Umbraco.Tests.Common/Builders/Extensions/StringExtensions.cs b/src/Umbraco.Tests.Common/Builders/Extensions/StringExtensions.cs index e0fef2647f..45d5bdb354 100644 --- a/src/Umbraco.Tests.Common/Builders/Extensions/StringExtensions.cs +++ b/src/Umbraco.Tests.Common/Builders/Extensions/StringExtensions.cs @@ -1,7 +1,7 @@ // Copyright (c) Umbraco. // See LICENSE for more details. -namespace Umbraco.Tests.Common.Builders.Extensions +namespace Umbraco.Cms.Tests.Common.Builders.Extensions { public static class StringExtensions { diff --git a/src/Umbraco.Tests.Common/Builders/GenericCollectionBuilder.cs b/src/Umbraco.Tests.Common/Builders/GenericCollectionBuilder.cs index 7fc58e4961..69c9f6245f 100644 --- a/src/Umbraco.Tests.Common/Builders/GenericCollectionBuilder.cs +++ b/src/Umbraco.Tests.Common/Builders/GenericCollectionBuilder.cs @@ -4,7 +4,7 @@ using System.Collections.Generic; using System.Linq; -namespace Umbraco.Tests.Common.Builders +namespace Umbraco.Cms.Tests.Common.Builders { public class GenericCollectionBuilder : ChildBuilderBase> diff --git a/src/Umbraco.Tests.Common/Builders/GenericDictionaryBuilder.cs b/src/Umbraco.Tests.Common/Builders/GenericDictionaryBuilder.cs index 3d7823b612..371dd88cf3 100644 --- a/src/Umbraco.Tests.Common/Builders/GenericDictionaryBuilder.cs +++ b/src/Umbraco.Tests.Common/Builders/GenericDictionaryBuilder.cs @@ -3,7 +3,7 @@ using System.Collections.Generic; -namespace Umbraco.Tests.Common.Builders +namespace Umbraco.Cms.Tests.Common.Builders { public class GenericDictionaryBuilder : ChildBuilderBase> diff --git a/src/Umbraco.Tests.Common/Builders/Interfaces/IAccountBuilder.cs b/src/Umbraco.Tests.Common/Builders/Interfaces/IAccountBuilder.cs index 1249209418..74786d7e1f 100644 --- a/src/Umbraco.Tests.Common/Builders/Interfaces/IAccountBuilder.cs +++ b/src/Umbraco.Tests.Common/Builders/Interfaces/IAccountBuilder.cs @@ -1,7 +1,7 @@ // Copyright (c) Umbraco. // See LICENSE for more details. -namespace Umbraco.Tests.Common.Builders.Interfaces +namespace Umbraco.Cms.Tests.Common.Builders.Interfaces { public interface IAccountBuilder : IWithLoginBuilder, IWithEmailBuilder, diff --git a/src/Umbraco.Tests.Common/Builders/Interfaces/IBuildContentTypes.cs b/src/Umbraco.Tests.Common/Builders/Interfaces/IBuildContentTypes.cs index 740da59a10..d8cfcc70ca 100644 --- a/src/Umbraco.Tests.Common/Builders/Interfaces/IBuildContentTypes.cs +++ b/src/Umbraco.Tests.Common/Builders/Interfaces/IBuildContentTypes.cs @@ -1,7 +1,7 @@ // Copyright (c) Umbraco. // See LICENSE for more details. -namespace Umbraco.Tests.Common.Builders.Interfaces +namespace Umbraco.Cms.Tests.Common.Builders.Interfaces { public interface IBuildContentTypes { diff --git a/src/Umbraco.Tests.Common/Builders/Interfaces/IBuildPropertyGroups.cs b/src/Umbraco.Tests.Common/Builders/Interfaces/IBuildPropertyGroups.cs index 756aa19744..ea836503bc 100644 --- a/src/Umbraco.Tests.Common/Builders/Interfaces/IBuildPropertyGroups.cs +++ b/src/Umbraco.Tests.Common/Builders/Interfaces/IBuildPropertyGroups.cs @@ -1,7 +1,7 @@ // Copyright (c) Umbraco. // See LICENSE for more details. -namespace Umbraco.Tests.Common.Builders.Interfaces +namespace Umbraco.Cms.Tests.Common.Builders.Interfaces { public interface IBuildPropertyGroups { diff --git a/src/Umbraco.Tests.Common/Builders/Interfaces/IBuildPropertyTypes.cs b/src/Umbraco.Tests.Common/Builders/Interfaces/IBuildPropertyTypes.cs index 91a7c10041..c35d100163 100644 --- a/src/Umbraco.Tests.Common/Builders/Interfaces/IBuildPropertyTypes.cs +++ b/src/Umbraco.Tests.Common/Builders/Interfaces/IBuildPropertyTypes.cs @@ -1,7 +1,7 @@ // Copyright (c) Umbraco. // See LICENSE for more details. -namespace Umbraco.Tests.Common.Builders.Interfaces +namespace Umbraco.Cms.Tests.Common.Builders.Interfaces { public interface IBuildPropertyTypes { diff --git a/src/Umbraco.Tests.Common/Builders/Interfaces/IWithAliasBuilder.cs b/src/Umbraco.Tests.Common/Builders/Interfaces/IWithAliasBuilder.cs index cf4db5382b..7acef7bfb5 100644 --- a/src/Umbraco.Tests.Common/Builders/Interfaces/IWithAliasBuilder.cs +++ b/src/Umbraco.Tests.Common/Builders/Interfaces/IWithAliasBuilder.cs @@ -1,7 +1,7 @@ // Copyright (c) Umbraco. // See LICENSE for more details. -namespace Umbraco.Tests.Common.Builders.Interfaces +namespace Umbraco.Cms.Tests.Common.Builders.Interfaces { public interface IWithAliasBuilder { diff --git a/src/Umbraco.Tests.Common/Builders/Interfaces/IWithCreateDateBuilder.cs b/src/Umbraco.Tests.Common/Builders/Interfaces/IWithCreateDateBuilder.cs index 46745c4428..92b8212b2b 100644 --- a/src/Umbraco.Tests.Common/Builders/Interfaces/IWithCreateDateBuilder.cs +++ b/src/Umbraco.Tests.Common/Builders/Interfaces/IWithCreateDateBuilder.cs @@ -3,7 +3,7 @@ using System; -namespace Umbraco.Tests.Common.Builders.Interfaces +namespace Umbraco.Cms.Tests.Common.Builders.Interfaces { public interface IWithCreateDateBuilder { diff --git a/src/Umbraco.Tests.Common/Builders/Interfaces/IWithCreatorIdBuilder.cs b/src/Umbraco.Tests.Common/Builders/Interfaces/IWithCreatorIdBuilder.cs index 0f3e11a4de..685235860b 100644 --- a/src/Umbraco.Tests.Common/Builders/Interfaces/IWithCreatorIdBuilder.cs +++ b/src/Umbraco.Tests.Common/Builders/Interfaces/IWithCreatorIdBuilder.cs @@ -1,9 +1,7 @@ // Copyright (c) Umbraco. // See LICENSE for more details. -using System; - -namespace Umbraco.Tests.Common.Builders.Interfaces +namespace Umbraco.Cms.Tests.Common.Builders.Interfaces { public interface IWithCreatorIdBuilder { diff --git a/src/Umbraco.Tests.Common/Builders/Interfaces/IWithCultureInfoBuilder.cs b/src/Umbraco.Tests.Common/Builders/Interfaces/IWithCultureInfoBuilder.cs index bcb74c5c94..23bbdd344b 100644 --- a/src/Umbraco.Tests.Common/Builders/Interfaces/IWithCultureInfoBuilder.cs +++ b/src/Umbraco.Tests.Common/Builders/Interfaces/IWithCultureInfoBuilder.cs @@ -3,7 +3,7 @@ using System.Globalization; -namespace Umbraco.Tests.Common.Builders.Interfaces +namespace Umbraco.Cms.Tests.Common.Builders.Interfaces { public interface IWithCultureInfoBuilder { diff --git a/src/Umbraco.Tests.Common/Builders/Interfaces/IWithDeleteDateBuilder.cs b/src/Umbraco.Tests.Common/Builders/Interfaces/IWithDeleteDateBuilder.cs index 25042be231..a50a8294d8 100644 --- a/src/Umbraco.Tests.Common/Builders/Interfaces/IWithDeleteDateBuilder.cs +++ b/src/Umbraco.Tests.Common/Builders/Interfaces/IWithDeleteDateBuilder.cs @@ -3,7 +3,7 @@ using System; -namespace Umbraco.Tests.Common.Builders.Interfaces +namespace Umbraco.Cms.Tests.Common.Builders.Interfaces { public interface IWithDeleteDateBuilder { diff --git a/src/Umbraco.Tests.Common/Builders/Interfaces/IWithDescriptionBuilder.cs b/src/Umbraco.Tests.Common/Builders/Interfaces/IWithDescriptionBuilder.cs index 98d14d81bc..2b2bf4f369 100644 --- a/src/Umbraco.Tests.Common/Builders/Interfaces/IWithDescriptionBuilder.cs +++ b/src/Umbraco.Tests.Common/Builders/Interfaces/IWithDescriptionBuilder.cs @@ -1,7 +1,7 @@ // Copyright (c) Umbraco. // See LICENSE for more details. -namespace Umbraco.Tests.Common.Builders.Interfaces +namespace Umbraco.Cms.Tests.Common.Builders.Interfaces { public interface IWithDescriptionBuilder { diff --git a/src/Umbraco.Tests.Common/Builders/Interfaces/IWithEmailBuilder.cs b/src/Umbraco.Tests.Common/Builders/Interfaces/IWithEmailBuilder.cs index 4dd5708aaf..defec80a46 100644 --- a/src/Umbraco.Tests.Common/Builders/Interfaces/IWithEmailBuilder.cs +++ b/src/Umbraco.Tests.Common/Builders/Interfaces/IWithEmailBuilder.cs @@ -1,7 +1,7 @@ // Copyright (c) Umbraco. // See LICENSE for more details. -namespace Umbraco.Tests.Common.Builders.Interfaces +namespace Umbraco.Cms.Tests.Common.Builders.Interfaces { public interface IWithEmailBuilder { diff --git a/src/Umbraco.Tests.Common/Builders/Interfaces/IWithFailedPasswordAttemptsBuilder.cs b/src/Umbraco.Tests.Common/Builders/Interfaces/IWithFailedPasswordAttemptsBuilder.cs index 7669a7609e..0bf1121fa5 100644 --- a/src/Umbraco.Tests.Common/Builders/Interfaces/IWithFailedPasswordAttemptsBuilder.cs +++ b/src/Umbraco.Tests.Common/Builders/Interfaces/IWithFailedPasswordAttemptsBuilder.cs @@ -1,7 +1,7 @@ // Copyright (c) Umbraco. // See LICENSE for more details. -namespace Umbraco.Tests.Common.Builders.Interfaces +namespace Umbraco.Cms.Tests.Common.Builders.Interfaces { public interface IWithFailedPasswordAttemptsBuilder { diff --git a/src/Umbraco.Tests.Common/Builders/Interfaces/IWithIconBuilder.cs b/src/Umbraco.Tests.Common/Builders/Interfaces/IWithIconBuilder.cs index a58c8c554b..a2b5667701 100644 --- a/src/Umbraco.Tests.Common/Builders/Interfaces/IWithIconBuilder.cs +++ b/src/Umbraco.Tests.Common/Builders/Interfaces/IWithIconBuilder.cs @@ -1,7 +1,7 @@ // Copyright (c) Umbraco. // See LICENSE for more details. -namespace Umbraco.Tests.Common.Builders.Interfaces +namespace Umbraco.Cms.Tests.Common.Builders.Interfaces { public interface IWithIconBuilder { diff --git a/src/Umbraco.Tests.Common/Builders/Interfaces/IWithIdBuilder.cs b/src/Umbraco.Tests.Common/Builders/Interfaces/IWithIdBuilder.cs index 8f99388086..fe26c89d85 100644 --- a/src/Umbraco.Tests.Common/Builders/Interfaces/IWithIdBuilder.cs +++ b/src/Umbraco.Tests.Common/Builders/Interfaces/IWithIdBuilder.cs @@ -1,7 +1,7 @@ // Copyright (c) Umbraco. // See LICENSE for more details. -namespace Umbraco.Tests.Common.Builders.Interfaces +namespace Umbraco.Cms.Tests.Common.Builders.Interfaces { public interface IWithIdBuilder { diff --git a/src/Umbraco.Tests.Common/Builders/Interfaces/IWithIsApprovedBuilder.cs b/src/Umbraco.Tests.Common/Builders/Interfaces/IWithIsApprovedBuilder.cs index 2645bc8071..c9fc310592 100644 --- a/src/Umbraco.Tests.Common/Builders/Interfaces/IWithIsApprovedBuilder.cs +++ b/src/Umbraco.Tests.Common/Builders/Interfaces/IWithIsApprovedBuilder.cs @@ -1,7 +1,7 @@ // Copyright (c) Umbraco. // See LICENSE for more details. -namespace Umbraco.Tests.Common.Builders.Interfaces +namespace Umbraco.Cms.Tests.Common.Builders.Interfaces { public interface IWithIsApprovedBuilder { diff --git a/src/Umbraco.Tests.Common/Builders/Interfaces/IWithIsContainerBuilder.cs b/src/Umbraco.Tests.Common/Builders/Interfaces/IWithIsContainerBuilder.cs index a74f2b658f..f2b0a64d7b 100644 --- a/src/Umbraco.Tests.Common/Builders/Interfaces/IWithIsContainerBuilder.cs +++ b/src/Umbraco.Tests.Common/Builders/Interfaces/IWithIsContainerBuilder.cs @@ -1,7 +1,7 @@ // Copyright (c) Umbraco. // See LICENSE for more details. -namespace Umbraco.Tests.Common.Builders.Interfaces +namespace Umbraco.Cms.Tests.Common.Builders.Interfaces { public interface IWithIsContainerBuilder { diff --git a/src/Umbraco.Tests.Common/Builders/Interfaces/IWithIsLockedOutBuilder.cs b/src/Umbraco.Tests.Common/Builders/Interfaces/IWithIsLockedOutBuilder.cs index d10db7d881..3d3562a023 100644 --- a/src/Umbraco.Tests.Common/Builders/Interfaces/IWithIsLockedOutBuilder.cs +++ b/src/Umbraco.Tests.Common/Builders/Interfaces/IWithIsLockedOutBuilder.cs @@ -3,7 +3,7 @@ using System; -namespace Umbraco.Tests.Common.Builders.Interfaces +namespace Umbraco.Cms.Tests.Common.Builders.Interfaces { public interface IWithIsLockedOutBuilder { diff --git a/src/Umbraco.Tests.Common/Builders/Interfaces/IWithKeyBuilder.cs b/src/Umbraco.Tests.Common/Builders/Interfaces/IWithKeyBuilder.cs index a709dff734..a4da641d96 100644 --- a/src/Umbraco.Tests.Common/Builders/Interfaces/IWithKeyBuilder.cs +++ b/src/Umbraco.Tests.Common/Builders/Interfaces/IWithKeyBuilder.cs @@ -3,7 +3,7 @@ using System; -namespace Umbraco.Tests.Common.Builders.Interfaces +namespace Umbraco.Cms.Tests.Common.Builders.Interfaces { public interface IWithKeyBuilder { diff --git a/src/Umbraco.Tests.Common/Builders/Interfaces/IWithLastLoginDateBuilder.cs b/src/Umbraco.Tests.Common/Builders/Interfaces/IWithLastLoginDateBuilder.cs index 9b969a210e..e01a1ef19d 100644 --- a/src/Umbraco.Tests.Common/Builders/Interfaces/IWithLastLoginDateBuilder.cs +++ b/src/Umbraco.Tests.Common/Builders/Interfaces/IWithLastLoginDateBuilder.cs @@ -3,7 +3,7 @@ using System; -namespace Umbraco.Tests.Common.Builders.Interfaces +namespace Umbraco.Cms.Tests.Common.Builders.Interfaces { public interface IWithLastLoginDateBuilder { diff --git a/src/Umbraco.Tests.Common/Builders/Interfaces/IWithLastPasswordChangeDateBuilder.cs b/src/Umbraco.Tests.Common/Builders/Interfaces/IWithLastPasswordChangeDateBuilder.cs index ffd7019404..e7b354217d 100644 --- a/src/Umbraco.Tests.Common/Builders/Interfaces/IWithLastPasswordChangeDateBuilder.cs +++ b/src/Umbraco.Tests.Common/Builders/Interfaces/IWithLastPasswordChangeDateBuilder.cs @@ -3,7 +3,7 @@ using System; -namespace Umbraco.Tests.Common.Builders.Interfaces +namespace Umbraco.Cms.Tests.Common.Builders.Interfaces { public interface IWithLastPasswordChangeDateBuilder { diff --git a/src/Umbraco.Tests.Common/Builders/Interfaces/IWithLevelBuilder.cs b/src/Umbraco.Tests.Common/Builders/Interfaces/IWithLevelBuilder.cs index 51d08e9143..0b55ce5766 100644 --- a/src/Umbraco.Tests.Common/Builders/Interfaces/IWithLevelBuilder.cs +++ b/src/Umbraco.Tests.Common/Builders/Interfaces/IWithLevelBuilder.cs @@ -1,7 +1,7 @@ // Copyright (c) Umbraco. // See LICENSE for more details. -namespace Umbraco.Tests.Common.Builders.Interfaces +namespace Umbraco.Cms.Tests.Common.Builders.Interfaces { public interface IWithLevelBuilder { diff --git a/src/Umbraco.Tests.Common/Builders/Interfaces/IWithLoginBuilder.cs b/src/Umbraco.Tests.Common/Builders/Interfaces/IWithLoginBuilder.cs index 8ab04bcc3f..905a90cb7e 100644 --- a/src/Umbraco.Tests.Common/Builders/Interfaces/IWithLoginBuilder.cs +++ b/src/Umbraco.Tests.Common/Builders/Interfaces/IWithLoginBuilder.cs @@ -1,7 +1,7 @@ // Copyright (c) Umbraco. // See LICENSE for more details. -namespace Umbraco.Tests.Common.Builders.Interfaces +namespace Umbraco.Cms.Tests.Common.Builders.Interfaces { public interface IWithLoginBuilder { diff --git a/src/Umbraco.Tests.Common/Builders/Interfaces/IWithNameBuilder.cs b/src/Umbraco.Tests.Common/Builders/Interfaces/IWithNameBuilder.cs index 17962dc678..494a9e3200 100644 --- a/src/Umbraco.Tests.Common/Builders/Interfaces/IWithNameBuilder.cs +++ b/src/Umbraco.Tests.Common/Builders/Interfaces/IWithNameBuilder.cs @@ -1,7 +1,7 @@ // Copyright (c) Umbraco. // See LICENSE for more details. -namespace Umbraco.Tests.Common.Builders.Interfaces +namespace Umbraco.Cms.Tests.Common.Builders.Interfaces { public interface IWithNameBuilder { diff --git a/src/Umbraco.Tests.Common/Builders/Interfaces/IWithParentContentTypeBuilder.cs b/src/Umbraco.Tests.Common/Builders/Interfaces/IWithParentContentTypeBuilder.cs index c5357164a5..3a284e4026 100644 --- a/src/Umbraco.Tests.Common/Builders/Interfaces/IWithParentContentTypeBuilder.cs +++ b/src/Umbraco.Tests.Common/Builders/Interfaces/IWithParentContentTypeBuilder.cs @@ -1,9 +1,9 @@ // Copyright (c) Umbraco. // See LICENSE for more details. -using Umbraco.Core.Models; +using Umbraco.Cms.Core.Models; -namespace Umbraco.Tests.Common.Builders.Interfaces +namespace Umbraco.Cms.Tests.Common.Builders.Interfaces { public interface IWithParentContentTypeBuilder { diff --git a/src/Umbraco.Tests.Common/Builders/Interfaces/IWithParentIdBuilder.cs b/src/Umbraco.Tests.Common/Builders/Interfaces/IWithParentIdBuilder.cs index edba880af8..68bb7afe0c 100644 --- a/src/Umbraco.Tests.Common/Builders/Interfaces/IWithParentIdBuilder.cs +++ b/src/Umbraco.Tests.Common/Builders/Interfaces/IWithParentIdBuilder.cs @@ -1,7 +1,7 @@ // Copyright (c) Umbraco. // See LICENSE for more details. -namespace Umbraco.Tests.Common.Builders.Interfaces +namespace Umbraco.Cms.Tests.Common.Builders.Interfaces { public interface IWithParentIdBuilder { diff --git a/src/Umbraco.Tests.Common/Builders/Interfaces/IWithPathBuilder.cs b/src/Umbraco.Tests.Common/Builders/Interfaces/IWithPathBuilder.cs index 9fb99bc825..84e56a132d 100644 --- a/src/Umbraco.Tests.Common/Builders/Interfaces/IWithPathBuilder.cs +++ b/src/Umbraco.Tests.Common/Builders/Interfaces/IWithPathBuilder.cs @@ -1,7 +1,7 @@ // Copyright (c) Umbraco. // See LICENSE for more details. -namespace Umbraco.Tests.Common.Builders.Interfaces +namespace Umbraco.Cms.Tests.Common.Builders.Interfaces { public interface IWithPathBuilder { diff --git a/src/Umbraco.Tests.Common/Builders/Interfaces/IWithPropertyTypeIdsIncrementingFrom.cs b/src/Umbraco.Tests.Common/Builders/Interfaces/IWithPropertyTypeIdsIncrementingFrom.cs index 215b0d3791..00a1649c51 100644 --- a/src/Umbraco.Tests.Common/Builders/Interfaces/IWithPropertyTypeIdsIncrementingFrom.cs +++ b/src/Umbraco.Tests.Common/Builders/Interfaces/IWithPropertyTypeIdsIncrementingFrom.cs @@ -1,7 +1,7 @@ // Copyright (c) Umbraco. // See LICENSE for more details. -namespace Umbraco.Tests.Common.Builders.Interfaces +namespace Umbraco.Cms.Tests.Common.Builders.Interfaces { public interface IWithPropertyTypeIdsIncrementingFrom { diff --git a/src/Umbraco.Tests.Common/Builders/Interfaces/IWithPropertyValues.cs b/src/Umbraco.Tests.Common/Builders/Interfaces/IWithPropertyValues.cs index 06ac06070c..f6e99c8bfd 100644 --- a/src/Umbraco.Tests.Common/Builders/Interfaces/IWithPropertyValues.cs +++ b/src/Umbraco.Tests.Common/Builders/Interfaces/IWithPropertyValues.cs @@ -1,7 +1,7 @@ // Copyright (c) Umbraco. // See LICENSE for more details. -namespace Umbraco.Tests.Common.Builders.Interfaces +namespace Umbraco.Cms.Tests.Common.Builders.Interfaces { public interface IWithPropertyValues { diff --git a/src/Umbraco.Tests.Common/Builders/Interfaces/IWithSortOrderBuilder.cs b/src/Umbraco.Tests.Common/Builders/Interfaces/IWithSortOrderBuilder.cs index 8b23fd2b95..6f60f58d84 100644 --- a/src/Umbraco.Tests.Common/Builders/Interfaces/IWithSortOrderBuilder.cs +++ b/src/Umbraco.Tests.Common/Builders/Interfaces/IWithSortOrderBuilder.cs @@ -1,7 +1,7 @@ // Copyright (c) Umbraco. // See LICENSE for more details. -namespace Umbraco.Tests.Common.Builders.Interfaces +namespace Umbraco.Cms.Tests.Common.Builders.Interfaces { public interface IWithSortOrderBuilder { diff --git a/src/Umbraco.Tests.Common/Builders/Interfaces/IWithSupportsPublishing.cs b/src/Umbraco.Tests.Common/Builders/Interfaces/IWithSupportsPublishing.cs index 4b9f9e805b..4a7bfca964 100644 --- a/src/Umbraco.Tests.Common/Builders/Interfaces/IWithSupportsPublishing.cs +++ b/src/Umbraco.Tests.Common/Builders/Interfaces/IWithSupportsPublishing.cs @@ -1,9 +1,7 @@ // Copyright (c) Umbraco. // See LICENSE for more details. -using System; - -namespace Umbraco.Tests.Common.Builders.Interfaces +namespace Umbraco.Cms.Tests.Common.Builders.Interfaces { public interface IWithSupportsPublishing { diff --git a/src/Umbraco.Tests.Common/Builders/Interfaces/IWithThumbnailBuilder.cs b/src/Umbraco.Tests.Common/Builders/Interfaces/IWithThumbnailBuilder.cs index 59b4fbff81..92f8edef3b 100644 --- a/src/Umbraco.Tests.Common/Builders/Interfaces/IWithThumbnailBuilder.cs +++ b/src/Umbraco.Tests.Common/Builders/Interfaces/IWithThumbnailBuilder.cs @@ -1,7 +1,7 @@ // Copyright (c) Umbraco. // See LICENSE for more details. -namespace Umbraco.Tests.Common.Builders.Interfaces +namespace Umbraco.Cms.Tests.Common.Builders.Interfaces { public interface IWithThumbnailBuilder { diff --git a/src/Umbraco.Tests.Common/Builders/Interfaces/IWithTrashedBuilder.cs b/src/Umbraco.Tests.Common/Builders/Interfaces/IWithTrashedBuilder.cs index fe155aa07a..b75bf05286 100644 --- a/src/Umbraco.Tests.Common/Builders/Interfaces/IWithTrashedBuilder.cs +++ b/src/Umbraco.Tests.Common/Builders/Interfaces/IWithTrashedBuilder.cs @@ -1,7 +1,7 @@ // Copyright (c) Umbraco. // See LICENSE for more details. -namespace Umbraco.Tests.Common.Builders.Interfaces +namespace Umbraco.Cms.Tests.Common.Builders.Interfaces { public interface IWithTrashedBuilder { diff --git a/src/Umbraco.Tests.Common/Builders/Interfaces/IWithUpdateDateBuilder.cs b/src/Umbraco.Tests.Common/Builders/Interfaces/IWithUpdateDateBuilder.cs index 9c01286179..8264b91dbc 100644 --- a/src/Umbraco.Tests.Common/Builders/Interfaces/IWithUpdateDateBuilder.cs +++ b/src/Umbraco.Tests.Common/Builders/Interfaces/IWithUpdateDateBuilder.cs @@ -3,7 +3,7 @@ using System; -namespace Umbraco.Tests.Common.Builders.Interfaces +namespace Umbraco.Cms.Tests.Common.Builders.Interfaces { public interface IWithUpdateDateBuilder { diff --git a/src/Umbraco.Tests.Common/Builders/LanguageBuilder.cs b/src/Umbraco.Tests.Common/Builders/LanguageBuilder.cs index 653d729dfd..61d60334b5 100644 --- a/src/Umbraco.Tests.Common/Builders/LanguageBuilder.cs +++ b/src/Umbraco.Tests.Common/Builders/LanguageBuilder.cs @@ -3,11 +3,11 @@ using System; using System.Globalization; -using Umbraco.Core.Configuration.Models; -using Umbraco.Core.Models; -using Umbraco.Tests.Common.Builders.Interfaces; +using Umbraco.Cms.Core.Configuration.Models; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Tests.Common.Builders.Interfaces; -namespace Umbraco.Tests.Common.Builders +namespace Umbraco.Cms.Tests.Common.Builders { public class LanguageBuilder : LanguageBuilder { diff --git a/src/Umbraco.Tests.Common/Builders/MacroBuilder.cs b/src/Umbraco.Tests.Common/Builders/MacroBuilder.cs index 4206dcc3de..1039be4b75 100644 --- a/src/Umbraco.Tests.Common/Builders/MacroBuilder.cs +++ b/src/Umbraco.Tests.Common/Builders/MacroBuilder.cs @@ -4,12 +4,12 @@ using System; using System.Collections.Generic; using System.Linq; -using Umbraco.Core.Models; -using Umbraco.Core.Strings; -using Umbraco.Tests.Common.Builders.Extensions; -using Umbraco.Tests.Common.Builders.Interfaces; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Core.Strings; +using Umbraco.Cms.Tests.Common.Builders.Extensions; +using Umbraco.Cms.Tests.Common.Builders.Interfaces; -namespace Umbraco.Tests.Common.Builders +namespace Umbraco.Cms.Tests.Common.Builders { public class MacroBuilder : BuilderBase, diff --git a/src/Umbraco.Tests.Common/Builders/MacroPropertyBuilder.cs b/src/Umbraco.Tests.Common/Builders/MacroPropertyBuilder.cs index 15532b9cc9..2e88dcb8e6 100644 --- a/src/Umbraco.Tests.Common/Builders/MacroPropertyBuilder.cs +++ b/src/Umbraco.Tests.Common/Builders/MacroPropertyBuilder.cs @@ -2,11 +2,11 @@ // See LICENSE for more details. using System; -using Umbraco.Core.Models; -using Umbraco.Tests.Common.Builders.Extensions; -using Umbraco.Tests.Common.Builders.Interfaces; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Tests.Common.Builders.Extensions; +using Umbraco.Cms.Tests.Common.Builders.Interfaces; -namespace Umbraco.Tests.Common.Builders +namespace Umbraco.Cms.Tests.Common.Builders { public class MacroPropertyBuilder : ChildBuilderBase, diff --git a/src/Umbraco.Tests.Common/Builders/MediaBuilder.cs b/src/Umbraco.Tests.Common/Builders/MediaBuilder.cs index a2afe1c964..57303651f1 100644 --- a/src/Umbraco.Tests.Common/Builders/MediaBuilder.cs +++ b/src/Umbraco.Tests.Common/Builders/MediaBuilder.cs @@ -3,13 +3,13 @@ using System; using System.Collections.Generic; -using Umbraco.Core; -using Umbraco.Core.Models; -using Umbraco.Tests.Common.Builders.Extensions; -using Umbraco.Tests.Common.Builders.Interfaces; -using Umbraco.Tests.Testing; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Tests.Common.Builders.Extensions; +using Umbraco.Cms.Tests.Common.Builders.Interfaces; +using Umbraco.Cms.Tests.Common.Extensions; +using Constants = Umbraco.Cms.Core.Constants; -namespace Umbraco.Tests.Common.Builders +namespace Umbraco.Cms.Tests.Common.Builders { public class MediaBuilder : BuilderBase, diff --git a/src/Umbraco.Tests.Common/Builders/MediaTypeBuilder.cs b/src/Umbraco.Tests.Common/Builders/MediaTypeBuilder.cs index 668dbbc961..6c11f99b08 100644 --- a/src/Umbraco.Tests.Common/Builders/MediaTypeBuilder.cs +++ b/src/Umbraco.Tests.Common/Builders/MediaTypeBuilder.cs @@ -3,12 +3,12 @@ using System.Collections.Generic; using System.Linq; -using Umbraco.Core; -using Umbraco.Core.Models; -using Umbraco.Tests.Common.Builders.Extensions; -using Umbraco.Tests.Common.Builders.Interfaces; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Tests.Common.Builders.Extensions; +using Umbraco.Cms.Tests.Common.Builders.Interfaces; +using Constants = Umbraco.Cms.Core.Constants; -namespace Umbraco.Tests.Common.Builders +namespace Umbraco.Cms.Tests.Common.Builders { public class MediaTypeBuilder : ContentTypeBaseBuilder, diff --git a/src/Umbraco.Tests.Common/Builders/MemberBuilder.cs b/src/Umbraco.Tests.Common/Builders/MemberBuilder.cs index 3eacfaaff0..fd6e272fc4 100644 --- a/src/Umbraco.Tests.Common/Builders/MemberBuilder.cs +++ b/src/Umbraco.Tests.Common/Builders/MemberBuilder.cs @@ -3,11 +3,11 @@ using System; using System.Collections.Generic; -using Umbraco.Core.Models; -using Umbraco.Tests.Common.Builders.Extensions; -using Umbraco.Tests.Common.Builders.Interfaces; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Tests.Common.Builders.Extensions; +using Umbraco.Cms.Tests.Common.Builders.Interfaces; -namespace Umbraco.Tests.Common.Builders +namespace Umbraco.Cms.Tests.Common.Builders { public class MemberBuilder : BuilderBase, diff --git a/src/Umbraco.Tests.Common/Builders/MemberGroupBuilder.cs b/src/Umbraco.Tests.Common/Builders/MemberGroupBuilder.cs index 41bc4eb5c4..53fdaaad7a 100644 --- a/src/Umbraco.Tests.Common/Builders/MemberGroupBuilder.cs +++ b/src/Umbraco.Tests.Common/Builders/MemberGroupBuilder.cs @@ -3,10 +3,10 @@ using System; using System.Collections.Generic; -using Umbraco.Core.Models; -using Umbraco.Tests.Common.Builders.Interfaces; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Tests.Common.Builders.Interfaces; -namespace Umbraco.Tests.Common.Builders +namespace Umbraco.Cms.Tests.Common.Builders { public class MemberGroupBuilder : BuilderBase, diff --git a/src/Umbraco.Tests.Common/Builders/MemberTypeBuilder.cs b/src/Umbraco.Tests.Common/Builders/MemberTypeBuilder.cs index 480a07890a..fd8e687c34 100644 --- a/src/Umbraco.Tests.Common/Builders/MemberTypeBuilder.cs +++ b/src/Umbraco.Tests.Common/Builders/MemberTypeBuilder.cs @@ -3,12 +3,12 @@ using System.Collections.Generic; using System.Linq; -using Umbraco.Core; -using Umbraco.Core.Models; -using Umbraco.Tests.Common.Builders.Extensions; -using Umbraco.Tests.Common.Builders.Interfaces; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Tests.Common.Builders.Extensions; +using Umbraco.Cms.Tests.Common.Builders.Interfaces; +using Constants = Umbraco.Cms.Core.Constants; -namespace Umbraco.Tests.Common.Builders +namespace Umbraco.Cms.Tests.Common.Builders { public class MemberTypeBuilder : ContentTypeBaseBuilder, diff --git a/src/Umbraco.Tests.Common/Builders/PropertyBuilder.cs b/src/Umbraco.Tests.Common/Builders/PropertyBuilder.cs index f6e3ab2557..de017c1353 100644 --- a/src/Umbraco.Tests.Common/Builders/PropertyBuilder.cs +++ b/src/Umbraco.Tests.Common/Builders/PropertyBuilder.cs @@ -2,10 +2,10 @@ // See LICENSE for more details. using System; -using Umbraco.Core.Models; -using Umbraco.Tests.Common.Builders.Interfaces; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Tests.Common.Builders.Interfaces; -namespace Umbraco.Tests.Common.Builders +namespace Umbraco.Cms.Tests.Common.Builders { public class PropertyBuilder : BuilderBase, diff --git a/src/Umbraco.Tests.Common/Builders/PropertyGroupBuilder.cs b/src/Umbraco.Tests.Common/Builders/PropertyGroupBuilder.cs index be177a3138..0a2e2b6c48 100644 --- a/src/Umbraco.Tests.Common/Builders/PropertyGroupBuilder.cs +++ b/src/Umbraco.Tests.Common/Builders/PropertyGroupBuilder.cs @@ -4,10 +4,10 @@ using System; using System.Collections.Generic; using System.Linq; -using Umbraco.Core.Models; -using Umbraco.Tests.Common.Builders.Interfaces; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Tests.Common.Builders.Interfaces; -namespace Umbraco.Tests.Common.Builders +namespace Umbraco.Cms.Tests.Common.Builders { public class PropertyGroupBuilder : PropertyGroupBuilder { diff --git a/src/Umbraco.Tests.Common/Builders/PropertyTypeBuilder.cs b/src/Umbraco.Tests.Common/Builders/PropertyTypeBuilder.cs index f541616d17..e41ab16436 100644 --- a/src/Umbraco.Tests.Common/Builders/PropertyTypeBuilder.cs +++ b/src/Umbraco.Tests.Common/Builders/PropertyTypeBuilder.cs @@ -2,13 +2,13 @@ // See LICENSE for more details. using System; -using Umbraco.Core; -using Umbraco.Core.Models; -using Umbraco.Core.Strings; -using Umbraco.Tests.Common.Builders.Extensions; -using Umbraco.Tests.Common.Builders.Interfaces; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Core.Strings; +using Umbraco.Cms.Tests.Common.Builders.Extensions; +using Umbraco.Cms.Tests.Common.Builders.Interfaces; +using Constants = Umbraco.Cms.Core.Constants; -namespace Umbraco.Tests.Common.Builders +namespace Umbraco.Cms.Tests.Common.Builders { public class PropertyTypeBuilder : PropertyTypeBuilder { diff --git a/src/Umbraco.Tests.Common/Builders/RelationBuilder.cs b/src/Umbraco.Tests.Common/Builders/RelationBuilder.cs index 8824e9b20e..10585f2410 100644 --- a/src/Umbraco.Tests.Common/Builders/RelationBuilder.cs +++ b/src/Umbraco.Tests.Common/Builders/RelationBuilder.cs @@ -2,10 +2,10 @@ // See LICENSE for more details. using System; -using Umbraco.Core.Models; -using Umbraco.Tests.Common.Builders.Interfaces; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Tests.Common.Builders.Interfaces; -namespace Umbraco.Tests.Common.Builders +namespace Umbraco.Cms.Tests.Common.Builders { public class RelationBuilder : BuilderBase, diff --git a/src/Umbraco.Tests.Common/Builders/RelationTypeBuilder.cs b/src/Umbraco.Tests.Common/Builders/RelationTypeBuilder.cs index 4b1953322a..2bd9dc124d 100644 --- a/src/Umbraco.Tests.Common/Builders/RelationTypeBuilder.cs +++ b/src/Umbraco.Tests.Common/Builders/RelationTypeBuilder.cs @@ -2,10 +2,10 @@ // See LICENSE for more details. using System; -using Umbraco.Core.Models; -using Umbraco.Tests.Common.Builders.Interfaces; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Tests.Common.Builders.Interfaces; -namespace Umbraco.Tests.Common.Builders +namespace Umbraco.Cms.Tests.Common.Builders { public class RelationTypeBuilder : ChildBuilderBase, diff --git a/src/Umbraco.Tests.Common/Builders/StylesheetBuilder.cs b/src/Umbraco.Tests.Common/Builders/StylesheetBuilder.cs index b293cb7bb8..7e557d19cc 100644 --- a/src/Umbraco.Tests.Common/Builders/StylesheetBuilder.cs +++ b/src/Umbraco.Tests.Common/Builders/StylesheetBuilder.cs @@ -1,9 +1,9 @@ // Copyright (c) Umbraco. // See LICENSE for more details. -using Umbraco.Core.Models; +using Umbraco.Cms.Core.Models; -namespace Umbraco.Tests.Common.Builders +namespace Umbraco.Cms.Tests.Common.Builders { public class StylesheetBuilder : BuilderBase diff --git a/src/Umbraco.Tests.Common/Builders/TemplateBuilder.cs b/src/Umbraco.Tests.Common/Builders/TemplateBuilder.cs index 35a32a8d9f..f1c05bc969 100644 --- a/src/Umbraco.Tests.Common/Builders/TemplateBuilder.cs +++ b/src/Umbraco.Tests.Common/Builders/TemplateBuilder.cs @@ -2,12 +2,12 @@ // See LICENSE for more details. using System; -using Umbraco.Core.Models; -using Umbraco.Core.Strings; -using Umbraco.Tests.Common.Builders.Extensions; -using Umbraco.Tests.Common.Builders.Interfaces; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Core.Strings; +using Umbraco.Cms.Tests.Common.Builders.Extensions; +using Umbraco.Cms.Tests.Common.Builders.Interfaces; -namespace Umbraco.Tests.Common.Builders +namespace Umbraco.Cms.Tests.Common.Builders { public class TemplateBuilder : ChildBuilderBase, diff --git a/src/Umbraco.Tests.Common/Builders/TreeBuilder.cs b/src/Umbraco.Tests.Common/Builders/TreeBuilder.cs index 29a78ef4d7..7fc29e1c57 100644 --- a/src/Umbraco.Tests.Common/Builders/TreeBuilder.cs +++ b/src/Umbraco.Tests.Common/Builders/TreeBuilder.cs @@ -1,11 +1,11 @@ // Copyright (c) Umbraco. // See LICENSE for more details. -using Umbraco.Core; -using Umbraco.Tests.Common.Builders.Interfaces; -using Umbraco.Web.Trees; +using Umbraco.Cms.Core.Trees; +using Umbraco.Cms.Tests.Common.Builders.Interfaces; +using Constants = Umbraco.Cms.Core.Constants; -namespace Umbraco.Tests.Common.Builders +namespace Umbraco.Cms.Tests.Common.Builders { public class TreeBuilder : BuilderBase, diff --git a/src/Umbraco.Tests.Common/Builders/UserBuilder.cs b/src/Umbraco.Tests.Common/Builders/UserBuilder.cs index 14ec8f6a99..95fbc3a435 100644 --- a/src/Umbraco.Tests.Common/Builders/UserBuilder.cs +++ b/src/Umbraco.Tests.Common/Builders/UserBuilder.cs @@ -4,12 +4,13 @@ using System; using System.Collections.Generic; using System.Linq; -using Umbraco.Core.Configuration.Models; -using Umbraco.Core.Models.Membership; -using Umbraco.Tests.Common.Builders.Extensions; -using Umbraco.Tests.Common.Builders.Interfaces; +using Umbraco.Cms.Core.Configuration.Models; +using Umbraco.Cms.Core.Models.Membership; +using Umbraco.Cms.Tests.Common.Builders.Extensions; +using Umbraco.Cms.Tests.Common.Builders.Interfaces; +using Umbraco.Extensions; -namespace Umbraco.Tests.Common.Builders +namespace Umbraco.Cms.Tests.Common.Builders { public class UserBuilder : UserBuilder { diff --git a/src/Umbraco.Tests.Common/Builders/UserGroupBuilder.cs b/src/Umbraco.Tests.Common/Builders/UserGroupBuilder.cs index ef1733dc7d..bec92bcd8e 100644 --- a/src/Umbraco.Tests.Common/Builders/UserGroupBuilder.cs +++ b/src/Umbraco.Tests.Common/Builders/UserGroupBuilder.cs @@ -4,12 +4,12 @@ using System.Collections.Generic; using System.Linq; using Moq; -using Umbraco.Core.Models.Membership; -using Umbraco.Core.Strings; -using Umbraco.Tests.Common.Builders.Extensions; -using Umbraco.Tests.Common.Builders.Interfaces; +using Umbraco.Cms.Core.Models.Membership; +using Umbraco.Cms.Core.Strings; +using Umbraco.Cms.Tests.Common.Builders.Interfaces; +using Umbraco.Cms.Tests.Common.Builders.Extensions; -namespace Umbraco.Tests.Common.Builders +namespace Umbraco.Cms.Tests.Common.Builders { public class UserGroupBuilder : UserGroupBuilder { diff --git a/src/Umbraco.Tests.Common/Builders/XmlDocumentBuilder.cs b/src/Umbraco.Tests.Common/Builders/XmlDocumentBuilder.cs index 431b86c57c..17a07bf9b2 100644 --- a/src/Umbraco.Tests.Common/Builders/XmlDocumentBuilder.cs +++ b/src/Umbraco.Tests.Common/Builders/XmlDocumentBuilder.cs @@ -3,7 +3,7 @@ using System.Xml; -namespace Umbraco.Tests.Common.Builders +namespace Umbraco.Cms.Tests.Common.Builders { public class XmlDocumentBuilder : BuilderBase { diff --git a/src/Umbraco.Tests.Common/Extensions/ContentBaseExtensions.cs b/src/Umbraco.Tests.Common/Extensions/ContentBaseExtensions.cs index 148bd467db..7ba0f8377e 100644 --- a/src/Umbraco.Tests.Common/Extensions/ContentBaseExtensions.cs +++ b/src/Umbraco.Tests.Common/Extensions/ContentBaseExtensions.cs @@ -3,9 +3,9 @@ using System; using System.Reflection; -using Umbraco.Core.Models; +using Umbraco.Cms.Core.Models; -namespace Umbraco.Tests.Testing +namespace Umbraco.Cms.Tests.Common.Extensions { public static class ContentBaseExtensions { diff --git a/src/Umbraco.Tests.Common/Published/PublishedSnapshotTestObjects.cs b/src/Umbraco.Tests.Common/Published/PublishedSnapshotTestObjects.cs index 2fb6c305fb..a3e8ee410a 100644 --- a/src/Umbraco.Tests.Common/Published/PublishedSnapshotTestObjects.cs +++ b/src/Umbraco.Tests.Common/Published/PublishedSnapshotTestObjects.cs @@ -3,10 +3,10 @@ using System.Collections.Generic; using Moq; -using Umbraco.Core; -using Umbraco.Core.Models.PublishedContent; +using Umbraco.Cms.Core.Models.PublishedContent; +using Umbraco.Extensions; -namespace Umbraco.Tests.Published +namespace Umbraco.Cms.Tests.Common.Published { public class PublishedSnapshotTestObjects { diff --git a/src/Umbraco.Tests.Common/TestClone.cs b/src/Umbraco.Tests.Common/TestClone.cs index 4aa957e376..f8f06263a3 100644 --- a/src/Umbraco.Tests.Common/TestClone.cs +++ b/src/Umbraco.Tests.Common/TestClone.cs @@ -2,9 +2,9 @@ // See LICENSE for more details. using System; -using Umbraco.Core.Models; +using Umbraco.Cms.Core.Models; -namespace Umbraco.Tests.Common +namespace Umbraco.Cms.Tests.Common { public class TestClone : IDeepCloneable, IEquatable { diff --git a/src/Umbraco.Tests.Common/TestDefaultCultureAccessor.cs b/src/Umbraco.Tests.Common/TestDefaultCultureAccessor.cs index 77b3793f26..d193e7aa83 100644 --- a/src/Umbraco.Tests.Common/TestDefaultCultureAccessor.cs +++ b/src/Umbraco.Tests.Common/TestDefaultCultureAccessor.cs @@ -1,9 +1,9 @@ // Copyright (c) Umbraco. // See LICENSE for more details. -using Umbraco.Web.PublishedCache; +using Umbraco.Cms.Core.PublishedCache; -namespace Umbraco.Tests.Common +namespace Umbraco.Cms.Tests.Common { public class TestDefaultCultureAccessor : IDefaultCultureAccessor { diff --git a/src/Umbraco.Tests.Common/TestHelperBase.cs b/src/Umbraco.Tests.Common/TestHelperBase.cs index b7ad1e7f52..79f5e4d578 100644 --- a/src/Umbraco.Tests.Common/TestHelperBase.cs +++ b/src/Umbraco.Tests.Common/TestHelperBase.cs @@ -8,25 +8,28 @@ using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Logging; using Microsoft.Extensions.Logging.Abstractions; using Moq; -using Umbraco.Core; -using Umbraco.Core.Cache; -using Umbraco.Core.Composing; -using Umbraco.Core.Configuration; -using Umbraco.Core.Configuration.Models; -using Umbraco.Core.Diagnostics; -using Umbraco.Core.Hosting; -using Umbraco.Core.IO; -using Umbraco.Core.Logging; -using Umbraco.Core.Models.PublishedContent; -using Umbraco.Core.Persistence; -using Umbraco.Core.Serialization; -using Umbraco.Core.Strings; -using Umbraco.Net; -using Umbraco.Tests.Common.TestHelpers; -using Umbraco.Web; -using Umbraco.Web.Routing; +using Umbraco.Cms.Core; +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.Diagnostics; +using Umbraco.Cms.Core.Hosting; +using Umbraco.Cms.Core.IO; +using Umbraco.Cms.Core.Logging; +using Umbraco.Cms.Core.Models.PublishedContent; +using Umbraco.Cms.Core.Net; +using Umbraco.Cms.Core.Routing; +using Umbraco.Cms.Core.Runtime; +using Umbraco.Cms.Core.Serialization; +using Umbraco.Cms.Core.Strings; +using Umbraco.Cms.Infrastructure.Persistence; +using Umbraco.Cms.Infrastructure.Serialization; +using Umbraco.Cms.Tests.Common.TestHelpers; +using Umbraco.Extensions; +using Constants = Umbraco.Cms.Core.Constants; -namespace Umbraco.Tests.Common +namespace Umbraco.Cms.Tests.Common { /// /// Common helper properties and methods useful to testing @@ -41,7 +44,7 @@ namespace Umbraco.Tests.Common protected TestHelperBase(Assembly entryAssembly) { MainDom = new SimpleMainDom(); - _typeFinder = new TypeFinder(NullLoggerFactory.Instance.CreateLogger(), new DefaultUmbracoAssemblyProvider(entryAssembly), new VaryingRuntimeHash()); + _typeFinder = new TypeFinder(NullLoggerFactory.Instance.CreateLogger(), new DefaultUmbracoAssemblyProvider(entryAssembly, NullLoggerFactory.Instance), new VaryingRuntimeHash()); } public ITypeFinder GetTypeFinder() => _typeFinder; diff --git a/src/Umbraco.Tests.Common/TestHelpers/LogTestHelper.cs b/src/Umbraco.Tests.Common/TestHelpers/LogTestHelper.cs index 9f04ef7307..236562df2a 100644 --- a/src/Umbraco.Tests.Common/TestHelpers/LogTestHelper.cs +++ b/src/Umbraco.Tests.Common/TestHelpers/LogTestHelper.cs @@ -5,7 +5,7 @@ using System; using Microsoft.Extensions.Logging; using Moq; -namespace Umbraco.Tests.Common.TestHelpers +namespace Umbraco.Cms.Tests.Common.TestHelpers { public static class LogTestHelper { diff --git a/src/Umbraco.Tests.Common/TestHelpers/MockedValueEditors.cs b/src/Umbraco.Tests.Common/TestHelpers/MockedValueEditors.cs index 9069bdcbf0..d246c7c651 100644 --- a/src/Umbraco.Tests.Common/TestHelpers/MockedValueEditors.cs +++ b/src/Umbraco.Tests.Common/TestHelpers/MockedValueEditors.cs @@ -2,12 +2,12 @@ // See LICENSE for more details. using Moq; -using Umbraco.Core.PropertyEditors; -using Umbraco.Core.Serialization; -using Umbraco.Core.Services; -using Umbraco.Core.Strings; +using Umbraco.Cms.Core.PropertyEditors; +using Umbraco.Cms.Core.Services; +using Umbraco.Cms.Core.Strings; +using Umbraco.Cms.Infrastructure.Serialization; -namespace Umbraco.Tests.TestHelpers.Entities +namespace Umbraco.Cms.Tests.Common.TestHelpers { public class MockedValueEditors { diff --git a/src/Umbraco.Tests.Common/TestHelpers/SolidPublishedSnapshot.cs b/src/Umbraco.Tests.Common/TestHelpers/SolidPublishedSnapshot.cs index f14b6633ba..40e47dcd1e 100644 --- a/src/Umbraco.Tests.Common/TestHelpers/SolidPublishedSnapshot.cs +++ b/src/Umbraco.Tests.Common/TestHelpers/SolidPublishedSnapshot.cs @@ -6,17 +6,19 @@ using System.Collections.Generic; using System.Linq; using Microsoft.Extensions.Logging; using Moq; -using Umbraco.Core; -using Umbraco.Core.Cache; -using Umbraco.Core.Models; -using Umbraco.Core.Models.PublishedContent; -using Umbraco.Core.PropertyEditors; -using Umbraco.Core.Serialization; -using Umbraco.Core.Services; -using Umbraco.Core.Strings; -using Umbraco.Web.PublishedCache; +using Umbraco.Cms.Core; +using Umbraco.Cms.Core.Cache; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Core.Models.PublishedContent; +using Umbraco.Cms.Core.PropertyEditors; +using Umbraco.Cms.Core.PublishedCache; +using Umbraco.Cms.Core.Services; +using Umbraco.Cms.Core.Strings; +using Umbraco.Cms.Core.Xml; +using Umbraco.Cms.Infrastructure.Serialization; +using Umbraco.Extensions; -namespace Umbraco.Tests.Common.PublishedContent +namespace Umbraco.Cms.Tests.Common.TestHelpers { public class SolidPublishedSnapshot : IPublishedSnapshot { @@ -77,13 +79,13 @@ namespace Umbraco.Tests.Common.PublishedContent public override IEnumerable GetAtRoot(bool preview, string culture = null) => _content.Values.Where(x => x.Parent == null); - public override IPublishedContent GetSingleByXPath(bool preview, string xpath, Core.Xml.XPathVariable[] vars) => throw new NotImplementedException(); + public override IPublishedContent GetSingleByXPath(bool preview, string xpath, XPathVariable[] vars) => throw new NotImplementedException(); - public override IPublishedContent GetSingleByXPath(bool preview, System.Xml.XPath.XPathExpression xpath, Core.Xml.XPathVariable[] vars) => throw new NotImplementedException(); + public override IPublishedContent GetSingleByXPath(bool preview, System.Xml.XPath.XPathExpression xpath, XPathVariable[] vars) => throw new NotImplementedException(); - public override IEnumerable GetByXPath(bool preview, string xpath, Core.Xml.XPathVariable[] vars) => throw new NotImplementedException(); + public override IEnumerable GetByXPath(bool preview, string xpath, XPathVariable[] vars) => throw new NotImplementedException(); - public override IEnumerable GetByXPath(bool preview, System.Xml.XPath.XPathExpression xpath, Core.Xml.XPathVariable[] vars) => throw new NotImplementedException(); + public override IEnumerable GetByXPath(bool preview, System.Xml.XPath.XPathExpression xpath, XPathVariable[] vars) => throw new NotImplementedException(); public override System.Xml.XPath.XPathNavigator CreateNavigator(bool preview) => throw new NotImplementedException(); diff --git a/src/Umbraco.Tests.Common/TestHelpers/StringNewlineExtensions.cs b/src/Umbraco.Tests.Common/TestHelpers/StringNewlineExtensions.cs index 70e84a41c2..b4efb2d7c5 100644 --- a/src/Umbraco.Tests.Common/TestHelpers/StringNewlineExtensions.cs +++ b/src/Umbraco.Tests.Common/TestHelpers/StringNewlineExtensions.cs @@ -1,7 +1,7 @@ // Copyright (c) Umbraco. // See LICENSE for more details. -namespace Umbraco.Tests +namespace Umbraco.Cms.Tests.Common.TestHelpers { public static class StringNewLineExtensions { diff --git a/src/Umbraco.Tests.Common/TestHelpers/Stubs/TestProfiler.cs b/src/Umbraco.Tests.Common/TestHelpers/Stubs/TestProfiler.cs index 478fde32d4..52d2e0da62 100644 --- a/src/Umbraco.Tests.Common/TestHelpers/Stubs/TestProfiler.cs +++ b/src/Umbraco.Tests.Common/TestHelpers/Stubs/TestProfiler.cs @@ -4,9 +4,9 @@ using System; using StackExchange.Profiling; using StackExchange.Profiling.SqlFormatters; -using Umbraco.Core.Logging; +using Umbraco.Cms.Core.Logging; -namespace Umbraco.Tests.TestHelpers.Stubs +namespace Umbraco.Cms.Tests.Common.TestHelpers.Stubs { public class TestProfiler : IProfiler { diff --git a/src/Umbraco.Tests.Common/TestHelpers/TestDatabase.cs b/src/Umbraco.Tests.Common/TestHelpers/TestDatabase.cs index 3f388c8612..ecc11784b4 100644 --- a/src/Umbraco.Tests.Common/TestHelpers/TestDatabase.cs +++ b/src/Umbraco.Tests.Common/TestHelpers/TestDatabase.cs @@ -12,11 +12,11 @@ using Moq; using NPoco; using NPoco.DatabaseTypes; using NPoco.Linq; -using Umbraco.Core.Migrations.Install; -using Umbraco.Core.Persistence; -using Umbraco.Core.Persistence.SqlSyntax; +using Umbraco.Cms.Infrastructure.Migrations.Install; +using Umbraco.Cms.Infrastructure.Persistence; +using Umbraco.Cms.Infrastructure.Persistence.SqlSyntax; -namespace Umbraco.Tests.Testing +namespace Umbraco.Cms.Tests.Common.TestHelpers { /// /// An implementation of for tests. diff --git a/src/Umbraco.Tests.Common/TestHelpers/TestEnvironment.cs b/src/Umbraco.Tests.Common/TestHelpers/TestEnvironment.cs index d0e9fe879f..38c346a944 100644 --- a/src/Umbraco.Tests.Common/TestHelpers/TestEnvironment.cs +++ b/src/Umbraco.Tests.Common/TestHelpers/TestEnvironment.cs @@ -3,7 +3,7 @@ using System.Runtime.InteropServices; -namespace Umbraco.Tests.Common.TestHelpers +namespace Umbraco.Cms.Tests.Common.TestHelpers { public static class TestEnvironment { diff --git a/src/Umbraco.Tests.Common/TestPublishedSnapshotAccessor.cs b/src/Umbraco.Tests.Common/TestPublishedSnapshotAccessor.cs index 6b2bc69e24..cab51ae91b 100644 --- a/src/Umbraco.Tests.Common/TestPublishedSnapshotAccessor.cs +++ b/src/Umbraco.Tests.Common/TestPublishedSnapshotAccessor.cs @@ -1,9 +1,9 @@ // Copyright (c) Umbraco. // See LICENSE for more details. -using Umbraco.Web.PublishedCache; +using Umbraco.Cms.Core.PublishedCache; -namespace Umbraco.Tests.Common +namespace Umbraco.Cms.Tests.Common { public class TestPublishedSnapshotAccessor : IPublishedSnapshotAccessor { diff --git a/src/Umbraco.Tests.Common/TestUmbracoContextAccessor.cs b/src/Umbraco.Tests.Common/TestUmbracoContextAccessor.cs index 3c88765f44..868c3f1806 100644 --- a/src/Umbraco.Tests.Common/TestUmbracoContextAccessor.cs +++ b/src/Umbraco.Tests.Common/TestUmbracoContextAccessor.cs @@ -1,9 +1,9 @@ // Copyright (c) Umbraco. // See LICENSE for more details. -using Umbraco.Web; +using Umbraco.Cms.Core.Web; -namespace Umbraco.Tests.Common +namespace Umbraco.Cms.Tests.Common { public class TestUmbracoContextAccessor : IUmbracoContextAccessor { diff --git a/src/Umbraco.Tests.Common/TestVariationContextAccessor.cs b/src/Umbraco.Tests.Common/TestVariationContextAccessor.cs index c1ff438b8c..484d0d0511 100644 --- a/src/Umbraco.Tests.Common/TestVariationContextAccessor.cs +++ b/src/Umbraco.Tests.Common/TestVariationContextAccessor.cs @@ -1,9 +1,9 @@ // Copyright (c) Umbraco. // See LICENSE for more details. -using Umbraco.Core.Models.PublishedContent; +using Umbraco.Cms.Core.Models.PublishedContent; -namespace Umbraco.Tests.Common +namespace Umbraco.Cms.Tests.Common { /// /// Provides an implementation of for tests. diff --git a/src/Umbraco.Tests.Common/Testing/TestOptionAttributeBase.cs b/src/Umbraco.Tests.Common/Testing/TestOptionAttributeBase.cs index 9520532eaa..1e62f1827c 100644 --- a/src/Umbraco.Tests.Common/Testing/TestOptionAttributeBase.cs +++ b/src/Umbraco.Tests.Common/Testing/TestOptionAttributeBase.cs @@ -6,9 +6,9 @@ using System.Collections.Generic; using System.Linq; using System.Reflection; using NUnit.Framework; -using Umbraco.Core.Exceptions; +using Umbraco.Cms.Core.Exceptions; -namespace Umbraco.Tests.Testing +namespace Umbraco.Cms.Tests.Common.Testing { public abstract class TestOptionAttributeBase : Attribute { diff --git a/src/Umbraco.Tests.Common/Testing/UmbracoTestAttribute.cs b/src/Umbraco.Tests.Common/Testing/UmbracoTestAttribute.cs index b21d8b0614..7537ba1a82 100644 --- a/src/Umbraco.Tests.Common/Testing/UmbracoTestAttribute.cs +++ b/src/Umbraco.Tests.Common/Testing/UmbracoTestAttribute.cs @@ -2,9 +2,9 @@ // See LICENSE for more details. using System; -using Umbraco.Core; +using Umbraco.Cms.Core; -namespace Umbraco.Tests.Testing +namespace Umbraco.Cms.Tests.Common.Testing { [AttributeUsage(AttributeTargets.Class | AttributeTargets.Method, /*AllowMultiple = false,*/ Inherited = false)] public class UmbracoTestAttribute : TestOptionAttributeBase diff --git a/src/Umbraco.Tests.Common/Testing/UmbracoTestOptions.cs b/src/Umbraco.Tests.Common/Testing/UmbracoTestOptions.cs index 477148e300..a0286f1be3 100644 --- a/src/Umbraco.Tests.Common/Testing/UmbracoTestOptions.cs +++ b/src/Umbraco.Tests.Common/Testing/UmbracoTestOptions.cs @@ -1,7 +1,7 @@ // Copyright (c) Umbraco. // See LICENSE for more details. -namespace Umbraco.Tests.Testing +namespace Umbraco.Cms.Tests.Common.Testing { public static class UmbracoTestOptions { diff --git a/src/Umbraco.Tests.Common/Umbraco.Tests.Common.csproj b/src/Umbraco.Tests.Common/Umbraco.Tests.Common.csproj index 6fd77a4dbe..b02c1a5a29 100644 --- a/src/Umbraco.Tests.Common/Umbraco.Tests.Common.csproj +++ b/src/Umbraco.Tests.Common/Umbraco.Tests.Common.csproj @@ -3,6 +3,7 @@ netstandard2.0 latest + Umbraco.Cms.Tests.Common diff --git a/src/Umbraco.Tests.Integration/Cache/DistributedCacheBinderTests.cs b/src/Umbraco.Tests.Integration/Cache/DistributedCacheBinderTests.cs index f986092574..73b5c5beea 100644 --- a/src/Umbraco.Tests.Integration/Cache/DistributedCacheBinderTests.cs +++ b/src/Umbraco.Tests.Integration/Cache/DistributedCacheBinderTests.cs @@ -2,16 +2,17 @@ using System.Linq; using System.Threading; using NUnit.Framework; -using Umbraco.Core.Events; -using Umbraco.Core.Models; -using Umbraco.Core.Models.Membership; -using Umbraco.Core.Services; -using Umbraco.Tests.Integration.Testing; -using Umbraco.Tests.Testing; -using Umbraco.Web; -using Umbraco.Web.Cache; +using Umbraco.Cms.Core.Cache; +using Umbraco.Cms.Core.Events; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Core.Models.Membership; +using Umbraco.Cms.Core.Routing; +using Umbraco.Cms.Core.Services; +using Umbraco.Cms.Core.Web; +using Umbraco.Cms.Tests.Common.Testing; +using Umbraco.Cms.Tests.Integration.Testing; -namespace Umbraco.Tests.Cache +namespace Umbraco.Cms.Tests.Integration.Cache { [TestFixture] [UmbracoTest(Boot = true)] diff --git a/src/Umbraco.Tests.Integration/ComponentRuntimeTests.cs b/src/Umbraco.Tests.Integration/ComponentRuntimeTests.cs index ba6c6473fa..ddac52872f 100644 --- a/src/Umbraco.Tests.Integration/ComponentRuntimeTests.cs +++ b/src/Umbraco.Tests.Integration/ComponentRuntimeTests.cs @@ -1,28 +1,18 @@ using System.Linq; using System.Threading; using System.Threading.Tasks; -using Microsoft.AspNetCore.Builder; -using Microsoft.AspNetCore.Hosting; -using Microsoft.Extensions.Configuration; using Microsoft.Extensions.DependencyInjection; -using Microsoft.Extensions.Hosting; using Microsoft.Extensions.Logging; using NUnit.Framework; -using Umbraco.Core; -using Umbraco.Core.Cache; -using Umbraco.Core.Composing; -using Umbraco.Core.DependencyInjection; -using Umbraco.Extensions; -using Umbraco.Infrastructure.PublishedCache.DependencyInjection; -using Umbraco.Tests.Integration.Extensions; -using Umbraco.Tests.Integration.Implementations; -using Umbraco.Tests.Integration.Testing; -using Umbraco.Tests.Testing; -using Umbraco.Web.Common.DependencyInjection; +using Umbraco.Cms.Core.Composing; +using Umbraco.Cms.Core.DependencyInjection; +using Umbraco.Cms.Core.Runtime; +using Umbraco.Cms.Core.Services; +using Umbraco.Cms.Tests.Common.Testing; +using Umbraco.Cms.Tests.Integration.Testing; -namespace Umbraco.Tests.Integration +namespace Umbraco.Cms.Tests.Integration { - [TestFixture] [UmbracoTest(Boot = true)] public class ComponentRuntimeTests : UmbracoIntegrationTest diff --git a/src/Umbraco.Tests.Integration/DependencyInjection/UmbracoBuilderExtensions.cs b/src/Umbraco.Tests.Integration/DependencyInjection/UmbracoBuilderExtensions.cs index 531bc610bf..5cc94ce4c9 100644 --- a/src/Umbraco.Tests.Integration/DependencyInjection/UmbracoBuilderExtensions.cs +++ b/src/Umbraco.Tests.Integration/DependencyInjection/UmbracoBuilderExtensions.cs @@ -9,24 +9,24 @@ using Microsoft.Extensions.Logging; using Microsoft.Extensions.Options; using Moq; using NUnit.Framework; -using Umbraco.Core; -using Umbraco.Core.Cache; -using Umbraco.Core.Configuration.Models; -using Umbraco.Core.DependencyInjection; -using Umbraco.Core.Logging; -using Umbraco.Core.Runtime; -using Umbraco.Core.Services; -using Umbraco.Core.Services.Implement; -using Umbraco.Core.Sync; -using Umbraco.Core.WebAssets; -using Umbraco.Examine; -using Umbraco.Infrastructure.HostedServices; -using Umbraco.Tests.Integration.Implementations; -using Umbraco.Tests.TestHelpers.Stubs; -using Umbraco.Web.PublishedCache.NuCache; -using Umbraco.Web.Search; +using Umbraco.Cms.Core.Cache; +using Umbraco.Cms.Core.Configuration.Models; +using Umbraco.Cms.Core.DependencyInjection; +using Umbraco.Cms.Core.Logging; +using Umbraco.Cms.Core.Runtime; +using Umbraco.Cms.Core.Services; +using Umbraco.Cms.Core.Services.Implement; +using Umbraco.Cms.Core.Sync; +using Umbraco.Cms.Core.WebAssets; +using Umbraco.Cms.Infrastructure.Examine; +using Umbraco.Cms.Infrastructure.HostedServices; +using Umbraco.Cms.Infrastructure.PublishedCache; +using Umbraco.Cms.Infrastructure.Search; +using Umbraco.Cms.Tests.Common.TestHelpers.Stubs; +using Umbraco.Cms.Tests.Integration.Implementations; +using Umbraco.Extensions; -namespace Umbraco.Tests.Integration.DependencyInjection +namespace Umbraco.Cms.Tests.Integration.DependencyInjection { /// /// This is used to replace certain services that are normally registered from our Core / Infrastructure that diff --git a/src/Umbraco.Tests.Integration/Extensions/ServiceCollectionExtensions.cs b/src/Umbraco.Tests.Integration/Extensions/ServiceCollectionExtensions.cs index cc01a08287..5b6a1db805 100644 --- a/src/Umbraco.Tests.Integration/Extensions/ServiceCollectionExtensions.cs +++ b/src/Umbraco.Tests.Integration/Extensions/ServiceCollectionExtensions.cs @@ -5,9 +5,9 @@ using Microsoft.AspNetCore.Hosting; using Microsoft.AspNetCore.Http; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Hosting; -using Umbraco.Tests.Integration.Implementations; +using Umbraco.Cms.Tests.Integration.Implementations; -namespace Umbraco.Tests.Integration.Extensions +namespace Umbraco.Cms.Tests.Integration.Extensions { public static class ServiceCollectionExtensions { diff --git a/src/Umbraco.Tests.Integration/GlobalSetupTeardown.cs b/src/Umbraco.Tests.Integration/GlobalSetupTeardown.cs index 4aca5ff98a..c952fcc663 100644 --- a/src/Umbraco.Tests.Integration/GlobalSetupTeardown.cs +++ b/src/Umbraco.Tests.Integration/GlobalSetupTeardown.cs @@ -6,7 +6,7 @@ using System.Collections.Generic; using System.Diagnostics; using System.Text; using NUnit.Framework; -using Umbraco.Tests.Integration.Testing; +using Umbraco.Cms.Tests.Integration.Testing; // ReSharper disable once CheckNamespace diff --git a/src/Umbraco.Tests.Integration/Implementations/TestHelper.cs b/src/Umbraco.Tests.Integration/Implementations/TestHelper.cs index 8bdca33561..484eea9b95 100644 --- a/src/Umbraco.Tests.Integration/Implementations/TestHelper.cs +++ b/src/Umbraco.Tests.Integration/Implementations/TestHelper.cs @@ -18,24 +18,25 @@ using Microsoft.Extensions.Logging; using Microsoft.Extensions.Options; using Moq; using NUnit.Framework; -using Umbraco.Core; -using Umbraco.Core.Cache; -using Umbraco.Core.Configuration.Models; -using Umbraco.Core.Diagnostics; -using Umbraco.Core.Hosting; -using Umbraco.Core.Logging; -using Umbraco.Core.Models; -using Umbraco.Core.Models.Entities; -using Umbraco.Core.Persistence; -using Umbraco.Core.PropertyEditors; -using Umbraco.Core.Runtime; -using Umbraco.Net; -using Umbraco.Tests.Common; -using Umbraco.Web.Common.AspNetCore; +using Umbraco.Cms.Core; +using Umbraco.Cms.Core.Cache; +using Umbraco.Cms.Core.Configuration.Models; +using Umbraco.Cms.Core.Diagnostics; +using Umbraco.Cms.Core.Hosting; +using Umbraco.Cms.Core.Logging; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Core.Models.Entities; +using Umbraco.Cms.Core.Net; +using Umbraco.Cms.Core.PropertyEditors; +using Umbraco.Cms.Core.Runtime; +using Umbraco.Cms.Infrastructure.Persistence; +using Umbraco.Cms.Tests.Common; +using Umbraco.Cms.Web.Common.AspNetCore; +using Umbraco.Extensions; using File = System.IO.File; -using IHostingEnvironment = Umbraco.Core.Hosting.IHostingEnvironment; +using IHostingEnvironment = Umbraco.Cms.Core.Hosting.IHostingEnvironment; -namespace Umbraco.Tests.Integration.Implementations +namespace Umbraco.Cms.Tests.Integration.Implementations { public class TestHelper : TestHelperBase { diff --git a/src/Umbraco.Tests.Integration/Implementations/TestHostingEnvironment.cs b/src/Umbraco.Tests.Integration/Implementations/TestHostingEnvironment.cs index 8690a5f6f8..8980a91cff 100644 --- a/src/Umbraco.Tests.Integration/Implementations/TestHostingEnvironment.cs +++ b/src/Umbraco.Tests.Integration/Implementations/TestHostingEnvironment.cs @@ -3,13 +3,13 @@ using Microsoft.AspNetCore.Hosting; using Microsoft.Extensions.Options; -using Umbraco.Core.Configuration.Models; -using Umbraco.Web.Common.AspNetCore; -using IHostingEnvironment = Umbraco.Core.Hosting.IHostingEnvironment; +using Umbraco.Cms.Core.Configuration.Models; +using Umbraco.Cms.Web.Common.AspNetCore; +using IHostingEnvironment = Umbraco.Cms.Core.Hosting.IHostingEnvironment; -namespace Umbraco.Tests.Integration.Implementations +namespace Umbraco.Cms.Tests.Integration.Implementations { - public class TestHostingEnvironment : AspNetCoreHostingEnvironment, IHostingEnvironment + public class TestHostingEnvironment : AspNetCoreHostingEnvironment, Cms.Core.Hosting.IHostingEnvironment { public TestHostingEnvironment(IOptionsMonitor hostingSettings,IOptionsMonitor webRoutingSettings, IWebHostEnvironment webHostEnvironment) : base(hostingSettings,webRoutingSettings, webHostEnvironment) diff --git a/src/Umbraco.Tests.Integration/Implementations/TestLifetime.cs b/src/Umbraco.Tests.Integration/Implementations/TestLifetime.cs index 07f517e710..0b444234af 100644 --- a/src/Umbraco.Tests.Integration/Implementations/TestLifetime.cs +++ b/src/Umbraco.Tests.Integration/Implementations/TestLifetime.cs @@ -5,7 +5,7 @@ using System.Threading; using System.Threading.Tasks; using Microsoft.Extensions.Hosting; -namespace Umbraco.Tests.Integration.Implementations +namespace Umbraco.Cms.Tests.Integration.Implementations { /// /// Ensures the host lifetime ends as soon as code execution is done diff --git a/src/Umbraco.Tests.Integration/Implementations/TestUmbracoBootPermissionChecker.cs b/src/Umbraco.Tests.Integration/Implementations/TestUmbracoBootPermissionChecker.cs index c032ad5551..ff0bfa599a 100644 --- a/src/Umbraco.Tests.Integration/Implementations/TestUmbracoBootPermissionChecker.cs +++ b/src/Umbraco.Tests.Integration/Implementations/TestUmbracoBootPermissionChecker.cs @@ -1,9 +1,9 @@ // Copyright (c) Umbraco. // See LICENSE for more details. -using Umbraco.Core.Runtime; +using Umbraco.Cms.Core.Runtime; -namespace Umbraco.Tests.Integration.Implementations +namespace Umbraco.Cms.Tests.Integration.Implementations { public class TestUmbracoBootPermissionChecker : IUmbracoBootPermissionChecker { diff --git a/src/Umbraco.Tests.Integration/TestServerTest/Controllers/EnsureNotAmbiguousActionNameControllerTests.cs b/src/Umbraco.Tests.Integration/TestServerTest/Controllers/EnsureNotAmbiguousActionNameControllerTests.cs index 15862ae24f..c094ea3d9a 100644 --- a/src/Umbraco.Tests.Integration/TestServerTest/Controllers/EnsureNotAmbiguousActionNameControllerTests.cs +++ b/src/Umbraco.Tests.Integration/TestServerTest/Controllers/EnsureNotAmbiguousActionNameControllerTests.cs @@ -3,11 +3,12 @@ using System; using NUnit.Framework; -using Umbraco.Core; -using Umbraco.Web.BackOffice.Controllers; -using Umbraco.Web.Models.ContentEditing; +using Umbraco.Cms.Core; +using Umbraco.Cms.Core.Models.ContentEditing; +using Umbraco.Cms.Web.BackOffice.Controllers; +using Constants = Umbraco.Cms.Core.Constants; -namespace Umbraco.Tests.Integration.TestServerTest.Controllers +namespace Umbraco.Cms.Tests.Integration.TestServerTest.Controllers { [TestFixture] public class EnsureNotAmbiguousActionNameControllerTests : UmbracoTestServerTestBase diff --git a/src/Umbraco.Tests.Integration/TestServerTest/TestAuthHandler.cs b/src/Umbraco.Tests.Integration/TestServerTest/TestAuthHandler.cs index 7b6d913eef..500e3aa633 100644 --- a/src/Umbraco.Tests.Integration/TestServerTest/TestAuthHandler.cs +++ b/src/Umbraco.Tests.Integration/TestServerTest/TestAuthHandler.cs @@ -7,15 +7,14 @@ using System.Threading.Tasks; using Microsoft.AspNetCore.Authentication; using Microsoft.Extensions.Logging; using Microsoft.Extensions.Options; -using Umbraco.Core; -using Umbraco.Core.Mapping; -using Umbraco.Core.Models.Membership; -using Umbraco.Core.Security; -using Umbraco.Core.Services; -using Umbraco.Infrastructure.Security; -using Umbraco.Web.Common.Security; +using Umbraco.Cms.Core.Mapping; +using Umbraco.Cms.Core.Models.Membership; +using Umbraco.Cms.Core.Security; +using Umbraco.Cms.Core.Services; +using Umbraco.Cms.Web.BackOffice.Security; +using Constants = Umbraco.Cms.Core.Constants; -namespace Umbraco.Tests.Integration.TestServerTest +namespace Umbraco.Cms.Tests.Integration.TestServerTest { public class TestAuthHandler : AuthenticationHandler { diff --git a/src/Umbraco.Tests.Integration/TestServerTest/UmbracoTestServerTestBase.cs b/src/Umbraco.Tests.Integration/TestServerTest/UmbracoTestServerTestBase.cs index 21057279ea..caed95ae52 100644 --- a/src/Umbraco.Tests.Integration/TestServerTest/UmbracoTestServerTestBase.cs +++ b/src/Umbraco.Tests.Integration/TestServerTest/UmbracoTestServerTestBase.cs @@ -14,23 +14,21 @@ using Microsoft.AspNetCore.TestHost; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Hosting; using NUnit.Framework; -using Umbraco.Core; -using Umbraco.Core.Cache; -using Umbraco.Core.Composing; -using Umbraco.Core.DependencyInjection; +using Umbraco.Cms.Core; +using Umbraco.Cms.Core.Cache; +using Umbraco.Cms.Core.Composing; +using Umbraco.Cms.Core.DependencyInjection; +using Umbraco.Cms.Core.Web; +using Umbraco.Cms.Tests.Common.Testing; +using Umbraco.Cms.Tests.Integration.DependencyInjection; +using Umbraco.Cms.Tests.Integration.Testing; +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; -using Umbraco.Web.BackOffice.Controllers; -using Umbraco.Web.BackOffice.DependencyInjection; -using Umbraco.Web.Common.Controllers; -using Umbraco.Web.Common.DependencyInjection; -using Umbraco.Web.Website.Controllers; -using Umbraco.Web.Website.DependencyInjection; +using Constants = Umbraco.Cms.Core.Constants; -namespace Umbraco.Tests.Integration.TestServerTest +namespace Umbraco.Cms.Tests.Integration.TestServerTest { [TestFixture] [UmbracoTest(Database = UmbracoTestOptions.Database.NewSchemaPerTest, Logger = UmbracoTestOptions.Logger.Console, Boot = true)] diff --git a/src/Umbraco.Tests.Integration/TestServerTest/UmbracoWebApplicationFactory.cs b/src/Umbraco.Tests.Integration/TestServerTest/UmbracoWebApplicationFactory.cs index 5d923e583e..380603ae5c 100644 --- a/src/Umbraco.Tests.Integration/TestServerTest/UmbracoWebApplicationFactory.cs +++ b/src/Umbraco.Tests.Integration/TestServerTest/UmbracoWebApplicationFactory.cs @@ -5,7 +5,7 @@ using System; using Microsoft.AspNetCore.Mvc.Testing; using Microsoft.Extensions.Hosting; -namespace Umbraco.Tests.Integration.TestServerTest +namespace Umbraco.Cms.Tests.Integration.TestServerTest { public class UmbracoWebApplicationFactory : WebApplicationFactory where TStartup : class diff --git a/src/Umbraco.Tests.Integration/Testing/BaseTestDatabase.cs b/src/Umbraco.Tests.Integration/Testing/BaseTestDatabase.cs index 9b874c9999..87ec8f6a41 100644 --- a/src/Umbraco.Tests.Integration/Testing/BaseTestDatabase.cs +++ b/src/Umbraco.Tests.Integration/Testing/BaseTestDatabase.cs @@ -10,11 +10,12 @@ using System.Diagnostics; using System.Linq; using System.Threading; using Microsoft.Extensions.Logging; -using Umbraco.Core.Configuration; -using Umbraco.Core.Migrations.Install; -using Umbraco.Core.Persistence; +using Umbraco.Cms.Core; +using Umbraco.Cms.Core.Configuration; +using Umbraco.Cms.Infrastructure.Migrations.Install; +using Umbraco.Cms.Infrastructure.Persistence; -namespace Umbraco.Tests.Integration.Testing +namespace Umbraco.Cms.Tests.Integration.Testing { public abstract class BaseTestDatabase { @@ -126,7 +127,7 @@ namespace Umbraco.Tests.Integration.Testing private void RebuildSchemaFirstTime(TestDbMeta meta) { - _databaseFactory.Configure(meta.ConnectionString, Core.Constants.DatabaseProviders.SqlServer); + _databaseFactory.Configure(meta.ConnectionString, Constants.DatabaseProviders.SqlServer); using (var database = (UmbracoDatabase)_databaseFactory.CreateDatabase()) { diff --git a/src/Umbraco.Tests.Integration/Testing/ITestDatabase.cs b/src/Umbraco.Tests.Integration/Testing/ITestDatabase.cs index bdfde8d93b..fc400fe3ab 100644 --- a/src/Umbraco.Tests.Integration/Testing/ITestDatabase.cs +++ b/src/Umbraco.Tests.Integration/Testing/ITestDatabase.cs @@ -1,7 +1,7 @@ // Copyright (c) Umbraco. // See LICENSE for more details. -namespace Umbraco.Tests.Integration.Testing +namespace Umbraco.Cms.Tests.Integration.Testing { public interface ITestDatabase { diff --git a/src/Umbraco.Tests.Integration/Testing/IntegrationTestComponent.cs b/src/Umbraco.Tests.Integration/Testing/IntegrationTestComponent.cs index 4950f87bd9..277510fc9e 100644 --- a/src/Umbraco.Tests.Integration/Testing/IntegrationTestComponent.cs +++ b/src/Umbraco.Tests.Integration/Testing/IntegrationTestComponent.cs @@ -3,10 +3,9 @@ using Examine; using Examine.LuceneEngine.Providers; -using Umbraco.Core.Composing; -using Umbraco.Examine; +using Umbraco.Cms.Core.Composing; -namespace Umbraco.Tests.Integration.Testing +namespace Umbraco.Cms.Tests.Integration.Testing { /// /// A component to customize some services to work nicely with integration tests diff --git a/src/Umbraco.Tests.Integration/Testing/LocalDbTestDatabase.cs b/src/Umbraco.Tests.Integration/Testing/LocalDbTestDatabase.cs index b208a72c2f..2eec1938c3 100644 --- a/src/Umbraco.Tests.Integration/Testing/LocalDbTestDatabase.cs +++ b/src/Umbraco.Tests.Integration/Testing/LocalDbTestDatabase.cs @@ -7,9 +7,9 @@ using System.IO; using System.Linq; using System.Threading; using Microsoft.Extensions.Logging; -using Umbraco.Core.Persistence; +using Umbraco.Cms.Infrastructure.Persistence; -namespace Umbraco.Tests.Integration.Testing +namespace Umbraco.Cms.Tests.Integration.Testing { /// /// Manages a pool of LocalDb databases for integration testing diff --git a/src/Umbraco.Tests.Integration/Testing/SqlDeveloperTestDatabase.cs b/src/Umbraco.Tests.Integration/Testing/SqlDeveloperTestDatabase.cs index 80cf3c654c..6192bacb72 100644 --- a/src/Umbraco.Tests.Integration/Testing/SqlDeveloperTestDatabase.cs +++ b/src/Umbraco.Tests.Integration/Testing/SqlDeveloperTestDatabase.cs @@ -3,15 +3,14 @@ using System; using System.Collections.Concurrent; -using System.Collections.Generic; using System.Data.SqlClient; using System.Linq; using System.Threading; using Microsoft.Extensions.Logging; -using Umbraco.Core.Persistence; +using Umbraco.Cms.Infrastructure.Persistence; // ReSharper disable ConvertToUsingDeclaration -namespace Umbraco.Tests.Integration.Testing +namespace Umbraco.Cms.Tests.Integration.Testing { /// /// It's not meant to be pretty, rushed port of LocalDb.cs + LocalDbTestDatabase.cs diff --git a/src/Umbraco.Tests.Integration/Testing/TestDatabaseFactory.cs b/src/Umbraco.Tests.Integration/Testing/TestDatabaseFactory.cs index 9ca463c69a..5f14a4928d 100644 --- a/src/Umbraco.Tests.Integration/Testing/TestDatabaseFactory.cs +++ b/src/Umbraco.Tests.Integration/Testing/TestDatabaseFactory.cs @@ -4,9 +4,9 @@ using System; using System.IO; using Microsoft.Extensions.Logging; -using Umbraco.Core.Persistence; +using Umbraco.Cms.Infrastructure.Persistence; -namespace Umbraco.Tests.Integration.Testing +namespace Umbraco.Cms.Tests.Integration.Testing { public class TestDatabaseFactory { diff --git a/src/Umbraco.Tests.Integration/Testing/TestDatabaseSettings.cs b/src/Umbraco.Tests.Integration/Testing/TestDatabaseSettings.cs index 9d9e305bc9..b2c9b0cfa2 100644 --- a/src/Umbraco.Tests.Integration/Testing/TestDatabaseSettings.cs +++ b/src/Umbraco.Tests.Integration/Testing/TestDatabaseSettings.cs @@ -1,5 +1,5 @@ -namespace Umbraco.Tests.Integration.Testing +namespace Umbraco.Cms.Tests.Integration.Testing { public class TestDatabaseSettings { diff --git a/src/Umbraco.Tests.Integration/Testing/TestDbMeta.cs b/src/Umbraco.Tests.Integration/Testing/TestDbMeta.cs index ea6f7d1c72..8e3dd355d5 100644 --- a/src/Umbraco.Tests.Integration/Testing/TestDbMeta.cs +++ b/src/Umbraco.Tests.Integration/Testing/TestDbMeta.cs @@ -3,7 +3,7 @@ using System.Text.RegularExpressions; -namespace Umbraco.Tests.Integration.Testing +namespace Umbraco.Cms.Tests.Integration.Testing { public class TestDbMeta { diff --git a/src/Umbraco.Tests.Integration/Testing/TestUmbracoDatabaseFactoryProvider.cs b/src/Umbraco.Tests.Integration/Testing/TestUmbracoDatabaseFactoryProvider.cs index 9b27f4cfba..cba2c51a30 100644 --- a/src/Umbraco.Tests.Integration/Testing/TestUmbracoDatabaseFactoryProvider.cs +++ b/src/Umbraco.Tests.Integration/Testing/TestUmbracoDatabaseFactoryProvider.cs @@ -4,12 +4,12 @@ using System; using Microsoft.Extensions.Logging; using Microsoft.Extensions.Options; -using Umbraco.Core.Configuration.Models; -using Umbraco.Core.Migrations.Install; -using Umbraco.Core.Persistence; -using Umbraco.Core.Persistence.Mappers; +using Umbraco.Cms.Core.Configuration.Models; +using Umbraco.Cms.Infrastructure.Migrations.Install; +using Umbraco.Cms.Infrastructure.Persistence; +using Umbraco.Cms.Infrastructure.Persistence.Mappers; -namespace Umbraco.Tests.Integration.Testing +namespace Umbraco.Cms.Tests.Integration.Testing { /// /// I want to be able to create a database for integration testsing without setting the connection string on the diff --git a/src/Umbraco.Tests.Integration/Testing/UmbracoIntegrationTest.cs b/src/Umbraco.Tests.Integration/Testing/UmbracoIntegrationTest.cs index 0e79cd6464..eab085f67e 100644 --- a/src/Umbraco.Tests.Integration/Testing/UmbracoIntegrationTest.cs +++ b/src/Umbraco.Tests.Integration/Testing/UmbracoIntegrationTest.cs @@ -18,30 +18,28 @@ using Microsoft.Extensions.Options; using Moq; using NUnit.Framework; using Serilog; -using Umbraco.Core; -using Umbraco.Core.Cache; -using Umbraco.Core.Configuration.Models; -using Umbraco.Core.DependencyInjection; -using Umbraco.Core.IO; -using Umbraco.Core.Persistence; -using Umbraco.Core.Persistence.Mappers; -using Umbraco.Core.Runtime; -using Umbraco.Core.Scoping; -using Umbraco.Core.Strings; +using Umbraco.Cms.Core; +using Umbraco.Cms.Core.Cache; +using Umbraco.Cms.Core.Composing; +using Umbraco.Cms.Core.Configuration.Models; +using Umbraco.Cms.Core.DependencyInjection; +using Umbraco.Cms.Core.IO; +using Umbraco.Cms.Core.Scoping; +using Umbraco.Cms.Core.Services; +using Umbraco.Cms.Core.Strings; +using Umbraco.Cms.Core.Web; +using Umbraco.Cms.Infrastructure.DependencyInjection; +using Umbraco.Cms.Infrastructure.Persistence; +using Umbraco.Cms.Infrastructure.Persistence.Mappers; +using Umbraco.Cms.Tests.Common.Builders; +using Umbraco.Cms.Tests.Common.Testing; +using Umbraco.Cms.Tests.Integration.DependencyInjection; +using Umbraco.Cms.Tests.Integration.Extensions; +using Umbraco.Cms.Tests.Integration.Implementations; using Umbraco.Extensions; -using Umbraco.Infrastructure.DependencyInjection; -using Umbraco.Infrastructure.PublishedCache.DependencyInjection; -using Umbraco.Tests.Common.Builders; -using Umbraco.Tests.Integration.DependencyInjection; -using Umbraco.Tests.Integration.Extensions; -using Umbraco.Tests.Integration.Implementations; -using Umbraco.Tests.Integration.TestServerTest; -using Umbraco.Tests.Testing; -using Umbraco.Web; -using Umbraco.Web.BackOffice.DependencyInjection; -using Umbraco.Web.Common.DependencyInjection; +using Constants = Umbraco.Cms.Core.Constants; -namespace Umbraco.Tests.Integration.Testing +namespace Umbraco.Cms.Tests.Integration.Testing { /// /// Abstract class for integration tests @@ -200,7 +198,7 @@ namespace Umbraco.Tests.Integration.Testing services.AddRequiredNetCoreServices(TestHelper, webHostEnvironment); // Add it! - Core.Composing.TypeLoader typeLoader = services.AddTypeLoader( + TypeLoader typeLoader = services.AddTypeLoader( GetType().Assembly, webHostEnvironment, TestHelper.GetHostingEnvironment(), diff --git a/src/Umbraco.Tests.Integration/Testing/UmbracoIntegrationTestWithContent.cs b/src/Umbraco.Tests.Integration/Testing/UmbracoIntegrationTestWithContent.cs index 47159c419e..2f217ea66b 100644 --- a/src/Umbraco.Tests.Integration/Testing/UmbracoIntegrationTestWithContent.cs +++ b/src/Umbraco.Tests.Integration/Testing/UmbracoIntegrationTestWithContent.cs @@ -3,12 +3,12 @@ using System; using NUnit.Framework; -using Umbraco.Core.Models; -using Umbraco.Core.Services; -using Umbraco.Core.Services.Implement; -using Umbraco.Tests.Common.Builders; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Core.Services; +using Umbraco.Cms.Core.Services.Implement; +using Umbraco.Cms.Tests.Common.Builders; -namespace Umbraco.Tests.Integration.Testing +namespace Umbraco.Cms.Tests.Integration.Testing { public abstract class UmbracoIntegrationTestWithContent : UmbracoIntegrationTest { diff --git a/src/Umbraco.Tests.Integration/Umbraco.Core/IO/FileSystemsTests.cs b/src/Umbraco.Tests.Integration/Umbraco.Core/IO/FileSystemsTests.cs index 11773b157e..358a5fb350 100644 --- a/src/Umbraco.Tests.Integration/Umbraco.Core/IO/FileSystemsTests.cs +++ b/src/Umbraco.Tests.Integration/Umbraco.Core/IO/FileSystemsTests.cs @@ -5,13 +5,14 @@ using System; using System.IO; using System.Text; using NUnit.Framework; -using Umbraco.Core.Hosting; -using Umbraco.Core.IO; -using Umbraco.Core.IO.MediaPathSchemes; -using Umbraco.Tests.Integration.Testing; -using Umbraco.Tests.Testing; +using Umbraco.Cms.Core.Hosting; +using Umbraco.Cms.Core.IO; +using Umbraco.Cms.Core.IO.MediaPathSchemes; +using Umbraco.Cms.Tests.Common.Testing; +using Umbraco.Cms.Tests.Integration.Testing; +using Umbraco.Extensions; -namespace Umbraco.Tests.IO +namespace Umbraco.Cms.Tests.Integration.Umbraco.Core.IO { [TestFixture] [UmbracoTest] diff --git a/src/Umbraco.Tests.Integration/Umbraco.Core/IO/ShadowFileSystemTests.cs b/src/Umbraco.Tests.Integration/Umbraco.Core/IO/ShadowFileSystemTests.cs index 52d6a34a48..54f5e04dd2 100644 --- a/src/Umbraco.Tests.Integration/Umbraco.Core/IO/ShadowFileSystemTests.cs +++ b/src/Umbraco.Tests.Integration/Umbraco.Core/IO/ShadowFileSystemTests.cs @@ -7,15 +7,17 @@ using Microsoft.Extensions.Logging.Abstractions; using Microsoft.Extensions.Options; using Moq; using NUnit.Framework; -using Umbraco.Core; -using Umbraco.Core.Configuration.Models; -using Umbraco.Core.Hosting; -using Umbraco.Core.IO; -using Umbraco.Tests.Integration.Implementations; -using Umbraco.Tests.Integration.Testing; -using Umbraco.Tests.Testing; +using Umbraco.Cms.Core; +using Umbraco.Cms.Core.Configuration.Models; +using Umbraco.Cms.Core.Hosting; +using Umbraco.Cms.Core.IO; +using Umbraco.Cms.Tests.Common.Testing; +using Umbraco.Cms.Tests.Integration.Implementations; +using Umbraco.Cms.Tests.Integration.Testing; +using Umbraco.Extensions; +using Constants = Umbraco.Cms.Core.Constants; -namespace Umbraco.Tests.IO +namespace Umbraco.Cms.Tests.Integration.Umbraco.Core.IO { [TestFixture] [UmbracoTest] diff --git a/src/Umbraco.Tests.Integration/Umbraco.Core/Mapping/ContentTypeModelMappingTests.cs b/src/Umbraco.Tests.Integration/Umbraco.Core/Mapping/ContentTypeModelMappingTests.cs index 77b82a22bf..ac9dbfa81d 100644 --- a/src/Umbraco.Tests.Integration/Umbraco.Core/Mapping/ContentTypeModelMappingTests.cs +++ b/src/Umbraco.Tests.Integration/Umbraco.Core/Mapping/ContentTypeModelMappingTests.cs @@ -6,19 +6,20 @@ using System.Collections.Generic; using System.Linq; using Microsoft.Extensions.DependencyInjection; using NUnit.Framework; -using Umbraco.Core; -using Umbraco.Core.Mapping; -using Umbraco.Core.Models; -using Umbraco.Core.PropertyEditors; -using Umbraco.Core.Serialization; -using Umbraco.Core.Services; -using Umbraco.Core.Strings; -using Umbraco.Tests.Common.Builders; -using Umbraco.Tests.Integration.Testing; -using Umbraco.Tests.Testing; -using Umbraco.Web.Models.ContentEditing; +using Umbraco.Cms.Core.Mapping; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Core.Models.ContentEditing; +using Umbraco.Cms.Core.PropertyEditors; +using Umbraco.Cms.Core.Serialization; +using Umbraco.Cms.Core.Services; +using Umbraco.Cms.Core.Strings; +using Umbraco.Cms.Tests.Common.Builders; +using Umbraco.Cms.Tests.Common.Testing; +using Umbraco.Cms.Tests.Integration.Testing; +using Umbraco.Extensions; +using Constants = Umbraco.Cms.Core.Constants; -namespace Umbraco.Tests.Integration.Umbraco.Core.Mapping +namespace Umbraco.Cms.Tests.Integration.Umbraco.Core.Mapping { [TestFixture] [UmbracoTest(Mapper = true, Database = UmbracoTestOptions.Database.NewSchemaPerTest)] diff --git a/src/Umbraco.Tests.Integration/Umbraco.Core/Mapping/UmbracoMapperTests.cs b/src/Umbraco.Tests.Integration/Umbraco.Core/Mapping/UmbracoMapperTests.cs index a7152e7a3c..fb27ac5495 100644 --- a/src/Umbraco.Tests.Integration/Umbraco.Core/Mapping/UmbracoMapperTests.cs +++ b/src/Umbraco.Tests.Integration/Umbraco.Core/Mapping/UmbracoMapperTests.cs @@ -5,18 +5,19 @@ using System.Globalization; using System.Linq; using Microsoft.Extensions.DependencyInjection; using NUnit.Framework; -using Umbraco.Core; -using Umbraco.Core.Mapping; -using Umbraco.Core.Models; -using Umbraco.Core.PropertyEditors; -using Umbraco.Core.Services; -using Umbraco.Tests.Common.Builders; -using Umbraco.Tests.Common.Builders.Extensions; -using Umbraco.Tests.Integration.Testing; -using Umbraco.Tests.Testing; -using Umbraco.Web.Models.ContentEditing; +using Umbraco.Cms.Core.Mapping; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Core.Models.ContentEditing; +using Umbraco.Cms.Core.PropertyEditors; +using Umbraco.Cms.Core.Services; +using Umbraco.Cms.Tests.Common.Builders; +using Umbraco.Cms.Tests.Common.Builders.Extensions; +using Umbraco.Cms.Tests.Common.Testing; +using Umbraco.Cms.Tests.Integration.Testing; +using Umbraco.Extensions; +using Constants = Umbraco.Cms.Core.Constants; -namespace Umbraco.Tests.Integration.Umbraco.Core.Mapping +namespace Umbraco.Cms.Tests.Integration.Umbraco.Core.Mapping { [TestFixture] [UmbracoTest(Mapper = true, Database = UmbracoTestOptions.Database.NewSchemaPerTest)] diff --git a/src/Umbraco.Tests.Integration/Umbraco.Core/Mapping/UserModelMapperTests.cs b/src/Umbraco.Tests.Integration/Umbraco.Core/Mapping/UserModelMapperTests.cs index ac7c248058..5b96ebed3c 100644 --- a/src/Umbraco.Tests.Integration/Umbraco.Core/Mapping/UserModelMapperTests.cs +++ b/src/Umbraco.Tests.Integration/Umbraco.Core/Mapping/UserModelMapperTests.cs @@ -5,13 +5,13 @@ using System.Collections.Generic; using Microsoft.Extensions.DependencyInjection; using Newtonsoft.Json; using NUnit.Framework; -using Umbraco.Core.Mapping; -using Umbraco.Core.Models.Membership; -using Umbraco.Tests.Integration.Testing; -using Umbraco.Tests.Testing; -using Umbraco.Web.Models.ContentEditing; +using Umbraco.Cms.Core.Mapping; +using Umbraco.Cms.Core.Models.ContentEditing; +using Umbraco.Cms.Core.Models.Membership; +using Umbraco.Cms.Tests.Common.Testing; +using Umbraco.Cms.Tests.Integration.Testing; -namespace Umbraco.Tests.Integration.Umbraco.Core.Mapping +namespace Umbraco.Cms.Tests.Integration.Umbraco.Core.Mapping { [TestFixture] [UmbracoTest(Mapper = true, Database = UmbracoTestOptions.Database.NewSchemaPerTest)] diff --git a/src/Umbraco.Tests.Integration/Umbraco.Core/Packaging/CreatedPackagesRepositoryTests.cs b/src/Umbraco.Tests.Integration/Umbraco.Core/Packaging/CreatedPackagesRepositoryTests.cs index 603d5a87b3..e2fb873611 100644 --- a/src/Umbraco.Tests.Integration/Umbraco.Core/Packaging/CreatedPackagesRepositoryTests.cs +++ b/src/Umbraco.Tests.Integration/Umbraco.Core/Packaging/CreatedPackagesRepositoryTests.cs @@ -8,17 +8,16 @@ using System.IO.Compression; using System.Linq; using System.Xml.Linq; using NUnit.Framework; -using Umbraco.Core; -using Umbraco.Core.Configuration; -using Umbraco.Core.Configuration.Models; -using Umbraco.Core.Hosting; -using Umbraco.Core.Models.Packaging; -using Umbraco.Core.Packaging; -using Umbraco.Core.Services; -using Umbraco.Tests.Integration.Testing; -using Umbraco.Tests.Testing; +using Umbraco.Cms.Core.Configuration; +using Umbraco.Cms.Core.Configuration.Models; +using Umbraco.Cms.Core.Hosting; +using Umbraco.Cms.Core.Packaging; +using Umbraco.Cms.Core.Services; +using Umbraco.Cms.Tests.Common.Testing; +using Umbraco.Cms.Tests.Integration.Testing; +using Umbraco.Extensions; -namespace Umbraco.Tests.Integration.Umbraco.Core.Packaging +namespace Umbraco.Cms.Tests.Integration.Umbraco.Core.Packaging { [TestFixture] [UmbracoTest(Database = UmbracoTestOptions.Database.NewSchemaPerFixture)] diff --git a/src/Umbraco.Tests.Integration/Umbraco.Core/Packaging/PackageDataInstallationTests.cs b/src/Umbraco.Tests.Integration/Umbraco.Core/Packaging/PackageDataInstallationTests.cs index defdf1b25c..ad24842e9a 100644 --- a/src/Umbraco.Tests.Integration/Umbraco.Core/Packaging/PackageDataInstallationTests.cs +++ b/src/Umbraco.Tests.Integration/Umbraco.Core/Packaging/PackageDataInstallationTests.cs @@ -8,23 +8,24 @@ using System.Xml.Linq; using Microsoft.Extensions.Logging; using Moq; using NUnit.Framework; -using Umbraco.Core; -using Umbraco.Core.Composing; -using Umbraco.Core.Configuration.Models; -using Umbraco.Core.Models; -using Umbraco.Core.Models.Packaging; -using Umbraco.Core.Packaging; -using Umbraco.Core.Persistence.Dtos; -using Umbraco.Core.PropertyEditors; -using Umbraco.Core.Scoping; -using Umbraco.Core.Serialization; -using Umbraco.Core.Services; -using Umbraco.Core.Strings; -using Umbraco.Tests.Integration.Testing; -using Umbraco.Tests.Services.Importing; -using Umbraco.Tests.Testing; +using Umbraco.Cms.Core.Composing; +using Umbraco.Cms.Core.Configuration.Models; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Core.Models.Packaging; +using Umbraco.Cms.Core.Packaging; +using Umbraco.Cms.Core.PropertyEditors; +using Umbraco.Cms.Core.Scoping; +using Umbraco.Cms.Core.Services; +using Umbraco.Cms.Core.Strings; +using Umbraco.Cms.Infrastructure.Persistence.Dtos; +using Umbraco.Cms.Infrastructure.Serialization; +using Umbraco.Cms.Tests.Common.Testing; +using Umbraco.Cms.Tests.Integration.Testing; +using Umbraco.Cms.Tests.Integration.Umbraco.Infrastructure.Services.Importing; +using Umbraco.Extensions; +using Constants = Umbraco.Cms.Core.Constants; -namespace Umbraco.Tests.Packaging +namespace Umbraco.Cms.Tests.Integration.Umbraco.Core.Packaging { [TestFixture] [Category("Slow")] @@ -353,7 +354,7 @@ namespace Umbraco.Tests.Packaging public void Can_Import_Media_Package_Xml() { // Arrange - Core.Services.Implement.MediaTypeService.ClearScopeEvents(); + global::Umbraco.Cms.Core.Services.Implement.MediaTypeService.ClearScopeEvents(); string strXml = ImportResources.MediaTypesAndMedia_Package_xml; var xml = XElement.Parse(strXml); XElement mediaTypesElement = xml.Descendants("MediaTypes").First(); @@ -398,7 +399,7 @@ namespace Umbraco.Tests.Packaging select doc).Count(); string configuration; - using (Core.Scoping.IScope scope = ScopeProvider.CreateScope()) + using (global::Umbraco.Cms.Core.Scoping.IScope scope = ScopeProvider.CreateScope()) { List dtos = scope.Database.Fetch("WHERE nodeId = @Id", new { dataTypeDefinitions.First().Id }); configuration = dtos.Single().Configuration; @@ -741,8 +742,8 @@ namespace Umbraco.Tests.Packaging private void AddLanguages() { var globalSettings = new GlobalSettings(); - var norwegian = new Core.Models.Language(globalSettings, "nb-NO"); - var english = new Core.Models.Language(globalSettings, "en-GB"); + var norwegian = new Language(globalSettings, "nb-NO"); + var english = new Language(globalSettings, "en-GB"); LocalizationService.Save(norwegian, 0); LocalizationService.Save(english, 0); } diff --git a/src/Umbraco.Tests.Integration/Umbraco.Core/Packaging/PackageInstallationTest.cs b/src/Umbraco.Tests.Integration/Umbraco.Core/Packaging/PackageInstallationTest.cs index 867a770097..2665cde3d7 100644 --- a/src/Umbraco.Tests.Integration/Umbraco.Core/Packaging/PackageInstallationTest.cs +++ b/src/Umbraco.Tests.Integration/Umbraco.Core/Packaging/PackageInstallationTest.cs @@ -6,13 +6,13 @@ using System.Collections.Generic; using System.IO; using System.Linq; using NUnit.Framework; -using Umbraco.Core.Hosting; -using Umbraco.Core.Models.Packaging; -using Umbraco.Core.Packaging; -using Umbraco.Tests.Integration.Testing; -using Umbraco.Tests.Testing; +using Umbraco.Cms.Core.Hosting; +using Umbraco.Cms.Core.Models.Packaging; +using Umbraco.Cms.Core.Packaging; +using Umbraco.Cms.Tests.Common.Testing; +using Umbraco.Cms.Tests.Integration.Testing; -namespace Umbraco.Tests.Packaging +namespace Umbraco.Cms.Tests.Integration.Umbraco.Core.Packaging { [TestFixture] [UmbracoTest(Database = UmbracoTestOptions.Database.NewSchemaPerFixture)] diff --git a/src/Umbraco.Tests.Integration/Umbraco.Core/Services/SectionServiceTests.cs b/src/Umbraco.Tests.Integration/Umbraco.Core/Services/SectionServiceTests.cs index dd91f3ad55..b9b3d0569e 100644 --- a/src/Umbraco.Tests.Integration/Umbraco.Core/Services/SectionServiceTests.cs +++ b/src/Umbraco.Tests.Integration/Umbraco.Core/Services/SectionServiceTests.cs @@ -4,14 +4,13 @@ using System.Linq; using System.Threading; using NUnit.Framework; -using Umbraco.Core.Configuration.Models; -using Umbraco.Core.Models.Membership; -using Umbraco.Core.Services; -using Umbraco.Tests.Integration.Testing; -using Umbraco.Tests.Testing; -using Umbraco.Web.Services; +using Umbraco.Cms.Core.Configuration.Models; +using Umbraco.Cms.Core.Models.Membership; +using Umbraco.Cms.Core.Services; +using Umbraco.Cms.Tests.Common.Testing; +using Umbraco.Cms.Tests.Integration.Testing; -namespace Umbraco.Tests.Integration.Umbraco.Core.Services +namespace Umbraco.Cms.Tests.Integration.Umbraco.Core.Services { /// /// Tests covering the SectionService diff --git a/src/Umbraco.Tests.Integration/Umbraco.Infrastructure/Migrations/AdvancedMigrationTests.cs b/src/Umbraco.Tests.Integration/Umbraco.Infrastructure/Migrations/AdvancedMigrationTests.cs index 92280fde43..b41fe473d4 100644 --- a/src/Umbraco.Tests.Integration/Umbraco.Infrastructure/Migrations/AdvancedMigrationTests.cs +++ b/src/Umbraco.Tests.Integration/Umbraco.Infrastructure/Migrations/AdvancedMigrationTests.cs @@ -7,18 +7,18 @@ using Microsoft.Extensions.Logging; using Microsoft.Extensions.Logging.Abstractions; using Moq; using NUnit.Framework; -using Umbraco.Core.Configuration; -using Umbraco.Core.Migrations; -using Umbraco.Core.Migrations.Install; -using Umbraco.Core.Migrations.Upgrade; -using Umbraco.Core.Persistence.DatabaseModelDefinitions; -using Umbraco.Core.Persistence.Dtos; -using Umbraco.Core.Scoping; -using Umbraco.Core.Services; -using Umbraco.Tests.Integration.Testing; -using Umbraco.Tests.Testing; +using Umbraco.Cms.Core.Configuration; +using Umbraco.Cms.Core.Scoping; +using Umbraco.Cms.Core.Services; +using Umbraco.Cms.Infrastructure.Migrations; +using Umbraco.Cms.Infrastructure.Migrations.Install; +using Umbraco.Cms.Infrastructure.Migrations.Upgrade; +using Umbraco.Cms.Infrastructure.Persistence.DatabaseModelDefinitions; +using Umbraco.Cms.Infrastructure.Persistence.Dtos; +using Umbraco.Cms.Tests.Common.Testing; +using Umbraco.Cms.Tests.Integration.Testing; -namespace Umbraco.Tests.Migrations +namespace Umbraco.Cms.Tests.Integration.Umbraco.Infrastructure.Migrations { [TestFixture] [UmbracoTest(Database = UmbracoTestOptions.Database.NewEmptyPerTest)] diff --git a/src/Umbraco.Tests.Integration/Umbraco.Infrastructure/Persistence/DatabaseBuilderTests.cs b/src/Umbraco.Tests.Integration/Umbraco.Infrastructure/Persistence/DatabaseBuilderTests.cs index e8a9e7ed3c..d017dd20f9 100644 --- a/src/Umbraco.Tests.Integration/Umbraco.Infrastructure/Persistence/DatabaseBuilderTests.cs +++ b/src/Umbraco.Tests.Integration/Umbraco.Infrastructure/Persistence/DatabaseBuilderTests.cs @@ -5,19 +5,18 @@ using Microsoft.Extensions.Logging.Abstractions; using Moq; using NPoco; using NUnit.Framework; -using Umbraco.Core; -using Umbraco.Core.Configuration; -using Umbraco.Core.Migrations.Install; -using Umbraco.Core.Persistence; -using Umbraco.Tests.Common.TestHelpers; -using Umbraco.Tests.Integration.Testing; -using Umbraco.Tests.Testing; +using Umbraco.Cms.Core; +using Umbraco.Cms.Core.Configuration; +using Umbraco.Cms.Infrastructure.Migrations.Install; +using Umbraco.Cms.Infrastructure.Persistence; +using Umbraco.Cms.Tests.Common.TestHelpers; +using Umbraco.Cms.Tests.Common.Testing; +using Umbraco.Cms.Tests.Integration.Testing; -namespace Umbraco.Tests.UnitTests.Umbraco.Infrastructure.Persistence +namespace Umbraco.Cms.Tests.Integration.Umbraco.Infrastructure.Persistence { [TestFixture] [UmbracoTest] - public class DatabaseBuilderTests : UmbracoIntegrationTest { private IDbProviderFactoryCreator DbProviderFactoryCreator => GetRequiredService(); diff --git a/src/Umbraco.Tests.Integration/Umbraco.Infrastructure/Persistence/LocksTests.cs b/src/Umbraco.Tests.Integration/Umbraco.Infrastructure/Persistence/LocksTests.cs index 4761c01fdb..592de6a89c 100644 --- a/src/Umbraco.Tests.Integration/Umbraco.Infrastructure/Persistence/LocksTests.cs +++ b/src/Umbraco.Tests.Integration/Umbraco.Infrastructure/Persistence/LocksTests.cs @@ -6,12 +6,13 @@ using System.Text; using System.Threading; using NPoco; using NUnit.Framework; -using Umbraco.Core; -using Umbraco.Core.Persistence.Dtos; -using Umbraco.Tests.Integration.Testing; -using Umbraco.Tests.Testing; +using Umbraco.Cms.Core; +using Umbraco.Cms.Infrastructure.Persistence.Dtos; +using Umbraco.Cms.Tests.Common.Testing; +using Umbraco.Cms.Tests.Integration.Testing; +using Constants = Umbraco.Cms.Core.Constants; -namespace Umbraco.Tests.Persistence +namespace Umbraco.Cms.Tests.Integration.Umbraco.Infrastructure.Persistence { [TestFixture] [Timeout(60000)] diff --git a/src/Umbraco.Tests.Integration/Umbraco.Infrastructure/Persistence/NPocoTests/NPocoBulkInsertTests.cs b/src/Umbraco.Tests.Integration/Umbraco.Infrastructure/Persistence/NPocoTests/NPocoBulkInsertTests.cs index cf60557ba5..471586c715 100644 --- a/src/Umbraco.Tests.Integration/Umbraco.Infrastructure/Persistence/NPocoTests/NPocoBulkInsertTests.cs +++ b/src/Umbraco.Tests.Integration/Umbraco.Infrastructure/Persistence/NPocoTests/NPocoBulkInsertTests.cs @@ -8,15 +8,16 @@ using System.Linq; using System.Text.RegularExpressions; using NPoco; using NUnit.Framework; -using Umbraco.Core.Logging; -using Umbraco.Core.Persistence; -using Umbraco.Core.Persistence.Dtos; -using Umbraco.Core.Scoping; -using Umbraco.Tests.Integration.Implementations; -using Umbraco.Tests.Integration.Testing; -using Umbraco.Tests.Testing; +using Umbraco.Cms.Core.Logging; +using Umbraco.Cms.Core.Scoping; +using Umbraco.Cms.Infrastructure.Persistence; +using Umbraco.Cms.Infrastructure.Persistence.Dtos; +using Umbraco.Cms.Tests.Common.Testing; +using Umbraco.Cms.Tests.Integration.Implementations; +using Umbraco.Cms.Tests.Integration.Testing; +using Umbraco.Extensions; -namespace Umbraco.Tests.Integration.Umbraco.Infrastructure.Persistence.NPocoTests +namespace Umbraco.Cms.Tests.Integration.Umbraco.Infrastructure.Persistence.NPocoTests { // FIXME: npoco - is this still appropriate? [TestFixture] diff --git a/src/Umbraco.Tests.Integration/Umbraco.Infrastructure/Persistence/NPocoTests/NPocoFetchTests.cs b/src/Umbraco.Tests.Integration/Umbraco.Infrastructure/Persistence/NPocoTests/NPocoFetchTests.cs index ca248a1c80..bea5a8fb8c 100644 --- a/src/Umbraco.Tests.Integration/Umbraco.Infrastructure/Persistence/NPocoTests/NPocoFetchTests.cs +++ b/src/Umbraco.Tests.Integration/Umbraco.Infrastructure/Persistence/NPocoTests/NPocoFetchTests.cs @@ -6,12 +6,13 @@ using System.Collections.Generic; using System.Linq; using NPoco; using NUnit.Framework; -using Umbraco.Core.Persistence; -using Umbraco.Core.Scoping; -using Umbraco.Tests.Integration.Testing; -using Umbraco.Tests.Testing; +using Umbraco.Cms.Core.Scoping; +using Umbraco.Cms.Infrastructure.Persistence; +using Umbraco.Cms.Tests.Common.Testing; +using Umbraco.Cms.Tests.Integration.Testing; +using Umbraco.Extensions; -namespace Umbraco.Tests.Integration.Umbraco.Infrastructure.Persistence.NPocoTests +namespace Umbraco.Cms.Tests.Integration.Umbraco.Infrastructure.Persistence.NPocoTests { [TestFixture] [UmbracoTest(Database = UmbracoTestOptions.Database.NewSchemaPerTest, WithApplication = true)] diff --git a/src/Umbraco.Tests.Integration/Umbraco.Infrastructure/Persistence/Repositories/AuditRepositoryTest.cs b/src/Umbraco.Tests.Integration/Umbraco.Infrastructure/Persistence/Repositories/AuditRepositoryTest.cs index 10e89bc83a..c586d496b7 100644 --- a/src/Umbraco.Tests.Integration/Umbraco.Infrastructure/Persistence/Repositories/AuditRepositoryTest.cs +++ b/src/Umbraco.Tests.Integration/Umbraco.Infrastructure/Persistence/Repositories/AuditRepositoryTest.cs @@ -5,17 +5,17 @@ using System.Collections.Generic; using System.Linq; using Microsoft.Extensions.Logging; using NUnit.Framework; -using Umbraco.Core; -using Umbraco.Core.Models; -using Umbraco.Core.Persistence; -using Umbraco.Core.Persistence.Dtos; -using Umbraco.Core.Persistence.Querying; -using Umbraco.Core.Persistence.Repositories.Implement; -using Umbraco.Core.Scoping; -using Umbraco.Tests.Integration.Testing; -using Umbraco.Tests.Testing; +using Umbraco.Cms.Core; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Core.Persistence.Querying; +using Umbraco.Cms.Core.Scoping; +using Umbraco.Cms.Infrastructure.Persistence; +using Umbraco.Cms.Infrastructure.Persistence.Dtos; +using Umbraco.Cms.Infrastructure.Persistence.Repositories.Implement; +using Umbraco.Cms.Tests.Common.Testing; +using Umbraco.Cms.Tests.Integration.Testing; -namespace Umbraco.Tests.Integration.Umbraco.Infrastructure.Persistence.Repositories +namespace Umbraco.Cms.Tests.Integration.Umbraco.Infrastructure.Persistence.Repositories { [TestFixture] [UmbracoTest(Database = UmbracoTestOptions.Database.NewSchemaPerTest, Logger = UmbracoTestOptions.Logger.Console)] diff --git a/src/Umbraco.Tests.Integration/Umbraco.Infrastructure/Persistence/Repositories/ContentTypeRepositoryTest.cs b/src/Umbraco.Tests.Integration/Umbraco.Infrastructure/Persistence/Repositories/ContentTypeRepositoryTest.cs index 69441fd649..98bd28c084 100644 --- a/src/Umbraco.Tests.Integration/Umbraco.Infrastructure/Persistence/Repositories/ContentTypeRepositoryTest.cs +++ b/src/Umbraco.Tests.Integration/Umbraco.Infrastructure/Persistence/Repositories/ContentTypeRepositoryTest.cs @@ -6,23 +6,24 @@ using System.Collections.Generic; using System.Linq; using Microsoft.Extensions.Logging; using NUnit.Framework; -using Umbraco.Core; -using Umbraco.Core.Cache; -using Umbraco.Core.IO; -using Umbraco.Core.Mapping; -using Umbraco.Core.Models; -using Umbraco.Core.Persistence; -using Umbraco.Core.Persistence.Repositories; -using Umbraco.Core.Persistence.Repositories.Implement; -using Umbraco.Core.Scoping; -using Umbraco.Core.Services; -using Umbraco.Tests.Common.Builders; -using Umbraco.Tests.Integration.Testing; -using Umbraco.Tests.Testing; -using Umbraco.Web.Models.ContentEditing; -using Content = Umbraco.Core.Models.Content; +using Umbraco.Cms.Core.Cache; +using Umbraco.Cms.Core.IO; +using Umbraco.Cms.Core.Mapping; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Core.Models.ContentEditing; +using Umbraco.Cms.Core.Persistence; +using Umbraco.Cms.Core.Persistence.Repositories; +using Umbraco.Cms.Core.Scoping; +using Umbraco.Cms.Core.Services; +using Umbraco.Cms.Infrastructure.Persistence.Repositories.Implement; +using Umbraco.Cms.Tests.Common.Builders; +using Umbraco.Cms.Tests.Common.Extensions; +using Umbraco.Cms.Tests.Common.Testing; +using Umbraco.Cms.Tests.Integration.Testing; +using Constants = Umbraco.Cms.Core.Constants; +using Content = Umbraco.Cms.Core.Models.Content; -namespace Umbraco.Tests.Integration.Umbraco.Infrastructure.Persistence.Repositories +namespace Umbraco.Cms.Tests.Integration.Umbraco.Infrastructure.Persistence.Repositories { [TestFixture] [UmbracoTest(Mapper = true, Database = UmbracoTestOptions.Database.NewSchemaPerTest)] @@ -123,7 +124,7 @@ namespace Umbraco.Tests.Integration.Umbraco.Infrastructure.Persistence.Repositor contentType.ParentId = contentType.Id; repository.Save(contentType2); - global::Umbraco.Core.Events.MoveEventInfo[] result = repository.Move(contentType, container1).ToArray(); + global::Umbraco.Cms.Core.Events.MoveEventInfo[] result = repository.Move(contentType, container1).ToArray(); Assert.AreEqual(2, result.Count()); diff --git a/src/Umbraco.Tests.Integration/Umbraco.Infrastructure/Persistence/Repositories/DataTypeDefinitionRepositoryTest.cs b/src/Umbraco.Tests.Integration/Umbraco.Infrastructure/Persistence/Repositories/DataTypeDefinitionRepositoryTest.cs index 699e22746f..512d229e70 100644 --- a/src/Umbraco.Tests.Integration/Umbraco.Infrastructure/Persistence/Repositories/DataTypeDefinitionRepositoryTest.cs +++ b/src/Umbraco.Tests.Integration/Umbraco.Infrastructure/Persistence/Repositories/DataTypeDefinitionRepositoryTest.cs @@ -4,20 +4,20 @@ using System.Collections.Generic; using System.Linq; using NUnit.Framework; -using Umbraco.Core; -using Umbraco.Core.Events; -using Umbraco.Core.Models; -using Umbraco.Core.Persistence.Querying; -using Umbraco.Core.Persistence.Repositories; -using Umbraco.Core.PropertyEditors; -using Umbraco.Core.Scoping; -using Umbraco.Core.Serialization; -using Umbraco.Core.Services; -using Umbraco.Tests.Integration.Testing; -using Umbraco.Tests.Testing; -using Umbraco.Web.PropertyEditors; +using Umbraco.Cms.Core; +using Umbraco.Cms.Core.Events; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Core.Persistence.Querying; +using Umbraco.Cms.Core.Persistence.Repositories; +using Umbraco.Cms.Core.PropertyEditors; +using Umbraco.Cms.Core.Scoping; +using Umbraco.Cms.Core.Serialization; +using Umbraco.Cms.Core.Services; +using Umbraco.Cms.Tests.Common.Testing; +using Umbraco.Cms.Tests.Integration.Testing; +using Constants = Umbraco.Cms.Core.Constants; -namespace Umbraco.Tests.Integration.Umbraco.Infrastructure.Persistence.Repositories +namespace Umbraco.Cms.Tests.Integration.Umbraco.Infrastructure.Persistence.Repositories { [TestFixture] [UmbracoTest(Database = UmbracoTestOptions.Database.NewSchemaPerTest)] diff --git a/src/Umbraco.Tests.Integration/Umbraco.Infrastructure/Persistence/Repositories/DictionaryRepositoryTest.cs b/src/Umbraco.Tests.Integration/Umbraco.Infrastructure/Persistence/Repositories/DictionaryRepositoryTest.cs index edbeac263e..87f33b8589 100644 --- a/src/Umbraco.Tests.Integration/Umbraco.Infrastructure/Persistence/Repositories/DictionaryRepositoryTest.cs +++ b/src/Umbraco.Tests.Integration/Umbraco.Infrastructure/Persistence/Repositories/DictionaryRepositoryTest.cs @@ -5,16 +5,16 @@ using System; using System.Collections.Generic; using System.Linq; using NUnit.Framework; -using Umbraco.Core.Configuration.Models; -using Umbraco.Core.Models; -using Umbraco.Core.Persistence.Querying; -using Umbraco.Core.Persistence.Repositories; -using Umbraco.Core.Scoping; -using Umbraco.Core.Services; -using Umbraco.Tests.Integration.Testing; -using Umbraco.Tests.Testing; +using Umbraco.Cms.Core.Configuration.Models; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Core.Persistence.Querying; +using Umbraco.Cms.Core.Persistence.Repositories; +using Umbraco.Cms.Core.Scoping; +using Umbraco.Cms.Core.Services; +using Umbraco.Cms.Tests.Common.Testing; +using Umbraco.Cms.Tests.Integration.Testing; -namespace Umbraco.Tests.Integration.Umbraco.Infrastructure.Persistence.Repositories +namespace Umbraco.Cms.Tests.Integration.Umbraco.Infrastructure.Persistence.Repositories { [TestFixture] [UmbracoTest(Database = UmbracoTestOptions.Database.NewSchemaPerTest)] diff --git a/src/Umbraco.Tests.Integration/Umbraco.Infrastructure/Persistence/Repositories/DocumentRepositoryTest.cs b/src/Umbraco.Tests.Integration/Umbraco.Infrastructure/Persistence/Repositories/DocumentRepositoryTest.cs index 7bfc9ea573..d109afd944 100644 --- a/src/Umbraco.Tests.Integration/Umbraco.Infrastructure/Persistence/Repositories/DocumentRepositoryTest.cs +++ b/src/Umbraco.Tests.Integration/Umbraco.Infrastructure/Persistence/Repositories/DocumentRepositoryTest.cs @@ -7,24 +7,27 @@ using System.Linq; using Microsoft.Extensions.Logging; using Microsoft.Extensions.Options; using NUnit.Framework; -using Umbraco.Core; -using Umbraco.Core.Cache; -using Umbraco.Core.Configuration.Models; -using Umbraco.Core.IO; -using Umbraco.Core.Models; -using Umbraco.Core.Persistence; -using Umbraco.Core.Persistence.Querying; -using Umbraco.Core.Persistence.Repositories.Implement; -using Umbraco.Core.Persistence.SqlSyntax; -using Umbraco.Core.PropertyEditors; -using Umbraco.Core.Scoping; -using Umbraco.Core.Serialization; -using Umbraco.Core.Services; -using Umbraco.Tests.Common.Builders; -using Umbraco.Tests.Integration.Testing; -using Umbraco.Tests.Testing; +using Umbraco.Cms.Core; +using Umbraco.Cms.Core.Cache; +using Umbraco.Cms.Core.Configuration.Models; +using Umbraco.Cms.Core.IO; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Core.Persistence; +using Umbraco.Cms.Core.Persistence.Querying; +using Umbraco.Cms.Core.PropertyEditors; +using Umbraco.Cms.Core.Scoping; +using Umbraco.Cms.Core.Serialization; +using Umbraco.Cms.Core.Services; +using Umbraco.Cms.Infrastructure.Persistence; +using Umbraco.Cms.Infrastructure.Persistence.Repositories.Implement; +using Umbraco.Cms.Infrastructure.Persistence.SqlSyntax; +using Umbraco.Cms.Tests.Common.Builders; +using Umbraco.Cms.Tests.Common.Testing; +using Umbraco.Cms.Tests.Integration.Testing; +using Umbraco.Extensions; +using Constants = Umbraco.Cms.Core.Constants; -namespace Umbraco.Tests.Integration.Umbraco.Infrastructure.Persistence.Repositories +namespace Umbraco.Cms.Tests.Integration.Umbraco.Infrastructure.Persistence.Repositories { [TestFixture] [UmbracoTest(Database = UmbracoTestOptions.Database.NewSchemaPerTest)] @@ -54,7 +57,7 @@ namespace Umbraco.Tests.Integration.Umbraco.Infrastructure.Persistence.Repositor CreateTestData(); // TODO: remove this once IPublishedSnapShotService has been implemented with nucache. - global::Umbraco.Core.Services.Implement.ContentTypeService.ClearScopeEvents(); + global::Umbraco.Cms.Core.Services.Implement.ContentTypeService.ClearScopeEvents(); ContentRepositoryBase.ThrowOnWarning = true; } diff --git a/src/Umbraco.Tests.Integration/Umbraco.Infrastructure/Persistence/Repositories/DomainRepositoryTest.cs b/src/Umbraco.Tests.Integration/Umbraco.Infrastructure/Persistence/Repositories/DomainRepositoryTest.cs index 3a9794a93b..c53099cee9 100644 --- a/src/Umbraco.Tests.Integration/Umbraco.Infrastructure/Persistence/Repositories/DomainRepositoryTest.cs +++ b/src/Umbraco.Tests.Integration/Umbraco.Infrastructure/Persistence/Repositories/DomainRepositoryTest.cs @@ -6,17 +6,17 @@ using System.Data; using System.Linq; using Microsoft.Extensions.Logging; using NUnit.Framework; -using Umbraco.Core.Cache; -using Umbraco.Core.Configuration.Models; -using Umbraco.Core.Models; -using Umbraco.Core.Persistence.Repositories; -using Umbraco.Core.Persistence.Repositories.Implement; -using Umbraco.Core.Scoping; -using Umbraco.Tests.Common.Builders; -using Umbraco.Tests.Integration.Testing; -using Umbraco.Tests.Testing; +using Umbraco.Cms.Core.Cache; +using Umbraco.Cms.Core.Configuration.Models; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Core.Persistence.Repositories; +using Umbraco.Cms.Core.Scoping; +using Umbraco.Cms.Infrastructure.Persistence.Repositories.Implement; +using Umbraco.Cms.Tests.Common.Builders; +using Umbraco.Cms.Tests.Common.Testing; +using Umbraco.Cms.Tests.Integration.Testing; -namespace Umbraco.Tests.Integration.Umbraco.Infrastructure.Persistence.Repositories +namespace Umbraco.Cms.Tests.Integration.Umbraco.Infrastructure.Persistence.Repositories { [TestFixture] [UmbracoTest(Database = UmbracoTestOptions.Database.NewSchemaPerTest)] diff --git a/src/Umbraco.Tests.Integration/Umbraco.Infrastructure/Persistence/Repositories/EntityRepositoryTest.cs b/src/Umbraco.Tests.Integration/Umbraco.Infrastructure/Persistence/Repositories/EntityRepositoryTest.cs index cd2e5e5d01..9da3f6ef59 100644 --- a/src/Umbraco.Tests.Integration/Umbraco.Infrastructure/Persistence/Repositories/EntityRepositoryTest.cs +++ b/src/Umbraco.Tests.Integration/Umbraco.Infrastructure/Persistence/Repositories/EntityRepositoryTest.cs @@ -4,19 +4,19 @@ using System.Collections.Generic; using System.Linq; using NUnit.Framework; -using Umbraco.Core; -using Umbraco.Core.Cache; -using Umbraco.Core.Models; -using Umbraco.Core.Models.Entities; -using Umbraco.Core.Persistence.Querying; -using Umbraco.Core.Persistence.Repositories.Implement; -using Umbraco.Core.Scoping; -using Umbraco.Core.Services; -using Umbraco.Tests.Common.Builders; -using Umbraco.Tests.Integration.Testing; -using Umbraco.Tests.Testing; +using Umbraco.Cms.Core.Cache; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Core.Models.Entities; +using Umbraco.Cms.Core.Persistence.Querying; +using Umbraco.Cms.Core.Scoping; +using Umbraco.Cms.Core.Services; +using Umbraco.Cms.Infrastructure.Persistence.Repositories.Implement; +using Umbraco.Cms.Tests.Common.Builders; +using Umbraco.Cms.Tests.Common.Testing; +using Umbraco.Cms.Tests.Integration.Testing; +using Constants = Umbraco.Cms.Core.Constants; -namespace Umbraco.Tests.Integration.Umbraco.Infrastructure.Persistence.Repositories +namespace Umbraco.Cms.Tests.Integration.Umbraco.Infrastructure.Persistence.Repositories { [TestFixture] [UmbracoTest(Mapper = true, Database = UmbracoTestOptions.Database.NewSchemaPerTest)] diff --git a/src/Umbraco.Tests.Integration/Umbraco.Infrastructure/Persistence/Repositories/KeyValueRepositoryTests.cs b/src/Umbraco.Tests.Integration/Umbraco.Infrastructure/Persistence/Repositories/KeyValueRepositoryTests.cs index 29885d732d..3f3a709ce9 100644 --- a/src/Umbraco.Tests.Integration/Umbraco.Infrastructure/Persistence/Repositories/KeyValueRepositoryTests.cs +++ b/src/Umbraco.Tests.Integration/Umbraco.Infrastructure/Persistence/Repositories/KeyValueRepositoryTests.cs @@ -4,14 +4,14 @@ using System; using Microsoft.Extensions.Logging; using NUnit.Framework; -using Umbraco.Core.Models; -using Umbraco.Core.Persistence.Repositories; -using Umbraco.Core.Persistence.Repositories.Implement; -using Umbraco.Core.Scoping; -using Umbraco.Tests.Integration.Testing; -using Umbraco.Tests.Testing; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Core.Persistence.Repositories; +using Umbraco.Cms.Core.Scoping; +using Umbraco.Cms.Infrastructure.Persistence.Repositories.Implement; +using Umbraco.Cms.Tests.Common.Testing; +using Umbraco.Cms.Tests.Integration.Testing; -namespace Umbraco.Tests.Integration.Umbraco.Infrastructure.Persistence.Repositories +namespace Umbraco.Cms.Tests.Integration.Umbraco.Infrastructure.Persistence.Repositories { [TestFixture] [UmbracoTest(Database = UmbracoTestOptions.Database.NewSchemaPerTest)] diff --git a/src/Umbraco.Tests.Integration/Umbraco.Infrastructure/Persistence/Repositories/LanguageRepositoryTest.cs b/src/Umbraco.Tests.Integration/Umbraco.Infrastructure/Persistence/Repositories/LanguageRepositoryTest.cs index 45e63cf091..242533c651 100644 --- a/src/Umbraco.Tests.Integration/Umbraco.Infrastructure/Persistence/Repositories/LanguageRepositoryTest.cs +++ b/src/Umbraco.Tests.Integration/Umbraco.Infrastructure/Persistence/Repositories/LanguageRepositoryTest.cs @@ -7,18 +7,18 @@ using System.Globalization; using System.Linq; using Microsoft.Extensions.Logging; using NUnit.Framework; -using Umbraco.Core.Cache; -using Umbraco.Core.Configuration.Models; -using Umbraco.Core.Models; -using Umbraco.Core.Persistence; -using Umbraco.Core.Persistence.Querying; -using Umbraco.Core.Persistence.Repositories.Implement; -using Umbraco.Core.Scoping; -using Umbraco.Core.Services; -using Umbraco.Tests.Integration.Testing; -using Umbraco.Tests.Testing; +using Umbraco.Cms.Core.Cache; +using Umbraco.Cms.Core.Configuration.Models; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Core.Persistence.Querying; +using Umbraco.Cms.Core.Scoping; +using Umbraco.Cms.Core.Services; +using Umbraco.Cms.Infrastructure.Persistence; +using Umbraco.Cms.Infrastructure.Persistence.Repositories.Implement; +using Umbraco.Cms.Tests.Common.Testing; +using Umbraco.Cms.Tests.Integration.Testing; -namespace Umbraco.Tests.Integration.Umbraco.Infrastructure.Persistence.Repositories +namespace Umbraco.Cms.Tests.Integration.Umbraco.Infrastructure.Persistence.Repositories { [TestFixture] [UmbracoTest(Database = UmbracoTestOptions.Database.NewSchemaPerTest)] diff --git a/src/Umbraco.Tests.Integration/Umbraco.Infrastructure/Persistence/Repositories/MacroRepositoryTest.cs b/src/Umbraco.Tests.Integration/Umbraco.Infrastructure/Persistence/Repositories/MacroRepositoryTest.cs index 160642bcb7..2766e66426 100644 --- a/src/Umbraco.Tests.Integration/Umbraco.Infrastructure/Persistence/Repositories/MacroRepositoryTest.cs +++ b/src/Umbraco.Tests.Integration/Umbraco.Infrastructure/Persistence/Repositories/MacroRepositoryTest.cs @@ -6,15 +6,15 @@ using System.Data.SqlClient; using System.Linq; using Microsoft.Extensions.Logging; using NUnit.Framework; -using Umbraco.Core.Cache; -using Umbraco.Core.Models; -using Umbraco.Core.Persistence.Querying; -using Umbraco.Core.Persistence.Repositories.Implement; -using Umbraco.Core.Scoping; -using Umbraco.Tests.Integration.Testing; -using Umbraco.Tests.Testing; +using Umbraco.Cms.Core.Cache; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Core.Persistence.Querying; +using Umbraco.Cms.Core.Scoping; +using Umbraco.Cms.Infrastructure.Persistence.Repositories.Implement; +using Umbraco.Cms.Tests.Common.Testing; +using Umbraco.Cms.Tests.Integration.Testing; -namespace Umbraco.Tests.Integration.Umbraco.Infrastructure.Persistence.Repositories +namespace Umbraco.Cms.Tests.Integration.Umbraco.Infrastructure.Persistence.Repositories { [TestFixture] [UmbracoTest(Database = UmbracoTestOptions.Database.NewSchemaPerTest)] diff --git a/src/Umbraco.Tests.Integration/Umbraco.Infrastructure/Persistence/Repositories/MediaRepositoryTest.cs b/src/Umbraco.Tests.Integration/Umbraco.Infrastructure/Persistence/Repositories/MediaRepositoryTest.cs index 0c70405378..1aaec29455 100644 --- a/src/Umbraco.Tests.Integration/Umbraco.Infrastructure/Persistence/Repositories/MediaRepositoryTest.cs +++ b/src/Umbraco.Tests.Integration/Umbraco.Infrastructure/Persistence/Repositories/MediaRepositoryTest.cs @@ -7,25 +7,26 @@ using System.Linq; using Microsoft.Extensions.Logging; using Moq; using NUnit.Framework; -using Umbraco.Core; -using Umbraco.Core.Cache; -using Umbraco.Core.Configuration.Models; -using Umbraco.Core.Models; -using Umbraco.Core.Models.Entities; -using Umbraco.Core.Persistence; -using Umbraco.Core.Persistence.Dtos; -using Umbraco.Core.Persistence.Querying; -using Umbraco.Core.Persistence.Repositories; -using Umbraco.Core.Persistence.Repositories.Implement; -using Umbraco.Core.PropertyEditors; -using Umbraco.Core.Scoping; -using Umbraco.Core.Serialization; -using Umbraco.Core.Services; -using Umbraco.Tests.Common.Builders; -using Umbraco.Tests.Integration.Testing; -using Umbraco.Tests.Testing; +using Umbraco.Cms.Core; +using Umbraco.Cms.Core.Cache; +using Umbraco.Cms.Core.Configuration.Models; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Core.Models.Entities; +using Umbraco.Cms.Core.Persistence; +using Umbraco.Cms.Core.Persistence.Querying; +using Umbraco.Cms.Core.Persistence.Repositories; +using Umbraco.Cms.Core.PropertyEditors; +using Umbraco.Cms.Core.Scoping; +using Umbraco.Cms.Core.Serialization; +using Umbraco.Cms.Core.Services; +using Umbraco.Cms.Infrastructure.Persistence; +using Umbraco.Cms.Infrastructure.Persistence.Dtos; +using Umbraco.Cms.Infrastructure.Persistence.Repositories.Implement; +using Umbraco.Cms.Tests.Common.Builders; +using Umbraco.Cms.Tests.Common.Testing; +using Umbraco.Cms.Tests.Integration.Testing; -namespace Umbraco.Tests.Integration.Umbraco.Infrastructure.Persistence.Repositories +namespace Umbraco.Cms.Tests.Integration.Umbraco.Infrastructure.Persistence.Repositories { [TestFixture] [UmbracoTest(Database = UmbracoTestOptions.Database.NewSchemaPerTest)] diff --git a/src/Umbraco.Tests.Integration/Umbraco.Infrastructure/Persistence/Repositories/MediaTypeRepositoryTest.cs b/src/Umbraco.Tests.Integration/Umbraco.Infrastructure/Persistence/Repositories/MediaTypeRepositoryTest.cs index 0626205d25..2156571b3f 100644 --- a/src/Umbraco.Tests.Integration/Umbraco.Infrastructure/Persistence/Repositories/MediaTypeRepositoryTest.cs +++ b/src/Umbraco.Tests.Integration/Umbraco.Infrastructure/Persistence/Repositories/MediaTypeRepositoryTest.cs @@ -6,18 +6,18 @@ using System.Collections.Generic; using System.Linq; using Microsoft.Extensions.Logging; using NUnit.Framework; -using Umbraco.Core; -using Umbraco.Core.Cache; -using Umbraco.Core.Models; -using Umbraco.Core.Persistence; -using Umbraco.Core.Persistence.Repositories; -using Umbraco.Core.Persistence.Repositories.Implement; -using Umbraco.Core.Scoping; -using Umbraco.Tests.Common.Builders; -using Umbraco.Tests.Integration.Testing; -using Umbraco.Tests.Testing; +using Umbraco.Cms.Core.Cache; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Core.Persistence; +using Umbraco.Cms.Core.Persistence.Repositories; +using Umbraco.Cms.Core.Scoping; +using Umbraco.Cms.Infrastructure.Persistence.Repositories.Implement; +using Umbraco.Cms.Tests.Common.Builders; +using Umbraco.Cms.Tests.Common.Testing; +using Umbraco.Cms.Tests.Integration.Testing; +using Constants = Umbraco.Cms.Core.Constants; -namespace Umbraco.Tests.Integration.Umbraco.Infrastructure.Persistence.Repositories +namespace Umbraco.Cms.Tests.Integration.Umbraco.Infrastructure.Persistence.Repositories { [TestFixture] [UmbracoTest(Database = UmbracoTestOptions.Database.NewSchemaPerTest)] @@ -54,7 +54,7 @@ namespace Umbraco.Tests.Integration.Umbraco.Infrastructure.Persistence.Repositor contentType.ParentId = contentType.Id; repository.Save(contentType2); - global::Umbraco.Core.Events.MoveEventInfo[] result = repository.Move(contentType, container1).ToArray(); + global::Umbraco.Cms.Core.Events.MoveEventInfo[] result = repository.Move(contentType, container1).ToArray(); Assert.AreEqual(2, result.Length); diff --git a/src/Umbraco.Tests.Integration/Umbraco.Infrastructure/Persistence/Repositories/MemberRepositoryTest.cs b/src/Umbraco.Tests.Integration/Umbraco.Infrastructure/Persistence/Repositories/MemberRepositoryTest.cs index 57518eb371..f94d2483f0 100644 --- a/src/Umbraco.Tests.Integration/Umbraco.Infrastructure/Persistence/Repositories/MemberRepositoryTest.cs +++ b/src/Umbraco.Tests.Integration/Umbraco.Infrastructure/Persistence/Repositories/MemberRepositoryTest.cs @@ -9,24 +9,27 @@ using Microsoft.Extensions.Logging; using Moq; using NPoco; using NUnit.Framework; -using Umbraco.Core; -using Umbraco.Core.Cache; -using Umbraco.Core.Models; -using Umbraco.Core.Persistence; -using Umbraco.Core.Persistence.Dtos; -using Umbraco.Core.Persistence.Querying; -using Umbraco.Core.Persistence.Repositories; -using Umbraco.Core.Persistence.Repositories.Implement; -using Umbraco.Core.PropertyEditors; -using Umbraco.Core.Scoping; -using Umbraco.Core.Security; -using Umbraco.Core.Serialization; -using Umbraco.Core.Services; -using Umbraco.Tests.Common.Builders; -using Umbraco.Tests.Integration.Testing; -using Umbraco.Tests.Testing; +using Umbraco.Cms.Core; +using Umbraco.Cms.Core.Cache; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Core.Persistence.Querying; +using Umbraco.Cms.Core.Persistence.Repositories; +using Umbraco.Cms.Core.PropertyEditors; +using Umbraco.Cms.Core.Scoping; +using Umbraco.Cms.Core.Security; +using Umbraco.Cms.Core.Serialization; +using Umbraco.Cms.Core.Services; +using Umbraco.Cms.Infrastructure.Persistence; +using Umbraco.Cms.Infrastructure.Persistence.Dtos; +using Umbraco.Cms.Infrastructure.Persistence.Querying; +using Umbraco.Cms.Infrastructure.Persistence.Repositories.Implement; +using Umbraco.Cms.Tests.Common.Builders; +using Umbraco.Cms.Tests.Common.Testing; +using Umbraco.Cms.Tests.Integration.Testing; +using Umbraco.Extensions; +using Constants = Umbraco.Cms.Core.Constants; -namespace Umbraco.Tests.Integration.Umbraco.Infrastructure.Persistence.Repositories +namespace Umbraco.Cms.Tests.Integration.Umbraco.Infrastructure.Persistence.Repositories { [TestFixture] [UmbracoTest(Database = UmbracoTestOptions.Database.NewSchemaPerTest)] diff --git a/src/Umbraco.Tests.Integration/Umbraco.Infrastructure/Persistence/Repositories/MemberTypeRepositoryTest.cs b/src/Umbraco.Tests.Integration/Umbraco.Infrastructure/Persistence/Repositories/MemberTypeRepositoryTest.cs index d8f550f1bb..0caa87563b 100644 --- a/src/Umbraco.Tests.Integration/Umbraco.Infrastructure/Persistence/Repositories/MemberTypeRepositoryTest.cs +++ b/src/Umbraco.Tests.Integration/Umbraco.Infrastructure/Persistence/Repositories/MemberTypeRepositoryTest.cs @@ -7,18 +7,19 @@ using System.Linq; using Microsoft.Extensions.Logging; using Moq; using NUnit.Framework; -using Umbraco.Core; -using Umbraco.Core.Cache; -using Umbraco.Core.Models; -using Umbraco.Core.Persistence; -using Umbraco.Core.Persistence.Repositories; -using Umbraco.Core.Persistence.Repositories.Implement; -using Umbraco.Core.Scoping; -using Umbraco.Tests.Common.Builders; -using Umbraco.Tests.Integration.Testing; -using Umbraco.Tests.Testing; +using Umbraco.Cms.Core; +using Umbraco.Cms.Core.Cache; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Core.Persistence; +using Umbraco.Cms.Core.Persistence.Repositories; +using Umbraco.Cms.Core.Scoping; +using Umbraco.Cms.Infrastructure.Persistence.Repositories.Implement; +using Umbraco.Cms.Tests.Common.Builders; +using Umbraco.Cms.Tests.Common.Testing; +using Umbraco.Cms.Tests.Integration.Testing; +using Constants = Umbraco.Cms.Core.Constants; -namespace Umbraco.Tests.Integration.Umbraco.Infrastructure.Persistence.Repositories +namespace Umbraco.Cms.Tests.Integration.Umbraco.Infrastructure.Persistence.Repositories { [TestFixture] [UmbracoTest(Database = UmbracoTestOptions.Database.NewSchemaPerTest)] diff --git a/src/Umbraco.Tests.Integration/Umbraco.Infrastructure/Persistence/Repositories/NotificationsRepositoryTest.cs b/src/Umbraco.Tests.Integration/Umbraco.Infrastructure/Persistence/Repositories/NotificationsRepositoryTest.cs index c15a858218..be625e4afd 100644 --- a/src/Umbraco.Tests.Integration/Umbraco.Infrastructure/Persistence/Repositories/NotificationsRepositoryTest.cs +++ b/src/Umbraco.Tests.Integration/Umbraco.Infrastructure/Persistence/Repositories/NotificationsRepositoryTest.cs @@ -7,17 +7,17 @@ using System.Globalization; using System.Linq; using Moq; using NUnit.Framework; -using Umbraco.Core; -using Umbraco.Core.Models; -using Umbraco.Core.Models.Entities; -using Umbraco.Core.Models.Membership; -using Umbraco.Core.Persistence.Dtos; -using Umbraco.Core.Persistence.Repositories.Implement; -using Umbraco.Core.Scoping; -using Umbraco.Tests.Integration.Testing; -using Umbraco.Tests.Testing; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Core.Models.Entities; +using Umbraco.Cms.Core.Models.Membership; +using Umbraco.Cms.Core.Scoping; +using Umbraco.Cms.Infrastructure.Persistence.Dtos; +using Umbraco.Cms.Infrastructure.Persistence.Repositories.Implement; +using Umbraco.Cms.Tests.Common.Testing; +using Umbraco.Cms.Tests.Integration.Testing; +using Constants = Umbraco.Cms.Core.Constants; -namespace Umbraco.Tests.Integration.Umbraco.Infrastructure.Persistence.Repositories +namespace Umbraco.Cms.Tests.Integration.Umbraco.Infrastructure.Persistence.Repositories { [TestFixture] [UmbracoTest(Database = UmbracoTestOptions.Database.NewSchemaPerTest)] diff --git a/src/Umbraco.Tests.Integration/Umbraco.Infrastructure/Persistence/Repositories/PartialViewRepositoryTests.cs b/src/Umbraco.Tests.Integration/Umbraco.Infrastructure/Persistence/Repositories/PartialViewRepositoryTests.cs index d4a90e6fcb..44947b45cc 100644 --- a/src/Umbraco.Tests.Integration/Umbraco.Infrastructure/Persistence/Repositories/PartialViewRepositoryTests.cs +++ b/src/Umbraco.Tests.Integration/Umbraco.Infrastructure/Persistence/Repositories/PartialViewRepositoryTests.cs @@ -7,16 +7,16 @@ using System.IO; using Microsoft.Extensions.Logging; using Moq; using NUnit.Framework; -using Umbraco.Core; -using Umbraco.Core.Hosting; -using Umbraco.Core.IO; -using Umbraco.Core.Models; -using Umbraco.Core.Persistence.Repositories.Implement; -using Umbraco.Core.Scoping; -using Umbraco.Tests.Integration.Testing; -using Umbraco.Tests.Testing; +using Umbraco.Cms.Core.Hosting; +using Umbraco.Cms.Core.IO; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Core.Scoping; +using Umbraco.Cms.Infrastructure.Persistence.Repositories.Implement; +using Umbraco.Cms.Tests.Common.Testing; +using Umbraco.Cms.Tests.Integration.Testing; +using Constants = Umbraco.Cms.Core.Constants; -namespace Umbraco.Tests.Integration.Umbraco.Infrastructure.Persistence.Repositories +namespace Umbraco.Cms.Tests.Integration.Umbraco.Infrastructure.Persistence.Repositories { [TestFixture] [UmbracoTest(Database = UmbracoTestOptions.Database.None)] diff --git a/src/Umbraco.Tests.Integration/Umbraco.Infrastructure/Persistence/Repositories/PublicAccessRepositoryTest.cs b/src/Umbraco.Tests.Integration/Umbraco.Infrastructure/Persistence/Repositories/PublicAccessRepositoryTest.cs index 20c3f98f45..3926c4975c 100644 --- a/src/Umbraco.Tests.Integration/Umbraco.Infrastructure/Persistence/Repositories/PublicAccessRepositoryTest.cs +++ b/src/Umbraco.Tests.Integration/Umbraco.Infrastructure/Persistence/Repositories/PublicAccessRepositoryTest.cs @@ -6,17 +6,17 @@ using System.Collections.Generic; using System.Linq; using Microsoft.Extensions.Logging; using NUnit.Framework; -using Umbraco.Core.Models; -using Umbraco.Core.Persistence; -using Umbraco.Core.Persistence.Repositories; -using Umbraco.Core.Persistence.Repositories.Implement; -using Umbraco.Core.Scoping; -using Umbraco.Tests.Common.Builders; -using Umbraco.Tests.Integration.Testing; -using Umbraco.Tests.Testing; -using Content = Umbraco.Core.Models.Content; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Core.Persistence.Repositories; +using Umbraco.Cms.Core.Scoping; +using Umbraco.Cms.Infrastructure.Persistence; +using Umbraco.Cms.Infrastructure.Persistence.Repositories.Implement; +using Umbraco.Cms.Tests.Common.Builders; +using Umbraco.Cms.Tests.Common.Testing; +using Umbraco.Cms.Tests.Integration.Testing; +using Content = Umbraco.Cms.Core.Models.Content; -namespace Umbraco.Tests.Integration.Umbraco.Infrastructure.Persistence.Repositories +namespace Umbraco.Cms.Tests.Integration.Umbraco.Infrastructure.Persistence.Repositories { [TestFixture] [UmbracoTest(Database = UmbracoTestOptions.Database.NewSchemaPerTest)] diff --git a/src/Umbraco.Tests.Integration/Umbraco.Infrastructure/Persistence/Repositories/RedirectUrlRepositoryTests.cs b/src/Umbraco.Tests.Integration/Umbraco.Infrastructure/Persistence/Repositories/RedirectUrlRepositoryTests.cs index cc0624a2b8..04a0fd3ebb 100644 --- a/src/Umbraco.Tests.Integration/Umbraco.Infrastructure/Persistence/Repositories/RedirectUrlRepositoryTests.cs +++ b/src/Umbraco.Tests.Integration/Umbraco.Infrastructure/Persistence/Repositories/RedirectUrlRepositoryTests.cs @@ -6,16 +6,16 @@ using System.Collections.Generic; using System.Linq; using Microsoft.Extensions.Logging; using NUnit.Framework; -using Umbraco.Core.Models; -using Umbraco.Core.Persistence.Repositories; -using Umbraco.Core.Persistence.Repositories.Implement; -using Umbraco.Core.Scoping; -using Umbraco.Core.Services; -using Umbraco.Tests.Common.Builders; -using Umbraco.Tests.Integration.Testing; -using Umbraco.Tests.Testing; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Core.Persistence.Repositories; +using Umbraco.Cms.Core.Scoping; +using Umbraco.Cms.Core.Services; +using Umbraco.Cms.Infrastructure.Persistence.Repositories.Implement; +using Umbraco.Cms.Tests.Common.Builders; +using Umbraco.Cms.Tests.Common.Testing; +using Umbraco.Cms.Tests.Integration.Testing; -namespace Umbraco.Tests.Integration.Umbraco.Infrastructure.Persistence.Repositories +namespace Umbraco.Cms.Tests.Integration.Umbraco.Infrastructure.Persistence.Repositories { [TestFixture] [UmbracoTest(Database = UmbracoTestOptions.Database.NewSchemaPerTest)] diff --git a/src/Umbraco.Tests.Integration/Umbraco.Infrastructure/Persistence/Repositories/RelationRepositoryTest.cs b/src/Umbraco.Tests.Integration/Umbraco.Infrastructure/Persistence/Repositories/RelationRepositoryTest.cs index cccae431a7..ee01816f09 100644 --- a/src/Umbraco.Tests.Integration/Umbraco.Infrastructure/Persistence/Repositories/RelationRepositoryTest.cs +++ b/src/Umbraco.Tests.Integration/Umbraco.Infrastructure/Persistence/Repositories/RelationRepositoryTest.cs @@ -7,20 +7,20 @@ using System.Linq; using Microsoft.Extensions.Logging; using Moq; using NUnit.Framework; -using Umbraco.Core; -using Umbraco.Core.Cache; -using Umbraco.Core.Models; -using Umbraco.Core.Models.Entities; -using Umbraco.Core.Persistence.Querying; -using Umbraco.Core.Persistence.Repositories; -using Umbraco.Core.Persistence.Repositories.Implement; -using Umbraco.Core.Scoping; -using Umbraco.Core.Services; -using Umbraco.Tests.Common.Builders; -using Umbraco.Tests.Integration.Testing; -using Umbraco.Tests.Testing; +using Umbraco.Cms.Core.Cache; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Core.Models.Entities; +using Umbraco.Cms.Core.Persistence.Querying; +using Umbraco.Cms.Core.Persistence.Repositories; +using Umbraco.Cms.Core.Scoping; +using Umbraco.Cms.Core.Services; +using Umbraco.Cms.Infrastructure.Persistence.Repositories.Implement; +using Umbraco.Cms.Tests.Common.Builders; +using Umbraco.Cms.Tests.Common.Testing; +using Umbraco.Cms.Tests.Integration.Testing; +using Constants = Umbraco.Cms.Core.Constants; -namespace Umbraco.Tests.Integration.Umbraco.Infrastructure.Persistence.Repositories +namespace Umbraco.Cms.Tests.Integration.Umbraco.Infrastructure.Persistence.Repositories { [TestFixture] [UmbracoTest(Database = UmbracoTestOptions.Database.NewSchemaPerTest)] diff --git a/src/Umbraco.Tests.Integration/Umbraco.Infrastructure/Persistence/Repositories/RelationTypeRepositoryTest.cs b/src/Umbraco.Tests.Integration/Umbraco.Infrastructure/Persistence/Repositories/RelationTypeRepositoryTest.cs index 8c28fad0de..4b0a23464f 100644 --- a/src/Umbraco.Tests.Integration/Umbraco.Infrastructure/Persistence/Repositories/RelationTypeRepositoryTest.cs +++ b/src/Umbraco.Tests.Integration/Umbraco.Infrastructure/Persistence/Repositories/RelationTypeRepositoryTest.cs @@ -5,16 +5,16 @@ using System.Collections.Generic; using System.Linq; using Microsoft.Extensions.Logging; using NUnit.Framework; -using Umbraco.Core; -using Umbraco.Core.Cache; -using Umbraco.Core.Models; -using Umbraco.Core.Persistence.Querying; -using Umbraco.Core.Persistence.Repositories.Implement; -using Umbraco.Core.Scoping; -using Umbraco.Tests.Integration.Testing; -using Umbraco.Tests.Testing; +using Umbraco.Cms.Core.Cache; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Core.Persistence.Querying; +using Umbraco.Cms.Core.Scoping; +using Umbraco.Cms.Infrastructure.Persistence.Repositories.Implement; +using Umbraco.Cms.Tests.Common.Testing; +using Umbraco.Cms.Tests.Integration.Testing; +using Constants = Umbraco.Cms.Core.Constants; -namespace Umbraco.Tests.Integration.Umbraco.Infrastructure.Persistence.Repositories +namespace Umbraco.Cms.Tests.Integration.Umbraco.Infrastructure.Persistence.Repositories { [TestFixture] [UmbracoTest(Database = UmbracoTestOptions.Database.NewSchemaPerTest)] diff --git a/src/Umbraco.Tests.Integration/Umbraco.Infrastructure/Persistence/Repositories/ScriptRepositoryTest.cs b/src/Umbraco.Tests.Integration/Umbraco.Infrastructure/Persistence/Repositories/ScriptRepositoryTest.cs index 514829a2dc..35e53905a0 100644 --- a/src/Umbraco.Tests.Integration/Umbraco.Infrastructure/Persistence/Repositories/ScriptRepositoryTest.cs +++ b/src/Umbraco.Tests.Integration/Umbraco.Infrastructure/Persistence/Repositories/ScriptRepositoryTest.cs @@ -9,17 +9,17 @@ using System.Text; using Microsoft.Extensions.Logging; using Moq; using NUnit.Framework; -using Umbraco.Core.Configuration.Models; -using Umbraco.Core.Hosting; -using Umbraco.Core.IO; -using Umbraco.Core.Models; -using Umbraco.Core.Persistence.Repositories; -using Umbraco.Core.Persistence.Repositories.Implement; -using Umbraco.Core.Scoping; -using Umbraco.Tests.Integration.Testing; -using Umbraco.Tests.Testing; +using Umbraco.Cms.Core.Configuration.Models; +using Umbraco.Cms.Core.Hosting; +using Umbraco.Cms.Core.IO; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Core.Persistence.Repositories; +using Umbraco.Cms.Core.Scoping; +using Umbraco.Cms.Infrastructure.Persistence.Repositories.Implement; +using Umbraco.Cms.Tests.Common.Testing; +using Umbraco.Cms.Tests.Integration.Testing; -namespace Umbraco.Tests.Integration.Umbraco.Infrastructure.Persistence.Repositories +namespace Umbraco.Cms.Tests.Integration.Umbraco.Infrastructure.Persistence.Repositories { [TestFixture] [UmbracoTest(Database = UmbracoTestOptions.Database.None)] diff --git a/src/Umbraco.Tests.Integration/Umbraco.Infrastructure/Persistence/Repositories/ServerRegistrationRepositoryTest.cs b/src/Umbraco.Tests.Integration/Umbraco.Infrastructure/Persistence/Repositories/ServerRegistrationRepositoryTest.cs index 80226da9a5..f85796f622 100644 --- a/src/Umbraco.Tests.Integration/Umbraco.Infrastructure/Persistence/Repositories/ServerRegistrationRepositoryTest.cs +++ b/src/Umbraco.Tests.Integration/Umbraco.Infrastructure/Persistence/Repositories/ServerRegistrationRepositoryTest.cs @@ -7,14 +7,14 @@ using System.Data.SqlClient; using System.Linq; using Microsoft.Extensions.Logging; using NUnit.Framework; -using Umbraco.Core.Cache; -using Umbraco.Core.Models; -using Umbraco.Core.Persistence.Repositories.Implement; -using Umbraco.Core.Scoping; -using Umbraco.Tests.Integration.Testing; -using Umbraco.Tests.Testing; +using Umbraco.Cms.Core.Cache; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Core.Scoping; +using Umbraco.Cms.Infrastructure.Persistence.Repositories.Implement; +using Umbraco.Cms.Tests.Common.Testing; +using Umbraco.Cms.Tests.Integration.Testing; -namespace Umbraco.Tests.Integration.Umbraco.Infrastructure.Persistence.Repositories +namespace Umbraco.Cms.Tests.Integration.Umbraco.Infrastructure.Persistence.Repositories { [TestFixture] [UmbracoTest(Database = UmbracoTestOptions.Database.NewSchemaPerTest)] diff --git a/src/Umbraco.Tests.Integration/Umbraco.Infrastructure/Persistence/Repositories/SimilarNodeNameTests.cs b/src/Umbraco.Tests.Integration/Umbraco.Infrastructure/Persistence/Repositories/SimilarNodeNameTests.cs index 215303d981..87ffdaa3e6 100644 --- a/src/Umbraco.Tests.Integration/Umbraco.Infrastructure/Persistence/Repositories/SimilarNodeNameTests.cs +++ b/src/Umbraco.Tests.Integration/Umbraco.Infrastructure/Persistence/Repositories/SimilarNodeNameTests.cs @@ -2,9 +2,9 @@ // See LICENSE for more details. using NUnit.Framework; -using Umbraco.Core.Persistence.Repositories.Implement; +using Umbraco.Cms.Infrastructure.Persistence.Repositories.Implement; -namespace Umbraco.Tests.Integration.Umbraco.Infrastructure.Persistence.Repositories +namespace Umbraco.Cms.Tests.Integration.Umbraco.Infrastructure.Persistence.Repositories { [TestFixture] public class SimilarNodeNameTests diff --git a/src/Umbraco.Tests.Integration/Umbraco.Infrastructure/Persistence/Repositories/StylesheetRepositoryTest.cs b/src/Umbraco.Tests.Integration/Umbraco.Infrastructure/Persistence/Repositories/StylesheetRepositoryTest.cs index e142c2a1fa..6f6d6e3e71 100644 --- a/src/Umbraco.Tests.Integration/Umbraco.Infrastructure/Persistence/Repositories/StylesheetRepositoryTest.cs +++ b/src/Umbraco.Tests.Integration/Umbraco.Infrastructure/Persistence/Repositories/StylesheetRepositoryTest.cs @@ -10,17 +10,16 @@ using System.Text; using Microsoft.Extensions.Logging; using Moq; using NUnit.Framework; -using Umbraco.Core.Configuration.Models; -using Umbraco.Core.Hosting; -using Umbraco.Core.IO; -using Umbraco.Core.Models; -using Umbraco.Core.Persistence.Repositories; -using Umbraco.Core.Persistence.Repositories.Implement; -using Umbraco.Tests.Integration.Implementations; -using Umbraco.Tests.Integration.Testing; -using Umbraco.Tests.Testing; +using Umbraco.Cms.Core.Configuration.Models; +using Umbraco.Cms.Core.Hosting; +using Umbraco.Cms.Core.IO; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Core.Persistence.Repositories; +using Umbraco.Cms.Infrastructure.Persistence.Repositories.Implement; +using Umbraco.Cms.Tests.Common.Testing; +using Umbraco.Cms.Tests.Integration.Testing; -namespace Umbraco.Tests.Integration.Umbraco.Infrastructure.Persistence.Repositories +namespace Umbraco.Cms.Tests.Integration.Umbraco.Infrastructure.Persistence.Repositories { [TestFixture] [UmbracoTest(Database = UmbracoTestOptions.Database.None, Logger = UmbracoTestOptions.Logger.Console)] diff --git a/src/Umbraco.Tests.Integration/Umbraco.Infrastructure/Persistence/Repositories/TagRepositoryTest.cs b/src/Umbraco.Tests.Integration/Umbraco.Infrastructure/Persistence/Repositories/TagRepositoryTest.cs index 7744173f3f..e2972ad504 100644 --- a/src/Umbraco.Tests.Integration/Umbraco.Infrastructure/Persistence/Repositories/TagRepositoryTest.cs +++ b/src/Umbraco.Tests.Integration/Umbraco.Infrastructure/Persistence/Repositories/TagRepositoryTest.cs @@ -5,17 +5,17 @@ using System.Collections.Generic; using System.Linq; using Microsoft.Extensions.Logging; using NUnit.Framework; -using Umbraco.Core.Cache; -using Umbraco.Core.Models; -using Umbraco.Core.Persistence.Repositories; -using Umbraco.Core.Persistence.Repositories.Implement; -using Umbraco.Core.Scoping; -using Umbraco.Core.Services; -using Umbraco.Tests.Common.Builders; -using Umbraco.Tests.Integration.Testing; -using Umbraco.Tests.Testing; +using Umbraco.Cms.Core.Cache; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Core.Persistence.Repositories; +using Umbraco.Cms.Core.Scoping; +using Umbraco.Cms.Core.Services; +using Umbraco.Cms.Infrastructure.Persistence.Repositories.Implement; +using Umbraco.Cms.Tests.Common.Builders; +using Umbraco.Cms.Tests.Common.Testing; +using Umbraco.Cms.Tests.Integration.Testing; -namespace Umbraco.Tests.Integration.Umbraco.Infrastructure.Persistence.Repositories +namespace Umbraco.Cms.Tests.Integration.Umbraco.Infrastructure.Persistence.Repositories { [TestFixture] [UmbracoTest(Database = UmbracoTestOptions.Database.NewSchemaPerTest)] diff --git a/src/Umbraco.Tests.Integration/Umbraco.Infrastructure/Persistence/Repositories/TemplateRepositoryTest.cs b/src/Umbraco.Tests.Integration/Umbraco.Infrastructure/Persistence/Repositories/TemplateRepositoryTest.cs index 9780b53997..bb1da54264 100644 --- a/src/Umbraco.Tests.Integration/Umbraco.Infrastructure/Persistence/Repositories/TemplateRepositoryTest.cs +++ b/src/Umbraco.Tests.Integration/Umbraco.Infrastructure/Persistence/Repositories/TemplateRepositoryTest.cs @@ -8,24 +8,25 @@ using System.Linq; using System.Text; using Microsoft.Extensions.Logging; using NUnit.Framework; -using Umbraco.Core; -using Umbraco.Core.Cache; -using Umbraco.Core.Configuration.Models; -using Umbraco.Core.Hosting; -using Umbraco.Core.IO; -using Umbraco.Core.Models; -using Umbraco.Core.Persistence.Repositories; -using Umbraco.Core.Persistence.Repositories.Implement; -using Umbraco.Core.PropertyEditors; -using Umbraco.Core.Scoping; -using Umbraco.Core.Serialization; -using Umbraco.Core.Services; -using Umbraco.Tests.Common.Builders; -using Umbraco.Tests.Integration.Implementations; -using Umbraco.Tests.Integration.Testing; -using Umbraco.Tests.Testing; +using Umbraco.Cms.Core; +using Umbraco.Cms.Core.Cache; +using Umbraco.Cms.Core.Configuration.Models; +using Umbraco.Cms.Core.Hosting; +using Umbraco.Cms.Core.IO; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Core.Persistence.Repositories; +using Umbraco.Cms.Core.PropertyEditors; +using Umbraco.Cms.Core.Scoping; +using Umbraco.Cms.Core.Services; +using Umbraco.Cms.Infrastructure.Persistence.Repositories.Implement; +using Umbraco.Cms.Infrastructure.Serialization; +using Umbraco.Cms.Tests.Common.Builders; +using Umbraco.Cms.Tests.Common.Testing; +using Umbraco.Cms.Tests.Integration.Implementations; +using Umbraco.Cms.Tests.Integration.Testing; +using Umbraco.Extensions; -namespace Umbraco.Tests.Integration.Umbraco.Infrastructure.Persistence.Repositories +namespace Umbraco.Cms.Tests.Integration.Umbraco.Infrastructure.Persistence.Repositories { [TestFixture] [UmbracoTest(Database = UmbracoTestOptions.Database.NewSchemaPerTest)] @@ -94,7 +95,7 @@ namespace Umbraco.Tests.Integration.Umbraco.Infrastructure.Persistence.Repositor Assert.That(repository.Get("test"), Is.Not.Null); Assert.That(FileSystems.MvcViewsFileSystem.FileExists("test.cshtml"), Is.True); Assert.AreEqual( - @"@usingUmbraco.Web.PublishedModels;@inheritsUmbraco.Web.Common.AspNetCore.UmbracoViewPage@{Layout=null;}".StripWhitespace(), + @"@usingUmbraco.Cms.Web.Common.PublishedModels;@inheritsUmbraco.Cms.Web.Common.Views.UmbracoViewPage@{Layout=null;}".StripWhitespace(), template.Content.StripWhitespace()); } } @@ -122,7 +123,7 @@ namespace Umbraco.Tests.Integration.Umbraco.Infrastructure.Persistence.Repositor Assert.That(repository.Get("test2"), Is.Not.Null); Assert.That(FileSystems.MvcViewsFileSystem.FileExists("test2.cshtml"), Is.True); Assert.AreEqual( - "@usingUmbraco.Web.PublishedModels;@inherits Umbraco.Web.Common.AspNetCore.UmbracoViewPage @{ Layout = \"test.cshtml\";}".StripWhitespace(), + "@usingUmbraco.Cms.Web.Common.PublishedModels;@inherits Umbraco.Cms.Web.Common.Views.UmbracoViewPage @{ Layout = \"test.cshtml\";}".StripWhitespace(), template2.Content.StripWhitespace()); } } diff --git a/src/Umbraco.Tests.Integration/Umbraco.Infrastructure/Persistence/Repositories/UserGroupRepositoryTest.cs b/src/Umbraco.Tests.Integration/Umbraco.Infrastructure/Persistence/Repositories/UserGroupRepositoryTest.cs index 72a2d073be..b38814b928 100644 --- a/src/Umbraco.Tests.Integration/Umbraco.Infrastructure/Persistence/Repositories/UserGroupRepositoryTest.cs +++ b/src/Umbraco.Tests.Integration/Umbraco.Infrastructure/Persistence/Repositories/UserGroupRepositoryTest.cs @@ -5,23 +5,23 @@ using System.Collections.Generic; using System.Linq; using Microsoft.Extensions.Logging; using NUnit.Framework; -using Umbraco.Core.Models.Membership; -using Umbraco.Core.Persistence.Querying; -using Umbraco.Core.Persistence.Repositories; -using Umbraco.Core.Persistence.Repositories.Implement; -using Umbraco.Core.Scoping; -using Umbraco.Tests.Common.Builders; -using Umbraco.Tests.Integration.Testing; -using Umbraco.Tests.Testing; +using Umbraco.Cms.Core.Models.Membership; +using Umbraco.Cms.Core.Persistence.Querying; +using Umbraco.Cms.Core.Persistence.Repositories; +using Umbraco.Cms.Core.Scoping; +using Umbraco.Cms.Infrastructure.Persistence.Repositories.Implement; +using Umbraco.Cms.Tests.Common.Builders; +using Umbraco.Cms.Tests.Common.Testing; +using Umbraco.Cms.Tests.Integration.Testing; -namespace Umbraco.Tests.Integration.Umbraco.Infrastructure.Persistence.Repositories +namespace Umbraco.Cms.Tests.Integration.Umbraco.Infrastructure.Persistence.Repositories { [TestFixture] [UmbracoTest(Database = UmbracoTestOptions.Database.NewSchemaPerTest)] public class UserGroupRepositoryTest : UmbracoIntegrationTest { private UserGroupRepository CreateRepository(IScopeProvider provider) => - new UserGroupRepository((IScopeAccessor)provider, global::Umbraco.Core.Cache.AppCaches.Disabled, LoggerFactory.CreateLogger(), LoggerFactory, ShortStringHelper); + new UserGroupRepository((IScopeAccessor)provider, global::Umbraco.Cms.Core.Cache.AppCaches.Disabled, LoggerFactory.CreateLogger(), LoggerFactory, ShortStringHelper); [Test] public void Can_Perform_Add_On_UserGroupRepository() @@ -131,7 +131,7 @@ namespace Umbraco.Tests.Integration.Umbraco.Infrastructure.Persistence.Repositor int id = userGroup.Id; - var repository2 = new UserGroupRepository((IScopeAccessor)provider, global::Umbraco.Core.Cache.AppCaches.Disabled, LoggerFactory.CreateLogger(), LoggerFactory, ShortStringHelper); + var repository2 = new UserGroupRepository((IScopeAccessor)provider, global::Umbraco.Cms.Core.Cache.AppCaches.Disabled, LoggerFactory.CreateLogger(), LoggerFactory, ShortStringHelper); repository2.Delete(userGroup); scope.Complete(); diff --git a/src/Umbraco.Tests.Integration/Umbraco.Infrastructure/Persistence/Repositories/UserRepositoryTest.cs b/src/Umbraco.Tests.Integration/Umbraco.Infrastructure/Persistence/Repositories/UserRepositoryTest.cs index a5164e0244..028c10a5eb 100644 --- a/src/Umbraco.Tests.Integration/Umbraco.Infrastructure/Persistence/Repositories/UserRepositoryTest.cs +++ b/src/Umbraco.Tests.Integration/Umbraco.Infrastructure/Persistence/Repositories/UserRepositoryTest.cs @@ -8,25 +8,27 @@ using Microsoft.Extensions.Logging; using Microsoft.Extensions.Options; using Moq; using NUnit.Framework; -using Umbraco.Core; -using Umbraco.Core.Cache; -using Umbraco.Core.Configuration.Models; -using Umbraco.Core.Models; -using Umbraco.Core.Models.Membership; -using Umbraco.Core.Persistence; -using Umbraco.Core.Persistence.Dtos; -using Umbraco.Core.Persistence.Mappers; -using Umbraco.Core.Persistence.Querying; -using Umbraco.Core.Persistence.Repositories; -using Umbraco.Core.Persistence.Repositories.Implement; -using Umbraco.Core.Scoping; -using Umbraco.Core.Serialization; -using Umbraco.Tests.Common.Builders; -using Umbraco.Tests.Common.Builders.Extensions; -using Umbraco.Tests.Integration.Testing; -using Umbraco.Tests.Testing; +using Umbraco.Cms.Core; +using Umbraco.Cms.Core.Cache; +using Umbraco.Cms.Core.Configuration.Models; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Core.Models.Membership; +using Umbraco.Cms.Core.Persistence.Querying; +using Umbraco.Cms.Core.Persistence.Repositories; +using Umbraco.Cms.Core.Scoping; +using Umbraco.Cms.Infrastructure.Persistence; +using Umbraco.Cms.Infrastructure.Persistence.Dtos; +using Umbraco.Cms.Infrastructure.Persistence.Mappers; +using Umbraco.Cms.Infrastructure.Persistence.Repositories.Implement; +using Umbraco.Cms.Infrastructure.Serialization; +using Umbraco.Cms.Tests.Common.Builders; +using Umbraco.Cms.Tests.Common.Builders.Extensions; +using Umbraco.Cms.Tests.Common.Testing; +using Umbraco.Cms.Tests.Integration.Testing; +using Umbraco.Extensions; +using Constants = Umbraco.Cms.Core.Constants; -namespace Umbraco.Tests.Integration.Umbraco.Infrastructure.Persistence.Repositories +namespace Umbraco.Cms.Tests.Integration.Umbraco.Infrastructure.Persistence.Repositories { [TestFixture] [UmbracoTest(Database = UmbracoTestOptions.Database.NewSchemaPerTest, WithApplication = true, Logger = UmbracoTestOptions.Logger.Console)] diff --git a/src/Umbraco.Tests.Integration/Umbraco.Infrastructure/Persistence/SchemaValidationTest.cs b/src/Umbraco.Tests.Integration/Umbraco.Infrastructure/Persistence/SchemaValidationTest.cs index b04c018a94..280e7faa9b 100644 --- a/src/Umbraco.Tests.Integration/Umbraco.Infrastructure/Persistence/SchemaValidationTest.cs +++ b/src/Umbraco.Tests.Integration/Umbraco.Infrastructure/Persistence/SchemaValidationTest.cs @@ -1,11 +1,11 @@ using Microsoft.Extensions.Logging; using NUnit.Framework; -using Umbraco.Core.Configuration; -using Umbraco.Core.Migrations.Install; -using Umbraco.Tests.Integration.Testing; -using Umbraco.Tests.Testing; +using Umbraco.Cms.Core.Configuration; +using Umbraco.Cms.Infrastructure.Migrations.Install; +using Umbraco.Cms.Tests.Common.Testing; +using Umbraco.Cms.Tests.Integration.Testing; -namespace Umbraco.Tests.Persistence +namespace Umbraco.Cms.Tests.Integration.Umbraco.Infrastructure.Persistence { [TestFixture] [UmbracoTest(Database = UmbracoTestOptions.Database.NewSchemaPerFixture)] diff --git a/src/Umbraco.Tests.Integration/Umbraco.Infrastructure/Persistence/SqlServerTableByTableTest.cs b/src/Umbraco.Tests.Integration/Umbraco.Infrastructure/Persistence/SqlServerTableByTableTest.cs index 59b56c0e51..a44d7ca252 100644 --- a/src/Umbraco.Tests.Integration/Umbraco.Infrastructure/Persistence/SqlServerTableByTableTest.cs +++ b/src/Umbraco.Tests.Integration/Umbraco.Infrastructure/Persistence/SqlServerTableByTableTest.cs @@ -1,13 +1,13 @@ using Microsoft.Extensions.Logging; using Microsoft.Extensions.Logging.Abstractions; using NUnit.Framework; -using Umbraco.Core.Configuration; -using Umbraco.Core.Migrations.Install; -using Umbraco.Core.Persistence.Dtos; -using Umbraco.Tests.Integration.Testing; -using Umbraco.Tests.Testing; +using Umbraco.Cms.Core.Configuration; +using Umbraco.Cms.Infrastructure.Migrations.Install; +using Umbraco.Cms.Infrastructure.Persistence.Dtos; +using Umbraco.Cms.Tests.Common.Testing; +using Umbraco.Cms.Tests.Integration.Testing; -namespace Umbraco.Tests.Persistence +namespace Umbraco.Cms.Tests.Integration.Umbraco.Infrastructure.Persistence { [TestFixture] [UmbracoTest(Database = UmbracoTestOptions.Database.NewSchemaPerTest)] diff --git a/src/Umbraco.Tests.Integration/Umbraco.Infrastructure/Persistence/SyntaxProvider/SqlServerSyntaxProviderTests.cs b/src/Umbraco.Tests.Integration/Umbraco.Infrastructure/Persistence/SyntaxProvider/SqlServerSyntaxProviderTests.cs index 62b3a9837d..848792a2d1 100644 --- a/src/Umbraco.Tests.Integration/Umbraco.Infrastructure/Persistence/SyntaxProvider/SqlServerSyntaxProviderTests.cs +++ b/src/Umbraco.Tests.Integration/Umbraco.Infrastructure/Persistence/SyntaxProvider/SqlServerSyntaxProviderTests.cs @@ -4,19 +4,21 @@ using Microsoft.Extensions.Logging; using Moq; using NPoco; using NUnit.Framework; -using Umbraco.Core; -using Umbraco.Core.Migrations; -using Umbraco.Core.Migrations.Expressions.Common.Expressions; -using Umbraco.Core.Migrations.Expressions.Create.Index; -using Umbraco.Core.Persistence; -using Umbraco.Core.Persistence.DatabaseAnnotations; -using Umbraco.Core.Persistence.DatabaseModelDefinitions; -using Umbraco.Core.Persistence.Dtos; -using Umbraco.Core.Persistence.SqlSyntax; -using Umbraco.Tests.Integration.Testing; -using Umbraco.Tests.Testing; +using Umbraco.Cms.Infrastructure.Migrations; +using Umbraco.Cms.Infrastructure.Migrations.Expressions.Common.Expressions; +using Umbraco.Cms.Infrastructure.Migrations.Expressions.Create.Index; +using Umbraco.Cms.Infrastructure.Persistence; +using Umbraco.Cms.Infrastructure.Persistence.DatabaseAnnotations; +using Umbraco.Cms.Infrastructure.Persistence.DatabaseModelDefinitions; +using Umbraco.Cms.Infrastructure.Persistence.Dtos; +using Umbraco.Cms.Infrastructure.Persistence.SqlSyntax; +using Umbraco.Cms.Tests.Common.TestHelpers; +using Umbraco.Cms.Tests.Common.Testing; +using Umbraco.Cms.Tests.Integration.Testing; +using Umbraco.Extensions; +using Constants = Umbraco.Cms.Core.Constants; -namespace Umbraco.Tests.Persistence.SyntaxProvider +namespace Umbraco.Cms.Tests.Integration.Umbraco.Infrastructure.Persistence.SyntaxProvider { [TestFixture] public class SqlServerSyntaxProviderTests : UmbracoIntegrationTest diff --git a/src/Umbraco.Tests.Integration/Umbraco.Infrastructure/Persistence/UnitOfWorkTests.cs b/src/Umbraco.Tests.Integration/Umbraco.Infrastructure/Persistence/UnitOfWorkTests.cs index aad6938d18..f5c202f3cf 100644 --- a/src/Umbraco.Tests.Integration/Umbraco.Infrastructure/Persistence/UnitOfWorkTests.cs +++ b/src/Umbraco.Tests.Integration/Umbraco.Infrastructure/Persistence/UnitOfWorkTests.cs @@ -3,12 +3,12 @@ using System; using NUnit.Framework; -using Umbraco.Core; -using Umbraco.Core.Scoping; -using Umbraco.Tests.Integration.Testing; -using Umbraco.Tests.Testing; +using Umbraco.Cms.Core.Scoping; +using Umbraco.Cms.Tests.Common.Testing; +using Umbraco.Cms.Tests.Integration.Testing; +using Constants = Umbraco.Cms.Core.Constants; -namespace Umbraco.Tests.Integration.Umbraco.Infrastructure.Persistence +namespace Umbraco.Cms.Tests.Integration.Umbraco.Infrastructure.Persistence { [TestFixture] [UmbracoTest(Database = UmbracoTestOptions.Database.NewSchemaPerTest)] diff --git a/src/Umbraco.Tests.Integration/Umbraco.Infrastructure/Scoping/ScopeFileSystemsTests.cs b/src/Umbraco.Tests.Integration/Umbraco.Infrastructure/Scoping/ScopeFileSystemsTests.cs index 3b486b565e..7529409032 100644 --- a/src/Umbraco.Tests.Integration/Umbraco.Infrastructure/Scoping/ScopeFileSystemsTests.cs +++ b/src/Umbraco.Tests.Integration/Umbraco.Infrastructure/Scoping/ScopeFileSystemsTests.cs @@ -6,16 +6,17 @@ using System.IO; using System.Text; using Microsoft.Extensions.Logging; using NUnit.Framework; -using Umbraco.Core; -using Umbraco.Core.Configuration.Models; -using Umbraco.Core.Hosting; -using Umbraco.Core.IO; -using Umbraco.Core.Scoping; -using Umbraco.Tests.Integration.Testing; -using Umbraco.Tests.Testing; -using FileSystems = Umbraco.Core.IO.FileSystems; +using Umbraco.Cms.Core; +using Umbraco.Cms.Core.Hosting; +using Umbraco.Cms.Core.IO; +using Umbraco.Cms.Core.Scoping; +using Umbraco.Cms.Tests.Common.Testing; +using Umbraco.Cms.Tests.Integration.Testing; +using Umbraco.Extensions; +using Constants = Umbraco.Cms.Core.Constants; +using FileSystems = Umbraco.Cms.Core.IO.FileSystems; -namespace Umbraco.Tests.Integration.Umbraco.Infrastructure.Scoping +namespace Umbraco.Cms.Tests.Integration.Umbraco.Infrastructure.Scoping { [TestFixture] [UmbracoTest(Database = UmbracoTestOptions.Database.NewEmptyPerTest)] diff --git a/src/Umbraco.Tests.Integration/Umbraco.Infrastructure/Scoping/ScopeTests.cs b/src/Umbraco.Tests.Integration/Umbraco.Infrastructure/Scoping/ScopeTests.cs index bb3bc99e19..86e717620a 100644 --- a/src/Umbraco.Tests.Integration/Umbraco.Infrastructure/Scoping/ScopeTests.cs +++ b/src/Umbraco.Tests.Integration/Umbraco.Infrastructure/Scoping/ScopeTests.cs @@ -3,13 +3,13 @@ using System; using NUnit.Framework; -using Umbraco.Core; -using Umbraco.Core.Persistence; -using Umbraco.Core.Scoping; -using Umbraco.Tests.Integration.Testing; -using Umbraco.Tests.Testing; +using Umbraco.Cms.Core; +using Umbraco.Cms.Core.Scoping; +using Umbraco.Cms.Infrastructure.Persistence; +using Umbraco.Cms.Tests.Common.Testing; +using Umbraco.Cms.Tests.Integration.Testing; -namespace Umbraco.Tests.Integration.Umbraco.Infrastructure.Scoping +namespace Umbraco.Cms.Tests.Integration.Umbraco.Infrastructure.Scoping { [TestFixture] [UmbracoTest(Database = UmbracoTestOptions.Database.NewEmptyPerFixture)] diff --git a/src/Umbraco.Tests.Integration/Umbraco.Infrastructure/Scoping/ScopedRepositoryTests.cs b/src/Umbraco.Tests.Integration/Umbraco.Infrastructure/Scoping/ScopedRepositoryTests.cs index 051ffa0a24..96ba30905b 100644 --- a/src/Umbraco.Tests.Integration/Umbraco.Infrastructure/Scoping/ScopedRepositoryTests.cs +++ b/src/Umbraco.Tests.Integration/Umbraco.Infrastructure/Scoping/ScopedRepositoryTests.cs @@ -5,20 +5,20 @@ using System.Collections.Generic; using System.Linq; using Microsoft.Extensions.Logging; using NUnit.Framework; -using Umbraco.Core.Cache; -using Umbraco.Core.Events; -using Umbraco.Core.Models; -using Umbraco.Core.Models.Membership; -using Umbraco.Core.Scoping; -using Umbraco.Core.Services; -using Umbraco.Core.Services.Implement; -using Umbraco.Core.Sync; -using Umbraco.Tests.Integration.Testing; -using Umbraco.Tests.Testing; -using Umbraco.Web; -using Umbraco.Web.Cache; +using Umbraco.Cms.Core.Cache; +using Umbraco.Cms.Core.Events; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Core.Models.Membership; +using Umbraco.Cms.Core.Scoping; +using Umbraco.Cms.Core.Services; +using Umbraco.Cms.Core.Services.Implement; +using Umbraco.Cms.Core.Sync; +using Umbraco.Cms.Core.Web; +using Umbraco.Cms.Infrastructure.Sync; +using Umbraco.Cms.Tests.Common.Testing; +using Umbraco.Cms.Tests.Integration.Testing; -namespace Umbraco.Tests.Integration.Umbraco.Infrastructure.Scoping +namespace Umbraco.Cms.Tests.Integration.Umbraco.Infrastructure.Scoping { [TestFixture] [UmbracoTest(Database = UmbracoTestOptions.Database.NewSchemaPerTest)] diff --git a/src/Umbraco.Tests.Integration/Umbraco.Infrastructure/Services/AuditServiceTests.cs b/src/Umbraco.Tests.Integration/Umbraco.Infrastructure/Services/AuditServiceTests.cs index 6260d8adbb..6c338dd9cd 100644 --- a/src/Umbraco.Tests.Integration/Umbraco.Infrastructure/Services/AuditServiceTests.cs +++ b/src/Umbraco.Tests.Integration/Umbraco.Infrastructure/Services/AuditServiceTests.cs @@ -5,14 +5,14 @@ using System; using System.Linq; using Microsoft.Extensions.DependencyInjection; using NUnit.Framework; -using Umbraco.Core.Models; -using Umbraco.Core.Services; -using Umbraco.Core.Services.Implement; -using Umbraco.Tests.Common.Builders; -using Umbraco.Tests.Integration.Testing; -using Umbraco.Tests.Testing; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Core.Services; +using Umbraco.Cms.Core.Services.Implement; +using Umbraco.Cms.Tests.Common.Builders; +using Umbraco.Cms.Tests.Common.Testing; +using Umbraco.Cms.Tests.Integration.Testing; -namespace Umbraco.Tests.Integration.Umbraco.Infrastructure.Services +namespace Umbraco.Cms.Tests.Integration.Umbraco.Infrastructure.Services { [TestFixture] [UmbracoTest(Database = UmbracoTestOptions.Database.NewSchemaPerTest)] diff --git a/src/Umbraco.Tests.Integration/Umbraco.Infrastructure/Services/CachedDataTypeServiceTests.cs b/src/Umbraco.Tests.Integration/Umbraco.Infrastructure/Services/CachedDataTypeServiceTests.cs index c57eac686b..5b8212edd5 100644 --- a/src/Umbraco.Tests.Integration/Umbraco.Infrastructure/Services/CachedDataTypeServiceTests.cs +++ b/src/Umbraco.Tests.Integration/Umbraco.Infrastructure/Services/CachedDataTypeServiceTests.cs @@ -4,14 +4,14 @@ using System.Collections.Generic; using System.Threading; using NUnit.Framework; -using Umbraco.Core.Models; -using Umbraco.Core.PropertyEditors; -using Umbraco.Core.Serialization; -using Umbraco.Core.Services; -using Umbraco.Tests.Integration.Testing; -using Umbraco.Tests.Testing; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Core.PropertyEditors; +using Umbraco.Cms.Core.Serialization; +using Umbraco.Cms.Core.Services; +using Umbraco.Cms.Tests.Common.Testing; +using Umbraco.Cms.Tests.Integration.Testing; -namespace Umbraco.Tests.Integration.Umbraco.Infrastructure.Services +namespace Umbraco.Cms.Tests.Integration.Umbraco.Infrastructure.Services { /// /// Tests covering the DataTypeService with cache enabled diff --git a/src/Umbraco.Tests.Integration/Umbraco.Infrastructure/Services/ConsentServiceTests.cs b/src/Umbraco.Tests.Integration/Umbraco.Infrastructure/Services/ConsentServiceTests.cs index c489fe68af..54dcd96fed 100644 --- a/src/Umbraco.Tests.Integration/Umbraco.Infrastructure/Services/ConsentServiceTests.cs +++ b/src/Umbraco.Tests.Integration/Umbraco.Infrastructure/Services/ConsentServiceTests.cs @@ -4,12 +4,13 @@ using System; using System.Linq; using NUnit.Framework; -using Umbraco.Core.Models; -using Umbraco.Core.Services; -using Umbraco.Tests.Integration.Testing; -using Umbraco.Tests.Testing; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Core.Services; +using Umbraco.Cms.Tests.Common.Testing; +using Umbraco.Cms.Tests.Integration.Testing; +using Umbraco.Extensions; -namespace Umbraco.Tests.Integration.Umbraco.Infrastructure.Services +namespace Umbraco.Cms.Tests.Integration.Umbraco.Infrastructure.Services { [TestFixture] [UmbracoTest(Database = UmbracoTestOptions.Database.NewSchemaPerFixture)] diff --git a/src/Umbraco.Tests.Integration/Umbraco.Infrastructure/Services/ContentEventsTests.cs b/src/Umbraco.Tests.Integration/Umbraco.Infrastructure/Services/ContentEventsTests.cs index 1a2f39f51f..c26d2e0e7b 100644 --- a/src/Umbraco.Tests.Integration/Umbraco.Infrastructure/Services/ContentEventsTests.cs +++ b/src/Umbraco.Tests.Integration/Umbraco.Infrastructure/Services/ContentEventsTests.cs @@ -8,18 +8,19 @@ using System.Collections.Generic; using System.Linq; using Microsoft.Extensions.Logging; using NUnit.Framework; -using Umbraco.Core; -using Umbraco.Core.Cache; -using Umbraco.Core.Models; -using Umbraco.Core.Persistence.Repositories.Implement; -using Umbraco.Core.Sync; -using Umbraco.Tests.Common.Builders; -using Umbraco.Tests.Integration.Testing; -using Umbraco.Tests.Testing; -using Umbraco.Web; -using Umbraco.Web.Cache; +using Umbraco.Cms.Core.Cache; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Core.Sync; +using Umbraco.Cms.Core.Web; +using Umbraco.Cms.Infrastructure.Persistence.Repositories.Implement; +using Umbraco.Cms.Infrastructure.Sync; +using Umbraco.Cms.Tests.Common.Builders; +using Umbraco.Cms.Tests.Common.Testing; +using Umbraco.Cms.Tests.Integration.Testing; +using Umbraco.Extensions; +using Constants = Umbraco.Cms.Core.Constants; -namespace Umbraco.Tests.Integration.Umbraco.Infrastructure.Services +namespace Umbraco.Cms.Tests.Integration.Umbraco.Infrastructure.Services { [TestFixture] [UmbracoTest(Database = UmbracoTestOptions.Database.NewSchemaPerTest)] diff --git a/src/Umbraco.Tests.Integration/Umbraco.Infrastructure/Services/ContentServiceEventTests.cs b/src/Umbraco.Tests.Integration/Umbraco.Infrastructure/Services/ContentServiceEventTests.cs index 3a5d90b24f..24bb2b3a84 100644 --- a/src/Umbraco.Tests.Integration/Umbraco.Infrastructure/Services/ContentServiceEventTests.cs +++ b/src/Umbraco.Tests.Integration/Umbraco.Infrastructure/Services/ContentServiceEventTests.cs @@ -3,18 +3,18 @@ using System.Linq; using NUnit.Framework; -using Umbraco.Core; -using Umbraco.Core.Configuration.Models; -using Umbraco.Core.Events; -using Umbraco.Core.Models; -using Umbraco.Core.Persistence.Repositories.Implement; -using Umbraco.Core.Services; -using Umbraco.Core.Services.Implement; -using Umbraco.Tests.Common.Builders; -using Umbraco.Tests.Integration.Testing; -using Umbraco.Tests.Testing; +using Umbraco.Cms.Core.Configuration.Models; +using Umbraco.Cms.Core.Events; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Core.Services; +using Umbraco.Cms.Infrastructure.Persistence.Repositories.Implement; +using Umbraco.Cms.Core.Services.Implement; +using Umbraco.Cms.Tests.Common.Builders; +using Umbraco.Cms.Tests.Common.Testing; +using Umbraco.Cms.Tests.Integration.Testing; +using Umbraco.Extensions; -namespace Umbraco.Tests.Integration.Umbraco.Infrastructure.Services +namespace Umbraco.Cms.Tests.Integration.Umbraco.Infrastructure.Services { [TestFixture] [UmbracoTest( @@ -42,7 +42,7 @@ namespace Umbraco.Tests.Integration.Umbraco.Infrastructure.Services _globalSettings = new GlobalSettings(); // TODO: remove this once IPublishedSnapShotService has been implemented with nucache. - global::Umbraco.Core.Services.Implement.ContentTypeService.ClearScopeEvents(); + global::Umbraco.Cms.Core.Services.Implement.ContentTypeService.ClearScopeEvents(); CreateTestData(); } diff --git a/src/Umbraco.Tests.Integration/Umbraco.Infrastructure/Services/ContentServicePerformanceTest.cs b/src/Umbraco.Tests.Integration/Umbraco.Infrastructure/Services/ContentServicePerformanceTest.cs index e48f1fe52b..0c514007f1 100644 --- a/src/Umbraco.Tests.Integration/Umbraco.Infrastructure/Services/ContentServicePerformanceTest.cs +++ b/src/Umbraco.Tests.Integration/Umbraco.Infrastructure/Services/ContentServicePerformanceTest.cs @@ -8,19 +8,19 @@ using System.Linq; using Microsoft.Extensions.Logging; using Microsoft.Extensions.Logging.Abstractions; using NUnit.Framework; -using Umbraco.Core; -using Umbraco.Core.Logging; -using Umbraco.Core.Models; -using Umbraco.Core.Persistence.Repositories; -using Umbraco.Core.Persistence.Repositories.Implement; -using Umbraco.Core.Scoping; -using Umbraco.Core.Services; -using Umbraco.Tests.Common.Builders; -using Umbraco.Tests.Integration.Testing; -using Umbraco.Tests.TestHelpers.Stubs; -using Umbraco.Tests.Testing; +using Umbraco.Cms.Core; +using Umbraco.Cms.Core.Logging; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Core.Persistence.Repositories; +using Umbraco.Cms.Core.Scoping; +using Umbraco.Cms.Core.Services; +using Umbraco.Cms.Infrastructure.Persistence.Repositories.Implement; +using Umbraco.Cms.Tests.Common.Builders; +using Umbraco.Cms.Tests.Common.TestHelpers.Stubs; +using Umbraco.Cms.Tests.Common.Testing; +using Umbraco.Cms.Tests.Integration.Testing; -namespace Umbraco.Tests.Integration.Umbraco.Infrastructure.Services +namespace Umbraco.Cms.Tests.Integration.Umbraco.Infrastructure.Services { [TestFixture] [UmbracoTest(Database = UmbracoTestOptions.Database.NewSchemaPerTest)] diff --git a/src/Umbraco.Tests.Integration/Umbraco.Infrastructure/Services/ContentServicePublishBranchTests.cs b/src/Umbraco.Tests.Integration/Umbraco.Infrastructure/Services/ContentServicePublishBranchTests.cs index b890f186b5..79c55f494b 100644 --- a/src/Umbraco.Tests.Integration/Umbraco.Infrastructure/Services/ContentServicePublishBranchTests.cs +++ b/src/Umbraco.Tests.Integration/Umbraco.Infrastructure/Services/ContentServicePublishBranchTests.cs @@ -5,16 +5,16 @@ using System; using System.Collections.Generic; using System.Linq; using NUnit.Framework; -using Umbraco.Core; -using Umbraco.Core.Configuration.Models; -using Umbraco.Core.Models; -using Umbraco.Core.Services; -using Umbraco.Tests.Integration.Testing; -using Umbraco.Tests.Testing; +using Umbraco.Cms.Core.Configuration.Models; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Core.Services; +using Umbraco.Cms.Tests.Common.Testing; +using Umbraco.Cms.Tests.Integration.Testing; +using Constants = Umbraco.Cms.Core.Constants; // ReSharper disable CommentTypo // ReSharper disable StringLiteralTypo -namespace Umbraco.Tests.Integration.Umbraco.Infrastructure.Services +namespace Umbraco.Cms.Tests.Integration.Umbraco.Infrastructure.Services { [TestFixture] [UmbracoTest(Database = UmbracoTestOptions.Database.NewSchemaPerTest, PublishedRepositoryEvents = true, WithApplication = true)] diff --git a/src/Umbraco.Tests.Integration/Umbraco.Infrastructure/Services/ContentServiceTagsTests.cs b/src/Umbraco.Tests.Integration/Umbraco.Infrastructure/Services/ContentServiceTagsTests.cs index b7f3609d89..32883138c2 100644 --- a/src/Umbraco.Tests.Integration/Umbraco.Infrastructure/Services/ContentServiceTagsTests.cs +++ b/src/Umbraco.Tests.Integration/Umbraco.Infrastructure/Services/ContentServiceTagsTests.cs @@ -5,19 +5,19 @@ using System; using System.Collections.Generic; using System.Linq; using NUnit.Framework; -using Umbraco.Core; -using Umbraco.Core.Models; -using Umbraco.Core.Persistence.Repositories.Implement; -using Umbraco.Core.PropertyEditors; -using Umbraco.Core.Scoping; -using Umbraco.Core.Serialization; -using Umbraco.Core.Services; -using Umbraco.Tests.Common.Builders; -using Umbraco.Tests.Common.Builders.Extensions; -using Umbraco.Tests.Integration.Testing; -using Umbraco.Tests.Testing; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Core.PropertyEditors; +using Umbraco.Cms.Core.Scoping; +using Umbraco.Cms.Core.Serialization; +using Umbraco.Cms.Core.Services; +using Umbraco.Cms.Infrastructure.Persistence.Repositories.Implement; +using Umbraco.Cms.Tests.Common.Builders; +using Umbraco.Cms.Tests.Common.Builders.Extensions; +using Umbraco.Cms.Tests.Common.Testing; +using Umbraco.Cms.Tests.Integration.Testing; +using Umbraco.Extensions; -namespace Umbraco.Tests.Integration.Umbraco.Infrastructure.Services +namespace Umbraco.Cms.Tests.Integration.Umbraco.Infrastructure.Services { [TestFixture] [UmbracoTest( diff --git a/src/Umbraco.Tests.Integration/Umbraco.Infrastructure/Services/ContentServiceTests.cs b/src/Umbraco.Tests.Integration/Umbraco.Infrastructure/Services/ContentServiceTests.cs index bc8e68cb5d..5421add491 100644 --- a/src/Umbraco.Tests.Integration/Umbraco.Infrastructure/Services/ContentServiceTests.cs +++ b/src/Umbraco.Tests.Integration/Umbraco.Infrastructure/Services/ContentServiceTests.cs @@ -8,24 +8,26 @@ using System.Linq; using System.Threading; using Moq; using NUnit.Framework; -using Umbraco.Core; -using Umbraco.Core.Events; -using Umbraco.Core.Models; -using Umbraco.Core.Models.Membership; -using Umbraco.Core.Persistence; -using Umbraco.Core.Persistence.Repositories; -using Umbraco.Core.Persistence.Repositories.Implement; -using Umbraco.Core.PropertyEditors; -using Umbraco.Core.Scoping; -using Umbraco.Core.Serialization; -using Umbraco.Core.Services; -using Umbraco.Core.Services.Implement; -using Umbraco.Tests.Common.Builders; -using Umbraco.Tests.Common.Builders.Extensions; -using Umbraco.Tests.Integration.Testing; -using Umbraco.Tests.Testing; +using Umbraco.Cms.Core; +using Umbraco.Cms.Core.Events; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Core.Models.Membership; +using Umbraco.Cms.Core.Persistence.Repositories; +using Umbraco.Cms.Core.PropertyEditors; +using Umbraco.Cms.Core.Scoping; +using Umbraco.Cms.Core.Serialization; +using Umbraco.Cms.Core.Services; +using Umbraco.Cms.Core.Services.Implement; +using Umbraco.Cms.Infrastructure.Persistence; +using Umbraco.Cms.Infrastructure.Persistence.Repositories.Implement; +using Umbraco.Cms.Tests.Common.Builders; +using Umbraco.Cms.Tests.Common.Builders.Extensions; +using Umbraco.Cms.Tests.Common.Extensions; +using Umbraco.Cms.Tests.Common.Testing; +using Umbraco.Cms.Tests.Integration.Testing; +using Umbraco.Extensions; -namespace Umbraco.Tests.Integration.Umbraco.Infrastructure.Services +namespace Umbraco.Cms.Tests.Integration.Umbraco.Infrastructure.Services { /// diff --git a/src/Umbraco.Tests.Integration/Umbraco.Infrastructure/Services/ContentTypeServiceTests.cs b/src/Umbraco.Tests.Integration/Umbraco.Infrastructure/Services/ContentTypeServiceTests.cs index 469a806335..556a909255 100644 --- a/src/Umbraco.Tests.Integration/Umbraco.Infrastructure/Services/ContentTypeServiceTests.cs +++ b/src/Umbraco.Tests.Integration/Umbraco.Infrastructure/Services/ContentTypeServiceTests.cs @@ -5,17 +5,18 @@ using System; using System.Collections.Generic; using System.Linq; using NUnit.Framework; -using Umbraco.Core; -using Umbraco.Core.Events; -using Umbraco.Core.Exceptions; -using Umbraco.Core.Models; -using Umbraco.Core.Services; -using Umbraco.Core.Services.Implement; -using Umbraco.Tests.Common.Builders; -using Umbraco.Tests.Integration.Testing; -using Umbraco.Tests.Testing; +using Umbraco.Cms.Core; +using Umbraco.Cms.Core.Events; +using Umbraco.Cms.Core.Exceptions; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Core.Services; +using Umbraco.Cms.Core.Services.Implement; +using Umbraco.Cms.Tests.Common.Builders; +using Umbraco.Cms.Tests.Common.Testing; +using Umbraco.Cms.Tests.Integration.Testing; +using Umbraco.Extensions; -namespace Umbraco.Tests.Integration.Umbraco.Infrastructure.Services +namespace Umbraco.Cms.Tests.Integration.Umbraco.Infrastructure.Services { [TestFixture] [UmbracoTest(Database = UmbracoTestOptions.Database.NewSchemaPerTest, PublishedRepositoryEvents = true)] diff --git a/src/Umbraco.Tests.Integration/Umbraco.Infrastructure/Services/ContentTypeServiceVariantsTests.cs b/src/Umbraco.Tests.Integration/Umbraco.Infrastructure/Services/ContentTypeServiceVariantsTests.cs index 3671287da7..b80c236fac 100644 --- a/src/Umbraco.Tests.Integration/Umbraco.Infrastructure/Services/ContentTypeServiceVariantsTests.cs +++ b/src/Umbraco.Tests.Integration/Umbraco.Infrastructure/Services/ContentTypeServiceVariantsTests.cs @@ -8,20 +8,19 @@ using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Hosting; using NPoco; using NUnit.Framework; -using Umbraco.Core.Configuration.Models; -using Umbraco.Core.DependencyInjection; -using Umbraco.Core.Models; -using Umbraco.Core.Persistence; -using Umbraco.Core.Persistence.Dtos; -using Umbraco.Core.Scoping; -using Umbraco.Core.Services; -using Umbraco.Infrastructure.PublishedCache.DependencyInjection; -using Umbraco.Tests.Common.Builders; -using Umbraco.Tests.Integration.Testing; -using Umbraco.Tests.Testing; -using Umbraco.Web.PublishedCache.NuCache; +using Umbraco.Cms.Core.Configuration.Models; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Core.Scoping; +using Umbraco.Cms.Core.Services; +using Umbraco.Cms.Infrastructure.Persistence; +using Umbraco.Cms.Infrastructure.Persistence.Dtos; +using Umbraco.Cms.Infrastructure.PublishedCache; +using Umbraco.Cms.Tests.Common.Builders; +using Umbraco.Cms.Tests.Common.Testing; +using Umbraco.Cms.Tests.Integration.Testing; +using Umbraco.Extensions; -namespace Umbraco.Tests.Integration.Umbraco.Infrastructure.Services +namespace Umbraco.Cms.Tests.Integration.Umbraco.Infrastructure.Services { [TestFixture] [Apartment(ApartmentState.STA)] diff --git a/src/Umbraco.Tests.Integration/Umbraco.Infrastructure/Services/DataTypeServiceTests.cs b/src/Umbraco.Tests.Integration/Umbraco.Infrastructure/Services/DataTypeServiceTests.cs index 9c284fb4b7..2a6ea802cf 100644 --- a/src/Umbraco.Tests.Integration/Umbraco.Infrastructure/Services/DataTypeServiceTests.cs +++ b/src/Umbraco.Tests.Integration/Umbraco.Infrastructure/Services/DataTypeServiceTests.cs @@ -6,15 +6,15 @@ using System.Collections.Generic; using System.Linq; using System.Threading; using NUnit.Framework; -using Umbraco.Core.Models; -using Umbraco.Core.PropertyEditors; -using Umbraco.Core.Serialization; -using Umbraco.Core.Services; -using Umbraco.Tests.Common.Builders; -using Umbraco.Tests.Integration.Testing; -using Umbraco.Tests.Testing; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Core.PropertyEditors; +using Umbraco.Cms.Core.Serialization; +using Umbraco.Cms.Core.Services; +using Umbraco.Cms.Tests.Common.Builders; +using Umbraco.Cms.Tests.Common.Testing; +using Umbraco.Cms.Tests.Integration.Testing; -namespace Umbraco.Tests.Integration.Umbraco.Infrastructure.Services +namespace Umbraco.Cms.Tests.Integration.Umbraco.Infrastructure.Services { /// /// Tests covering the DataTypeService diff --git a/src/Umbraco.Tests.Integration/Umbraco.Infrastructure/Services/EntityServiceTests.cs b/src/Umbraco.Tests.Integration/Umbraco.Infrastructure/Services/EntityServiceTests.cs index 7267f34e51..2fffa1a61b 100644 --- a/src/Umbraco.Tests.Integration/Umbraco.Infrastructure/Services/EntityServiceTests.cs +++ b/src/Umbraco.Tests.Integration/Umbraco.Infrastructure/Services/EntityServiceTests.cs @@ -6,20 +6,19 @@ using System.Collections.Generic; using System.Linq; using System.Threading; using NUnit.Framework; -using Umbraco.Core; -using Umbraco.Core.Configuration.Models; -using Umbraco.Core.Models; -using Umbraco.Core.Models.Entities; -using Umbraco.Core.Persistence; -using Umbraco.Core.Services; -using Umbraco.Net; -using Umbraco.Tests.Common.Builders; -using Umbraco.Tests.Integration.Testing; -using Umbraco.Tests.Testing; -using Umbraco.Web.PublishedCache; -using Umbraco.Web.PublishedCache.NuCache; +using Umbraco.Cms.Core; +using Umbraco.Cms.Core.Configuration.Models; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Core.Models.Entities; +using Umbraco.Cms.Core.Services; +using Umbraco.Cms.Infrastructure.Persistence; +using Umbraco.Cms.Tests.Common.Builders; +using Umbraco.Cms.Tests.Common.Testing; +using Umbraco.Cms.Tests.Integration.Testing; +using Umbraco.Extensions; +using Constants = Umbraco.Cms.Core.Constants; -namespace Umbraco.Tests.Integration.Umbraco.Infrastructure.Services +namespace Umbraco.Cms.Tests.Integration.Umbraco.Infrastructure.Services { /// /// Tests covering the EntityService diff --git a/src/Umbraco.Tests.Integration/Umbraco.Infrastructure/Services/EntityXmlSerializerTests.cs b/src/Umbraco.Tests.Integration/Umbraco.Infrastructure/Services/EntityXmlSerializerTests.cs index d9c523bc58..60496e52c1 100644 --- a/src/Umbraco.Tests.Integration/Umbraco.Infrastructure/Services/EntityXmlSerializerTests.cs +++ b/src/Umbraco.Tests.Integration/Umbraco.Infrastructure/Services/EntityXmlSerializerTests.cs @@ -1,4 +1,4 @@ -// Copyright (c) Umbraco. +// Copyright (c) Umbraco. // See LICENSE for more details. using System.Collections.Generic; @@ -6,15 +6,15 @@ using System.Diagnostics; using System.Linq; using System.Xml.Linq; using NUnit.Framework; -using Umbraco.Core.Models; -using Umbraco.Core.Services; -using Umbraco.Tests.Common.Builders; -using Umbraco.Tests.Common.Builders.Extensions; -using Umbraco.Tests.Integration.Testing; -using Umbraco.Tests.Services.Importing; -using Umbraco.Tests.Testing; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Core.Services; +using Umbraco.Cms.Tests.Common.Builders; +using Umbraco.Cms.Tests.Common.Builders.Extensions; +using Umbraco.Cms.Tests.Common.Testing; +using Umbraco.Cms.Tests.Integration.Testing; +using Umbraco.Cms.Tests.Integration.Umbraco.Infrastructure.Services.Importing; -namespace Umbraco.Tests.Integration.Umbraco.Infrastructure.Services +namespace Umbraco.Cms.Tests.Integration.Umbraco.Infrastructure.Services { [TestFixture] [UmbracoTest(Database = UmbracoTestOptions.Database.NewSchemaPerTest)] diff --git a/src/Umbraco.Tests.Integration/Umbraco.Infrastructure/Services/ExternalLoginServiceTests.cs b/src/Umbraco.Tests.Integration/Umbraco.Infrastructure/Services/ExternalLoginServiceTests.cs index b47c8fb51e..64eb16ff8a 100644 --- a/src/Umbraco.Tests.Integration/Umbraco.Infrastructure/Services/ExternalLoginServiceTests.cs +++ b/src/Umbraco.Tests.Integration/Umbraco.Infrastructure/Services/ExternalLoginServiceTests.cs @@ -6,15 +6,14 @@ using System.Collections.Generic; using System.Linq; using System.Threading; using NUnit.Framework; -using Umbraco.Core.Models.Identity; -using Umbraco.Core.Models.Membership; -using Umbraco.Core.Persistence.Dtos; -using Umbraco.Core.Services; -using Umbraco.Tests.Integration.Testing; -using Umbraco.Tests.TestHelpers; -using Umbraco.Tests.Testing; +using Umbraco.Cms.Core.Models.Identity; +using Umbraco.Cms.Core.Models.Membership; +using Umbraco.Cms.Core.Services; +using Umbraco.Cms.Infrastructure.Persistence.Dtos; +using Umbraco.Cms.Tests.Common.Testing; +using Umbraco.Cms.Tests.Integration.Testing; -namespace Umbraco.Tests.Services +namespace Umbraco.Cms.Tests.Integration.Umbraco.Infrastructure.Services { [TestFixture] [Apartment(ApartmentState.STA)] @@ -35,7 +34,7 @@ namespace Umbraco.Tests.Services DateTime latest = DateTime.Now.AddDays(-1); DateTime oldest = DateTime.Now.AddDays(-10); - using (Core.Scoping.IScope scope = ScopeProvider.CreateScope()) + using (global::Umbraco.Cms.Core.Scoping.IScope scope = ScopeProvider.CreateScope()) { // insert duplicates manuall scope.Database.Insert(new ExternalLoginDto diff --git a/src/Umbraco.Tests.Integration/Umbraco.Infrastructure/Services/FileServiceTests.cs b/src/Umbraco.Tests.Integration/Umbraco.Infrastructure/Services/FileServiceTests.cs index 9ca4b79a6e..0c8c7fd162 100644 --- a/src/Umbraco.Tests.Integration/Umbraco.Infrastructure/Services/FileServiceTests.cs +++ b/src/Umbraco.Tests.Integration/Umbraco.Infrastructure/Services/FileServiceTests.cs @@ -1,16 +1,15 @@ // Copyright (c) Umbraco. // See LICENSE for more details. -using System; using System.Linq; using System.Threading; using NUnit.Framework; -using Umbraco.Core.Models; -using Umbraco.Core.Services; -using Umbraco.Tests.Integration.Testing; -using Umbraco.Tests.Testing; +using Umbraco.Cms.Core.Models; +using Umbraco.Cms.Core.Services; +using Umbraco.Cms.Tests.Common.Testing; +using Umbraco.Cms.Tests.Integration.Testing; -namespace Umbraco.Tests.Integration.Umbraco.Infrastructure.Services +namespace Umbraco.Cms.Tests.Integration.Umbraco.Infrastructure.Services { [TestFixture] [Apartment(ApartmentState.STA)] diff --git a/src/Umbraco.Tests.Integration/Umbraco.Infrastructure/Services/Importing/StandardMvc-Package.xml b/src/Umbraco.Tests.Integration/Umbraco.Infrastructure/Services/Importing/StandardMvc-Package.xml index ee6f7cea4a..a4787dd570 100644 --- a/src/Umbraco.Tests.Integration/Umbraco.Infrastructure/Services/Importing/StandardMvc-Package.xml +++ b/src/Umbraco.Tests.Integration/Umbraco.Infrastructure/Services/Importing/StandardMvc-Package.xml @@ -189,17 +189,17 @@ http://www.creativefounds.co.uk - @@ -1099,7 +1099,7 @@ Google Maps - A map macro that you can use within Rich Text Areas Articles SW_Master -
- + @Html.Raw(Model.Content.GetPropertyValue("bodyText")) - +
    @foreach (var item in nodes.Skip((page - 1) * pageSize).Take(pageSize)) { @@ -1172,9 +1172,9 @@ Google Maps - A map macro that you can use within Rich Text Areas

    @item.GetPropertyValue("articleSummary") - +

    - + }
@@ -1185,7 +1185,7 @@ Google Maps - A map macro that you can use within Rich Text Areas @for (int p = 1; p < totalPages + 1; p++) { //string selected = (p == page) ? "selected" : String.Empty; - //
  • @p
  • + //
  • @p
  • @p if (p < totalPages) { @@ -1197,7 +1197,7 @@ Google Maps - A map macro that you can use within Rich Text Areas
    - + @Html.Partial("ContentPanels",@Model.Content) ]]>
    @@ -1207,13 +1207,13 @@ Google Maps - A map macro that you can use within Rich Text Areas ClientAreas SW_Master - x.IsVisible() && x.TemplateId > 0 && Umbraco.MemberHasAccess(x.Id, x.Path)); }
    - + - - + +
    ]]>
    @@ -1243,7 +1243,7 @@ Google Maps - A map macro that you can use within Rich Text Areas Layout = "SW_Master.cshtml"; }
    - + ]]> @@ -1266,9 +1266,9 @@ Google Maps - A map macro that you can use within Rich Text Areas @{ Layout = "SW_Master.cshtml"; } - +
    -
      +
        @{ var nodeIds = Model.Content.GetPropertyValue("slideshow").ToString().Split(','); List slides = new List(); @@ -1313,7 +1313,7 @@ Google Maps - A map macro that you can use within Rich Text Areas
    - +
    @Html.Raw(Model.Content.GetPropertyValue("panelContent1").ToString()) @@ -1345,7 +1345,7 @@ Google Maps - A map macro that you can use within Rich Text Areas } }
    - + ]]> @@ -1420,13 +1420,13 @@ Google Maps - A map macro that you can use within Rich Text Areas page = 1; } } - + }
    @@ -1470,14 +1470,14 @@ Google Maps - A map macro that you can use within Rich Text Areas

    @Html.Raw(searchHiglight)

    - + } } @@ -1489,7 +1489,7 @@ Google Maps - A map macro that you can use within Rich Text Areas @for (int p = 1; p < totalPages + 1; p++) { //string selected = (p == page) ? "selected" : String.Empty; - //
  • @p
  • + //
  • @p
  • @p if (p < totalPages) { @@ -1514,7 +1514,7 @@ Google Maps - A map macro that you can use within Rich Text Areas Layout = "SW_Master.cshtml"; }
    - + @helper traverse(IPublishedContent node) { - var cc = node.Children.Where(x=>x.IsVisible() && x.TemplateId > 0); + var cc = node.Children.Where(x=>x.IsVisible() && x.TemplateId > 0); if (cc.Count()>0) {
      @@ -1560,7 +1560,7 @@ Google Maps - A map macro that you can use within Rich Text Areas Layout = "SW_Master.cshtml"; }
      - + ]]> @@ -1590,27 +1590,27 @@ Google Maps - A map macro that you can use within Rich Text Areas @Model.Content.GetPropertyValue("title") - - + + - + - +