update mirror list info
This commit is contained in:
parent
84dd270f25
commit
d4776b578a
8
EftPatchHelper/EftPatchHelper/Model/PatchInfo.cs
Normal file
8
EftPatchHelper/EftPatchHelper/Model/PatchInfo.cs
Normal file
@ -0,0 +1,8 @@
|
||||
namespace EftPatchHelper.Model;
|
||||
|
||||
public class PatchInfo
|
||||
{
|
||||
public int SourceClientVersion { get; set; }
|
||||
public int TargetClientVersion { get; set; }
|
||||
public List<DownloadMirror> Mirrors { get; set; }
|
||||
}
|
@ -41,9 +41,14 @@ namespace EftPatchHelper.Tasks
|
||||
|
||||
public bool CreateMirrorList(FileInfo mirrorListFileInfo)
|
||||
{
|
||||
List<DownloadMirror> mirrors = _options.MirrorList.Values.ToList();
|
||||
var mirrorInfo = new PatchInfo
|
||||
{
|
||||
SourceClientVersion = int.Parse(_options.SourceClient.Version),
|
||||
TargetClientVersion = int.Parse(_options.TargetClient.Version),
|
||||
Mirrors = _options.MirrorList.Values.ToList()
|
||||
};
|
||||
|
||||
string json = JsonSerializer.Serialize(mirrors, new JsonSerializerOptions() { WriteIndented = true });
|
||||
string json = JsonSerializer.Serialize(mirrorInfo, new JsonSerializerOptions() { WriteIndented = true });
|
||||
|
||||
File.WriteAllText(mirrorListFileInfo.FullName, json);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user