PublishedContent - add OfType<> extension to IPublishedContent

This commit is contained in:
Stephan
2013-09-27 15:21:23 +02:00
parent af534e87f3
commit 4a58fbfa1d

View File

@@ -1651,6 +1651,12 @@ namespace Umbraco.Web
return contents.Where(x => types.Contains(x.DocumentTypeAlias.ToLowerInvariant()));
}
public static T OfType<T>(this IPublishedContent content)
where T : class, IPublishedContent
{
return content as T;
}
#endregion
#region PropertyAliasesAndNames