Merge pull request #4558 from umbraco/temp8-implement-GetByContentType-nucache
v8 - the GetByContentType methods for the content cache were not implemented
This commit is contained in:
@@ -548,7 +548,9 @@ namespace Umbraco.Tests.LegacyXmlPublishedCache
|
||||
|
||||
public override IEnumerable<IPublishedContent> GetByContentType(PublishedContentType contentType)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
return GetAtRoot()
|
||||
.SelectMany(x => x.DescendantsOrSelf())
|
||||
.Where(x => x.ContentType == contentType);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
@@ -208,8 +208,7 @@ namespace Umbraco.Web.PublishedCache
|
||||
/// <returns>The content type, or null.</returns>
|
||||
/// <remarks>The alias is case-insensitive.</remarks>
|
||||
PublishedContentType GetContentType(string alias);
|
||||
|
||||
// TODO: can we implement this, now? maybe only with NuCache else will throw NotImplemented...
|
||||
|
||||
IEnumerable<IPublishedContent> GetByContentType(PublishedContentType contentType);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -388,7 +388,9 @@ namespace Umbraco.Web.PublishedCache.NuCache
|
||||
|
||||
public override IEnumerable<IPublishedContent> GetByContentType(PublishedContentType contentType)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
return GetAtRoot()
|
||||
.SelectMany(x => x.DescendantsOrSelf())
|
||||
.Where(x => x.ContentType == contentType);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
Reference in New Issue
Block a user