Пример #1
0
        public void CreateOutputPortMgr_Creates_Instance()
        {
            //Arrange
            var fac = new PortMgrFactory();

            //Act
            IOutputPortMgr mgr = fac.CreateOutputPortMgr();

            //Assert
            Assert.NotNull(mgr);
        }
Пример #2
0
        private IOutputPortMgr CreateOutputPortMgr(IElement parent)
        {
            // No output Ports
            IOutputPortMgr outPortMgr = null;

            using (PortMgrFactory fac = new PortMgrFactory())
            {
                outPortMgr = fac.CreateOutputPortMgr();
            }

            return outPortMgr;
        }
Пример #3
0
        private IOutputPortMgr CreateOutputPortMgr(IElement parent, Guid mgrId, Guid port0Id)
        {
            IOutputPortMgr outPortMgr = null;
            IOutputNetworkPort outPort = null;

            using (PortMgrFactory fac = new PortMgrFactory())
            {
                outPortMgr = fac.CreateOutputPortMgr();
            }

            using (PortFactory fac = new PortFactory())
            {
                outPort = fac.CreateOutputNetworkPort(port0Id, parent);
            }

            outPortMgr.Add(outPort);

            return outPortMgr;
        }
Пример #4
0
        private IOutputPortMgr CreateOutputPortMgr(IElement parent)
        {
            IOutputPortMgr outPortMgr = null;
            IOutputNetworkPort outPort = null;

            using (PortMgrFactory fac = new PortMgrFactory())
            {
                outPortMgr = fac.CreateOutputPortMgr();
            }

            Guid id = Guid.NewGuid();
            using (PortFactory fac = new PortFactory())
            {
                outPort = fac.CreateOutputNetworkPort(id, parent);
            }

            outPortMgr.Add(outPort);

            return outPortMgr;
        }