Beispiel #1
0
        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());
            }
        }
Beispiel #5
0
            public void Notify(string message)
            {
                action = new EventLogWriterIoC();
                action.ActOnNotification(message);

                action = new EmailSenderIoC();
                action.ActOnNotification(message);

                action = new SMSSenderIoC();
                action.ActOnNotification(message);
            }
Beispiel #6
0
 public void nofity(INotificationAction at, string messages)
 {
     this.task = at;
     task.ActOnNotification(messages);
 }
Beispiel #7
0
 public void Notify(INotificationAction concreteAction, string message)
 {
     this.action = concreteAction;
     action.ActOnNotification(message);
 }
Beispiel #8
0
 public void Notify(INotificationAction action, string message)
 {
     this._action = @action;
     action.ActOnNotification(message);
 }
 public void Notify(string message)
 {
     action.ActOnNotification(message);
 }