@@ -30,20 +30,20 @@ public bool AutoDownload
30
30
taskCompletionSource . SetResult ( ( bool ) result ) ;
31
31
} ) ;
32
32
33
- BridgeConnector . Socket . Emit ( "autoUpdater-autoDownload-get" ) ;
33
+ _ = BridgeConnector . Socket . Emit ( "autoUpdater-autoDownload-get" ) ;
34
34
35
35
return taskCompletionSource . Task ;
36
36
} ) . Result ;
37
37
}
38
38
set
39
39
{
40
- BridgeConnector . Socket . Emit ( "autoUpdater-autoDownload-set" , value ) ;
40
+ _ = BridgeConnector . Socket . Emit ( "autoUpdater-autoDownload-set" , value ) ;
41
41
}
42
42
}
43
43
44
44
/// <summary>
45
45
/// Whether to automatically install a downloaded update on app quit (if `QuitAndInstall` was not called before).
46
- ///
46
+ ///
47
47
/// Applicable only on Windows and Linux.
48
48
/// </summary>
49
49
public bool AutoInstallOnAppQuit
@@ -60,21 +60,21 @@ public bool AutoInstallOnAppQuit
60
60
taskCompletionSource . SetResult ( ( bool ) result ) ;
61
61
} ) ;
62
62
63
- BridgeConnector . Socket . Emit ( "autoUpdater-autoInstallOnAppQuit-get" ) ;
63
+ _ = BridgeConnector . Socket . Emit ( "autoUpdater-autoInstallOnAppQuit-get" ) ;
64
64
65
65
return taskCompletionSource . Task ;
66
66
} ) . Result ;
67
67
}
68
68
set
69
69
{
70
- BridgeConnector . Socket . Emit ( "autoUpdater-autoInstallOnAppQuit-set" , value ) ;
70
+ _ = BridgeConnector . Socket . Emit ( "autoUpdater-autoInstallOnAppQuit-set" , value ) ;
71
71
}
72
72
}
73
73
74
74
/// <summary>
75
- /// *GitHub provider only.* Whether to allow update to pre-release versions.
75
+ /// *GitHub provider only.* Whether to allow update to pre-release versions.
76
76
/// Defaults to "true" if application version contains prerelease components (e.g. "0.12.1-alpha.1", here "alpha" is a prerelease component), otherwise "false".
77
- ///
77
+ ///
78
78
/// If "true", downgrade will be allowed("allowDowngrade" will be set to "true").
79
79
/// </summary>
80
80
public bool AllowPrerelease
@@ -91,19 +91,19 @@ public bool AllowPrerelease
91
91
taskCompletionSource . SetResult ( ( bool ) result ) ;
92
92
} ) ;
93
93
94
- BridgeConnector . Socket . Emit ( "autoUpdater-allowPrerelease-get" ) ;
94
+ _ = BridgeConnector . Socket . Emit ( "autoUpdater-allowPrerelease-get" ) ;
95
95
96
96
return taskCompletionSource . Task ;
97
97
} ) . Result ;
98
98
}
99
99
set
100
100
{
101
- BridgeConnector . Socket . Emit ( "autoUpdater-allowPrerelease-set" , value ) ;
101
+ _ = BridgeConnector . Socket . Emit ( "autoUpdater-allowPrerelease-set" , value ) ;
102
102
}
103
103
}
104
104
105
105
/// <summary>
106
- /// *GitHub provider only.*
106
+ /// *GitHub provider only.*
107
107
/// Get all release notes (from current version to latest), not just the latest (Default is false).
108
108
/// </summary>
109
109
public bool FullChangelog
@@ -120,14 +120,14 @@ public bool FullChangelog
120
120
taskCompletionSource . SetResult ( ( bool ) result ) ;
121
121
} ) ;
122
122
123
- BridgeConnector . Socket . Emit ( "autoUpdater-fullChangelog-get" ) ;
123
+ _ = BridgeConnector . Socket . Emit ( "autoUpdater-fullChangelog-get" ) ;
124
124
125
125
return taskCompletionSource . Task ;
126
126
} ) . Result ;
127
127
}
128
128
set
129
129
{
130
- BridgeConnector . Socket . Emit ( "autoUpdater-fullChangelog-set" , value ) ;
130
+ _ = BridgeConnector . Socket . Emit ( "autoUpdater-fullChangelog-set" , value ) ;
131
131
}
132
132
}
133
133
@@ -150,14 +150,14 @@ public bool AllowDowngrade
150
150
taskCompletionSource . SetResult ( ( bool ) result ) ;
151
151
} ) ;
152
152
153
- BridgeConnector . Socket . Emit ( "autoUpdater-allowDowngrade-get" ) ;
153
+ _ = BridgeConnector . Socket . Emit ( "autoUpdater-allowDowngrade-get" ) ;
154
154
155
155
return taskCompletionSource . Task ;
156
156
} ) . Result ;
157
157
}
158
158
set
159
159
{
160
- BridgeConnector . Socket . Emit ( "autoUpdater-allowDowngrade-set" , value ) ;
160
+ _ = BridgeConnector . Socket . Emit ( "autoUpdater-allowDowngrade-set" , value ) ;
161
161
}
162
162
}
163
163
@@ -178,7 +178,7 @@ public string UpdateConfigPath
178
178
taskCompletionSource . SetResult ( result . ToString ( ) ) ;
179
179
} ) ;
180
180
181
- BridgeConnector . Socket . Emit ( "autoUpdater-updateConfigPath-get" ) ;
181
+ _ = BridgeConnector . Socket . Emit ( "autoUpdater-updateConfigPath-get" ) ;
182
182
183
183
return taskCompletionSource . Task ;
184
184
} ) . Result ;
@@ -202,15 +202,15 @@ public Task<SemVer> CurrentVersionAsync
202
202
SemVer version = ( ( JObject ) result ) . ToObject < SemVer > ( ) ;
203
203
taskCompletionSource . SetResult ( version ) ;
204
204
} ) ;
205
- BridgeConnector . Socket . Emit ( "autoUpdater-currentVersion-get" ) ;
205
+ _ = BridgeConnector . Socket . Emit ( "autoUpdater-currentVersion-get" ) ;
206
206
207
207
return taskCompletionSource . Task ;
208
208
} ) ;
209
209
}
210
210
}
211
211
212
212
/// <summary>
213
- /// Get the update channel. Not applicable for GitHub.
213
+ /// Get the update channel. Not applicable for GitHub.
214
214
/// Doesn’t return channel from the update configuration, only if was previously set.
215
215
/// </summary>
216
216
[ Obsolete ( "Use the asynchronous version ChannelAsync instead" ) ]
@@ -223,7 +223,7 @@ public string Channel
223
223
}
224
224
225
225
/// <summary>
226
- /// Get the update channel. Not applicable for GitHub.
226
+ /// Get the update channel. Not applicable for GitHub.
227
227
/// Doesn’t return channel from the update configuration, only if was previously set.
228
228
/// </summary>
229
229
public Task < string > ChannelAsync
@@ -239,7 +239,7 @@ public Task<string> ChannelAsync
239
239
BridgeConnector . Socket . Off ( "autoUpdater-channel-get-reply" ) ;
240
240
taskCompletionSource . SetResult ( result . ToString ( ) ) ;
241
241
} ) ;
242
- BridgeConnector . Socket . Emit ( "autoUpdater-channel-get" ) ;
242
+ _ = BridgeConnector . Socket . Emit ( "autoUpdater-channel-get" ) ;
243
243
244
244
return taskCompletionSource . Task ;
245
245
} ) ;
@@ -264,7 +264,7 @@ public Task<Dictionary<string, string>> RequestHeadersAsync
264
264
Dictionary < string , string > result = ( ( JObject ) headers ) . ToObject < Dictionary < string , string > > ( ) ;
265
265
taskCompletionSource . SetResult ( result ) ;
266
266
} ) ;
267
- BridgeConnector . Socket . Emit ( "autoUpdater-requestHeaders-get" ) ;
267
+ _ = BridgeConnector . Socket . Emit ( "autoUpdater-requestHeaders-get" ) ;
268
268
return taskCompletionSource . Task ;
269
269
} ) ;
270
270
}
@@ -277,7 +277,7 @@ public Dictionary<string, string> RequestHeaders
277
277
{
278
278
set
279
279
{
280
- BridgeConnector . Socket . Emit ( "autoUpdater-requestHeaders-set" , JObject . FromObject ( value , _jsonSerializer ) ) ;
280
+ _ = BridgeConnector . Socket . Emit ( "autoUpdater-requestHeaders-set" , JObject . FromObject ( value , _jsonSerializer ) ) ;
281
281
}
282
282
}
283
283
@@ -295,7 +295,7 @@ public event Action<string> OnError
295
295
_error ( message . ToString ( ) ) ;
296
296
} ) ;
297
297
298
- BridgeConnector . Socket . Emit ( "register-autoUpdater-error-event" , GetHashCode ( ) ) ;
298
+ _ = BridgeConnector . Socket . Emit ( "register-autoUpdater-error-event" , GetHashCode ( ) ) ;
299
299
}
300
300
_error += value ;
301
301
}
@@ -324,7 +324,7 @@ public event Action OnCheckingForUpdate
324
324
_checkingForUpdate ( ) ;
325
325
} ) ;
326
326
327
- BridgeConnector . Socket . Emit ( "register-autoUpdater-checking-for-update-event" , GetHashCode ( ) ) ;
327
+ _ = BridgeConnector . Socket . Emit ( "register-autoUpdater-checking-for-update-event" , GetHashCode ( ) ) ;
328
328
}
329
329
_checkingForUpdate += value ;
330
330
}
@@ -340,7 +340,7 @@ public event Action OnCheckingForUpdate
340
340
private event Action _checkingForUpdate ;
341
341
342
342
/// <summary>
343
- /// Emitted when there is an available update.
343
+ /// Emitted when there is an available update.
344
344
/// The update is downloaded automatically if AutoDownload is true.
345
345
/// </summary>
346
346
public event Action < UpdateInfo > OnUpdateAvailable
@@ -354,7 +354,7 @@ public event Action<UpdateInfo> OnUpdateAvailable
354
354
_updateAvailable ( JObject . Parse ( updateInfo . ToString ( ) ) . ToObject < UpdateInfo > ( ) ) ;
355
355
} ) ;
356
356
357
- BridgeConnector . Socket . Emit ( "register-autoUpdater-update-available-event" , GetHashCode ( ) ) ;
357
+ _ = BridgeConnector . Socket . Emit ( "register-autoUpdater-update-available-event" , GetHashCode ( ) ) ;
358
358
}
359
359
_updateAvailable += value ;
360
360
}
@@ -383,7 +383,7 @@ public event Action<UpdateInfo> OnUpdateNotAvailable
383
383
_updateNotAvailable ( JObject . Parse ( updateInfo . ToString ( ) ) . ToObject < UpdateInfo > ( ) ) ;
384
384
} ) ;
385
385
386
- BridgeConnector . Socket . Emit ( "register-autoUpdater-update-not-available-event" , GetHashCode ( ) ) ;
386
+ _ = BridgeConnector . Socket . Emit ( "register-autoUpdater-update-not-available-event" , GetHashCode ( ) ) ;
387
387
}
388
388
_updateNotAvailable += value ;
389
389
}
@@ -412,7 +412,7 @@ public event Action<ProgressInfo> OnDownloadProgress
412
412
_downloadProgress ( JObject . Parse ( progressInfo . ToString ( ) ) . ToObject < ProgressInfo > ( ) ) ;
413
413
} ) ;
414
414
415
- BridgeConnector . Socket . Emit ( "register-autoUpdater-download-progress-event" , GetHashCode ( ) ) ;
415
+ _ = BridgeConnector . Socket . Emit ( "register-autoUpdater-download-progress-event" , GetHashCode ( ) ) ;
416
416
}
417
417
_downloadProgress += value ;
418
418
}
@@ -441,7 +441,7 @@ public event Action<UpdateInfo> OnUpdateDownloaded
441
441
_updateDownloaded ( JObject . Parse ( updateInfo . ToString ( ) ) . ToObject < UpdateInfo > ( ) ) ;
442
442
} ) ;
443
443
444
- BridgeConnector . Socket . Emit ( "register-autoUpdater-update-downloaded-event" , GetHashCode ( ) ) ;
444
+ _ = BridgeConnector . Socket . Emit ( "register-autoUpdater-update-downloaded-event" , GetHashCode ( ) ) ;
445
445
}
446
446
_updateDownloaded += value ;
447
447
}
@@ -512,14 +512,14 @@ public Task<UpdateCheckResult> CheckForUpdatesAsync()
512
512
taskCompletionSource . SetException ( new Exception ( message ) ) ;
513
513
} ) ;
514
514
515
- BridgeConnector . Socket . Emit ( "autoUpdaterCheckForUpdates" , guid ) ;
515
+ _ = BridgeConnector . Socket . Emit ( "autoUpdaterCheckForUpdates" , guid ) ;
516
516
517
517
return taskCompletionSource . Task ;
518
518
}
519
519
520
520
/// <summary>
521
521
/// Asks the server whether there is an update.
522
- ///
522
+ ///
523
523
/// This will immediately download an update, then install when the app quits.
524
524
/// </summary>
525
525
/// <returns></returns>
@@ -554,23 +554,23 @@ public Task<UpdateCheckResult> CheckForUpdatesAndNotifyAsync()
554
554
taskCompletionSource . SetException ( new Exception ( message ) ) ;
555
555
} ) ;
556
556
557
- BridgeConnector . Socket . Emit ( "autoUpdaterCheckForUpdatesAndNotify" , guid ) ;
557
+ _ = BridgeConnector . Socket . Emit ( "autoUpdaterCheckForUpdatesAndNotify" , guid ) ;
558
558
559
559
return taskCompletionSource . Task ;
560
560
}
561
561
562
562
/// <summary>
563
563
/// Restarts the app and installs the update after it has been downloaded.
564
564
/// It should only be called after `update-downloaded` has been emitted.
565
- ///
565
+ ///
566
566
/// Note: QuitAndInstall() will close all application windows first and only emit `before-quit` event on `app` after that.
567
567
/// This is different from the normal quit event sequence.
568
568
/// </summary>
569
569
/// <param name="isSilent">*windows-only* Runs the installer in silent mode. Defaults to `false`.</param>
570
570
/// <param name="isForceRunAfter">Run the app after finish even on silent install. Not applicable for macOS. Ignored if `isSilent` is set to `false`.</param>
571
571
public void QuitAndInstall ( bool isSilent = false , bool isForceRunAfter = false )
572
572
{
573
- BridgeConnector . Socket . Emit ( "autoUpdaterQuitAndInstall" , isSilent , isForceRunAfter ) ;
573
+ _ = BridgeConnector . Socket . Emit ( "autoUpdaterQuitAndInstall" , isSilent , isForceRunAfter ) ;
574
574
}
575
575
576
576
/// <summary>
@@ -588,7 +588,7 @@ public Task<string> DownloadUpdateAsync()
588
588
taskCompletionSource . SetResult ( downloadedPath . ToString ( ) ) ;
589
589
} ) ;
590
590
591
- BridgeConnector . Socket . Emit ( "autoUpdaterDownloadUpdate" , guid ) ;
591
+ _ = BridgeConnector . Socket . Emit ( "autoUpdaterDownloadUpdate" , guid ) ;
592
592
593
593
return taskCompletionSource . Task ;
594
594
}
@@ -608,7 +608,7 @@ public Task<string> GetFeedURLAsync()
608
608
taskCompletionSource . SetResult ( downloadedPath . ToString ( ) ) ;
609
609
} ) ;
610
610
611
- BridgeConnector . Socket . Emit ( "autoUpdaterGetFeedURL" , guid ) ;
611
+ _ = BridgeConnector . Socket . Emit ( "autoUpdaterGetFeedURL" , guid ) ;
612
612
613
613
return taskCompletionSource . Task ;
614
614
}
0 commit comments