Exemple #1
0
        public void CreateOutputPortMgr_Creates_Instance()
        {
            //Arrange
            var fac = new PortMgrFactory();

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

            //Assert
            Assert.NotNull(mgr);
        }
        private IOutputPortMgr CreateOutputPortMgr(IElement parent)
        {
            // No output Ports
            IOutputPortMgr outPortMgr = null;

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

            return outPortMgr;
        }
        private IInputPortMgr CreateInputPortMgr(IElement parent, Guid mgrId, Guid port0Id)
        {
            IInputPortMgr inPortMgr = null;
            IInputDataPort inPort = null;

            using (PortMgrFactory fac = new PortMgrFactory())
            {
                inPortMgr = fac.CreateInputPortMgr();
            }

            using (PortFactory fac = new PortFactory())
            {
                inPort = fac.CreateInputDataPort(port0Id, parent);
            }

            inPortMgr.Add(inPort);

            return inPortMgr;
        }
        private IInputPortMgr CreateInputPortMgr(IElement parent)
        {
            IInputPortMgr inPortMgr = null;
            IInputDataPort inPort = null;

            using (PortMgrFactory fac = new PortMgrFactory())
            {
                inPortMgr = fac.CreateInputPortMgr();
            }

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

            inPortMgr.Add(inPort);

            return inPortMgr;
        }
        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;
        }
        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;
        }
        private IInputPortMgr CreateInputPortMgr(IElement parent)
        {
            // No INput Ports
            IInputPortMgr inPortMgr = null;

            using (PortMgrFactory fac = new PortMgrFactory())
            {
                inPortMgr = fac.CreateInputPortMgr();
            }

            return inPortMgr;
        }