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:
@@ -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; }
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user