コード例 #1
0
        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);
        }
コード例 #2
0
        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);
        }
コード例 #3
0
        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);
        }