private static IsRoot ( IDomainHierarchy target, ICollection |
||
target | IDomainHierarchy | |
items | ICollection |
|
return | bool |
private static bool IsRoot(IDomainHierarchy target, ICollection<IDomainHierarchy> items)
{
if (target.IsNullOrEmpty()) return false;
var parent = target.GetParent();
if (parent.IsNullOrEmpty()) return true;
return !items.Contains(parent);
}