SirenOfShame.Lib.Watcher.RulesEngine.InvokeUpdateStatusBar C# (CSharp) Method

InvokeUpdateStatusBar() private method

private InvokeUpdateStatusBar ( string statusText, Exception exception = null ) : void
statusText string
exception System.Exception
return void
        private void InvokeUpdateStatusBar(string statusText, Exception exception = null)
        {
            string datedStatusText = null;
            if (!string.IsNullOrEmpty(statusText))
            {
                datedStatusText = string.Format("{0:G} - {1}", DateTime.Now, statusText);
            }
            var updateStatusBar = UpdateStatusBar;
            if (updateStatusBar == null) return;
            updateStatusBar(this, new UpdateStatusBarEventArgs { StatusText = datedStatusText, Exception = exception });
        }