public void Notify(string message) { if (action == null) { } action.ActOnNotification(message); }
public void Notify(string message) { if (action == null) { action = new EventLogWriter(); } action.ActOnNotification(message); }
//The function will be called when app pool has problem public void Notify(INotificationAction concreteAction , string message) { this.action = concreteAction; if (action == null) { // Here we will match the abstraction i.e interface to concrete class } action.ActOnNotification(message); }
public void FindExpertsToNotify() { var experts = employees.Where(e => e.Experience > 8); foreach (var item in experts) { notificationAction.ActOnNotification(item, notificationAction.GetType().ToString()); } }
public void Notify(string message) { action = new EventLogWriterIoC(); action.ActOnNotification(message); action = new EmailSenderIoC(); action.ActOnNotification(message); action = new SMSSenderIoC(); action.ActOnNotification(message); }
public void nofity(INotificationAction at, string messages) { this.task = at; task.ActOnNotification(messages); }
public void Notify(INotificationAction concreteAction, string message) { this.action = concreteAction; action.ActOnNotification(message); }
public void Notify(INotificationAction action, string message) { this._action = @action; action.ActOnNotification(message); }
public void Notify(string message) { action.ActOnNotification(message); }