Пример #1
0
 public ECS(int windowthr, int heaterthr, ISensor tempSensor, IRegulator heater, IRegulator window)
 {
     _tempSensor = tempSensor;
     _heater     = heater;
     _window     = window;
     SetHeaterThreshold(heaterthr);
     SetWindowThreshold(windowthr);
 }
Пример #2
0
 public static RegulatorEntity Update(RegulatorEntity from, IRegulator to)
 {
     from.Name                    = to.Name;
     from.InternalId              = to.InternalId;
     from.IsDefault               = to.IsDefault;
     from.Countries               = to.Countries;
     from.TermsOfUseUrl           = to.TermsOfUseUrl;
     from.MarginTradingConditions = to.MarginTradingConditions;
     from.CreditVoucherUrl        = to.CreditVoucherUrl;
     from.RiskDescriptionUrl      = to.RiskDescriptionUrl;
     return(Create(from));
 }
Пример #3
0
 public static RegulatorEntity Create(IRegulator regulator)
 {
     return(new RegulatorEntity
     {
         PartitionKey = GeneratePartition(),
         RowKey = GenerateRowKey(regulator.InternalId),
         InternalId = regulator.InternalId,
         Name = regulator.Name,
         IsDefault = regulator.IsDefault,
         Countries = regulator.Countries,
         TermsOfUseUrl = regulator.TermsOfUseUrl,
         MarginTradingConditions = regulator.MarginTradingConditions,
         CreditVoucherUrl = regulator.CreditVoucherUrl,
         RiskDescriptionUrl = regulator.RiskDescriptionUrl
     });
 }
Пример #4
0
 public void addRegulator(IRegulator r, Location loc)
 {
     rm.mapOfTemperatureRegulators.Add(loc, (TemperatureRegulator)r);
 }
Пример #5
0
 public void Regulator(IRegulator obj)
 {
     Console.WriteLine("Увеличить температуру устройства. Введите 6");
     Console.WriteLine("Снизить температуру устройства. Введите 7");
 }
Пример #6
0
 public void addRegulator(IRegulator r, Location loc)
 {
     rm.mapOfWetnessRegulators.Add(loc, (WetnessRegulator)r);
 }
Пример #7
0
 public void addRegulator(IRegulator r, Location loc)
 {
     rm.mapOfLightRegulators.Add(loc, (LightRegulator)r);
 }
Пример #8
0
 public Stock(string name, int value, IRegulator stockRegulator = null)
 {
     Navn            = name;
     Value           = value;
     _stockRegulator = stockRegulator ?? new StockRegulator(new DefaultRandom(1, 3), this);
 }
Пример #9
0
 public void addRegulator(IRegulator r, Location loc)
 {
     rm.mapOfAcidityRegulators.Add(loc, (AcidityRegulator)r);
 }