Beispiel #1
0
        public PackageStub(CHPId priPump, ContainerId solarContainer, int numContainers, BoilerId?secBoiler, SolarPanelId?solar,
                           int?numberOfSolars, ContainerId?container, TempControlId?tempControl)
        {
            var factory = new ApplianceFactory();

            ApplianceInstances.Add(new ApplianceInstance()
            {
                Appliance = factory.GetCHP(priPump), IsPrimary = true
            });
            ApplianceInstances.Add(new ApplianceInstance()
            {
                Appliance        = factory.GetContainer(solarContainer),
                IsSolarContainer = true
            });
            for (int i = 0; i < numberOfSolars; i++)
            {
                ApplianceInstances.Add(new ApplianceInstance()
                {
                    Appliance            = factory.GetSolarPanel(solar ?? 0),
                    IsUsedForRoomHeating = true
                });
            }
            ApplianceInstances.Add(new ApplianceInstance()
            {
                Appliance = factory.GetBoiler(secBoiler ?? 0)
            });
            ApplianceInstances.Add(new ApplianceInstance()
            {
                Appliance = factory.GetSolarPanel(solar ?? 0)
            });
            ApplianceInstances.Add(new ApplianceInstance()
            {
                Appliance = factory.GetContainer(container ?? 0)
            });
            ApplianceInstances.Add(new ApplianceInstance()
            {
                Appliance = factory.GetTempControl(tempControl ?? 0)
            });
            for (int i = 0; i < numContainers; i++)
            {
                ApplianceInstances.Add(new ApplianceInstance()
                {
                    Appliance        = factory.GetContainer(solarContainer),
                    IsSolarContainer = true
                });
            }
            for (int i = 0; i < numContainers - 1; i++)
            {
                ApplianceInstances.Add(new ApplianceInstance()
                {
                    Appliance = factory.GetContainer(solarContainer)
                });
            }
        }
Beispiel #2
0
        public PackageStub(BoilerId priBoiler, ContainerId?solarContainer, SolarPanelId?solar, int numberOfSolars,
                           SolarStationId?solarStation)
        {
            var factory = new ApplianceFactory();

            ApplianceInstances.Add(new ApplianceInstance()
            {
                Appliance = factory.GetBoiler((priBoiler)), IsPrimary = true
            });
            ApplianceInstances.Add(new ApplianceInstance()
            {
                Appliance        = factory.GetContainer(solarContainer ?? 0),
                IsSolarContainer = true
            });
            for (int i = 0; i < numberOfSolars; i++)
            {
                ApplianceInstances.Add(new ApplianceInstance()
                {
                    Appliance            = factory.GetSolarPanel(solar ?? 0),
                    IsUsedForRoomHeating = true
                });
            }
            ApplianceInstances.Add(new ApplianceInstance()
            {
                Appliance = factory.GetSolarStation(solarStation ?? 0)
            });
        }
Beispiel #3
0
        public PackageStub(BoilerId priBoiler, ContainerId?solarContain, BoilerId?secBoiler, SolarPanelId?solar, int numberOfSolars,
                           HeatpumpId?heatpump, ContainerId?container, TempControlId?tempControl)
        {
            var factory = new ApplianceFactory();

            ApplianceInstances.Add(new ApplianceInstance()
            {
                Appliance = factory.GetBoiler((priBoiler)), IsPrimary = true
            });

            ApplianceInstances.Add(new ApplianceInstance()
            {
                Appliance        = factory.GetContainer((solarContain ?? 0)),
                IsSolarContainer = true
            });
            ApplianceInstances.Add(new ApplianceInstance()
            {
                Appliance = factory.GetBoiler(secBoiler ?? 0)
            });
            for (int i = 0; i < numberOfSolars; i++)
            {
                ApplianceInstances.Add(new ApplianceInstance()
                {
                    Appliance            = factory.GetSolarPanel(solar ?? 0),
                    IsUsedForRoomHeating = true
                });
            }
            ApplianceInstances.Add(new ApplianceInstance()
            {
                Appliance = factory.GetHeatpump(heatpump ?? 0)
            });
            ApplianceInstances.Add(new ApplianceInstance()
            {
                Appliance = factory.GetContainer(container ?? 0)
            });
            ApplianceInstances.Add(new ApplianceInstance()
            {
                Appliance = factory.GetTempControl(tempControl ?? 0)
            });
        }