public void TriggerNotification(BreachType breachType) { foreach (INotification _notifier in _notifierList) { _notifier.TriggerNotification(breachType); } }
public static void CheckAndAlert(AlertTarget alertTarget, BatteryCharacter batteryChar, double temperatureInC) { BreachType breachType = ClassifyTemperatureBreach(batteryChar.coolingType, temperatureInC); if (ConfigurationManager.AppSettings["TestingEnvironment"] == "true") { new FakeAlertNotifierType()._NotifierType[alertTarget]().TriggerNotification(breachType); } else { new AlertNotifierType()._NotifierType[alertTarget]().TriggerNotification(breachType); } }
public static bool checkAndAlert(AlertTarget alertTarget, BatteryCharacter batteryChar, double temperatureInC) { bool checkAlert = false; BreachType breachType = classifyTemperatureBreach(batteryChar.coolingType, temperatureInC); IAlerter alerter = FetchInstance(alertTarget.ToString()) as IAlerter; if (alerter != null) { alerter.TriggerBreachAlert(breachType); checkAlert = true; } return(checkAlert); }
public static void checkAndAlert( AlertTarget alertTarget, BatteryCharacter batteryChar, double temperatureInC) { BreachType breachType = classifyTemperatureBreach( batteryChar.coolingType, temperatureInC ); switch (alertTarget) { case AlertTarget.TO_CONTROLLER: sendToController(breachType); break; case AlertTarget.TO_EMAIL: sendToEmail(breachType); break; } }
protected ItemDisplayViewModel GetBreach <T>(BreachType breachType) where T : IBreachCurrency { var itemDisplayViewModel = new ItemDisplayViewModel(null); foreach (var breach in _items.Keys.OfType <T>()) { var breachItem = breach as Item; if (breach.Type == breachType) { itemDisplayViewModel = new ItemDisplayViewModel(breachItem); _items[breachItem] = itemDisplayViewModel; break; } } return(itemDisplayViewModel); }
public static void sendToEmail(BreachType breachType) { string recepient = "*****@*****.**"; switch (breachType) { case BreachType.TOO_LOW: Console.WriteLine("To: {}\n", recepient); Console.WriteLine("Hi, the temperature is too low\n"); break; case BreachType.TOO_HIGH: Console.WriteLine("To: {}\n", recepient); Console.WriteLine("Hi, the temperature is too high\n"); break; case BreachType.NORMAL: break; } }
public static void sendToController(BreachType breachType) { const ushort header = 0xfeed; Console.WriteLine("{} : {}\n", header, breachType); }
public void TriggerEmail(string Recepient, BreachType _BreachType) { Console.WriteLine("To:\n", Recepient); Console.WriteLine("Hi, the temperature is in normal state\n"); }
public void TriggerNotification(BreachType breachType) { IsCompositeTriggerNotificationCalledOnce = true; }
public void DisplayBreachStatus(BreachType breachType, string recepient) { Console.WriteLine($"To: {recepient}\n"); Console.WriteLine($"Hi, the temperature is {breachType}\n"); }
public void CheckAndAlert(Battery batteryChar, double temperature) { BreachType breachType = CheckBreachLevel.ClassifyTemperatureBreach(batteryChar.CoolingType, temperature); AlertSource.Alert(breachType); }
public void TriggerNotification(BreachType breachType) { const ushort header = 0xfeed; Console.WriteLine("{} : {}\n", header, breachType); }
public void TriggerNotification(BreachType breachType) { Console.WriteLine("Temperature state: " + breachType); }
private T GetBreach <T>(BreachType breachType) where T : IBreachCurrency { return(_items.OfType <T>().FirstOrDefault(x => x.Type == breachType)); }
public static void CheckAndAlert(INotification _notifier, BatteryCharacter batteryChar, double temperatureInC) { BreachType breachType = ClassifyTemperatureBreach(batteryChar.coolingType, temperatureInC); _notifier.TriggerNotification(breachType); }
public Breachstone(JSONProxy.Item item) : base(item) { Type = ProxyMapper.GetBreachType(item); }
public Splinter(JSONProxy.Item item) : base(item) { Type = ProxyMapper.GetBreachType(item); }
public BreachBlessing(JSONProxy.Item item) : base(item) { Type = ProxyMapper.GetBreachType(item); }
public void Alert(BreachType breachType) { string recepient = "*****@*****.**"; DisplayBreachStatus(breachType, recepient); }
public void TriggerNotification(BreachType breachType) { string recepient = "*****@*****.**"; new EmailMessageInitializer()._Email[breachType]().TriggerEmail(recepient, breachType); }
public void TriggerNotification(BreachType breachType) { IsConsoleTriggerNotificationCalled = true; }
public void TriggerNotification(BreachType breachType) { IsEmailTriggerNotificationCalled = true; }