/// <summary> /// Runs MessageProcessor /// </summary> /// <returns>Async task</returns>" public static async Task Run() { var cloud = new CloudFactory(MessageProcessor.GetConfiguration()); var provider = cloud.Provider(); QueueWatcher watcher = new QueueWatcher(provider, Constants.SleepTime); NotificationHandler handler = new NotificationHandler(provider); await MessageProcessor.Run(watcher, handler); }
/// <summary> /// Runs message processor /// </summary> /// <param name="watcher">Queue watcher</param> /// <param name="handler">Notification handler</param> /// <returns>async task</returns> public static async Task Run(QueueWatcher watcher, NotificationHandler handler) { // Only process one single item, then conclude await watcher.ProcessNext(handler.Process); }