// TODO: Do we need to customize referenceablename on this class to include the DimensionHierarchy as well? public static bool StructureEquals(AstDimensionHierarchyLevelNode level1, AstDimensionHierarchyLevelNode level2) { if (level1 == null || level2 == null) { return level1 == null && level2 == null; } bool match = true; match &= level1.Attribute == level2.Attribute; return match; }
// TODO: Do we need to customize referenceablename on this class to include the DimensionHierarchy as well? public static bool StructureEquals(AstDimensionHierarchyLevelNode level1, AstDimensionHierarchyLevelNode level2) { if (level1 == null || level2 == null) { return(level1 == null && level2 == null); } bool match = true; match &= level1.Attribute == level2.Attribute; return(match); }
public static bool StructureEquals(AstDimensionHierarchyNode hierarchy1, AstDimensionHierarchyNode hierarchy2) { if (hierarchy1 == null || hierarchy2 == null) { return(hierarchy1 == null && hierarchy2 == null); } bool match = true; match &= hierarchy1.Levels.Count == hierarchy2.Levels.Count; if (match) { for (int i = 0; i < hierarchy1.Levels.Count; i++) { match &= AstDimensionHierarchyLevelNode.StructureEquals(hierarchy1.Levels[i], hierarchy2.Levels[i]); } } return(match); }