public string ChangeManagementRequirement(string[] parameters)
        {
            IManagementRequirement requirement = this.InstantiateNewManagementRequiremenet(parameters);

            this.BalanceManager.ManagemenentRequirement = requirement;
            return("Management requirement changed!");
        }
示例#2
0
 public CommandHandler(IRecyclingStation recyclingStation, IGarbageProcessor garbageProcessor)
 {
     this.RecyclingStation      = recyclingStation;
     this.GarbageProcessor      = garbageProcessor;
     this.managementRequirement = null;
     this.InitializeStrategies();
 }
示例#3
0
        public string ChangeManagementRequirement(params string[] argsStrings)
        {
            //ChangeManagementRequirement {energyBalance}|{capitalBalance}|{garbageType}
            var energyBalance  = double.Parse(argsStrings[0]);
            var capitalBalance = double.Parse(argsStrings[1]);

            var typeString = argsStrings[2];
            var wasteType  = GetWasteType(typeString);

            var newManagementRequirement = new ManagementRequirement(energyBalance, capitalBalance, wasteType);

            this.managementRequirement = newManagementRequirement;

            return($"Management requirement changed!");
        }
示例#4
0
 public void ChangeManagementRequirement(IManagementRequirement managementRequirement)
 {
     this.ManagementRequirement = managementRequirement;
 }