2012-08-01 09:49:10 +06:00
|
|
|
|
using System;
|
|
|
|
|
|
using System.Collections.Generic;
|
2012-08-10 13:18:13 +06:00
|
|
|
|
using Umbraco.Core.ObjectResolution;
|
2012-08-01 09:49:10 +06:00
|
|
|
|
using umbraco.interfaces;
|
|
|
|
|
|
|
2012-08-10 13:18:13 +06:00
|
|
|
|
namespace Umbraco.Core
|
2012-08-01 09:49:10 +06:00
|
|
|
|
{
|
2012-08-14 12:03:34 +06:00
|
|
|
|
|
|
|
|
|
|
|
2012-08-01 22:06:15 +06:00
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// A resolver to return all ICacheRefresher objects
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
internal sealed class CacheRefreshersResolver : LegacyTransientObjectsResolver<CacheRefreshersResolver, ICacheRefresher>
|
|
|
|
|
|
{
|
|
|
|
|
|
|
2012-08-01 09:49:10 +06:00
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Constructor
|
|
|
|
|
|
/// </summary>
|
2012-08-01 10:05:39 +06:00
|
|
|
|
/// <param name="refreshers"></param>
|
2013-01-23 18:40:40 +03:00
|
|
|
|
internal CacheRefreshersResolver(Func<IEnumerable<Type>> refreshers)
|
2012-08-01 10:05:39 +06:00
|
|
|
|
: base(refreshers)
|
2012-08-01 09:49:10 +06:00
|
|
|
|
{
|
2012-08-01 10:05:39 +06:00
|
|
|
|
|
2012-08-01 09:49:10 +06:00
|
|
|
|
}
|
2012-08-01 22:06:15 +06:00
|
|
|
|
|
2012-08-01 09:49:10 +06:00
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Gets the <see cref="ICacheRefresher"/> implementations.
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
public IEnumerable<ICacheRefresher> CacheResolvers
|
|
|
|
|
|
{
|
|
|
|
|
|
get
|
|
|
|
|
|
{
|
2012-10-13 10:59:21 +05:00
|
|
|
|
EnsureIdsAreTracked();
|
2012-08-01 09:49:10 +06:00
|
|
|
|
return Values;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2012-08-01 10:05:39 +06:00
|
|
|
|
protected override Guid GetUniqueIdentifier(ICacheRefresher obj)
|
2012-08-01 09:49:10 +06:00
|
|
|
|
{
|
2012-08-01 10:05:39 +06:00
|
|
|
|
return obj.UniqueIdentifier;
|
2012-08-01 09:49:10 +06:00
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|