コード例 #1
0
        private static void CheckPIMSchema(PIMSchema pimSchema)
        {
            CheckSchema(pimSchema);

            foreach (PIMClass pimClass in pimSchema.PIMClasses)
            {
                CheckPIMClass(pimClass);
            }

            foreach (PIMAssociation pimAssociation in pimSchema.PIMAssociations)
            {
                CheckPIMAssociation(pimAssociation);
            }

            foreach (PIMComponent pimComponent in ModelIterator.GetPIMComponents(pimSchema))
            {
                Assert.AreEqual(pimComponent.PIMSchema, pimSchema);
            }
        }
コード例 #2
0
        public override void LoadSchemaToDiagram(Schema schema, bool bindingOnly = false)
        {
            base.LoadSchemaToDiagram(schema, bindingOnly);
            PIMSchema pimSchema = (PIMSchema)schema;

            if (!bindingOnly)
            {
                Caption = pimSchema.Caption;

                foreach (PIMComponent pimComponent in ModelIterator.GetPIMComponents(pimSchema))
                {
                    if (pimComponent.IsOfType(typeof(PIMClass), typeof(PIMAssociation)))
                    {
                        Components.Add(pimComponent);
                    }
                }
            }

            PIMSchema.ComponentRemoved += Components_ComponentRemoved;
        }