Completes: U4-6104 Remove SqlSyntaxContext - quite a large refactor and cleanup since the SqlSyntaxContext was used everywhere :( haven't run tests, etc... yet but the project builds now.

This commit is contained in:
Shannon
2015-02-22 21:36:02 +01:00
parent 693384bdf6
commit 905e58e3b6
261 changed files with 2004 additions and 3669 deletions

View File

@@ -1,36 +1,29 @@
using System;
using System.Collections.Generic;
using Umbraco.Core.LightInject;
using Umbraco.Core.Logging;
using Umbraco.Core.ObjectResolution;
namespace Umbraco.Core.Persistence.Migrations
{
/// <summary>
/// A resolver to return all IMigrations
/// </summary>
internal class MigrationResolver : LazyManyObjectsResolverBase<MigrationResolver, IMigration>
{
/// <summary>
/// Constructor
/// </summary>
/// <param name="serviceProvider"></param>
/// <param name="logger"></param>
/// <param name="migrations"></param>
/// <remarks>
/// Use transient objects as we don't want these as singletons and take up memory that is not required
/// </remarks>
public MigrationResolver(IServiceProvider serviceProvider, ILogger logger, Func<IEnumerable<Type>> migrations)
: base(serviceProvider, logger, migrations, ObjectLifetimeScope.Transient)
{
}
/// <summary>
/// A resolver to return all IMigrations
/// </summary>
internal class MigrationResolver : ContainerLazyManyObjectsResolver<MigrationResolver, IMigration>
{
/// <summary>
/// Gets the migrations
/// </summary>
public IEnumerable<IMigration> Migrations
{
get { return Values; }
}
public MigrationResolver(IServiceContainer container, ILogger logger, Func<IEnumerable<Type>> migrations)
: base(container, logger, migrations, ObjectLifetimeScope.Transient)
{
}
}
/// <summary>
/// Gets the migrations
/// </summary>
public IEnumerable<IMigration> Migrations
{
get { return Values; }
}
}
}