2013-01-10 04:33:30 +03:00
|
|
|
|
using System;
|
|
|
|
|
|
using System.Collections.Generic;
|
2015-02-22 21:36:02 +01:00
|
|
|
|
using Umbraco.Core.LightInject;
|
2015-01-16 15:47:44 +11:00
|
|
|
|
using Umbraco.Core.Logging;
|
2013-01-10 04:33:30 +03:00
|
|
|
|
using Umbraco.Core.ObjectResolution;
|
|
|
|
|
|
|
|
|
|
|
|
namespace Umbraco.Core.Persistence.Migrations
|
|
|
|
|
|
{
|
2015-02-22 21:36:02 +01:00
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// A resolver to return all IMigrations
|
|
|
|
|
|
/// </summary>
|
2015-02-23 00:02:12 +01:00
|
|
|
|
internal class MigrationResolver : ContainerLazyManyObjectsResolver<MigrationResolver, IMigration>, IMigrationResolver
|
2015-02-22 21:36:02 +01:00
|
|
|
|
{
|
2013-01-10 04:33:30 +03:00
|
|
|
|
|
2015-02-22 21:36:02 +01:00
|
|
|
|
public MigrationResolver(IServiceContainer container, ILogger logger, Func<IEnumerable<Type>> migrations)
|
|
|
|
|
|
: base(container, logger, migrations, ObjectLifetimeScope.Transient)
|
|
|
|
|
|
{
|
|
|
|
|
|
}
|
2013-02-13 03:29:32 +06:00
|
|
|
|
|
2015-02-22 21:36:02 +01:00
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Gets the migrations
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
public IEnumerable<IMigration> Migrations
|
|
|
|
|
|
{
|
|
|
|
|
|
get { return Values; }
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
2013-01-10 04:33:30 +03:00
|
|
|
|
}
|