2013-08-12 15:06:12 +02:00
|
|
|
using System.Linq;
|
|
|
|
|
|
|
|
|
|
namespace Umbraco.Core.Services
|
|
|
|
|
{
|
|
|
|
|
public static class ContentServiceExtensions
|
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Returns true if there is any content in the recycle bin
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="contentService"></param>
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
public static bool RecycleBinSmells(this IContentService contentService)
|
|
|
|
|
{
|
2014-10-16 11:22:44 +10:00
|
|
|
return contentService.CountChildren(Constants.System.RecycleBinContent) > 0;
|
2013-08-12 15:06:12 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Returns true if there is any media in the recycle bin
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="mediaService"></param>
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
public static bool RecycleBinSmells(this IMediaService mediaService)
|
|
|
|
|
{
|
2014-10-16 11:22:44 +10:00
|
|
|
return mediaService.CountChildren(Constants.System.RecycleBinMedia) > 0;
|
2013-08-12 15:06:12 +02:00
|
|
|
}
|
|
|
|
|
}
|
2013-08-01 12:20:28 +10:00
|
|
|
}
|