Esempio n. 1
0
        public void CreateParamMgrPersister()
        {
            Type expectedType = typeof(RandomNetGenParamMgrPersister);
            RandomNetGenPersisterFactory fac = new RandomNetGenPersisterFactory();
            IParamMgrPersister persister = fac.CreateParamMgrPersister();

            Assert.NotNull(persister);
            Assert.IsType(expectedType, persister);
        }
Esempio n. 2
0
        public IPersisterFactory Create(ISimpleElement element)
        {
            IPersisterFactory persister = null;

            if (element is RandomGenerators.RandomNetworkGenElement)
                persister = new RandomGenerators.Persistance.RandomNetGenPersisterFactory();
            else if (element is ImportNetworkElement)
                persister = new ImportNetworkPersisterFactory();
            else if (element is ExportNetworkElement)
                persister = new ExportNetworkPersisterFactory();

            return persister;
        }
Esempio n. 3
0
        public IPersisterFactory Create(Type elementType)
        {
            IPersisterFactory persister = null;

            if (elementType == typeof(RandomGenerators.RandomNetworkGenElement))
                persister = new RandomGenerators.Persistance.RandomNetGenPersisterFactory();
            else if (elementType == typeof(ImportNetworkElement))
                persister = new ImportNetworkPersisterFactory();
            else if (elementType == typeof(ExportNetworkElement))
                persister = new ExportNetworkPersisterFactory();

            return persister;
        }