diff --git a/src/Umbraco.Abstractions/Hosting/IHostingEnvironment.cs b/src/Umbraco.Abstractions/Hosting/IHostingEnvironment.cs
index 5ce8392ab4..a71c449bb8 100644
--- a/src/Umbraco.Abstractions/Hosting/IHostingEnvironment.cs
+++ b/src/Umbraco.Abstractions/Hosting/IHostingEnvironment.cs
@@ -9,6 +9,8 @@ namespace Umbraco.Core.Hosting
string LocalTempPath { get; }
string ApplicationVirtualPath { get; }
+ int CurrentDomainId { get; }
+
bool IsDebugMode { get; }
///
/// Gets a value indicating whether Umbraco is hosted.
diff --git a/src/Umbraco.Abstractions/SafeCallContext.cs b/src/Umbraco.Abstractions/SafeCallContext.cs
index 7a64f3f7b5..aeaf4af17e 100644
--- a/src/Umbraco.Abstractions/SafeCallContext.cs
+++ b/src/Umbraco.Abstractions/SafeCallContext.cs
@@ -4,6 +4,14 @@ using System.Collections.Generic;
namespace Umbraco.Core
{
+ ///
+ /// Provides a way to stop the data flow of a logical call context (i.e. CallContext or AsyncLocal) from within
+ /// a SafeCallContext and then have the original data restored to the current logical call context.
+ ///
+ ///
+ /// Some usages of this might be when spawning async thread or background threads in which the current logical call context will be flowed but
+ /// you don't want it to flow there yet you don't want to clear it either since you want the data to remain on the current thread.
+ ///
public class SafeCallContext : IDisposable
{
private static readonly List> EnterFuncs = new List>();
diff --git a/src/Umbraco.Abstractions/Scoping/IScopeContext.cs b/src/Umbraco.Abstractions/Scoping/IScopeContext.cs
index 0a267e67e2..719cc5f0ad 100644
--- a/src/Umbraco.Abstractions/Scoping/IScopeContext.cs
+++ b/src/Umbraco.Abstractions/Scoping/IScopeContext.cs
@@ -8,7 +8,7 @@ namespace Umbraco.Core.Scoping
/// A scope context can enlist objects that will be attached to the scope, and available
/// for the duration of the scope. In addition, it can enlist actions, that will run when the
/// scope is exiting, and after the database transaction has been committed.
- public interface IScopeContext
+ public interface IScopeContext : IInstanceIdentifiable
{
///
/// Enlists an action.
@@ -46,5 +46,7 @@ namespace Umbraco.Core.Scoping
/// The object unique identifier.
/// The enlisted object, if any, else the default value.
T GetEnlisted(string key);
+
+ void ScopeExit(bool completed);
}
}
diff --git a/src/Umbraco.Abstractions/Security/IPasswordHasher.cs b/src/Umbraco.Abstractions/Security/IPasswordHasher.cs
new file mode 100644
index 0000000000..2195570605
--- /dev/null
+++ b/src/Umbraco.Abstractions/Security/IPasswordHasher.cs
@@ -0,0 +1,12 @@
+namespace Umbraco.Core.Security
+{
+ public interface IPasswordHasher
+ {
+ ///
+ /// Hashes a password
+ ///
+ /// The password.
+ /// The password hashed.
+ string HashPassword(string password);
+ }
+}
diff --git a/src/Umbraco.Abstractions/Services/IMembershipMemberService.cs b/src/Umbraco.Abstractions/Services/IMembershipMemberService.cs
index 448b0c761a..d3ca954de8 100644
--- a/src/Umbraco.Abstractions/Services/IMembershipMemberService.cs
+++ b/src/Umbraco.Abstractions/Services/IMembershipMemberService.cs
@@ -124,15 +124,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);
-
- ///
- /// Gets the default MemberType alias
- ///
- /// By default we'll return the 'writer', but we need to check it exists. If it doesn't we'll
- /// return the first type that is not an admin, otherwise if there's only one we will return that one.
- /// Alias of the default MemberType
- string GetDefaultMemberType();
-
+
///
/// Finds a list of objects by a partial email string
///
diff --git a/src/Umbraco.Abstractions/Services/IRuntimeState.cs b/src/Umbraco.Abstractions/Services/IRuntimeState.cs
index 30c768ab01..38da246cc1 100644
--- a/src/Umbraco.Abstractions/Services/IRuntimeState.cs
+++ b/src/Umbraco.Abstractions/Services/IRuntimeState.cs
@@ -76,5 +76,7 @@ namespace Umbraco.Core
/// Gets the exception that caused the boot to fail.
///
BootFailedException BootFailedException { get; }
+
+ IMainDom MainDom { get; }
}
}
diff --git a/src/Umbraco.Abstractions/Services/IUserService.cs b/src/Umbraco.Abstractions/Services/IUserService.cs
index 950b4f548d..6d1e8f82ac 100644
--- a/src/Umbraco.Abstractions/Services/IUserService.cs
+++ b/src/Umbraco.Abstractions/Services/IUserService.cs
@@ -203,6 +203,8 @@ namespace Umbraco.Core.Services
///
IEnumerable GetAllNotInGroup(int groupId);
+ IEnumerable GetNextUsers(int id, int count);
+
#region User groups
///
diff --git a/src/Umbraco.Abstractions/StringExtensions.cs b/src/Umbraco.Abstractions/StringExtensions.cs
index 2ba185ae50..d61c0a87ca 100644
--- a/src/Umbraco.Abstractions/StringExtensions.cs
+++ b/src/Umbraco.Abstractions/StringExtensions.cs
@@ -8,6 +8,7 @@ using System.Linq;
using System.Security.Cryptography;
using System.Text;
using System.Text.RegularExpressions;
+using Umbraco.Composing;
using Umbraco.Core.IO;
using Umbraco.Core.Strings;
@@ -1395,5 +1396,54 @@ namespace Umbraco.Core
{
return shortStringHelper.CleanString(text, stringType, separator, culture);
}
+
+ // note: LegacyCurrent.ShortStringHelper will produce 100% backward-compatible output for SplitPascalCasing.
+ // other helpers may not. DefaultCurrent.ShortStringHelper produces better, but non-compatible, results.
+
+ ///
+ /// Splits a Pascal cased string into a phrase separated by spaces.
+ ///
+ /// The text to split.
+ ///
+ /// The split text.
+ public static string SplitPascalCasing(this string phrase, IShortStringHelper shortStringHelper)
+ {
+ return shortStringHelper.SplitPascalCasing(phrase, ' ');
+ }
+
+ //NOTE: Not sure what this actually does but is used a few places, need to figure it out and then move to StringExtensions and obsolete.
+ // it basically is yet another version of SplitPascalCasing
+ // plugging string extensions here to be 99% compatible
+ // the only diff. is with numbers, Number6Is was "Number6 Is", and the new string helper does it too,
+ // but the legacy one does "Number6Is"... assuming it is not a big deal.
+ internal static string SpaceCamelCasing(this string phrase, IShortStringHelper shortStringHelper)
+ {
+ return phrase.Length < 2 ? phrase : phrase.SplitPascalCasing(shortStringHelper).ToFirstUpperInvariant();
+ }
+
+ ///
+ /// Cleans a string, in the context of the invariant culture, to produce a string that can safely be used as a filename,
+ /// both internally (on disk) and externally (as a url).
+ ///
+ /// The text to filter.
+ ///
+ /// The safe filename.
+ public static string ToSafeFileName(this string text, IShortStringHelper shortStringHelper)
+ {
+ return shortStringHelper.CleanStringForSafeFileName(text);
+ }
+
+ ///
+ /// Cleans a string, in the context of the invariant culture, to produce a string that can safely be used as a filename,
+ /// both internally (on disk) and externally (as a url).
+ ///
+ /// The text to filter.
+ ///
+ /// The culture.
+ /// The safe filename.
+ public static string ToSafeFileName(this string text, IShortStringHelper shortStringHelper, string culture)
+ {
+ return shortStringHelper.CleanStringForSafeFileName(text, culture);
+ }
}
}
diff --git a/src/Umbraco.Configuration/ConfigsFactory.cs b/src/Umbraco.Configuration/ConfigsFactory.cs
index 6619da90a4..c843467e93 100644
--- a/src/Umbraco.Configuration/ConfigsFactory.cs
+++ b/src/Umbraco.Configuration/ConfigsFactory.cs
@@ -13,6 +13,8 @@ namespace Umbraco.Core.Configuration
}
public IHostingSettings HostingSettings { get; } = new HostingSettings();
+ public ICoreDebug CoreDebug { get; } = new CoreDebug();
+
public IUmbracoSettingsSection UmbracoSettings { get; }
public Configs Create(IIOHelper ioHelper)
@@ -26,7 +28,7 @@ namespace Umbraco.Core.Configuration
configs.Add(() => new DefaultPasswordConfig());
configs.Add(() => new DefaultPasswordConfig());
- configs.Add(() => new CoreDebug());
+ configs.Add(() => CoreDebug);
configs.Add(() => new ConnectionStrings());
configs.AddCoreConfigs(ioHelper);
return configs;
diff --git a/src/Umbraco.Core/Runtime/CoreInitialComposer.cs b/src/Umbraco.Core/Runtime/CoreInitialComposer.cs
index 1e145b33d6..159eb8bca9 100644
--- a/src/Umbraco.Core/Runtime/CoreInitialComposer.cs
+++ b/src/Umbraco.Core/Runtime/CoreInitialComposer.cs
@@ -110,8 +110,9 @@ namespace Umbraco.Core.Runtime
factory.GetInstance(),
factory.GetInstance(),
true, new DatabaseServerMessengerOptions(),
- factory.GetInstance()
- ));
+ factory.GetInstance(),
+ factory.GetInstance()
+ ));
composition.CacheRefreshers()
.Add(() => composition.TypeLoader.GetCacheRefreshers());
diff --git a/src/Umbraco.Core/Security/IUserAwarePasswordHasher.cs b/src/Umbraco.Core/Security/IUserAwarePasswordHasher.cs
index 48a25c0e2b..4af6d7accd 100644
--- a/src/Umbraco.Core/Security/IUserAwarePasswordHasher.cs
+++ b/src/Umbraco.Core/Security/IUserAwarePasswordHasher.cs
@@ -8,7 +8,7 @@ namespace Umbraco.Core.Security
///
///
///
- public interface IUserAwarePasswordHasher : IPasswordHasher
+ public interface IUserAwarePasswordHasher : Microsoft.AspNet.Identity.IPasswordHasher
where TUser : class, IUser
where TKey : IEquatable
{
diff --git a/src/Umbraco.Core/StringExtensions.cs b/src/Umbraco.Core/StringExtensions.cs
deleted file mode 100644
index 7e5a7b6cb5..0000000000
--- a/src/Umbraco.Core/StringExtensions.cs
+++ /dev/null
@@ -1,56 +0,0 @@
-using Umbraco.Core.Strings;
-
-namespace Umbraco.Core
-{
- ///
- /// String extension methods
- ///
- public static class StringExtensions
- {
- ///
- /// Splits a Pascal cased string into a phrase separated by spaces.
- ///
- /// The text to split.
- /// The short string helper.
- /// The split text.
- public static string SplitPascalCasing(this string phrase, IShortStringHelper shortStringHelper)
- {
- return shortStringHelper.SplitPascalCasing(phrase, ' ');
- }
-
- //NOTE: Not sure what this actually does but is used a few places, need to figure it out and then move to StringExtensions and obsolete.
- // it basically is yet another version of SplitPascalCasing
- // plugging string extensions here to be 99% compatible
- // the only diff. is with numbers, Number6Is was "Number6 Is", and the new string helper does it too,
- // but the legacy one does "Number6Is"... assuming it is not a big deal.
- internal static string SpaceCamelCasing(this string phrase, IShortStringHelper shortStringHelper)
- {
- return phrase.Length < 2 ? phrase : phrase.SplitPascalCasing(shortStringHelper).ToFirstUpperInvariant();
- }
-
- ///
- /// Cleans a string, in the context of the invariant culture, to produce a string that can safely be used as a filename,
- /// both internally (on disk) and externally (as a url).
- ///
- /// The text to filter.
- /// The short string helper.
- /// The safe filename.
- public static string ToSafeFileName(this string text, IShortStringHelper shortStringHelper)
- {
- return shortStringHelper.CleanStringForSafeFileName(text);
- }
-
- ///
- /// Cleans a string, in the context of the invariant culture, to produce a string that can safely be used as a filename,
- /// both internally (on disk) and externally (as a url).
- ///
- /// The text to filter.
- /// The short string helper.
- /// The culture.
- /// The safe filename.
- public static string ToSafeFileName(this string text, IShortStringHelper shortStringHelper, string culture)
- {
- return shortStringHelper.CleanStringForSafeFileName(text, culture);
- }
- }
-}
diff --git a/src/Umbraco.Core/TypeExtensions.cs b/src/Umbraco.Core/TypeExtensions.cs
index 749bcbc342..c383faf2af 100644
--- a/src/Umbraco.Core/TypeExtensions.cs
+++ b/src/Umbraco.Core/TypeExtensions.cs
@@ -15,13 +15,14 @@ namespace Umbraco.Core
/// Tries to return a value based on a property name for an object but ignores case sensitivity
///
///
+ ///
///
///
///
///
/// Currently this will only work for ProperCase and camelCase properties, see the TODO below to enable complete case insensitivity
///
- internal static Attempt GetMemberIgnoreCase(this Type type, object target, string memberName, IShortStringHelper shortStringHelper)
+ internal static Attempt GetMemberIgnoreCase(this Type type, IShortStringHelper shortStringHelper, object target, string memberName)
{
Func> getMember =
memberAlias =>
@@ -58,6 +59,6 @@ namespace Umbraco.Core
return attempt;
}
-
+
}
}
diff --git a/src/Umbraco.Core/Umbraco.Core.csproj b/src/Umbraco.Core/Umbraco.Core.csproj
index 22b5230e54..7ff3544f7a 100755
--- a/src/Umbraco.Core/Umbraco.Core.csproj
+++ b/src/Umbraco.Core/Umbraco.Core.csproj
@@ -126,512 +126,35 @@
Constants.cs
-->
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
-
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -654,11 +177,5 @@
Umbraco.Infrastructure
-
-
-
-
-
-
\ No newline at end of file
diff --git a/src/Umbraco.Core/Cache/DefaultRepositoryCachePolicy.cs b/src/Umbraco.Infrastructure/Cache/DefaultRepositoryCachePolicy.cs
similarity index 100%
rename from src/Umbraco.Core/Cache/DefaultRepositoryCachePolicy.cs
rename to src/Umbraco.Infrastructure/Cache/DefaultRepositoryCachePolicy.cs
diff --git a/src/Umbraco.Core/Cache/FullDataSetRepositoryCachePolicy.cs b/src/Umbraco.Infrastructure/Cache/FullDataSetRepositoryCachePolicy.cs
similarity index 100%
rename from src/Umbraco.Core/Cache/FullDataSetRepositoryCachePolicy.cs
rename to src/Umbraco.Infrastructure/Cache/FullDataSetRepositoryCachePolicy.cs
diff --git a/src/Umbraco.Core/Cache/RepositoryCachePolicyBase.cs b/src/Umbraco.Infrastructure/Cache/RepositoryCachePolicyBase.cs
similarity index 100%
rename from src/Umbraco.Core/Cache/RepositoryCachePolicyBase.cs
rename to src/Umbraco.Infrastructure/Cache/RepositoryCachePolicyBase.cs
diff --git a/src/Umbraco.Core/Cache/SingleItemsOnlyRepositoryCachePolicy.cs b/src/Umbraco.Infrastructure/Cache/SingleItemsOnlyRepositoryCachePolicy.cs
similarity index 100%
rename from src/Umbraco.Core/Cache/SingleItemsOnlyRepositoryCachePolicy.cs
rename to src/Umbraco.Infrastructure/Cache/SingleItemsOnlyRepositoryCachePolicy.cs
diff --git a/src/Umbraco.Core/Compose/ManifestWatcherComponent.cs b/src/Umbraco.Infrastructure/Compose/ManifestWatcherComponent.cs
similarity index 100%
rename from src/Umbraco.Core/Compose/ManifestWatcherComponent.cs
rename to src/Umbraco.Infrastructure/Compose/ManifestWatcherComponent.cs
diff --git a/src/Umbraco.Core/Compose/ManifestWatcherComposer.cs b/src/Umbraco.Infrastructure/Compose/ManifestWatcherComposer.cs
similarity index 100%
rename from src/Umbraco.Core/Compose/ManifestWatcherComposer.cs
rename to src/Umbraco.Infrastructure/Compose/ManifestWatcherComposer.cs
diff --git a/src/Umbraco.Core/Compose/RelateOnCopyComponent.cs b/src/Umbraco.Infrastructure/Compose/RelateOnCopyComponent.cs
similarity index 64%
rename from src/Umbraco.Core/Compose/RelateOnCopyComponent.cs
rename to src/Umbraco.Infrastructure/Compose/RelateOnCopyComponent.cs
index b56ff8b87e..56a97e4cba 100644
--- a/src/Umbraco.Core/Compose/RelateOnCopyComponent.cs
+++ b/src/Umbraco.Infrastructure/Compose/RelateOnCopyComponent.cs
@@ -8,6 +8,15 @@ namespace Umbraco.Core.Compose
// TODO: This should just exist in the content service/repo!
public sealed class RelateOnCopyComponent : IComponent
{
+ private readonly IRelationService _relationService;
+ private readonly IAuditService _auditService;
+
+ public RelateOnCopyComponent(IRelationService relationService, IAuditService auditService)
+ {
+ _relationService = relationService;
+ _auditService = auditService;
+ }
+
public void Initialize()
{
ContentService.Copied += ContentServiceCopied;
@@ -16,13 +25,12 @@ namespace Umbraco.Core.Compose
public void Terminate()
{ }
- private static void ContentServiceCopied(IContentService sender, Events.CopyEventArgs e)
+ private void ContentServiceCopied(IContentService sender, Events.CopyEventArgs e)
{
if (e.RelateToOriginal == false) return;
- var relationService = Current.Services.RelationService;
- var relationType = relationService.GetRelationTypeByAlias(Constants.Conventions.RelationTypes.RelateDocumentOnCopyAlias);
+ var relationType = _relationService.GetRelationTypeByAlias(Constants.Conventions.RelationTypes.RelateDocumentOnCopyAlias);
if (relationType == null)
{
@@ -32,13 +40,13 @@ namespace Umbraco.Core.Compose
Constants.ObjectTypes.Document,
Constants.ObjectTypes.Document);
- relationService.Save(relationType);
+ _relationService.Save(relationType);
}
var relation = new Relation(e.Original.Id, e.Copy.Id, relationType);
- relationService.Save(relation);
+ _relationService.Save(relation);
- Current.Services.AuditService.Add(
+ _auditService.Add(
AuditType.Copy,
e.Copy.WriterId,
e.Copy.Id, ObjectTypes.GetName(UmbracoObjectTypes.Document),
diff --git a/src/Umbraco.Core/Compose/RelateOnCopyComposer.cs b/src/Umbraco.Infrastructure/Compose/RelateOnCopyComposer.cs
similarity index 100%
rename from src/Umbraco.Core/Compose/RelateOnCopyComposer.cs
rename to src/Umbraco.Infrastructure/Compose/RelateOnCopyComposer.cs
diff --git a/src/Umbraco.Core/Compose/RelateOnTrashComponent.cs b/src/Umbraco.Infrastructure/Compose/RelateOnTrashComponent.cs
similarity index 95%
rename from src/Umbraco.Core/Compose/RelateOnTrashComponent.cs
rename to src/Umbraco.Infrastructure/Compose/RelateOnTrashComponent.cs
index e7b3292956..c81aa2fd7d 100644
--- a/src/Umbraco.Core/Compose/RelateOnTrashComponent.cs
+++ b/src/Umbraco.Infrastructure/Compose/RelateOnTrashComponent.cs
@@ -12,20 +12,22 @@ namespace Umbraco.Core.Compose
private readonly IRelationService _relationService;
private readonly IEntityService _entityService;
private readonly ILocalizedTextService _textService;
+ private readonly IAuditService _auditService;
- public RelateOnTrashComponent(IRelationService relationService, IEntityService entityService, ILocalizedTextService textService)
+ public RelateOnTrashComponent(IRelationService relationService, IEntityService entityService, ILocalizedTextService textService, IAuditService auditService)
{
_relationService = relationService;
_entityService = entityService;
_textService = textService;
+ _auditService = auditService;
}
public void Initialize()
{
ContentService.Moved += (sender, args) => ContentService_Moved(sender, args, _relationService);
- ContentService.Trashed += (sender, args) => ContentService_Trashed(sender, args, _relationService, _entityService, _textService);
+ ContentService.Trashed += (sender, args) => ContentService_Trashed(sender, args, _relationService, _entityService, _textService, _auditService);
MediaService.Moved += (sender, args) => MediaService_Moved(sender, args, _relationService);
- MediaService.Trashed += (sender, args) => MediaService_Trashed(sender, args, _relationService, _entityService, _textService);
+ MediaService.Trashed += (sender, args) => MediaService_Trashed(sender, args, _relationService, _entityService, _textService, _auditService);
}
public void Terminate()
@@ -59,7 +61,7 @@ namespace Umbraco.Core.Compose
}
}
- private static void ContentService_Trashed(IContentService sender, MoveEventArgs e, IRelationService relationService, IEntityService entityService, ILocalizedTextService textService)
+ private static void ContentService_Trashed(IContentService sender, MoveEventArgs e, IRelationService relationService, IEntityService entityService, ILocalizedTextService textService, IAuditService auditService)
{
const string relationTypeAlias = Constants.Conventions.RelationTypes.RelateParentDocumentOnDeleteAlias;
var relationType = relationService.GetRelationTypeByAlias(relationTypeAlias);
@@ -90,7 +92,7 @@ namespace Umbraco.Core.Compose
var relation = new Relation(originalParentId, item.Entity.Id, relationType);
relationService.Save(relation);
- Current.Services.AuditService.Add(AuditType.Delete,
+ auditService.Add(AuditType.Delete,
item.Entity.WriterId,
item.Entity.Id,
ObjectTypes.GetName(UmbracoObjectTypes.Document),
@@ -101,7 +103,7 @@ namespace Umbraco.Core.Compose
}
}
- private static void MediaService_Trashed(IMediaService sender, MoveEventArgs e, IRelationService relationService, IEntityService entityService, ILocalizedTextService textService)
+ private static void MediaService_Trashed(IMediaService sender, MoveEventArgs e, IRelationService relationService, IEntityService entityService, ILocalizedTextService textService, IAuditService auditService)
{
const string relationTypeAlias = Constants.Conventions.RelationTypes.RelateParentMediaFolderOnDeleteAlias;
var relationType = relationService.GetRelationTypeByAlias(relationTypeAlias);
@@ -126,7 +128,7 @@ namespace Umbraco.Core.Compose
// Add a relation for the item being deleted, so that we can know the original parent for if we need to restore later
var relation = new Relation(originalParentId, item.Entity.Id, relationType);
relationService.Save(relation);
- Current.Services.AuditService.Add(AuditType.Delete,
+ auditService.Add(AuditType.Delete,
item.Entity.CreatorId,
item.Entity.Id,
ObjectTypes.GetName(UmbracoObjectTypes.Media),
diff --git a/src/Umbraco.Core/Compose/RelateOnTrashComposer.cs b/src/Umbraco.Infrastructure/Compose/RelateOnTrashComposer.cs
similarity index 100%
rename from src/Umbraco.Core/Compose/RelateOnTrashComposer.cs
rename to src/Umbraco.Infrastructure/Compose/RelateOnTrashComposer.cs
diff --git a/src/Umbraco.Core/Composing/CompositionExtensions/Configuration.cs b/src/Umbraco.Infrastructure/Composing/CompositionExtensions/Configuration.cs
similarity index 94%
rename from src/Umbraco.Core/Composing/CompositionExtensions/Configuration.cs
rename to src/Umbraco.Infrastructure/Composing/CompositionExtensions/Configuration.cs
index 78475953b7..7169b93cb4 100644
--- a/src/Umbraco.Core/Composing/CompositionExtensions/Configuration.cs
+++ b/src/Umbraco.Infrastructure/Composing/CompositionExtensions/Configuration.cs
@@ -5,7 +5,7 @@ namespace Umbraco.Core.Composing.CompositionExtensions
///
/// Compose configurations.
///
- public static class Configuration
+ internal static class Configuration
{
public static Composition ComposeConfiguration(this Composition composition)
{
diff --git a/src/Umbraco.Core/Composing/CompositionExtensions/FileSystems.cs b/src/Umbraco.Infrastructure/Composing/CompositionExtensions/FileSystems.cs
similarity index 95%
rename from src/Umbraco.Core/Composing/CompositionExtensions/FileSystems.cs
rename to src/Umbraco.Infrastructure/Composing/CompositionExtensions/FileSystems.cs
index 0fdcd0ae29..e13b4f9477 100644
--- a/src/Umbraco.Core/Composing/CompositionExtensions/FileSystems.cs
+++ b/src/Umbraco.Infrastructure/Composing/CompositionExtensions/FileSystems.cs
@@ -1,10 +1,11 @@
-using Umbraco.Core.IO;
+using Umbraco.Core.Configuration;
+using Umbraco.Core.IO;
using Umbraco.Core.IO.MediaPathSchemes;
using Umbraco.Core.Logging;
namespace Umbraco.Core.Composing.CompositionExtensions
{
- public static class FileSystems
+ internal static class FileSystems
{
/*
* HOW TO REPLACE THE MEDIA UNDERLYING FILESYSTEM
@@ -90,7 +91,7 @@ namespace Umbraco.Core.Composing.CompositionExtensions
// register the IFileSystem supporting the IMediaFileSystem
// THIS IS THE ONLY THING THAT NEEDS TO CHANGE, IN ORDER TO REPLACE THE UNDERLYING FILESYSTEM
// and, SupportingFileSystem.For() returns the underlying filesystem
- composition.SetMediaFileSystem(factory => new PhysicalFileSystem(factory.GetInstance(), factory.GetInstance(), Current.Configs.Global().UmbracoMediaPath));
+ composition.SetMediaFileSystem(factory => new PhysicalFileSystem(factory.GetInstance(), factory.GetInstance(), factory.GetInstance().UmbracoMediaPath));
return composition;
}
diff --git a/src/Umbraco.Core/Composing/CompositionExtensions/Repositories.cs b/src/Umbraco.Infrastructure/Composing/CompositionExtensions/Repositories.cs
similarity index 98%
rename from src/Umbraco.Core/Composing/CompositionExtensions/Repositories.cs
rename to src/Umbraco.Infrastructure/Composing/CompositionExtensions/Repositories.cs
index 23dc9e67c6..0939dd0f71 100644
--- a/src/Umbraco.Core/Composing/CompositionExtensions/Repositories.cs
+++ b/src/Umbraco.Infrastructure/Composing/CompositionExtensions/Repositories.cs
@@ -6,7 +6,7 @@ namespace Umbraco.Core.Composing.CompositionExtensions
///
/// Composes repositories.
///
- public static class Repositories
+ internal static class Repositories
{
public static Composition ComposeRepositories(this Composition composition)
{
diff --git a/src/Umbraco.Core/Composing/CompositionExtensions/Services.cs b/src/Umbraco.Infrastructure/Composing/CompositionExtensions/Services.cs
similarity index 99%
rename from src/Umbraco.Core/Composing/CompositionExtensions/Services.cs
rename to src/Umbraco.Infrastructure/Composing/CompositionExtensions/Services.cs
index a615630c85..c746c2b8b4 100644
--- a/src/Umbraco.Core/Composing/CompositionExtensions/Services.cs
+++ b/src/Umbraco.Infrastructure/Composing/CompositionExtensions/Services.cs
@@ -13,7 +13,7 @@ using Umbraco.Core.Services.Implement;
namespace Umbraco.Core.Composing.CompositionExtensions
{
- public static class Services
+ internal static class Services
{
public static Composition ComposeServices(this Composition composition)
{
diff --git a/src/Umbraco.Core/Composing/LightInject/LightInjectContainer.cs b/src/Umbraco.Infrastructure/Composing/LightInject/LightInjectContainer.cs
similarity index 100%
rename from src/Umbraco.Core/Composing/LightInject/LightInjectContainer.cs
rename to src/Umbraco.Infrastructure/Composing/LightInject/LightInjectContainer.cs
diff --git a/src/Umbraco.Core/Composing/LightInject/LightInjectException.cs b/src/Umbraco.Infrastructure/Composing/LightInject/LightInjectException.cs
similarity index 100%
rename from src/Umbraco.Core/Composing/LightInject/LightInjectException.cs
rename to src/Umbraco.Infrastructure/Composing/LightInject/LightInjectException.cs
diff --git a/src/Umbraco.Core/Composing/LightInject/MixedLightInjectScopeManagerProvider.cs b/src/Umbraco.Infrastructure/Composing/LightInject/MixedLightInjectScopeManagerProvider.cs
similarity index 100%
rename from src/Umbraco.Core/Composing/LightInject/MixedLightInjectScopeManagerProvider.cs
rename to src/Umbraco.Infrastructure/Composing/LightInject/MixedLightInjectScopeManagerProvider.cs
diff --git a/src/Umbraco.Core/Composing/RegisterFactory.cs b/src/Umbraco.Infrastructure/Composing/RegisterFactory.cs
similarity index 100%
rename from src/Umbraco.Core/Composing/RegisterFactory.cs
rename to src/Umbraco.Infrastructure/Composing/RegisterFactory.cs
diff --git a/src/Umbraco.Core/CompositionExtensions.cs b/src/Umbraco.Infrastructure/CompositionExtensions.cs
similarity index 100%
rename from src/Umbraco.Core/CompositionExtensions.cs
rename to src/Umbraco.Infrastructure/CompositionExtensions.cs
diff --git a/src/Umbraco.Core/CompositionExtensions_Essentials.cs b/src/Umbraco.Infrastructure/CompositionExtensions_Essentials.cs
similarity index 100%
rename from src/Umbraco.Core/CompositionExtensions_Essentials.cs
rename to src/Umbraco.Infrastructure/CompositionExtensions_Essentials.cs
diff --git a/src/Umbraco.Core/CompositionExtensions_FileSystems.cs b/src/Umbraco.Infrastructure/CompositionExtensions_FileSystems.cs
similarity index 100%
rename from src/Umbraco.Core/CompositionExtensions_FileSystems.cs
rename to src/Umbraco.Infrastructure/CompositionExtensions_FileSystems.cs
diff --git a/src/Umbraco.Core/ContentExtensions.cs b/src/Umbraco.Infrastructure/ContentExtensions.cs
similarity index 81%
rename from src/Umbraco.Core/ContentExtensions.cs
rename to src/Umbraco.Infrastructure/ContentExtensions.cs
index 4fd309f134..f74ecd5693 100644
--- a/src/Umbraco.Core/ContentExtensions.cs
+++ b/src/Umbraco.Infrastructure/ContentExtensions.cs
@@ -1,12 +1,10 @@
-using System;
+using System;
using System.Collections.Generic;
-using System.ComponentModel;
using System.IO;
using System.Linq;
-using System.Xml.Linq;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
-using Umbraco.Core.Composing;
+using Umbraco.Composing;
using Umbraco.Core.IO;
using Umbraco.Core.Models;
using Umbraco.Core.Models.Membership;
@@ -17,9 +15,30 @@ namespace Umbraco.Core
{
public static class ContentExtensions
{
- // this ain't pretty
- private static IMediaFileSystem _mediaFileSystem;
- private static IMediaFileSystem MediaFileSystem => _mediaFileSystem ?? (_mediaFileSystem = Current.MediaFileSystem);
+ ///
+ /// Removes characters that are not valid XML characters from all entity properties
+ /// of type string. See: http://stackoverflow.com/a/961504/5018
+ ///
+ ///
+ ///
+ /// If this is not done then the xml cache can get corrupt and it will throw YSODs upon reading it.
+ ///
+ ///
+ public static void SanitizeEntityPropertiesForXmlStorage(this IContentBase entity)
+ {
+ entity.Name = entity.Name.ToValidXmlString();
+ foreach (var property in entity.Properties)
+ {
+ foreach (var propertyValue in property.Values)
+ {
+ if (propertyValue.EditedValue is string editString)
+ propertyValue.EditedValue = editString.ToValidXmlString();
+ if (propertyValue.PublishedValue is string publishedString)
+ propertyValue.PublishedValue = publishedString.ToValidXmlString();
+ }
+ }
+ }
+
#region IContent
@@ -55,28 +74,40 @@ namespace Umbraco.Core
#endregion
///
- /// Removes characters that are not valid XML characters from all entity properties
- /// of type string. See: http://stackoverflow.com/a/961504/5018
+ /// Gets the for the Creator of this content item.
///
- ///
- ///
- /// If this is not done then the xml cache can get corrupt and it will throw YSODs upon reading it.
- ///
- ///
- public static void SanitizeEntityPropertiesForXmlStorage(this IContentBase entity)
+ public static IProfile GetCreatorProfile(this IContentBase content, IUserService userService)
{
- entity.Name = entity.Name.ToValidXmlString();
- foreach (var property in entity.Properties)
- {
- foreach (var propertyValue in property.Values)
- {
- if (propertyValue.EditedValue is string editString)
- propertyValue.EditedValue = editString.ToValidXmlString();
- if (propertyValue.PublishedValue is string publishedString)
- propertyValue.PublishedValue = publishedString.ToValidXmlString();
- }
- }
+ return userService.GetProfileById(content.CreatorId);
}
+ ///
+ /// Gets the for the Writer of this content.
+ ///
+ public static IProfile GetWriterProfile(this IContent content, IUserService userService)
+ {
+ return userService.GetProfileById(content.WriterId);
+ }
+
+ ///
+ /// Gets the for the Writer of this content.
+ ///
+ public static IProfile GetWriterProfile(this IMedia content, IUserService userService)
+ {
+ return userService.GetProfileById(content.WriterId);
+ }
+
+ #region User/Profile methods
+
+ ///
+ /// Gets the for the Creator of this media item.
+ ///
+ public static IProfile GetCreatorProfile(this IMedia media, IUserService userService)
+ {
+ return userService.GetProfileById(media.CreatorId);
+ }
+
+
+ #endregion
///
/// Checks if the IContentBase has children
@@ -100,6 +131,7 @@ namespace Umbraco.Core
return false;
}
+
///
/// Returns properties that do not belong to a group
///
@@ -122,31 +154,29 @@ namespace Umbraco.Core
{
//get the properties for the current tab
return content.Properties
- .Where(property => propertyGroup.PropertyTypes
- .Select(propertyType => propertyType.Id)
- .Contains(property.PropertyTypeId));
+ .Where(property => propertyGroup.PropertyTypes
+ .Select(propertyType => propertyType.Id)
+ .Contains(property.PropertyTypeId));
}
+
#region SetValue for setting file contents
///
/// Sets the posted file value of a property.
///
- public static void SetValue(this IContentBase content, IContentTypeBaseServiceProvider contentTypeBaseServiceProvider, string propertyTypeAlias, string filename, Stream filestream, string culture = null, string segment = null)
+ public static void SetValue(this IContentBase content, IMediaFileSystem mediaFileSystem, IShortStringHelper shortStringHelper, IContentTypeBaseServiceProvider contentTypeBaseServiceProvider, string propertyTypeAlias, string filename, Stream filestream, string culture = null, string segment = null)
{
if (filename == null || filestream == null) return;
- // get a safe & clean filename
- var shortStringHelper = Current.Factory.GetInstance();
-
filename = shortStringHelper.CleanStringForSafeFileName(filename);
if (string.IsNullOrWhiteSpace(filename)) return;
filename = filename.ToLower();
- SetUploadFile(content,contentTypeBaseServiceProvider, propertyTypeAlias, filename, filestream, culture, segment);
+ SetUploadFile(content, mediaFileSystem, contentTypeBaseServiceProvider, propertyTypeAlias, filename, filestream, culture, segment);
}
- private static void SetUploadFile(this IContentBase content, IContentTypeBaseServiceProvider contentTypeBaseServiceProvider, string propertyTypeAlias, string filename, Stream filestream, string culture = null, string segment = null)
+ private static void SetUploadFile(this IContentBase content, IMediaFileSystem mediaFileSystem, IContentTypeBaseServiceProvider contentTypeBaseServiceProvider, string propertyTypeAlias, string filename, Stream filestream, string culture = null, string segment = null)
{
var property = GetProperty(content, contentTypeBaseServiceProvider, propertyTypeAlias);
@@ -161,11 +191,11 @@ namespace Umbraco.Core
var jObject = JsonConvert.DeserializeObject(svalue);
svalue = jObject != null ? jObject.GetValueAsString("src") : svalue;
}
- oldpath = MediaFileSystem.GetRelativePath(svalue);
+ oldpath = mediaFileSystem.GetRelativePath(svalue);
}
- var filepath = MediaFileSystem.StoreFile(content, property.PropertyType, filename, filestream, oldpath);
- property.SetValue(MediaFileSystem.GetUrl(filepath), culture, segment);
+ var filepath = mediaFileSystem.StoreFile(content, property.PropertyType, filename, filestream, oldpath);
+ property.SetValue(mediaFileSystem.GetUrl(filepath), culture, segment);
}
// gets or creates a property for a content item.
@@ -201,68 +231,17 @@ namespace Umbraco.Core
/// the "folder number" that was assigned to the previous file referenced by the property,
/// if any.
///
- public static string StoreFile(this IContentBase content, IContentTypeBaseServiceProvider contentTypeBaseServiceProvider, string propertyTypeAlias, string filename, Stream filestream, string filepath)
+ public static string StoreFile(this IContentBase content, IMediaFileSystem mediaFileSystem, IContentTypeBaseServiceProvider contentTypeBaseServiceProvider, string propertyTypeAlias, string filename, Stream filestream, string filepath)
{
var contentType = contentTypeBaseServiceProvider.GetContentTypeOf(content);
var propertyType = contentType
.CompositionPropertyTypes.FirstOrDefault(x => x.Alias.InvariantEquals(propertyTypeAlias));
if (propertyType == null) throw new ArgumentException("Invalid property type alias " + propertyTypeAlias + ".");
- return MediaFileSystem.StoreFile(content, propertyType, filename, filestream, filepath);
+ return mediaFileSystem.StoreFile(content, propertyType, filename, filestream, filepath);
}
#endregion
- #region User/Profile methods
-
- ///
- /// Gets the for the Creator of this media item.
- ///
- public static IProfile GetCreatorProfile(this IMedia media, IUserService userService)
- {
- return userService.GetProfileById(media.CreatorId);
- }
-
- [Obsolete("Use the overload that declares the IUserService to use")]
- [EditorBrowsable(EditorBrowsableState.Never)]
- public static IProfile GetCreatorProfile(this IContentBase content)
- {
- return Current.Services.UserService.GetProfileById(content.CreatorId);
- }
-
- ///
- /// Gets the for the Creator of this content item.
- ///
- public static IProfile GetCreatorProfile(this IContentBase content, IUserService userService)
- {
- return userService.GetProfileById(content.CreatorId);
- }
-
- [Obsolete("Use the overload that declares the IUserService to use")]
- [EditorBrowsable(EditorBrowsableState.Never)]
- public static IProfile GetWriterProfile(this IContent content)
- {
- return Current.Services.UserService.GetProfileById(content.WriterId);
- }
-
- ///
- /// Gets the for the Writer of this content.
- ///
- public static IProfile GetWriterProfile(this IContent content, IUserService userService)
- {
- return userService.GetProfileById(content.WriterId);
- }
-
- ///
- /// Gets the for the Writer of this content.
- ///
- public static IProfile GetWriterProfile(this IMedia content, IUserService userService)
- {
- return userService.GetProfileById(content.WriterId);
- }
-
- #endregion
-
-
#region Dirty
diff --git a/src/Umbraco.Core/ConventionsHelper.cs b/src/Umbraco.Infrastructure/ConventionsHelper.cs
similarity index 100%
rename from src/Umbraco.Core/ConventionsHelper.cs
rename to src/Umbraco.Infrastructure/ConventionsHelper.cs
diff --git a/src/Umbraco.Core/Deploy/IGridCellValueConnector.cs b/src/Umbraco.Infrastructure/Deploy/IGridCellValueConnector.cs
similarity index 100%
rename from src/Umbraco.Core/Deploy/IGridCellValueConnector.cs
rename to src/Umbraco.Infrastructure/Deploy/IGridCellValueConnector.cs
diff --git a/src/Umbraco.Infrastructure/Diagnostics/IMarchal.cs b/src/Umbraco.Infrastructure/Diagnostics/IMarchal.cs
new file mode 100644
index 0000000000..30e6a9e619
--- /dev/null
+++ b/src/Umbraco.Infrastructure/Diagnostics/IMarchal.cs
@@ -0,0 +1,12 @@
+using System;
+
+namespace Umbraco.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.
+ ///
+ public interface IMarchal
+ {
+ IntPtr GetExceptionPointers();
+ }
+}
diff --git a/src/Umbraco.Core/Diagnostics/MiniDump.cs b/src/Umbraco.Infrastructure/Diagnostics/MiniDump.cs
similarity index 91%
rename from src/Umbraco.Core/Diagnostics/MiniDump.cs
rename to src/Umbraco.Infrastructure/Diagnostics/MiniDump.cs
index 6534ad705c..9bc0b1c3fb 100644
--- a/src/Umbraco.Core/Diagnostics/MiniDump.cs
+++ b/src/Umbraco.Infrastructure/Diagnostics/MiniDump.cs
@@ -78,7 +78,7 @@ namespace Umbraco.Core.Diagnostics
[DllImport("kernel32.dll", EntryPoint = "GetCurrentThreadId", ExactSpelling = true)]
private static extern uint GetCurrentThreadId();
- private static bool Write(SafeHandle fileHandle, Option options, bool withException = false)
+ private static bool Write(IMarchal marchal, SafeHandle fileHandle, Option options, bool withException = false)
{
var currentProcess = Process.GetCurrentProcess();
var currentProcessHandle = currentProcess.Handle;
@@ -91,7 +91,7 @@ namespace Umbraco.Core.Diagnostics
exp.ExceptionPointers = IntPtr.Zero;
if (withException)
- exp.ExceptionPointers = Marshal.GetExceptionPointers();
+ exp.ExceptionPointers = marchal.GetExceptionPointers();
var bRet = exp.ExceptionPointers == IntPtr.Zero
? MiniDumpWriteDump(currentProcessHandle, currentProcessId, fileHandle, (uint) options, IntPtr.Zero, IntPtr.Zero, IntPtr.Zero)
@@ -100,7 +100,7 @@ namespace Umbraco.Core.Diagnostics
return bRet;
}
- public static bool Dump(Option options = Option.WithFullMemory, bool withException = false)
+ public static bool Dump(IMarchal marchal, IIOHelper ioHelper, Option options = Option.WithFullMemory, bool withException = false)
{
lock (LockO)
{
@@ -110,8 +110,6 @@ namespace Umbraco.Core.Diagnostics
// filter everywhere in our code = not!
var stacktrace = withException ? Environment.StackTrace : string.Empty;
- var ioHelper = Current.Factory.GetInstance();
-
var filepath = ioHelper.MapPath("~/App_Data/MiniDump");
if (Directory.Exists(filepath) == false)
Directory.CreateDirectory(filepath);
@@ -119,16 +117,15 @@ namespace Umbraco.Core.Diagnostics
var filename = Path.Combine(filepath, $"{DateTime.UtcNow:yyyyMMddTHHmmss}.{Guid.NewGuid().ToString("N").Substring(0, 4)}.dmp");
using (var stream = new FileStream(filename, FileMode.Create, FileAccess.ReadWrite, FileShare.Write))
{
- return Write(stream.SafeFileHandle, options, withException);
+ return Write(marchal, stream.SafeFileHandle, options, withException);
}
}
}
- public static bool OkToDump()
+ public static bool OkToDump(IIOHelper ioHelper)
{
lock (LockO)
{
- var ioHelper = Current.Factory.GetInstance();
var filepath = ioHelper.MapPath("~/App_Data/MiniDump");
if (Directory.Exists(filepath) == false) return true;
var count = Directory.GetFiles(filepath, "*.dmp").Length;
diff --git a/src/Umbraco.Core/Dictionary/UmbracoCultureDictionary.cs b/src/Umbraco.Infrastructure/Dictionary/UmbracoCultureDictionary.cs
similarity index 100%
rename from src/Umbraco.Core/Dictionary/UmbracoCultureDictionary.cs
rename to src/Umbraco.Infrastructure/Dictionary/UmbracoCultureDictionary.cs
diff --git a/src/Umbraco.Core/Dictionary/UmbracoCultureDictionaryFactory.cs b/src/Umbraco.Infrastructure/Dictionary/UmbracoCultureDictionaryFactory.cs
similarity index 100%
rename from src/Umbraco.Core/Dictionary/UmbracoCultureDictionaryFactory.cs
rename to src/Umbraco.Infrastructure/Dictionary/UmbracoCultureDictionaryFactory.cs
diff --git a/src/Umbraco.Core/Events/MigrationEventArgs.cs b/src/Umbraco.Infrastructure/Events/MigrationEventArgs.cs
similarity index 100%
rename from src/Umbraco.Core/Events/MigrationEventArgs.cs
rename to src/Umbraco.Infrastructure/Events/MigrationEventArgs.cs
diff --git a/src/Umbraco.Core/Events/QueuingEventDispatcher.cs b/src/Umbraco.Infrastructure/Events/QueuingEventDispatcher.cs
similarity index 71%
rename from src/Umbraco.Core/Events/QueuingEventDispatcher.cs
rename to src/Umbraco.Infrastructure/Events/QueuingEventDispatcher.cs
index 88b527e753..6260aaa176 100644
--- a/src/Umbraco.Core/Events/QueuingEventDispatcher.cs
+++ b/src/Umbraco.Infrastructure/Events/QueuingEventDispatcher.cs
@@ -1,4 +1,5 @@
-using Umbraco.Core.Composing;
+using Umbraco.Composing;
+using Umbraco.Core.Composing;
using Umbraco.Core.IO;
namespace Umbraco.Core.Events
@@ -7,11 +8,14 @@ namespace Umbraco.Core.Events
/// An IEventDispatcher that queues events, and raise them when the scope
/// exits and has been completed.
///
- internal class QueuingEventDispatcher : QueuingEventDispatcherBase
+ public class QueuingEventDispatcher : QueuingEventDispatcherBase
{
- public QueuingEventDispatcher()
+ private readonly IMediaFileSystem _mediaFileSystem;
+ public QueuingEventDispatcher(IMediaFileSystem mediaFileSystem)
: base(true)
- { }
+ {
+ _mediaFileSystem = mediaFileSystem;
+ }
protected override void ScopeExitCompleted()
{
@@ -28,13 +32,11 @@ namespace Umbraco.Core.Events
// but then where should it be (without making things too complicated)?
var delete = e.Args as IDeletingMediaFilesEventArgs;
if (delete != null && delete.MediaFilesToDelete.Count > 0)
- MediaFileSystem.DeleteMediaFiles(delete.MediaFilesToDelete);
+ _mediaFileSystem.DeleteMediaFiles(delete.MediaFilesToDelete);
}
}
- private IMediaFileSystem _mediaFileSystem;
- // TODO: inject
- private IMediaFileSystem MediaFileSystem => _mediaFileSystem ?? (_mediaFileSystem = Current.MediaFileSystem);
+
}
}
diff --git a/src/Umbraco.Core/Logging/LogHttpRequest.cs b/src/Umbraco.Infrastructure/Logging/LogHttpRequest.cs
similarity index 100%
rename from src/Umbraco.Core/Logging/LogHttpRequest.cs
rename to src/Umbraco.Infrastructure/Logging/LogHttpRequest.cs
diff --git a/src/Umbraco.Core/Logging/MessageTemplates.cs b/src/Umbraco.Infrastructure/Logging/MessageTemplates.cs
similarity index 100%
rename from src/Umbraco.Core/Logging/MessageTemplates.cs
rename to src/Umbraco.Infrastructure/Logging/MessageTemplates.cs
diff --git a/src/Umbraco.Core/Logging/OwinLogger.cs b/src/Umbraco.Infrastructure/Logging/OwinLogger.cs
similarity index 100%
rename from src/Umbraco.Core/Logging/OwinLogger.cs
rename to src/Umbraco.Infrastructure/Logging/OwinLogger.cs
diff --git a/src/Umbraco.Core/Logging/OwinLoggerFactory.cs b/src/Umbraco.Infrastructure/Logging/OwinLoggerFactory.cs
similarity index 84%
rename from src/Umbraco.Core/Logging/OwinLoggerFactory.cs
rename to src/Umbraco.Infrastructure/Logging/OwinLoggerFactory.cs
index 31805b2edc..9cd4c06263 100644
--- a/src/Umbraco.Core/Logging/OwinLoggerFactory.cs
+++ b/src/Umbraco.Infrastructure/Logging/OwinLoggerFactory.cs
@@ -1,10 +1,10 @@
using System;
using Microsoft.Owin.Logging;
-using Umbraco.Core.Composing;
+using Umbraco.Composing;
namespace Umbraco.Core.Logging
{
- internal class OwinLoggerFactory : ILoggerFactory
+ public class OwinLoggerFactory : ILoggerFactory
{
///
/// Creates a new ILogger instance of the given name.
diff --git a/src/Umbraco.Core/Logging/Serilog/Enrichers/HttpRequestIdEnricher.cs b/src/Umbraco.Infrastructure/Logging/Serilog/Enrichers/HttpRequestIdEnricher.cs
similarity index 100%
rename from src/Umbraco.Core/Logging/Serilog/Enrichers/HttpRequestIdEnricher.cs
rename to src/Umbraco.Infrastructure/Logging/Serilog/Enrichers/HttpRequestIdEnricher.cs
diff --git a/src/Umbraco.Core/Logging/Serilog/Enrichers/HttpRequestNumberEnricher.cs b/src/Umbraco.Infrastructure/Logging/Serilog/Enrichers/HttpRequestNumberEnricher.cs
similarity index 100%
rename from src/Umbraco.Core/Logging/Serilog/Enrichers/HttpRequestNumberEnricher.cs
rename to src/Umbraco.Infrastructure/Logging/Serilog/Enrichers/HttpRequestNumberEnricher.cs
diff --git a/src/Umbraco.Core/Logging/Serilog/Enrichers/HttpSessionIdEnricher.cs b/src/Umbraco.Infrastructure/Logging/Serilog/Enrichers/HttpSessionIdEnricher.cs
similarity index 100%
rename from src/Umbraco.Core/Logging/Serilog/Enrichers/HttpSessionIdEnricher.cs
rename to src/Umbraco.Infrastructure/Logging/Serilog/Enrichers/HttpSessionIdEnricher.cs
diff --git a/src/Umbraco.Core/Logging/Serilog/Enrichers/Log4NetLevelMapperEnricher.cs b/src/Umbraco.Infrastructure/Logging/Serilog/Enrichers/Log4NetLevelMapperEnricher.cs
similarity index 100%
rename from src/Umbraco.Core/Logging/Serilog/Enrichers/Log4NetLevelMapperEnricher.cs
rename to src/Umbraco.Infrastructure/Logging/Serilog/Enrichers/Log4NetLevelMapperEnricher.cs
diff --git a/src/Umbraco.Core/Logging/Serilog/LoggerConfigExtensions.cs b/src/Umbraco.Infrastructure/Logging/Serilog/LoggerConfigExtensions.cs
similarity index 100%
rename from src/Umbraco.Core/Logging/Serilog/LoggerConfigExtensions.cs
rename to src/Umbraco.Infrastructure/Logging/Serilog/LoggerConfigExtensions.cs
diff --git a/src/Umbraco.Core/Logging/Serilog/SerilogLogger.cs b/src/Umbraco.Infrastructure/Logging/Serilog/SerilogLogger.cs
similarity index 88%
rename from src/Umbraco.Core/Logging/Serilog/SerilogLogger.cs
rename to src/Umbraco.Infrastructure/Logging/Serilog/SerilogLogger.cs
index af5f712489..9dde28e95a 100644
--- a/src/Umbraco.Core/Logging/Serilog/SerilogLogger.cs
+++ b/src/Umbraco.Infrastructure/Logging/Serilog/SerilogLogger.cs
@@ -5,9 +5,10 @@ using System.Threading;
using Serilog;
using Serilog.Events;
using Umbraco.Core.Cache;
-using Umbraco.Core.Composing;
+using Umbraco.Core.Configuration;
using Umbraco.Core.Diagnostics;
using Umbraco.Core.Hosting;
+using Umbraco.Core.IO;
using Umbraco.Net;
namespace Umbraco.Core.Logging.Serilog
@@ -17,19 +18,31 @@ namespace Umbraco.Core.Logging.Serilog
///
public class SerilogLogger : ILogger, IDisposable
{
+ private readonly ICoreDebug _coreDebug;
+ private readonly IIOHelper _ioHelper;
+ private readonly IMarchal _marchal;
+
///
/// Initialize a new instance of the class with a configuration file.
///
///
- public SerilogLogger(FileInfo logConfigFile)
+ public SerilogLogger(ICoreDebug coreDebug, IIOHelper ioHelper, IMarchal marchal, FileInfo logConfigFile)
{
+ _coreDebug = coreDebug;
+ _ioHelper = ioHelper;
+ _marchal = marchal;
+
Log.Logger = new LoggerConfiguration()
.ReadFrom.AppSettings(filePath: AppDomain.CurrentDomain.BaseDirectory + logConfigFile)
.CreateLogger();
}
- public SerilogLogger(LoggerConfiguration logConfig)
+ public SerilogLogger(ICoreDebug coreDebug, IIOHelper ioHelper, IMarchal marchal, LoggerConfiguration logConfig)
{
+ _coreDebug = coreDebug;
+ _ioHelper = ioHelper;
+ _marchal = marchal;
+
//Configure Serilog static global logger with config passed in
Log.Logger = logConfig.CreateLogger();
}
@@ -38,7 +51,7 @@ namespace Umbraco.Core.Logging.Serilog
/// Creates a logger with some pre-defined configuration and remainder from config file
///
/// Used by UmbracoApplicationBase to get its logger.
- public static SerilogLogger CreateWithDefaultConfiguration(IHostingEnvironment hostingEnvironment, ISessionIdResolver sessionIdResolver, Func requestCacheGetter)
+ public static SerilogLogger CreateWithDefaultConfiguration(IHostingEnvironment hostingEnvironment, ISessionIdResolver sessionIdResolver, Func requestCacheGetter, ICoreDebug coreDebug, IIOHelper ioHelper, IMarchal marchal)
{
var loggerConfig = new LoggerConfiguration();
loggerConfig
@@ -46,7 +59,7 @@ namespace Umbraco.Core.Logging.Serilog
.ReadFromConfigFile()
.ReadFromUserConfigFile();
- return new SerilogLogger(loggerConfig);
+ return new SerilogLogger(coreDebug, ioHelper, marchal, loggerConfig);
}
///
@@ -157,7 +170,7 @@ namespace Umbraco.Core.Logging.Serilog
logger.Error(exception, messageTemplate, propertyValues);
}
- private static void DumpThreadAborts(global::Serilog.ILogger logger, LogEventLevel level, Exception exception, ref string messageTemplate)
+ private void DumpThreadAborts(global::Serilog.ILogger logger, LogEventLevel level, Exception exception, ref string messageTemplate)
{
var dump = false;
@@ -166,17 +179,17 @@ namespace Umbraco.Core.Logging.Serilog
messageTemplate += "\r\nThe thread has been aborted, because the request has timed out.";
// dump if configured, or if stacktrace contains Monitor.ReliableEnter
- dump = Current.Configs.CoreDebug().DumpOnTimeoutThreadAbort || IsMonitorEnterThreadAbortException(exception);
+ dump = _coreDebug.DumpOnTimeoutThreadAbort || IsMonitorEnterThreadAbortException(exception);
// dump if it is ok to dump (might have a cap on number of dump...)
- dump &= MiniDump.OkToDump();
+ dump &= MiniDump.OkToDump(_ioHelper);
}
if (dump)
{
try
{
- var dumped = MiniDump.Dump(withException: true);
+ var dumped = MiniDump.Dump(_marchal, _ioHelper, withException: true);
messageTemplate += dumped
? "\r\nA minidump was created in App_Data/MiniDump"
: "\r\nFailed to create a minidump";
diff --git a/src/Umbraco.Core/Logging/Viewer/CountingFilter.cs b/src/Umbraco.Infrastructure/Logging/Viewer/CountingFilter.cs
similarity index 100%
rename from src/Umbraco.Core/Logging/Viewer/CountingFilter.cs
rename to src/Umbraco.Infrastructure/Logging/Viewer/CountingFilter.cs
diff --git a/src/Umbraco.Core/Logging/Viewer/ErrorCounterFilter.cs b/src/Umbraco.Infrastructure/Logging/Viewer/ErrorCounterFilter.cs
similarity index 100%
rename from src/Umbraco.Core/Logging/Viewer/ErrorCounterFilter.cs
rename to src/Umbraco.Infrastructure/Logging/Viewer/ErrorCounterFilter.cs
diff --git a/src/Umbraco.Core/Logging/Viewer/ExpressionFilter.cs b/src/Umbraco.Infrastructure/Logging/Viewer/ExpressionFilter.cs
similarity index 100%
rename from src/Umbraco.Core/Logging/Viewer/ExpressionFilter.cs
rename to src/Umbraco.Infrastructure/Logging/Viewer/ExpressionFilter.cs
diff --git a/src/Umbraco.Core/Logging/Viewer/ILogFilter.cs b/src/Umbraco.Infrastructure/Logging/Viewer/ILogFilter.cs
similarity index 100%
rename from src/Umbraco.Core/Logging/Viewer/ILogFilter.cs
rename to src/Umbraco.Infrastructure/Logging/Viewer/ILogFilter.cs
diff --git a/src/Umbraco.Core/Logging/Viewer/ILogViewer.cs b/src/Umbraco.Infrastructure/Logging/Viewer/ILogViewer.cs
similarity index 100%
rename from src/Umbraco.Core/Logging/Viewer/ILogViewer.cs
rename to src/Umbraco.Infrastructure/Logging/Viewer/ILogViewer.cs
diff --git a/src/Umbraco.Core/Logging/Viewer/JsonLogViewer.cs b/src/Umbraco.Infrastructure/Logging/Viewer/JsonLogViewer.cs
similarity index 100%
rename from src/Umbraco.Core/Logging/Viewer/JsonLogViewer.cs
rename to src/Umbraco.Infrastructure/Logging/Viewer/JsonLogViewer.cs
diff --git a/src/Umbraco.Core/Logging/Viewer/LogLevelCounts.cs b/src/Umbraco.Infrastructure/Logging/Viewer/LogLevelCounts.cs
similarity index 100%
rename from src/Umbraco.Core/Logging/Viewer/LogLevelCounts.cs
rename to src/Umbraco.Infrastructure/Logging/Viewer/LogLevelCounts.cs
diff --git a/src/Umbraco.Core/Logging/Viewer/LogMessage.cs b/src/Umbraco.Infrastructure/Logging/Viewer/LogMessage.cs
similarity index 100%
rename from src/Umbraco.Core/Logging/Viewer/LogMessage.cs
rename to src/Umbraco.Infrastructure/Logging/Viewer/LogMessage.cs
diff --git a/src/Umbraco.Core/Logging/Viewer/LogTemplate.cs b/src/Umbraco.Infrastructure/Logging/Viewer/LogTemplate.cs
similarity index 100%
rename from src/Umbraco.Core/Logging/Viewer/LogTemplate.cs
rename to src/Umbraco.Infrastructure/Logging/Viewer/LogTemplate.cs
diff --git a/src/Umbraco.Core/Logging/Viewer/LogTimePeriod.cs b/src/Umbraco.Infrastructure/Logging/Viewer/LogTimePeriod.cs
similarity index 100%
rename from src/Umbraco.Core/Logging/Viewer/LogTimePeriod.cs
rename to src/Umbraco.Infrastructure/Logging/Viewer/LogTimePeriod.cs
diff --git a/src/Umbraco.Core/Logging/Viewer/LogViewerComposer.cs b/src/Umbraco.Infrastructure/Logging/Viewer/LogViewerComposer.cs
similarity index 100%
rename from src/Umbraco.Core/Logging/Viewer/LogViewerComposer.cs
rename to src/Umbraco.Infrastructure/Logging/Viewer/LogViewerComposer.cs
diff --git a/src/Umbraco.Core/Logging/Viewer/LogViewerSourceBase.cs b/src/Umbraco.Infrastructure/Logging/Viewer/LogViewerSourceBase.cs
similarity index 100%
rename from src/Umbraco.Core/Logging/Viewer/LogViewerSourceBase.cs
rename to src/Umbraco.Infrastructure/Logging/Viewer/LogViewerSourceBase.cs
diff --git a/src/Umbraco.Core/Logging/Viewer/MessageTemplateFilter.cs b/src/Umbraco.Infrastructure/Logging/Viewer/MessageTemplateFilter.cs
similarity index 100%
rename from src/Umbraco.Core/Logging/Viewer/MessageTemplateFilter.cs
rename to src/Umbraco.Infrastructure/Logging/Viewer/MessageTemplateFilter.cs
diff --git a/src/Umbraco.Core/Logging/Viewer/SavedLogSearch.cs b/src/Umbraco.Infrastructure/Logging/Viewer/SavedLogSearch.cs
similarity index 100%
rename from src/Umbraco.Core/Logging/Viewer/SavedLogSearch.cs
rename to src/Umbraco.Infrastructure/Logging/Viewer/SavedLogSearch.cs
diff --git a/src/Umbraco.Core/Manifest/DashboardAccessRuleConverter.cs b/src/Umbraco.Infrastructure/Manifest/DashboardAccessRuleConverter.cs
similarity index 100%
rename from src/Umbraco.Core/Manifest/DashboardAccessRuleConverter.cs
rename to src/Umbraco.Infrastructure/Manifest/DashboardAccessRuleConverter.cs
diff --git a/src/Umbraco.Core/Manifest/DataEditorConverter.cs b/src/Umbraco.Infrastructure/Manifest/DataEditorConverter.cs
similarity index 100%
rename from src/Umbraco.Core/Manifest/DataEditorConverter.cs
rename to src/Umbraco.Infrastructure/Manifest/DataEditorConverter.cs
diff --git a/src/Umbraco.Core/Manifest/ManifestParser.cs b/src/Umbraco.Infrastructure/Manifest/ManifestParser.cs
similarity index 100%
rename from src/Umbraco.Core/Manifest/ManifestParser.cs
rename to src/Umbraco.Infrastructure/Manifest/ManifestParser.cs
diff --git a/src/Umbraco.Core/Manifest/ValueValidatorConverter.cs b/src/Umbraco.Infrastructure/Manifest/ValueValidatorConverter.cs
similarity index 100%
rename from src/Umbraco.Core/Manifest/ValueValidatorConverter.cs
rename to src/Umbraco.Infrastructure/Manifest/ValueValidatorConverter.cs
diff --git a/src/Umbraco.Core/Migrations/Expressions/Alter/AlterBuilder.cs b/src/Umbraco.Infrastructure/Migrations/Expressions/Alter/AlterBuilder.cs
similarity index 100%
rename from src/Umbraco.Core/Migrations/Expressions/Alter/AlterBuilder.cs
rename to src/Umbraco.Infrastructure/Migrations/Expressions/Alter/AlterBuilder.cs
diff --git a/src/Umbraco.Core/Migrations/Expressions/Alter/Expressions/AlterColumnExpression.cs b/src/Umbraco.Infrastructure/Migrations/Expressions/Alter/Expressions/AlterColumnExpression.cs
similarity index 100%
rename from src/Umbraco.Core/Migrations/Expressions/Alter/Expressions/AlterColumnExpression.cs
rename to src/Umbraco.Infrastructure/Migrations/Expressions/Alter/Expressions/AlterColumnExpression.cs
diff --git a/src/Umbraco.Core/Migrations/Expressions/Alter/Expressions/AlterDefaultConstraintExpression.cs b/src/Umbraco.Infrastructure/Migrations/Expressions/Alter/Expressions/AlterDefaultConstraintExpression.cs
similarity index 100%
rename from src/Umbraco.Core/Migrations/Expressions/Alter/Expressions/AlterDefaultConstraintExpression.cs
rename to src/Umbraco.Infrastructure/Migrations/Expressions/Alter/Expressions/AlterDefaultConstraintExpression.cs
diff --git a/src/Umbraco.Core/Migrations/Expressions/Alter/Expressions/AlterTableExpression.cs b/src/Umbraco.Infrastructure/Migrations/Expressions/Alter/Expressions/AlterTableExpression.cs
similarity index 100%
rename from src/Umbraco.Core/Migrations/Expressions/Alter/Expressions/AlterTableExpression.cs
rename to src/Umbraco.Infrastructure/Migrations/Expressions/Alter/Expressions/AlterTableExpression.cs
diff --git a/src/Umbraco.Core/Migrations/Expressions/Alter/IAlterBuilder.cs b/src/Umbraco.Infrastructure/Migrations/Expressions/Alter/IAlterBuilder.cs
similarity index 100%
rename from src/Umbraco.Core/Migrations/Expressions/Alter/IAlterBuilder.cs
rename to src/Umbraco.Infrastructure/Migrations/Expressions/Alter/IAlterBuilder.cs
diff --git a/src/Umbraco.Core/Migrations/Expressions/Alter/Table/AlterTableBuilder.cs b/src/Umbraco.Infrastructure/Migrations/Expressions/Alter/Table/AlterTableBuilder.cs
similarity index 100%
rename from src/Umbraco.Core/Migrations/Expressions/Alter/Table/AlterTableBuilder.cs
rename to src/Umbraco.Infrastructure/Migrations/Expressions/Alter/Table/AlterTableBuilder.cs
diff --git a/src/Umbraco.Core/Migrations/Expressions/Alter/Table/IAlterTableBuilder.cs b/src/Umbraco.Infrastructure/Migrations/Expressions/Alter/Table/IAlterTableBuilder.cs
similarity index 100%
rename from src/Umbraco.Core/Migrations/Expressions/Alter/Table/IAlterTableBuilder.cs
rename to src/Umbraco.Infrastructure/Migrations/Expressions/Alter/Table/IAlterTableBuilder.cs
diff --git a/src/Umbraco.Core/Migrations/Expressions/Alter/Table/IAlterTableColumnOptionBuilder.cs b/src/Umbraco.Infrastructure/Migrations/Expressions/Alter/Table/IAlterTableColumnOptionBuilder.cs
similarity index 100%
rename from src/Umbraco.Core/Migrations/Expressions/Alter/Table/IAlterTableColumnOptionBuilder.cs
rename to src/Umbraco.Infrastructure/Migrations/Expressions/Alter/Table/IAlterTableColumnOptionBuilder.cs
diff --git a/src/Umbraco.Core/Migrations/Expressions/Alter/Table/IAlterTableColumnOptionForeignKeyCascadeBuilder.cs b/src/Umbraco.Infrastructure/Migrations/Expressions/Alter/Table/IAlterTableColumnOptionForeignKeyCascadeBuilder.cs
similarity index 100%
rename from src/Umbraco.Core/Migrations/Expressions/Alter/Table/IAlterTableColumnOptionForeignKeyCascadeBuilder.cs
rename to src/Umbraco.Infrastructure/Migrations/Expressions/Alter/Table/IAlterTableColumnOptionForeignKeyCascadeBuilder.cs
diff --git a/src/Umbraco.Core/Migrations/Expressions/Alter/Table/IAlterTableColumnTypeBuilder.cs b/src/Umbraco.Infrastructure/Migrations/Expressions/Alter/Table/IAlterTableColumnTypeBuilder.cs
similarity index 100%
rename from src/Umbraco.Core/Migrations/Expressions/Alter/Table/IAlterTableColumnTypeBuilder.cs
rename to src/Umbraco.Infrastructure/Migrations/Expressions/Alter/Table/IAlterTableColumnTypeBuilder.cs
diff --git a/src/Umbraco.Core/Migrations/Expressions/Common/ExecutableBuilder.cs b/src/Umbraco.Infrastructure/Migrations/Expressions/Common/ExecutableBuilder.cs
similarity index 100%
rename from src/Umbraco.Core/Migrations/Expressions/Common/ExecutableBuilder.cs
rename to src/Umbraco.Infrastructure/Migrations/Expressions/Common/ExecutableBuilder.cs
diff --git a/src/Umbraco.Core/Migrations/Expressions/Common/Expressions/CreateColumnExpression.cs b/src/Umbraco.Infrastructure/Migrations/Expressions/Common/Expressions/CreateColumnExpression.cs
similarity index 100%
rename from src/Umbraco.Core/Migrations/Expressions/Common/Expressions/CreateColumnExpression.cs
rename to src/Umbraco.Infrastructure/Migrations/Expressions/Common/Expressions/CreateColumnExpression.cs
diff --git a/src/Umbraco.Core/Migrations/Expressions/Common/Expressions/CreateForeignKeyExpression.cs b/src/Umbraco.Infrastructure/Migrations/Expressions/Common/Expressions/CreateForeignKeyExpression.cs
similarity index 100%
rename from src/Umbraco.Core/Migrations/Expressions/Common/Expressions/CreateForeignKeyExpression.cs
rename to src/Umbraco.Infrastructure/Migrations/Expressions/Common/Expressions/CreateForeignKeyExpression.cs
diff --git a/src/Umbraco.Core/Migrations/Expressions/Common/Expressions/CreateIndexExpression.cs b/src/Umbraco.Infrastructure/Migrations/Expressions/Common/Expressions/CreateIndexExpression.cs
similarity index 100%
rename from src/Umbraco.Core/Migrations/Expressions/Common/Expressions/CreateIndexExpression.cs
rename to src/Umbraco.Infrastructure/Migrations/Expressions/Common/Expressions/CreateIndexExpression.cs
diff --git a/src/Umbraco.Core/Migrations/Expressions/Common/IColumnOptionBuilder.cs b/src/Umbraco.Infrastructure/Migrations/Expressions/Common/IColumnOptionBuilder.cs
similarity index 100%
rename from src/Umbraco.Core/Migrations/Expressions/Common/IColumnOptionBuilder.cs
rename to src/Umbraco.Infrastructure/Migrations/Expressions/Common/IColumnOptionBuilder.cs
diff --git a/src/Umbraco.Core/Migrations/Expressions/Common/IColumnTypeBuilder.cs b/src/Umbraco.Infrastructure/Migrations/Expressions/Common/IColumnTypeBuilder.cs
similarity index 100%
rename from src/Umbraco.Core/Migrations/Expressions/Common/IColumnTypeBuilder.cs
rename to src/Umbraco.Infrastructure/Migrations/Expressions/Common/IColumnTypeBuilder.cs
diff --git a/src/Umbraco.Core/Migrations/Expressions/Common/IExecutableBuilder.cs b/src/Umbraco.Infrastructure/Migrations/Expressions/Common/IExecutableBuilder.cs
similarity index 100%
rename from src/Umbraco.Core/Migrations/Expressions/Common/IExecutableBuilder.cs
rename to src/Umbraco.Infrastructure/Migrations/Expressions/Common/IExecutableBuilder.cs
diff --git a/src/Umbraco.Core/Migrations/Expressions/Common/IForeignKeyCascadeBuilder.cs b/src/Umbraco.Infrastructure/Migrations/Expressions/Common/IForeignKeyCascadeBuilder.cs
similarity index 100%
rename from src/Umbraco.Core/Migrations/Expressions/Common/IForeignKeyCascadeBuilder.cs
rename to src/Umbraco.Infrastructure/Migrations/Expressions/Common/IForeignKeyCascadeBuilder.cs
diff --git a/src/Umbraco.Core/Migrations/Expressions/Create/Column/CreateColumnBuilder.cs b/src/Umbraco.Infrastructure/Migrations/Expressions/Create/Column/CreateColumnBuilder.cs
similarity index 100%
rename from src/Umbraco.Core/Migrations/Expressions/Create/Column/CreateColumnBuilder.cs
rename to src/Umbraco.Infrastructure/Migrations/Expressions/Create/Column/CreateColumnBuilder.cs
diff --git a/src/Umbraco.Core/Migrations/Expressions/Create/Column/ICreateColumnOnTableBuilder.cs b/src/Umbraco.Infrastructure/Migrations/Expressions/Create/Column/ICreateColumnOnTableBuilder.cs
similarity index 100%
rename from src/Umbraco.Core/Migrations/Expressions/Create/Column/ICreateColumnOnTableBuilder.cs
rename to src/Umbraco.Infrastructure/Migrations/Expressions/Create/Column/ICreateColumnOnTableBuilder.cs
diff --git a/src/Umbraco.Core/Migrations/Expressions/Create/Column/ICreateColumnOptionBuilder.cs b/src/Umbraco.Infrastructure/Migrations/Expressions/Create/Column/ICreateColumnOptionBuilder.cs
similarity index 100%
rename from src/Umbraco.Core/Migrations/Expressions/Create/Column/ICreateColumnOptionBuilder.cs
rename to src/Umbraco.Infrastructure/Migrations/Expressions/Create/Column/ICreateColumnOptionBuilder.cs
diff --git a/src/Umbraco.Core/Migrations/Expressions/Create/Column/ICreateColumnOptionForeignKeyCascadeBuilder.cs b/src/Umbraco.Infrastructure/Migrations/Expressions/Create/Column/ICreateColumnOptionForeignKeyCascadeBuilder.cs
similarity index 100%
rename from src/Umbraco.Core/Migrations/Expressions/Create/Column/ICreateColumnOptionForeignKeyCascadeBuilder.cs
rename to src/Umbraco.Infrastructure/Migrations/Expressions/Create/Column/ICreateColumnOptionForeignKeyCascadeBuilder.cs
diff --git a/src/Umbraco.Core/Migrations/Expressions/Create/Column/ICreateColumnTypeBuilder.cs b/src/Umbraco.Infrastructure/Migrations/Expressions/Create/Column/ICreateColumnTypeBuilder.cs
similarity index 100%
rename from src/Umbraco.Core/Migrations/Expressions/Create/Column/ICreateColumnTypeBuilder.cs
rename to src/Umbraco.Infrastructure/Migrations/Expressions/Create/Column/ICreateColumnTypeBuilder.cs
diff --git a/src/Umbraco.Core/Migrations/Expressions/Create/Constraint/CreateConstraintBuilder.cs b/src/Umbraco.Infrastructure/Migrations/Expressions/Create/Constraint/CreateConstraintBuilder.cs
similarity index 100%
rename from src/Umbraco.Core/Migrations/Expressions/Create/Constraint/CreateConstraintBuilder.cs
rename to src/Umbraco.Infrastructure/Migrations/Expressions/Create/Constraint/CreateConstraintBuilder.cs
diff --git a/src/Umbraco.Core/Migrations/Expressions/Create/Constraint/ICreateConstraintColumnsBuilder.cs b/src/Umbraco.Infrastructure/Migrations/Expressions/Create/Constraint/ICreateConstraintColumnsBuilder.cs
similarity index 100%
rename from src/Umbraco.Core/Migrations/Expressions/Create/Constraint/ICreateConstraintColumnsBuilder.cs
rename to src/Umbraco.Infrastructure/Migrations/Expressions/Create/Constraint/ICreateConstraintColumnsBuilder.cs
diff --git a/src/Umbraco.Core/Migrations/Expressions/Create/Constraint/ICreateConstraintOnTableBuilder.cs b/src/Umbraco.Infrastructure/Migrations/Expressions/Create/Constraint/ICreateConstraintOnTableBuilder.cs
similarity index 100%
rename from src/Umbraco.Core/Migrations/Expressions/Create/Constraint/ICreateConstraintOnTableBuilder.cs
rename to src/Umbraco.Infrastructure/Migrations/Expressions/Create/Constraint/ICreateConstraintOnTableBuilder.cs
diff --git a/src/Umbraco.Core/Migrations/Expressions/Create/CreateBuilder.cs b/src/Umbraco.Infrastructure/Migrations/Expressions/Create/CreateBuilder.cs
similarity index 100%
rename from src/Umbraco.Core/Migrations/Expressions/Create/CreateBuilder.cs
rename to src/Umbraco.Infrastructure/Migrations/Expressions/Create/CreateBuilder.cs
diff --git a/src/Umbraco.Core/Migrations/Expressions/Create/Expressions/CreateConstraintExpression.cs b/src/Umbraco.Infrastructure/Migrations/Expressions/Create/Expressions/CreateConstraintExpression.cs
similarity index 100%
rename from src/Umbraco.Core/Migrations/Expressions/Create/Expressions/CreateConstraintExpression.cs
rename to src/Umbraco.Infrastructure/Migrations/Expressions/Create/Expressions/CreateConstraintExpression.cs
diff --git a/src/Umbraco.Core/Migrations/Expressions/Create/Expressions/CreateTableExpression.cs b/src/Umbraco.Infrastructure/Migrations/Expressions/Create/Expressions/CreateTableExpression.cs
similarity index 100%
rename from src/Umbraco.Core/Migrations/Expressions/Create/Expressions/CreateTableExpression.cs
rename to src/Umbraco.Infrastructure/Migrations/Expressions/Create/Expressions/CreateTableExpression.cs
diff --git a/src/Umbraco.Core/Migrations/Expressions/Create/ForeignKey/CreateForeignKeyBuilder.cs b/src/Umbraco.Infrastructure/Migrations/Expressions/Create/ForeignKey/CreateForeignKeyBuilder.cs
similarity index 100%
rename from src/Umbraco.Core/Migrations/Expressions/Create/ForeignKey/CreateForeignKeyBuilder.cs
rename to src/Umbraco.Infrastructure/Migrations/Expressions/Create/ForeignKey/CreateForeignKeyBuilder.cs
diff --git a/src/Umbraco.Core/Migrations/Expressions/Create/ForeignKey/ICreateForeignKeyCascadeBuilder.cs b/src/Umbraco.Infrastructure/Migrations/Expressions/Create/ForeignKey/ICreateForeignKeyCascadeBuilder.cs
similarity index 100%
rename from src/Umbraco.Core/Migrations/Expressions/Create/ForeignKey/ICreateForeignKeyCascadeBuilder.cs
rename to src/Umbraco.Infrastructure/Migrations/Expressions/Create/ForeignKey/ICreateForeignKeyCascadeBuilder.cs
diff --git a/src/Umbraco.Core/Migrations/Expressions/Create/ForeignKey/ICreateForeignKeyForeignColumnBuilder.cs b/src/Umbraco.Infrastructure/Migrations/Expressions/Create/ForeignKey/ICreateForeignKeyForeignColumnBuilder.cs
similarity index 100%
rename from src/Umbraco.Core/Migrations/Expressions/Create/ForeignKey/ICreateForeignKeyForeignColumnBuilder.cs
rename to src/Umbraco.Infrastructure/Migrations/Expressions/Create/ForeignKey/ICreateForeignKeyForeignColumnBuilder.cs
diff --git a/src/Umbraco.Core/Migrations/Expressions/Create/ForeignKey/ICreateForeignKeyFromTableBuilder.cs b/src/Umbraco.Infrastructure/Migrations/Expressions/Create/ForeignKey/ICreateForeignKeyFromTableBuilder.cs
similarity index 100%
rename from src/Umbraco.Core/Migrations/Expressions/Create/ForeignKey/ICreateForeignKeyFromTableBuilder.cs
rename to src/Umbraco.Infrastructure/Migrations/Expressions/Create/ForeignKey/ICreateForeignKeyFromTableBuilder.cs
diff --git a/src/Umbraco.Core/Migrations/Expressions/Create/ForeignKey/ICreateForeignKeyPrimaryColumnBuilder.cs b/src/Umbraco.Infrastructure/Migrations/Expressions/Create/ForeignKey/ICreateForeignKeyPrimaryColumnBuilder.cs
similarity index 100%
rename from src/Umbraco.Core/Migrations/Expressions/Create/ForeignKey/ICreateForeignKeyPrimaryColumnBuilder.cs
rename to src/Umbraco.Infrastructure/Migrations/Expressions/Create/ForeignKey/ICreateForeignKeyPrimaryColumnBuilder.cs
diff --git a/src/Umbraco.Core/Migrations/Expressions/Create/ForeignKey/ICreateForeignKeyToTableBuilder.cs b/src/Umbraco.Infrastructure/Migrations/Expressions/Create/ForeignKey/ICreateForeignKeyToTableBuilder.cs
similarity index 100%
rename from src/Umbraco.Core/Migrations/Expressions/Create/ForeignKey/ICreateForeignKeyToTableBuilder.cs
rename to src/Umbraco.Infrastructure/Migrations/Expressions/Create/ForeignKey/ICreateForeignKeyToTableBuilder.cs
diff --git a/src/Umbraco.Core/Migrations/Expressions/Create/ICreateBuilder.cs b/src/Umbraco.Infrastructure/Migrations/Expressions/Create/ICreateBuilder.cs
similarity index 100%
rename from src/Umbraco.Core/Migrations/Expressions/Create/ICreateBuilder.cs
rename to src/Umbraco.Infrastructure/Migrations/Expressions/Create/ICreateBuilder.cs
diff --git a/src/Umbraco.Core/Migrations/Expressions/Create/Index/CreateIndexBuilder.cs b/src/Umbraco.Infrastructure/Migrations/Expressions/Create/Index/CreateIndexBuilder.cs
similarity index 100%
rename from src/Umbraco.Core/Migrations/Expressions/Create/Index/CreateIndexBuilder.cs
rename to src/Umbraco.Infrastructure/Migrations/Expressions/Create/Index/CreateIndexBuilder.cs
diff --git a/src/Umbraco.Core/Migrations/Expressions/Create/Index/ICreateIndexColumnOptionsBuilder.cs b/src/Umbraco.Infrastructure/Migrations/Expressions/Create/Index/ICreateIndexColumnOptionsBuilder.cs
similarity index 100%
rename from src/Umbraco.Core/Migrations/Expressions/Create/Index/ICreateIndexColumnOptionsBuilder.cs
rename to src/Umbraco.Infrastructure/Migrations/Expressions/Create/Index/ICreateIndexColumnOptionsBuilder.cs
diff --git a/src/Umbraco.Core/Migrations/Expressions/Create/Index/ICreateIndexForTableBuilder.cs b/src/Umbraco.Infrastructure/Migrations/Expressions/Create/Index/ICreateIndexForTableBuilder.cs
similarity index 100%
rename from src/Umbraco.Core/Migrations/Expressions/Create/Index/ICreateIndexForTableBuilder.cs
rename to src/Umbraco.Infrastructure/Migrations/Expressions/Create/Index/ICreateIndexForTableBuilder.cs
diff --git a/src/Umbraco.Core/Migrations/Expressions/Create/Index/ICreateIndexOnColumnBuilder.cs b/src/Umbraco.Infrastructure/Migrations/Expressions/Create/Index/ICreateIndexOnColumnBuilder.cs
similarity index 100%
rename from src/Umbraco.Core/Migrations/Expressions/Create/Index/ICreateIndexOnColumnBuilder.cs
rename to src/Umbraco.Infrastructure/Migrations/Expressions/Create/Index/ICreateIndexOnColumnBuilder.cs
diff --git a/src/Umbraco.Core/Migrations/Expressions/Create/Index/ICreateIndexOptionsBuilder.cs b/src/Umbraco.Infrastructure/Migrations/Expressions/Create/Index/ICreateIndexOptionsBuilder.cs
similarity index 100%
rename from src/Umbraco.Core/Migrations/Expressions/Create/Index/ICreateIndexOptionsBuilder.cs
rename to src/Umbraco.Infrastructure/Migrations/Expressions/Create/Index/ICreateIndexOptionsBuilder.cs
diff --git a/src/Umbraco.Core/Migrations/Expressions/Create/KeysAndIndexes/CreateKeysAndIndexesBuilder.cs b/src/Umbraco.Infrastructure/Migrations/Expressions/Create/KeysAndIndexes/CreateKeysAndIndexesBuilder.cs
similarity index 100%
rename from src/Umbraco.Core/Migrations/Expressions/Create/KeysAndIndexes/CreateKeysAndIndexesBuilder.cs
rename to src/Umbraco.Infrastructure/Migrations/Expressions/Create/KeysAndIndexes/CreateKeysAndIndexesBuilder.cs
diff --git a/src/Umbraco.Core/Migrations/Expressions/Create/Table/CreateTableBuilder.cs b/src/Umbraco.Infrastructure/Migrations/Expressions/Create/Table/CreateTableBuilder.cs
similarity index 100%
rename from src/Umbraco.Core/Migrations/Expressions/Create/Table/CreateTableBuilder.cs
rename to src/Umbraco.Infrastructure/Migrations/Expressions/Create/Table/CreateTableBuilder.cs
diff --git a/src/Umbraco.Core/Migrations/Expressions/Create/Table/CreateTableOfDtoBuilder.cs b/src/Umbraco.Infrastructure/Migrations/Expressions/Create/Table/CreateTableOfDtoBuilder.cs
similarity index 100%
rename from src/Umbraco.Core/Migrations/Expressions/Create/Table/CreateTableOfDtoBuilder.cs
rename to src/Umbraco.Infrastructure/Migrations/Expressions/Create/Table/CreateTableOfDtoBuilder.cs
diff --git a/src/Umbraco.Core/Migrations/Expressions/Create/Table/ICreateTableColumnAsTypeBuilder.cs b/src/Umbraco.Infrastructure/Migrations/Expressions/Create/Table/ICreateTableColumnAsTypeBuilder.cs
similarity index 100%
rename from src/Umbraco.Core/Migrations/Expressions/Create/Table/ICreateTableColumnAsTypeBuilder.cs
rename to src/Umbraco.Infrastructure/Migrations/Expressions/Create/Table/ICreateTableColumnAsTypeBuilder.cs
diff --git a/src/Umbraco.Core/Migrations/Expressions/Create/Table/ICreateTableColumnOptionBuilder.cs b/src/Umbraco.Infrastructure/Migrations/Expressions/Create/Table/ICreateTableColumnOptionBuilder.cs
similarity index 100%
rename from src/Umbraco.Core/Migrations/Expressions/Create/Table/ICreateTableColumnOptionBuilder.cs
rename to src/Umbraco.Infrastructure/Migrations/Expressions/Create/Table/ICreateTableColumnOptionBuilder.cs
diff --git a/src/Umbraco.Core/Migrations/Expressions/Create/Table/ICreateTableColumnOptionForeignKeyCascadeBuilder.cs b/src/Umbraco.Infrastructure/Migrations/Expressions/Create/Table/ICreateTableColumnOptionForeignKeyCascadeBuilder.cs
similarity index 100%
rename from src/Umbraco.Core/Migrations/Expressions/Create/Table/ICreateTableColumnOptionForeignKeyCascadeBuilder.cs
rename to src/Umbraco.Infrastructure/Migrations/Expressions/Create/Table/ICreateTableColumnOptionForeignKeyCascadeBuilder.cs
diff --git a/src/Umbraco.Core/Migrations/Expressions/Create/Table/ICreateTableWithColumnBuilder.cs b/src/Umbraco.Infrastructure/Migrations/Expressions/Create/Table/ICreateTableWithColumnBuilder.cs
similarity index 100%
rename from src/Umbraco.Core/Migrations/Expressions/Create/Table/ICreateTableWithColumnBuilder.cs
rename to src/Umbraco.Infrastructure/Migrations/Expressions/Create/Table/ICreateTableWithColumnBuilder.cs
diff --git a/src/Umbraco.Core/Migrations/Expressions/Delete/Column/DeleteColumnBuilder.cs b/src/Umbraco.Infrastructure/Migrations/Expressions/Delete/Column/DeleteColumnBuilder.cs
similarity index 100%
rename from src/Umbraco.Core/Migrations/Expressions/Delete/Column/DeleteColumnBuilder.cs
rename to src/Umbraco.Infrastructure/Migrations/Expressions/Delete/Column/DeleteColumnBuilder.cs
diff --git a/src/Umbraco.Core/Migrations/Expressions/Delete/Column/IDeleteColumnBuilder.cs b/src/Umbraco.Infrastructure/Migrations/Expressions/Delete/Column/IDeleteColumnBuilder.cs
similarity index 100%
rename from src/Umbraco.Core/Migrations/Expressions/Delete/Column/IDeleteColumnBuilder.cs
rename to src/Umbraco.Infrastructure/Migrations/Expressions/Delete/Column/IDeleteColumnBuilder.cs
diff --git a/src/Umbraco.Core/Migrations/Expressions/Delete/Constraint/DeleteConstraintBuilder.cs b/src/Umbraco.Infrastructure/Migrations/Expressions/Delete/Constraint/DeleteConstraintBuilder.cs
similarity index 100%
rename from src/Umbraco.Core/Migrations/Expressions/Delete/Constraint/DeleteConstraintBuilder.cs
rename to src/Umbraco.Infrastructure/Migrations/Expressions/Delete/Constraint/DeleteConstraintBuilder.cs
diff --git a/src/Umbraco.Core/Migrations/Expressions/Delete/Constraint/IDeleteConstraintBuilder.cs b/src/Umbraco.Infrastructure/Migrations/Expressions/Delete/Constraint/IDeleteConstraintBuilder.cs
similarity index 100%
rename from src/Umbraco.Core/Migrations/Expressions/Delete/Constraint/IDeleteConstraintBuilder.cs
rename to src/Umbraco.Infrastructure/Migrations/Expressions/Delete/Constraint/IDeleteConstraintBuilder.cs
diff --git a/src/Umbraco.Core/Migrations/Expressions/Delete/Data/DeleteDataBuilder.cs b/src/Umbraco.Infrastructure/Migrations/Expressions/Delete/Data/DeleteDataBuilder.cs
similarity index 100%
rename from src/Umbraco.Core/Migrations/Expressions/Delete/Data/DeleteDataBuilder.cs
rename to src/Umbraco.Infrastructure/Migrations/Expressions/Delete/Data/DeleteDataBuilder.cs
diff --git a/src/Umbraco.Core/Migrations/Expressions/Delete/Data/IDeleteDataBuilder.cs b/src/Umbraco.Infrastructure/Migrations/Expressions/Delete/Data/IDeleteDataBuilder.cs
similarity index 100%
rename from src/Umbraco.Core/Migrations/Expressions/Delete/Data/IDeleteDataBuilder.cs
rename to src/Umbraco.Infrastructure/Migrations/Expressions/Delete/Data/IDeleteDataBuilder.cs
diff --git a/src/Umbraco.Core/Migrations/Expressions/Delete/DefaultConstraint/DeleteDefaultConstraintBuilder.cs b/src/Umbraco.Infrastructure/Migrations/Expressions/Delete/DefaultConstraint/DeleteDefaultConstraintBuilder.cs
similarity index 100%
rename from src/Umbraco.Core/Migrations/Expressions/Delete/DefaultConstraint/DeleteDefaultConstraintBuilder.cs
rename to src/Umbraco.Infrastructure/Migrations/Expressions/Delete/DefaultConstraint/DeleteDefaultConstraintBuilder.cs
diff --git a/src/Umbraco.Core/Migrations/Expressions/Delete/DefaultConstraint/IDeleteDefaultConstraintOnColumnBuilder.cs b/src/Umbraco.Infrastructure/Migrations/Expressions/Delete/DefaultConstraint/IDeleteDefaultConstraintOnColumnBuilder.cs
similarity index 100%
rename from src/Umbraco.Core/Migrations/Expressions/Delete/DefaultConstraint/IDeleteDefaultConstraintOnColumnBuilder.cs
rename to src/Umbraco.Infrastructure/Migrations/Expressions/Delete/DefaultConstraint/IDeleteDefaultConstraintOnColumnBuilder.cs
diff --git a/src/Umbraco.Core/Migrations/Expressions/Delete/DefaultConstraint/IDeleteDefaultConstraintOnTableBuilder.cs b/src/Umbraco.Infrastructure/Migrations/Expressions/Delete/DefaultConstraint/IDeleteDefaultConstraintOnTableBuilder.cs
similarity index 100%
rename from src/Umbraco.Core/Migrations/Expressions/Delete/DefaultConstraint/IDeleteDefaultConstraintOnTableBuilder.cs
rename to src/Umbraco.Infrastructure/Migrations/Expressions/Delete/DefaultConstraint/IDeleteDefaultConstraintOnTableBuilder.cs
diff --git a/src/Umbraco.Core/Migrations/Expressions/Delete/DeleteBuilder.cs b/src/Umbraco.Infrastructure/Migrations/Expressions/Delete/DeleteBuilder.cs
similarity index 100%
rename from src/Umbraco.Core/Migrations/Expressions/Delete/DeleteBuilder.cs
rename to src/Umbraco.Infrastructure/Migrations/Expressions/Delete/DeleteBuilder.cs
diff --git a/src/Umbraco.Core/Migrations/Expressions/Delete/Expressions/DeleteColumnExpression.cs b/src/Umbraco.Infrastructure/Migrations/Expressions/Delete/Expressions/DeleteColumnExpression.cs
similarity index 100%
rename from src/Umbraco.Core/Migrations/Expressions/Delete/Expressions/DeleteColumnExpression.cs
rename to src/Umbraco.Infrastructure/Migrations/Expressions/Delete/Expressions/DeleteColumnExpression.cs
diff --git a/src/Umbraco.Core/Migrations/Expressions/Delete/Expressions/DeleteConstraintExpression.cs b/src/Umbraco.Infrastructure/Migrations/Expressions/Delete/Expressions/DeleteConstraintExpression.cs
similarity index 100%
rename from src/Umbraco.Core/Migrations/Expressions/Delete/Expressions/DeleteConstraintExpression.cs
rename to src/Umbraco.Infrastructure/Migrations/Expressions/Delete/Expressions/DeleteConstraintExpression.cs
diff --git a/src/Umbraco.Core/Migrations/Expressions/Delete/Expressions/DeleteDataExpression.cs b/src/Umbraco.Infrastructure/Migrations/Expressions/Delete/Expressions/DeleteDataExpression.cs
similarity index 100%
rename from src/Umbraco.Core/Migrations/Expressions/Delete/Expressions/DeleteDataExpression.cs
rename to src/Umbraco.Infrastructure/Migrations/Expressions/Delete/Expressions/DeleteDataExpression.cs
diff --git a/src/Umbraco.Core/Migrations/Expressions/Delete/Expressions/DeleteDefaultConstraintExpression.cs b/src/Umbraco.Infrastructure/Migrations/Expressions/Delete/Expressions/DeleteDefaultConstraintExpression.cs
similarity index 100%
rename from src/Umbraco.Core/Migrations/Expressions/Delete/Expressions/DeleteDefaultConstraintExpression.cs
rename to src/Umbraco.Infrastructure/Migrations/Expressions/Delete/Expressions/DeleteDefaultConstraintExpression.cs
diff --git a/src/Umbraco.Core/Migrations/Expressions/Delete/Expressions/DeleteForeignKeyExpression.cs b/src/Umbraco.Infrastructure/Migrations/Expressions/Delete/Expressions/DeleteForeignKeyExpression.cs
similarity index 100%
rename from src/Umbraco.Core/Migrations/Expressions/Delete/Expressions/DeleteForeignKeyExpression.cs
rename to src/Umbraco.Infrastructure/Migrations/Expressions/Delete/Expressions/DeleteForeignKeyExpression.cs
diff --git a/src/Umbraco.Core/Migrations/Expressions/Delete/Expressions/DeleteIndexExpression.cs b/src/Umbraco.Infrastructure/Migrations/Expressions/Delete/Expressions/DeleteIndexExpression.cs
similarity index 100%
rename from src/Umbraco.Core/Migrations/Expressions/Delete/Expressions/DeleteIndexExpression.cs
rename to src/Umbraco.Infrastructure/Migrations/Expressions/Delete/Expressions/DeleteIndexExpression.cs
diff --git a/src/Umbraco.Core/Migrations/Expressions/Delete/Expressions/DeleteTableExpression.cs b/src/Umbraco.Infrastructure/Migrations/Expressions/Delete/Expressions/DeleteTableExpression.cs
similarity index 100%
rename from src/Umbraco.Core/Migrations/Expressions/Delete/Expressions/DeleteTableExpression.cs
rename to src/Umbraco.Infrastructure/Migrations/Expressions/Delete/Expressions/DeleteTableExpression.cs
diff --git a/src/Umbraco.Core/Migrations/Expressions/Delete/ForeignKey/DeleteForeignKeyBuilder.cs b/src/Umbraco.Infrastructure/Migrations/Expressions/Delete/ForeignKey/DeleteForeignKeyBuilder.cs
similarity index 100%
rename from src/Umbraco.Core/Migrations/Expressions/Delete/ForeignKey/DeleteForeignKeyBuilder.cs
rename to src/Umbraco.Infrastructure/Migrations/Expressions/Delete/ForeignKey/DeleteForeignKeyBuilder.cs
diff --git a/src/Umbraco.Core/Migrations/Expressions/Delete/ForeignKey/IDeleteForeignKeyForeignColumnBuilder.cs b/src/Umbraco.Infrastructure/Migrations/Expressions/Delete/ForeignKey/IDeleteForeignKeyForeignColumnBuilder.cs
similarity index 100%
rename from src/Umbraco.Core/Migrations/Expressions/Delete/ForeignKey/IDeleteForeignKeyForeignColumnBuilder.cs
rename to src/Umbraco.Infrastructure/Migrations/Expressions/Delete/ForeignKey/IDeleteForeignKeyForeignColumnBuilder.cs
diff --git a/src/Umbraco.Core/Migrations/Expressions/Delete/ForeignKey/IDeleteForeignKeyFromTableBuilder.cs b/src/Umbraco.Infrastructure/Migrations/Expressions/Delete/ForeignKey/IDeleteForeignKeyFromTableBuilder.cs
similarity index 100%
rename from src/Umbraco.Core/Migrations/Expressions/Delete/ForeignKey/IDeleteForeignKeyFromTableBuilder.cs
rename to src/Umbraco.Infrastructure/Migrations/Expressions/Delete/ForeignKey/IDeleteForeignKeyFromTableBuilder.cs
diff --git a/src/Umbraco.Core/Migrations/Expressions/Delete/ForeignKey/IDeleteForeignKeyOnTableBuilder.cs b/src/Umbraco.Infrastructure/Migrations/Expressions/Delete/ForeignKey/IDeleteForeignKeyOnTableBuilder.cs
similarity index 100%
rename from src/Umbraco.Core/Migrations/Expressions/Delete/ForeignKey/IDeleteForeignKeyOnTableBuilder.cs
rename to src/Umbraco.Infrastructure/Migrations/Expressions/Delete/ForeignKey/IDeleteForeignKeyOnTableBuilder.cs
diff --git a/src/Umbraco.Core/Migrations/Expressions/Delete/ForeignKey/IDeleteForeignKeyPrimaryColumnBuilder.cs b/src/Umbraco.Infrastructure/Migrations/Expressions/Delete/ForeignKey/IDeleteForeignKeyPrimaryColumnBuilder.cs
similarity index 100%
rename from src/Umbraco.Core/Migrations/Expressions/Delete/ForeignKey/IDeleteForeignKeyPrimaryColumnBuilder.cs
rename to src/Umbraco.Infrastructure/Migrations/Expressions/Delete/ForeignKey/IDeleteForeignKeyPrimaryColumnBuilder.cs
diff --git a/src/Umbraco.Core/Migrations/Expressions/Delete/ForeignKey/IDeleteForeignKeyToTableBuilder.cs b/src/Umbraco.Infrastructure/Migrations/Expressions/Delete/ForeignKey/IDeleteForeignKeyToTableBuilder.cs
similarity index 100%
rename from src/Umbraco.Core/Migrations/Expressions/Delete/ForeignKey/IDeleteForeignKeyToTableBuilder.cs
rename to src/Umbraco.Infrastructure/Migrations/Expressions/Delete/ForeignKey/IDeleteForeignKeyToTableBuilder.cs
diff --git a/src/Umbraco.Core/Migrations/Expressions/Delete/IDeleteBuilder.cs b/src/Umbraco.Infrastructure/Migrations/Expressions/Delete/IDeleteBuilder.cs
similarity index 100%
rename from src/Umbraco.Core/Migrations/Expressions/Delete/IDeleteBuilder.cs
rename to src/Umbraco.Infrastructure/Migrations/Expressions/Delete/IDeleteBuilder.cs
diff --git a/src/Umbraco.Core/Migrations/Expressions/Delete/Index/DeleteIndexBuilder.cs b/src/Umbraco.Infrastructure/Migrations/Expressions/Delete/Index/DeleteIndexBuilder.cs
similarity index 100%
rename from src/Umbraco.Core/Migrations/Expressions/Delete/Index/DeleteIndexBuilder.cs
rename to src/Umbraco.Infrastructure/Migrations/Expressions/Delete/Index/DeleteIndexBuilder.cs
diff --git a/src/Umbraco.Core/Migrations/Expressions/Delete/Index/IDeleteIndexForTableBuilder.cs b/src/Umbraco.Infrastructure/Migrations/Expressions/Delete/Index/IDeleteIndexForTableBuilder.cs
similarity index 100%
rename from src/Umbraco.Core/Migrations/Expressions/Delete/Index/IDeleteIndexForTableBuilder.cs
rename to src/Umbraco.Infrastructure/Migrations/Expressions/Delete/Index/IDeleteIndexForTableBuilder.cs
diff --git a/src/Umbraco.Core/Migrations/Expressions/Delete/Index/IDeleteIndexOnColumnBuilder.cs b/src/Umbraco.Infrastructure/Migrations/Expressions/Delete/Index/IDeleteIndexOnColumnBuilder.cs
similarity index 100%
rename from src/Umbraco.Core/Migrations/Expressions/Delete/Index/IDeleteIndexOnColumnBuilder.cs
rename to src/Umbraco.Infrastructure/Migrations/Expressions/Delete/Index/IDeleteIndexOnColumnBuilder.cs
diff --git a/src/Umbraco.Core/Migrations/Expressions/Delete/KeysAndIndexes/DeleteKeysAndIndexesBuilder.cs b/src/Umbraco.Infrastructure/Migrations/Expressions/Delete/KeysAndIndexes/DeleteKeysAndIndexesBuilder.cs
similarity index 100%
rename from src/Umbraco.Core/Migrations/Expressions/Delete/KeysAndIndexes/DeleteKeysAndIndexesBuilder.cs
rename to src/Umbraco.Infrastructure/Migrations/Expressions/Delete/KeysAndIndexes/DeleteKeysAndIndexesBuilder.cs
diff --git a/src/Umbraco.Core/Migrations/Expressions/Execute/ExecuteBuilder.cs b/src/Umbraco.Infrastructure/Migrations/Expressions/Execute/ExecuteBuilder.cs
similarity index 100%
rename from src/Umbraco.Core/Migrations/Expressions/Execute/ExecuteBuilder.cs
rename to src/Umbraco.Infrastructure/Migrations/Expressions/Execute/ExecuteBuilder.cs
diff --git a/src/Umbraco.Core/Migrations/Expressions/Execute/Expressions/ExecuteSqlStatementExpression.cs b/src/Umbraco.Infrastructure/Migrations/Expressions/Execute/Expressions/ExecuteSqlStatementExpression.cs
similarity index 100%
rename from src/Umbraco.Core/Migrations/Expressions/Execute/Expressions/ExecuteSqlStatementExpression.cs
rename to src/Umbraco.Infrastructure/Migrations/Expressions/Execute/Expressions/ExecuteSqlStatementExpression.cs
diff --git a/src/Umbraco.Core/Migrations/Expressions/Execute/IExecuteBuilder.cs b/src/Umbraco.Infrastructure/Migrations/Expressions/Execute/IExecuteBuilder.cs
similarity index 100%
rename from src/Umbraco.Core/Migrations/Expressions/Execute/IExecuteBuilder.cs
rename to src/Umbraco.Infrastructure/Migrations/Expressions/Execute/IExecuteBuilder.cs
diff --git a/src/Umbraco.Core/Migrations/Expressions/ExpressionBuilderBase.cs b/src/Umbraco.Infrastructure/Migrations/Expressions/ExpressionBuilderBase.cs
similarity index 100%
rename from src/Umbraco.Core/Migrations/Expressions/ExpressionBuilderBase.cs
rename to src/Umbraco.Infrastructure/Migrations/Expressions/ExpressionBuilderBase.cs
diff --git a/src/Umbraco.Core/Migrations/Expressions/ExpressionBuilderBaseOfNext.cs b/src/Umbraco.Infrastructure/Migrations/Expressions/ExpressionBuilderBaseOfNext.cs
similarity index 100%
rename from src/Umbraco.Core/Migrations/Expressions/ExpressionBuilderBaseOfNext.cs
rename to src/Umbraco.Infrastructure/Migrations/Expressions/ExpressionBuilderBaseOfNext.cs
diff --git a/src/Umbraco.Core/Migrations/Expressions/IFluentBuilder.cs b/src/Umbraco.Infrastructure/Migrations/Expressions/IFluentBuilder.cs
similarity index 100%
rename from src/Umbraco.Core/Migrations/Expressions/IFluentBuilder.cs
rename to src/Umbraco.Infrastructure/Migrations/Expressions/IFluentBuilder.cs
diff --git a/src/Umbraco.Core/Migrations/Expressions/Insert/Expressions/InsertDataExpression.cs b/src/Umbraco.Infrastructure/Migrations/Expressions/Insert/Expressions/InsertDataExpression.cs
similarity index 100%
rename from src/Umbraco.Core/Migrations/Expressions/Insert/Expressions/InsertDataExpression.cs
rename to src/Umbraco.Infrastructure/Migrations/Expressions/Insert/Expressions/InsertDataExpression.cs
diff --git a/src/Umbraco.Core/Migrations/Expressions/Insert/IInsertBuilder.cs b/src/Umbraco.Infrastructure/Migrations/Expressions/Insert/IInsertBuilder.cs
similarity index 100%
rename from src/Umbraco.Core/Migrations/Expressions/Insert/IInsertBuilder.cs
rename to src/Umbraco.Infrastructure/Migrations/Expressions/Insert/IInsertBuilder.cs
diff --git a/src/Umbraco.Core/Migrations/Expressions/Insert/IInsertIntoBuilder.cs b/src/Umbraco.Infrastructure/Migrations/Expressions/Insert/IInsertIntoBuilder.cs
similarity index 100%
rename from src/Umbraco.Core/Migrations/Expressions/Insert/IInsertIntoBuilder.cs
rename to src/Umbraco.Infrastructure/Migrations/Expressions/Insert/IInsertIntoBuilder.cs
diff --git a/src/Umbraco.Core/Migrations/Expressions/Insert/InsertBuilder.cs b/src/Umbraco.Infrastructure/Migrations/Expressions/Insert/InsertBuilder.cs
similarity index 100%
rename from src/Umbraco.Core/Migrations/Expressions/Insert/InsertBuilder.cs
rename to src/Umbraco.Infrastructure/Migrations/Expressions/Insert/InsertBuilder.cs
diff --git a/src/Umbraco.Core/Migrations/Expressions/Insert/InsertIntoBuilder.cs b/src/Umbraco.Infrastructure/Migrations/Expressions/Insert/InsertIntoBuilder.cs
similarity index 100%
rename from src/Umbraco.Core/Migrations/Expressions/Insert/InsertIntoBuilder.cs
rename to src/Umbraco.Infrastructure/Migrations/Expressions/Insert/InsertIntoBuilder.cs
diff --git a/src/Umbraco.Core/Migrations/Expressions/Rename/Column/IRenameColumnBuilder.cs b/src/Umbraco.Infrastructure/Migrations/Expressions/Rename/Column/IRenameColumnBuilder.cs
similarity index 100%
rename from src/Umbraco.Core/Migrations/Expressions/Rename/Column/IRenameColumnBuilder.cs
rename to src/Umbraco.Infrastructure/Migrations/Expressions/Rename/Column/IRenameColumnBuilder.cs
diff --git a/src/Umbraco.Core/Migrations/Expressions/Rename/Column/IRenameColumnToBuilder.cs b/src/Umbraco.Infrastructure/Migrations/Expressions/Rename/Column/IRenameColumnToBuilder.cs
similarity index 100%
rename from src/Umbraco.Core/Migrations/Expressions/Rename/Column/IRenameColumnToBuilder.cs
rename to src/Umbraco.Infrastructure/Migrations/Expressions/Rename/Column/IRenameColumnToBuilder.cs
diff --git a/src/Umbraco.Core/Migrations/Expressions/Rename/Column/RenameColumnBuilder.cs b/src/Umbraco.Infrastructure/Migrations/Expressions/Rename/Column/RenameColumnBuilder.cs
similarity index 100%
rename from src/Umbraco.Core/Migrations/Expressions/Rename/Column/RenameColumnBuilder.cs
rename to src/Umbraco.Infrastructure/Migrations/Expressions/Rename/Column/RenameColumnBuilder.cs
diff --git a/src/Umbraco.Core/Migrations/Expressions/Rename/Expressions/RenameColumnExpression.cs b/src/Umbraco.Infrastructure/Migrations/Expressions/Rename/Expressions/RenameColumnExpression.cs
similarity index 100%
rename from src/Umbraco.Core/Migrations/Expressions/Rename/Expressions/RenameColumnExpression.cs
rename to src/Umbraco.Infrastructure/Migrations/Expressions/Rename/Expressions/RenameColumnExpression.cs
diff --git a/src/Umbraco.Core/Migrations/Expressions/Rename/Expressions/RenameTableExpression.cs b/src/Umbraco.Infrastructure/Migrations/Expressions/Rename/Expressions/RenameTableExpression.cs
similarity index 100%
rename from src/Umbraco.Core/Migrations/Expressions/Rename/Expressions/RenameTableExpression.cs
rename to src/Umbraco.Infrastructure/Migrations/Expressions/Rename/Expressions/RenameTableExpression.cs
diff --git a/src/Umbraco.Core/Migrations/Expressions/Rename/IRenameBuilder.cs b/src/Umbraco.Infrastructure/Migrations/Expressions/Rename/IRenameBuilder.cs
similarity index 100%
rename from src/Umbraco.Core/Migrations/Expressions/Rename/IRenameBuilder.cs
rename to src/Umbraco.Infrastructure/Migrations/Expressions/Rename/IRenameBuilder.cs
diff --git a/src/Umbraco.Core/Migrations/Expressions/Rename/RenameBuilder.cs b/src/Umbraco.Infrastructure/Migrations/Expressions/Rename/RenameBuilder.cs
similarity index 100%
rename from src/Umbraco.Core/Migrations/Expressions/Rename/RenameBuilder.cs
rename to src/Umbraco.Infrastructure/Migrations/Expressions/Rename/RenameBuilder.cs
diff --git a/src/Umbraco.Core/Migrations/Expressions/Rename/Table/IRenameTableBuilder.cs b/src/Umbraco.Infrastructure/Migrations/Expressions/Rename/Table/IRenameTableBuilder.cs
similarity index 100%
rename from src/Umbraco.Core/Migrations/Expressions/Rename/Table/IRenameTableBuilder.cs
rename to src/Umbraco.Infrastructure/Migrations/Expressions/Rename/Table/IRenameTableBuilder.cs
diff --git a/src/Umbraco.Core/Migrations/Expressions/Rename/Table/RenameTableBuilder.cs b/src/Umbraco.Infrastructure/Migrations/Expressions/Rename/Table/RenameTableBuilder.cs
similarity index 100%
rename from src/Umbraco.Core/Migrations/Expressions/Rename/Table/RenameTableBuilder.cs
rename to src/Umbraco.Infrastructure/Migrations/Expressions/Rename/Table/RenameTableBuilder.cs
diff --git a/src/Umbraco.Core/Migrations/Expressions/Update/Expressions/UpdateDataExpression.cs b/src/Umbraco.Infrastructure/Migrations/Expressions/Update/Expressions/UpdateDataExpression.cs
similarity index 100%
rename from src/Umbraco.Core/Migrations/Expressions/Update/Expressions/UpdateDataExpression.cs
rename to src/Umbraco.Infrastructure/Migrations/Expressions/Update/Expressions/UpdateDataExpression.cs
diff --git a/src/Umbraco.Core/Migrations/Expressions/Update/IUpdateBuilder.cs b/src/Umbraco.Infrastructure/Migrations/Expressions/Update/IUpdateBuilder.cs
similarity index 100%
rename from src/Umbraco.Core/Migrations/Expressions/Update/IUpdateBuilder.cs
rename to src/Umbraco.Infrastructure/Migrations/Expressions/Update/IUpdateBuilder.cs
diff --git a/src/Umbraco.Core/Migrations/Expressions/Update/IUpdateTableBuilder.cs b/src/Umbraco.Infrastructure/Migrations/Expressions/Update/IUpdateTableBuilder.cs
similarity index 100%
rename from src/Umbraco.Core/Migrations/Expressions/Update/IUpdateTableBuilder.cs
rename to src/Umbraco.Infrastructure/Migrations/Expressions/Update/IUpdateTableBuilder.cs
diff --git a/src/Umbraco.Core/Migrations/Expressions/Update/IUpdateWhereBuilder.cs b/src/Umbraco.Infrastructure/Migrations/Expressions/Update/IUpdateWhereBuilder.cs
similarity index 100%
rename from src/Umbraco.Core/Migrations/Expressions/Update/IUpdateWhereBuilder.cs
rename to src/Umbraco.Infrastructure/Migrations/Expressions/Update/IUpdateWhereBuilder.cs
diff --git a/src/Umbraco.Core/Migrations/Expressions/Update/UpdateBuilder.cs b/src/Umbraco.Infrastructure/Migrations/Expressions/Update/UpdateBuilder.cs
similarity index 100%
rename from src/Umbraco.Core/Migrations/Expressions/Update/UpdateBuilder.cs
rename to src/Umbraco.Infrastructure/Migrations/Expressions/Update/UpdateBuilder.cs
diff --git a/src/Umbraco.Core/Migrations/Expressions/Update/UpdateDataBuilder.cs b/src/Umbraco.Infrastructure/Migrations/Expressions/Update/UpdateDataBuilder.cs
similarity index 100%
rename from src/Umbraco.Core/Migrations/Expressions/Update/UpdateDataBuilder.cs
rename to src/Umbraco.Infrastructure/Migrations/Expressions/Update/UpdateDataBuilder.cs
diff --git a/src/Umbraco.Core/Migrations/IMigrationBuilder.cs b/src/Umbraco.Infrastructure/Migrations/IMigrationBuilder.cs
similarity index 100%
rename from src/Umbraco.Core/Migrations/IMigrationBuilder.cs
rename to src/Umbraco.Infrastructure/Migrations/IMigrationBuilder.cs
diff --git a/src/Umbraco.Core/Migrations/IMigrationContext.cs b/src/Umbraco.Infrastructure/Migrations/IMigrationContext.cs
similarity index 100%
rename from src/Umbraco.Core/Migrations/IMigrationContext.cs
rename to src/Umbraco.Infrastructure/Migrations/IMigrationContext.cs
diff --git a/src/Umbraco.Core/Migrations/IMigrationExpression.cs b/src/Umbraco.Infrastructure/Migrations/IMigrationExpression.cs
similarity index 100%
rename from src/Umbraco.Core/Migrations/IMigrationExpression.cs
rename to src/Umbraco.Infrastructure/Migrations/IMigrationExpression.cs
diff --git a/src/Umbraco.Core/Migrations/Install/DatabaseBuilder.cs b/src/Umbraco.Infrastructure/Migrations/Install/DatabaseBuilder.cs
similarity index 98%
rename from src/Umbraco.Core/Migrations/Install/DatabaseBuilder.cs
rename to src/Umbraco.Infrastructure/Migrations/Install/DatabaseBuilder.cs
index 06d78d1318..8b1e6d741b 100644
--- a/src/Umbraco.Core/Migrations/Install/DatabaseBuilder.cs
+++ b/src/Umbraco.Infrastructure/Migrations/Install/DatabaseBuilder.cs
@@ -1,9 +1,7 @@
using System;
-using System.Data.SqlServerCe;
using System.IO;
using System.Linq;
using System.Xml.Linq;
-using Umbraco.Core.Composing;
using Umbraco.Core.Configuration;
using Umbraco.Core.IO;
using Umbraco.Core.Logging;
@@ -106,7 +104,7 @@ namespace Umbraco.Core.Migrations.Install
return DbConnectionExtensions.IsConnectionAvailable(connectionString, factory);
}
- internal bool HasSomeNonDefaultUser()
+ public bool HasSomeNonDefaultUser()
{
using (var scope = _scopeProvider.CreateScope())
{
@@ -143,7 +141,7 @@ namespace Umbraco.Core.Migrations.Install
ConfigureEmbeddedDatabaseConnection(_databaseFactory, _ioHelper, _logger);
}
- private static void ConfigureEmbeddedDatabaseConnection(IUmbracoDatabaseFactory factory, IIOHelper ioHelper, ILogger logger)
+ private void ConfigureEmbeddedDatabaseConnection(IUmbracoDatabaseFactory factory, IIOHelper ioHelper, ILogger logger)
{
SaveConnectionString(EmbeddedDatabaseConnectionString, Constants.DbProviderNames.SqlCe, ioHelper, logger);
@@ -153,8 +151,7 @@ namespace Umbraco.Core.Migrations.Install
// this should probably be in a "using (new SqlCeEngine)" clause but not sure
// of the side effects and it's been like this for quite some time now
- var engine = new SqlCeEngine(EmbeddedDatabaseConnectionString);
- engine.CreateDatabase();
+ _dbProviderFactoryCreator.CreateDatabase();
}
factory.Configure(EmbeddedDatabaseConnectionString, Constants.DbProviderNames.SqlCe);
@@ -366,7 +363,7 @@ namespace Umbraco.Core.Migrations.Install
/// This assumes that the database exists and the connection string is
/// configured and it is possible to connect to the database.
///
- internal DatabaseSchemaResult ValidateSchema()
+ public DatabaseSchemaResult ValidateSchema()
{
using (var scope = _scopeProvider.CreateScope())
{
@@ -385,7 +382,7 @@ namespace Umbraco.Core.Migrations.Install
return _databaseSchemaValidationResult;
var database = scope.Database;
- var dbSchema = new DatabaseSchemaCreator(database, _logger, _umbracoVersion);
+ var dbSchema = new DatabaseSchemaCreator(database, _logger, _umbracoVersion, _globalSettings);
_databaseSchemaValidationResult = dbSchema.ValidateSchema();
scope.Complete();
return _databaseSchemaValidationResult;
@@ -435,7 +432,7 @@ namespace Umbraco.Core.Migrations.Install
if (_runtime.Level == RuntimeLevel.Run)
throw new Exception("Umbraco is already configured!");
- var creator = new DatabaseSchemaCreator(database, _logger, _umbracoVersion);
+ var creator = new DatabaseSchemaCreator(database, _logger, _umbracoVersion, _globalSettings);
creator.InitializeDatabaseSchema();
message = message + "Installation completed!
";
diff --git a/src/Umbraco.Core/Migrations/Install/DatabaseDataCreator.cs b/src/Umbraco.Infrastructure/Migrations/Install/DatabaseDataCreator.cs
similarity index 99%
rename from src/Umbraco.Core/Migrations/Install/DatabaseDataCreator.cs
rename to src/Umbraco.Infrastructure/Migrations/Install/DatabaseDataCreator.cs
index 41aceb8a69..bd0b733623 100644
--- a/src/Umbraco.Core/Migrations/Install/DatabaseDataCreator.cs
+++ b/src/Umbraco.Infrastructure/Migrations/Install/DatabaseDataCreator.cs
@@ -16,12 +16,14 @@ namespace Umbraco.Core.Migrations.Install
private readonly IDatabase _database;
private readonly ILogger _logger;
private readonly IUmbracoVersion _umbracoVersion;
+ private readonly IGlobalSettings _globalSettings;
- public DatabaseDataCreator(IDatabase database, ILogger logger, IUmbracoVersion umbracoVersion)
+ public DatabaseDataCreator(IDatabase database, ILogger logger, IUmbracoVersion umbracoVersion, IGlobalSettings globalSettings)
{
_database = database;
_logger = logger;
_umbracoVersion = umbracoVersion;
+ _globalSettings = globalSettings;
}
///
@@ -336,7 +338,7 @@ namespace Umbraco.Core.Migrations.Install
{
// on install, initialize the umbraco migration plan with the final state
- var upgrader = new Upgrader(new UmbracoPlan(_umbracoVersion));
+ var upgrader = new Upgrader(new UmbracoPlan(_umbracoVersion, _globalSettings));
var stateValueKey = upgrader.StateValueKey;
var finalState = upgrader.Plan.FinalState;
diff --git a/src/Umbraco.Core/Migrations/Install/DatabaseSchemaCreator.cs b/src/Umbraco.Infrastructure/Migrations/Install/DatabaseSchemaCreator.cs
similarity index 98%
rename from src/Umbraco.Core/Migrations/Install/DatabaseSchemaCreator.cs
rename to src/Umbraco.Infrastructure/Migrations/Install/DatabaseSchemaCreator.cs
index 7181460eeb..8a79cca403 100644
--- a/src/Umbraco.Core/Migrations/Install/DatabaseSchemaCreator.cs
+++ b/src/Umbraco.Infrastructure/Migrations/Install/DatabaseSchemaCreator.cs
@@ -20,12 +20,14 @@ namespace Umbraco.Core.Migrations.Install
private readonly IUmbracoDatabase _database;
private readonly ILogger _logger;
private readonly IUmbracoVersion _umbracoVersion;
+ private readonly IGlobalSettings _globalSettings;
- public DatabaseSchemaCreator(IUmbracoDatabase database, ILogger logger, IUmbracoVersion umbracoVersion)
+ public DatabaseSchemaCreator(IUmbracoDatabase database, ILogger logger, IUmbracoVersion umbracoVersion, IGlobalSettings globalSettings)
{
_database = database;
_logger = logger;
_umbracoVersion = umbracoVersion;
+ _globalSettings = globalSettings;
}
private ISqlSyntaxProvider SqlSyntax => _database.SqlContext.SqlSyntax;
@@ -128,7 +130,7 @@ namespace Umbraco.Core.Migrations.Install
if (e.Cancel == false)
{
- var dataCreation = new DatabaseDataCreator(_database, _logger,_umbracoVersion);
+ var dataCreation = new DatabaseDataCreator(_database, _logger,_umbracoVersion, _globalSettings);
foreach (var table in OrderedTables)
CreateTable(false, table, dataCreation);
}
@@ -398,7 +400,7 @@ namespace Umbraco.Core.Migrations.Install
where T : new()
{
var tableType = typeof(T);
- CreateTable(overwrite, tableType, new DatabaseDataCreator(_database, _logger, _umbracoVersion));
+ CreateTable(overwrite, tableType, new DatabaseDataCreator(_database, _logger, _umbracoVersion, _globalSettings));
}
///
diff --git a/src/Umbraco.Core/Migrations/Install/DatabaseSchemaResult.cs b/src/Umbraco.Infrastructure/Migrations/Install/DatabaseSchemaResult.cs
similarity index 99%
rename from src/Umbraco.Core/Migrations/Install/DatabaseSchemaResult.cs
rename to src/Umbraco.Infrastructure/Migrations/Install/DatabaseSchemaResult.cs
index f21216fde3..e7b7b479ec 100644
--- a/src/Umbraco.Core/Migrations/Install/DatabaseSchemaResult.cs
+++ b/src/Umbraco.Infrastructure/Migrations/Install/DatabaseSchemaResult.cs
@@ -10,7 +10,7 @@ namespace Umbraco.Core.Migrations.Install
///
/// Represents ...
///
- internal class DatabaseSchemaResult
+ public class DatabaseSchemaResult
{
public DatabaseSchemaResult(ISqlSyntaxProvider sqlSyntax)
{
diff --git a/src/Umbraco.Core/Migrations/MergeBuilder.cs b/src/Umbraco.Infrastructure/Migrations/MergeBuilder.cs
similarity index 100%
rename from src/Umbraco.Core/Migrations/MergeBuilder.cs
rename to src/Umbraco.Infrastructure/Migrations/MergeBuilder.cs
diff --git a/src/Umbraco.Core/Migrations/MigrationBase.cs b/src/Umbraco.Infrastructure/Migrations/MigrationBase.cs
similarity index 100%
rename from src/Umbraco.Core/Migrations/MigrationBase.cs
rename to src/Umbraco.Infrastructure/Migrations/MigrationBase.cs
diff --git a/src/Umbraco.Core/Migrations/MigrationBase_Extra.cs b/src/Umbraco.Infrastructure/Migrations/MigrationBase_Extra.cs
similarity index 100%
rename from src/Umbraco.Core/Migrations/MigrationBase_Extra.cs
rename to src/Umbraco.Infrastructure/Migrations/MigrationBase_Extra.cs
diff --git a/src/Umbraco.Core/Migrations/MigrationBuilder.cs b/src/Umbraco.Infrastructure/Migrations/MigrationBuilder.cs
similarity index 100%
rename from src/Umbraco.Core/Migrations/MigrationBuilder.cs
rename to src/Umbraco.Infrastructure/Migrations/MigrationBuilder.cs
diff --git a/src/Umbraco.Core/Migrations/MigrationContext.cs b/src/Umbraco.Infrastructure/Migrations/MigrationContext.cs
similarity index 100%
rename from src/Umbraco.Core/Migrations/MigrationContext.cs
rename to src/Umbraco.Infrastructure/Migrations/MigrationContext.cs
diff --git a/src/Umbraco.Core/Migrations/MigrationExpressionBase.cs b/src/Umbraco.Infrastructure/Migrations/MigrationExpressionBase.cs
similarity index 100%
rename from src/Umbraco.Core/Migrations/MigrationExpressionBase.cs
rename to src/Umbraco.Infrastructure/Migrations/MigrationExpressionBase.cs
diff --git a/src/Umbraco.Core/Migrations/MigrationPlan.cs b/src/Umbraco.Infrastructure/Migrations/MigrationPlan.cs
similarity index 100%
rename from src/Umbraco.Core/Migrations/MigrationPlan.cs
rename to src/Umbraco.Infrastructure/Migrations/MigrationPlan.cs
diff --git a/src/Umbraco.Core/Migrations/PostMigrations/IPublishedSnapshotRebuilder.cs b/src/Umbraco.Infrastructure/Migrations/PostMigrations/IPublishedSnapshotRebuilder.cs
similarity index 100%
rename from src/Umbraco.Core/Migrations/PostMigrations/IPublishedSnapshotRebuilder.cs
rename to src/Umbraco.Infrastructure/Migrations/PostMigrations/IPublishedSnapshotRebuilder.cs
diff --git a/src/Umbraco.Core/Migrations/PostMigrations/PublishedSnapshotRebuilder.cs b/src/Umbraco.Infrastructure/Migrations/PostMigrations/PublishedSnapshotRebuilder.cs
similarity index 100%
rename from src/Umbraco.Core/Migrations/PostMigrations/PublishedSnapshotRebuilder.cs
rename to src/Umbraco.Infrastructure/Migrations/PostMigrations/PublishedSnapshotRebuilder.cs
diff --git a/src/Umbraco.Core/Migrations/PostMigrations/RebuildPublishedSnapshot.cs b/src/Umbraco.Infrastructure/Migrations/PostMigrations/RebuildPublishedSnapshot.cs
similarity index 100%
rename from src/Umbraco.Core/Migrations/PostMigrations/RebuildPublishedSnapshot.cs
rename to src/Umbraco.Infrastructure/Migrations/PostMigrations/RebuildPublishedSnapshot.cs
diff --git a/src/Umbraco.Core/Migrations/Upgrade/Common/CreateKeysAndIndexes.cs b/src/Umbraco.Infrastructure/Migrations/Upgrade/Common/CreateKeysAndIndexes.cs
similarity index 100%
rename from src/Umbraco.Core/Migrations/Upgrade/Common/CreateKeysAndIndexes.cs
rename to src/Umbraco.Infrastructure/Migrations/Upgrade/Common/CreateKeysAndIndexes.cs
diff --git a/src/Umbraco.Core/Migrations/Upgrade/Common/DeleteKeysAndIndexes.cs b/src/Umbraco.Infrastructure/Migrations/Upgrade/Common/DeleteKeysAndIndexes.cs
similarity index 100%
rename from src/Umbraco.Core/Migrations/Upgrade/Common/DeleteKeysAndIndexes.cs
rename to src/Umbraco.Infrastructure/Migrations/Upgrade/Common/DeleteKeysAndIndexes.cs
diff --git a/src/Umbraco.Core/Migrations/Upgrade/UmbracoPlan.cs b/src/Umbraco.Infrastructure/Migrations/Upgrade/UmbracoPlan.cs
similarity index 96%
rename from src/Umbraco.Core/Migrations/Upgrade/UmbracoPlan.cs
rename to src/Umbraco.Infrastructure/Migrations/Upgrade/UmbracoPlan.cs
index 7e27a857c5..b702730a40 100644
--- a/src/Umbraco.Core/Migrations/Upgrade/UmbracoPlan.cs
+++ b/src/Umbraco.Infrastructure/Migrations/Upgrade/UmbracoPlan.cs
@@ -16,15 +16,17 @@ namespace Umbraco.Core.Migrations.Upgrade
public class UmbracoPlan : MigrationPlan
{
private readonly IUmbracoVersion _umbracoVersion;
+ private readonly IGlobalSettings _globalSettings;
private const string InitPrefix = "{init-";
private const string InitSuffix = "}";
///
/// Initializes a new instance of the class.
///
- public UmbracoPlan(IUmbracoVersion umbracoVersion)
+ public UmbracoPlan(IUmbracoVersion umbracoVersion, IGlobalSettings globalSettings)
: base(Constants.System.UmbracoUpgradePlanName)
{
_umbracoVersion = umbracoVersion;
+ _globalSettings = globalSettings;
DefinePlan();
}
@@ -63,7 +65,7 @@ namespace Umbraco.Core.Migrations.Upgrade
get
{
// no state in database yet - assume we have something in web.config that makes some sense
- if (!SemVersion.TryParse(Current.Configs.Global().ConfigurationStatus, out var currentVersion))
+ if (!SemVersion.TryParse(_globalSettings.ConfigurationStatus, out var currentVersion))
throw new InvalidOperationException($"Could not get current version from web.config {Constants.AppSettings.ConfigurationStatus} appSetting.");
// cannot go back in time
diff --git a/src/Umbraco.Core/Migrations/Upgrade/Upgrader.cs b/src/Umbraco.Infrastructure/Migrations/Upgrade/Upgrader.cs
similarity index 100%
rename from src/Umbraco.Core/Migrations/Upgrade/Upgrader.cs
rename to src/Umbraco.Infrastructure/Migrations/Upgrade/Upgrader.cs
diff --git a/src/Umbraco.Core/Migrations/Upgrade/V_8_0_0/AddContentNuTable.cs b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/AddContentNuTable.cs
similarity index 100%
rename from src/Umbraco.Core/Migrations/Upgrade/V_8_0_0/AddContentNuTable.cs
rename to src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/AddContentNuTable.cs
diff --git a/src/Umbraco.Core/Migrations/Upgrade/V_8_0_0/AddContentTypeIsElementColumn.cs b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/AddContentTypeIsElementColumn.cs
similarity index 100%
rename from src/Umbraco.Core/Migrations/Upgrade/V_8_0_0/AddContentTypeIsElementColumn.cs
rename to src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/AddContentTypeIsElementColumn.cs
diff --git a/src/Umbraco.Core/Migrations/Upgrade/V_8_0_0/AddLockObjects.cs b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/AddLockObjects.cs
similarity index 100%
rename from src/Umbraco.Core/Migrations/Upgrade/V_8_0_0/AddLockObjects.cs
rename to src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/AddLockObjects.cs
diff --git a/src/Umbraco.Core/Migrations/Upgrade/V_8_0_0/AddLogTableColumns.cs b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/AddLogTableColumns.cs
similarity index 100%
rename from src/Umbraco.Core/Migrations/Upgrade/V_8_0_0/AddLogTableColumns.cs
rename to src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/AddLogTableColumns.cs
diff --git a/src/Umbraco.Core/Migrations/Upgrade/V_8_0_0/AddTypedLabels.cs b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/AddTypedLabels.cs
similarity index 100%
rename from src/Umbraco.Core/Migrations/Upgrade/V_8_0_0/AddTypedLabels.cs
rename to src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/AddTypedLabels.cs
diff --git a/src/Umbraco.Core/Migrations/Upgrade/V_8_0_0/AddVariationTables1A.cs b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/AddVariationTables1A.cs
similarity index 100%
rename from src/Umbraco.Core/Migrations/Upgrade/V_8_0_0/AddVariationTables1A.cs
rename to src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/AddVariationTables1A.cs
diff --git a/src/Umbraco.Core/Migrations/Upgrade/V_8_0_0/AddVariationTables2.cs b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/AddVariationTables2.cs
similarity index 100%
rename from src/Umbraco.Core/Migrations/Upgrade/V_8_0_0/AddVariationTables2.cs
rename to src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/AddVariationTables2.cs
diff --git a/src/Umbraco.Core/Migrations/Upgrade/V_8_0_0/ContentVariationMigration.cs b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/ContentVariationMigration.cs
similarity index 100%
rename from src/Umbraco.Core/Migrations/Upgrade/V_8_0_0/ContentVariationMigration.cs
rename to src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/ContentVariationMigration.cs
diff --git a/src/Umbraco.Core/Migrations/Upgrade/V_8_0_0/ConvertRelatedLinksToMultiUrlPicker.cs b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/ConvertRelatedLinksToMultiUrlPicker.cs
similarity index 100%
rename from src/Umbraco.Core/Migrations/Upgrade/V_8_0_0/ConvertRelatedLinksToMultiUrlPicker.cs
rename to src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/ConvertRelatedLinksToMultiUrlPicker.cs
diff --git a/src/Umbraco.Core/Migrations/Upgrade/V_8_0_0/DataTypeMigration.cs b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/DataTypeMigration.cs
similarity index 100%
rename from src/Umbraco.Core/Migrations/Upgrade/V_8_0_0/DataTypeMigration.cs
rename to src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/DataTypeMigration.cs
diff --git a/src/Umbraco.Core/Migrations/Upgrade/V_8_0_0/DataTypes/ContentPickerPreValueMigrator.cs b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/DataTypes/ContentPickerPreValueMigrator.cs
similarity index 100%
rename from src/Umbraco.Core/Migrations/Upgrade/V_8_0_0/DataTypes/ContentPickerPreValueMigrator.cs
rename to src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/DataTypes/ContentPickerPreValueMigrator.cs
diff --git a/src/Umbraco.Core/Migrations/Upgrade/V_8_0_0/DataTypes/DecimalPreValueMigrator.cs b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/DataTypes/DecimalPreValueMigrator.cs
similarity index 100%
rename from src/Umbraco.Core/Migrations/Upgrade/V_8_0_0/DataTypes/DecimalPreValueMigrator.cs
rename to src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/DataTypes/DecimalPreValueMigrator.cs
diff --git a/src/Umbraco.Core/Migrations/Upgrade/V_8_0_0/DataTypes/DefaultPreValueMigrator.cs b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/DataTypes/DefaultPreValueMigrator.cs
similarity index 100%
rename from src/Umbraco.Core/Migrations/Upgrade/V_8_0_0/DataTypes/DefaultPreValueMigrator.cs
rename to src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/DataTypes/DefaultPreValueMigrator.cs
diff --git a/src/Umbraco.Core/Migrations/Upgrade/V_8_0_0/DataTypes/DropDownFlexiblePreValueMigrator.cs b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/DataTypes/DropDownFlexiblePreValueMigrator.cs
similarity index 100%
rename from src/Umbraco.Core/Migrations/Upgrade/V_8_0_0/DataTypes/DropDownFlexiblePreValueMigrator.cs
rename to src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/DataTypes/DropDownFlexiblePreValueMigrator.cs
diff --git a/src/Umbraco.Core/Migrations/Upgrade/V_8_0_0/DataTypes/IPreValueMigrator.cs b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/DataTypes/IPreValueMigrator.cs
similarity index 100%
rename from src/Umbraco.Core/Migrations/Upgrade/V_8_0_0/DataTypes/IPreValueMigrator.cs
rename to src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/DataTypes/IPreValueMigrator.cs
diff --git a/src/Umbraco.Core/Migrations/Upgrade/V_8_0_0/DataTypes/ListViewPreValueMigrator.cs b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/DataTypes/ListViewPreValueMigrator.cs
similarity index 100%
rename from src/Umbraco.Core/Migrations/Upgrade/V_8_0_0/DataTypes/ListViewPreValueMigrator.cs
rename to src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/DataTypes/ListViewPreValueMigrator.cs
diff --git a/src/Umbraco.Core/Migrations/Upgrade/V_8_0_0/DataTypes/MarkdownEditorPreValueMigrator.cs b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/DataTypes/MarkdownEditorPreValueMigrator.cs
similarity index 100%
rename from src/Umbraco.Core/Migrations/Upgrade/V_8_0_0/DataTypes/MarkdownEditorPreValueMigrator.cs
rename to src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/DataTypes/MarkdownEditorPreValueMigrator.cs
diff --git a/src/Umbraco.Core/Migrations/Upgrade/V_8_0_0/DataTypes/MediaPickerPreValueMigrator.cs b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/DataTypes/MediaPickerPreValueMigrator.cs
similarity index 100%
rename from src/Umbraco.Core/Migrations/Upgrade/V_8_0_0/DataTypes/MediaPickerPreValueMigrator.cs
rename to src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/DataTypes/MediaPickerPreValueMigrator.cs
diff --git a/src/Umbraco.Core/Migrations/Upgrade/V_8_0_0/DataTypes/NestedContentPreValueMigrator.cs b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/DataTypes/NestedContentPreValueMigrator.cs
similarity index 100%
rename from src/Umbraco.Core/Migrations/Upgrade/V_8_0_0/DataTypes/NestedContentPreValueMigrator.cs
rename to src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/DataTypes/NestedContentPreValueMigrator.cs
diff --git a/src/Umbraco.Core/Migrations/Upgrade/V_8_0_0/DataTypes/PreValueDto.cs b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/DataTypes/PreValueDto.cs
similarity index 100%
rename from src/Umbraco.Core/Migrations/Upgrade/V_8_0_0/DataTypes/PreValueDto.cs
rename to src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/DataTypes/PreValueDto.cs
diff --git a/src/Umbraco.Core/Migrations/Upgrade/V_8_0_0/DataTypes/PreValueMigratorBase.cs b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/DataTypes/PreValueMigratorBase.cs
similarity index 100%
rename from src/Umbraco.Core/Migrations/Upgrade/V_8_0_0/DataTypes/PreValueMigratorBase.cs
rename to src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/DataTypes/PreValueMigratorBase.cs
diff --git a/src/Umbraco.Core/Migrations/Upgrade/V_8_0_0/DataTypes/PreValueMigratorCollection.cs b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/DataTypes/PreValueMigratorCollection.cs
similarity index 100%
rename from src/Umbraco.Core/Migrations/Upgrade/V_8_0_0/DataTypes/PreValueMigratorCollection.cs
rename to src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/DataTypes/PreValueMigratorCollection.cs
diff --git a/src/Umbraco.Core/Migrations/Upgrade/V_8_0_0/DataTypes/PreValueMigratorCollectionBuilder.cs b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/DataTypes/PreValueMigratorCollectionBuilder.cs
similarity index 100%
rename from src/Umbraco.Core/Migrations/Upgrade/V_8_0_0/DataTypes/PreValueMigratorCollectionBuilder.cs
rename to src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/DataTypes/PreValueMigratorCollectionBuilder.cs
diff --git a/src/Umbraco.Core/Migrations/Upgrade/V_8_0_0/DataTypes/PreValueMigratorComposer.cs b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/DataTypes/PreValueMigratorComposer.cs
similarity index 100%
rename from src/Umbraco.Core/Migrations/Upgrade/V_8_0_0/DataTypes/PreValueMigratorComposer.cs
rename to src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/DataTypes/PreValueMigratorComposer.cs
diff --git a/src/Umbraco.Core/Migrations/Upgrade/V_8_0_0/DataTypes/RenamingPreValueMigrator.cs b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/DataTypes/RenamingPreValueMigrator.cs
similarity index 100%
rename from src/Umbraco.Core/Migrations/Upgrade/V_8_0_0/DataTypes/RenamingPreValueMigrator.cs
rename to src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/DataTypes/RenamingPreValueMigrator.cs
diff --git a/src/Umbraco.Core/Migrations/Upgrade/V_8_0_0/DataTypes/RichTextPreValueMigrator.cs b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/DataTypes/RichTextPreValueMigrator.cs
similarity index 100%
rename from src/Umbraco.Core/Migrations/Upgrade/V_8_0_0/DataTypes/RichTextPreValueMigrator.cs
rename to src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/DataTypes/RichTextPreValueMigrator.cs
diff --git a/src/Umbraco.Core/Migrations/Upgrade/V_8_0_0/DataTypes/UmbracoSliderPreValueMigrator.cs b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/DataTypes/UmbracoSliderPreValueMigrator.cs
similarity index 100%
rename from src/Umbraco.Core/Migrations/Upgrade/V_8_0_0/DataTypes/UmbracoSliderPreValueMigrator.cs
rename to src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/DataTypes/UmbracoSliderPreValueMigrator.cs
diff --git a/src/Umbraco.Core/Migrations/Upgrade/V_8_0_0/DataTypes/ValueListPreValueMigrator.cs b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/DataTypes/ValueListPreValueMigrator.cs
similarity index 100%
rename from src/Umbraco.Core/Migrations/Upgrade/V_8_0_0/DataTypes/ValueListPreValueMigrator.cs
rename to src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/DataTypes/ValueListPreValueMigrator.cs
diff --git a/src/Umbraco.Core/Migrations/Upgrade/V_8_0_0/DropDownPropertyEditorsMigration.cs b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/DropDownPropertyEditorsMigration.cs
similarity index 100%
rename from src/Umbraco.Core/Migrations/Upgrade/V_8_0_0/DropDownPropertyEditorsMigration.cs
rename to src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/DropDownPropertyEditorsMigration.cs
diff --git a/src/Umbraco.Core/Migrations/Upgrade/V_8_0_0/DropMigrationsTable.cs b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/DropMigrationsTable.cs
similarity index 100%
rename from src/Umbraco.Core/Migrations/Upgrade/V_8_0_0/DropMigrationsTable.cs
rename to src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/DropMigrationsTable.cs
diff --git a/src/Umbraco.Core/Migrations/Upgrade/V_8_0_0/DropPreValueTable.cs b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/DropPreValueTable.cs
similarity index 100%
rename from src/Umbraco.Core/Migrations/Upgrade/V_8_0_0/DropPreValueTable.cs
rename to src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/DropPreValueTable.cs
diff --git a/src/Umbraco.Core/Migrations/Upgrade/V_8_0_0/DropTaskTables.cs b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/DropTaskTables.cs
similarity index 100%
rename from src/Umbraco.Core/Migrations/Upgrade/V_8_0_0/DropTaskTables.cs
rename to src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/DropTaskTables.cs
diff --git a/src/Umbraco.Core/Migrations/Upgrade/V_8_0_0/DropTemplateDesignColumn.cs b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/DropTemplateDesignColumn.cs
similarity index 100%
rename from src/Umbraco.Core/Migrations/Upgrade/V_8_0_0/DropTemplateDesignColumn.cs
rename to src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/DropTemplateDesignColumn.cs
diff --git a/src/Umbraco.Core/Migrations/Upgrade/V_8_0_0/DropXmlTables.cs b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/DropXmlTables.cs
similarity index 100%
rename from src/Umbraco.Core/Migrations/Upgrade/V_8_0_0/DropXmlTables.cs
rename to src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/DropXmlTables.cs
diff --git a/src/Umbraco.Core/Migrations/Upgrade/V_8_0_0/FallbackLanguage.cs b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/FallbackLanguage.cs
similarity index 100%
rename from src/Umbraco.Core/Migrations/Upgrade/V_8_0_0/FallbackLanguage.cs
rename to src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/FallbackLanguage.cs
diff --git a/src/Umbraco.Core/Migrations/Upgrade/V_8_0_0/FixLanguageIsoCodeLength.cs b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/FixLanguageIsoCodeLength.cs
similarity index 100%
rename from src/Umbraco.Core/Migrations/Upgrade/V_8_0_0/FixLanguageIsoCodeLength.cs
rename to src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/FixLanguageIsoCodeLength.cs
diff --git a/src/Umbraco.Core/Migrations/Upgrade/V_8_0_0/LanguageColumns.cs b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/LanguageColumns.cs
similarity index 100%
rename from src/Umbraco.Core/Migrations/Upgrade/V_8_0_0/LanguageColumns.cs
rename to src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/LanguageColumns.cs
diff --git a/src/Umbraco.Core/Migrations/Upgrade/V_8_0_0/MakeRedirectUrlVariant.cs b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/MakeRedirectUrlVariant.cs
similarity index 100%
rename from src/Umbraco.Core/Migrations/Upgrade/V_8_0_0/MakeRedirectUrlVariant.cs
rename to src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/MakeRedirectUrlVariant.cs
diff --git a/src/Umbraco.Core/Migrations/Upgrade/V_8_0_0/MakeTagsVariant.cs b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/MakeTagsVariant.cs
similarity index 100%
rename from src/Umbraco.Core/Migrations/Upgrade/V_8_0_0/MakeTagsVariant.cs
rename to src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/MakeTagsVariant.cs
diff --git a/src/Umbraco.Core/Migrations/Upgrade/V_8_0_0/MergeDateAndDateTimePropertyEditor.cs b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/MergeDateAndDateTimePropertyEditor.cs
similarity index 100%
rename from src/Umbraco.Core/Migrations/Upgrade/V_8_0_0/MergeDateAndDateTimePropertyEditor.cs
rename to src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/MergeDateAndDateTimePropertyEditor.cs
diff --git a/src/Umbraco.Core/Migrations/Upgrade/V_8_0_0/PropertyEditorsMigration.cs b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/PropertyEditorsMigration.cs
similarity index 100%
rename from src/Umbraco.Core/Migrations/Upgrade/V_8_0_0/PropertyEditorsMigration.cs
rename to src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/PropertyEditorsMigration.cs
diff --git a/src/Umbraco.Core/Migrations/Upgrade/V_8_0_0/PropertyEditorsMigrationBase.cs b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/PropertyEditorsMigrationBase.cs
similarity index 100%
rename from src/Umbraco.Core/Migrations/Upgrade/V_8_0_0/PropertyEditorsMigrationBase.cs
rename to src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/PropertyEditorsMigrationBase.cs
diff --git a/src/Umbraco.Core/Migrations/Upgrade/V_8_0_0/RadioAndCheckboxPropertyEditorsMigration.cs b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/RadioAndCheckboxPropertyEditorsMigration.cs
similarity index 100%
rename from src/Umbraco.Core/Migrations/Upgrade/V_8_0_0/RadioAndCheckboxPropertyEditorsMigration.cs
rename to src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/RadioAndCheckboxPropertyEditorsMigration.cs
diff --git a/src/Umbraco.Core/Migrations/Upgrade/V_8_0_0/RefactorMacroColumns.cs b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/RefactorMacroColumns.cs
similarity index 100%
rename from src/Umbraco.Core/Migrations/Upgrade/V_8_0_0/RefactorMacroColumns.cs
rename to src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/RefactorMacroColumns.cs
diff --git a/src/Umbraco.Core/Migrations/Upgrade/V_8_0_0/RefactorVariantsModel.cs b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/RefactorVariantsModel.cs
similarity index 100%
rename from src/Umbraco.Core/Migrations/Upgrade/V_8_0_0/RefactorVariantsModel.cs
rename to src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/RefactorVariantsModel.cs
diff --git a/src/Umbraco.Core/Migrations/Upgrade/V_8_0_0/RenameLabelAndRichTextPropertyEditorAliases.cs b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/RenameLabelAndRichTextPropertyEditorAliases.cs
similarity index 100%
rename from src/Umbraco.Core/Migrations/Upgrade/V_8_0_0/RenameLabelAndRichTextPropertyEditorAliases.cs
rename to src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/RenameLabelAndRichTextPropertyEditorAliases.cs
diff --git a/src/Umbraco.Core/Migrations/Upgrade/V_8_0_0/RenameMediaVersionTable.cs b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/RenameMediaVersionTable.cs
similarity index 100%
rename from src/Umbraco.Core/Migrations/Upgrade/V_8_0_0/RenameMediaVersionTable.cs
rename to src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/RenameMediaVersionTable.cs
diff --git a/src/Umbraco.Core/Migrations/Upgrade/V_8_0_0/RenameUmbracoDomainsTable.cs b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/RenameUmbracoDomainsTable.cs
similarity index 100%
rename from src/Umbraco.Core/Migrations/Upgrade/V_8_0_0/RenameUmbracoDomainsTable.cs
rename to src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/RenameUmbracoDomainsTable.cs
diff --git a/src/Umbraco.Core/Migrations/Upgrade/V_8_0_0/SuperZero.cs b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/SuperZero.cs
similarity index 100%
rename from src/Umbraco.Core/Migrations/Upgrade/V_8_0_0/SuperZero.cs
rename to src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/SuperZero.cs
diff --git a/src/Umbraco.Core/Migrations/Upgrade/V_8_0_0/TablesForScheduledPublishing.cs b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/TablesForScheduledPublishing.cs
similarity index 100%
rename from src/Umbraco.Core/Migrations/Upgrade/V_8_0_0/TablesForScheduledPublishing.cs
rename to src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/TablesForScheduledPublishing.cs
diff --git a/src/Umbraco.Core/Migrations/Upgrade/V_8_0_0/TagsMigration.cs b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/TagsMigration.cs
similarity index 100%
rename from src/Umbraco.Core/Migrations/Upgrade/V_8_0_0/TagsMigration.cs
rename to src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/TagsMigration.cs
diff --git a/src/Umbraco.Core/Migrations/Upgrade/V_8_0_0/TagsMigrationFix.cs b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/TagsMigrationFix.cs
similarity index 100%
rename from src/Umbraco.Core/Migrations/Upgrade/V_8_0_0/TagsMigrationFix.cs
rename to src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/TagsMigrationFix.cs
diff --git a/src/Umbraco.Core/Migrations/Upgrade/V_8_0_0/UpdateDefaultMandatoryLanguage.cs b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/UpdateDefaultMandatoryLanguage.cs
similarity index 100%
rename from src/Umbraco.Core/Migrations/Upgrade/V_8_0_0/UpdateDefaultMandatoryLanguage.cs
rename to src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/UpdateDefaultMandatoryLanguage.cs
diff --git a/src/Umbraco.Core/Migrations/Upgrade/V_8_0_0/UpdatePickerIntegerValuesToUdi.cs b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/UpdatePickerIntegerValuesToUdi.cs
similarity index 100%
rename from src/Umbraco.Core/Migrations/Upgrade/V_8_0_0/UpdatePickerIntegerValuesToUdi.cs
rename to src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/UpdatePickerIntegerValuesToUdi.cs
diff --git a/src/Umbraco.Core/Migrations/Upgrade/V_8_0_0/UserForeignKeys.cs b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/UserForeignKeys.cs
similarity index 100%
rename from src/Umbraco.Core/Migrations/Upgrade/V_8_0_0/UserForeignKeys.cs
rename to src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/UserForeignKeys.cs
diff --git a/src/Umbraco.Core/Migrations/Upgrade/V_8_0_0/VariantsMigration.cs b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/VariantsMigration.cs
similarity index 100%
rename from src/Umbraco.Core/Migrations/Upgrade/V_8_0_0/VariantsMigration.cs
rename to src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_0/VariantsMigration.cs
diff --git a/src/Umbraco.Core/Migrations/Upgrade/V_8_0_1/ChangeNuCacheJsonFormat.cs b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_1/ChangeNuCacheJsonFormat.cs
similarity index 100%
rename from src/Umbraco.Core/Migrations/Upgrade/V_8_0_1/ChangeNuCacheJsonFormat.cs
rename to src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_0_1/ChangeNuCacheJsonFormat.cs
diff --git a/src/Umbraco.Core/Migrations/Upgrade/V_8_1_0/ConvertTinyMceAndGridMediaUrlsToLocalLink.cs b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_1_0/ConvertTinyMceAndGridMediaUrlsToLocalLink.cs
similarity index 100%
rename from src/Umbraco.Core/Migrations/Upgrade/V_8_1_0/ConvertTinyMceAndGridMediaUrlsToLocalLink.cs
rename to src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_1_0/ConvertTinyMceAndGridMediaUrlsToLocalLink.cs
diff --git a/src/Umbraco.Core/Migrations/Upgrade/V_8_1_0/FixContentNuCascade.cs b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_1_0/FixContentNuCascade.cs
similarity index 100%
rename from src/Umbraco.Core/Migrations/Upgrade/V_8_1_0/FixContentNuCascade.cs
rename to src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_1_0/FixContentNuCascade.cs
diff --git a/src/Umbraco.Core/Migrations/Upgrade/V_8_1_0/RenameUserLoginDtoDateIndex.cs b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_1_0/RenameUserLoginDtoDateIndex.cs
similarity index 100%
rename from src/Umbraco.Core/Migrations/Upgrade/V_8_1_0/RenameUserLoginDtoDateIndex.cs
rename to src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_1_0/RenameUserLoginDtoDateIndex.cs
diff --git a/src/Umbraco.Core/Migrations/Upgrade/V_8_6_0/AddNewRelationTypes.cs b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_6_0/AddNewRelationTypes.cs
similarity index 100%
rename from src/Umbraco.Core/Migrations/Upgrade/V_8_6_0/AddNewRelationTypes.cs
rename to src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_6_0/AddNewRelationTypes.cs
diff --git a/src/Umbraco.Core/Migrations/Upgrade/V_8_6_0/AddPropertyTypeValidationMessageColumns.cs b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_6_0/AddPropertyTypeValidationMessageColumns.cs
similarity index 100%
rename from src/Umbraco.Core/Migrations/Upgrade/V_8_6_0/AddPropertyTypeValidationMessageColumns.cs
rename to src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_6_0/AddPropertyTypeValidationMessageColumns.cs
diff --git a/src/Umbraco.Core/Migrations/Upgrade/V_8_6_0/UpdateRelationTypeTable.cs b/src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_6_0/UpdateRelationTypeTable.cs
similarity index 100%
rename from src/Umbraco.Core/Migrations/Upgrade/V_8_6_0/UpdateRelationTypeTable.cs
rename to src/Umbraco.Infrastructure/Migrations/Upgrade/V_8_6_0/UpdateRelationTypeTable.cs
diff --git a/src/Umbraco.Core/Models/Editors/UmbracoEntityReference.cs b/src/Umbraco.Infrastructure/Models/Editors/UmbracoEntityReference.cs
similarity index 100%
rename from src/Umbraco.Core/Models/Editors/UmbracoEntityReference.cs
rename to src/Umbraco.Infrastructure/Models/Editors/UmbracoEntityReference.cs
diff --git a/src/Umbraco.Core/Models/Membership/UserGroupExtensions.cs b/src/Umbraco.Infrastructure/Models/Membership/UserGroupExtensions.cs
similarity index 97%
rename from src/Umbraco.Core/Models/Membership/UserGroupExtensions.cs
rename to src/Umbraco.Infrastructure/Models/Membership/UserGroupExtensions.cs
index b1d0189c56..93c82367d7 100644
--- a/src/Umbraco.Core/Models/Membership/UserGroupExtensions.cs
+++ b/src/Umbraco.Infrastructure/Models/Membership/UserGroupExtensions.cs
@@ -3,7 +3,7 @@ using Umbraco.Core.Persistence.Dtos;
namespace Umbraco.Core.Models.Membership
{
- internal static class UserGroupExtensions
+ public static class UserGroupExtensions
{
public static IReadOnlyUserGroup ToReadOnlyGroup(this IUserGroup group)
{
diff --git a/src/Umbraco.Core/Models/PathValidationExtensions.cs b/src/Umbraco.Infrastructure/Models/PathValidationExtensions.cs
similarity index 100%
rename from src/Umbraco.Core/Models/PathValidationExtensions.cs
rename to src/Umbraco.Infrastructure/Models/PathValidationExtensions.cs
diff --git a/src/Umbraco.Core/Models/UserExtensions.cs b/src/Umbraco.Infrastructure/Models/UserExtensions.cs
similarity index 92%
rename from src/Umbraco.Core/Models/UserExtensions.cs
rename to src/Umbraco.Infrastructure/Models/UserExtensions.cs
index d5dda1a49a..ebc5fab793 100644
--- a/src/Umbraco.Core/Models/UserExtensions.cs
+++ b/src/Umbraco.Infrastructure/Models/UserExtensions.cs
@@ -7,6 +7,7 @@ using System.Security.Cryptography;
using Umbraco.Core.Cache;
using Umbraco.Core.Configuration;
using Umbraco.Core.Composing;
+using Umbraco.Core.IO;
using Umbraco.Core.Models.Entities;
using Umbraco.Core.Models.Membership;
using Umbraco.Core.Services;
@@ -16,17 +17,16 @@ namespace Umbraco.Core.Models
{
public static class UserExtensions
{
-
-
///
/// Tries to lookup the user's Gravatar to see if the endpoint can be reached, if so it returns the valid URL
///
///
///
+ ///
///
/// A list of 5 different sized avatar URLs
///
- internal static string[] GetUserAvatarUrls(this IUser user, IAppCache cache)
+ public static string[] GetUserAvatarUrls(this IUser user, IAppCache cache, IMediaFileSystem mediaFileSystem)
{
// If FIPS is required, never check the Gravatar service as it only supports MD5 hashing.
// Unfortunately, if the FIPS setting is enabled on Windows, using MD5 will throw an exception
@@ -77,7 +77,7 @@ namespace Umbraco.Core.Models
}
//use the custom avatar
- var avatarUrl = Current.MediaFileSystem.GetUrl(user.Avatar);
+ var avatarUrl = mediaFileSystem.GetUrl(user.Avatar);
return new[]
{
avatarUrl + "?width=30&height=30&mode=crop",
@@ -89,47 +89,47 @@ namespace Umbraco.Core.Models
}
-
- internal static bool HasContentRootAccess(this IUser user, IEntityService entityService)
+
+ public static bool HasContentRootAccess(this IUser user, IEntityService entityService)
{
return ContentPermissionsHelper.HasPathAccess(Constants.System.RootString, user.CalculateContentStartNodeIds(entityService), Constants.System.RecycleBinContent);
}
- internal static bool HasContentBinAccess(this IUser user, IEntityService entityService)
+ public static bool HasContentBinAccess(this IUser user, IEntityService entityService)
{
return ContentPermissionsHelper.HasPathAccess(Constants.System.RecycleBinContentString, user.CalculateContentStartNodeIds(entityService), Constants.System.RecycleBinContent);
}
- internal static bool HasMediaRootAccess(this IUser user, IEntityService entityService)
+ public static bool HasMediaRootAccess(this IUser user, IEntityService entityService)
{
return ContentPermissionsHelper.HasPathAccess(Constants.System.RootString, user.CalculateMediaStartNodeIds(entityService), Constants.System.RecycleBinMedia);
}
- internal static bool HasMediaBinAccess(this IUser user, IEntityService entityService)
+ public static bool HasMediaBinAccess(this IUser user, IEntityService entityService)
{
return ContentPermissionsHelper.HasPathAccess(Constants.System.RecycleBinMediaString, user.CalculateMediaStartNodeIds(entityService), Constants.System.RecycleBinMedia);
}
- internal static bool HasPathAccess(this IUser user, IContent content, IEntityService entityService)
+ public static bool HasPathAccess(this IUser user, IContent content, IEntityService entityService)
{
if (content == null) throw new ArgumentNullException(nameof(content));
return ContentPermissionsHelper.HasPathAccess(content.Path, user.CalculateContentStartNodeIds(entityService), Constants.System.RecycleBinContent);
}
- internal static bool HasPathAccess(this IUser user, IMedia media, IEntityService entityService)
+ public static bool HasPathAccess(this IUser user, IMedia media, IEntityService entityService)
{
if (media == null) throw new ArgumentNullException(nameof(media));
return ContentPermissionsHelper.HasPathAccess(media.Path, user.CalculateMediaStartNodeIds(entityService), Constants.System.RecycleBinMedia);
}
- internal static bool HasContentPathAccess(this IUser user, IUmbracoEntity entity, IEntityService entityService)
+ public static bool HasContentPathAccess(this IUser user, IUmbracoEntity entity, IEntityService entityService)
{
if (entity == null) throw new ArgumentNullException(nameof(entity));
return ContentPermissionsHelper.HasPathAccess(entity.Path, user.CalculateContentStartNodeIds(entityService), Constants.System.RecycleBinContent);
}
- internal static bool HasMediaPathAccess(this IUser user, IUmbracoEntity entity, IEntityService entityService)
+ public static bool HasMediaPathAccess(this IUser user, IUmbracoEntity entity, IEntityService entityService)
{
if (entity == null) throw new ArgumentNullException(nameof(entity));
return ContentPermissionsHelper.HasPathAccess(entity.Path, user.CalculateMediaStartNodeIds(entityService), Constants.System.RecycleBinMedia);
diff --git a/src/Umbraco.Core/Packaging/PackageDataInstallation.cs b/src/Umbraco.Infrastructure/Packaging/PackageDataInstallation.cs
similarity index 99%
rename from src/Umbraco.Core/Packaging/PackageDataInstallation.cs
rename to src/Umbraco.Infrastructure/Packaging/PackageDataInstallation.cs
index b405ed1095..1699365dfd 100644
--- a/src/Umbraco.Core/Packaging/PackageDataInstallation.cs
+++ b/src/Umbraco.Infrastructure/Packaging/PackageDataInstallation.cs
@@ -19,7 +19,7 @@ using Umbraco.Core.Strings;
namespace Umbraco.Core.Packaging
{
- internal class PackageDataInstallation
+ public class PackageDataInstallation
{
private readonly ILogger _logger;
private readonly IFileService _fileService;
diff --git a/src/Umbraco.Core/Packaging/PackageInstallation.cs b/src/Umbraco.Infrastructure/Packaging/PackageInstallation.cs
similarity index 98%
rename from src/Umbraco.Core/Packaging/PackageInstallation.cs
rename to src/Umbraco.Infrastructure/Packaging/PackageInstallation.cs
index a42ee1aeb2..e307802606 100644
--- a/src/Umbraco.Core/Packaging/PackageInstallation.cs
+++ b/src/Umbraco.Infrastructure/Packaging/PackageInstallation.cs
@@ -11,7 +11,7 @@ using Umbraco.Core.Services;
namespace Umbraco.Core.Packaging
{
- internal class PackageInstallation : IPackageInstallation
+ public class PackageInstallation : IPackageInstallation
{
private readonly PackageExtraction _packageExtraction;
private readonly PackageDataInstallation _packageDataInstallation;
@@ -95,7 +95,7 @@ namespace Umbraco.Core.Packaging
installationSummary.Actions = CompiledPackageXmlParser.GetPackageActions(XElement.Parse(compiledPackage.Actions), compiledPackage.Name);
installationSummary.MetaData = compiledPackage;
installationSummary.FilesInstalled = packageDefinition.Files;
-
+
//make sure the definition is up to date with everything
foreach (var x in installationSummary.DataTypesInstalled) packageDefinition.DataTypes.Add(x.Id.ToInvariantString());
foreach (var x in installationSummary.LanguagesInstalled) packageDefinition.Languages.Add(x.Id.ToInvariantString());
@@ -117,7 +117,7 @@ namespace Umbraco.Core.Packaging
{
foreach (var n in actions)
{
- //if there is an undo section then save it to the definition so we can run it at uninstallation
+ //if there is an undo section then save it to the definition so we can run it at uninstallation
var undo = n.Undo;
if (undo)
packageDefinition.Actions += n.XmlData.ToString();
@@ -189,7 +189,7 @@ namespace Umbraco.Core.Packaging
}
}
-
-
+
+
}
}
diff --git a/src/Umbraco.Core/Persistence/DatabaseDebugHelper.cs b/src/Umbraco.Infrastructure/Persistence/DatabaseDebugHelper.cs
similarity index 100%
rename from src/Umbraco.Core/Persistence/DatabaseDebugHelper.cs
rename to src/Umbraco.Infrastructure/Persistence/DatabaseDebugHelper.cs
diff --git a/src/Umbraco.Core/Persistence/DbCommandExtensions.cs b/src/Umbraco.Infrastructure/Persistence/DbCommandExtensions.cs
similarity index 100%
rename from src/Umbraco.Core/Persistence/DbCommandExtensions.cs
rename to src/Umbraco.Infrastructure/Persistence/DbCommandExtensions.cs
diff --git a/src/Umbraco.Core/Persistence/Dtos/AccessDto.cs b/src/Umbraco.Infrastructure/Persistence/Dtos/AccessDto.cs
similarity index 100%
rename from src/Umbraco.Core/Persistence/Dtos/AccessDto.cs
rename to src/Umbraco.Infrastructure/Persistence/Dtos/AccessDto.cs
diff --git a/src/Umbraco.Core/Persistence/Dtos/AccessRuleDto.cs b/src/Umbraco.Infrastructure/Persistence/Dtos/AccessRuleDto.cs
similarity index 100%
rename from src/Umbraco.Core/Persistence/Dtos/AccessRuleDto.cs
rename to src/Umbraco.Infrastructure/Persistence/Dtos/AccessRuleDto.cs
diff --git a/src/Umbraco.Core/Persistence/Dtos/AuditEntryDto.cs b/src/Umbraco.Infrastructure/Persistence/Dtos/AuditEntryDto.cs
similarity index 100%
rename from src/Umbraco.Core/Persistence/Dtos/AuditEntryDto.cs
rename to src/Umbraco.Infrastructure/Persistence/Dtos/AuditEntryDto.cs
diff --git a/src/Umbraco.Core/Persistence/Dtos/CacheInstructionDto.cs b/src/Umbraco.Infrastructure/Persistence/Dtos/CacheInstructionDto.cs
similarity index 96%
rename from src/Umbraco.Core/Persistence/Dtos/CacheInstructionDto.cs
rename to src/Umbraco.Infrastructure/Persistence/Dtos/CacheInstructionDto.cs
index 1fc5eb90a8..7c1af7b522 100644
--- a/src/Umbraco.Core/Persistence/Dtos/CacheInstructionDto.cs
+++ b/src/Umbraco.Infrastructure/Persistence/Dtos/CacheInstructionDto.cs
@@ -7,7 +7,7 @@ namespace Umbraco.Core.Persistence.Dtos
[TableName(Constants.DatabaseSchema.Tables.CacheInstruction)]
[PrimaryKey("id")]
[ExplicitColumns]
- internal class CacheInstructionDto
+ public class CacheInstructionDto
{
[Column("id")]
[NullSetting(NullSetting = NullSettings.NotNull)]
diff --git a/src/Umbraco.Core/Persistence/Dtos/ConsentDto.cs b/src/Umbraco.Infrastructure/Persistence/Dtos/ConsentDto.cs
similarity index 100%
rename from src/Umbraco.Core/Persistence/Dtos/ConsentDto.cs
rename to src/Umbraco.Infrastructure/Persistence/Dtos/ConsentDto.cs
diff --git a/src/Umbraco.Core/Persistence/Dtos/ContentDto.cs b/src/Umbraco.Infrastructure/Persistence/Dtos/ContentDto.cs
similarity index 97%
rename from src/Umbraco.Core/Persistence/Dtos/ContentDto.cs
rename to src/Umbraco.Infrastructure/Persistence/Dtos/ContentDto.cs
index aae5d0d407..56d87ad296 100644
--- a/src/Umbraco.Core/Persistence/Dtos/ContentDto.cs
+++ b/src/Umbraco.Infrastructure/Persistence/Dtos/ContentDto.cs
@@ -6,7 +6,7 @@ namespace Umbraco.Core.Persistence.Dtos
[TableName(TableName)]
[PrimaryKey("nodeId", AutoIncrement = false)]
[ExplicitColumns]
- internal class ContentDto
+ public class ContentDto
{
public const string TableName = Constants.DatabaseSchema.Tables.Content;
diff --git a/src/Umbraco.Core/Persistence/Dtos/ContentNuDto.cs b/src/Umbraco.Infrastructure/Persistence/Dtos/ContentNuDto.cs
similarity index 97%
rename from src/Umbraco.Core/Persistence/Dtos/ContentNuDto.cs
rename to src/Umbraco.Infrastructure/Persistence/Dtos/ContentNuDto.cs
index c6269d5317..a611186021 100644
--- a/src/Umbraco.Core/Persistence/Dtos/ContentNuDto.cs
+++ b/src/Umbraco.Infrastructure/Persistence/Dtos/ContentNuDto.cs
@@ -7,7 +7,7 @@ namespace Umbraco.Core.Persistence.Dtos
[TableName(Constants.DatabaseSchema.Tables.NodeData)]
[PrimaryKey("nodeId", AutoIncrement = false)]
[ExplicitColumns]
- internal class ContentNuDto
+ public class ContentNuDto
{
[Column("nodeId")]
[PrimaryKeyColumn(AutoIncrement = false, Name = "PK_cmsContentNu", OnColumns = "nodeId, published")]
diff --git a/src/Umbraco.Core/Persistence/Dtos/ContentScheduleDto.cs b/src/Umbraco.Infrastructure/Persistence/Dtos/ContentScheduleDto.cs
similarity index 100%
rename from src/Umbraco.Core/Persistence/Dtos/ContentScheduleDto.cs
rename to src/Umbraco.Infrastructure/Persistence/Dtos/ContentScheduleDto.cs
diff --git a/src/Umbraco.Core/Persistence/Dtos/ContentType2ContentTypeDto.cs b/src/Umbraco.Infrastructure/Persistence/Dtos/ContentType2ContentTypeDto.cs
similarity index 100%
rename from src/Umbraco.Core/Persistence/Dtos/ContentType2ContentTypeDto.cs
rename to src/Umbraco.Infrastructure/Persistence/Dtos/ContentType2ContentTypeDto.cs
diff --git a/src/Umbraco.Core/Persistence/Dtos/ContentTypeAllowedContentTypeDto.cs b/src/Umbraco.Infrastructure/Persistence/Dtos/ContentTypeAllowedContentTypeDto.cs
similarity index 100%
rename from src/Umbraco.Core/Persistence/Dtos/ContentTypeAllowedContentTypeDto.cs
rename to src/Umbraco.Infrastructure/Persistence/Dtos/ContentTypeAllowedContentTypeDto.cs
diff --git a/src/Umbraco.Core/Persistence/Dtos/ContentTypeDto.cs b/src/Umbraco.Infrastructure/Persistence/Dtos/ContentTypeDto.cs
similarity index 100%
rename from src/Umbraco.Core/Persistence/Dtos/ContentTypeDto.cs
rename to src/Umbraco.Infrastructure/Persistence/Dtos/ContentTypeDto.cs
diff --git a/src/Umbraco.Core/Persistence/Dtos/ContentTypeTemplateDto.cs b/src/Umbraco.Infrastructure/Persistence/Dtos/ContentTypeTemplateDto.cs
similarity index 100%
rename from src/Umbraco.Core/Persistence/Dtos/ContentTypeTemplateDto.cs
rename to src/Umbraco.Infrastructure/Persistence/Dtos/ContentTypeTemplateDto.cs
diff --git a/src/Umbraco.Core/Persistence/Dtos/ContentVersionCultureVariationDto.cs b/src/Umbraco.Infrastructure/Persistence/Dtos/ContentVersionCultureVariationDto.cs
similarity index 100%
rename from src/Umbraco.Core/Persistence/Dtos/ContentVersionCultureVariationDto.cs
rename to src/Umbraco.Infrastructure/Persistence/Dtos/ContentVersionCultureVariationDto.cs
diff --git a/src/Umbraco.Core/Persistence/Dtos/ContentVersionDto.cs b/src/Umbraco.Infrastructure/Persistence/Dtos/ContentVersionDto.cs
similarity index 98%
rename from src/Umbraco.Core/Persistence/Dtos/ContentVersionDto.cs
rename to src/Umbraco.Infrastructure/Persistence/Dtos/ContentVersionDto.cs
index 3c2c3deda4..9b7a3ff001 100644
--- a/src/Umbraco.Core/Persistence/Dtos/ContentVersionDto.cs
+++ b/src/Umbraco.Infrastructure/Persistence/Dtos/ContentVersionDto.cs
@@ -8,7 +8,7 @@ namespace Umbraco.Core.Persistence.Dtos
[TableName(TableName)]
[PrimaryKey("id")]
[ExplicitColumns]
- internal class ContentVersionDto
+ public class ContentVersionDto
{
public const string TableName = Constants.DatabaseSchema.Tables.ContentVersion;
private int? _userId;
diff --git a/src/Umbraco.Core/Persistence/Dtos/DataTypeDto.cs b/src/Umbraco.Infrastructure/Persistence/Dtos/DataTypeDto.cs
similarity index 100%
rename from src/Umbraco.Core/Persistence/Dtos/DataTypeDto.cs
rename to src/Umbraco.Infrastructure/Persistence/Dtos/DataTypeDto.cs
diff --git a/src/Umbraco.Core/Persistence/Dtos/DictionaryDto.cs b/src/Umbraco.Infrastructure/Persistence/Dtos/DictionaryDto.cs
similarity index 100%
rename from src/Umbraco.Core/Persistence/Dtos/DictionaryDto.cs
rename to src/Umbraco.Infrastructure/Persistence/Dtos/DictionaryDto.cs
diff --git a/src/Umbraco.Core/Persistence/Dtos/DocumentCultureVariationDto.cs b/src/Umbraco.Infrastructure/Persistence/Dtos/DocumentCultureVariationDto.cs
similarity index 100%
rename from src/Umbraco.Core/Persistence/Dtos/DocumentCultureVariationDto.cs
rename to src/Umbraco.Infrastructure/Persistence/Dtos/DocumentCultureVariationDto.cs
diff --git a/src/Umbraco.Core/Persistence/Dtos/DocumentDto.cs b/src/Umbraco.Infrastructure/Persistence/Dtos/DocumentDto.cs
similarity index 98%
rename from src/Umbraco.Core/Persistence/Dtos/DocumentDto.cs
rename to src/Umbraco.Infrastructure/Persistence/Dtos/DocumentDto.cs
index abe13a0e23..7893d2583a 100644
--- a/src/Umbraco.Core/Persistence/Dtos/DocumentDto.cs
+++ b/src/Umbraco.Infrastructure/Persistence/Dtos/DocumentDto.cs
@@ -7,7 +7,7 @@ namespace Umbraco.Core.Persistence.Dtos
[TableName(TableName)]
[PrimaryKey("nodeId", AutoIncrement = false)]
[ExplicitColumns]
- internal class DocumentDto
+ public class DocumentDto
{
private const string TableName = Constants.DatabaseSchema.Tables.Document;
diff --git a/src/Umbraco.Core/Persistence/Dtos/DocumentPublishedReadOnlyDto.cs b/src/Umbraco.Infrastructure/Persistence/Dtos/DocumentPublishedReadOnlyDto.cs
similarity index 100%
rename from src/Umbraco.Core/Persistence/Dtos/DocumentPublishedReadOnlyDto.cs
rename to src/Umbraco.Infrastructure/Persistence/Dtos/DocumentPublishedReadOnlyDto.cs
diff --git a/src/Umbraco.Core/Persistence/Dtos/DocumentVersionDto.cs b/src/Umbraco.Infrastructure/Persistence/Dtos/DocumentVersionDto.cs
similarity index 95%
rename from src/Umbraco.Core/Persistence/Dtos/DocumentVersionDto.cs
rename to src/Umbraco.Infrastructure/Persistence/Dtos/DocumentVersionDto.cs
index 5697d188e9..23e784e5fb 100644
--- a/src/Umbraco.Core/Persistence/Dtos/DocumentVersionDto.cs
+++ b/src/Umbraco.Infrastructure/Persistence/Dtos/DocumentVersionDto.cs
@@ -6,7 +6,7 @@ namespace Umbraco.Core.Persistence.Dtos
[TableName(TableName)]
[PrimaryKey("id", AutoIncrement = false)]
[ExplicitColumns]
- internal class DocumentVersionDto
+ public class DocumentVersionDto
{
private const string TableName = Constants.DatabaseSchema.Tables.DocumentVersion;
diff --git a/src/Umbraco.Core/Persistence/Dtos/DomainDto.cs b/src/Umbraco.Infrastructure/Persistence/Dtos/DomainDto.cs
similarity index 100%
rename from src/Umbraco.Core/Persistence/Dtos/DomainDto.cs
rename to src/Umbraco.Infrastructure/Persistence/Dtos/DomainDto.cs
diff --git a/src/Umbraco.Core/Persistence/Dtos/ExternalLoginDto.cs b/src/Umbraco.Infrastructure/Persistence/Dtos/ExternalLoginDto.cs
similarity index 100%
rename from src/Umbraco.Core/Persistence/Dtos/ExternalLoginDto.cs
rename to src/Umbraco.Infrastructure/Persistence/Dtos/ExternalLoginDto.cs
diff --git a/src/Umbraco.Core/Persistence/Dtos/KeyValueDto.cs b/src/Umbraco.Infrastructure/Persistence/Dtos/KeyValueDto.cs
similarity index 100%
rename from src/Umbraco.Core/Persistence/Dtos/KeyValueDto.cs
rename to src/Umbraco.Infrastructure/Persistence/Dtos/KeyValueDto.cs
diff --git a/src/Umbraco.Core/Persistence/Dtos/LanguageDto.cs b/src/Umbraco.Infrastructure/Persistence/Dtos/LanguageDto.cs
similarity index 100%
rename from src/Umbraco.Core/Persistence/Dtos/LanguageDto.cs
rename to src/Umbraco.Infrastructure/Persistence/Dtos/LanguageDto.cs
diff --git a/src/Umbraco.Core/Persistence/Dtos/LanguageTextDto.cs b/src/Umbraco.Infrastructure/Persistence/Dtos/LanguageTextDto.cs
similarity index 100%
rename from src/Umbraco.Core/Persistence/Dtos/LanguageTextDto.cs
rename to src/Umbraco.Infrastructure/Persistence/Dtos/LanguageTextDto.cs
diff --git a/src/Umbraco.Core/Persistence/Dtos/LockDto.cs b/src/Umbraco.Infrastructure/Persistence/Dtos/LockDto.cs
similarity index 100%
rename from src/Umbraco.Core/Persistence/Dtos/LockDto.cs
rename to src/Umbraco.Infrastructure/Persistence/Dtos/LockDto.cs
diff --git a/src/Umbraco.Core/Persistence/Dtos/LogDto.cs b/src/Umbraco.Infrastructure/Persistence/Dtos/LogDto.cs
similarity index 100%
rename from src/Umbraco.Core/Persistence/Dtos/LogDto.cs
rename to src/Umbraco.Infrastructure/Persistence/Dtos/LogDto.cs
diff --git a/src/Umbraco.Core/Persistence/Dtos/MacroDto.cs b/src/Umbraco.Infrastructure/Persistence/Dtos/MacroDto.cs
similarity index 100%
rename from src/Umbraco.Core/Persistence/Dtos/MacroDto.cs
rename to src/Umbraco.Infrastructure/Persistence/Dtos/MacroDto.cs
diff --git a/src/Umbraco.Core/Persistence/Dtos/MacroPropertyDto.cs b/src/Umbraco.Infrastructure/Persistence/Dtos/MacroPropertyDto.cs
similarity index 100%
rename from src/Umbraco.Core/Persistence/Dtos/MacroPropertyDto.cs
rename to src/Umbraco.Infrastructure/Persistence/Dtos/MacroPropertyDto.cs
diff --git a/src/Umbraco.Core/Persistence/Dtos/MediaDto.cs b/src/Umbraco.Infrastructure/Persistence/Dtos/MediaDto.cs
similarity index 100%
rename from src/Umbraco.Core/Persistence/Dtos/MediaDto.cs
rename to src/Umbraco.Infrastructure/Persistence/Dtos/MediaDto.cs
diff --git a/src/Umbraco.Core/Persistence/Dtos/MediaVersionDto.cs b/src/Umbraco.Infrastructure/Persistence/Dtos/MediaVersionDto.cs
similarity index 100%
rename from src/Umbraco.Core/Persistence/Dtos/MediaVersionDto.cs
rename to src/Umbraco.Infrastructure/Persistence/Dtos/MediaVersionDto.cs
diff --git a/src/Umbraco.Core/Persistence/Dtos/Member2MemberGroupDto.cs b/src/Umbraco.Infrastructure/Persistence/Dtos/Member2MemberGroupDto.cs
similarity index 100%
rename from src/Umbraco.Core/Persistence/Dtos/Member2MemberGroupDto.cs
rename to src/Umbraco.Infrastructure/Persistence/Dtos/Member2MemberGroupDto.cs
diff --git a/src/Umbraco.Core/Persistence/Dtos/MemberDto.cs b/src/Umbraco.Infrastructure/Persistence/Dtos/MemberDto.cs
similarity index 100%
rename from src/Umbraco.Core/Persistence/Dtos/MemberDto.cs
rename to src/Umbraco.Infrastructure/Persistence/Dtos/MemberDto.cs
diff --git a/src/Umbraco.Core/Persistence/Dtos/MemberPropertyTypeDto.cs b/src/Umbraco.Infrastructure/Persistence/Dtos/MemberPropertyTypeDto.cs
similarity index 100%
rename from src/Umbraco.Core/Persistence/Dtos/MemberPropertyTypeDto.cs
rename to src/Umbraco.Infrastructure/Persistence/Dtos/MemberPropertyTypeDto.cs
diff --git a/src/Umbraco.Core/Persistence/Dtos/PropertyDataDto.cs b/src/Umbraco.Infrastructure/Persistence/Dtos/PropertyDataDto.cs
similarity index 100%
rename from src/Umbraco.Core/Persistence/Dtos/PropertyDataDto.cs
rename to src/Umbraco.Infrastructure/Persistence/Dtos/PropertyDataDto.cs
diff --git a/src/Umbraco.Core/Persistence/Dtos/PropertyTypeCommonDto.cs b/src/Umbraco.Infrastructure/Persistence/Dtos/PropertyTypeCommonDto.cs
similarity index 100%
rename from src/Umbraco.Core/Persistence/Dtos/PropertyTypeCommonDto.cs
rename to src/Umbraco.Infrastructure/Persistence/Dtos/PropertyTypeCommonDto.cs
diff --git a/src/Umbraco.Core/Persistence/Dtos/PropertyTypeDto.cs b/src/Umbraco.Infrastructure/Persistence/Dtos/PropertyTypeDto.cs
similarity index 100%
rename from src/Umbraco.Core/Persistence/Dtos/PropertyTypeDto.cs
rename to src/Umbraco.Infrastructure/Persistence/Dtos/PropertyTypeDto.cs
diff --git a/src/Umbraco.Core/Persistence/Dtos/PropertyTypeGroupDto.cs b/src/Umbraco.Infrastructure/Persistence/Dtos/PropertyTypeGroupDto.cs
similarity index 100%
rename from src/Umbraco.Core/Persistence/Dtos/PropertyTypeGroupDto.cs
rename to src/Umbraco.Infrastructure/Persistence/Dtos/PropertyTypeGroupDto.cs
diff --git a/src/Umbraco.Core/Persistence/Dtos/PropertyTypeGroupReadOnlyDto.cs b/src/Umbraco.Infrastructure/Persistence/Dtos/PropertyTypeGroupReadOnlyDto.cs
similarity index 100%
rename from src/Umbraco.Core/Persistence/Dtos/PropertyTypeGroupReadOnlyDto.cs
rename to src/Umbraco.Infrastructure/Persistence/Dtos/PropertyTypeGroupReadOnlyDto.cs
diff --git a/src/Umbraco.Core/Persistence/Dtos/PropertyTypeReadOnlyDto.cs b/src/Umbraco.Infrastructure/Persistence/Dtos/PropertyTypeReadOnlyDto.cs
similarity index 100%
rename from src/Umbraco.Core/Persistence/Dtos/PropertyTypeReadOnlyDto.cs
rename to src/Umbraco.Infrastructure/Persistence/Dtos/PropertyTypeReadOnlyDto.cs
diff --git a/src/Umbraco.Core/Persistence/Dtos/RedirectUrlDto.cs b/src/Umbraco.Infrastructure/Persistence/Dtos/RedirectUrlDto.cs
similarity index 100%
rename from src/Umbraco.Core/Persistence/Dtos/RedirectUrlDto.cs
rename to src/Umbraco.Infrastructure/Persistence/Dtos/RedirectUrlDto.cs
diff --git a/src/Umbraco.Core/Persistence/Dtos/RelationDto.cs b/src/Umbraco.Infrastructure/Persistence/Dtos/RelationDto.cs
similarity index 100%
rename from src/Umbraco.Core/Persistence/Dtos/RelationDto.cs
rename to src/Umbraco.Infrastructure/Persistence/Dtos/RelationDto.cs
diff --git a/src/Umbraco.Core/Persistence/Dtos/RelationTypeDto.cs b/src/Umbraco.Infrastructure/Persistence/Dtos/RelationTypeDto.cs
similarity index 100%
rename from src/Umbraco.Core/Persistence/Dtos/RelationTypeDto.cs
rename to src/Umbraco.Infrastructure/Persistence/Dtos/RelationTypeDto.cs
diff --git a/src/Umbraco.Core/Persistence/Dtos/ServerRegistrationDto.cs b/src/Umbraco.Infrastructure/Persistence/Dtos/ServerRegistrationDto.cs
similarity index 100%
rename from src/Umbraco.Core/Persistence/Dtos/ServerRegistrationDto.cs
rename to src/Umbraco.Infrastructure/Persistence/Dtos/ServerRegistrationDto.cs
diff --git a/src/Umbraco.Core/Persistence/Dtos/TagDto.cs b/src/Umbraco.Infrastructure/Persistence/Dtos/TagDto.cs
similarity index 100%
rename from src/Umbraco.Core/Persistence/Dtos/TagDto.cs
rename to src/Umbraco.Infrastructure/Persistence/Dtos/TagDto.cs
diff --git a/src/Umbraco.Core/Persistence/Dtos/TagRelationshipDto.cs b/src/Umbraco.Infrastructure/Persistence/Dtos/TagRelationshipDto.cs
similarity index 100%
rename from src/Umbraco.Core/Persistence/Dtos/TagRelationshipDto.cs
rename to src/Umbraco.Infrastructure/Persistence/Dtos/TagRelationshipDto.cs
diff --git a/src/Umbraco.Core/Persistence/Dtos/TemplateDto.cs b/src/Umbraco.Infrastructure/Persistence/Dtos/TemplateDto.cs
similarity index 100%
rename from src/Umbraco.Core/Persistence/Dtos/TemplateDto.cs
rename to src/Umbraco.Infrastructure/Persistence/Dtos/TemplateDto.cs
diff --git a/src/Umbraco.Core/Persistence/Dtos/User2NodeNotifyDto.cs b/src/Umbraco.Infrastructure/Persistence/Dtos/User2NodeNotifyDto.cs
similarity index 100%
rename from src/Umbraco.Core/Persistence/Dtos/User2NodeNotifyDto.cs
rename to src/Umbraco.Infrastructure/Persistence/Dtos/User2NodeNotifyDto.cs
diff --git a/src/Umbraco.Core/Persistence/Dtos/User2UserGroupDto.cs b/src/Umbraco.Infrastructure/Persistence/Dtos/User2UserGroupDto.cs
similarity index 100%
rename from src/Umbraco.Core/Persistence/Dtos/User2UserGroupDto.cs
rename to src/Umbraco.Infrastructure/Persistence/Dtos/User2UserGroupDto.cs
diff --git a/src/Umbraco.Infrastructure/Persistence/Dtos/UserGroup2AppDto.cs b/src/Umbraco.Infrastructure/Persistence/Dtos/UserGroup2AppDto.cs
index c0ac48b1c5..03ba93fe59 100644
--- a/src/Umbraco.Infrastructure/Persistence/Dtos/UserGroup2AppDto.cs
+++ b/src/Umbraco.Infrastructure/Persistence/Dtos/UserGroup2AppDto.cs
@@ -5,7 +5,7 @@ namespace Umbraco.Core.Persistence.Dtos
{
[TableName(Constants.DatabaseSchema.Tables.UserGroup2App)]
[ExplicitColumns]
- internal class UserGroup2AppDto
+ public class UserGroup2AppDto
{
[Column("userGroupId")]
[PrimaryKeyColumn(AutoIncrement = false, Name = "PK_userGroup2App", OnColumns = "userGroupId, app")]
diff --git a/src/Umbraco.Core/Persistence/Dtos/UserGroup2NodePermissionDto.cs b/src/Umbraco.Infrastructure/Persistence/Dtos/UserGroup2NodePermissionDto.cs
similarity index 100%
rename from src/Umbraco.Core/Persistence/Dtos/UserGroup2NodePermissionDto.cs
rename to src/Umbraco.Infrastructure/Persistence/Dtos/UserGroup2NodePermissionDto.cs
diff --git a/src/Umbraco.Infrastructure/Persistence/Dtos/UserGroupDto.cs b/src/Umbraco.Infrastructure/Persistence/Dtos/UserGroupDto.cs
index 3383ed9e3d..0735912c8f 100644
--- a/src/Umbraco.Infrastructure/Persistence/Dtos/UserGroupDto.cs
+++ b/src/Umbraco.Infrastructure/Persistence/Dtos/UserGroupDto.cs
@@ -9,7 +9,7 @@ namespace Umbraco.Core.Persistence.Dtos
[TableName(Constants.DatabaseSchema.Tables.UserGroup)]
[PrimaryKey("id")]
[ExplicitColumns]
- internal class UserGroupDto
+ public class UserGroupDto
{
public UserGroupDto()
{
diff --git a/src/Umbraco.Core/Persistence/Dtos/UserLoginDto.cs b/src/Umbraco.Infrastructure/Persistence/Dtos/UserLoginDto.cs
similarity index 100%
rename from src/Umbraco.Core/Persistence/Dtos/UserLoginDto.cs
rename to src/Umbraco.Infrastructure/Persistence/Dtos/UserLoginDto.cs
diff --git a/src/Umbraco.Core/Persistence/EntityNotFoundException.cs b/src/Umbraco.Infrastructure/Persistence/EntityNotFoundException.cs
similarity index 100%
rename from src/Umbraco.Core/Persistence/EntityNotFoundException.cs
rename to src/Umbraco.Infrastructure/Persistence/EntityNotFoundException.cs
diff --git a/src/Umbraco.Core/Persistence/Factories/AuditEntryFactory.cs b/src/Umbraco.Infrastructure/Persistence/Factories/AuditEntryFactory.cs
similarity index 100%
rename from src/Umbraco.Core/Persistence/Factories/AuditEntryFactory.cs
rename to src/Umbraco.Infrastructure/Persistence/Factories/AuditEntryFactory.cs
diff --git a/src/Umbraco.Core/Persistence/Factories/ConsentFactory.cs b/src/Umbraco.Infrastructure/Persistence/Factories/ConsentFactory.cs
similarity index 100%
rename from src/Umbraco.Core/Persistence/Factories/ConsentFactory.cs
rename to src/Umbraco.Infrastructure/Persistence/Factories/ConsentFactory.cs
diff --git a/src/Umbraco.Core/Persistence/Factories/ContentBaseFactory.cs b/src/Umbraco.Infrastructure/Persistence/Factories/ContentBaseFactory.cs
similarity index 100%
rename from src/Umbraco.Core/Persistence/Factories/ContentBaseFactory.cs
rename to src/Umbraco.Infrastructure/Persistence/Factories/ContentBaseFactory.cs
diff --git a/src/Umbraco.Core/Persistence/Factories/ContentTypeFactory.cs b/src/Umbraco.Infrastructure/Persistence/Factories/ContentTypeFactory.cs
similarity index 100%
rename from src/Umbraco.Core/Persistence/Factories/ContentTypeFactory.cs
rename to src/Umbraco.Infrastructure/Persistence/Factories/ContentTypeFactory.cs
diff --git a/src/Umbraco.Core/Persistence/Factories/DataTypeFactory.cs b/src/Umbraco.Infrastructure/Persistence/Factories/DataTypeFactory.cs
similarity index 92%
rename from src/Umbraco.Core/Persistence/Factories/DataTypeFactory.cs
rename to src/Umbraco.Infrastructure/Persistence/Factories/DataTypeFactory.cs
index fb9b1e8d13..04609b2821 100644
--- a/src/Umbraco.Core/Persistence/Factories/DataTypeFactory.cs
+++ b/src/Umbraco.Infrastructure/Persistence/Factories/DataTypeFactory.cs
@@ -4,21 +4,22 @@ using Umbraco.Core.Logging;
using Umbraco.Core.Models;
using Umbraco.Core.Persistence.Dtos;
using Umbraco.Core.PropertyEditors;
+using Umbraco.Core.Services;
using Umbraco.Core.Strings;
-using Current = Umbraco.Core.Composing.Current;
+
namespace Umbraco.Core.Persistence.Factories
{
internal static class DataTypeFactory
{
- public static IDataType BuildEntity(DataTypeDto dto, PropertyEditorCollection editors, ILogger logger, IIOHelper ioHelper, IShortStringHelper shortStringHelper)
+ public static IDataType BuildEntity(DataTypeDto dto, PropertyEditorCollection editors, ILogger logger, IIOHelper ioHelper, IDataTypeService dataTypeService, ILocalizedTextService localizedTextService, ILocalizationService localizationService, IShortStringHelper shortStringHelper)
{
if (!editors.TryGet(dto.EditorAlias, out var editor))
{
logger.Warn(typeof(DataType), "Could not find an editor with alias {EditorAlias}, treating as Label."
+" The site may fail to boot and / or load data types and run.", dto.EditorAlias);
//convert to label
- editor = new LabelPropertyEditor(logger, ioHelper, Current.Services.DataTypeService, Current.Services.TextService, Current.Services.LocalizationService, shortStringHelper);
+ editor = new LabelPropertyEditor(logger, ioHelper,dataTypeService , localizedTextService, localizationService, shortStringHelper);
}
var dataType = new DataType(editor);
diff --git a/src/Umbraco.Core/Persistence/Factories/DictionaryItemFactory.cs b/src/Umbraco.Infrastructure/Persistence/Factories/DictionaryItemFactory.cs
similarity index 100%
rename from src/Umbraco.Core/Persistence/Factories/DictionaryItemFactory.cs
rename to src/Umbraco.Infrastructure/Persistence/Factories/DictionaryItemFactory.cs
diff --git a/src/Umbraco.Core/Persistence/Factories/DictionaryTranslationFactory.cs b/src/Umbraco.Infrastructure/Persistence/Factories/DictionaryTranslationFactory.cs
similarity index 100%
rename from src/Umbraco.Core/Persistence/Factories/DictionaryTranslationFactory.cs
rename to src/Umbraco.Infrastructure/Persistence/Factories/DictionaryTranslationFactory.cs
diff --git a/src/Umbraco.Core/Persistence/Factories/ExternalLoginFactory.cs b/src/Umbraco.Infrastructure/Persistence/Factories/ExternalLoginFactory.cs
similarity index 100%
rename from src/Umbraco.Core/Persistence/Factories/ExternalLoginFactory.cs
rename to src/Umbraco.Infrastructure/Persistence/Factories/ExternalLoginFactory.cs
diff --git a/src/Umbraco.Core/Persistence/Factories/LanguageFactory.cs b/src/Umbraco.Infrastructure/Persistence/Factories/LanguageFactory.cs
similarity index 100%
rename from src/Umbraco.Core/Persistence/Factories/LanguageFactory.cs
rename to src/Umbraco.Infrastructure/Persistence/Factories/LanguageFactory.cs
diff --git a/src/Umbraco.Core/Persistence/Factories/MacroFactory.cs b/src/Umbraco.Infrastructure/Persistence/Factories/MacroFactory.cs
similarity index 100%
rename from src/Umbraco.Core/Persistence/Factories/MacroFactory.cs
rename to src/Umbraco.Infrastructure/Persistence/Factories/MacroFactory.cs
diff --git a/src/Umbraco.Core/Persistence/Factories/MemberGroupFactory.cs b/src/Umbraco.Infrastructure/Persistence/Factories/MemberGroupFactory.cs
similarity index 100%
rename from src/Umbraco.Core/Persistence/Factories/MemberGroupFactory.cs
rename to src/Umbraco.Infrastructure/Persistence/Factories/MemberGroupFactory.cs
diff --git a/src/Umbraco.Core/Persistence/Factories/PropertyFactory.cs b/src/Umbraco.Infrastructure/Persistence/Factories/PropertyFactory.cs
similarity index 100%
rename from src/Umbraco.Core/Persistence/Factories/PropertyFactory.cs
rename to src/Umbraco.Infrastructure/Persistence/Factories/PropertyFactory.cs
diff --git a/src/Umbraco.Core/Persistence/Factories/PropertyGroupFactory.cs b/src/Umbraco.Infrastructure/Persistence/Factories/PropertyGroupFactory.cs
similarity index 100%
rename from src/Umbraco.Core/Persistence/Factories/PropertyGroupFactory.cs
rename to src/Umbraco.Infrastructure/Persistence/Factories/PropertyGroupFactory.cs
diff --git a/src/Umbraco.Core/Persistence/Factories/PublicAccessEntryFactory.cs b/src/Umbraco.Infrastructure/Persistence/Factories/PublicAccessEntryFactory.cs
similarity index 100%
rename from src/Umbraco.Core/Persistence/Factories/PublicAccessEntryFactory.cs
rename to src/Umbraco.Infrastructure/Persistence/Factories/PublicAccessEntryFactory.cs
diff --git a/src/Umbraco.Core/Persistence/Factories/RelationFactory.cs b/src/Umbraco.Infrastructure/Persistence/Factories/RelationFactory.cs
similarity index 100%
rename from src/Umbraco.Core/Persistence/Factories/RelationFactory.cs
rename to src/Umbraco.Infrastructure/Persistence/Factories/RelationFactory.cs
diff --git a/src/Umbraco.Core/Persistence/Factories/RelationTypeFactory.cs b/src/Umbraco.Infrastructure/Persistence/Factories/RelationTypeFactory.cs
similarity index 100%
rename from src/Umbraco.Core/Persistence/Factories/RelationTypeFactory.cs
rename to src/Umbraco.Infrastructure/Persistence/Factories/RelationTypeFactory.cs
diff --git a/src/Umbraco.Core/Persistence/Factories/ServerRegistrationFactory.cs b/src/Umbraco.Infrastructure/Persistence/Factories/ServerRegistrationFactory.cs
similarity index 100%
rename from src/Umbraco.Core/Persistence/Factories/ServerRegistrationFactory.cs
rename to src/Umbraco.Infrastructure/Persistence/Factories/ServerRegistrationFactory.cs
diff --git a/src/Umbraco.Core/Persistence/Factories/TagFactory.cs b/src/Umbraco.Infrastructure/Persistence/Factories/TagFactory.cs
similarity index 100%
rename from src/Umbraco.Core/Persistence/Factories/TagFactory.cs
rename to src/Umbraco.Infrastructure/Persistence/Factories/TagFactory.cs
diff --git a/src/Umbraco.Core/Persistence/Factories/TemplateFactory.cs b/src/Umbraco.Infrastructure/Persistence/Factories/TemplateFactory.cs
similarity index 100%
rename from src/Umbraco.Core/Persistence/Factories/TemplateFactory.cs
rename to src/Umbraco.Infrastructure/Persistence/Factories/TemplateFactory.cs
diff --git a/src/Umbraco.Core/Persistence/Factories/UserFactory.cs b/src/Umbraco.Infrastructure/Persistence/Factories/UserFactory.cs
similarity index 100%
rename from src/Umbraco.Core/Persistence/Factories/UserFactory.cs
rename to src/Umbraco.Infrastructure/Persistence/Factories/UserFactory.cs
diff --git a/src/Umbraco.Core/Persistence/Factories/UserGroupFactory.cs b/src/Umbraco.Infrastructure/Persistence/Factories/UserGroupFactory.cs
similarity index 100%
rename from src/Umbraco.Core/Persistence/Factories/UserGroupFactory.cs
rename to src/Umbraco.Infrastructure/Persistence/Factories/UserGroupFactory.cs
diff --git a/src/Umbraco.Infrastructure/Persistence/IDbProviderFactoryCreator.cs b/src/Umbraco.Infrastructure/Persistence/IDbProviderFactoryCreator.cs
index cda69480ae..b91be4c1e6 100644
--- a/src/Umbraco.Infrastructure/Persistence/IDbProviderFactoryCreator.cs
+++ b/src/Umbraco.Infrastructure/Persistence/IDbProviderFactoryCreator.cs
@@ -9,5 +9,6 @@ namespace Umbraco.Core.Persistence
DbProviderFactory CreateFactory();
DbProviderFactory CreateFactory(string providerName);
ISqlSyntaxProvider GetSqlSyntaxProvider(string providerName);
+ void CreateDatabase();
}
}
diff --git a/src/Umbraco.Core/Persistence/LocalDb.cs b/src/Umbraco.Infrastructure/Persistence/LocalDb.cs
similarity index 100%
rename from src/Umbraco.Core/Persistence/LocalDb.cs
rename to src/Umbraco.Infrastructure/Persistence/LocalDb.cs
diff --git a/src/Umbraco.Core/Persistence/Mappers/AccessMapper.cs b/src/Umbraco.Infrastructure/Persistence/Mappers/AccessMapper.cs
similarity index 100%
rename from src/Umbraco.Core/Persistence/Mappers/AccessMapper.cs
rename to src/Umbraco.Infrastructure/Persistence/Mappers/AccessMapper.cs
diff --git a/src/Umbraco.Core/Persistence/Mappers/AuditEntryMapper.cs b/src/Umbraco.Infrastructure/Persistence/Mappers/AuditEntryMapper.cs
similarity index 100%
rename from src/Umbraco.Core/Persistence/Mappers/AuditEntryMapper.cs
rename to src/Umbraco.Infrastructure/Persistence/Mappers/AuditEntryMapper.cs
diff --git a/src/Umbraco.Core/Persistence/Mappers/AuditItemMapper.cs b/src/Umbraco.Infrastructure/Persistence/Mappers/AuditItemMapper.cs
similarity index 100%
rename from src/Umbraco.Core/Persistence/Mappers/AuditItemMapper.cs
rename to src/Umbraco.Infrastructure/Persistence/Mappers/AuditItemMapper.cs
diff --git a/src/Umbraco.Core/Persistence/Mappers/ConsentMapper.cs b/src/Umbraco.Infrastructure/Persistence/Mappers/ConsentMapper.cs
similarity index 100%
rename from src/Umbraco.Core/Persistence/Mappers/ConsentMapper.cs
rename to src/Umbraco.Infrastructure/Persistence/Mappers/ConsentMapper.cs
diff --git a/src/Umbraco.Core/Persistence/Mappers/ContentMapper.cs b/src/Umbraco.Infrastructure/Persistence/Mappers/ContentMapper.cs
similarity index 100%
rename from src/Umbraco.Core/Persistence/Mappers/ContentMapper.cs
rename to src/Umbraco.Infrastructure/Persistence/Mappers/ContentMapper.cs
diff --git a/src/Umbraco.Core/Persistence/Mappers/ContentTypeMapper.cs b/src/Umbraco.Infrastructure/Persistence/Mappers/ContentTypeMapper.cs
similarity index 100%
rename from src/Umbraco.Core/Persistence/Mappers/ContentTypeMapper.cs
rename to src/Umbraco.Infrastructure/Persistence/Mappers/ContentTypeMapper.cs
diff --git a/src/Umbraco.Core/Persistence/Mappers/DataTypeMapper.cs b/src/Umbraco.Infrastructure/Persistence/Mappers/DataTypeMapper.cs
similarity index 100%
rename from src/Umbraco.Core/Persistence/Mappers/DataTypeMapper.cs
rename to src/Umbraco.Infrastructure/Persistence/Mappers/DataTypeMapper.cs
diff --git a/src/Umbraco.Core/Persistence/Mappers/DictionaryMapper.cs b/src/Umbraco.Infrastructure/Persistence/Mappers/DictionaryMapper.cs
similarity index 100%
rename from src/Umbraco.Core/Persistence/Mappers/DictionaryMapper.cs
rename to src/Umbraco.Infrastructure/Persistence/Mappers/DictionaryMapper.cs
diff --git a/src/Umbraco.Core/Persistence/Mappers/DictionaryTranslationMapper.cs b/src/Umbraco.Infrastructure/Persistence/Mappers/DictionaryTranslationMapper.cs
similarity index 100%
rename from src/Umbraco.Core/Persistence/Mappers/DictionaryTranslationMapper.cs
rename to src/Umbraco.Infrastructure/Persistence/Mappers/DictionaryTranslationMapper.cs
diff --git a/src/Umbraco.Core/Persistence/Mappers/DomainMapper.cs b/src/Umbraco.Infrastructure/Persistence/Mappers/DomainMapper.cs
similarity index 100%
rename from src/Umbraco.Core/Persistence/Mappers/DomainMapper.cs
rename to src/Umbraco.Infrastructure/Persistence/Mappers/DomainMapper.cs
diff --git a/src/Umbraco.Core/Persistence/Mappers/ExternalLoginMapper.cs b/src/Umbraco.Infrastructure/Persistence/Mappers/ExternalLoginMapper.cs
similarity index 100%
rename from src/Umbraco.Core/Persistence/Mappers/ExternalLoginMapper.cs
rename to src/Umbraco.Infrastructure/Persistence/Mappers/ExternalLoginMapper.cs
diff --git a/src/Umbraco.Core/Persistence/Mappers/LanguageMapper.cs b/src/Umbraco.Infrastructure/Persistence/Mappers/LanguageMapper.cs
similarity index 100%
rename from src/Umbraco.Core/Persistence/Mappers/LanguageMapper.cs
rename to src/Umbraco.Infrastructure/Persistence/Mappers/LanguageMapper.cs
diff --git a/src/Umbraco.Core/Persistence/Mappers/MacroMapper.cs b/src/Umbraco.Infrastructure/Persistence/Mappers/MacroMapper.cs
similarity index 100%
rename from src/Umbraco.Core/Persistence/Mappers/MacroMapper.cs
rename to src/Umbraco.Infrastructure/Persistence/Mappers/MacroMapper.cs
diff --git a/src/Umbraco.Core/Persistence/Mappers/MapperCollectionBuilder.cs b/src/Umbraco.Infrastructure/Persistence/Mappers/MapperCollectionBuilder.cs
similarity index 100%
rename from src/Umbraco.Core/Persistence/Mappers/MapperCollectionBuilder.cs
rename to src/Umbraco.Infrastructure/Persistence/Mappers/MapperCollectionBuilder.cs
diff --git a/src/Umbraco.Core/Persistence/Mappers/MediaMapper.cs b/src/Umbraco.Infrastructure/Persistence/Mappers/MediaMapper.cs
similarity index 100%
rename from src/Umbraco.Core/Persistence/Mappers/MediaMapper.cs
rename to src/Umbraco.Infrastructure/Persistence/Mappers/MediaMapper.cs
diff --git a/src/Umbraco.Core/Persistence/Mappers/MediaTypeMapper.cs b/src/Umbraco.Infrastructure/Persistence/Mappers/MediaTypeMapper.cs
similarity index 100%
rename from src/Umbraco.Core/Persistence/Mappers/MediaTypeMapper.cs
rename to src/Umbraco.Infrastructure/Persistence/Mappers/MediaTypeMapper.cs
diff --git a/src/Umbraco.Core/Persistence/Mappers/MemberGroupMapper.cs b/src/Umbraco.Infrastructure/Persistence/Mappers/MemberGroupMapper.cs
similarity index 100%
rename from src/Umbraco.Core/Persistence/Mappers/MemberGroupMapper.cs
rename to src/Umbraco.Infrastructure/Persistence/Mappers/MemberGroupMapper.cs
diff --git a/src/Umbraco.Core/Persistence/Mappers/MemberMapper.cs b/src/Umbraco.Infrastructure/Persistence/Mappers/MemberMapper.cs
similarity index 100%
rename from src/Umbraco.Core/Persistence/Mappers/MemberMapper.cs
rename to src/Umbraco.Infrastructure/Persistence/Mappers/MemberMapper.cs
diff --git a/src/Umbraco.Core/Persistence/Mappers/MemberTypeMapper.cs b/src/Umbraco.Infrastructure/Persistence/Mappers/MemberTypeMapper.cs
similarity index 100%
rename from src/Umbraco.Core/Persistence/Mappers/MemberTypeMapper.cs
rename to src/Umbraco.Infrastructure/Persistence/Mappers/MemberTypeMapper.cs
diff --git a/src/Umbraco.Core/Persistence/Mappers/PropertyGroupMapper.cs b/src/Umbraco.Infrastructure/Persistence/Mappers/PropertyGroupMapper.cs
similarity index 100%
rename from src/Umbraco.Core/Persistence/Mappers/PropertyGroupMapper.cs
rename to src/Umbraco.Infrastructure/Persistence/Mappers/PropertyGroupMapper.cs
diff --git a/src/Umbraco.Core/Persistence/Mappers/PropertyMapper.cs b/src/Umbraco.Infrastructure/Persistence/Mappers/PropertyMapper.cs
similarity index 100%
rename from src/Umbraco.Core/Persistence/Mappers/PropertyMapper.cs
rename to src/Umbraco.Infrastructure/Persistence/Mappers/PropertyMapper.cs
diff --git a/src/Umbraco.Core/Persistence/Mappers/PropertyTypeMapper.cs b/src/Umbraco.Infrastructure/Persistence/Mappers/PropertyTypeMapper.cs
similarity index 100%
rename from src/Umbraco.Core/Persistence/Mappers/PropertyTypeMapper.cs
rename to src/Umbraco.Infrastructure/Persistence/Mappers/PropertyTypeMapper.cs
diff --git a/src/Umbraco.Core/Persistence/Mappers/RelationMapper.cs b/src/Umbraco.Infrastructure/Persistence/Mappers/RelationMapper.cs
similarity index 100%
rename from src/Umbraco.Core/Persistence/Mappers/RelationMapper.cs
rename to src/Umbraco.Infrastructure/Persistence/Mappers/RelationMapper.cs
diff --git a/src/Umbraco.Core/Persistence/Mappers/RelationTypeMapper.cs b/src/Umbraco.Infrastructure/Persistence/Mappers/RelationTypeMapper.cs
similarity index 100%
rename from src/Umbraco.Core/Persistence/Mappers/RelationTypeMapper.cs
rename to src/Umbraco.Infrastructure/Persistence/Mappers/RelationTypeMapper.cs
diff --git a/src/Umbraco.Core/Persistence/Mappers/ServerRegistrationMapper.cs b/src/Umbraco.Infrastructure/Persistence/Mappers/ServerRegistrationMapper.cs
similarity index 100%
rename from src/Umbraco.Core/Persistence/Mappers/ServerRegistrationMapper.cs
rename to src/Umbraco.Infrastructure/Persistence/Mappers/ServerRegistrationMapper.cs
diff --git a/src/Umbraco.Core/Persistence/Mappers/SimpleContentTypeMapper.cs b/src/Umbraco.Infrastructure/Persistence/Mappers/SimpleContentTypeMapper.cs
similarity index 100%
rename from src/Umbraco.Core/Persistence/Mappers/SimpleContentTypeMapper.cs
rename to src/Umbraco.Infrastructure/Persistence/Mappers/SimpleContentTypeMapper.cs
diff --git a/src/Umbraco.Core/Persistence/Mappers/TagMapper.cs b/src/Umbraco.Infrastructure/Persistence/Mappers/TagMapper.cs
similarity index 100%
rename from src/Umbraco.Core/Persistence/Mappers/TagMapper.cs
rename to src/Umbraco.Infrastructure/Persistence/Mappers/TagMapper.cs
diff --git a/src/Umbraco.Core/Persistence/Mappers/TemplateMapper.cs b/src/Umbraco.Infrastructure/Persistence/Mappers/TemplateMapper.cs
similarity index 100%
rename from src/Umbraco.Core/Persistence/Mappers/TemplateMapper.cs
rename to src/Umbraco.Infrastructure/Persistence/Mappers/TemplateMapper.cs
diff --git a/src/Umbraco.Core/Persistence/Mappers/UmbracoEntityMapper.cs b/src/Umbraco.Infrastructure/Persistence/Mappers/UmbracoEntityMapper.cs
similarity index 100%
rename from src/Umbraco.Core/Persistence/Mappers/UmbracoEntityMapper.cs
rename to src/Umbraco.Infrastructure/Persistence/Mappers/UmbracoEntityMapper.cs
diff --git a/src/Umbraco.Core/Persistence/Mappers/UserGroupMapper.cs b/src/Umbraco.Infrastructure/Persistence/Mappers/UserGroupMapper.cs
similarity index 100%
rename from src/Umbraco.Core/Persistence/Mappers/UserGroupMapper.cs
rename to src/Umbraco.Infrastructure/Persistence/Mappers/UserGroupMapper.cs
diff --git a/src/Umbraco.Core/Persistence/Mappers/UserMapper.cs b/src/Umbraco.Infrastructure/Persistence/Mappers/UserMapper.cs
similarity index 100%
rename from src/Umbraco.Core/Persistence/Mappers/UserMapper.cs
rename to src/Umbraco.Infrastructure/Persistence/Mappers/UserMapper.cs
diff --git a/src/Umbraco.Core/Persistence/Mappers/UserSectionMapper.cs b/src/Umbraco.Infrastructure/Persistence/Mappers/UserSectionMapper.cs
similarity index 100%
rename from src/Umbraco.Core/Persistence/Mappers/UserSectionMapper.cs
rename to src/Umbraco.Infrastructure/Persistence/Mappers/UserSectionMapper.cs
diff --git a/src/Umbraco.Core/Persistence/Repositories/IContentRepository.cs b/src/Umbraco.Infrastructure/Persistence/Repositories/IContentRepository.cs
similarity index 100%
rename from src/Umbraco.Core/Persistence/Repositories/IContentRepository.cs
rename to src/Umbraco.Infrastructure/Persistence/Repositories/IContentRepository.cs
diff --git a/src/Umbraco.Core/Persistence/Repositories/IContentTypeCommonRepository.cs b/src/Umbraco.Infrastructure/Persistence/Repositories/IContentTypeCommonRepository.cs
similarity index 100%
rename from src/Umbraco.Core/Persistence/Repositories/IContentTypeCommonRepository.cs
rename to src/Umbraco.Infrastructure/Persistence/Repositories/IContentTypeCommonRepository.cs
diff --git a/src/Umbraco.Core/Persistence/Repositories/IContentTypeRepository.cs b/src/Umbraco.Infrastructure/Persistence/Repositories/IContentTypeRepository.cs
similarity index 100%
rename from src/Umbraco.Core/Persistence/Repositories/IContentTypeRepository.cs
rename to src/Umbraco.Infrastructure/Persistence/Repositories/IContentTypeRepository.cs
diff --git a/src/Umbraco.Core/Persistence/Repositories/IContentTypeRepositoryBase.cs b/src/Umbraco.Infrastructure/Persistence/Repositories/IContentTypeRepositoryBase.cs
similarity index 100%
rename from src/Umbraco.Core/Persistence/Repositories/IContentTypeRepositoryBase.cs
rename to src/Umbraco.Infrastructure/Persistence/Repositories/IContentTypeRepositoryBase.cs
diff --git a/src/Umbraco.Core/Persistence/Repositories/IDataTypeRepository.cs b/src/Umbraco.Infrastructure/Persistence/Repositories/IDataTypeRepository.cs
similarity index 100%
rename from src/Umbraco.Core/Persistence/Repositories/IDataTypeRepository.cs
rename to src/Umbraco.Infrastructure/Persistence/Repositories/IDataTypeRepository.cs
diff --git a/src/Umbraco.Core/Persistence/Repositories/IDocumentBlueprintRepository.cs b/src/Umbraco.Infrastructure/Persistence/Repositories/IDocumentBlueprintRepository.cs
similarity index 100%
rename from src/Umbraco.Core/Persistence/Repositories/IDocumentBlueprintRepository.cs
rename to src/Umbraco.Infrastructure/Persistence/Repositories/IDocumentBlueprintRepository.cs
diff --git a/src/Umbraco.Core/Persistence/Repositories/IDocumentRepository.cs b/src/Umbraco.Infrastructure/Persistence/Repositories/IDocumentRepository.cs
similarity index 100%
rename from src/Umbraco.Core/Persistence/Repositories/IDocumentRepository.cs
rename to src/Umbraco.Infrastructure/Persistence/Repositories/IDocumentRepository.cs
diff --git a/src/Umbraco.Core/Persistence/Repositories/IEntityRepository.cs b/src/Umbraco.Infrastructure/Persistence/Repositories/IEntityRepository.cs
similarity index 100%
rename from src/Umbraco.Core/Persistence/Repositories/IEntityRepository.cs
rename to src/Umbraco.Infrastructure/Persistence/Repositories/IEntityRepository.cs
diff --git a/src/Umbraco.Core/Persistence/Repositories/IMediaRepository.cs b/src/Umbraco.Infrastructure/Persistence/Repositories/IMediaRepository.cs
similarity index 100%
rename from src/Umbraco.Core/Persistence/Repositories/IMediaRepository.cs
rename to src/Umbraco.Infrastructure/Persistence/Repositories/IMediaRepository.cs
diff --git a/src/Umbraco.Core/Persistence/Repositories/IMediaTypeRepository.cs b/src/Umbraco.Infrastructure/Persistence/Repositories/IMediaTypeRepository.cs
similarity index 100%
rename from src/Umbraco.Core/Persistence/Repositories/IMediaTypeRepository.cs
rename to src/Umbraco.Infrastructure/Persistence/Repositories/IMediaTypeRepository.cs
diff --git a/src/Umbraco.Core/Persistence/Repositories/IMemberRepository.cs b/src/Umbraco.Infrastructure/Persistence/Repositories/IMemberRepository.cs
similarity index 100%
rename from src/Umbraco.Core/Persistence/Repositories/IMemberRepository.cs
rename to src/Umbraco.Infrastructure/Persistence/Repositories/IMemberRepository.cs
diff --git a/src/Umbraco.Core/Persistence/Repositories/IMemberTypeRepository.cs b/src/Umbraco.Infrastructure/Persistence/Repositories/IMemberTypeRepository.cs
similarity index 100%
rename from src/Umbraco.Core/Persistence/Repositories/IMemberTypeRepository.cs
rename to src/Umbraco.Infrastructure/Persistence/Repositories/IMemberTypeRepository.cs
diff --git a/src/Umbraco.Core/Persistence/Repositories/IPublicAccessRepository.cs b/src/Umbraco.Infrastructure/Persistence/Repositories/IPublicAccessRepository.cs
similarity index 100%
rename from src/Umbraco.Core/Persistence/Repositories/IPublicAccessRepository.cs
rename to src/Umbraco.Infrastructure/Persistence/Repositories/IPublicAccessRepository.cs
diff --git a/src/Umbraco.Core/Persistence/Repositories/Implement/AuditEntryRepository.cs b/src/Umbraco.Infrastructure/Persistence/Repositories/Implement/AuditEntryRepository.cs
similarity index 100%
rename from src/Umbraco.Core/Persistence/Repositories/Implement/AuditEntryRepository.cs
rename to src/Umbraco.Infrastructure/Persistence/Repositories/Implement/AuditEntryRepository.cs
diff --git a/src/Umbraco.Core/Persistence/Repositories/Implement/AuditRepository.cs b/src/Umbraco.Infrastructure/Persistence/Repositories/Implement/AuditRepository.cs
similarity index 100%
rename from src/Umbraco.Core/Persistence/Repositories/Implement/AuditRepository.cs
rename to src/Umbraco.Infrastructure/Persistence/Repositories/Implement/AuditRepository.cs
diff --git a/src/Umbraco.Core/Persistence/Repositories/Implement/ConsentRepository.cs b/src/Umbraco.Infrastructure/Persistence/Repositories/Implement/ConsentRepository.cs
similarity index 100%
rename from src/Umbraco.Core/Persistence/Repositories/Implement/ConsentRepository.cs
rename to src/Umbraco.Infrastructure/Persistence/Repositories/Implement/ConsentRepository.cs
diff --git a/src/Umbraco.Core/Persistence/Repositories/Implement/ContentRepositoryBase.cs b/src/Umbraco.Infrastructure/Persistence/Repositories/Implement/ContentRepositoryBase.cs
similarity index 99%
rename from src/Umbraco.Core/Persistence/Repositories/Implement/ContentRepositoryBase.cs
rename to src/Umbraco.Infrastructure/Persistence/Repositories/Implement/ContentRepositoryBase.cs
index e038dd33b2..90f8d454ac 100644
--- a/src/Umbraco.Core/Persistence/Repositories/Implement/ContentRepositoryBase.cs
+++ b/src/Umbraco.Infrastructure/Persistence/Repositories/Implement/ContentRepositoryBase.cs
@@ -30,7 +30,7 @@ namespace Umbraco.Core.Persistence.Repositories.Implement
public static bool ThrowOnWarning = false;
}
- internal abstract class ContentRepositoryBase : NPocoRepositoryBase, IContentRepository
+ public abstract class ContentRepositoryBase : NPocoRepositoryBase, IContentRepository
where TEntity : class, IContentBase
where TRepository : class, IRepository
{
diff --git a/src/Umbraco.Core/Persistence/Repositories/Implement/ContentTypeCommonRepository.cs b/src/Umbraco.Infrastructure/Persistence/Repositories/Implement/ContentTypeCommonRepository.cs
similarity index 100%
rename from src/Umbraco.Core/Persistence/Repositories/Implement/ContentTypeCommonRepository.cs
rename to src/Umbraco.Infrastructure/Persistence/Repositories/Implement/ContentTypeCommonRepository.cs
diff --git a/src/Umbraco.Core/Persistence/Repositories/Implement/ContentTypeRepository.cs b/src/Umbraco.Infrastructure/Persistence/Repositories/Implement/ContentTypeRepository.cs
similarity index 100%
rename from src/Umbraco.Core/Persistence/Repositories/Implement/ContentTypeRepository.cs
rename to src/Umbraco.Infrastructure/Persistence/Repositories/Implement/ContentTypeRepository.cs
diff --git a/src/Umbraco.Core/Persistence/Repositories/Implement/ContentTypeRepositoryBase.cs b/src/Umbraco.Infrastructure/Persistence/Repositories/Implement/ContentTypeRepositoryBase.cs
similarity index 100%
rename from src/Umbraco.Core/Persistence/Repositories/Implement/ContentTypeRepositoryBase.cs
rename to src/Umbraco.Infrastructure/Persistence/Repositories/Implement/ContentTypeRepositoryBase.cs
diff --git a/src/Umbraco.Core/Persistence/Repositories/Implement/DataTypeContainerRepository.cs b/src/Umbraco.Infrastructure/Persistence/Repositories/Implement/DataTypeContainerRepository.cs
similarity index 77%
rename from src/Umbraco.Core/Persistence/Repositories/Implement/DataTypeContainerRepository.cs
rename to src/Umbraco.Infrastructure/Persistence/Repositories/Implement/DataTypeContainerRepository.cs
index 752b641bc3..f36b60484a 100644
--- a/src/Umbraco.Core/Persistence/Repositories/Implement/DataTypeContainerRepository.cs
+++ b/src/Umbraco.Infrastructure/Persistence/Repositories/Implement/DataTypeContainerRepository.cs
@@ -4,7 +4,7 @@ using Umbraco.Core.Scoping;
namespace Umbraco.Core.Persistence.Repositories.Implement
{
- class DataTypeContainerRepository : EntityContainerRepository, IDataTypeContainerRepository
+ internal class DataTypeContainerRepository : EntityContainerRepository, IDataTypeContainerRepository
{
public DataTypeContainerRepository(IScopeAccessor scopeAccessor, AppCaches cache, ILogger logger)
: base(scopeAccessor, cache, logger, Constants.ObjectTypes.DataTypeContainer)
diff --git a/src/Umbraco.Core/Persistence/Repositories/Implement/DataTypeRepository.cs b/src/Umbraco.Infrastructure/Persistence/Repositories/Implement/DataTypeRepository.cs
similarity index 94%
rename from src/Umbraco.Core/Persistence/Repositories/Implement/DataTypeRepository.cs
rename to src/Umbraco.Infrastructure/Persistence/Repositories/Implement/DataTypeRepository.cs
index 73db1775f8..1f0d944c7e 100644
--- a/src/Umbraco.Core/Persistence/Repositories/Implement/DataTypeRepository.cs
+++ b/src/Umbraco.Infrastructure/Persistence/Repositories/Implement/DataTypeRepository.cs
@@ -29,14 +29,20 @@ namespace Umbraco.Core.Persistence.Repositories.Implement
{
private readonly Lazy _editors;
private readonly IIOHelper _ioHelper;
+ private readonly Lazy _dataTypeService;
+ private readonly ILocalizedTextService _localizedTextService;
+ private readonly ILocalizationService _localizationService;
private readonly IShortStringHelper _shortStringHelper;
// TODO: https://github.com/umbraco/Umbraco-CMS/issues/4237 - get rid of Lazy injection and fix circular dependencies
- public DataTypeRepository(IScopeAccessor scopeAccessor, AppCaches cache, Lazy editors, ILogger logger, IIOHelper ioHelper, IShortStringHelper shortStringHelper)
+ public DataTypeRepository(IScopeAccessor scopeAccessor, AppCaches cache, Lazy editors, ILogger logger, IIOHelper ioHelper, Lazy dataTypeService, ILocalizedTextService localizedTextService, ILocalizationService localizationService, IShortStringHelper shortStringHelper)
: base(scopeAccessor, cache, logger)
{
_editors = editors;
_ioHelper = ioHelper;
+ _dataTypeService = dataTypeService;
+ _localizedTextService = localizedTextService;
+ _localizationService = localizationService;
_shortStringHelper = shortStringHelper;
}
@@ -61,7 +67,7 @@ namespace Umbraco.Core.Persistence.Repositories.Implement
}
var dtos = Database.Fetch(dataTypeSql);
- return dtos.Select(x => DataTypeFactory.BuildEntity(x, _editors.Value, Logger,_ioHelper, _shortStringHelper)).ToArray();
+ return dtos.Select(x => DataTypeFactory.BuildEntity(x, _editors.Value, Logger,_ioHelper, _dataTypeService.Value, _localizedTextService, _localizationService, _shortStringHelper)).ToArray();
}
protected override IEnumerable PerformGetByQuery(IQuery query)
@@ -72,7 +78,7 @@ namespace Umbraco.Core.Persistence.Repositories.Implement
var dtos = Database.Fetch(sql);
- return dtos.Select(x => DataTypeFactory.BuildEntity(x, _editors.Value, Logger, _ioHelper, _shortStringHelper)).ToArray();
+ return dtos.Select(x => DataTypeFactory.BuildEntity(x, _editors.Value, Logger, _ioHelper, _dataTypeService.Value, _localizedTextService, _localizationService, _shortStringHelper)).ToArray();
}
#endregion
diff --git a/src/Umbraco.Core/Persistence/Repositories/Implement/DictionaryRepository.cs b/src/Umbraco.Infrastructure/Persistence/Repositories/Implement/DictionaryRepository.cs
similarity index 100%
rename from src/Umbraco.Core/Persistence/Repositories/Implement/DictionaryRepository.cs
rename to src/Umbraco.Infrastructure/Persistence/Repositories/Implement/DictionaryRepository.cs
diff --git a/src/Umbraco.Core/Persistence/Repositories/Implement/DocumentBlueprintRepository.cs b/src/Umbraco.Infrastructure/Persistence/Repositories/Implement/DocumentBlueprintRepository.cs
similarity index 100%
rename from src/Umbraco.Core/Persistence/Repositories/Implement/DocumentBlueprintRepository.cs
rename to src/Umbraco.Infrastructure/Persistence/Repositories/Implement/DocumentBlueprintRepository.cs
diff --git a/src/Umbraco.Core/Persistence/Repositories/Implement/DocumentRepository.cs b/src/Umbraco.Infrastructure/Persistence/Repositories/Implement/DocumentRepository.cs
similarity index 99%
rename from src/Umbraco.Core/Persistence/Repositories/Implement/DocumentRepository.cs
rename to src/Umbraco.Infrastructure/Persistence/Repositories/Implement/DocumentRepository.cs
index c6041e8f8c..a05e8cfe7f 100644
--- a/src/Umbraco.Core/Persistence/Repositories/Implement/DocumentRepository.cs
+++ b/src/Umbraco.Infrastructure/Persistence/Repositories/Implement/DocumentRepository.cs
@@ -21,7 +21,7 @@ namespace Umbraco.Core.Persistence.Repositories.Implement
///
/// Represents a repository for doing CRUD operations for .
///
- internal class DocumentRepository : ContentRepositoryBase, IDocumentRepository
+ public class DocumentRepository : ContentRepositoryBase, IDocumentRepository
{
private readonly IContentTypeRepository _contentTypeRepository;
private readonly ITemplateRepository _templateRepository;
diff --git a/src/Umbraco.Core/Persistence/Repositories/Implement/DocumentTypeContainerRepository.cs b/src/Umbraco.Infrastructure/Persistence/Repositories/Implement/DocumentTypeContainerRepository.cs
similarity index 76%
rename from src/Umbraco.Core/Persistence/Repositories/Implement/DocumentTypeContainerRepository.cs
rename to src/Umbraco.Infrastructure/Persistence/Repositories/Implement/DocumentTypeContainerRepository.cs
index d50981e036..4b5fe8817b 100644
--- a/src/Umbraco.Core/Persistence/Repositories/Implement/DocumentTypeContainerRepository.cs
+++ b/src/Umbraco.Infrastructure/Persistence/Repositories/Implement/DocumentTypeContainerRepository.cs
@@ -4,7 +4,7 @@ using Umbraco.Core.Scoping;
namespace Umbraco.Core.Persistence.Repositories.Implement
{
- class DocumentTypeContainerRepository : EntityContainerRepository, IDocumentTypeContainerRepository
+ internal class DocumentTypeContainerRepository : EntityContainerRepository, IDocumentTypeContainerRepository
{
public DocumentTypeContainerRepository(IScopeAccessor scopeAccessor, AppCaches cache, ILogger logger)
: base(scopeAccessor, cache, logger, Constants.ObjectTypes.DocumentTypeContainer)
diff --git a/src/Umbraco.Core/Persistence/Repositories/Implement/DomainRepository.cs b/src/Umbraco.Infrastructure/Persistence/Repositories/Implement/DomainRepository.cs
similarity index 100%
rename from src/Umbraco.Core/Persistence/Repositories/Implement/DomainRepository.cs
rename to src/Umbraco.Infrastructure/Persistence/Repositories/Implement/DomainRepository.cs
diff --git a/src/Umbraco.Core/Persistence/Repositories/Implement/EntityContainerRepository.cs b/src/Umbraco.Infrastructure/Persistence/Repositories/Implement/EntityContainerRepository.cs
similarity index 100%
rename from src/Umbraco.Core/Persistence/Repositories/Implement/EntityContainerRepository.cs
rename to src/Umbraco.Infrastructure/Persistence/Repositories/Implement/EntityContainerRepository.cs
diff --git a/src/Umbraco.Core/Persistence/Repositories/Implement/EntityRepository.cs b/src/Umbraco.Infrastructure/Persistence/Repositories/Implement/EntityRepository.cs
similarity index 100%
rename from src/Umbraco.Core/Persistence/Repositories/Implement/EntityRepository.cs
rename to src/Umbraco.Infrastructure/Persistence/Repositories/Implement/EntityRepository.cs
diff --git a/src/Umbraco.Core/Persistence/Repositories/Implement/ExternalLoginRepository.cs b/src/Umbraco.Infrastructure/Persistence/Repositories/Implement/ExternalLoginRepository.cs
similarity index 99%
rename from src/Umbraco.Core/Persistence/Repositories/Implement/ExternalLoginRepository.cs
rename to src/Umbraco.Infrastructure/Persistence/Repositories/Implement/ExternalLoginRepository.cs
index bb1bd29a8a..6d6a654d4e 100644
--- a/src/Umbraco.Core/Persistence/Repositories/Implement/ExternalLoginRepository.cs
+++ b/src/Umbraco.Infrastructure/Persistence/Repositories/Implement/ExternalLoginRepository.cs
@@ -1,7 +1,6 @@
using System;
using System.Collections.Generic;
using System.Linq;
-using Microsoft.AspNet.Identity;
using NPoco;
using Umbraco.Core.Cache;
using Umbraco.Core.Logging;
@@ -152,7 +151,7 @@ namespace Umbraco.Core.Persistence.Repositories.Implement
protected override void PersistUpdatedItem(IIdentityUserLogin entity)
{
entity.UpdatingEntity();
-
+
var dto = ExternalLoginFactory.BuildDto(entity);
Database.Update(dto);
diff --git a/src/Umbraco.Core/Persistence/Repositories/Implement/FileRepository.cs b/src/Umbraco.Infrastructure/Persistence/Repositories/Implement/FileRepository.cs
similarity index 100%
rename from src/Umbraco.Core/Persistence/Repositories/Implement/FileRepository.cs
rename to src/Umbraco.Infrastructure/Persistence/Repositories/Implement/FileRepository.cs
diff --git a/src/Umbraco.Core/Persistence/Repositories/Implement/LanguageRepository.cs b/src/Umbraco.Infrastructure/Persistence/Repositories/Implement/LanguageRepository.cs
similarity index 100%
rename from src/Umbraco.Core/Persistence/Repositories/Implement/LanguageRepository.cs
rename to src/Umbraco.Infrastructure/Persistence/Repositories/Implement/LanguageRepository.cs
diff --git a/src/Umbraco.Core/Persistence/Repositories/Implement/LanguageRepositoryExtensions.cs b/src/Umbraco.Infrastructure/Persistence/Repositories/Implement/LanguageRepositoryExtensions.cs
similarity index 100%
rename from src/Umbraco.Core/Persistence/Repositories/Implement/LanguageRepositoryExtensions.cs
rename to src/Umbraco.Infrastructure/Persistence/Repositories/Implement/LanguageRepositoryExtensions.cs
diff --git a/src/Umbraco.Core/Persistence/Repositories/Implement/MacroRepository.cs b/src/Umbraco.Infrastructure/Persistence/Repositories/Implement/MacroRepository.cs
similarity index 100%
rename from src/Umbraco.Core/Persistence/Repositories/Implement/MacroRepository.cs
rename to src/Umbraco.Infrastructure/Persistence/Repositories/Implement/MacroRepository.cs
diff --git a/src/Umbraco.Core/Persistence/Repositories/Implement/MediaRepository.cs b/src/Umbraco.Infrastructure/Persistence/Repositories/Implement/MediaRepository.cs
similarity index 99%
rename from src/Umbraco.Core/Persistence/Repositories/Implement/MediaRepository.cs
rename to src/Umbraco.Infrastructure/Persistence/Repositories/Implement/MediaRepository.cs
index c813bdaa5a..a48012ac26 100644
--- a/src/Umbraco.Core/Persistence/Repositories/Implement/MediaRepository.cs
+++ b/src/Umbraco.Infrastructure/Persistence/Repositories/Implement/MediaRepository.cs
@@ -21,7 +21,7 @@ namespace Umbraco.Core.Persistence.Repositories.Implement
///
/// Represents a repository for doing CRUD operations for
///
- internal class MediaRepository : ContentRepositoryBase, IMediaRepository
+ public class MediaRepository : ContentRepositoryBase, IMediaRepository
{
private readonly IMediaTypeRepository _mediaTypeRepository;
private readonly ITagRepository _tagRepository;
diff --git a/src/Umbraco.Core/Persistence/Repositories/Implement/MediaTypeContainerRepository.cs b/src/Umbraco.Infrastructure/Persistence/Repositories/Implement/MediaTypeContainerRepository.cs
similarity index 100%
rename from src/Umbraco.Core/Persistence/Repositories/Implement/MediaTypeContainerRepository.cs
rename to src/Umbraco.Infrastructure/Persistence/Repositories/Implement/MediaTypeContainerRepository.cs
diff --git a/src/Umbraco.Core/Persistence/Repositories/Implement/MediaTypeRepository.cs b/src/Umbraco.Infrastructure/Persistence/Repositories/Implement/MediaTypeRepository.cs
similarity index 100%
rename from src/Umbraco.Core/Persistence/Repositories/Implement/MediaTypeRepository.cs
rename to src/Umbraco.Infrastructure/Persistence/Repositories/Implement/MediaTypeRepository.cs
diff --git a/src/Umbraco.Core/Persistence/Repositories/Implement/MemberGroupRepository.cs b/src/Umbraco.Infrastructure/Persistence/Repositories/Implement/MemberGroupRepository.cs
similarity index 100%
rename from src/Umbraco.Core/Persistence/Repositories/Implement/MemberGroupRepository.cs
rename to src/Umbraco.Infrastructure/Persistence/Repositories/Implement/MemberGroupRepository.cs
diff --git a/src/Umbraco.Core/Persistence/Repositories/Implement/MemberRepository.cs b/src/Umbraco.Infrastructure/Persistence/Repositories/Implement/MemberRepository.cs
similarity index 98%
rename from src/Umbraco.Core/Persistence/Repositories/Implement/MemberRepository.cs
rename to src/Umbraco.Infrastructure/Persistence/Repositories/Implement/MemberRepository.cs
index 5bf8ce4419..64266f9df8 100644
--- a/src/Umbraco.Core/Persistence/Repositories/Implement/MemberRepository.cs
+++ b/src/Umbraco.Infrastructure/Persistence/Repositories/Implement/MemberRepository.cs
@@ -1,7 +1,6 @@
using System;
using System.Collections.Generic;
using System.Linq;
-using Microsoft.AspNet.Identity;
using NPoco;
using Umbraco.Core.Cache;
using Umbraco.Core.Logging;
@@ -12,6 +11,7 @@ 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.Services;
using static Umbraco.Core.Persistence.SqlExtensionsStatics;
@@ -20,14 +20,16 @@ namespace Umbraco.Core.Persistence.Repositories.Implement
///
/// Represents a repository for doing CRUD operations for
///
- internal class MemberRepository : ContentRepositoryBase, IMemberRepository
+ public class MemberRepository : ContentRepositoryBase, IMemberRepository
{
private readonly IMemberTypeRepository _memberTypeRepository;
private readonly ITagRepository _tagRepository;
+ private readonly IPasswordHasher _passwordHasher;
private readonly IMemberGroupRepository _memberGroupRepository;
public MemberRepository(IScopeAccessor scopeAccessor, AppCaches cache, ILogger logger,
IMemberTypeRepository memberTypeRepository, IMemberGroupRepository memberGroupRepository, ITagRepository tagRepository, ILanguageRepository languageRepository, IRelationRepository relationRepository, IRelationTypeRepository relationTypeRepository,
+ IPasswordHasher passwordHasher,
Lazy propertyEditors,
DataValueReferenceFactoryCollection dataValueReferenceFactories,
IDataTypeService dataTypeService)
@@ -35,6 +37,7 @@ namespace Umbraco.Core.Persistence.Repositories.Implement
{
_memberTypeRepository = memberTypeRepository ?? throw new ArgumentNullException(nameof(memberTypeRepository));
_tagRepository = tagRepository ?? throw new ArgumentNullException(nameof(tagRepository));
+ _passwordHasher = passwordHasher;
_memberGroupRepository = memberGroupRepository;
}
@@ -308,8 +311,8 @@ namespace Umbraco.Core.Persistence.Repositories.Implement
// this will hash the guid with a salt so should be nicely random
if (entity.RawPasswordValue.IsNullOrWhiteSpace())
{
- var aspHasher = new PasswordHasher();
- dto.Password = Constants.Security.EmptyPasswordPrefix + aspHasher.HashPassword(Guid.NewGuid().ToString("N"));
+
+ dto.Password = Constants.Security.EmptyPasswordPrefix + _passwordHasher.HashPassword(Guid.NewGuid().ToString("N"));
entity.RawPasswordValue = dto.Password;
}
diff --git a/src/Umbraco.Core/Persistence/Repositories/Implement/MemberTypeRepository.cs b/src/Umbraco.Infrastructure/Persistence/Repositories/Implement/MemberTypeRepository.cs
similarity index 100%
rename from src/Umbraco.Core/Persistence/Repositories/Implement/MemberTypeRepository.cs
rename to src/Umbraco.Infrastructure/Persistence/Repositories/Implement/MemberTypeRepository.cs
diff --git a/src/Umbraco.Core/Persistence/Repositories/Implement/NPocoRepositoryBase.cs b/src/Umbraco.Infrastructure/Persistence/Repositories/Implement/NPocoRepositoryBase.cs
similarity index 96%
rename from src/Umbraco.Core/Persistence/Repositories/Implement/NPocoRepositoryBase.cs
rename to src/Umbraco.Infrastructure/Persistence/Repositories/Implement/NPocoRepositoryBase.cs
index 23236ec9f0..d72eb9de9b 100644
--- a/src/Umbraco.Core/Persistence/Repositories/Implement/NPocoRepositoryBase.cs
+++ b/src/Umbraco.Infrastructure/Persistence/Repositories/Implement/NPocoRepositoryBase.cs
@@ -15,7 +15,7 @@ namespace Umbraco.Core.Persistence.Repositories.Implement
///
///
///
- internal abstract class NPocoRepositoryBase : RepositoryBase
+ public abstract class NPocoRepositoryBase : RepositoryBase
where TEntity : class, IEntity
{
///
diff --git a/src/Umbraco.Core/Persistence/Repositories/Implement/NotificationsRepository.cs b/src/Umbraco.Infrastructure/Persistence/Repositories/Implement/NotificationsRepository.cs
similarity index 100%
rename from src/Umbraco.Core/Persistence/Repositories/Implement/NotificationsRepository.cs
rename to src/Umbraco.Infrastructure/Persistence/Repositories/Implement/NotificationsRepository.cs
diff --git a/src/Umbraco.Core/Persistence/Repositories/Implement/PartialViewMacroRepository.cs b/src/Umbraco.Infrastructure/Persistence/Repositories/Implement/PartialViewMacroRepository.cs
similarity index 100%
rename from src/Umbraco.Core/Persistence/Repositories/Implement/PartialViewMacroRepository.cs
rename to src/Umbraco.Infrastructure/Persistence/Repositories/Implement/PartialViewMacroRepository.cs
diff --git a/src/Umbraco.Core/Persistence/Repositories/Implement/PartialViewRepository.cs b/src/Umbraco.Infrastructure/Persistence/Repositories/Implement/PartialViewRepository.cs
similarity index 100%
rename from src/Umbraco.Core/Persistence/Repositories/Implement/PartialViewRepository.cs
rename to src/Umbraco.Infrastructure/Persistence/Repositories/Implement/PartialViewRepository.cs
diff --git a/src/Umbraco.Core/Persistence/Repositories/Implement/PermissionRepository.cs b/src/Umbraco.Infrastructure/Persistence/Repositories/Implement/PermissionRepository.cs
similarity index 100%
rename from src/Umbraco.Core/Persistence/Repositories/Implement/PermissionRepository.cs
rename to src/Umbraco.Infrastructure/Persistence/Repositories/Implement/PermissionRepository.cs
diff --git a/src/Umbraco.Core/Persistence/Repositories/Implement/PublicAccessRepository.cs b/src/Umbraco.Infrastructure/Persistence/Repositories/Implement/PublicAccessRepository.cs
similarity index 100%
rename from src/Umbraco.Core/Persistence/Repositories/Implement/PublicAccessRepository.cs
rename to src/Umbraco.Infrastructure/Persistence/Repositories/Implement/PublicAccessRepository.cs
diff --git a/src/Umbraco.Core/Persistence/Repositories/Implement/QueryType.cs b/src/Umbraco.Infrastructure/Persistence/Repositories/Implement/QueryType.cs
similarity index 95%
rename from src/Umbraco.Core/Persistence/Repositories/Implement/QueryType.cs
rename to src/Umbraco.Infrastructure/Persistence/Repositories/Implement/QueryType.cs
index 8b7ab9285a..7b44bd3955 100644
--- a/src/Umbraco.Core/Persistence/Repositories/Implement/QueryType.cs
+++ b/src/Umbraco.Infrastructure/Persistence/Repositories/Implement/QueryType.cs
@@ -3,7 +3,7 @@
///
/// Specifies the type of base query.
///
- internal enum QueryType
+ public enum QueryType
{
///
/// Get one single complete item.
diff --git a/src/Umbraco.Core/Persistence/Repositories/Implement/RedirectUrlRepository.cs b/src/Umbraco.Infrastructure/Persistence/Repositories/Implement/RedirectUrlRepository.cs
similarity index 100%
rename from src/Umbraco.Core/Persistence/Repositories/Implement/RedirectUrlRepository.cs
rename to src/Umbraco.Infrastructure/Persistence/Repositories/Implement/RedirectUrlRepository.cs
diff --git a/src/Umbraco.Core/Persistence/Repositories/Implement/RelationRepository.cs b/src/Umbraco.Infrastructure/Persistence/Repositories/Implement/RelationRepository.cs
similarity index 100%
rename from src/Umbraco.Core/Persistence/Repositories/Implement/RelationRepository.cs
rename to src/Umbraco.Infrastructure/Persistence/Repositories/Implement/RelationRepository.cs
diff --git a/src/Umbraco.Core/Persistence/Repositories/Implement/RelationTypeRepository.cs b/src/Umbraco.Infrastructure/Persistence/Repositories/Implement/RelationTypeRepository.cs
similarity index 100%
rename from src/Umbraco.Core/Persistence/Repositories/Implement/RelationTypeRepository.cs
rename to src/Umbraco.Infrastructure/Persistence/Repositories/Implement/RelationTypeRepository.cs
diff --git a/src/Umbraco.Core/Persistence/Repositories/Implement/RepositoryBaseOfTIdTEntity.cs b/src/Umbraco.Infrastructure/Persistence/Repositories/Implement/RepositoryBaseOfTIdTEntity.cs
similarity index 98%
rename from src/Umbraco.Core/Persistence/Repositories/Implement/RepositoryBaseOfTIdTEntity.cs
rename to src/Umbraco.Infrastructure/Persistence/Repositories/Implement/RepositoryBaseOfTIdTEntity.cs
index 69e4db5940..e8397ba22a 100644
--- a/src/Umbraco.Core/Persistence/Repositories/Implement/RepositoryBaseOfTIdTEntity.cs
+++ b/src/Umbraco.Infrastructure/Persistence/Repositories/Implement/RepositoryBaseOfTIdTEntity.cs
@@ -14,7 +14,7 @@ namespace Umbraco.Core.Persistence.Repositories.Implement
///
/// The type of the entity managed by this repository.
/// The type of the entity's unique identifier.
- internal abstract class RepositoryBase : IReadWriteQueryRepository
+ public abstract class RepositoryBase : IReadWriteQueryRepository
where TEntity : class, IEntity
{
private IRepositoryCachePolicy _cachePolicy;
diff --git a/src/Umbraco.Core/Persistence/Repositories/Implement/RepositoryCacheKeys.cs b/src/Umbraco.Infrastructure/Persistence/Repositories/Implement/RepositoryCacheKeys.cs
similarity index 92%
rename from src/Umbraco.Core/Persistence/Repositories/Implement/RepositoryCacheKeys.cs
rename to src/Umbraco.Infrastructure/Persistence/Repositories/Implement/RepositoryCacheKeys.cs
index 09a7c021f8..693656eb65 100644
--- a/src/Umbraco.Core/Persistence/Repositories/Implement/RepositoryCacheKeys.cs
+++ b/src/Umbraco.Infrastructure/Persistence/Repositories/Implement/RepositoryCacheKeys.cs
@@ -6,7 +6,7 @@ namespace Umbraco.Core.Persistence.Repositories.Implement
///
/// Provides cache keys for repositories.
///
- internal static class RepositoryCacheKeys
+ public static class RepositoryCacheKeys
{
private static readonly Dictionary Keys = new Dictionary();
diff --git a/src/Umbraco.Core/Persistence/Repositories/Implement/ScriptRepository.cs b/src/Umbraco.Infrastructure/Persistence/Repositories/Implement/ScriptRepository.cs
similarity index 94%
rename from src/Umbraco.Core/Persistence/Repositories/Implement/ScriptRepository.cs
rename to src/Umbraco.Infrastructure/Persistence/Repositories/Implement/ScriptRepository.cs
index 22c3ff3067..498cf51432 100644
--- a/src/Umbraco.Core/Persistence/Repositories/Implement/ScriptRepository.cs
+++ b/src/Umbraco.Infrastructure/Persistence/Repositories/Implement/ScriptRepository.cs
@@ -2,8 +2,7 @@
using System.Collections.Generic;
using System.IO;
using System.Linq;
-using Umbraco.Core.Composing;
-using Umbraco.Core.Configuration.UmbracoSettings;
+using Umbraco.Core.Configuration;
using Umbraco.Core.IO;
using Umbraco.Core.Models;
@@ -15,11 +14,13 @@ namespace Umbraco.Core.Persistence.Repositories.Implement
internal class ScriptRepository : FileRepository, IScriptRepository
{
private readonly IIOHelper _ioHelper;
+ private readonly IGlobalSettings _globalSettings;
- public ScriptRepository(IFileSystems fileSystems, IIOHelper ioHelper)
+ public ScriptRepository(IFileSystems fileSystems, IIOHelper ioHelper, IGlobalSettings globalSettings)
: base(fileSystems.ScriptsFileSystem)
{
_ioHelper = ioHelper ?? throw new ArgumentNullException(nameof(ioHelper));
+ _globalSettings = globalSettings;
}
#region Implementation of IRepository
@@ -104,7 +105,7 @@ namespace Umbraco.Core.Persistence.Repositories.Implement
}
// validate path & extension
- var validDir = Current.Configs.Global().UmbracoScriptsPath;
+ var validDir = _globalSettings.UmbracoScriptsPath;
var isValidPath = _ioHelper.VerifyEditPath(fullPath, validDir);
var validExts = new[] {"js"};
var isValidExtension = _ioHelper.VerifyFileExtension(script.Path, validExts);
diff --git a/src/Umbraco.Core/Persistence/Repositories/Implement/ServerRegistrationRepository.cs b/src/Umbraco.Infrastructure/Persistence/Repositories/Implement/ServerRegistrationRepository.cs
similarity index 100%
rename from src/Umbraco.Core/Persistence/Repositories/Implement/ServerRegistrationRepository.cs
rename to src/Umbraco.Infrastructure/Persistence/Repositories/Implement/ServerRegistrationRepository.cs
diff --git a/src/Umbraco.Core/Persistence/Repositories/Implement/SimilarNodeName.cs b/src/Umbraco.Infrastructure/Persistence/Repositories/Implement/SimilarNodeName.cs
similarity index 100%
rename from src/Umbraco.Core/Persistence/Repositories/Implement/SimilarNodeName.cs
rename to src/Umbraco.Infrastructure/Persistence/Repositories/Implement/SimilarNodeName.cs
diff --git a/src/Umbraco.Core/Persistence/Repositories/Implement/SimpleGetRepository.cs b/src/Umbraco.Infrastructure/Persistence/Repositories/Implement/SimpleGetRepository.cs
similarity index 100%
rename from src/Umbraco.Core/Persistence/Repositories/Implement/SimpleGetRepository.cs
rename to src/Umbraco.Infrastructure/Persistence/Repositories/Implement/SimpleGetRepository.cs
diff --git a/src/Umbraco.Core/Persistence/Repositories/Implement/StylesheetRepository.cs b/src/Umbraco.Infrastructure/Persistence/Repositories/Implement/StylesheetRepository.cs
similarity index 95%
rename from src/Umbraco.Core/Persistence/Repositories/Implement/StylesheetRepository.cs
rename to src/Umbraco.Infrastructure/Persistence/Repositories/Implement/StylesheetRepository.cs
index dc60c332cd..c1fb5c3159 100644
--- a/src/Umbraco.Core/Persistence/Repositories/Implement/StylesheetRepository.cs
+++ b/src/Umbraco.Infrastructure/Persistence/Repositories/Implement/StylesheetRepository.cs
@@ -1,7 +1,7 @@
using System.Collections.Generic;
using System.IO;
using System.Linq;
-using Umbraco.Core.Composing;
+using Umbraco.Core.Configuration;
using Umbraco.Core.IO;
using Umbraco.Core.Models;
@@ -13,11 +13,13 @@ namespace Umbraco.Core.Persistence.Repositories.Implement
internal class StylesheetRepository : FileRepository, IStylesheetRepository
{
private readonly IIOHelper _ioHelper;
+ private readonly IGlobalSettings _globalSettings;
- public StylesheetRepository(IFileSystems fileSystems, IIOHelper ioHelper)
+ public StylesheetRepository(IFileSystems fileSystems, IIOHelper ioHelper, IGlobalSettings globalSettings)
: base(fileSystems.StylesheetsFileSystem)
{
_ioHelper = ioHelper;
+ _globalSettings = globalSettings;
}
#region Overrides of FileRepository
@@ -121,7 +123,7 @@ namespace Umbraco.Core.Persistence.Repositories.Implement
}
// validate path and extension
- var validDir = Current.Configs.Global().UmbracoCssPath;
+ var validDir = _globalSettings.UmbracoCssPath;
var isValidPath = _ioHelper.VerifyEditPath(fullPath, validDir);
var isValidExtension = _ioHelper.VerifyFileExtension(stylesheet.Path, ValidExtensions);
return isValidPath && isValidExtension;
diff --git a/src/Umbraco.Core/Persistence/Repositories/Implement/TagRepository.cs b/src/Umbraco.Infrastructure/Persistence/Repositories/Implement/TagRepository.cs
similarity index 100%
rename from src/Umbraco.Core/Persistence/Repositories/Implement/TagRepository.cs
rename to src/Umbraco.Infrastructure/Persistence/Repositories/Implement/TagRepository.cs
diff --git a/src/Umbraco.Core/Persistence/Repositories/Implement/TemplateRepository.cs b/src/Umbraco.Infrastructure/Persistence/Repositories/Implement/TemplateRepository.cs
similarity index 99%
rename from src/Umbraco.Core/Persistence/Repositories/Implement/TemplateRepository.cs
rename to src/Umbraco.Infrastructure/Persistence/Repositories/Implement/TemplateRepository.cs
index 83a80da5bc..3db94b026e 100644
--- a/src/Umbraco.Core/Persistence/Repositories/Implement/TemplateRepository.cs
+++ b/src/Umbraco.Infrastructure/Persistence/Repositories/Implement/TemplateRepository.cs
@@ -5,7 +5,6 @@ using System.Linq;
using System.Text;
using NPoco;
using Umbraco.Core.Cache;
-using Umbraco.Core.Composing;
using Umbraco.Core.IO;
using Umbraco.Core.Logging;
using Umbraco.Core.Models;
diff --git a/src/Umbraco.Core/Persistence/Repositories/Implement/TupleExtensions.cs b/src/Umbraco.Infrastructure/Persistence/Repositories/Implement/TupleExtensions.cs
similarity index 100%
rename from src/Umbraco.Core/Persistence/Repositories/Implement/TupleExtensions.cs
rename to src/Umbraco.Infrastructure/Persistence/Repositories/Implement/TupleExtensions.cs
diff --git a/src/Umbraco.Core/Persistence/Repositories/Implement/UserGroupRepository.cs b/src/Umbraco.Infrastructure/Persistence/Repositories/Implement/UserGroupRepository.cs
similarity index 99%
rename from src/Umbraco.Core/Persistence/Repositories/Implement/UserGroupRepository.cs
rename to src/Umbraco.Infrastructure/Persistence/Repositories/Implement/UserGroupRepository.cs
index b8e4a67d78..1f0ab0cbe7 100644
--- a/src/Umbraco.Core/Persistence/Repositories/Implement/UserGroupRepository.cs
+++ b/src/Umbraco.Infrastructure/Persistence/Repositories/Implement/UserGroupRepository.cs
@@ -3,7 +3,6 @@ using System.Collections.Generic;
using System.Linq;
using NPoco;
using Umbraco.Core.Cache;
-using Umbraco.Core.Exceptions;
using Umbraco.Core.Logging;
using Umbraco.Core.Models;
using Umbraco.Core.Models.Entities;
@@ -19,7 +18,7 @@ namespace Umbraco.Core.Persistence.Repositories.Implement
///
/// Represents the UserGroupRepository for doing CRUD operations for
///
- internal class UserGroupRepository : NPocoRepositoryBase, IUserGroupRepository
+ public class UserGroupRepository : NPocoRepositoryBase, IUserGroupRepository
{
private readonly IShortStringHelper _shortStringHelper;
private readonly UserGroupWithUsersRepository _userGroupWithUsersRepository;
diff --git a/src/Umbraco.Core/Persistence/Repositories/Implement/UserRepository.cs b/src/Umbraco.Infrastructure/Persistence/Repositories/Implement/UserRepository.cs
similarity index 100%
rename from src/Umbraco.Core/Persistence/Repositories/Implement/UserRepository.cs
rename to src/Umbraco.Infrastructure/Persistence/Repositories/Implement/UserRepository.cs
diff --git a/src/Umbraco.Core/Persistence/UmbracoDatabaseExtensions.cs b/src/Umbraco.Infrastructure/Persistence/UmbracoDatabaseExtensions.cs
similarity index 100%
rename from src/Umbraco.Core/Persistence/UmbracoDatabaseExtensions.cs
rename to src/Umbraco.Infrastructure/Persistence/UmbracoDatabaseExtensions.cs
diff --git a/src/Umbraco.Core/PropertyEditors/DataValueReferenceFactoryCollection.cs b/src/Umbraco.Infrastructure/PropertyEditors/DataValueReferenceFactoryCollection.cs
similarity index 100%
rename from src/Umbraco.Core/PropertyEditors/DataValueReferenceFactoryCollection.cs
rename to src/Umbraco.Infrastructure/PropertyEditors/DataValueReferenceFactoryCollection.cs
diff --git a/src/Umbraco.Core/PropertyEditors/DataValueReferenceFactoryCollectionBuilder.cs b/src/Umbraco.Infrastructure/PropertyEditors/DataValueReferenceFactoryCollectionBuilder.cs
similarity index 100%
rename from src/Umbraco.Core/PropertyEditors/DataValueReferenceFactoryCollectionBuilder.cs
rename to src/Umbraco.Infrastructure/PropertyEditors/DataValueReferenceFactoryCollectionBuilder.cs
diff --git a/src/Umbraco.Core/PropertyEditors/IDataValueReference.cs b/src/Umbraco.Infrastructure/PropertyEditors/IDataValueReference.cs
similarity index 100%
rename from src/Umbraco.Core/PropertyEditors/IDataValueReference.cs
rename to src/Umbraco.Infrastructure/PropertyEditors/IDataValueReference.cs
diff --git a/src/Umbraco.Core/PropertyEditors/IDataValueReferenceFactory.cs b/src/Umbraco.Infrastructure/PropertyEditors/IDataValueReferenceFactory.cs
similarity index 100%
rename from src/Umbraco.Core/PropertyEditors/IDataValueReferenceFactory.cs
rename to src/Umbraco.Infrastructure/PropertyEditors/IDataValueReferenceFactory.cs
diff --git a/src/Umbraco.Core/Runtime/CoreInitialComponent.cs b/src/Umbraco.Infrastructure/Runtime/CoreInitialComponent.cs
similarity index 100%
rename from src/Umbraco.Core/Runtime/CoreInitialComponent.cs
rename to src/Umbraco.Infrastructure/Runtime/CoreInitialComponent.cs
diff --git a/src/Umbraco.Core/RuntimeOptions.cs b/src/Umbraco.Infrastructure/RuntimeOptions.cs
similarity index 100%
rename from src/Umbraco.Core/RuntimeOptions.cs
rename to src/Umbraco.Infrastructure/RuntimeOptions.cs
diff --git a/src/Umbraco.Core/RuntimeState.cs b/src/Umbraco.Infrastructure/RuntimeState.cs
similarity index 99%
rename from src/Umbraco.Core/RuntimeState.cs
rename to src/Umbraco.Infrastructure/RuntimeState.cs
index 8b639fdaec..5952e73e62 100644
--- a/src/Umbraco.Core/RuntimeState.cs
+++ b/src/Umbraco.Infrastructure/RuntimeState.cs
@@ -17,7 +17,7 @@ namespace Umbraco.Core
///
/// Represents the state of the Umbraco runtime.
///
- internal class RuntimeState : IRuntimeState
+ public class RuntimeState : IRuntimeState
{
private readonly ILogger _logger;
private readonly IUmbracoSettingsSection _settings;
@@ -105,7 +105,7 @@ namespace Umbraco.Core
///
/// Ensures that the property has a value.
///
- internal void EnsureApplicationUrl()
+ public void EnsureApplicationUrl()
{
//Fixme: This causes problems with site swap on azure because azure pre-warms a site by calling into `localhost` and when it does that
// it changes the URL to `localhost:80` which actually doesn't work for pinging itself, it only works internally in Azure. The ironic part
@@ -257,7 +257,7 @@ namespace Umbraco.Core
protected virtual bool EnsureUmbracoUpgradeState(IUmbracoDatabaseFactory databaseFactory, ILogger logger)
{
- var upgrader = new Upgrader(new UmbracoPlan(_umbracoVersion));
+ var upgrader = new Upgrader(new UmbracoPlan(_umbracoVersion, _globalSettings));
var stateValueKey = upgrader.StateValueKey;
// no scope, no service - just directly accessing the database
diff --git a/src/Umbraco.Infrastructure/Scoping/CallContext.cs b/src/Umbraco.Infrastructure/Scoping/CallContext.cs
new file mode 100644
index 0000000000..2937990eab
--- /dev/null
+++ b/src/Umbraco.Infrastructure/Scoping/CallContext.cs
@@ -0,0 +1,39 @@
+using System;
+using System.Collections.Concurrent;
+using System.Threading;
+
+namespace Umbraco.Core.Scoping
+{
+ ///
+ /// Represents ambient data that is local to a given asynchronous control flow, such as an asynchronous method.
+ ///
+ ///
+ /// This is just a simple wrapper around
+ ///
+ public static class CallContext
+ {
+ private static ConcurrentDictionary> _state = new ConcurrentDictionary>();
+
+ ///
+ /// Stores a given object and associates it with the specified name.
+ ///
+ /// 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;
+
+ ///
+ /// Retrieves an object with the specified name from the .
+ ///
+ /// The type of the data being retrieved. Must match the type used when the was set via .
+ /// The name of the item in the call context.
+ /// The object in the call context associated with the specified name, or a default value for if none is found.
+ public static T GetData(string name) => _state.TryGetValue(name, out var data) ? data.Value : default;
+
+ // 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.
+ // 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/IScopeAccessor.cs b/src/Umbraco.Infrastructure/Scoping/IScopeAccessor.cs
similarity index 100%
rename from src/Umbraco.Core/Scoping/IScopeAccessor.cs
rename to src/Umbraco.Infrastructure/Scoping/IScopeAccessor.cs
diff --git a/src/Umbraco.Infrastructure/Scoping/IScopeProvider.cs b/src/Umbraco.Infrastructure/Scoping/IScopeProvider.cs
index 6c9eb63ba0..4a7ccae481 100644
--- a/src/Umbraco.Infrastructure/Scoping/IScopeProvider.cs
+++ b/src/Umbraco.Infrastructure/Scoping/IScopeProvider.cs
@@ -88,7 +88,7 @@ namespace Umbraco.Core.Scoping
ISqlContext SqlContext { get; }
#if DEBUG_SCOPES
- Dictionary CallContextObjects { get; }
+
IEnumerable ScopeInfos { get; }
ScopeInfo GetScopeInfo(IScope scope);
#endif
diff --git a/src/Umbraco.Core/Scoping/Scope.cs b/src/Umbraco.Infrastructure/Scoping/Scope.cs
similarity index 92%
rename from src/Umbraco.Core/Scoping/Scope.cs
rename to src/Umbraco.Infrastructure/Scoping/Scope.cs
index 3eabfbca9b..8f7a0bf958 100644
--- a/src/Umbraco.Core/Scoping/Scope.cs
+++ b/src/Umbraco.Infrastructure/Scoping/Scope.cs
@@ -2,6 +2,7 @@
using System.Data;
using Umbraco.Core.Cache;
using Umbraco.Core.Composing;
+using Umbraco.Core.Configuration;
using Umbraco.Core.Events;
using Umbraco.Core.IO;
using Umbraco.Core.Logging;
@@ -16,6 +17,8 @@ namespace Umbraco.Core.Scoping
internal class Scope : IScope
{
private readonly ScopeProvider _scopeProvider;
+ private readonly ICoreDebug _coreDebug;
+ private readonly IMediaFileSystem _mediaFileSystem;
private readonly ILogger _logger;
private readonly ITypeFinder _typeFinder;
@@ -36,7 +39,9 @@ namespace Umbraco.Core.Scoping
// initializes a new scope
private Scope(ScopeProvider scopeProvider,
- ILogger logger, ITypeFinder typeFinder, FileSystems fileSystems, Scope parent, ScopeContext scopeContext, bool detachable,
+ ICoreDebug coreDebug,
+ IMediaFileSystem mediaFileSystem,
+ ILogger logger, ITypeFinder typeFinder, FileSystems fileSystems, Scope parent, IScopeContext scopeContext, bool detachable,
IsolationLevel isolationLevel = IsolationLevel.Unspecified,
RepositoryCacheMode repositoryCacheMode = RepositoryCacheMode.Unspecified,
IEventDispatcher eventDispatcher = null,
@@ -45,6 +50,8 @@ namespace Umbraco.Core.Scoping
bool autoComplete = false)
{
_scopeProvider = scopeProvider;
+ _coreDebug = coreDebug;
+ _mediaFileSystem = mediaFileSystem;
_logger = logger;
_typeFinder = typeFinder;
@@ -111,18 +118,22 @@ namespace Umbraco.Core.Scoping
// initializes a new scope
public Scope(ScopeProvider scopeProvider,
- ILogger logger, ITypeFinder typeFinder, FileSystems fileSystems, bool detachable, ScopeContext scopeContext,
+ ICoreDebug coreDebug,
+ IMediaFileSystem mediaFileSystem,
+ ILogger logger, ITypeFinder typeFinder, FileSystems fileSystems, bool detachable, IScopeContext scopeContext,
IsolationLevel isolationLevel = IsolationLevel.Unspecified,
RepositoryCacheMode repositoryCacheMode = RepositoryCacheMode.Unspecified,
IEventDispatcher eventDispatcher = null,
bool? scopeFileSystems = null,
bool callContext = false,
bool autoComplete = false)
- : this(scopeProvider, logger, typeFinder, fileSystems, null, scopeContext, detachable, isolationLevel, repositoryCacheMode, eventDispatcher, scopeFileSystems, callContext, autoComplete)
+ : this(scopeProvider, coreDebug, mediaFileSystem, logger, typeFinder, fileSystems, null, scopeContext, detachable, isolationLevel, repositoryCacheMode, eventDispatcher, scopeFileSystems, callContext, autoComplete)
{ }
// initializes a new scope in a nested scopes chain, with its parent
public Scope(ScopeProvider scopeProvider,
+ ICoreDebug coreDebug,
+ IMediaFileSystem mediaFileSystem,
ILogger logger, ITypeFinder typeFinder, FileSystems fileSystems, Scope parent,
IsolationLevel isolationLevel = IsolationLevel.Unspecified,
RepositoryCacheMode repositoryCacheMode = RepositoryCacheMode.Unspecified,
@@ -130,7 +141,7 @@ namespace Umbraco.Core.Scoping
bool? scopeFileSystems = null,
bool callContext = false,
bool autoComplete = false)
- : this(scopeProvider, logger, typeFinder, fileSystems, parent, null, false, isolationLevel, repositoryCacheMode, eventDispatcher, scopeFileSystems, callContext, autoComplete)
+ : this(scopeProvider, coreDebug, mediaFileSystem, logger, typeFinder, fileSystems, parent, null, false, isolationLevel, repositoryCacheMode, eventDispatcher, scopeFileSystems, callContext, autoComplete)
{ }
public Guid InstanceId { get; } = Guid.NewGuid();
@@ -194,10 +205,10 @@ namespace Umbraco.Core.Scoping
public Scope OrigScope { get; set; }
// the original context (when attaching a detachable scope)
- public ScopeContext OrigContext { get; set; }
+ public IScopeContext OrigContext { get; set; }
// the context (for attaching & detaching only)
- public ScopeContext Context { get; }
+ public IScopeContext Context { get; }
public IsolationLevel IsolationLevel
{
@@ -289,7 +300,7 @@ namespace Umbraco.Core.Scoping
{
EnsureNotDisposed();
if (ParentScope != null) return ParentScope.Events;
- return _eventDispatcher ?? (_eventDispatcher = new QueuingEventDispatcher());
+ return _eventDispatcher ?? (_eventDispatcher = new QueuingEventDispatcher(_mediaFileSystem));
}
}
@@ -484,8 +495,8 @@ namespace Umbraco.Core.Scoping
// caching config
// true if Umbraco.CoreDebug.LogUncompletedScope appSetting is set to "true"
- private static bool LogUncompletedScopes => (_logUncompletedScopes
- ?? (_logUncompletedScopes = Current.Configs.CoreDebug().LogUncompletedScopes)).Value;
+ private bool LogUncompletedScopes => (_logUncompletedScopes
+ ?? (_logUncompletedScopes = _coreDebug.LogUncompletedScopes)).Value;
///
public void ReadLock(params int[] lockIds) => Database.SqlContext.SqlSyntax.ReadLock(Database, lockIds);
diff --git a/src/Umbraco.Core/Scoping/ScopeContext.cs b/src/Umbraco.Infrastructure/Scoping/ScopeContext.cs
similarity index 100%
rename from src/Umbraco.Core/Scoping/ScopeContext.cs
rename to src/Umbraco.Infrastructure/Scoping/ScopeContext.cs
diff --git a/src/Umbraco.Core/Scoping/ScopeContextualBase.cs b/src/Umbraco.Infrastructure/Scoping/ScopeContextualBase.cs
similarity index 100%
rename from src/Umbraco.Core/Scoping/ScopeContextualBase.cs
rename to src/Umbraco.Infrastructure/Scoping/ScopeContextualBase.cs
diff --git a/src/Umbraco.Core/Scoping/ScopeProvider.cs b/src/Umbraco.Infrastructure/Scoping/ScopeProvider.cs
similarity index 70%
rename from src/Umbraco.Core/Scoping/ScopeProvider.cs
rename to src/Umbraco.Infrastructure/Scoping/ScopeProvider.cs
index c8b5b05f59..0dba73b55b 100644
--- a/src/Umbraco.Core/Scoping/ScopeProvider.cs
+++ b/src/Umbraco.Infrastructure/Scoping/ScopeProvider.cs
@@ -1,13 +1,15 @@
using System;
using System.Collections.Generic;
using System.Data;
-using System.Runtime.Remoting.Messaging;
using Umbraco.Core.Cache;
using Umbraco.Core.Composing;
+using Umbraco.Core.Configuration;
using Umbraco.Core.Events;
using Umbraco.Core.IO;
using Umbraco.Core.Logging;
using Umbraco.Core.Persistence;
+using Current = Umbraco.Composing.Current;
+
#if DEBUG_SCOPES
using System.Linq;
using System.Text;
@@ -24,15 +26,18 @@ namespace Umbraco.Core.Scoping
private readonly ITypeFinder _typeFinder;
private readonly IRequestCache _requestCache;
private readonly FileSystems _fileSystems;
+ private readonly ICoreDebug _coreDebug;
+ private readonly IMediaFileSystem _mediaFileSystem;
- public ScopeProvider(IUmbracoDatabaseFactory databaseFactory, FileSystems fileSystems, ILogger logger, ITypeFinder typeFinder, IRequestCache requestCache)
+ public ScopeProvider(IUmbracoDatabaseFactory databaseFactory, FileSystems fileSystems, ICoreDebug coreDebug, IMediaFileSystem mediaFileSystem, ILogger logger, ITypeFinder typeFinder, IRequestCache requestCache)
{
DatabaseFactory = databaseFactory;
_fileSystems = fileSystems;
+ _coreDebug = coreDebug;
+ _mediaFileSystem = mediaFileSystem;
_logger = logger;
_typeFinder = typeFinder;
_requestCache = requestCache;
-
// take control of the FileSystems
_fileSystems.IsScoped = () => AmbientScope != null && AmbientScope.ScopedFileSystems;
@@ -44,23 +49,23 @@ namespace Umbraco.Core.Scoping
SafeCallContext.Register(
() =>
{
- var scope = GetCallContextObject(ScopeItemKey);
- var context = GetCallContextObject(ContextItemKey);
- SetCallContextObject(ScopeItemKey, null);
- SetCallContextObject(ContextItemKey, null);
+ var scope = GetCallContextObject(ScopeItemKey);
+ var context = GetCallContextObject(ContextItemKey);
+ SetCallContextObject(ScopeItemKey, null);
+ SetCallContextObject(ContextItemKey, null);
return Tuple.Create(scope, context);
},
o =>
{
// cannot re-attached over leaked scope/context
- if (GetCallContextObject(ScopeItemKey) != null)
+ if (GetCallContextObject(ScopeItemKey) != null)
throw new Exception("Found leaked scope when restoring call context.");
- if (GetCallContextObject(ContextItemKey) != null)
+ if (GetCallContextObject(ContextItemKey) != null)
throw new Exception("Found leaked context when restoring call context.");
- var t = (Tuple) o;
- SetCallContextObject(ScopeItemKey, t.Item1);
- SetCallContextObject(ContextItemKey, t.Item2);
+ var t = (Tuple) o;
+ SetCallContextObject(ScopeItemKey, t.Item1);
+ SetCallContextObject(ContextItemKey, t.Item2);
});
}
@@ -70,65 +75,16 @@ namespace Umbraco.Core.Scoping
#region Context
- // objects that go into the logical call context better be serializable else they'll eventually
- // cause issues whenever some cross-AppDomain code executes - could be due to ReSharper running
- // tests, any other things (see https://msdn.microsoft.com/en-us/library/dn458353(v=vs.110).aspx),
- // but we don't want to make all of our objects serializable since they are *not* meant to be
- // used in cross-AppDomain scenario anyways.
- // in addition, whatever goes into the logical call context is serialized back and forth any
- // time cross-AppDomain code executes, so if we put an "object" there, we'll can *another*
- // "object" instance - and so we cannot use a random object as a key.
- // so what we do is: we register a guid in the call context, and we keep a table mapping those
- // guids to the actual objects. the guid serializes back and forth without causing any issue,
- // and we can retrieve the actual objects from the table.
- // only issue: how are we supposed to clear the table? we can't, really. objects should take
- // care of de-registering themselves from context.
-
- private static readonly object StaticCallContextObjectsLock = new object();
- private static readonly Dictionary StaticCallContextObjects
- = new Dictionary();
-
-#if DEBUG_SCOPES
- public Dictionary CallContextObjects
- {
- get
- {
- lock (StaticCallContextObjectsLock)
- {
- // capture in a dictionary
- return StaticCallContextObjects.ToDictionary(x => x.Key, x => x.Value);
- }
- }
- }
-#endif
-
private static T GetCallContextObject(string key)
- where T : class
+ where T : class, IInstanceIdentifiable
{
- var objectKey = CallContext.LogicalGetData(key).AsGuid();
- if (objectKey == Guid.Empty) return null;
-
- lock (StaticCallContextObjectsLock)
- {
- if (StaticCallContextObjects.TryGetValue(objectKey, out object callContextObject))
- {
-#if DEBUG_SCOPES
- Current.Logger.Debug("Got " + typeof(T).Name + " Object " + objectKey.ToString("N").Substring(0, 8));
- //_logger.Debug("At:\r\n" + Head(Environment.StackTrace, 24));
-#endif
- return (T)callContextObject;
- }
-
- // hard to inject into a static method :(
- Current.Logger.Warn("Missed {TypeName} Object {ObjectKey}", typeof(T).Name, objectKey.ToString("N").Substring(0, 8));
-#if DEBUG_SCOPES
- //Current.Logger.Debug("At:\r\n" + Head(Environment.StackTrace, 24));
-#endif
- return null;
- }
+ var obj = CallContext.GetData(key);
+ if (obj == default(T)) return null;
+ return obj;
}
- private static void SetCallContextObject(string key, IInstanceIdentifiable value)
+ private static void SetCallContextObject(string key, T value)
+ where T: class, IInstanceIdentifiable
{
#if DEBUG_SCOPES
// manage the 'context' that contains the scope (null, "http" or "call")
@@ -136,14 +92,8 @@ namespace Umbraco.Core.Scoping
if (key == ScopeItemKey)
{
// first, null-register the existing value
- var ambientKey = CallContext.LogicalGetData(ScopeItemKey).AsGuid();
- object o = null;
- lock (StaticCallContextObjectsLock)
- {
- if (ambientKey != default(Guid))
- StaticCallContextObjects.TryGetValue(ambientKey, out o);
- }
- var ambientScope = o as IScope;
+ var ambientScope = CallContext.GetData(ScopeItemKey);
+
if (ambientScope != null) RegisterContext(ambientScope, null);
// then register the new value
var scope = value as IScope;
@@ -152,33 +102,18 @@ namespace Umbraco.Core.Scoping
#endif
if (value == null)
{
- var objectKey = CallContext.LogicalGetData(key).AsGuid();
- CallContext.FreeNamedDataSlot(key);
- if (objectKey == default) return;
- lock (StaticCallContextObjectsLock)
- {
-#if DEBUG_SCOPES
- Current.Logger.Debug("Remove Object " + objectKey.ToString("N").Substring(0, 8));
- //Current.Logger.Debug("At:\r\n" + Head(Environment.StackTrace, 24));
-#endif
- StaticCallContextObjects.Remove(objectKey);
- }
+ var obj = CallContext.GetData(key);
+ CallContext.SetData(key, default); // aka remove
+ if (obj == null) return;
}
else
{
- // note - we are *not* detecting an already-existing value
- // because our code in this class *always* sets to null before
- // setting to a real value
- var objectKey = value.InstanceId;
- lock (StaticCallContextObjectsLock)
- {
+
#if DEBUG_SCOPES
- Current.Logger.Debug("AddObject " + objectKey.ToString("N").Substring(0, 8));
- //Current.Logger.Debug("At:\r\n" + Head(Environment.StackTrace, 24));
+ Current.Logger.Debug("AddObject " + value.InstanceId.ToString("N").Substring(0, 8));
#endif
- StaticCallContextObjects.Add(objectKey, value);
- }
- CallContext.LogicalSetData(key, objectKey);
+
+ CallContext.SetData(key, value);
}
}
@@ -228,24 +163,24 @@ namespace Umbraco.Core.Scoping
internal const string ContextItemKey = "Umbraco.Core.Scoping.ScopeContext";
- public ScopeContext AmbientContext
+ public IScopeContext AmbientContext
{
get
{
// try http context, fallback onto call context
- var value = GetHttpContextObject(ContextItemKey, false);
- return value ?? GetCallContextObject(ContextItemKey);
+ var value = GetHttpContextObject(ContextItemKey, false);
+ return value ?? GetCallContextObject(ContextItemKey);
}
set
{
// clear both
SetHttpContextObject(ContextItemKey, null, false);
- SetCallContextObject(ContextItemKey, null);
+ SetCallContextObject(ContextItemKey, null);
if (value == null) return;
// set http/call context
if (SetHttpContextObject(ContextItemKey, value, false) == false)
- SetCallContextObject(ContextItemKey, value);
+ SetCallContextObject(ContextItemKey, value);
}
}
@@ -265,34 +200,35 @@ namespace Umbraco.Core.Scoping
public Scope AmbientScope
{
// try http context, fallback onto call context
- get => GetHttpContextObject(ScopeItemKey, false)
- ?? GetCallContextObject(ScopeItemKey);
+ // we are casting here because we know its a concrete type
+ get => (Scope)GetHttpContextObject(ScopeItemKey, false)
+ ?? (Scope)GetCallContextObject(ScopeItemKey);
set
{
// clear both
SetHttpContextObject(ScopeItemKey, null, false);
SetHttpContextObject(ScopeRefItemKey, null, false);
- SetCallContextObject(ScopeItemKey, null);
+ SetCallContextObject(ScopeItemKey, null);
if (value == null) return;
// set http/call context
if (value.CallContext == false && SetHttpContextObject(ScopeItemKey, value, false))
SetHttpContextObject(ScopeRefItemKey, _scopeReference);
else
- SetCallContextObject(ScopeItemKey, value);
+ SetCallContextObject(ScopeItemKey, value);
}
}
#endregion
- public void SetAmbient(Scope scope, ScopeContext context = null)
+ public void SetAmbient(Scope scope, IScopeContext context = null)
{
// clear all
SetHttpContextObject(ScopeItemKey, null, false);
SetHttpContextObject(ScopeRefItemKey, null, false);
- SetCallContextObject(ScopeItemKey, null);
+ SetCallContextObject(ScopeItemKey, null);
SetHttpContextObject(ContextItemKey, null, false);
- SetCallContextObject(ContextItemKey, null);
+ SetCallContextObject(ContextItemKey, null);
if (scope == null)
{
if (context != null)
@@ -307,8 +243,8 @@ namespace Umbraco.Core.Scoping
}
else
{
- SetCallContextObject(ScopeItemKey, scope);
- SetCallContextObject(ContextItemKey, context);
+ SetCallContextObject(ScopeItemKey, scope);
+ SetCallContextObject(ContextItemKey, context);
}
}
@@ -319,7 +255,7 @@ namespace Umbraco.Core.Scoping
IEventDispatcher eventDispatcher = null,
bool? scopeFileSystems = null)
{
- return new Scope(this, _logger, _typeFinder, _fileSystems, true, null, isolationLevel, repositoryCacheMode, eventDispatcher, scopeFileSystems);
+ return new Scope(this, _coreDebug, _mediaFileSystem, _logger, _typeFinder, _fileSystems, true, null, isolationLevel, repositoryCacheMode, eventDispatcher, scopeFileSystems);
}
///
@@ -375,13 +311,13 @@ namespace Umbraco.Core.Scoping
{
var ambientContext = AmbientContext;
var newContext = ambientContext == null ? new ScopeContext() : null;
- var scope = new Scope(this, _logger, _typeFinder, _fileSystems, false, newContext, isolationLevel, repositoryCacheMode, eventDispatcher, scopeFileSystems, callContext, autoComplete);
+ var scope = new Scope(this, _coreDebug, _mediaFileSystem, _logger, _typeFinder, _fileSystems, false, newContext, isolationLevel, repositoryCacheMode, eventDispatcher, scopeFileSystems, callContext, autoComplete);
// assign only if scope creation did not throw!
SetAmbient(scope, newContext ?? ambientContext);
return scope;
}
- var nested = new Scope(this, _logger, _typeFinder, _fileSystems, ambientScope, isolationLevel, repositoryCacheMode, eventDispatcher, scopeFileSystems, callContext, autoComplete);
+ var nested = new Scope(this, _coreDebug, _mediaFileSystem, _logger, _typeFinder, _fileSystems, ambientScope, isolationLevel, repositoryCacheMode, eventDispatcher, scopeFileSystems, callContext, autoComplete);
SetAmbient(nested, AmbientContext);
return nested;
}
diff --git a/src/Umbraco.Core/Scoping/ScopeReference.cs b/src/Umbraco.Infrastructure/Scoping/ScopeReference.cs
similarity index 100%
rename from src/Umbraco.Core/Scoping/ScopeReference.cs
rename to src/Umbraco.Infrastructure/Scoping/ScopeReference.cs
diff --git a/src/Umbraco.Core/Security/ContentPermissionsHelper.cs b/src/Umbraco.Infrastructure/Security/ContentPermissionsHelper.cs
similarity index 98%
rename from src/Umbraco.Core/Security/ContentPermissionsHelper.cs
rename to src/Umbraco.Infrastructure/Security/ContentPermissionsHelper.cs
index 1a329fcdcb..7f0a5c3c24 100644
--- a/src/Umbraco.Core/Security/ContentPermissionsHelper.cs
+++ b/src/Umbraco.Infrastructure/Security/ContentPermissionsHelper.cs
@@ -11,7 +11,7 @@ using Umbraco.Core.Services;
namespace Umbraco.Core.Security
{
- internal class ContentPermissionsHelper
+ public class ContentPermissionsHelper
{
public enum ContentAccess
{
@@ -216,7 +216,7 @@ namespace Umbraco.Core.Security
return startNodeIds.Any(x => formattedPath.Contains(string.Concat(",", x, ",")));
}
- internal static bool IsInBranchOfStartNode(string path, int[] startNodeIds, string[] startNodePaths, out bool hasPathAccess)
+ public static bool IsInBranchOfStartNode(string path, int[] startNodeIds, string[] startNodePaths, out bool hasPathAccess)
{
if (string.IsNullOrWhiteSpace(path)) throw new ArgumentException("Value cannot be null or whitespace.", nameof(path));
diff --git a/src/Umbraco.Core/Security/MachineKeyGenerator.cs b/src/Umbraco.Infrastructure/Security/MachineKeyGenerator.cs
similarity index 98%
rename from src/Umbraco.Core/Security/MachineKeyGenerator.cs
rename to src/Umbraco.Infrastructure/Security/MachineKeyGenerator.cs
index a20f04c919..60b0ef72c2 100644
--- a/src/Umbraco.Core/Security/MachineKeyGenerator.cs
+++ b/src/Umbraco.Infrastructure/Security/MachineKeyGenerator.cs
@@ -10,7 +10,7 @@ namespace Umbraco.Core.Security
///
/// Used to generate a machine key
///
- internal class MachineKeyGenerator
+ public class MachineKeyGenerator
{
///
/// Generates the string to be stored in the web.config
diff --git a/src/Umbraco.Core/Services/IdkMap.cs b/src/Umbraco.Infrastructure/Services/IdkMap.cs
similarity index 99%
rename from src/Umbraco.Core/Services/IdkMap.cs
rename to src/Umbraco.Infrastructure/Services/IdkMap.cs
index 3b719f31d1..f7790ba76b 100644
--- a/src/Umbraco.Core/Services/IdkMap.cs
+++ b/src/Umbraco.Infrastructure/Services/IdkMap.cs
@@ -47,7 +47,7 @@ namespace Umbraco.Core.Services
private readonly ConcurrentDictionary id2key, Func key2id)> _dictionary
= new ConcurrentDictionary id2key, Func key2id)>();
- internal void SetMapper(UmbracoObjectTypes umbracoObjectType, Func id2key, Func key2id)
+ public void SetMapper(UmbracoObjectTypes umbracoObjectType, Func id2key, Func key2id)
{
_dictionary[umbracoObjectType] = (id2key, key2id);
}
diff --git a/src/Umbraco.Core/Services/Implement/AuditService.cs b/src/Umbraco.Infrastructure/Services/Implement/AuditService.cs
similarity index 100%
rename from src/Umbraco.Core/Services/Implement/AuditService.cs
rename to src/Umbraco.Infrastructure/Services/Implement/AuditService.cs
diff --git a/src/Umbraco.Core/Services/Implement/ConsentService.cs b/src/Umbraco.Infrastructure/Services/Implement/ConsentService.cs
similarity index 100%
rename from src/Umbraco.Core/Services/Implement/ConsentService.cs
rename to src/Umbraco.Infrastructure/Services/Implement/ConsentService.cs
diff --git a/src/Umbraco.Core/Services/Implement/ContentService.cs b/src/Umbraco.Infrastructure/Services/Implement/ContentService.cs
similarity index 99%
rename from src/Umbraco.Core/Services/Implement/ContentService.cs
rename to src/Umbraco.Infrastructure/Services/Implement/ContentService.cs
index 8287c071f1..f386f22f39 100644
--- a/src/Umbraco.Core/Services/Implement/ContentService.cs
+++ b/src/Umbraco.Infrastructure/Services/Implement/ContentService.cs
@@ -28,7 +28,7 @@ namespace Umbraco.Core.Services.Implement
private readonly ILanguageRepository _languageRepository;
private readonly Lazy _propertyValidationService;
private IQuery _queryNotTrashed;
-
+
#region Constructors
public ContentService(IScopeProvider provider, ILogger logger,
@@ -2552,7 +2552,7 @@ namespace Umbraco.Core.Services.Implement
///
/// Occurs after change.
///
- internal static event TypedEventHandler.EventArgs> TreeChanged;
+ public static event TypedEventHandler.EventArgs> TreeChanged;
///
/// Occurs after a blueprint has been saved.
diff --git a/src/Umbraco.Core/Services/Implement/ContentTypeBaseServiceProvider.cs b/src/Umbraco.Infrastructure/Services/Implement/ContentTypeBaseServiceProvider.cs
similarity index 100%
rename from src/Umbraco.Core/Services/Implement/ContentTypeBaseServiceProvider.cs
rename to src/Umbraco.Infrastructure/Services/Implement/ContentTypeBaseServiceProvider.cs
diff --git a/src/Umbraco.Core/Services/Implement/ContentTypeService.cs b/src/Umbraco.Infrastructure/Services/Implement/ContentTypeService.cs
similarity index 100%
rename from src/Umbraco.Core/Services/Implement/ContentTypeService.cs
rename to src/Umbraco.Infrastructure/Services/Implement/ContentTypeService.cs
diff --git a/src/Umbraco.Core/Services/Implement/ContentTypeServiceBase.cs b/src/Umbraco.Infrastructure/Services/Implement/ContentTypeServiceBase.cs
similarity index 100%
rename from src/Umbraco.Core/Services/Implement/ContentTypeServiceBase.cs
rename to src/Umbraco.Infrastructure/Services/Implement/ContentTypeServiceBase.cs
diff --git a/src/Umbraco.Core/Services/Implement/ContentTypeServiceBaseOfTItemTService.cs b/src/Umbraco.Infrastructure/Services/Implement/ContentTypeServiceBaseOfTItemTService.cs
similarity index 96%
rename from src/Umbraco.Core/Services/Implement/ContentTypeServiceBaseOfTItemTService.cs
rename to src/Umbraco.Infrastructure/Services/Implement/ContentTypeServiceBaseOfTItemTService.cs
index 3a1ad64483..a08bc3cd96 100644
--- a/src/Umbraco.Core/Services/Implement/ContentTypeServiceBaseOfTItemTService.cs
+++ b/src/Umbraco.Infrastructure/Services/Implement/ContentTypeServiceBaseOfTItemTService.cs
@@ -17,7 +17,7 @@ namespace Umbraco.Core.Services.Implement
protected abstract TService This { get; }
// that one must be dispatched
- internal static event TypedEventHandler.EventArgs> Changed;
+ public static event TypedEventHandler.EventArgs> Changed;
// that one is always immediate (transactional)
public static event TypedEventHandler.EventArgs> ScopedRefreshedEntity;
@@ -39,7 +39,7 @@ namespace Umbraco.Core.Services.Implement
public static event TypedEventHandler> SavedContainer;
public static event TypedEventHandler> DeletingContainer;
public static event TypedEventHandler> DeletedContainer;
-
+
protected void OnChanged(IScope scope, ContentTypeChange.EventArgs args)
{
scope.Events.Dispatch(Changed, This, args, nameof(Changed));
@@ -50,7 +50,7 @@ namespace Umbraco.Core.Services.Implement
// that one is always immediate (not dispatched, transactional)
ScopedRefreshedEntity.RaiseEvent(args, This);
}
-
+
protected bool OnSavingCancelled(IScope scope, SaveEventArgs args)
{
return scope.Events.DispatchCancelable(Saving, This, args);
@@ -60,17 +60,17 @@ namespace Umbraco.Core.Services.Implement
{
scope.Events.Dispatch(Saved, This, args);
}
-
+
protected bool OnDeletingCancelled(IScope scope, DeleteEventArgs args)
{
return scope.Events.DispatchCancelable(Deleting, This, args, nameof(Deleting));
}
-
+
protected void OnDeleted(IScope scope, DeleteEventArgs args)
{
scope.Events.Dispatch(Deleted, This, args);
}
-
+
protected bool OnMovingCancelled(IScope scope, MoveEventArgs args)
{
return scope.Events.DispatchCancelable(Moving, This, args);
@@ -80,7 +80,7 @@ namespace Umbraco.Core.Services.Implement
{
scope.Events.Dispatch(Moved, This, args);
}
-
+
protected bool OnSavingContainerCancelled(IScope scope, SaveEventArgs args)
{
return scope.Events.DispatchCancelable(SavingContainer, This, args, nameof(SavingContainer));
@@ -100,7 +100,7 @@ namespace Umbraco.Core.Services.Implement
{
scope.Events.Dispatch(SavedContainer, This, args, nameof(SavedContainer));
}
-
+
protected bool OnDeletingContainerCancelled(IScope scope, DeleteEventArgs args)
{
return scope.Events.DispatchCancelable(DeletingContainer, This, args);
diff --git a/src/Umbraco.Core/Services/Implement/ContentTypeServiceBaseOfTRepositoryTItemTService.cs b/src/Umbraco.Infrastructure/Services/Implement/ContentTypeServiceBaseOfTRepositoryTItemTService.cs
similarity index 100%
rename from src/Umbraco.Core/Services/Implement/ContentTypeServiceBaseOfTRepositoryTItemTService.cs
rename to src/Umbraco.Infrastructure/Services/Implement/ContentTypeServiceBaseOfTRepositoryTItemTService.cs
diff --git a/src/Umbraco.Core/Services/Implement/DataTypeService.cs b/src/Umbraco.Infrastructure/Services/Implement/DataTypeService.cs
similarity index 100%
rename from src/Umbraco.Core/Services/Implement/DataTypeService.cs
rename to src/Umbraco.Infrastructure/Services/Implement/DataTypeService.cs
diff --git a/src/Umbraco.Core/Services/Implement/DomainService.cs b/src/Umbraco.Infrastructure/Services/Implement/DomainService.cs
similarity index 100%
rename from src/Umbraco.Core/Services/Implement/DomainService.cs
rename to src/Umbraco.Infrastructure/Services/Implement/DomainService.cs
diff --git a/src/Umbraco.Core/Services/Implement/EntityService.cs b/src/Umbraco.Infrastructure/Services/Implement/EntityService.cs
similarity index 100%
rename from src/Umbraco.Core/Services/Implement/EntityService.cs
rename to src/Umbraco.Infrastructure/Services/Implement/EntityService.cs
diff --git a/src/Umbraco.Core/Services/Implement/EntityXmlSerializer.cs b/src/Umbraco.Infrastructure/Services/Implement/EntityXmlSerializer.cs
similarity index 98%
rename from src/Umbraco.Core/Services/Implement/EntityXmlSerializer.cs
rename to src/Umbraco.Infrastructure/Services/Implement/EntityXmlSerializer.cs
index 17cb62ec86..e8fea4c0e1 100644
--- a/src/Umbraco.Core/Services/Implement/EntityXmlSerializer.cs
+++ b/src/Umbraco.Infrastructure/Services/Implement/EntityXmlSerializer.cs
@@ -5,8 +5,10 @@ using System.Linq;
using System.Net;
using System.Xml.Linq;
using Newtonsoft.Json;
+using Umbraco.Composing;
using Umbraco.Core.Composing;
using Umbraco.Core.Models;
+using Umbraco.Core.PropertyEditors;
using Umbraco.Core.Strings;
namespace Umbraco.Core.Services.Implement
@@ -24,6 +26,7 @@ namespace Umbraco.Core.Services.Implement
private readonly ILocalizationService _localizationService;
private readonly UrlSegmentProviderCollection _urlSegmentProviders;
private readonly IShortStringHelper _shortStringHelper;
+ private readonly PropertyEditorCollection _propertyEditors;
public EntityXmlSerializer(
IContentService contentService,
@@ -33,7 +36,8 @@ namespace Umbraco.Core.Services.Implement
ILocalizationService localizationService,
IContentTypeService contentTypeService,
UrlSegmentProviderCollection urlSegmentProviders,
- IShortStringHelper shortStringHelper)
+ IShortStringHelper shortStringHelper,
+ PropertyEditorCollection propertyEditors)
{
_contentTypeService = contentTypeService;
_mediaService = mediaService;
@@ -43,6 +47,7 @@ namespace Umbraco.Core.Services.Implement
_localizationService = localizationService;
_urlSegmentProviders = urlSegmentProviders;
_shortStringHelper = shortStringHelper;
+ _propertyEditors = propertyEditors;
}
///
@@ -564,7 +569,7 @@ namespace Umbraco.Core.Services.Implement
var propertyType = property.PropertyType;
// get the property editor for this property and let it convert it to the xml structure
- var propertyEditor = Current.PropertyEditors[propertyType.PropertyEditorAlias];
+ var propertyEditor = _propertyEditors[propertyType.PropertyEditorAlias];
return propertyEditor == null
? Array.Empty()
: propertyEditor.GetValueEditor().ConvertDbToXml(property, _dataTypeService, _localizationService, published);
diff --git a/src/Umbraco.Core/Services/Implement/ExternalLoginService.cs b/src/Umbraco.Infrastructure/Services/Implement/ExternalLoginService.cs
similarity index 98%
rename from src/Umbraco.Core/Services/Implement/ExternalLoginService.cs
rename to src/Umbraco.Infrastructure/Services/Implement/ExternalLoginService.cs
index 0d6a345e90..c872cf6abb 100644
--- a/src/Umbraco.Core/Services/Implement/ExternalLoginService.cs
+++ b/src/Umbraco.Infrastructure/Services/Implement/ExternalLoginService.cs
@@ -1,6 +1,5 @@
using System.Collections.Generic;
using System.Linq;
-using Microsoft.AspNet.Identity;
using Umbraco.Core.Events;
using Umbraco.Core.Logging;
using Umbraco.Core.Models.Identity;
diff --git a/src/Umbraco.Core/Services/Implement/FileService.cs b/src/Umbraco.Infrastructure/Services/Implement/FileService.cs
similarity index 99%
rename from src/Umbraco.Core/Services/Implement/FileService.cs
rename to src/Umbraco.Infrastructure/Services/Implement/FileService.cs
index ebfc82c50c..25f2c619d2 100644
--- a/src/Umbraco.Core/Services/Implement/FileService.cs
+++ b/src/Umbraco.Infrastructure/Services/Implement/FileService.cs
@@ -4,6 +4,7 @@ using System.IO;
using System.Linq;
using System.Text.RegularExpressions;
using Umbraco.Core.Composing;
+using Umbraco.Core.Configuration;
using Umbraco.Core.Events;
using Umbraco.Core.IO;
using Umbraco.Core.Logging;
@@ -28,6 +29,7 @@ namespace Umbraco.Core.Services.Implement
private readonly IPartialViewMacroRepository _partialViewMacroRepository;
private readonly IAuditRepository _auditRepository;
private readonly IShortStringHelper _shortStringHelper;
+ private readonly IGlobalSettings _globalSettings;
private const string PartialViewHeader = "@inherits Umbraco.Web.Mvc.UmbracoViewPage";
private const string PartialViewMacroHeader = "@inherits Umbraco.Web.Macros.PartialViewMacroPage";
@@ -35,7 +37,7 @@ namespace Umbraco.Core.Services.Implement
public FileService(IScopeProvider uowProvider, IIOHelper ioHelper, ILogger logger, IEventMessagesFactory eventMessagesFactory,
IStylesheetRepository stylesheetRepository, IScriptRepository scriptRepository, ITemplateRepository templateRepository,
IPartialViewRepository partialViewRepository, IPartialViewMacroRepository partialViewMacroRepository,
- IAuditRepository auditRepository, IShortStringHelper shortStringHelper)
+ IAuditRepository auditRepository, IShortStringHelper shortStringHelper, IGlobalSettings globalSettings)
: base(uowProvider, logger, eventMessagesFactory)
{
_ioHelper = ioHelper;
@@ -46,6 +48,7 @@ namespace Umbraco.Core.Services.Implement
_partialViewMacroRepository = partialViewMacroRepository;
_auditRepository = auditRepository;
_shortStringHelper = shortStringHelper;
+ _globalSettings = globalSettings;
}
#region Stylesheets
@@ -669,7 +672,7 @@ namespace Umbraco.Core.Services.Implement
public IEnumerable GetPartialViewSnippetNames(params string[] filterNames)
{
- var snippetPath = _ioHelper.MapPath($"{Current.Configs.Global().UmbracoPath}/PartialViewMacros/Templates/");
+ var snippetPath = _ioHelper.MapPath($"{_globalSettings.UmbracoPath}/PartialViewMacros/Templates/");
var files = Directory.GetFiles(snippetPath, "*.cshtml")
.Select(Path.GetFileNameWithoutExtension)
.Except(filterNames, StringComparer.InvariantCultureIgnoreCase)
@@ -903,7 +906,7 @@ namespace Umbraco.Core.Services.Implement
fileName += ".cshtml";
}
- var snippetPath = _ioHelper.MapPath($"{Current.Configs.Global().UmbracoPath}/PartialViewMacros/Templates/{fileName}");
+ var snippetPath = _ioHelper.MapPath($"{_globalSettings.UmbracoPath}/PartialViewMacros/Templates/{fileName}");
return System.IO.File.Exists(snippetPath)
? Attempt.Succeed(snippetPath)
: Attempt.Fail();
diff --git a/src/Umbraco.Core/Services/Implement/KeyValueService.cs b/src/Umbraco.Infrastructure/Services/Implement/KeyValueService.cs
similarity index 100%
rename from src/Umbraco.Core/Services/Implement/KeyValueService.cs
rename to src/Umbraco.Infrastructure/Services/Implement/KeyValueService.cs
diff --git a/src/Umbraco.Core/Services/Implement/LocalizationService.cs b/src/Umbraco.Infrastructure/Services/Implement/LocalizationService.cs
similarity index 100%
rename from src/Umbraco.Core/Services/Implement/LocalizationService.cs
rename to src/Umbraco.Infrastructure/Services/Implement/LocalizationService.cs
diff --git a/src/Umbraco.Core/Services/Implement/LocalizedTextService.cs b/src/Umbraco.Infrastructure/Services/Implement/LocalizedTextService.cs
similarity index 100%
rename from src/Umbraco.Core/Services/Implement/LocalizedTextService.cs
rename to src/Umbraco.Infrastructure/Services/Implement/LocalizedTextService.cs
diff --git a/src/Umbraco.Core/Services/Implement/LocalizedTextServiceFileSources.cs b/src/Umbraco.Infrastructure/Services/Implement/LocalizedTextServiceFileSources.cs
similarity index 99%
rename from src/Umbraco.Core/Services/Implement/LocalizedTextServiceFileSources.cs
rename to src/Umbraco.Infrastructure/Services/Implement/LocalizedTextServiceFileSources.cs
index 86913071fd..8507744fa7 100644
--- a/src/Umbraco.Core/Services/Implement/LocalizedTextServiceFileSources.cs
+++ b/src/Umbraco.Infrastructure/Services/Implement/LocalizedTextServiceFileSources.cs
@@ -5,6 +5,7 @@ using System.IO;
using System.Linq;
using System.Xml;
using System.Xml.Linq;
+using Umbraco.Composing;
using Umbraco.Core.Cache;
using Umbraco.Core.Composing;
using Umbraco.Core.Logging;
diff --git a/src/Umbraco.Core/Services/Implement/LocalizedTextServiceSupplementaryFileSource.cs b/src/Umbraco.Infrastructure/Services/Implement/LocalizedTextServiceSupplementaryFileSource.cs
similarity index 100%
rename from src/Umbraco.Core/Services/Implement/LocalizedTextServiceSupplementaryFileSource.cs
rename to src/Umbraco.Infrastructure/Services/Implement/LocalizedTextServiceSupplementaryFileSource.cs
diff --git a/src/Umbraco.Core/Services/Implement/MacroService.cs b/src/Umbraco.Infrastructure/Services/Implement/MacroService.cs
similarity index 100%
rename from src/Umbraco.Core/Services/Implement/MacroService.cs
rename to src/Umbraco.Infrastructure/Services/Implement/MacroService.cs
diff --git a/src/Umbraco.Core/Services/Implement/MediaService.cs b/src/Umbraco.Infrastructure/Services/Implement/MediaService.cs
similarity index 100%
rename from src/Umbraco.Core/Services/Implement/MediaService.cs
rename to src/Umbraco.Infrastructure/Services/Implement/MediaService.cs
diff --git a/src/Umbraco.Core/Services/Implement/MediaTypeService.cs b/src/Umbraco.Infrastructure/Services/Implement/MediaTypeService.cs
similarity index 100%
rename from src/Umbraco.Core/Services/Implement/MediaTypeService.cs
rename to src/Umbraco.Infrastructure/Services/Implement/MediaTypeService.cs
diff --git a/src/Umbraco.Core/Services/Implement/MemberGroupService.cs b/src/Umbraco.Infrastructure/Services/Implement/MemberGroupService.cs
similarity index 100%
rename from src/Umbraco.Core/Services/Implement/MemberGroupService.cs
rename to src/Umbraco.Infrastructure/Services/Implement/MemberGroupService.cs
diff --git a/src/Umbraco.Core/Services/Implement/MemberService.cs b/src/Umbraco.Infrastructure/Services/Implement/MemberService.cs
similarity index 99%
rename from src/Umbraco.Core/Services/Implement/MemberService.cs
rename to src/Umbraco.Infrastructure/Services/Implement/MemberService.cs
index 8295d3ee55..e551017295 100644
--- a/src/Umbraco.Core/Services/Implement/MemberService.cs
+++ b/src/Umbraco.Infrastructure/Services/Implement/MemberService.cs
@@ -22,12 +22,13 @@ namespace Umbraco.Core.Services.Implement
private readonly IMemberTypeRepository _memberTypeRepository;
private readonly IMemberGroupRepository _memberGroupRepository;
private readonly IAuditRepository _auditRepository;
+ private readonly IMemberTypeService _memberTypeService;
private readonly IMemberGroupService _memberGroupService;
#region Constructor
- public MemberService(IScopeProvider provider, ILogger logger, IEventMessagesFactory eventMessagesFactory, IMemberGroupService memberGroupService,
+ public MemberService(IScopeProvider provider, ILogger logger, IEventMessagesFactory eventMessagesFactory, IMemberGroupService memberGroupService,
IMemberRepository memberRepository, IMemberTypeRepository memberTypeRepository, IMemberGroupRepository memberGroupRepository, IAuditRepository auditRepository)
: base(provider, logger, eventMessagesFactory)
{
@@ -64,7 +65,7 @@ namespace Umbraco.Core.Services.Implement
{
case MemberCountType.All:
query = Query();
- break;
+ break;
case MemberCountType.LockedOut:
query = Query().Where(x => ((Member) x).PropertyTypeAlias == Constants.Conventions.Member.IsLockedOut && ((Member) x).BoolPropertyValue);
break;
@@ -545,7 +546,7 @@ namespace Umbraco.Core.Services.Implement
return _memberRepository.GetPage(query, pageIndex, pageSize, out totalRecords, null, Ordering.By("Name"));
}
}
-
+
///
/// Finds a list of objects by a partial email string
///
@@ -803,8 +804,8 @@ namespace Umbraco.Core.Services.Implement
{
//trimming username and email to make sure we have no trailing space
member.Username = member.Username.Trim();
- member.Email = member.Email.Trim();
-
+ member.Email = member.Email.Trim();
+
using (var scope = ScopeProvider.CreateScope())
{
var saveEventArgs = new SaveEventArgs(member);
@@ -1127,7 +1128,7 @@ namespace Umbraco.Core.Services.Implement
/// This is internal for now and is used to export a member in the member editor,
/// it will raise an event so that auditing logs can be created.
///
- internal MemberExportModel ExportMember(Guid key)
+ public MemberExportModel ExportMember(Guid key)
{
using (var scope = ScopeProvider.CreateScope(autoComplete: true))
{
@@ -1244,10 +1245,6 @@ namespace Umbraco.Core.Services.Implement
}
}
- public string GetDefaultMemberType()
- {
- return Current.Services.MemberTypeService.GetDefault();
- }
#endregion
}
diff --git a/src/Umbraco.Core/Services/Implement/MemberTypeService.cs b/src/Umbraco.Infrastructure/Services/Implement/MemberTypeService.cs
similarity index 100%
rename from src/Umbraco.Core/Services/Implement/MemberTypeService.cs
rename to src/Umbraco.Infrastructure/Services/Implement/MemberTypeService.cs
diff --git a/src/Umbraco.Core/Services/Implement/NotificationService.cs b/src/Umbraco.Infrastructure/Services/Implement/NotificationService.cs
similarity index 99%
rename from src/Umbraco.Core/Services/Implement/NotificationService.cs
rename to src/Umbraco.Infrastructure/Services/Implement/NotificationService.cs
index c89cb27623..c8b8e617c9 100644
--- a/src/Umbraco.Core/Services/Implement/NotificationService.cs
+++ b/src/Umbraco.Infrastructure/Services/Implement/NotificationService.cs
@@ -92,7 +92,7 @@ namespace Umbraco.Core.Services.Implement
do
{
// users are returned ordered by id, notifications are returned ordered by user id
- var users = ((UserService)_userService).GetNextUsers(id, pagesz).Where(x => x.IsApproved).ToList();
+ 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();
if (notifications.Count == 0) break;
@@ -386,7 +386,7 @@ namespace Umbraco.Core.Services.Implement
var protocol = _globalSettings.UseHttps ? "https" : "http";
var subjectVars = new NotificationEmailSubjectParams(
- string.Concat(siteUri.Authority, _ioHelper.ResolveUrl(Current.Configs.Global().UmbracoPath)),
+ string.Concat(siteUri.Authority, _ioHelper.ResolveUrl(_globalSettings.UmbracoPath)),
actionName,
content.Name);
@@ -402,7 +402,7 @@ namespace Umbraco.Core.Services.Implement
string.Concat(content.Id, ".aspx"),
protocol),
performingUser.Name,
- string.Concat(siteUri.Authority, _ioHelper.ResolveUrl(Current.Configs.Global().UmbracoPath)),
+ string.Concat(siteUri.Authority, _ioHelper.ResolveUrl(_globalSettings.UmbracoPath)),
summary.ToString());
// create the mail message
diff --git a/src/Umbraco.Core/Services/Implement/PackagingService.cs b/src/Umbraco.Infrastructure/Services/Implement/PackagingService.cs
similarity index 100%
rename from src/Umbraco.Core/Services/Implement/PackagingService.cs
rename to src/Umbraco.Infrastructure/Services/Implement/PackagingService.cs
diff --git a/src/Umbraco.Core/Services/Implement/PropertyValidationService.cs b/src/Umbraco.Infrastructure/Services/Implement/PropertyValidationService.cs
similarity index 100%
rename from src/Umbraco.Core/Services/Implement/PropertyValidationService.cs
rename to src/Umbraco.Infrastructure/Services/Implement/PropertyValidationService.cs
diff --git a/src/Umbraco.Core/Services/Implement/PublicAccessService.cs b/src/Umbraco.Infrastructure/Services/Implement/PublicAccessService.cs
similarity index 100%
rename from src/Umbraco.Core/Services/Implement/PublicAccessService.cs
rename to src/Umbraco.Infrastructure/Services/Implement/PublicAccessService.cs
diff --git a/src/Umbraco.Core/Services/Implement/RedirectUrlService.cs b/src/Umbraco.Infrastructure/Services/Implement/RedirectUrlService.cs
similarity index 100%
rename from src/Umbraco.Core/Services/Implement/RedirectUrlService.cs
rename to src/Umbraco.Infrastructure/Services/Implement/RedirectUrlService.cs
diff --git a/src/Umbraco.Core/Services/Implement/RelationService.cs b/src/Umbraco.Infrastructure/Services/Implement/RelationService.cs
similarity index 100%
rename from src/Umbraco.Core/Services/Implement/RelationService.cs
rename to src/Umbraco.Infrastructure/Services/Implement/RelationService.cs
diff --git a/src/Umbraco.Core/Services/Implement/RepositoryService.cs b/src/Umbraco.Infrastructure/Services/Implement/RepositoryService.cs
similarity index 100%
rename from src/Umbraco.Core/Services/Implement/RepositoryService.cs
rename to src/Umbraco.Infrastructure/Services/Implement/RepositoryService.cs
diff --git a/src/Umbraco.Core/Services/Implement/ScopeRepositoryService.cs b/src/Umbraco.Infrastructure/Services/Implement/ScopeRepositoryService.cs
similarity index 100%
rename from src/Umbraco.Core/Services/Implement/ScopeRepositoryService.cs
rename to src/Umbraco.Infrastructure/Services/Implement/ScopeRepositoryService.cs
diff --git a/src/Umbraco.Core/Services/Implement/ServerRegistrationService.cs b/src/Umbraco.Infrastructure/Services/Implement/ServerRegistrationService.cs
similarity index 94%
rename from src/Umbraco.Core/Services/Implement/ServerRegistrationService.cs
rename to src/Umbraco.Infrastructure/Services/Implement/ServerRegistrationService.cs
index 1c582953ec..97bf76e672 100644
--- a/src/Umbraco.Core/Services/Implement/ServerRegistrationService.cs
+++ b/src/Umbraco.Infrastructure/Services/Implement/ServerRegistrationService.cs
@@ -3,6 +3,7 @@ using System.Collections.Generic;
using System.Linq;
using Umbraco.Core.Composing;
using Umbraco.Core.Events;
+using Umbraco.Core.Hosting;
using Umbraco.Core.Logging;
using Umbraco.Core.Models;
using Umbraco.Core.Persistence.Repositories;
@@ -18,9 +19,7 @@ namespace Umbraco.Core.Services.Implement
public sealed class ServerRegistrationService : ScopeRepositoryService, IServerRegistrationService
{
private readonly IServerRegistrationRepository _serverRegistrationRepository;
-
- private static readonly string CurrentServerIdentityValue = NetworkHelper.MachineName // eg DOMAIN\SERVER
- + "/" + Current.HostingEnvironment.ApplicationId; // eg /LM/S3SVC/11/ROOT
+ private readonly IHostingEnvironment _hostingEnvironment;
private ServerRole _currentServerRole = ServerRole.Unknown;
@@ -31,10 +30,11 @@ namespace Umbraco.Core.Services.Implement
/// A logger.
///
public ServerRegistrationService(IScopeProvider scopeProvider, ILogger logger, IEventMessagesFactory eventMessagesFactory,
- IServerRegistrationRepository serverRegistrationRepository)
+ IServerRegistrationRepository serverRegistrationRepository, IHostingEnvironment hostingEnvironment)
: base(scopeProvider, logger, eventMessagesFactory)
{
_serverRegistrationRepository = serverRegistrationRepository;
+ _hostingEnvironment = hostingEnvironment;
}
///
@@ -148,7 +148,8 @@ namespace Umbraco.Core.Services.Implement
///
/// Gets the local server identity.
///
- public string CurrentServerIdentity => CurrentServerIdentityValue;
+ public string CurrentServerIdentity => NetworkHelper.MachineName // eg DOMAIN\SERVER
+ + "/" + _hostingEnvironment.ApplicationId; // eg /LM/S3SVC/11/ROOT;
///
/// Gets the role of the current server.
diff --git a/src/Umbraco.Core/Services/Implement/TagService.cs b/src/Umbraco.Infrastructure/Services/Implement/TagService.cs
similarity index 100%
rename from src/Umbraco.Core/Services/Implement/TagService.cs
rename to src/Umbraco.Infrastructure/Services/Implement/TagService.cs
diff --git a/src/Umbraco.Core/Services/Implement/UserService.cs b/src/Umbraco.Infrastructure/Services/Implement/UserService.cs
similarity index 99%
rename from src/Umbraco.Core/Services/Implement/UserService.cs
rename to src/Umbraco.Infrastructure/Services/Implement/UserService.cs
index 2bc9caaba8..1d79cfb88b 100644
--- a/src/Umbraco.Core/Services/Implement/UserService.cs
+++ b/src/Umbraco.Infrastructure/Services/Implement/UserService.cs
@@ -604,7 +604,7 @@ namespace Umbraco.Core.Services.Implement
}
}
- internal IEnumerable GetNextUsers(int id, int count)
+ public IEnumerable GetNextUsers(int id, int count)
{
using (var scope = ScopeProvider.CreateScope(autoComplete: true))
{
@@ -1185,7 +1185,7 @@ namespace Umbraco.Core.Services.Implement
///
/// Occurs after Save
///
- internal static event TypedEventHandler> SavedUserGroup;
+ public static event TypedEventHandler> SavedUserGroup;
///
/// Occurs before Delete
@@ -1199,6 +1199,6 @@ namespace Umbraco.Core.Services.Implement
// TODO: still don't know if we need this yet unless we start caching permissions, but that also means we'll need another
// event on the ContentService since there's a method there to modify node permissions too, or we can proxy events if needed.
- internal static event TypedEventHandler> UserGroupPermissionsAssigned;
+ public static event TypedEventHandler> UserGroupPermissionsAssigned;
}
}
diff --git a/src/Umbraco.Core/Sync/DatabaseServerMessenger.cs b/src/Umbraco.Infrastructure/Sync/DatabaseServerMessenger.cs
similarity index 95%
rename from src/Umbraco.Core/Sync/DatabaseServerMessenger.cs
rename to src/Umbraco.Infrastructure/Sync/DatabaseServerMessenger.cs
index 0e7194d5de..948304e4e4 100644
--- a/src/Umbraco.Core/Sync/DatabaseServerMessenger.cs
+++ b/src/Umbraco.Infrastructure/Sync/DatabaseServerMessenger.cs
@@ -33,6 +33,7 @@ namespace Umbraco.Core.Sync
private readonly object _locko = new object();
private readonly IProfilingLogger _profilingLogger;
private readonly IHostingEnvironment _hostingEnvironment;
+ private readonly CacheRefresherCollection _cacheRefreshers;
private readonly ISqlContext _sqlContext;
private readonly Lazy _distCacheFilePath;
private int _lastId = -1;
@@ -46,7 +47,7 @@ namespace Umbraco.Core.Sync
public DatabaseServerMessenger(
IRuntimeState runtime, IScopeProvider scopeProvider, ISqlContext sqlContext, IProfilingLogger proflog,
- bool distributedEnabled, DatabaseServerMessengerOptions options, IHostingEnvironment hostingEnvironment)
+ bool distributedEnabled, DatabaseServerMessengerOptions options, IHostingEnvironment hostingEnvironment, CacheRefresherCollection cacheRefreshers)
: base(distributedEnabled)
{
ScopeProvider = scopeProvider ?? throw new ArgumentNullException(nameof(scopeProvider));
@@ -54,6 +55,7 @@ namespace Umbraco.Core.Sync
_runtime = runtime;
_profilingLogger = proflog ?? throw new ArgumentNullException(nameof(proflog));
_hostingEnvironment = hostingEnvironment;
+ _cacheRefreshers = cacheRefreshers;
Logger = proflog;
Options = options ?? throw new ArgumentNullException(nameof(options));
_lastPruned = _lastSync = DateTime.UtcNow;
@@ -123,10 +125,12 @@ namespace Umbraco.Core.Sync
// the service will *not* be able to properly handle our notifications anymore
const int weight = 10;
- if (!(_runtime is RuntimeState runtime))
- throw new NotSupportedException($"Unsupported IRuntimeState implementation {_runtime.GetType().FullName}, expecting {typeof(RuntimeState).FullName}.");
- var registered = runtime.MainDom.Register(
+ //TODO Why do we have interface if we expect to be exact type!!!?
+ // if (!(_runtime is RuntimeState runtime))
+ // throw new NotSupportedException($"Unsupported IRuntimeState implementation {_runtime.GetType().FullName}, expecting {typeof(RuntimeState).FullName}.");
+
+ var registered = _runtime.MainDom.Register(
() =>
{
lock (_locko)
@@ -226,7 +230,7 @@ namespace Umbraco.Core.Sync
///
/// Synchronize the server (throttled).
///
- protected internal void Sync()
+ public void Sync()
{
lock (_locko)
{
@@ -262,7 +266,7 @@ namespace Umbraco.Core.Sync
_lastPruned = _lastSync;
- switch (Current.RuntimeState.ServerRole)
+ switch (_runtime.ServerRole)
{
case ServerRole.Single:
case ServerRole.Master:
@@ -524,8 +528,8 @@ namespace Umbraco.Core.Sync
/// Practically, all we really need is the guid, the other infos are here for information
/// and debugging purposes.
///
- protected static readonly string LocalIdentity = NetworkHelper.MachineName // eg DOMAIN\SERVER
- + "/" + Current.HostingEnvironment.ApplicationId // eg /LM/S3SVC/11/ROOT
+ protected string LocalIdentity => NetworkHelper.MachineName // eg DOMAIN\SERVER
+ + "/" + _hostingEnvironment.ApplicationId // eg /LM/S3SVC/11/ROOT
+ " [P" + Process.GetCurrentProcess().Id // eg 1234
+ "/D" + AppDomain.CurrentDomain.Id // eg 22
+ "] " + Guid.NewGuid().ToString("N").ToUpper(); // make it truly unique
@@ -550,15 +554,15 @@ namespace Umbraco.Core.Sync
#region Notify refreshers
- private static ICacheRefresher GetRefresher(Guid id)
+ private ICacheRefresher GetRefresher(Guid id)
{
- var refresher = Current.CacheRefreshers[id];
+ var refresher = _cacheRefreshers[id];
if (refresher == null)
throw new InvalidOperationException("Cache refresher with ID \"" + id + "\" does not exist.");
return refresher;
}
- private static IJsonCacheRefresher GetJsonRefresher(Guid id)
+ private IJsonCacheRefresher GetJsonRefresher(Guid id)
{
return GetJsonRefresher(GetRefresher(id));
}
@@ -647,38 +651,38 @@ namespace Umbraco.Core.Sync
return true;
}
- private static void RefreshAll(Guid uniqueIdentifier)
+ private void RefreshAll(Guid uniqueIdentifier)
{
var refresher = GetRefresher(uniqueIdentifier);
refresher.RefreshAll();
}
- private static void RefreshByGuid(Guid uniqueIdentifier, Guid id)
+ private void RefreshByGuid(Guid uniqueIdentifier, Guid id)
{
var refresher = GetRefresher(uniqueIdentifier);
refresher.Refresh(id);
}
- private static void RefreshById(Guid uniqueIdentifier, int id)
+ private void RefreshById(Guid uniqueIdentifier, int id)
{
var refresher = GetRefresher(uniqueIdentifier);
refresher.Refresh(id);
}
- private static void RefreshByIds(Guid uniqueIdentifier, string jsonIds)
+ private void RefreshByIds(Guid uniqueIdentifier, string jsonIds)
{
var refresher = GetRefresher(uniqueIdentifier);
foreach (var id in JsonConvert.DeserializeObject(jsonIds))
refresher.Refresh(id);
}
- private static void RefreshByJson(Guid uniqueIdentifier, string jsonPayload)
+ private void RefreshByJson(Guid uniqueIdentifier, string jsonPayload)
{
var refresher = GetJsonRefresher(uniqueIdentifier);
refresher.Refresh(jsonPayload);
}
- private static void RemoveById(Guid uniqueIdentifier, int id)
+ private void RemoveById(Guid uniqueIdentifier, int id)
{
var refresher = GetRefresher(uniqueIdentifier);
refresher.Remove(id);
diff --git a/src/Umbraco.Core/Sync/RefreshInstruction.cs b/src/Umbraco.Infrastructure/Sync/RefreshInstruction.cs
similarity index 100%
rename from src/Umbraco.Core/Sync/RefreshInstruction.cs
rename to src/Umbraco.Infrastructure/Sync/RefreshInstruction.cs
diff --git a/src/Umbraco.Core/Sync/RefreshInstructionEnvelope.cs b/src/Umbraco.Infrastructure/Sync/RefreshInstructionEnvelope.cs
similarity index 100%
rename from src/Umbraco.Core/Sync/RefreshInstructionEnvelope.cs
rename to src/Umbraco.Infrastructure/Sync/RefreshInstructionEnvelope.cs
diff --git a/src/Umbraco.Core/Sync/ServerMessengerBase.cs b/src/Umbraco.Infrastructure/Sync/ServerMessengerBase.cs
similarity index 99%
rename from src/Umbraco.Core/Sync/ServerMessengerBase.cs
rename to src/Umbraco.Infrastructure/Sync/ServerMessengerBase.cs
index bbf00c3a6b..3b47cabbaf 100644
--- a/src/Umbraco.Core/Sync/ServerMessengerBase.cs
+++ b/src/Umbraco.Infrastructure/Sync/ServerMessengerBase.cs
@@ -2,6 +2,7 @@
using System.Collections.Generic;
using System.Linq;
using Newtonsoft.Json;
+using Umbraco.Composing;
using Umbraco.Core.Cache;
using Umbraco.Core.Composing;
using Umbraco.Core.Logging;
@@ -66,7 +67,7 @@ namespace Umbraco.Core.Sync
public void PerformRefresh(ICacheRefresher refresher, string jsonPayload)
{
-
+
if (refresher == null) throw new ArgumentNullException(nameof(refresher));
if (jsonPayload == null) throw new ArgumentNullException(nameof(jsonPayload));
@@ -75,7 +76,7 @@ namespace Umbraco.Core.Sync
public void PerformRefresh(ICacheRefresher refresher, Func getNumericId, params T[] instances)
{
-
+
if (refresher == null) throw new ArgumentNullException(nameof(refresher));
if (getNumericId == null) throw new ArgumentNullException(nameof(getNumericId));
if (instances == null || instances.Length == 0) return;
@@ -86,7 +87,7 @@ namespace Umbraco.Core.Sync
public void PerformRefresh(ICacheRefresher refresher, Func getGuidId, params T[] instances)
{
-
+
if (refresher == null) throw new ArgumentNullException(nameof(refresher));
if (getGuidId == null) throw new ArgumentNullException(nameof(getGuidId));
if (instances == null || instances.Length == 0) return;
@@ -97,7 +98,7 @@ namespace Umbraco.Core.Sync
public void PerformRemove(ICacheRefresher refresher, Func getNumericId, params T[] instances)
{
-
+
if (refresher == null) throw new ArgumentNullException(nameof(refresher));
if (getNumericId == null) throw new ArgumentNullException(nameof(getNumericId));
if (instances == null || instances.Length == 0) return;
@@ -108,7 +109,7 @@ namespace Umbraco.Core.Sync
public void PerformRemove(ICacheRefresher refresher, params int[] numericIds)
{
-
+
if (refresher == null) throw new ArgumentNullException(nameof(refresher));
if (numericIds == null || numericIds.Length == 0) return;
@@ -117,7 +118,7 @@ namespace Umbraco.Core.Sync
public void PerformRefresh(ICacheRefresher refresher, params int[] numericIds)
{
-
+
if (refresher == null) throw new ArgumentNullException(nameof(refresher));
if (numericIds == null || numericIds.Length == 0) return;
@@ -126,7 +127,7 @@ namespace Umbraco.Core.Sync
public void PerformRefresh(ICacheRefresher refresher, params Guid[] guidIds)
{
-
+
if (refresher == null) throw new ArgumentNullException(nameof(refresher));
if (guidIds == null || guidIds.Length == 0) return;
@@ -135,7 +136,7 @@ namespace Umbraco.Core.Sync
public void PerformRefreshAll(ICacheRefresher refresher)
{
-
+
if (refresher == null) throw new ArgumentNullException(nameof(refresher));
Deliver(refresher, MessageType.RefreshAll);
@@ -288,7 +289,7 @@ namespace Umbraco.Core.Sync
protected virtual void Deliver(ICacheRefresher refresher, TPayload[] payload)
{
-
+
if (refresher == null) throw new ArgumentNullException(nameof(refresher));
// deliver local
@@ -305,7 +306,7 @@ namespace Umbraco.Core.Sync
protected virtual void Deliver(ICacheRefresher refresher, MessageType messageType, IEnumerable ids = null, string json = null)
{
-
+
if (refresher == null) throw new ArgumentNullException(nameof(refresher));
var idsA = ids?.ToArray();
@@ -323,7 +324,7 @@ namespace Umbraco.Core.Sync
protected virtual void Deliver(ICacheRefresher refresher, MessageType messageType, Func getId, IEnumerable instances)
{
-
+
if (refresher == null) throw new ArgumentNullException(nameof(refresher));
var instancesA = instances.ToArray();
diff --git a/src/Umbraco.Infrastructure/Umbraco.Infrastructure.csproj b/src/Umbraco.Infrastructure/Umbraco.Infrastructure.csproj
index 45f6dd0e3e..5667c6b1f6 100644
--- a/src/Umbraco.Infrastructure/Umbraco.Infrastructure.csproj
+++ b/src/Umbraco.Infrastructure/Umbraco.Infrastructure.csproj
@@ -8,7 +8,9 @@
+
+
@@ -19,6 +21,7 @@
+
@@ -28,6 +31,7 @@
<_UnmanagedRegistrationCache Remove="obj\Umbraco.Infrastructure.csproj.UnmanagedRegistration.cache" />
+
@@ -57,4 +61,12 @@
+
+
+
+
+
+
+
+
diff --git a/src/Umbraco.ModelsBuilder.Embedded/Compose/ModelsBuilderComponent.cs b/src/Umbraco.ModelsBuilder.Embedded/Compose/ModelsBuilderComponent.cs
index bb5f7e36bb..d856cae1e7 100644
--- a/src/Umbraco.ModelsBuilder.Embedded/Compose/ModelsBuilderComponent.cs
+++ b/src/Umbraco.ModelsBuilder.Embedded/Compose/ModelsBuilderComponent.cs
@@ -20,13 +20,14 @@ namespace Umbraco.ModelsBuilder.Embedded.Compose
internal class ModelsBuilderComponent : IComponent
{
private readonly IModelsBuilderConfig _config;
+ private readonly IShortStringHelper _shortStringHelper;
private readonly LiveModelsProvider _liveModelsProvider;
private readonly OutOfDateModelsStatus _outOfDateModels;
- private readonly IShortStringHelper _shortStringHelper;
- public ModelsBuilderComponent(IModelsBuilderConfig config, LiveModelsProvider liveModelsProvider, OutOfDateModelsStatus outOfDateModels, IShortStringHelper shortStringHelper)
+ public ModelsBuilderComponent(IModelsBuilderConfig config, IShortStringHelper shortStringHelper, LiveModelsProvider liveModelsProvider, OutOfDateModelsStatus outOfDateModels)
{
_config = config;
+ _shortStringHelper = shortStringHelper;
_liveModelsProvider = liveModelsProvider;
_outOfDateModels = outOfDateModels;
_shortStringHelper = shortStringHelper;
diff --git a/src/Umbraco.ModelsBuilder.Embedded/UmbracoServices.cs b/src/Umbraco.ModelsBuilder.Embedded/UmbracoServices.cs
index 17a4800664..8763da86a6 100644
--- a/src/Umbraco.ModelsBuilder.Embedded/UmbracoServices.cs
+++ b/src/Umbraco.ModelsBuilder.Embedded/UmbracoServices.cs
@@ -19,7 +19,12 @@ namespace Umbraco.ModelsBuilder.Embedded
private readonly IPublishedContentTypeFactory _publishedContentTypeFactory;
private readonly IShortStringHelper _shortStringHelper;
- public UmbracoServices(IContentTypeService contentTypeService, IMediaTypeService mediaTypeService, IMemberTypeService memberTypeService, IPublishedContentTypeFactory publishedContentTypeFactory, IShortStringHelper shortStringHelper)
+ public UmbracoServices(
+ IContentTypeService contentTypeService,
+ IMediaTypeService mediaTypeService,
+ IMemberTypeService memberTypeService,
+ IPublishedContentTypeFactory publishedContentTypeFactory,
+ IShortStringHelper shortStringHelper)
{
_contentTypeService = contentTypeService;
_mediaTypeService = mediaTypeService;
diff --git a/src/Umbraco.Tests/Cache/PublishedCache/PublishedContentCacheTests.cs b/src/Umbraco.Tests/Cache/PublishedCache/PublishedContentCacheTests.cs
index 579923744c..5297f7afd6 100644
--- a/src/Umbraco.Tests/Cache/PublishedCache/PublishedContentCacheTests.cs
+++ b/src/Umbraco.Tests/Cache/PublishedCache/PublishedContentCacheTests.cs
@@ -70,7 +70,7 @@ namespace Umbraco.Tests.Cache.PublishedCache
var publishedShapshot = new PublishedSnapshot(
new PublishedContentCache(xmlStore, domainCache, appCache, globalSettings, ContentTypesCache, null, null),
new PublishedMediaCache(xmlStore, ServiceContext.MediaService, ServiceContext.UserService, appCache, ContentTypesCache, Factory.GetInstance(), umbracoContextAccessor),
- new PublishedMemberCache(null, appCache, Current.Services.MemberService, ContentTypesCache),
+ new PublishedMemberCache(null, appCache, Current.Services.MemberService, ContentTypesCache, Current.Services.UserService),
domainCache);
var publishedSnapshotService = new Mock();
publishedSnapshotService.Setup(x => x.CreatePublishedSnapshot(It.IsAny())).Returns(publishedShapshot);
diff --git a/src/Umbraco.Tests/Components/ComponentTests.cs b/src/Umbraco.Tests/Components/ComponentTests.cs
index 880a1161fa..7166d17c3f 100644
--- a/src/Umbraco.Tests/Components/ComponentTests.cs
+++ b/src/Umbraco.Tests/Components/ComponentTests.cs
@@ -38,7 +38,9 @@ namespace Umbraco.Tests.Components
var typeFinder = new TypeFinder(logger);
var f = new UmbracoDatabaseFactory(logger, new Lazy(() => new MapperCollection(Enumerable.Empty())), TestHelper.GetConfigs(), TestHelper.DbProviderFactoryCreator, TestHelper.BulkSqlInsertProvider);
var fs = new FileSystems(mock.Object, logger, TestHelper.IOHelper, SettingsForTests.GenerateMockGlobalSettings());
- var p = new ScopeProvider(f, fs, logger, typeFinder, NoAppCache.Instance);
+ var coreDebug = Mock.Of();
+ var mediaFileSystem = Mock.Of();
+ var p = new ScopeProvider(f, fs, coreDebug, mediaFileSystem, logger, typeFinder, NoAppCache.Instance);
mock.Setup(x => x.GetInstance(typeof (ILogger))).Returns(logger);
mock.Setup(x => x.GetInstance(typeof (IProfilingLogger))).Returns(new ProfilingLogger(Mock.Of(), Mock.Of()));
diff --git a/src/Umbraco.Tests/CoreThings/CallContextTests.cs b/src/Umbraco.Tests/CoreThings/CallContextTests.cs
index e01534c8d9..b97a87542c 100644
--- a/src/Umbraco.Tests/CoreThings/CallContextTests.cs
+++ b/src/Umbraco.Tests/CoreThings/CallContextTests.cs
@@ -1,6 +1,7 @@
-using System.Runtime.Remoting.Messaging;
-using NUnit.Framework;
+using NUnit.Framework;
+using System;
using Umbraco.Core;
+using Umbraco.Core.Scoping;
namespace Umbraco.Tests.CoreThings
{
@@ -13,10 +14,10 @@ namespace Umbraco.Tests.CoreThings
{
SafeCallContext.Register(() =>
{
- CallContext.FreeNamedDataSlot("test1");
- CallContext.FreeNamedDataSlot("test2");
+ CallContext.SetData("test1", null);
+ CallContext.SetData("test2", null);
return null;
- }, o => {});
+ }, o => { });
}
[OneTimeSetUp]
@@ -44,10 +45,10 @@ namespace Umbraco.Tests.CoreThings
[Test]
public void Test1()
{
- CallContext.LogicalSetData("test1", "test1");
- Assert.IsNull(CallContext.LogicalGetData("test2"));
+ CallContext.SetData("test1", "test1");
+ Assert.IsNull(CallContext.GetData("test2"));
- CallContext.LogicalSetData("test3b", "test3b");
+ CallContext.SetData("test3b", "test3b");
if (_first)
{
@@ -55,21 +56,21 @@ namespace Umbraco.Tests.CoreThings
}
else
{
- Assert.IsNotNull(CallContext.LogicalGetData("test3a")); // leak!
+ Assert.IsNotNull(CallContext.GetData("test3a")); // leak!
}
}
[Test]
public void Test2()
{
- CallContext.LogicalSetData("test2", "test2");
- Assert.IsNull(CallContext.LogicalGetData("test1"));
+ CallContext.SetData("test2", "test2");
+ Assert.IsNull(CallContext.GetData("test1"));
}
[Test]
public void Test3()
{
- CallContext.LogicalSetData("test3a", "test3a");
+ CallContext.SetData("test3a", "test3a");
if (_first)
{
@@ -77,7 +78,7 @@ namespace Umbraco.Tests.CoreThings
}
else
{
- Assert.IsNotNull(CallContext.LogicalGetData("test3b")); // leak!
+ Assert.IsNotNull(CallContext.GetData("test3b")); // leak!
}
}
}
diff --git a/src/Umbraco.Tests/LegacyXmlPublishedCache/PublishedMemberCache.cs b/src/Umbraco.Tests/LegacyXmlPublishedCache/PublishedMemberCache.cs
index c9ff68b254..6990ffe8a2 100644
--- a/src/Umbraco.Tests/LegacyXmlPublishedCache/PublishedMemberCache.cs
+++ b/src/Umbraco.Tests/LegacyXmlPublishedCache/PublishedMemberCache.cs
@@ -18,13 +18,15 @@ namespace Umbraco.Tests.LegacyXmlPublishedCache
private readonly IAppCache _requestCache;
private readonly XmlStore _xmlStore;
private readonly PublishedContentTypeCache _contentTypeCache;
+ private readonly IUserService _userService;
- public PublishedMemberCache(XmlStore xmlStore, IAppCache requestCache, IMemberService memberService, PublishedContentTypeCache contentTypeCache)
+ public PublishedMemberCache(XmlStore xmlStore, IAppCache requestCache, IMemberService memberService, PublishedContentTypeCache contentTypeCache, IUserService userService)
{
_requestCache = requestCache;
_memberService = memberService;
_xmlStore = xmlStore;
_contentTypeCache = contentTypeCache;
+ _userService = userService;
}
public IPublishedContent GetByProviderKey(object key)
@@ -37,7 +39,7 @@ namespace Umbraco.Tests.LegacyXmlPublishedCache
var result = _memberService.GetByProviderKey(key);
if (result == null) return null;
var type = _contentTypeCache.Get(PublishedItemType.Member, result.ContentTypeId);
- return new PublishedMember(result, type).CreateModel(Current.PublishedModelFactory);
+ return new PublishedMember(result, type, _userService).CreateModel(Current.PublishedModelFactory);
});
}
@@ -51,7 +53,7 @@ namespace Umbraco.Tests.LegacyXmlPublishedCache
var result = _memberService.GetById(memberId);
if (result == null) return null;
var type = _contentTypeCache.Get(PublishedItemType.Member, result.ContentTypeId);
- return new PublishedMember(result, type).CreateModel(Current.PublishedModelFactory);
+ return new PublishedMember(result, type, _userService).CreateModel(Current.PublishedModelFactory);
});
}
@@ -65,7 +67,7 @@ namespace Umbraco.Tests.LegacyXmlPublishedCache
var result = _memberService.GetByUsername(username);
if (result == null) return null;
var type = _contentTypeCache.Get(PublishedItemType.Member, result.ContentTypeId);
- return new PublishedMember(result, type).CreateModel(Current.PublishedModelFactory);
+ return new PublishedMember(result, type, _userService).CreateModel(Current.PublishedModelFactory);
});
}
@@ -79,14 +81,14 @@ namespace Umbraco.Tests.LegacyXmlPublishedCache
var result = _memberService.GetByEmail(email);
if (result == null) return null;
var type = _contentTypeCache.Get(PublishedItemType.Member, result.ContentTypeId);
- return new PublishedMember(result, type).CreateModel(Current.PublishedModelFactory);
+ return new PublishedMember(result, type, _userService).CreateModel(Current.PublishedModelFactory);
});
}
public IPublishedContent GetByMember(IMember member)
{
var type = _contentTypeCache.Get(PublishedItemType.Member, member.ContentTypeId);
- return new PublishedMember(member, type).CreateModel(Current.PublishedModelFactory);
+ return new PublishedMember(member, type, _userService).CreateModel(Current.PublishedModelFactory);
}
public XPathNavigator CreateNavigator()
diff --git a/src/Umbraco.Tests/LegacyXmlPublishedCache/XmlPublishedSnapshotService.cs b/src/Umbraco.Tests/LegacyXmlPublishedCache/XmlPublishedSnapshotService.cs
index 698d9a0bdf..cbff346c4d 100644
--- a/src/Umbraco.Tests/LegacyXmlPublishedCache/XmlPublishedSnapshotService.cs
+++ b/src/Umbraco.Tests/LegacyXmlPublishedCache/XmlPublishedSnapshotService.cs
@@ -155,7 +155,7 @@ namespace Umbraco.Tests.LegacyXmlPublishedCache
return new PublishedSnapshot(
new PublishedContentCache(_xmlStore, domainCache, _requestCache, _globalSettings, _contentTypeCache, _routesCache, previewToken),
new PublishedMediaCache(_xmlStore, _mediaService, _userService, _requestCache, _contentTypeCache, _entitySerializer, _umbracoContextAccessor),
- new PublishedMemberCache(_xmlStore, _requestCache, _memberService, _contentTypeCache),
+ new PublishedMemberCache(_xmlStore, _requestCache, _memberService, _contentTypeCache, _userService),
domainCache);
}
diff --git a/src/Umbraco.Tests/LegacyXmlPublishedCache/XmlStore.cs b/src/Umbraco.Tests/LegacyXmlPublishedCache/XmlStore.cs
index 785ab95f45..dd1dffd4d5 100644
--- a/src/Umbraco.Tests/LegacyXmlPublishedCache/XmlStore.cs
+++ b/src/Umbraco.Tests/LegacyXmlPublishedCache/XmlStore.cs
@@ -46,13 +46,13 @@ namespace Umbraco.Tests.LegacyXmlPublishedCache
private readonly IGlobalSettings _globalSettings;
private readonly IEntityXmlSerializer _entitySerializer;
private readonly IHostingEnvironment _hostingEnvironment;
+ private readonly IShortStringHelper _shortStringHelper;
private readonly IPublishedSnapshotAccessor _publishedSnapshotAccessor;
private readonly PublishedContentTypeCache _contentTypeCache;
private readonly RoutesCache _routesCache;
private readonly IContentTypeService _contentTypeService;
private readonly IContentService _contentService;
private readonly IScopeProvider _scopeProvider;
- private readonly IShortStringHelper _shortStringHelper;
private XmlStoreFilePersister _persisterTask;
private volatile bool _released;
diff --git a/src/Umbraco.Tests/Migrations/AdvancedMigrationTests.cs b/src/Umbraco.Tests/Migrations/AdvancedMigrationTests.cs
index 82ccd21b80..966c4109c6 100644
--- a/src/Umbraco.Tests/Migrations/AdvancedMigrationTests.cs
+++ b/src/Umbraco.Tests/Migrations/AdvancedMigrationTests.cs
@@ -42,7 +42,7 @@ namespace Umbraco.Tests.Migrations
upgrader.Execute(ScopeProvider, builder, Mock.Of(), logger);
- var helper = new DatabaseSchemaCreator(scope.Database, logger, UmbracoVersion);
+ var helper = new DatabaseSchemaCreator(scope.Database, logger, UmbracoVersion, TestObjects.GetGlobalSettings());
var exists = helper.TableExists("umbracoUser");
Assert.IsTrue(exists);
diff --git a/src/Umbraco.Tests/Migrations/MigrationPlanTests.cs b/src/Umbraco.Tests/Migrations/MigrationPlanTests.cs
index 3241f78b62..b87270327d 100644
--- a/src/Umbraco.Tests/Migrations/MigrationPlanTests.cs
+++ b/src/Umbraco.Tests/Migrations/MigrationPlanTests.cs
@@ -138,7 +138,7 @@ namespace Umbraco.Tests.Migrations
[Test]
public void ValidateUmbracoPlan()
{
- var plan = new UmbracoPlan(TestHelper.GetUmbracoVersion());
+ var plan = new UmbracoPlan(TestHelper.GetUmbracoVersion(), SettingsForTests.GenerateMockGlobalSettings());
plan.Validate();
Console.WriteLine(plan.FinalState);
Assert.IsFalse(plan.FinalState.IsNullOrWhiteSpace());
diff --git a/src/Umbraco.Tests/Migrations/MigrationTests.cs b/src/Umbraco.Tests/Migrations/MigrationTests.cs
index 6b2d21e4a5..bfadd45b0d 100644
--- a/src/Umbraco.Tests/Migrations/MigrationTests.cs
+++ b/src/Umbraco.Tests/Migrations/MigrationTests.cs
@@ -1,4 +1,5 @@
using System;
+using System.Collections.Generic;
using System.Data;
using Moq;
using NUnit.Framework;
@@ -45,8 +46,18 @@ namespace Umbraco.Tests.Migrations
throw new NotImplementedException();
}
+
+
public IScopeContext Context { get; set; }
public ISqlContext SqlContext { get; set; }
+
+#if DEBUG_SCOPES
+ public ScopeInfo GetScopeInfo(IScope scope)
+ {
+ throw new NotImplementedException();
+ }
+ public IEnumerable ScopeInfos => throw new NotImplementedException();
+#endif
}
[Test]
diff --git a/src/Umbraco.Tests/Persistence/DatabaseContextTests.cs b/src/Umbraco.Tests/Persistence/DatabaseContextTests.cs
index 382d717761..17dbe431d9 100644
--- a/src/Umbraco.Tests/Persistence/DatabaseContextTests.cs
+++ b/src/Umbraco.Tests/Persistence/DatabaseContextTests.cs
@@ -91,7 +91,7 @@ namespace Umbraco.Tests.Persistence
using (var database = _databaseFactory.CreateDatabase())
using (var transaction = database.GetTransaction())
{
- schemaHelper = new DatabaseSchemaCreator(database, _logger, _umbracoVersion);
+ schemaHelper = new DatabaseSchemaCreator(database, _logger, _umbracoVersion, SettingsForTests.GenerateMockGlobalSettings());
schemaHelper.InitializeDatabaseSchema();
transaction.Complete();
}
diff --git a/src/Umbraco.Tests/Persistence/LocksTests.cs b/src/Umbraco.Tests/Persistence/LocksTests.cs
index afcd481f9f..d4e3d23a70 100644
--- a/src/Umbraco.Tests/Persistence/LocksTests.cs
+++ b/src/Umbraco.Tests/Persistence/LocksTests.cs
@@ -13,7 +13,7 @@ namespace Umbraco.Tests.Persistence
{
[TestFixture]
[Timeout(60000)]
- [UmbracoTest(Database = UmbracoTestOptions.Database.NewSchemaPerTest, Logger = UmbracoTestOptions.Logger.Serilog)]
+ [UmbracoTest(Database = UmbracoTestOptions.Database.NewSchemaPerTest, Logger = UmbracoTestOptions.Logger.Console)]
public class LocksTests : TestWithDatabaseBase
{
protected override void Initialize()
diff --git a/src/Umbraco.Tests/Persistence/Repositories/DocumentRepositoryTest.cs b/src/Umbraco.Tests/Persistence/Repositories/DocumentRepositoryTest.cs
index a8f620f2c8..17a01b128a 100644
--- a/src/Umbraco.Tests/Persistence/Repositories/DocumentRepositoryTest.cs
+++ b/src/Umbraco.Tests/Persistence/Repositories/DocumentRepositoryTest.cs
@@ -50,7 +50,7 @@ namespace Umbraco.Tests.Persistence.Repositories
TemplateRepository tr;
var ctRepository = CreateRepository(scopeAccessor, out contentTypeRepository, out tr);
var editors = new PropertyEditorCollection(new DataEditorCollection(Enumerable.Empty()));
- dtdRepository = new DataTypeRepository(scopeAccessor, appCaches, new Lazy(() => editors), Logger, TestHelper.IOHelper, ShortStringHelper);
+ dtdRepository = new DataTypeRepository(scopeAccessor, appCaches, new Lazy(() => editors), Logger, IOHelper, new Lazy(() => DataTypeService), LocalizedTextService, LocalizationService, ShortStringHelper);
return ctRepository;
}
diff --git a/src/Umbraco.Tests/Persistence/Repositories/MemberRepositoryTest.cs b/src/Umbraco.Tests/Persistence/Repositories/MemberRepositoryTest.cs
index a1bca7fc89..b8c823f59e 100644
--- a/src/Umbraco.Tests/Persistence/Repositories/MemberRepositoryTest.cs
+++ b/src/Umbraco.Tests/Persistence/Repositories/MemberRepositoryTest.cs
@@ -41,7 +41,7 @@ namespace Umbraco.Tests.Persistence.Repositories
var relationRepository = new RelationRepository(accessor, Logger, relationTypeRepository, entityRepository);
var propertyEditors = new Lazy(() => new PropertyEditorCollection(new DataEditorCollection(Enumerable.Empty())));
var dataValueReferences = new DataValueReferenceFactoryCollection(Enumerable.Empty());
- var repository = new MemberRepository(accessor, AppCaches.Disabled, Logger, memberTypeRepository, memberGroupRepository, tagRepo, Mock.Of(), relationRepository, relationTypeRepository, propertyEditors, dataValueReferences, DataTypeService);
+ var repository = new MemberRepository(accessor, AppCaches.Disabled, Logger, memberTypeRepository, memberGroupRepository, tagRepo, Mock.Of(), relationRepository, relationTypeRepository, PasswordHasher, propertyEditors, dataValueReferences, DataTypeService);
return repository;
}
diff --git a/src/Umbraco.Tests/Persistence/Repositories/ScriptRepositoryTest.cs b/src/Umbraco.Tests/Persistence/Repositories/ScriptRepositoryTest.cs
index 8d7a166f26..a319f8d63b 100644
--- a/src/Umbraco.Tests/Persistence/Repositories/ScriptRepositoryTest.cs
+++ b/src/Umbraco.Tests/Persistence/Repositories/ScriptRepositoryTest.cs
@@ -40,7 +40,7 @@ namespace Umbraco.Tests.Persistence.Repositories
private IScriptRepository CreateRepository()
{
- return new ScriptRepository(_fileSystems, IOHelper);
+ return new ScriptRepository(_fileSystems, IOHelper, TestObjects.GetGlobalSettings());
}
protected override void Compose()
diff --git a/src/Umbraco.Tests/Persistence/Repositories/StylesheetRepositoryTest.cs b/src/Umbraco.Tests/Persistence/Repositories/StylesheetRepositoryTest.cs
index c2fbb63442..70e7b664a1 100644
--- a/src/Umbraco.Tests/Persistence/Repositories/StylesheetRepositoryTest.cs
+++ b/src/Umbraco.Tests/Persistence/Repositories/StylesheetRepositoryTest.cs
@@ -37,7 +37,7 @@ namespace Umbraco.Tests.Persistence.Repositories
private IStylesheetRepository CreateRepository()
{
- return new StylesheetRepository(_fileSystems, IOHelper);
+ return new StylesheetRepository(_fileSystems, IOHelper, TestObjects.GetGlobalSettings());
}
[Test]
diff --git a/src/Umbraco.Tests/Persistence/SchemaValidationTest.cs b/src/Umbraco.Tests/Persistence/SchemaValidationTest.cs
index 99254edd77..0648e3bc21 100644
--- a/src/Umbraco.Tests/Persistence/SchemaValidationTest.cs
+++ b/src/Umbraco.Tests/Persistence/SchemaValidationTest.cs
@@ -22,7 +22,7 @@ namespace Umbraco.Tests.Persistence
using (var scope = ScopeProvider.CreateScope())
{
- var schema = new DatabaseSchemaCreator(scope.Database, Logger, UmbracoVersion);
+ var schema = new DatabaseSchemaCreator(scope.Database, Logger, UmbracoVersion, TestObjects.GetGlobalSettings());
result = schema.ValidateSchema(
//TODO: When we remove the xml cache from tests we can remove this too
DatabaseSchemaCreator.OrderedTables.Concat(new []{typeof(ContentXmlDto), typeof(PreviewXmlDto)}));
diff --git a/src/Umbraco.Tests/Persistence/SqlCeTableByTableTest.cs b/src/Umbraco.Tests/Persistence/SqlCeTableByTableTest.cs
index 660783c784..207e595598 100644
--- a/src/Umbraco.Tests/Persistence/SqlCeTableByTableTest.cs
+++ b/src/Umbraco.Tests/Persistence/SqlCeTableByTableTest.cs
@@ -16,12 +16,14 @@ namespace Umbraco.Tests.Persistence
[UmbracoTest(Database = UmbracoTestOptions.Database.NewSchemaPerTest)]
public class SqlCeTableByTableTest : TestWithDatabaseBase
{
+ public IGlobalSettings GlobalSettings => SettingsForTests.GenerateMockGlobalSettings();
+
[Test]
public void Can_Create_umbracoNode_Table()
{
using (var scope = ScopeProvider.CreateScope())
{
- var helper = new DatabaseSchemaCreator(scope.Database, Mock.Of(), UmbracoVersion);
+ var helper = new DatabaseSchemaCreator(scope.Database, Mock.Of(), UmbracoVersion, GlobalSettings);
helper.CreateTable();
@@ -34,7 +36,7 @@ namespace Umbraco.Tests.Persistence
{
using (var scope = ScopeProvider.CreateScope())
{
- var helper = new DatabaseSchemaCreator(scope.Database, Mock.Of(), UmbracoVersion);
+ var helper = new DatabaseSchemaCreator(scope.Database, Mock.Of(), UmbracoVersion, GlobalSettings);
helper.CreateTable();
helper.CreateTable();
@@ -48,7 +50,7 @@ namespace Umbraco.Tests.Persistence
{
using (var scope = ScopeProvider.CreateScope())
{
- var helper = new DatabaseSchemaCreator(scope.Database, Mock.Of(), UmbracoVersion);
+ var helper = new DatabaseSchemaCreator(scope.Database, Mock.Of(), UmbracoVersion, GlobalSettings);
helper.CreateTable();
helper.CreateTable();
@@ -63,7 +65,7 @@ namespace Umbraco.Tests.Persistence
{
using (var scope = ScopeProvider.CreateScope())
{
- var helper = new DatabaseSchemaCreator(scope.Database, Mock.Of(), UmbracoVersion);
+ var helper = new DatabaseSchemaCreator(scope.Database, Mock.Of(), UmbracoVersion, GlobalSettings);
helper.CreateTable();
helper.CreateTable();
@@ -77,7 +79,7 @@ namespace Umbraco.Tests.Persistence
{
using (var scope = ScopeProvider.CreateScope())
{
- var helper = new DatabaseSchemaCreator(scope.Database, Mock.Of(), UmbracoVersion);
+ var helper = new DatabaseSchemaCreator(scope.Database, Mock.Of(), UmbracoVersion, GlobalSettings);
helper.CreateTable();
helper.CreateTable();
@@ -92,7 +94,7 @@ namespace Umbraco.Tests.Persistence
{
using (var scope = ScopeProvider.CreateScope())
{
- var helper = new DatabaseSchemaCreator(scope.Database, Mock.Of(), UmbracoVersion);
+ var helper = new DatabaseSchemaCreator(scope.Database, Mock.Of(), UmbracoVersion, GlobalSettings);
helper.CreateTable();
helper.CreateTable();
@@ -106,7 +108,7 @@ namespace Umbraco.Tests.Persistence
{
using (var scope = ScopeProvider.CreateScope())
{
- var helper = new DatabaseSchemaCreator(scope.Database, Mock.Of(), UmbracoVersion);
+ var helper = new DatabaseSchemaCreator(scope.Database, Mock.Of(), UmbracoVersion, GlobalSettings);
helper.CreateTable();
helper.CreateTable();
@@ -122,7 +124,7 @@ namespace Umbraco.Tests.Persistence
{
using (var scope = ScopeProvider.CreateScope())
{
- var helper = new DatabaseSchemaCreator(scope.Database, Mock.Of(), UmbracoVersion);
+ var helper = new DatabaseSchemaCreator(scope.Database, Mock.Of(), UmbracoVersion, GlobalSettings);
helper.CreateTable();
helper.CreateTable();
@@ -138,7 +140,7 @@ namespace Umbraco.Tests.Persistence
{
using (var scope = ScopeProvider.CreateScope())
{
- var helper = new DatabaseSchemaCreator(scope.Database, Mock.Of(), UmbracoVersion);
+ var helper = new DatabaseSchemaCreator(scope.Database, Mock.Of(), UmbracoVersion, GlobalSettings);
helper.CreateTable();
helper.CreateTable();
@@ -152,7 +154,7 @@ namespace Umbraco.Tests.Persistence
{
using (var scope = ScopeProvider.CreateScope())
{
- var helper = new DatabaseSchemaCreator(scope.Database, Mock.Of(), UmbracoVersion);
+ var helper = new DatabaseSchemaCreator(scope.Database, Mock.Of(), UmbracoVersion, GlobalSettings);
helper.CreateTable();
@@ -165,7 +167,7 @@ namespace Umbraco.Tests.Persistence
{
using (var scope = ScopeProvider.CreateScope())
{
- var helper = new DatabaseSchemaCreator(scope.Database, Mock.Of(), UmbracoVersion);
+ var helper = new DatabaseSchemaCreator(scope.Database, Mock.Of(), UmbracoVersion, GlobalSettings);
helper.CreateTable();
helper.CreateTable();
@@ -180,7 +182,7 @@ namespace Umbraco.Tests.Persistence
{
using (var scope = ScopeProvider.CreateScope())
{
- var helper = new DatabaseSchemaCreator(scope.Database, Mock.Of(), UmbracoVersion);
+ var helper = new DatabaseSchemaCreator(scope.Database, Mock.Of(), UmbracoVersion, GlobalSettings);
helper.CreateTable();
helper.CreateTable();
@@ -194,7 +196,7 @@ namespace Umbraco.Tests.Persistence
{
using (var scope = ScopeProvider.CreateScope())
{
- var helper = new DatabaseSchemaCreator(scope.Database, Mock.Of(), UmbracoVersion);
+ var helper = new DatabaseSchemaCreator(scope.Database, Mock.Of(), UmbracoVersion, GlobalSettings);
helper.CreateTable();
helper.CreateTable();
@@ -211,7 +213,7 @@ namespace Umbraco.Tests.Persistence
{
using (var scope = ScopeProvider.CreateScope())
{
- var helper = new DatabaseSchemaCreator(scope.Database, Mock.Of(), UmbracoVersion);
+ var helper = new DatabaseSchemaCreator(scope.Database, Mock.Of(), UmbracoVersion, GlobalSettings);
helper.CreateTable();
helper.CreateTable();
@@ -227,7 +229,7 @@ namespace Umbraco.Tests.Persistence
{
using (var scope = ScopeProvider.CreateScope())
{
- var helper = new DatabaseSchemaCreator(scope.Database, Mock.Of(), UmbracoVersion);
+ var helper = new DatabaseSchemaCreator(scope.Database, Mock.Of(), UmbracoVersion, GlobalSettings);
helper.CreateTable();
helper.CreateTable();
@@ -241,7 +243,7 @@ namespace Umbraco.Tests.Persistence
{
using (var scope = ScopeProvider.CreateScope())
{
- var helper = new DatabaseSchemaCreator(scope.Database, Mock.Of(), UmbracoVersion);
+ var helper = new DatabaseSchemaCreator(scope.Database, Mock.Of(), UmbracoVersion, GlobalSettings);
helper.CreateTable();
@@ -254,7 +256,7 @@ namespace Umbraco.Tests.Persistence
{
using (var scope = ScopeProvider.CreateScope())
{
- var helper = new DatabaseSchemaCreator(scope.Database, Mock.Of(), UmbracoVersion);
+ var helper = new DatabaseSchemaCreator(scope.Database, Mock.Of(), UmbracoVersion, GlobalSettings);
helper.CreateTable();
@@ -267,7 +269,7 @@ namespace Umbraco.Tests.Persistence
{
using (var scope = ScopeProvider.CreateScope())
{
- var helper = new DatabaseSchemaCreator(scope.Database, Mock.Of(), UmbracoVersion);
+ var helper = new DatabaseSchemaCreator(scope.Database, Mock.Of(), UmbracoVersion, GlobalSettings);
helper.CreateTable();
@@ -280,7 +282,7 @@ namespace Umbraco.Tests.Persistence
{
using (var scope = ScopeProvider.CreateScope())
{
- var helper = new DatabaseSchemaCreator(scope.Database, Mock.Of(), UmbracoVersion);
+ var helper = new DatabaseSchemaCreator(scope.Database, Mock.Of(), UmbracoVersion, GlobalSettings);
helper.CreateTable();
helper.CreateTable();
@@ -296,7 +298,7 @@ namespace Umbraco.Tests.Persistence
{
using (var scope = ScopeProvider.CreateScope())
{
- var helper = new DatabaseSchemaCreator(scope.Database, Mock.Of(), UmbracoVersion);
+ var helper = new DatabaseSchemaCreator(scope.Database, Mock.Of