Merge pull request #2633 from maarten-kieft/dev-v7
Make base AnchestorOrSelf public
This commit is contained in:
@@ -502,10 +502,10 @@ namespace Umbraco.Web
|
||||
where T : class, IPublishedContent
|
||||
{
|
||||
return new PublishedContentOrderedSet<T>(source);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
#region Dynamic Linq Extensions
|
||||
|
||||
[Obsolete("This method uses dynamics which will be removed in future versions, use strongly typed syntax instead")]
|
||||
@@ -517,7 +517,7 @@ namespace Umbraco.Web
|
||||
}
|
||||
|
||||
[Obsolete("This method uses dynamics which will be removed in future versions, use strongly typed syntax instead")]
|
||||
[EditorBrowsable(EditorBrowsableState.Never)]
|
||||
[EditorBrowsable(EditorBrowsableState.Never)]
|
||||
public static IQueryable<IPublishedContent> Where(this IEnumerable<IPublishedContent> list, string predicate)
|
||||
{
|
||||
// wrap in DynamicPublishedContentList so that the ContentSet is correct
|
||||
@@ -530,7 +530,7 @@ namespace Umbraco.Web
|
||||
}
|
||||
|
||||
[Obsolete("This method uses dynamics which will be removed in future versions, use strongly typed syntax instead")]
|
||||
[EditorBrowsable(EditorBrowsableState.Never)]
|
||||
[EditorBrowsable(EditorBrowsableState.Never)]
|
||||
public static IEnumerable<IGrouping<object, IPublishedContent>> GroupBy(this IEnumerable<IPublishedContent> list, string predicate)
|
||||
{
|
||||
var dList = new DynamicPublishedContentList(list);
|
||||
@@ -538,7 +538,7 @@ namespace Umbraco.Web
|
||||
}
|
||||
|
||||
[Obsolete("This method uses dynamics which will be removed in future versions, use strongly typed syntax instead")]
|
||||
[EditorBrowsable(EditorBrowsableState.Never)]
|
||||
[EditorBrowsable(EditorBrowsableState.Never)]
|
||||
public static IQueryable Select(this IEnumerable<IPublishedContent> list, string predicate, params object[] values)
|
||||
{
|
||||
var dList = new DynamicPublishedContentList(list);
|
||||
@@ -560,8 +560,8 @@ namespace Umbraco.Web
|
||||
if (content == null) throw new ArgumentNullException("content");
|
||||
return new HtmlString(content.Where(predicate) ? valueIfTrue : valueIfFalse);
|
||||
}
|
||||
|
||||
[Obsolete("This method uses dynamics which will be removed in future versions, use strongly typed syntax instead: Where(x => x.IsVisible())")]
|
||||
|
||||
[Obsolete("This method uses dynamics which will be removed in future versions, use strongly typed syntax instead: Where(x => x.IsVisible())")]
|
||||
[EditorBrowsable(EditorBrowsableState.Never)]
|
||||
public static bool Where(this IPublishedContent content, string predicate)
|
||||
{
|
||||
@@ -1199,7 +1199,7 @@ namespace Umbraco.Web
|
||||
return content.AncestorsOrSelf<T>(maxLevel).FirstOrDefault();
|
||||
}
|
||||
|
||||
internal static IEnumerable<IPublishedContent> AncestorsOrSelf(this IPublishedContent content, bool orSelf, Func<IPublishedContent, bool> func)
|
||||
public static IEnumerable<IPublishedContent> AncestorsOrSelf(this IPublishedContent content, bool orSelf, Func<IPublishedContent, bool> func)
|
||||
{
|
||||
var ancestorsOrSelf = content.EnumerateAncestors(orSelf);
|
||||
return func == null ? ancestorsOrSelf : ancestorsOrSelf.Where(func);
|
||||
|
||||
Reference in New Issue
Block a user