public override void addChild(CityNode node) { if (node.GetType() != typeof(PackageNode) && node.GetType() != typeof(ClassNode)) { throw new ArgumentException("Invalid Model Type; Packages only contain Classes and other Packages as children"); } children[node.GetType() == typeof(PackageNode) ? "packages" : "classes"].Add(node); }
public override void addChild(CityNode node) { if (node.GetType() != typeof(PackageNode)) { throw new ArgumentException("Invalid Model Type; Projects only contain Packages as children "); } children["packages"].Add(node); }
public override void addChild(CityNode node) { if (node.GetType() != typeof(MethodNode)) { throw new ArgumentException("Invalid Model Type; Project only have Packages as children"); } children["methods"].Add(node); }