Added IsNotEqual IfHelper to DynamicNode and DynamicXml

This commit is contained in:
agrath@gmail.com
2011-06-16 10:55:41 -02:00
parent 9a1cfafb74
commit 86c9e8bde0
2 changed files with 24 additions and 0 deletions

View File

@@ -1357,6 +1357,18 @@ namespace umbraco.MacroEngines
{
return IsHelper(n => n.Id == other.Id, valueIfTrue, valueIfFalse);
}
public bool IsNotEqual(DynamicNode other)
{
return IsHelper(n => n.Id != other.Id);
}
public string IsNotEqual(DynamicNode other, string valueIfTrue)
{
return IsHelper(n => n.Id != other.Id, valueIfTrue);
}
public string IsNotEqual(DynamicNode other, string valueIfTrue, string valueIfFalse)
{
return IsHelper(n => n.Id != other.Id, valueIfTrue, valueIfFalse);
}
public bool IsDescendant(DynamicNode other)
{
var ancestors = this.Ancestors();

View File

@@ -395,6 +395,18 @@ namespace umbraco.MacroEngines
{
return IsHelper(n => n.BaseElement == other.BaseElement, valueIfTrue, valueIfFalse);
}
public bool IsNotEqual(DynamicXml other)
{
return IsHelper(n => n.BaseElement != other.BaseElement);
}
public string IsNotEqual(DynamicXml other, string valueIfTrue)
{
return IsHelper(n => n.BaseElement != other.BaseElement, valueIfTrue);
}
public string IsNotEqual(DynamicXml other, string valueIfTrue, string valueIfFalse)
{
return IsHelper(n => n.BaseElement != other.BaseElement, valueIfTrue, valueIfFalse);
}
public bool IsDescendant(DynamicXml other)
{
var ancestors = this.Ancestors();