diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/uQuery/NodeExtensions.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/uQuery/NodeExtensions.cs
index b14b1380ce..a3b7b93a06 100644
--- a/src/Umbraco.Web/umbraco.presentation/umbraco/uQuery/NodeExtensions.cs
+++ b/src/Umbraco.Web/umbraco.presentation/umbraco/uQuery/NodeExtensions.cs
@@ -22,7 +22,7 @@ namespace umbraco
/// Returns an ancestor node by path level.
public static Node GetAncestorByPathLevel(this Node node, int level)
{
- return (Node) GetAncestorByPathLevel((INode) node, level);
+ return (Node)GetAncestorByPathLevel((INode)node, level);
}
///
@@ -206,7 +206,7 @@ namespace umbraco
/// Node as IEnumerable
public static IEnumerable GetDescendantNodes(this Node node)
{
- return GetDescendantNodes((INode) node).Cast();
+ return GetDescendantNodes((INode)node).Cast();
}
///
@@ -238,7 +238,8 @@ namespace umbraco
/// Nodes as IEnumerable
public static IEnumerable GetDescendantNodes(this Node node, Func func)
{
- return GetDescendantNodes((INode)node, (Func) func).Cast();
+ Func convertedFunc = x => func((Node)x);
+ return GetDescendantNodes((INode)node, convertedFunc).Cast();
}
///
@@ -322,7 +323,8 @@ namespace umbraco
/// Nodes as IEnumerable
public static IEnumerable GetChildNodes(this Node node, Func func)
{
- return GetChildNodes((INode)node, (Func) func).Cast();
+ Func convertedFunc = x => func((Node)x);
+ return GetChildNodes((INode)node, convertedFunc).Cast();
}
///
@@ -372,7 +374,7 @@ namespace umbraco
/// null or Node
public static Node GetChildNodeByName(this Node parentNode, string nodeName)
{
- return (Node) GetChildNodeByName((INode)parentNode, nodeName);
+ return (Node)GetChildNodeByName((INode)parentNode, nodeName);
}
///
@@ -477,16 +479,16 @@ namespace umbraco
}
// // umbraco.MacroEngines DynamicXml
-// else if (typeof(T) == typeof(DynamicXml))
-// {
-// try
-// {
-// return (T)((object)new DynamicXml(node.GetPropertyAsString(propertyAlias)));
-// }
-// catch
-// {
-// }
-// }
+ // else if (typeof(T) == typeof(DynamicXml))
+ // {
+ // try
+ // {
+ // return (T)((object)new DynamicXml(node.GetPropertyAsString(propertyAlias)));
+ // }
+ // catch
+ // {
+ // }
+ // }
else
{
try
@@ -601,7 +603,7 @@ namespace umbraco
/// Returns an XmlNode for the selected Node
public static XmlNode ToXml(this Node node)
{
- return ToXml((INode) node);
+ return ToXml((INode)node);
}
///
@@ -676,7 +678,7 @@ namespace umbraco
/// the same node object on which this is an extension method
public static Node SetProperty(this Node node, string propertyAlias, object value)
{
- return (Node) SetProperty((INode)node, propertyAlias, value);
+ return (Node)SetProperty((INode)node, propertyAlias, value);
}
///
@@ -703,7 +705,7 @@ namespace umbraco
/// the same node object on which this is an extension method
public static Node Publish(this Node node, bool useAdminUser)
{
- return (Node) Publish((INode)node, useAdminUser);
+ return (Node)Publish((INode)node, useAdminUser);
}
///