public static HasReferenceTo ( this element, System.Xml.Linq.XElement target ) : bool | ||
element | this | |
target | System.Xml.Linq.XElement | |
return | bool |
public static bool HasReferenceTo(this XElement element, XElement target)
{
var referenceAttribute = element.Attribute(ReferenceAttributeName);
return referenceAttribute != null &&
XPathHelper.GetElement(element, referenceAttribute.Value) == target;
}