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
621621 /// Provides notification of when status messages were sent to consumer(s).
622622 /// </summary>
623623 /// <remarks>
624− /// <see cref="EventArgs{T1,T2}.Argument1"/> is the status message sent to consumer(s).<br/>
625− /// <see cref="EventArgs{T1,T2}.Argument2"/> is the message <see cref="UpdateType"/>.
624+ /// <see cref="EventArgs{T1,T2,T3}.Argument1"/> is the ID of the consumer(s).<br/>
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"/>.
626627 /// </remarks>
627628 [Category("Notification"),
628629 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;
630631
631632 /// <summary>
632633 /// Provides notification of when there is an exception logged.
@@ -1716,7 +1717,7 @@ namespace GSF.ServiceProcess · 1083 unmodified lines
17161717 // Send response to service
17171718 SendResponse(requestInfo.Sender.ClientID, response);
17181719
1719− OnUpdatedStatus(response.Message, success ? UpdateType.Information : UpdateType.Alarm);
1720+ OnUpdatedStatus(requestInfo.Sender.ClientID, response.Message, success ? UpdateType.Information : UpdateType.Alarm);
17201721 }
17211722 catch (Exception ex)
17221723 {
@@ -2128,15 +2129,16 @@ namespace GSF.ServiceProcess · 405 unmodified lines
21282129 /// <summary>
21292130 /// Raises the <see cref="UpdatedStatus"/> event with the updated status message.
21302131 /// </summary>
2132+ /// <param name="clientID">ID of the client receiving the message.</param>
21312133 /// <param name="status">Updated status message.</param>
21322134 /// <param name="type"><see cref="UpdateType"/> of status message.</param>
21332135 /// <remarks>
21342136 /// This overload combines string.Format and SendStatusMessage for convenience.
21352137 /// </remarks>
2136− protected virtual void OnUpdatedStatus(string status, UpdateType type)
2138+ protected virtual void OnUpdatedStatus(Guid clientID, string status, UpdateType type)
21372139 {
21382140 if ((object)UpdatedStatus != null)
2139− UpdatedStatus(this, new EventArgs<string, UpdateType>(status, type));
2141+ UpdatedStatus(this, new EventArgs<Guid, string, UpdateType>(clientID, status, type));
21402142 }
21412143
21422144 /// <summary>
@@ -2390,7 +2392,7 @@ namespace GSF.ServiceProcess · 247 unmodified lines
23902392 response.Message = CurtailMessageLength(responseMessage);
23912393 SendResponse(clientID, response);
23922394
2393− OnUpdatedStatus(response.Message, type);
2395+ OnUpdatedStatus(clientID, response.Message, type);
23942396 }
23952397
23962398 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