Beispiel #1
0
        public Factory(FactoryId factoryId, FactoryName name)
        {
            this.factoryId = factoryId;
            this.Name = name;

            this.producedOnions = new List<Onion>();
        }
        private void HandleOpenFactoryClicked(object sender, OpenFactoryEventArgs e)
        {
            Logger.Log("Handling Open Factory Clicked Event");

            var factoryId = new FactoryId(e.FactoryName.Replace(" ", "_"));
            var factoryName = new FactoryName(e.FactoryName);

            this.onionProductionApplicationService.OpenFactory(factoryId, factoryName);
        }
        public Factory OpenFactory(FactoryId factoryId, FactoryName name)
        {
            var factory = new Factory(factoryId, name);

            factory.Open(this.factoryOpened);

            this.repository.Save(factory);

            return factory;
        }
        public Factory OpenFactory(FactoryId factoryId, FactoryName factoryName)
        {
            Factory factory = this.factoryDomainService.OpenFactory(factoryId, factoryName);

            return factory;
        }