GSF.ServiceProcess.ServiceHelper.UpdateStatus C# (CSharp) Method

UpdateStatus() private method

private UpdateStatus ( System.Guid client, UpdateType type, bool publishToLog, string message ) : void
client System.Guid
type UpdateType
publishToLog bool
message string
return void
        public void UpdateStatus(Guid client, UpdateType type, bool publishToLog, string message, params object[] args)
        {
            string formattedMessage = string.Format(message, args);

            if (publishToLog)
            {
                switch (type)
                {
                    case UpdateType.Information:
                        s_logStatusInfo.Publish(formattedMessage, client.ToString());
                        break;
                    case UpdateType.Warning:
                        s_logStatusWarning.Publish(formattedMessage, client.ToString());
                        break;
                    case UpdateType.Alarm:
                        s_logStatusAlarm.Publish(formattedMessage, client.ToString());
                        break;
                    default:
                        throw new ArgumentOutOfRangeException(nameof(type), type, null);
                }
            }

            const int HighPriority = 2;
            const int LowPriority = 1;
            StatusUpdate update;

            if (m_suppressUpdates)
                return;

            update = new StatusUpdate(client, type, formattedMessage);

            if (client != Guid.Empty)
                m_statusUpdateThread.Push(HighPriority, () => PrioritizeStatusUpdate(update));
            else
                m_statusUpdateThread.Push(LowPriority, () => QueueStatusUpdate(update));
        }

Same methods

ServiceHelper::UpdateStatus ( System.Guid client, UpdateType type, string message ) : void
ServiceHelper::UpdateStatus ( UpdateType type, bool publishToLog, string message ) : void
ServiceHelper::UpdateStatus ( UpdateType type, string message ) : void
ServiceHelper