History

GSF.ServiceProcess: Added client ID to the event args of the UpdatedStatus event in ServiceHelper.

StephenCWills committed 10 years ago

Commit 8d650e51 parent 3764fc03 files · +15 −13Browse files

Showing the changes to Source/Libraries/GSF.ServiceProcess (1 of 3 files). Show all

Unified · Split

Source/Libraries/GSF.ServiceProcess/ServiceHelper.cs+9−7
@@ -621,12 +621,13 @@ namespace GSF.ServiceProcess · 620 unmodified lines
621 /// Provides notification of when status messages were sent to consumer(s).621 /// Provides notification of when status messages were sent to consumer(s).
622 /// </summary>622 /// </summary>
623 /// <remarks>623 /// <remarks>
624 /// <see cref="EventArgs{T1,T2}.Argument1"/> is the status message sent to consumer(s).<br/>624 /// <see cref="EventArgs{T1,T2,T3}.Argument1"/> is the ID of the consumer(s).<br/>
625 /// <see cref="EventArgs{T1,T2}.Argument2"/> is the message <see cref="UpdateType"/>.625 /// <see cref="EventArgs{T1,T2,T3}.Argument2"/> is the status message sent to consumer(s).<br/>
626 /// <see cref="EventArgs{T1,T2,T3}.Argument3"/> is the message <see cref="UpdateType"/>.
626 /// </remarks>627 /// </remarks>
627 [Category("Notification"),628 [Category("Notification"),
628 Description("Occurs when there are status messages sent to consumer(s).")]629 Description("Occurs when there are status messages sent to consumer(s).")]
629 public event EventHandler<EventArgs<string, UpdateType>> UpdatedStatus;630 public event EventHandler<EventArgs<Guid, string, UpdateType>> UpdatedStatus;
630 631
631 /// <summary>632 /// <summary>
632 /// Provides notification of when there is an exception logged.633 /// Provides notification of when there is an exception logged.
@@ -1716,7 +1717,7 @@ namespace GSF.ServiceProcess · 1083 unmodified lines
1716 // Send response to service1717 // Send response to service
1717 SendResponse(requestInfo.Sender.ClientID, response);1718 SendResponse(requestInfo.Sender.ClientID, response);
1718 1719
1719 OnUpdatedStatus(response.Message, success ? UpdateType.Information : UpdateType.Alarm);1720 OnUpdatedStatus(requestInfo.Sender.ClientID, response.Message, success ? UpdateType.Information : UpdateType.Alarm);
1720 }1721 }
1721 catch (Exception ex)1722 catch (Exception ex)
1722 {1723 {
@@ -2128,15 +2129,16 @@ namespace GSF.ServiceProcess · 405 unmodified lines
2128 /// <summary>2129 /// <summary>
2129 /// Raises the <see cref="UpdatedStatus"/> event with the updated status message.2130 /// Raises the <see cref="UpdatedStatus"/> event with the updated status message.
2130 /// </summary>2131 /// </summary>
2132 /// <param name="clientID">ID of the client receiving the message.</param>
2131 /// <param name="status">Updated status message.</param>2133 /// <param name="status">Updated status message.</param>
2132 /// <param name="type"><see cref="UpdateType"/> of status message.</param>2134 /// <param name="type"><see cref="UpdateType"/> of status message.</param>
2133 /// <remarks>2135 /// <remarks>
2134 /// This overload combines string.Format and SendStatusMessage for convenience.2136 /// This overload combines string.Format and SendStatusMessage for convenience.
2135 /// </remarks>2137 /// </remarks>
2136 protected virtual void OnUpdatedStatus(string status, UpdateType type)2138 protected virtual void OnUpdatedStatus(Guid clientID, string status, UpdateType type)
2137 {2139 {
2138 if ((object)UpdatedStatus != null)2140 if ((object)UpdatedStatus != null)
2139 UpdatedStatus(this, new EventArgs<string, UpdateType>(status, type));2141 UpdatedStatus(this, new EventArgs<Guid, string, UpdateType>(clientID, status, type));
2140 }2142 }
2141 2143
2142 /// <summary>2144 /// <summary>
@@ -2390,7 +2392,7 @@ namespace GSF.ServiceProcess · 247 unmodified lines
2390 response.Message = CurtailMessageLength(responseMessage);2392 response.Message = CurtailMessageLength(responseMessage);
2391 SendResponse(clientID, response);2393 SendResponse(clientID, response);
2392 2394
2393 OnUpdatedStatus(response.Message, type);2395 OnUpdatedStatus(clientID, response.Message, type);
2394 }2396 }
2395 2397
2396 private void SendServiceStateChangedResponse(ServiceState currentState)2398 private void SendServiceStateChangedResponse(ServiceState currentState)

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t