@@ -1029,21 +1029,21 @@ public void SetJumpList(JumpListCategory[] jumpListCategories)
10291029 /// <returns>This method returns false if your process is the primary instance of
10301030 /// the application and your app should continue loading. And returns true if your
10311031 /// process has sent its parameters to another instance, and you should immediately quit.</returns>
1032- public async Task < bool > MakeSingleInstanceAsync ( Action < string [ ] , string > newInstanceOpened , CancellationToken cancellationToken = default ( CancellationToken ) )
1032+ public async Task < bool > RequestSingleInstanceLockAsync ( Action < string [ ] , string > newInstanceOpened , CancellationToken cancellationToken = default ( CancellationToken ) )
10331033 {
10341034 cancellationToken . ThrowIfCancellationRequested ( ) ;
10351035
10361036 var taskCompletionSource = new TaskCompletionSource < bool > ( ) ;
10371037 using ( cancellationToken . Register ( ( ) => taskCompletionSource . TrySetCanceled ( ) ) )
10381038 {
1039- BridgeConnector . Socket . On ( "appMakeSingleInstanceCompleted " , ( success ) =>
1039+ BridgeConnector . Socket . On ( "appRequestSingleInstanceLockCompleted " , ( success ) =>
10401040 {
1041- BridgeConnector . Socket . Off ( "appMakeSingleInstanceCompleted " ) ;
1041+ BridgeConnector . Socket . Off ( "appRequestSingleInstanceLockCompleted " ) ;
10421042 taskCompletionSource . SetResult ( ( bool ) success ) ;
10431043 } ) ;
10441044
1045- BridgeConnector . Socket . Off ( "newInstanceOpened " ) ;
1046- BridgeConnector . Socket . On ( "newInstanceOpened " , ( result ) =>
1045+ BridgeConnector . Socket . Off ( "secondInstance " ) ;
1046+ BridgeConnector . Socket . On ( "secondInstance " , ( result ) =>
10471047 {
10481048 JArray results = ( JArray ) result ;
10491049 string [ ] args = results . First . ToObject < string [ ] > ( ) ;
@@ -1052,7 +1052,7 @@ public void SetJumpList(JumpListCategory[] jumpListCategories)
10521052 newInstanceOpened ( args , workdirectory ) ;
10531053 } ) ;
10541054
1055- BridgeConnector . Socket . Emit ( "appMakeSingleInstance " ) ;
1055+ BridgeConnector . Socket . Emit ( "appRequestSingleInstanceLock " ) ;
10561056
10571057 return await taskCompletionSource . Task
10581058 . ConfigureAwait ( false ) ;
@@ -1063,9 +1063,9 @@ public void SetJumpList(JumpListCategory[] jumpListCategories)
10631063 /// Releases all locks that were created by makeSingleInstance. This will allow
10641064 /// multiple instances of the application to once again run side by side.
10651065 /// </summary>
1066- public void ReleaseSingleInstance ( )
1066+ public void ReleaseSingleInstanceLock ( )
10671067 {
1068- BridgeConnector . Socket . Emit ( "appReleaseSingleInstance " ) ;
1068+ BridgeConnector . Socket . Emit ( "appReleaseSingleInstanceLock " ) ;
10691069 }
10701070
10711071 /// <summary>
@@ -1155,7 +1155,8 @@ public void SetAppUserModelId(string id)
11551155 /// <summary>
11561156 /// Memory and cpu usage statistics of all the processes associated with the app.
11571157 /// </summary>
1158- /// <returns></returns>
1158+ /// <returns>Array of ProcessMetric objects that correspond to memory and cpu usage
1159+ /// statistics of all the processes associated with the app.</returns>
11591160 public async Task < ProcessMetric [ ] > GetAppMetricsAsync ( CancellationToken cancellationToken = default ( CancellationToken ) )
11601161 {
11611162 cancellationToken . ThrowIfCancellationRequested ( ) ;
0 commit comments