@@ -300,14 +300,14 @@ where string.Compare(existingPlugin.Metadata.Version, pluginUpdateSource.Version
300
300
0 // if current version precedes version of the plugin from update source (e.g. PluginsManifest)
301
301
&& ! API . PluginModified ( existingPlugin . Metadata . ID )
302
302
select
303
- new
303
+ new PluginUpdateInfo ( )
304
304
{
305
- existingPlugin . Metadata . ID ,
306
- pluginUpdateSource . Name ,
307
- pluginUpdateSource . Author ,
305
+ ID = existingPlugin . Metadata . ID ,
306
+ Name = existingPlugin . Metadata . Name ,
307
+ Author = existingPlugin . Metadata . Author ,
308
308
CurrentVersion = existingPlugin . Metadata . Version ,
309
309
NewVersion = pluginUpdateSource . Version ,
310
- existingPlugin . Metadata . IcoPath ,
310
+ IcoPath = existingPlugin . Metadata . IcoPath ,
311
311
PluginExistingMetadata = existingPlugin . Metadata ,
312
312
PluginNewUserPlugin = pluginUpdateSource
313
313
} ) . ToList ( ) ;
@@ -339,7 +339,7 @@ where string.Compare(existingPlugin.Metadata.Version, pluginUpdateSource.Version
339
339
string . Join ( ", " , resultsForUpdate . Select ( x => x . PluginExistingMetadata . Name ) ) ) ;
340
340
}
341
341
342
- private static void UpdateAllPlugins ( IEnumerable < dynamic > resultsForUpdate )
342
+ private static void UpdateAllPlugins ( IEnumerable < PluginUpdateInfo > resultsForUpdate )
343
343
{
344
344
_ = Task . WhenAll ( resultsForUpdate . Select ( async plugin =>
345
345
{
@@ -445,4 +445,16 @@ private static bool InstallSourceKnown(string url)
445
445
x . Metadata . Website . StartsWith ( constructedUrlPart )
446
446
) ;
447
447
}
448
+
449
+ private record PluginUpdateInfo
450
+ {
451
+ public string ID { get ; init ; }
452
+ public string Name { get ; init ; }
453
+ public string Author { get ; init ; }
454
+ public string CurrentVersion { get ; init ; }
455
+ public string NewVersion { get ; init ; }
456
+ public string IcoPath { get ; init ; }
457
+ public PluginMetadata PluginExistingMetadata { get ; init ; }
458
+ public UserPlugin PluginNewUserPlugin { get ; init ; }
459
+ }
448
460
}
0 commit comments