From 13ec3db2d34c00d4ed6957f8be2b779b0e2e471e Mon Sep 17 00:00:00 2001 From: Stephan Date: Mon, 22 May 2017 17:22:10 +0200 Subject: [PATCH] fix 7.6-rc1 port --- src/SQLCE4Umbraco/SqlCE4Umbraco.csproj | 1 + .../Core/ApplicationContext.cs | 1 + .../Core/Cache/CacheRefreshersResolver.cs | 1 + .../Migrations/MigrationResolver.cs | 1 + .../PropertyEditors/PropertyEditorResolver.cs | 2 + .../PropertyValueConvertersResolver.cs | 1 + .../Strings/UrlSegmentProviderResolver.cs | 1 + src/Umbraco.Compat7/Umbraco.Compat7.csproj | 3 +- .../Web/HealthCheck/HealthCheckResolver.cs | 1 + .../Web/Media/ThumbnailProvidersResolver.cs | 1 + .../FilteredControllerFactoriesResolver.cs | 1 + .../Web/Routing/ContentFinderResolver.cs | 1 + .../Web/Routing/UrlProviderResolver.cs | 1 + src/Umbraco.Core/CoreRuntime.cs | 1 + src/Umbraco.Core/DI/CollectionBuilderBase.cs | 2 +- src/Umbraco.Core/DI/LightInjectExtensions.cs | 27 +- .../MixedLightInjectScopeManagerProvider.cs | 4 +- .../DI/RepositoryCompositionRoot.cs | 6 +- .../DI/ServicesCompositionRoot.cs | 2 +- .../Exceptions/LightInjectException.cs | 50 ++- src/Umbraco.Core/IO/FileSystems.cs | 12 +- .../Repositories/EntityRepository.cs | 2 +- .../Repositories/NotificationsRepository.cs | 2 +- .../Repositories/VersionableRepositoryBase.cs | 2 + .../Persistence/UmbracoDatabase.cs | 49 ++- src/Umbraco.Core/Services/ContentService.cs | 14 +- src/Umbraco.Core/Umbraco.Core.csproj | 13 +- src/Umbraco.Tests.Benchmarks/App.config | 4 +- .../Umbraco.Tests.Benchmarks.csproj | 72 +++- src/Umbraco.Tests.Benchmarks/packages.config | 45 ++- .../PublishedMediaCacheTests.cs | 1 + .../CollectionBuildersTests.cs | 4 +- src/Umbraco.Tests/Issues/U9560.cs | 1 + .../Models/Mapping/AutoMapperTests.cs | 1 + .../DataTypeDefinitionRepositoryTest.cs | 3 +- .../Repositories/DictionaryRepositoryTest.cs | 1 + .../PublishedContentMoreTests.cs | 5 +- .../PublishedContent/PublishedContentTests.cs | 1 + .../PublishedContent/PublishedMediaTests.cs | 2 +- .../Services/ContentServiceTests.cs | 2 +- .../TestHelpers/TestWithDatabaseBase.cs | 1 + src/Umbraco.Tests/Umbraco.Tests.csproj | 54 +-- src/Umbraco.Tests/packages.config | 6 +- src/Umbraco.Web.UI/Umbraco.Web.UI.csproj | 332 ++++++++++++++++-- .../config/imageprocessor/cache.config | 8 +- .../config/imageprocessor/processing.config | 10 +- .../config/imageprocessor/security.config | 6 +- src/Umbraco.Web.UI/packages.config | 83 +++++ src/Umbraco.Web.UI/web.Template.Debug.config | 147 ++++---- .../web.Template.Release.config | 13 +- src/Umbraco.Web.UI/web.Template.config | 29 +- .../DI/WebModelMappersCompositionRoot.cs | 1 + .../EnsurePublishedContentRequestAttribute.cs | 1 + src/Umbraco.Web/Mvc/RenderRouteHandler.cs | 1 + .../Mvc/UmbracoVirtualNodeRouteHandler.cs | 1 + .../MarkdownEditorValueConverter.cs | 4 +- .../RelatedLinksValueConverter.cs | 8 +- .../NuCache/NuCacheComponent.cs | 1 + .../XmlPublishedCache/XmlCacheComponent.cs | 1 + .../Routing/UrlProviderExtensions.cs | 3 +- .../Scheduling/BackgroundTaskRunner.cs | 1 + src/Umbraco.Web/Services/SectionService.cs | 2 +- ...aseServerRegistrarAndMessengerComponent.cs | 1 + ...acyServerRegistrarAndMessengerComponent.cs | 5 +- .../Migrations/PostMigrationComponent.cs | 1 + src/Umbraco.Web/Templates/TemplateRenderer.cs | 1 + src/Umbraco.Web/Umbraco.Web.csproj | 28 +- src/UmbracoExamine/UmbracoExamine.csproj | 1 + src/umbraco.cms/umbraco.cms.csproj | 1 + .../umbraco.datalayer.csproj | 3 +- 70 files changed, 774 insertions(+), 324 deletions(-) create mode 100644 src/Umbraco.Web.UI/packages.config diff --git a/src/SQLCE4Umbraco/SqlCE4Umbraco.csproj b/src/SQLCE4Umbraco/SqlCE4Umbraco.csproj index 615dbe5976..006e387126 100644 --- a/src/SQLCE4Umbraco/SqlCE4Umbraco.csproj +++ b/src/SQLCE4Umbraco/SqlCE4Umbraco.csproj @@ -6,6 +6,7 @@ {5BA5425F-27A7-4677-865E-82246498AA2E} Library SQLCE4Umbraco + SQLCE4Umbraco ..\ true diff --git a/src/Umbraco.Compat7/Core/ApplicationContext.cs b/src/Umbraco.Compat7/Core/ApplicationContext.cs index cf423ce1a5..9b763989df 100644 --- a/src/Umbraco.Compat7/Core/ApplicationContext.cs +++ b/src/Umbraco.Compat7/Core/ApplicationContext.cs @@ -3,6 +3,7 @@ using Umbraco.Core.Cache; using Umbraco.Core.Logging; using Umbraco.Core.Persistence; using Umbraco.Core.Services; +using LightInject; // ReSharper disable once CheckNamespace namespace Umbraco.Core diff --git a/src/Umbraco.Compat7/Core/Cache/CacheRefreshersResolver.cs b/src/Umbraco.Compat7/Core/Cache/CacheRefreshersResolver.cs index 5804ba0eee..2bbc1775c0 100644 --- a/src/Umbraco.Compat7/Core/Cache/CacheRefreshersResolver.cs +++ b/src/Umbraco.Compat7/Core/Cache/CacheRefreshersResolver.cs @@ -2,6 +2,7 @@ using System.Collections.Generic; using Umbraco.Core.ObjectResolution; using CoreCurrent = Umbraco.Core.DI.Current; +using LightInject; // ReSharper disable once CheckNamespace namespace Umbraco.Core.Cache diff --git a/src/Umbraco.Compat7/Core/Persistence/Migrations/MigrationResolver.cs b/src/Umbraco.Compat7/Core/Persistence/Migrations/MigrationResolver.cs index 018f18e6b9..dd840a0db0 100644 --- a/src/Umbraco.Compat7/Core/Persistence/Migrations/MigrationResolver.cs +++ b/src/Umbraco.Compat7/Core/Persistence/Migrations/MigrationResolver.cs @@ -1,6 +1,7 @@ using System.Collections.Generic; using Umbraco.Core.ObjectResolution; using CoreCurrent = Umbraco.Core.DI.Current; +using LightInject; // ReSharper disable once CheckNamespace namespace Umbraco.Core.Persistence.Migrations diff --git a/src/Umbraco.Compat7/Core/PropertyEditors/PropertyEditorResolver.cs b/src/Umbraco.Compat7/Core/PropertyEditors/PropertyEditorResolver.cs index c0a7210968..29508b4552 100644 --- a/src/Umbraco.Compat7/Core/PropertyEditors/PropertyEditorResolver.cs +++ b/src/Umbraco.Compat7/Core/PropertyEditors/PropertyEditorResolver.cs @@ -1,6 +1,8 @@ using System.Collections.Generic; using Umbraco.Core.ObjectResolution; using CoreCurrent = Umbraco.Core.DI.Current; +using LightInject; +using LightInject; // ReSharper disable once CheckNamespace namespace Umbraco.Core.PropertyEditors diff --git a/src/Umbraco.Compat7/Core/PropertyEditors/PropertyValueConvertersResolver.cs b/src/Umbraco.Compat7/Core/PropertyEditors/PropertyValueConvertersResolver.cs index 06242d5234..b8ff2780a4 100644 --- a/src/Umbraco.Compat7/Core/PropertyEditors/PropertyValueConvertersResolver.cs +++ b/src/Umbraco.Compat7/Core/PropertyEditors/PropertyValueConvertersResolver.cs @@ -1,6 +1,7 @@ using System.Collections.Generic; using Umbraco.Core.ObjectResolution; using CoreCurrent = Umbraco.Core.DI.Current; +using LightInject; // ReSharper disable once CheckNamespace namespace Umbraco.Core.PropertyEditors diff --git a/src/Umbraco.Compat7/Core/Strings/UrlSegmentProviderResolver.cs b/src/Umbraco.Compat7/Core/Strings/UrlSegmentProviderResolver.cs index 42a271fd74..57bbd23580 100644 --- a/src/Umbraco.Compat7/Core/Strings/UrlSegmentProviderResolver.cs +++ b/src/Umbraco.Compat7/Core/Strings/UrlSegmentProviderResolver.cs @@ -1,6 +1,7 @@ using System.Collections.Generic; using Umbraco.Core.ObjectResolution; using CoreCurrent = Umbraco.Core.DI.Current; +using LightInject; // ReSharper disable once CheckNamespace namespace Umbraco.Core.Strings diff --git a/src/Umbraco.Compat7/Umbraco.Compat7.csproj b/src/Umbraco.Compat7/Umbraco.Compat7.csproj index fb0ea827d8..079cf0fac8 100644 --- a/src/Umbraco.Compat7/Umbraco.Compat7.csproj +++ b/src/Umbraco.Compat7/Umbraco.Compat7.csproj @@ -6,6 +6,7 @@ {185E098F-5706-4B97-B404-EB974F05F633} Library Umbraco.Compat7 + Umbraco.Compat7 ..\ true @@ -41,7 +42,7 @@ - + diff --git a/src/Umbraco.Compat7/Web/HealthCheck/HealthCheckResolver.cs b/src/Umbraco.Compat7/Web/HealthCheck/HealthCheckResolver.cs index 8cec0a7b1c..891fb4323e 100644 --- a/src/Umbraco.Compat7/Web/HealthCheck/HealthCheckResolver.cs +++ b/src/Umbraco.Compat7/Web/HealthCheck/HealthCheckResolver.cs @@ -1,6 +1,7 @@ using System.Collections.Generic; using Umbraco.Core.ObjectResolution; using CoreCurrent = Umbraco.Core.DI.Current; +using LightInject; // ReSharper disable once CheckNamespace namespace Umbraco.Web.HealthCheck diff --git a/src/Umbraco.Compat7/Web/Media/ThumbnailProvidersResolver.cs b/src/Umbraco.Compat7/Web/Media/ThumbnailProvidersResolver.cs index 61119a7038..1ae07cbcc6 100644 --- a/src/Umbraco.Compat7/Web/Media/ThumbnailProvidersResolver.cs +++ b/src/Umbraco.Compat7/Web/Media/ThumbnailProvidersResolver.cs @@ -4,6 +4,7 @@ using Umbraco.Core.ObjectResolution; using Umbraco.Web.Media.ThumbnailProviders; using CoreCurrent = Umbraco.Core.DI.Current; using WebCurrent = Umbraco.Web.Current; +using LightInject; // ReSharper disable once CheckNamespace namespace Umbraco.Web.Media diff --git a/src/Umbraco.Compat7/Web/Mvc/FilteredControllerFactoriesResolver.cs b/src/Umbraco.Compat7/Web/Mvc/FilteredControllerFactoriesResolver.cs index 28e01b85b5..200052bed8 100644 --- a/src/Umbraco.Compat7/Web/Mvc/FilteredControllerFactoriesResolver.cs +++ b/src/Umbraco.Compat7/Web/Mvc/FilteredControllerFactoriesResolver.cs @@ -2,6 +2,7 @@ using Umbraco.Core.ObjectResolution; using CoreCurrent = Umbraco.Core.DI.Current; using WebCurrent = Umbraco.Web.Current; +using LightInject; // ReSharper disable once CheckNamespace namespace Umbraco.Web.Mvc diff --git a/src/Umbraco.Compat7/Web/Routing/ContentFinderResolver.cs b/src/Umbraco.Compat7/Web/Routing/ContentFinderResolver.cs index aff430d615..94976db7a8 100644 --- a/src/Umbraco.Compat7/Web/Routing/ContentFinderResolver.cs +++ b/src/Umbraco.Compat7/Web/Routing/ContentFinderResolver.cs @@ -2,6 +2,7 @@ using Umbraco.Core.ObjectResolution; using CoreCurrent = Umbraco.Core.DI.Current; using WebCurrent = Umbraco.Web.Current; +using LightInject; // ReSharper disable once CheckNamespace namespace Umbraco.Web.Routing diff --git a/src/Umbraco.Compat7/Web/Routing/UrlProviderResolver.cs b/src/Umbraco.Compat7/Web/Routing/UrlProviderResolver.cs index f05976e53e..04314eee0f 100644 --- a/src/Umbraco.Compat7/Web/Routing/UrlProviderResolver.cs +++ b/src/Umbraco.Compat7/Web/Routing/UrlProviderResolver.cs @@ -2,6 +2,7 @@ using Umbraco.Core.ObjectResolution; using CoreCurrent = Umbraco.Core.DI.Current; using WebCurrent = Umbraco.Web.Current; +using LightInject; // ReSharper disable once CheckNamespace namespace Umbraco.Web.Routing diff --git a/src/Umbraco.Core/CoreRuntime.cs b/src/Umbraco.Core/CoreRuntime.cs index 5c4841a616..acbc137a72 100644 --- a/src/Umbraco.Core/CoreRuntime.cs +++ b/src/Umbraco.Core/CoreRuntime.cs @@ -227,6 +227,7 @@ namespace Umbraco.Core // from the default connection string name, if possible, else will remain non-configured // until properly configured (eg when installing) container.RegisterSingleton(); + container.RegisterSingleton(f => f.GetInstance()); // register the scope provider container.RegisterSingleton(); diff --git a/src/Umbraco.Core/DI/CollectionBuilderBase.cs b/src/Umbraco.Core/DI/CollectionBuilderBase.cs index 51ca173aa8..eedda0ee2a 100644 --- a/src/Umbraco.Core/DI/CollectionBuilderBase.cs +++ b/src/Umbraco.Core/DI/CollectionBuilderBase.cs @@ -140,7 +140,7 @@ namespace Umbraco.Core.DI var type = typeof (TItem); return _registrations - .Select(x => (TItem) Container.GetInstance(type, x.ServiceName, args)) + .Select(x => (TItem) Container.GetInstanceOrThrow(type, x.ServiceName, x.ImplementingType, args)) .ToArray(); // safe } diff --git a/src/Umbraco.Core/DI/LightInjectExtensions.cs b/src/Umbraco.Core/DI/LightInjectExtensions.cs index 1f53d0e0c8..370717c5f0 100644 --- a/src/Umbraco.Core/DI/LightInjectExtensions.cs +++ b/src/Umbraco.Core/DI/LightInjectExtensions.cs @@ -289,7 +289,32 @@ namespace Umbraco.Core.DI throw; } } - + + /// + /// Gets an instance of a TService or throws a meaningful exception. + /// + /// The container. + /// The type of the service. + /// The name of the service. + /// The implementing type. + /// Arguments. + /// The instance. + internal static object GetInstanceOrThrow(this IServiceFactory factory, Type tService, string serviceName, Type implementingType, object[] args) + { + if (factory == null) + throw new ArgumentNullException(nameof(factory)); + + try + { + return factory.GetInstance(tService, serviceName, args); + } + catch (Exception e) + { + LightInjectException.TryThrow(e, implementingType); + throw; + } + } + // FIXME or just use names?! // this is what RegisterMany does => kill RegisterCollection! diff --git a/src/Umbraco.Core/DI/MixedLightInjectScopeManagerProvider.cs b/src/Umbraco.Core/DI/MixedLightInjectScopeManagerProvider.cs index e1debca23f..3b7fbe1ff9 100644 --- a/src/Umbraco.Core/DI/MixedLightInjectScopeManagerProvider.cs +++ b/src/Umbraco.Core/DI/MixedLightInjectScopeManagerProvider.cs @@ -32,9 +32,9 @@ namespace Umbraco.Core.DI _provider = new PerWebRequestScopeManagerProvider(); } - public ScopeManager GetScopeManager() + public IScopeManager GetScopeManager(IServiceFactory factory) { - return _provider.GetScopeManager(); + return _provider.GetScopeManager(factory); } } } diff --git a/src/Umbraco.Core/DI/RepositoryCompositionRoot.cs b/src/Umbraco.Core/DI/RepositoryCompositionRoot.cs index e1ce63153e..8bf9ae0513 100644 --- a/src/Umbraco.Core/DI/RepositoryCompositionRoot.cs +++ b/src/Umbraco.Core/DI/RepositoryCompositionRoot.cs @@ -31,10 +31,10 @@ namespace Umbraco.Core.DI // the container, 'info' describes the ctor argument, and 'args' contains the args that // were passed to GetInstance() - use first arg if it is the right type, // - // for IDatabaseUnitOfWork - container.RegisterConstructorDependency((factory, info, args) => args.Length > 0 ? args[0] as IDatabaseUnitOfWork : null); + // for IScopeUnitOfWork + container.RegisterConstructorDependency((factory, info, args) => args.Length > 0 ? args[0] as IScopeUnitOfWork : null); // for IUnitOfWork - container.RegisterConstructorDependency((factory, info, args) => args.Length > 0 ? args[0] as IUnitOfWork : null); + //container.RegisterConstructorDependency((factory, info, args) => args.Length > 0 ? args[0] as IUnitOfWork : null); // register repositories // repos depend on various things, and a IDatabaseUnitOfWork (registered above) diff --git a/src/Umbraco.Core/DI/ServicesCompositionRoot.cs b/src/Umbraco.Core/DI/ServicesCompositionRoot.cs index 8e18659133..25be1c75e1 100644 --- a/src/Umbraco.Core/DI/ServicesCompositionRoot.cs +++ b/src/Umbraco.Core/DI/ServicesCompositionRoot.cs @@ -16,7 +16,7 @@ namespace Umbraco.Core.DI { // register a transient messages factory, which will be replaced by the web // boot manager when running in a web context - container.Register(); + container.RegisterSingleton(); // register the service context container.RegisterSingleton(); diff --git a/src/Umbraco.Core/Exceptions/LightInjectException.cs b/src/Umbraco.Core/Exceptions/LightInjectException.cs index 1e2a01efd8..03fd9f2f9f 100644 --- a/src/Umbraco.Core/Exceptions/LightInjectException.cs +++ b/src/Umbraco.Core/Exceptions/LightInjectException.cs @@ -28,30 +28,44 @@ namespace Umbraco.Core.Exceptions if (ex == null || ex.Message.StartsWith(LightInjectUnableToResolveType) == false) return; - var messages = new List { ex.Message }; + var sb = new StringBuilder(); + sb.AppendLine("Unresolved type: " + ex.Message.Substring(LightInjectUnableToResolveType.Length)); + WriteDetails(ex, sb); + throw new LightInjectException(sb.ToString(), e); + } + public static void TryThrow(Exception e, Type implementingType) + { + var ex = e as InvalidOperationException; + if (ex == null || ex.Message.StartsWith(LightInjectUnableToResolveType) == false) + return; + + var sb = new StringBuilder(); + sb.AppendLine("Unresolved type: " + ex.Message.Substring(LightInjectUnableToResolveType.Length)); + sb.AppendLine("Implementing type: " + implementingType); + WriteDetails(ex, sb); + throw new LightInjectException(sb.ToString(), e); + } + + private static void WriteDetails(InvalidOperationException ex, StringBuilder sb) + { ex = ex.InnerException as InvalidOperationException; while (ex != null) { - messages.Add(ex.Message); + var message = ex.Message; + + if (message.StartsWith(LightInjectUnableToResolveType)) + { + sb.AppendLine("-> Unresolved type: " + message.Substring(LightInjectUnableToResolveType.Length)); + } + else if (message.StartsWith(LightInjectUnresolvedDependency)) + { + var pos = message.InvariantIndexOf(LightInjectRequestedDependency); + sb.AppendLine("-> Unresolved dependency: " + message.Substring(pos + LightInjectRequestedDependency.Length + 1).TrimEnd(']')); + } + ex = ex.InnerException as InvalidOperationException; } - - var sb = new StringBuilder(); - var last = messages.Last(); - if (last.StartsWith(LightInjectUnableToResolveType)) - { - sb.AppendLine("Unresolved type: " + last.Substring(LightInjectUnableToResolveType.Length)); - } - else if (last.StartsWith(LightInjectUnresolvedDependency)) - { - var pos = last.InvariantIndexOf(LightInjectRequestedDependency); - sb.AppendLine("Unresolved dependency: " + last.Substring(pos + LightInjectRequestedDependency.Length + 1).TrimEnd(']')); - sb.AppendLine(" (see inner exceptions for the entire dependencies chain)."); - } - else return; // wtf? - - throw new LightInjectException(sb.ToString(), e); } } } diff --git a/src/Umbraco.Core/IO/FileSystems.cs b/src/Umbraco.Core/IO/FileSystems.cs index 946c1e3b90..e21c4a6b6f 100644 --- a/src/Umbraco.Core/IO/FileSystems.cs +++ b/src/Umbraco.Core/IO/FileSystems.cs @@ -32,11 +32,19 @@ namespace Umbraco.Core.IO #region Constructor - // fixme - circular dependency on scope provider, refactor! + // fixme - circular dependency on scope provider + // managed via lazy-injecting FileSystems into ScopeProvider for now, + // but we must refactor this somehow! + + // DI wants a public ctor + // but IScopeProviderInternal is not public + public FileSystems(/*IScopeProviderInternal scopeProvider,*/ ILogger logger) + : this(DI.Current.ScopeProvider as IScopeProviderInternal, logger) + { } internal FileSystems(IScopeProviderInternal scopeProvider, ILogger logger) { - _config = (FileSystemProvidersSection) ConfigurationManager.GetSection("umbracoConfiguration/FileSystemProviders"); + _config = (FileSystemProvidersSection)ConfigurationManager.GetSection("umbracoConfiguration/FileSystemProviders"); _scopeProvider = scopeProvider; _logger = logger; CreateWellKnownFileSystems(); diff --git a/src/Umbraco.Core/Persistence/Repositories/EntityRepository.cs b/src/Umbraco.Core/Persistence/Repositories/EntityRepository.cs index c0ee93dbb7..3502db182a 100644 --- a/src/Umbraco.Core/Persistence/Repositories/EntityRepository.cs +++ b/src/Umbraco.Core/Persistence/Repositories/EntityRepository.cs @@ -21,7 +21,7 @@ namespace Umbraco.Core.Persistence.Repositories /// internal class EntityRepository : DisposableObject, IEntityRepository { - public EntityRepository(IDatabaseUnitOfWork work) + public EntityRepository(IScopeUnitOfWork work) { UnitOfWork = work; } diff --git a/src/Umbraco.Core/Persistence/Repositories/NotificationsRepository.cs b/src/Umbraco.Core/Persistence/Repositories/NotificationsRepository.cs index 8d57d96438..e64187e36f 100644 --- a/src/Umbraco.Core/Persistence/Repositories/NotificationsRepository.cs +++ b/src/Umbraco.Core/Persistence/Repositories/NotificationsRepository.cs @@ -15,7 +15,7 @@ namespace Umbraco.Core.Persistence.Repositories { private readonly IDatabaseUnitOfWork _unitOfWork; - public NotificationsRepository(IDatabaseUnitOfWork unitOfWork) + public NotificationsRepository(IScopeUnitOfWork unitOfWork) { _unitOfWork = unitOfWork; } diff --git a/src/Umbraco.Core/Persistence/Repositories/VersionableRepositoryBase.cs b/src/Umbraco.Core/Persistence/Repositories/VersionableRepositoryBase.cs index d2275e918e..2fb0b6cd49 100644 --- a/src/Umbraco.Core/Persistence/Repositories/VersionableRepositoryBase.cs +++ b/src/Umbraco.Core/Persistence/Repositories/VersionableRepositoryBase.cs @@ -454,6 +454,7 @@ namespace Umbraco.Core.Persistence.Repositories var allPropertyDataDtos = Database.FetchByGroups(versions, 2000, batch => Sql() .Select() + .From() .WhereIn(x => x.VersionId, batch)) .ToList(); @@ -462,6 +463,7 @@ namespace Umbraco.Core.Persistence.Repositories var allPropertyTypeDtos = Database.FetchByGroups(allPropertyTypeIds, 2000, batch => Sql() .Select() + .From() .WhereIn(x => x.Id, batch)); // index the types for perfs, and assign to PropertyDataDto diff --git a/src/Umbraco.Core/Persistence/UmbracoDatabase.cs b/src/Umbraco.Core/Persistence/UmbracoDatabase.cs index b6f3d7d8a7..4e7aa45225 100644 --- a/src/Umbraco.Core/Persistence/UmbracoDatabase.cs +++ b/src/Umbraco.Core/Persistence/UmbracoDatabase.cs @@ -1,6 +1,7 @@ using System; using System.Data; using System.Data.Common; +using System.Data.SqlClient; using System.Text; using NPoco; using StackExchange.Profiling; @@ -24,7 +25,7 @@ namespace Umbraco.Core.Persistence // Umbraco's default isolation level is RepeatableRead private const IsolationLevel DefaultIsolationLevel = IsolationLevel.RepeatableRead; - private readonly ILogger _logger; + private readonly ILogger _logger; private readonly RetryPolicy _connectionRetryPolicy; private readonly RetryPolicy _commandRetryPolicy; private readonly Guid _instanceGuid = Guid.NewGuid(); @@ -70,7 +71,7 @@ namespace Umbraco.Core.Persistence /// public ISqlSyntaxProvider SqlSyntax => SqlContext.SqlSyntax; - + public Sql Sql() => new Sql(SqlContext); public Sql Sql(string sql, params object[] args) => Sql().Append(sql, args); @@ -203,9 +204,14 @@ namespace Umbraco.Core.Persistence protected override void OnException(Exception x) { _logger.Error("Exception (" + InstanceId + ").", x); + _logger.Debug("At:\r\n" + Environment.StackTrace); + if (EnableSqlTrace == false) + _logger.Debug("Sql:\r\n" + CommandToString(_cmd)); base.OnException(x); } + private DbCommand _cmd; + protected override void OnExecutingCommand(DbCommand cmd) { // if no timeout is specified, and the connection has a longer timeout, use it @@ -213,21 +219,7 @@ namespace Umbraco.Core.Persistence cmd.CommandTimeout = cmd.Connection.ConnectionTimeout; if (EnableSqlTrace) - { - var sb = new StringBuilder(); -#if DEBUG_DATABASES - sb.Append(InstanceId); - sb.Append(": "); -#endif - sb.Append(cmd.CommandText); - foreach (DbParameter p in cmd.Parameters) - { - sb.Append(" - "); - sb.Append(p.Value); - } - - _logger.Debug(sb.ToString().Replace("{", "{{").Replace("}", "}}")); - } + _logger.Debug(CommandToString(cmd).Replace("{", "{{").Replace("}", "}}")); // fixme these escapes should be builtin #if DEBUG_DATABASES // detects whether the command is already in use (eg still has an open reader...) @@ -236,9 +228,32 @@ namespace Umbraco.Core.Persistence if (refsobj != null) _logger.Debug("Oops!" + Environment.NewLine + refsobj); #endif + _cmd = cmd; base.OnExecutingCommand(cmd); } + private static string CommandToString(DbCommand cmd) + { + var sb = new StringBuilder(); +#if DEBUG_DATABASES + sb.Append(InstanceId); + sb.Append(": "); +#endif + sb.Append(cmd.CommandText); + if (cmd.Parameters.Count > 0) + sb.Append(" --"); + var i = 0; + foreach (DbParameter p in cmd.Parameters) + { + sb.Append(" @"); + sb.Append(i++); + sb.Append(":"); + sb.Append(p.Value); + } + + return sb.ToString(); + } + protected override void OnExecutedCommand(DbCommand cmd) { if (_enableCount) diff --git a/src/Umbraco.Core/Services/ContentService.cs b/src/Umbraco.Core/Services/ContentService.cs index 0240bad70a..b85f82ee24 100644 --- a/src/Umbraco.Core/Services/ContentService.cs +++ b/src/Umbraco.Core/Services/ContentService.cs @@ -1263,7 +1263,7 @@ namespace Umbraco.Core.Services // but... UnPublishing event makes no sense (not going to cancel?) and no need to save // just raise the event if (content.Trashed == false && content.HasPublishedVersion) - uow.Events.Dispatch(UnPublished, this, new PublishEventArgs(content, false, false)); + uow.Events.Dispatch(UnPublished, this, new PublishEventArgs(content, false, false), "UnPublished"); DeleteLocked(uow, repository, content); @@ -1841,7 +1841,7 @@ namespace Umbraco.Core.Services uow.Events.Dispatch(Saved, this, new SaveEventArgs(saved, false)); if (raiseEvents && published.Any()) - uow.Events.Dispatch(Published, this, new PublishEventArgs(published, false, false)); + uow.Events.Dispatch(Published, this, new PublishEventArgs(published, false, false), "Published"); uow.Events.Dispatch(TreeChanged, this, saved.Select(x => new TreeChange(x, TreeChangeTypes.RefreshNode)).ToEventArgs()); @@ -1952,7 +1952,7 @@ namespace Umbraco.Core.Services publishedItems.Add(publishedItem); } - uow.Events.Dispatch(Published, this, new PublishEventArgs(publishedItems, false, false)); + uow.Events.Dispatch(Published, this, new PublishEventArgs(publishedItems, false, false), "Published"); uow.Events.Dispatch(TreeChanged, this, new TreeChange(content, TreeChangeTypes.RefreshBranch).ToEventArgs()); Audit(uow, AuditType.Publish, "Publish with Children performed by user", userId, content.Id); @@ -1997,7 +1997,7 @@ namespace Umbraco.Core.Services content.WriterId = userId; repository.AddOrUpdate(content); - uow.Events.Dispatch(UnPublished, this, new PublishEventArgs(content, false, false)); + uow.Events.Dispatch(UnPublished, this, new PublishEventArgs(content, false, false), "UnPublished"); uow.Events.Dispatch(TreeChanged, this, new TreeChange(content, TreeChangeTypes.RefreshBranch).ToEventArgs()); Audit(uow, AuditType.UnPublish, "UnPublish performed by user", userId, content.Id); @@ -2058,7 +2058,7 @@ namespace Umbraco.Core.Services return status; } - uow.Events.Dispatch(Published, this, new PublishEventArgs(content, false, false)); + uow.Events.Dispatch(Published, this, new PublishEventArgs(content, false, false), "Published"); // if was not published and now is... descendants that were 'published' (but // had an unpublished ancestor) are 're-published' ie not explicitely published @@ -2068,7 +2068,7 @@ namespace Umbraco.Core.Services if (HasChildren(content.Id)) { var descendants = GetPublishedDescendants(content).ToArray(); - uow.Events.Dispatch(Published, this, new PublishEventArgs(descendants, false, false)); + uow.Events.Dispatch(Published, this, new PublishEventArgs(descendants, false, false), "Published"); } changeType = TreeChangeTypes.RefreshBranch; // whole branch } @@ -2511,7 +2511,7 @@ namespace Umbraco.Core.Services // but... UnPublishing event makes no sense (not going to cancel?) and no need to save // just raise the event if (content.Trashed == false && content.HasPublishedVersion) - uow.Events.Dispatch(UnPublished, this, new PublishEventArgs(content, false, false)); + uow.Events.Dispatch(UnPublished, this, new PublishEventArgs(content, false, false), "UnPublished"); // if current content has children, move them to trash var c = content; diff --git a/src/Umbraco.Core/Umbraco.Core.csproj b/src/Umbraco.Core/Umbraco.Core.csproj index 9f13a99e66..6c3e3e9fdb 100644 --- a/src/Umbraco.Core/Umbraco.Core.csproj +++ b/src/Umbraco.Core/Umbraco.Core.csproj @@ -6,6 +6,7 @@ {31785BC3-256C-4613-B2F5-A1B0BDDED8C1} Library Umbraco.Core + Umbraco.Core ..\ true @@ -53,18 +54,18 @@ - + - - + + - + - - + + diff --git a/src/Umbraco.Tests.Benchmarks/App.config b/src/Umbraco.Tests.Benchmarks/App.config index bbeb8471e4..8f12d20605 100644 --- a/src/Umbraco.Tests.Benchmarks/App.config +++ b/src/Umbraco.Tests.Benchmarks/App.config @@ -53,7 +53,7 @@ - + @@ -65,7 +65,7 @@ - + diff --git a/src/Umbraco.Tests.Benchmarks/Umbraco.Tests.Benchmarks.csproj b/src/Umbraco.Tests.Benchmarks/Umbraco.Tests.Benchmarks.csproj index aadd4b7f98..4866c7da05 100644 --- a/src/Umbraco.Tests.Benchmarks/Umbraco.Tests.Benchmarks.csproj +++ b/src/Umbraco.Tests.Benchmarks/Umbraco.Tests.Benchmarks.csproj @@ -40,66 +40,93 @@ ..\packages\BenchmarkDotNet.0.9.9\lib\net45\BenchmarkDotNet.dll - True ..\packages\BenchmarkDotNet.Core.0.9.9\lib\net45\BenchmarkDotNet.Core.dll - True ..\packages\BenchmarkDotNet.Diagnostics.Windows.0.9.9\lib\net45\BenchmarkDotNet.Diagnostics.Windows.dll - True ..\packages\BenchmarkDotNet.Toolchains.Roslyn.0.9.9\lib\net45\BenchmarkDotNet.Toolchains.Roslyn.dll - True ..\packages\Castle.Core.4.0.0\lib\net45\Castle.Core.dll ..\packages\Microsoft.CodeAnalysis.Common.1.3.2\lib\net45\Microsoft.CodeAnalysis.dll - True ..\packages\Microsoft.CodeAnalysis.CSharp.1.3.2\lib\net45\Microsoft.CodeAnalysis.CSharp.dll - True ..\packages\Microsoft.Diagnostics.Tracing.TraceEvent.1.0.41\lib\net40\Microsoft.Diagnostics.Tracing.TraceEvent.dll - True - - ..\packages\Moq.4.1.1309.0919\lib\net40\Moq.dll + + ..\packages\Moq.4.1.1309.1617\lib\net40\Moq.dll ..\packages\NPoco.3.5.1\lib\net45\NPoco.dll - - ..\packages\System.Collections.Immutable.1.2.0\lib\portable-net45+win8+wp8+wpa81\System.Collections.Immutable.dll + + ..\packages\System.AppContext.4.1.0\lib\net46\System.AppContext.dll + + + ..\packages\System.Collections.Immutable.1.3.1\lib\portable-net45+win8+wp8+wpa81\System.Collections.Immutable.dll + True + + ..\packages\System.Console.4.0.0\lib\net46\System.Console.dll + ..\packages\SqlServerCE.4.0.0.1\lib\System.Data.SqlServerCe.dll - True ..\packages\SqlServerCE.4.0.0.1\lib\System.Data.SqlServerCe.Entity.dll - True + + + ..\packages\System.Diagnostics.FileVersionInfo.4.0.0\lib\net46\System.Diagnostics.FileVersionInfo.dll + + + ..\packages\System.Diagnostics.StackTrace.4.0.1\lib\net46\System.Diagnostics.StackTrace.dll + + + ..\packages\System.IO.FileSystem.4.0.1\lib\net46\System.IO.FileSystem.dll + + + ..\packages\System.IO.FileSystem.Primitives.4.0.1\lib\net46\System.IO.FileSystem.Primitives.dll - - ..\packages\System.Reflection.Metadata.1.3.0\lib\portable-net45+win8\System.Reflection.Metadata.dll + + ..\packages\System.Reflection.Metadata.1.4.1\lib\portable-net45+win8\System.Reflection.Metadata.dll + + ..\packages\System.Security.Cryptography.Algorithms.4.2.0\lib\net461\System.Security.Cryptography.Algorithms.dll + + + ..\packages\System.Security.Cryptography.Encoding.4.0.0\lib\net46\System.Security.Cryptography.Encoding.dll + + + ..\packages\System.Security.Cryptography.Primitives.4.0.0\lib\net46\System.Security.Cryptography.Primitives.dll + + + ..\packages\System.Security.Cryptography.X509Certificates.4.1.0\lib\net461\System.Security.Cryptography.X509Certificates.dll + + + ..\packages\System.Text.Encoding.CodePages.4.0.1\lib\net46\System.Text.Encoding.CodePages.dll + ..\packages\System.Threading.Tasks.Extensions.4.0.0\lib\portable-net45+win8+wp8+wpa81\System.Threading.Tasks.Extensions.dll - True + + + ..\packages\System.Threading.Thread.4.0.0\lib\net46\System.Threading.Thread.dll @@ -107,6 +134,15 @@ + + ..\packages\System.Xml.XmlDocument.4.0.1\lib\net46\System.Xml.XmlDocument.dll + + + ..\packages\System.Xml.XPath.4.0.1\lib\net46\System.Xml.XPath.dll + + + ..\packages\System.Xml.XPath.XDocument.4.0.1\lib\net46\System.Xml.XPath.XDocument.dll + @@ -148,9 +184,9 @@ if not exist "$(TargetDir)x86" md "$(TargetDir)x86" - xcopy /s /y "$(SolutionDir)packages\Microsoft.SqlServer.Compact.4.0.8854.1\NativeBinaries\x86\*.*" "$(TargetDir)x86" + xcopy /s /y "$(SolutionDir)packages\Microsoft.SqlServer.Compact.4.0.8854.2\NativeBinaries\x86\*.*" "$(TargetDir)x86" if not exist "$(TargetDir)amd64" md "$(TargetDir)amd64" - xcopy /s /y "$(SolutionDir)packages\Microsoft.SqlServer.Compact.4.0.8854.1\NativeBinaries\amd64\*.*" "$(TargetDir)amd64" + xcopy /s /y "$(SolutionDir)packages\Microsoft.SqlServer.Compact.4.0.8854.2\NativeBinaries\amd64\*.*" "$(TargetDir)amd64" xcopy "$(ProjectDir)"..\packages\SqlServerCE.4.0.0.1\amd64\*.* "$(TargetDir)amd64\" /Y /F /E /I /C /D diff --git a/src/Umbraco.Tests.Benchmarks/packages.config b/src/Umbraco.Tests.Benchmarks/packages.config index dcd982a3e9..e5bf0f6b94 100644 --- a/src/Umbraco.Tests.Benchmarks/packages.config +++ b/src/Umbraco.Tests.Benchmarks/packages.config @@ -1,40 +1,57 @@  - - - - - - - - - - + + + + + + + + + + + - + + - + + + + + + - + + + + + + + - + + + + + \ No newline at end of file diff --git a/src/Umbraco.Tests/Cache/PublishedCache/PublishedMediaCacheTests.cs b/src/Umbraco.Tests/Cache/PublishedCache/PublishedMediaCacheTests.cs index 7151f9d0bd..5fce4c3078 100644 --- a/src/Umbraco.Tests/Cache/PublishedCache/PublishedMediaCacheTests.cs +++ b/src/Umbraco.Tests/Cache/PublishedCache/PublishedMediaCacheTests.cs @@ -12,6 +12,7 @@ using Umbraco.Tests.TestHelpers; using Umbraco.Web.PublishedCache.XmlPublishedCache; using Umbraco.Tests.Testing; using Current = Umbraco.Web.Current; +using LightInject; namespace Umbraco.Tests.Cache.PublishedCache { diff --git a/src/Umbraco.Tests/DependencyInjection/CollectionBuildersTests.cs b/src/Umbraco.Tests/DependencyInjection/CollectionBuildersTests.cs index a5b259bfa3..f6aa5f7c4d 100644 --- a/src/Umbraco.Tests/DependencyInjection/CollectionBuildersTests.cs +++ b/src/Umbraco.Tests/DependencyInjection/CollectionBuildersTests.cs @@ -418,7 +418,7 @@ namespace Umbraco.Tests.DI AssertSameCollection(col1A, col1B); - _container.EndCurrentScope(); + _container.ScopeManagerProvider.GetScopeManager(_container).CurrentScope.Dispose(); var scope2 = _container.BeginScope(); var col2 = _container.GetInstance(); @@ -426,7 +426,7 @@ namespace Umbraco.Tests.DI AssertNotSameCollection(col1A, col2); - _container.EndCurrentScope(); + _container.ScopeManagerProvider.GetScopeManager(_container).CurrentScope.Dispose(); } [Test] diff --git a/src/Umbraco.Tests/Issues/U9560.cs b/src/Umbraco.Tests/Issues/U9560.cs index 14359e9944..751aeed576 100644 --- a/src/Umbraco.Tests/Issues/U9560.cs +++ b/src/Umbraco.Tests/Issues/U9560.cs @@ -3,6 +3,7 @@ using NUnit.Framework; using Umbraco.Core.Models; using Umbraco.Core.Persistence; using Umbraco.Tests.Testing; +using LightInject; namespace Umbraco.Tests.Issues { diff --git a/src/Umbraco.Tests/Models/Mapping/AutoMapperTests.cs b/src/Umbraco.Tests/Models/Mapping/AutoMapperTests.cs index 396bbff8eb..6c78cff778 100644 --- a/src/Umbraco.Tests/Models/Mapping/AutoMapperTests.cs +++ b/src/Umbraco.Tests/Models/Mapping/AutoMapperTests.cs @@ -9,6 +9,7 @@ using Umbraco.Core.Manifest; using Umbraco.Core.PropertyEditors; using Umbraco.Tests.TestHelpers; using Umbraco.Tests.Testing; +using LightInject; namespace Umbraco.Tests.Models.Mapping { diff --git a/src/Umbraco.Tests/Persistence/Repositories/DataTypeDefinitionRepositoryTest.cs b/src/Umbraco.Tests/Persistence/Repositories/DataTypeDefinitionRepositoryTest.cs index 3dce887545..a65c4b197d 100644 --- a/src/Umbraco.Tests/Persistence/Repositories/DataTypeDefinitionRepositoryTest.cs +++ b/src/Umbraco.Tests/Persistence/Repositories/DataTypeDefinitionRepositoryTest.cs @@ -1,17 +1,16 @@ using System; using System.Linq; -using System.Text.RegularExpressions; using NUnit.Framework; using Umbraco.Core; using Umbraco.Core.Cache; using Umbraco.Core.Models; using Umbraco.Core.Models.Rdbms; -using Umbraco.Core.Persistence.Querying; using Umbraco.Core.Persistence.Repositories; using Umbraco.Core.Persistence.UnitOfWork; using Umbraco.Tests.TestHelpers; using Umbraco.Core.DI; using Umbraco.Tests.Testing; +using LightInject; namespace Umbraco.Tests.Persistence.Repositories { diff --git a/src/Umbraco.Tests/Persistence/Repositories/DictionaryRepositoryTest.cs b/src/Umbraco.Tests/Persistence/Repositories/DictionaryRepositoryTest.cs index 723990d031..2f5bd06a0f 100644 --- a/src/Umbraco.Tests/Persistence/Repositories/DictionaryRepositoryTest.cs +++ b/src/Umbraco.Tests/Persistence/Repositories/DictionaryRepositoryTest.cs @@ -6,6 +6,7 @@ using Umbraco.Core.Persistence.Repositories; using Umbraco.Core.Persistence.UnitOfWork; using Umbraco.Tests.TestHelpers; using Umbraco.Tests.Testing; +using LightInject; namespace Umbraco.Tests.Persistence.Repositories { diff --git a/src/Umbraco.Tests/PublishedContent/PublishedContentMoreTests.cs b/src/Umbraco.Tests/PublishedContent/PublishedContentMoreTests.cs index d7fa85014f..bf4699a099 100644 --- a/src/Umbraco.Tests/PublishedContent/PublishedContentMoreTests.cs +++ b/src/Umbraco.Tests/PublishedContent/PublishedContentMoreTests.cs @@ -3,19 +3,16 @@ using System.Collections.ObjectModel; using System.Web.Routing; using Moq; using NUnit.Framework; -using Umbraco.Core; using Umbraco.Core.Cache; using Umbraco.Core.Models.PublishedContent; -using Umbraco.Core.PropertyEditors; using Umbraco.Web; -using Umbraco.Core.Configuration.UmbracoSettings; using Umbraco.Core.Plugins; using Umbraco.Web.PublishedCache; using Umbraco.Web.Routing; using Umbraco.Web.Security; using Umbraco.Core.DI; -using Umbraco.Tests.TestHelpers; using Current = Umbraco.Core.DI.Current; +using LightInject; namespace Umbraco.Tests.PublishedContent { diff --git a/src/Umbraco.Tests/PublishedContent/PublishedContentTests.cs b/src/Umbraco.Tests/PublishedContent/PublishedContentTests.cs index 32557fd6f8..53ce8ffdf9 100644 --- a/src/Umbraco.Tests/PublishedContent/PublishedContentTests.cs +++ b/src/Umbraco.Tests/PublishedContent/PublishedContentTests.cs @@ -11,6 +11,7 @@ using Umbraco.Web; using Umbraco.Web.PublishedCache; using Umbraco.Core.DI; using Current = Umbraco.Core.DI.Current; +using LightInject; namespace Umbraco.Tests.PublishedContent { diff --git a/src/Umbraco.Tests/PublishedContent/PublishedMediaTests.cs b/src/Umbraco.Tests/PublishedContent/PublishedMediaTests.cs index aa3a554b1a..be10a97681 100644 --- a/src/Umbraco.Tests/PublishedContent/PublishedMediaTests.cs +++ b/src/Umbraco.Tests/PublishedContent/PublishedMediaTests.cs @@ -18,8 +18,8 @@ using Umbraco.Core.Models.PublishedContent; using Umbraco.Core.Strings; using UmbracoExamine; using Current = Umbraco.Web.Current; -using Umbraco.Core.DI; using Umbraco.Tests.Testing; +using LightInject; namespace Umbraco.Tests.PublishedContent { diff --git a/src/Umbraco.Tests/Services/ContentServiceTests.cs b/src/Umbraco.Tests/Services/ContentServiceTests.cs index 6645a0cdf2..f0bcecb4a0 100644 --- a/src/Umbraco.Tests/Services/ContentServiceTests.cs +++ b/src/Umbraco.Tests/Services/ContentServiceTests.cs @@ -11,7 +11,7 @@ using Umbraco.Core.IO; using Umbraco.Core.Models; using Umbraco.Core.Models.Membership; using Umbraco.Core.Models.Rdbms; -using Umbraco.Core.Persistence; +using LightInject; using Umbraco.Core.Persistence.Repositories; using Umbraco.Core.Persistence.UnitOfWork; using Umbraco.Core.Services; diff --git a/src/Umbraco.Tests/TestHelpers/TestWithDatabaseBase.cs b/src/Umbraco.Tests/TestHelpers/TestWithDatabaseBase.cs index 57d3fd22a0..bcae539a12 100644 --- a/src/Umbraco.Tests/TestHelpers/TestWithDatabaseBase.cs +++ b/src/Umbraco.Tests/TestHelpers/TestWithDatabaseBase.cs @@ -30,6 +30,7 @@ using Umbraco.Core.Persistence.Mappers; using Umbraco.Core.Scoping; using Umbraco.Tests.TestHelpers.Stubs; using Umbraco.Tests.Testing; +using LightInject; namespace Umbraco.Tests.TestHelpers { diff --git a/src/Umbraco.Tests/Umbraco.Tests.csproj b/src/Umbraco.Tests/Umbraco.Tests.csproj index 3f21aa49ab..aa034ca8ef 100644 --- a/src/Umbraco.Tests/Umbraco.Tests.csproj +++ b/src/Umbraco.Tests/Umbraco.Tests.csproj @@ -54,23 +54,21 @@ ..\packages\AutoMapper.4.2.1\lib\net45\AutoMapper.dll - True + + + ..\packages\Castle.Core.4.0.0\lib\net45\Castle.Core.dll - ..\packages\Examine.2.0.0-Beta2\lib\net45\Examine.dll - True + ..\packages\Examine.2.0.0-beta2\lib\net45\Examine.dll ..\packages\SharpZipLib.0.86.0\lib\20\ICSharpCode.SharpZipLib.dll - True - - ..\packages\LightInject.4.1.3\lib\net46\LightInject.dll - True + + ..\packages\LightInject.5.0.3\lib\net46\LightInject.dll ..\packages\LightInject.Annotation.1.1.0\lib\net46\LightInject.Annotation.dll - True ..\packages\log4net.2.0.8\lib\net45-full\log4net.dll @@ -80,62 +78,48 @@ ..\packages\Lucene.Net.3.0.3\lib\NET40\Lucene.Net.dll - True ..\packages\Lucene.Net.Contrib.3.0.3\lib\net40\Lucene.Net.Contrib.Analyzers.dll - True ..\packages\Lucene.Net.Contrib.3.0.3\lib\net40\Lucene.Net.Contrib.Core.dll - True ..\packages\Lucene.Net.Contrib.3.0.3\lib\net40\Lucene.Net.Contrib.FastVectorHighlighter.dll - True ..\packages\Lucene.Net.Contrib.3.0.3\lib\net40\Lucene.Net.Contrib.Highlighter.dll - True ..\packages\Lucene.Net.Contrib.3.0.3\lib\net40\Lucene.Net.Contrib.Memory.dll - True ..\packages\Lucene.Net.Contrib.3.0.3\lib\net40\Lucene.Net.Contrib.Queries.dll - True ..\packages\Lucene.Net.Contrib.3.0.3\lib\net40\Lucene.Net.Contrib.Regex.dll - True ..\packages\Lucene.Net.Contrib.3.0.3\lib\net40\Lucene.Net.Contrib.SimpleFacetedSearch.dll - True ..\packages\Lucene.Net.Contrib.3.0.3\lib\net40\Lucene.Net.Contrib.Snowball.dll - True ..\packages\Lucene.Net.Contrib.3.0.3\lib\net40\Lucene.Net.Contrib.SpellChecker.dll - True - - ..\packages\Microsoft.Owin.3.0.1\lib\net45\Microsoft.Owin.dll - True + + ..\packages\Microsoft.Owin.3.1.0\lib\net45\Microsoft.Owin.dll - True ..\packages\Microsoft.Web.Infrastructure.1.0.0.0\lib\net40\Microsoft.Web.Infrastructure.dll ..\packages\MiniProfiler.3.2.0.157\lib\net40\MiniProfiler.dll - True - - ..\packages\Moq.4.1.1309.0919\lib\net40\Moq.dll + + ..\packages\Moq.4.1.1309.1617\lib\net40\Moq.dll ..\packages\Newtonsoft.Json.10.0.2\lib\net45\Newtonsoft.Json.dll @@ -144,12 +128,10 @@ ..\packages\NPoco.3.5.1\lib\net45\NPoco.dll - False ..\packages\NUnit.2.6.2\lib\nunit.framework.dll ..\packages\Owin.1.0\lib\net40\Owin.dll - True ..\packages\Semver.2.0.4\lib\net452\Semver.dll @@ -160,18 +142,15 @@ - True ..\packages\SqlServerCE.4.0.0.1\lib\System.Data.SqlServerCe.dll - True ..\packages\SqlServerCE.4.0.0.1\lib\System.Data.SqlServerCe.Entity.dll - False ..\packages\Microsoft.AspNet.WebApi.Client.5.2.3\lib\net45\System.Net.Http.Formatting.dll @@ -182,46 +161,39 @@ ..\packages\Microsoft.AspNet.WebPages.3.2.3\lib\net45\System.Web.Helpers.dll - True - False ..\packages\Microsoft.AspNet.WebApi.Core.5.2.3\lib\net45\System.Web.Http.dll ..\packages\Microsoft.AspNet.WebApi.SelfHost.4.0.30506.0\lib\net40\System.Web.Http.SelfHost.dll + True - False ..\packages\Microsoft.AspNet.WebApi.WebHost.5.2.3\lib\net45\System.Web.Http.WebHost.dll ..\packages\Microsoft.AspNet.Mvc.5.2.3\lib\net45\System.Web.Mvc.dll - True ..\packages\Microsoft.AspNet.Razor.3.2.3\lib\net45\System.Web.Razor.dll - True ..\packages\Microsoft.AspNet.WebPages.3.2.3\lib\net45\System.Web.WebPages.dll - True ..\packages\Microsoft.AspNet.WebPages.3.2.3\lib\net45\System.Web.WebPages.Deployment.dll - True ..\packages\Microsoft.AspNet.WebPages.3.2.3\lib\net45\System.Web.WebPages.Razor.dll - True - + ..\packages\Selenium.WebDriver.2.32.0\lib\net40\WebDriver.dll @@ -615,9 +587,9 @@ Designer Always - + Designer diff --git a/src/Umbraco.Tests/packages.config b/src/Umbraco.Tests/packages.config index 08a4d84e38..b322e78085 100644 --- a/src/Umbraco.Tests/packages.config +++ b/src/Umbraco.Tests/packages.config @@ -4,7 +4,7 @@ - + @@ -18,10 +18,10 @@ - + - + diff --git a/src/Umbraco.Web.UI/Umbraco.Web.UI.csproj b/src/Umbraco.Web.UI/Umbraco.Web.UI.csproj index eadf720d5e..c69a3e638e 100644 --- a/src/Umbraco.Web.UI/Umbraco.Web.UI.csproj +++ b/src/Umbraco.Web.UI/Umbraco.Web.UI.csproj @@ -1,9 +1,8 @@  - - + + - v4.6.1 false @@ -13,16 +12,15 @@ Umbraco.Web.UI ..\ true - {349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc} OnBuildSuccess - true 44319 enabled disabled false - + + true full @@ -32,7 +30,6 @@ prompt 4 false - ..\bin\Debug\ true ..\Package\Umbraco.Web.UI.zip @@ -47,7 +44,6 @@ 4 bin\Umbraco.Web.UI.xml false - ..\bin\Release\ @@ -59,6 +55,10 @@ + + ..\packages\System.Reflection.Metadata.1.4.1\lib\portable-net45+win8\System.Reflection.Metadata.dll + True + @@ -79,6 +79,13 @@ + + All + --> + + + + + + + ..\packages\System.Security.Cryptography.Algorithms.4.2.0\lib\net461\System.Security.Cryptography.Algorithms.dll + True + + + ..\packages\System.Security.Cryptography.Encoding.4.0.0\lib\net46\System.Security.Cryptography.Encoding.dll + True + + + ..\packages\System.Security.Cryptography.Primitives.4.0.0\lib\net46\System.Security.Cryptography.Primitives.dll + True + + + ..\packages\System.Security.Cryptography.X509Certificates.4.1.0\lib\net461\System.Security.Cryptography.X509Certificates.dll + True + + + ..\packages\System.Text.Encoding.CodePages.4.0.1\lib\net46\System.Text.Encoding.CodePages.dll + True + + + ..\packages\System.Threading.Thread.4.0.0\lib\net46\System.Threading.Thread.dll + True + + + ..\packages\System.Xml.XmlDocument.4.0.1\lib\net46\System.Xml.XmlDocument.dll + True + + + ..\packages\System.Xml.XPath.4.0.1\lib\net46\System.Xml.XPath.dll + True + + + ..\packages\System.Xml.XPath.XDocument.4.0.1\lib\net46\System.Xml.XPath.XDocument.dll + True + + + ..\packages\Umbraco.ModelsBuilder.8.0.0-alpha0005\lib\Umbraco.ModelsBuilder.dll + True + + + ..\packages\ClientDependency.1.9.2\lib\net45\ClientDependency.Core.dll + True + + + ../packages/log4net.2.0.8/lib/net45-full/log4net.dll + True + + + ../packages/Microsoft.AspNet.Mvc.5.2.3/lib/net45/System.Web.Mvc.dll + True + + + ../packages/Microsoft.AspNet.WebApi.Core.5.2.3/lib/net45/System.Web.Http.dll + True + + + ../packages/AutoMapper.4.2.1/lib/net45/AutoMapper.dll + True + + + ../packages/ClientDependency-Mvc5.1.8.0.0/lib/net45/ClientDependency.Core.Mvc.dll + True + + + ../packages/Examine.2.0.0-beta2/lib/net45/Examine.dll + True + + + ../packages/SharpZipLib.0.86.0/lib/20/ICSharpCode.SharpZipLib.dll + True + + + ../packages/ImageProcessor.2.5.4/lib/net45/ImageProcessor.dll + True + + + ../packages/ImageProcessor.Web.4.8.3/lib/net45/ImageProcessor.Web.dll + True + + + ..\packages\Lucene.Net.3.0.3\lib\NET40\Lucene.Net.dll + True + + + ..\packages\Lucene.Net.Contrib.3.0.3\lib\net40\Lucene.Net.Contrib.Analyzers.dll + True + + + ..\packages\Lucene.Net.Contrib.3.0.3\lib\net40\Lucene.Net.Contrib.Core.dll + True + + + ..\packages\Lucene.Net.Contrib.3.0.3\lib\net40\Lucene.Net.Contrib.FastVectorHighlighter.dll + True + + + ..\packages\Lucene.Net.Contrib.3.0.3\lib\net40\Lucene.Net.Contrib.Highlighter.dll + True + + + ..\packages\Lucene.Net.Contrib.3.0.3\lib\net40\Lucene.Net.Contrib.Memory.dll + True + + + ..\packages\Lucene.Net.Contrib.3.0.3\lib\net40\Lucene.Net.Contrib.Queries.dll + True + + + ..\packages\Lucene.Net.Contrib.3.0.3\lib\net40\Lucene.Net.Contrib.Regex.dll + True + + + ..\packages\Lucene.Net.Contrib.3.0.3\lib\net40\Lucene.Net.Contrib.SimpleFacetedSearch.dll + True + + + ..\packages\Lucene.Net.Contrib.3.0.3\lib\net40\Lucene.Net.Contrib.Snowball.dll + True + + + ..\packages\Lucene.Net.Contrib.3.0.3\lib\net40\Lucene.Net.Contrib.SpellChecker.dll + True + + + ../packages/Microsoft.AspNet.Identity.Core.2.2.1/lib/net45/Microsoft.AspNet.Identity.Core.dll + True + + + ../packages/Microsoft.AspNet.Identity.Owin.2.2.1/lib/net45/Microsoft.AspNet.Identity.Owin.dll + True + + + ../packages/Microsoft.CodeAnalysis.Common.1.3.2/lib/net45/Microsoft.CodeAnalysis.dll + True + + + ../packages/Microsoft.CodeAnalysis.CSharp.1.3.2/lib/net45/Microsoft.CodeAnalysis.CSharp.dll + True + + + ../packages/Microsoft.CodeDom.Providers.DotNetCompilerPlatform.1.0.4/lib/net45/Microsoft.CodeDom.Providers.DotNetCompilerPlatform.dll + True + + + ../packages/Microsoft.Owin.3.1.0/lib/net45/Microsoft.Owin.dll + True + + + ../packages/Microsoft.Owin.Host.SystemWeb.3.1.0/lib/net45/Microsoft.Owin.Host.SystemWeb.dll + True + + + ../packages/Microsoft.Owin.Security.3.1.0/lib/net45/Microsoft.Owin.Security.dll + True + + + ../packages/Microsoft.Owin.Security.Cookies.3.1.0/lib/net45/Microsoft.Owin.Security.Cookies.dll + True + + + ../packages/Microsoft.Owin.Security.OAuth.3.1.0/lib/net45/Microsoft.Owin.Security.OAuth.dll + True + + + ../packages/Microsoft.Web.Infrastructure.1.0.0.0/lib/net40/Microsoft.Web.Infrastructure.dll + True + + + ../packages/MiniProfiler.3.2.0.157/lib/net40/MiniProfiler.dll + True + + + ../packages/MySql.Data.6.9.9/lib/net45/MySql.Data.dll + True + + + ../packages/Newtonsoft.Json.10.0.2/lib/net45/Newtonsoft.Json.dll + True + + + ../packages/Owin.1.0/lib/net40/Owin.dll + True + + + ../packages/System.AppContext.4.1.0/lib/net46/System.AppContext.dll + True + + + ../packages/System.Collections.Immutable.1.3.1/lib/netstandard1.0/System.Collections.Immutable.dll + True + + + ../packages/System.Console.4.0.0/lib/net46/System.Console.dll + True + + + ../packages/SqlServerCE.4.0.0.1/lib/System.Data.SqlServerCe.dll + True + + + ../packages/SqlServerCE.4.0.0.1/lib/System.Data.SqlServerCe.Entity.dll + True + + + ../packages/System.Diagnostics.FileVersionInfo.4.0.0/lib/net46/System.Diagnostics.FileVersionInfo.dll + True + + + ../packages/System.Diagnostics.StackTrace.4.0.1/lib/net46/System.Diagnostics.StackTrace.dll + True + + + ../packages/System.IO.FileSystem.4.0.1/lib/net46/System.IO.FileSystem.dll + True + + + ../packages/ystem.IO.FileSystem.Primitives.4.0.1/lib/net46/System.IO.FileSystem.Primitives.dll + True + + + ../packages/Microsoft.AspNet.WebApi.Client.5.2.3/lib/net45/System.Net.Http.Formatting.dll + True + + + ../packages/System.Reflection.Metadata.1.4.1/lib/portable-net45+win8/System.Reflection.Metadata.dll + True + + + ../packages/Microsoft.AspNet.WebPages.3.2.3/lib/net45/System.Web.Helpers.dll + True + + + ../packages/Microsoft.AspNet.WebApi.WebHost.5.2.3/lib/net45/System.Web.Http.WebHost.dll + True + + + ../packages/Microsoft.AspNet.Razor.3.2.3/lib/net45/System.Web.Razor.dll + True + + + ../packages/Microsoft.AspNet.WebPages.3.2.3/lib/net45/System.Web.WebPages.dll + True + + + ../packages/Microsoft.Web.Infrastructure.1.0.0.0/lib/net40/Microsoft.Web.Infrastructure.dll + True + + + ../packages/Microsoft.AspNet.WebPages.3.2.3/lib/net45/System.Web.WebPages.Deployment.dll + True + + + ../packages/Microsoft.AspNet.WebPages.3.2.3/lib/net45/System.Web.WebPages.Razor.dll + True + + + ../packages/System.Xml.XmlDocument.4.0.1/lib/net46/System.Xml.XmlDocument.dll + True + + + ../packages/System.Xml.XPath.4.0.1/lib/net46/System.Xml.XPath.dll + True + + + ../packages/System.Xml.XPath.XDocument.4.0.1/lib/net46/System.Xml.XPath.XDocument.dll + True + + + ../packages/Microsoft.IO.RecyclableMemoryStream.1.2.1/lib/net45/Microsoft.IO.RecyclableMemoryStream.dll + True + @@ -185,6 +474,10 @@ Umbraco.Web + + + + Properties\SolutionInfo.cs @@ -458,13 +751,11 @@ - - Designer - SettingsSingleFileGenerator Settings.Designer.cs + UI.xml @@ -799,15 +1090,11 @@ - - - - + - 11.0 $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v11.0 @@ -815,7 +1102,6 @@ $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v14.0 $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v15.0 - xcopy "$(ProjectDir)"..\packages\SqlServerCE.4.0.0.1\amd64\*.* "$(TargetDir)amd64\" /Y /F /E /I /C /D @@ -823,10 +1109,8 @@ xcopy "$(ProjectDir)"..\packages\SqlServerCE.4.0.0.1\x86\*.* "$(TargetDir)x86\" - - @@ -845,10 +1129,8 @@ xcopy "$(ProjectDir)"..\packages\SqlServerCE.4.0.0.1\x86\*.* "$(TargetDir)x86\" - - @@ -875,7 +1157,7 @@ xcopy "$(ProjectDir)"..\packages\SqlServerCE.4.0.0.1\x86\*.* "$(TargetDir)x86\" This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - + + \ No newline at end of file diff --git a/src/Umbraco.Web.UI/config/imageprocessor/cache.config b/src/Umbraco.Web.UI/config/imageprocessor/cache.config index 4bdfd99ffc..6298c2da61 100644 --- a/src/Umbraco.Web.UI/config/imageprocessor/cache.config +++ b/src/Umbraco.Web.UI/config/imageprocessor/cache.config @@ -1,10 +1,10 @@  - - + + + - - + \ No newline at end of file diff --git a/src/Umbraco.Web.UI/config/imageprocessor/processing.config b/src/Umbraco.Web.UI/config/imageprocessor/processing.config index 2ce29a542a..b6813cff77 100644 --- a/src/Umbraco.Web.UI/config/imageprocessor/processing.config +++ b/src/Umbraco.Web.UI/config/imageprocessor/processing.config @@ -1,8 +1,9 @@  - - - + + + + @@ -57,5 +58,4 @@ - - \ No newline at end of file + \ No newline at end of file diff --git a/src/Umbraco.Web.UI/config/imageprocessor/security.config b/src/Umbraco.Web.UI/config/imageprocessor/security.config index 7bce8ee7b5..3168b751c8 100644 --- a/src/Umbraco.Web.UI/config/imageprocessor/security.config +++ b/src/Umbraco.Web.UI/config/imageprocessor/security.config @@ -1,6 +1,7 @@  - + + +
- +
+ +
-
- - -
- + - + + + + + @@ -45,6 +45,7 @@ + @@ -64,12 +65,14 @@ + + - + + - - - - - + - + - + - + - + + + - - + - + - + - + - + - + - - + - + - + - + - - + - + - - + - + - - + - + - - + + + - + - + - + - + - + - + + - - - - - + - - \ No newline at end of file diff --git a/src/Umbraco.Web.UI/web.Template.Release.config b/src/Umbraco.Web.UI/web.Template.Release.config index c483af69c4..c1cb26e747 100644 --- a/src/Umbraco.Web.UI/web.Template.Release.config +++ b/src/Umbraco.Web.UI/web.Template.Release.config @@ -1,12 +1,10 @@ - - @@ -15,5 +13,4 @@ - \ No newline at end of file diff --git a/src/Umbraco.Web.UI/web.Template.config b/src/Umbraco.Web.UI/web.Template.config index b1ba278232..47e6354b1c 100644 --- a/src/Umbraco.Web.UI/web.Template.config +++ b/src/Umbraco.Web.UI/web.Template.config @@ -1,5 +1,13 @@ + + +
@@ -59,7 +67,8 @@ - + + @@ -337,9 +346,9 @@ - + - + - - @@ -362,8 +369,6 @@ - - @@ -376,24 +381,18 @@ - - - - - - @@ -449,5 +448,5 @@ - + diff --git a/src/Umbraco.Web/DI/WebModelMappersCompositionRoot.cs b/src/Umbraco.Web/DI/WebModelMappersCompositionRoot.cs index 1f3a8be944..c5031fdd7d 100644 --- a/src/Umbraco.Web/DI/WebModelMappersCompositionRoot.cs +++ b/src/Umbraco.Web/DI/WebModelMappersCompositionRoot.cs @@ -20,6 +20,7 @@ namespace Umbraco.Web.DI container.Register(); container.Register(); container.Register(); + container.Register(); } } } \ No newline at end of file diff --git a/src/Umbraco.Web/Mvc/EnsurePublishedContentRequestAttribute.cs b/src/Umbraco.Web/Mvc/EnsurePublishedContentRequestAttribute.cs index ce7778d33b..987637976b 100644 --- a/src/Umbraco.Web/Mvc/EnsurePublishedContentRequestAttribute.cs +++ b/src/Umbraco.Web/Mvc/EnsurePublishedContentRequestAttribute.cs @@ -3,6 +3,7 @@ using System.Web.Mvc; using Umbraco.Web.Routing; using Umbraco.Core; using Umbraco.Core.Models.PublishedContent; +using LightInject; namespace Umbraco.Web.Mvc { diff --git a/src/Umbraco.Web/Mvc/RenderRouteHandler.cs b/src/Umbraco.Web/Mvc/RenderRouteHandler.cs index c98f4a554e..3095e406f0 100644 --- a/src/Umbraco.Web/Mvc/RenderRouteHandler.cs +++ b/src/Umbraco.Web/Mvc/RenderRouteHandler.cs @@ -11,6 +11,7 @@ using Umbraco.Web.Models; using Umbraco.Web.Routing; using System.Collections.Generic; using Umbraco.Core.Plugins; +using LightInject; namespace Umbraco.Web.Mvc { diff --git a/src/Umbraco.Web/Mvc/UmbracoVirtualNodeRouteHandler.cs b/src/Umbraco.Web/Mvc/UmbracoVirtualNodeRouteHandler.cs index 9cf56ff298..c6974a02f5 100644 --- a/src/Umbraco.Web/Mvc/UmbracoVirtualNodeRouteHandler.cs +++ b/src/Umbraco.Web/Mvc/UmbracoVirtualNodeRouteHandler.cs @@ -4,6 +4,7 @@ using System.Web.Routing; using Umbraco.Core.Models.PublishedContent; using Umbraco.Web.Models; using Umbraco.Web.Routing; +using LightInject; namespace Umbraco.Web.Mvc { diff --git a/src/Umbraco.Web/PropertyEditors/ValueConverters/MarkdownEditorValueConverter.cs b/src/Umbraco.Web/PropertyEditors/ValueConverters/MarkdownEditorValueConverter.cs index df43eff153..e27807595a 100644 --- a/src/Umbraco.Web/PropertyEditors/ValueConverters/MarkdownEditorValueConverter.cs +++ b/src/Umbraco.Web/PropertyEditors/ValueConverters/MarkdownEditorValueConverter.cs @@ -1,6 +1,6 @@ -using MarkdownSharp; -using System; +using System; using System.Web; +using HeyRed.MarkdownSharp; using Umbraco.Core; using Umbraco.Core.Models.PublishedContent; using Umbraco.Core.PropertyEditors; diff --git a/src/Umbraco.Web/PropertyEditors/ValueConverters/RelatedLinksValueConverter.cs b/src/Umbraco.Web/PropertyEditors/ValueConverters/RelatedLinksValueConverter.cs index cf57b66aa5..dc428236e1 100644 --- a/src/Umbraco.Web/PropertyEditors/ValueConverters/RelatedLinksValueConverter.cs +++ b/src/Umbraco.Web/PropertyEditors/ValueConverters/RelatedLinksValueConverter.cs @@ -21,16 +21,14 @@ namespace Umbraco.Web.PropertyEditors.ValueConverters [DefaultPropertyValueConverter(typeof(RelatedLinksLegacyValueConverter), typeof(JsonValueConverter))] public class RelatedLinksValueConverter : PropertyValueConverterBase { - private readonly UrlProvider _urlProvider; private readonly IUmbracoContextAccessor _umbracoContextAccessor; private readonly ServiceContext _services; private readonly CacheHelper _appCache; private readonly ILogger _logger; - public RelatedLinksValueConverter(IUmbracoContextAccessor umbracoContextAccessor, UrlProvider urlProvider, ServiceContext services, CacheHelper appCache, ILogger logger) + public RelatedLinksValueConverter(IUmbracoContextAccessor umbracoContextAccessor, ServiceContext services, CacheHelper appCache, ILogger logger) { _umbracoContextAccessor = umbracoContextAccessor; - _urlProvider = urlProvider; _logger = logger; _services = services; _appCache = appCache; @@ -122,10 +120,10 @@ namespace Umbraco.Web.PropertyEditors.ValueConverters if (link.IsInternal && link.Id != null) { - if (_urlProvider == null && umbracoContext == null) + if (umbracoContext == null) return null; - var urlProvider = _urlProvider ?? umbracoContext.UrlProvider; + var urlProvider = umbracoContext.UrlProvider; link.Link = urlProvider.GetUrl((int)link.Id); if (link.Link.Equals("#")) diff --git a/src/Umbraco.Web/PublishedCache/NuCache/NuCacheComponent.cs b/src/Umbraco.Web/PublishedCache/NuCache/NuCacheComponent.cs index 401fb76965..52ab717d7f 100644 --- a/src/Umbraco.Web/PublishedCache/NuCache/NuCacheComponent.cs +++ b/src/Umbraco.Web/PublishedCache/NuCache/NuCacheComponent.cs @@ -4,6 +4,7 @@ using Umbraco.Core.Logging; using Umbraco.Core.Persistence.UnitOfWork; using Umbraco.Core.Scoping; using Umbraco.Core.Services; +using LightInject; namespace Umbraco.Web.PublishedCache.NuCache { diff --git a/src/Umbraco.Web/PublishedCache/XmlPublishedCache/XmlCacheComponent.cs b/src/Umbraco.Web/PublishedCache/XmlPublishedCache/XmlCacheComponent.cs index 39777f6656..6986a7a945 100644 --- a/src/Umbraco.Web/PublishedCache/XmlPublishedCache/XmlCacheComponent.cs +++ b/src/Umbraco.Web/PublishedCache/XmlPublishedCache/XmlCacheComponent.cs @@ -7,6 +7,7 @@ using Umbraco.Core.Strings; using Umbraco.Core.Logging; using Umbraco.Core.Scoping; using Umbraco.Web.HealthCheck.Checks.DataIntegrity; +using LightInject; namespace Umbraco.Web.PublishedCache.XmlPublishedCache { diff --git a/src/Umbraco.Web/Routing/UrlProviderExtensions.cs b/src/Umbraco.Web/Routing/UrlProviderExtensions.cs index c99da888aa..51ef20624d 100644 --- a/src/Umbraco.Web/Routing/UrlProviderExtensions.cs +++ b/src/Umbraco.Web/Routing/UrlProviderExtensions.cs @@ -1,11 +1,10 @@ using System; using System.Collections.Generic; -using System.Web.Security; using Umbraco.Core.Models; using Umbraco.Core.Services; using Umbraco.Core; -using Umbraco.Core.Configuration; using Umbraco.Core.Logging; +using LightInject; namespace Umbraco.Web.Routing { diff --git a/src/Umbraco.Web/Scheduling/BackgroundTaskRunner.cs b/src/Umbraco.Web/Scheduling/BackgroundTaskRunner.cs index f47d27789e..16e84d2c51 100644 --- a/src/Umbraco.Web/Scheduling/BackgroundTaskRunner.cs +++ b/src/Umbraco.Web/Scheduling/BackgroundTaskRunner.cs @@ -6,6 +6,7 @@ using System.Web.Hosting; using Umbraco.Core; using Umbraco.Core.Events; using Umbraco.Core.Logging; +using LightInject; namespace Umbraco.Web.Scheduling { diff --git a/src/Umbraco.Web/Services/SectionService.cs b/src/Umbraco.Web/Services/SectionService.cs index 4799d49de8..0e82a06d52 100644 --- a/src/Umbraco.Web/Services/SectionService.cs +++ b/src/Umbraco.Web/Services/SectionService.cs @@ -31,7 +31,7 @@ namespace Umbraco.Web.Services public SectionService( IUserService userService, IApplicationTreeService applicationTreeService, - IDatabaseUnitOfWorkProvider uowProvider, + IScopeUnitOfWorkProvider uowProvider, CacheHelper cache) { if (applicationTreeService == null) throw new ArgumentNullException("applicationTreeService"); diff --git a/src/Umbraco.Web/Strategies/DatabaseServerRegistrarAndMessengerComponent.cs b/src/Umbraco.Web/Strategies/DatabaseServerRegistrarAndMessengerComponent.cs index a324ecc75b..ca1e724547 100644 --- a/src/Umbraco.Web/Strategies/DatabaseServerRegistrarAndMessengerComponent.cs +++ b/src/Umbraco.Web/Strategies/DatabaseServerRegistrarAndMessengerComponent.cs @@ -16,6 +16,7 @@ using Umbraco.Core.Sync; using Umbraco.Web.Cache; using Umbraco.Web.Routing; using Umbraco.Web.Scheduling; +using LightInject; namespace Umbraco.Web.Strategies { diff --git a/src/Umbraco.Web/Strategies/LegacyServerRegistrarAndMessengerComponent.cs b/src/Umbraco.Web/Strategies/LegacyServerRegistrarAndMessengerComponent.cs index 4beba23613..6f956f88c6 100644 --- a/src/Umbraco.Web/Strategies/LegacyServerRegistrarAndMessengerComponent.cs +++ b/src/Umbraco.Web/Strategies/LegacyServerRegistrarAndMessengerComponent.cs @@ -1,13 +1,10 @@ using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; using Umbraco.Core; using Umbraco.Core.Components; using Umbraco.Core.Configuration; using Umbraco.Core.Logging; using Umbraco.Core.Services; +using LightInject; namespace Umbraco.Web.Strategies { diff --git a/src/Umbraco.Web/Strategies/Migrations/PostMigrationComponent.cs b/src/Umbraco.Web/Strategies/Migrations/PostMigrationComponent.cs index ec984a7259..352e93fe48 100644 --- a/src/Umbraco.Web/Strategies/Migrations/PostMigrationComponent.cs +++ b/src/Umbraco.Web/Strategies/Migrations/PostMigrationComponent.cs @@ -2,6 +2,7 @@ using Umbraco.Core.DI; using Umbraco.Core.Persistence.Migrations; using Umbraco.Core.Plugins; +using LightInject; namespace Umbraco.Web.Strategies.Migrations { diff --git a/src/Umbraco.Web/Templates/TemplateRenderer.cs b/src/Umbraco.Web/Templates/TemplateRenderer.cs index 3608b041da..5378e4bd63 100644 --- a/src/Umbraco.Web/Templates/TemplateRenderer.cs +++ b/src/Umbraco.Web/Templates/TemplateRenderer.cs @@ -13,6 +13,7 @@ using umbraco; using umbraco.cms.businesslogic.language; using Umbraco.Core.Configuration; using Umbraco.Core.Services; +using LightInject; namespace Umbraco.Web.Templates { diff --git a/src/Umbraco.Web/Umbraco.Web.csproj b/src/Umbraco.Web/Umbraco.Web.csproj index 3e6a7c26c7..6df670020d 100644 --- a/src/Umbraco.Web/Umbraco.Web.csproj +++ b/src/Umbraco.Web/Umbraco.Web.csproj @@ -60,35 +60,35 @@ - + - + - - - + + + - + - + - - - - - + + + + + @@ -96,8 +96,8 @@ - - + + diff --git a/src/UmbracoExamine/UmbracoExamine.csproj b/src/UmbracoExamine/UmbracoExamine.csproj index 47b3bd3c04..e5738ddac8 100644 --- a/src/UmbracoExamine/UmbracoExamine.csproj +++ b/src/UmbracoExamine/UmbracoExamine.csproj @@ -6,6 +6,7 @@ {07FBC26B-2927-4A22-8D96-D644C667FECC} Library UmbracoExamine + UmbracoExamine ..\ true diff --git a/src/umbraco.cms/umbraco.cms.csproj b/src/umbraco.cms/umbraco.cms.csproj index 01b123ee28..1afcd8e0de 100644 --- a/src/umbraco.cms/umbraco.cms.csproj +++ b/src/umbraco.cms/umbraco.cms.csproj @@ -7,6 +7,7 @@ Library cms umbraco.cms + umbraco.cms ..\ true diff --git a/src/umbraco.datalayer/umbraco.datalayer.csproj b/src/umbraco.datalayer/umbraco.datalayer.csproj index e1983b8f6e..f4baad794c 100644 --- a/src/umbraco.datalayer/umbraco.datalayer.csproj +++ b/src/umbraco.datalayer/umbraco.datalayer.csproj @@ -6,6 +6,7 @@ {C7CB79F0-1C97-4B33-BFA7-00731B579AE2} Library umbraco.DataLayer + umbraco.DataLayer ..\ true @@ -42,7 +43,7 @@ - +