예제 #1
0
        public override bool EA_OnPreNewConnector(Repository repository, EventProperties info)
        {
            EAMain.UpdateRepository(repository);
            IEAVolatileConnector volatileConnector = EAMain.WrapVolatileConnector(info);

            foreach (IRepositoryListener l in _listeners)
            {
                if (!l.OnPreNewConnector(volatileConnector))
                {
                    return(false);
                }
            }
            return(true);
        }
예제 #2
0
        public void EA_WrapVolatileConnectorTest()
        {
            Connector       connector  = _e.GetForcesElementConnector();
            EventProperties properties = EAEventPropertiesHelper.GetInstance(
                connector.Type, connector.Subtype, connector.Stereotype, connector.ClientID, connector.SupplierID,
                connector.DiagramID, 0, 0);
            IEAVolatileConnector c = EAMain.WrapVolatileConnector(properties);

            Assert.IsTrue(connector.Type == c.Type);
            Assert.IsTrue(connector.Subtype == c.Subtype);
            Assert.IsTrue(connector.ClientID == c.Client.ID);
            Assert.IsTrue(connector.SupplierID == c.Supplier.ID);
            Assert.IsNull(c.Diagram); // Connector diagram ID is zero
        }