housekeeping

This commit is contained in:
2023-10-04 22:09:33 +02:00
parent d89af7cc5b
commit 7972f07801
12 changed files with 30 additions and 37 deletions

View File

@ -6,12 +6,12 @@ namespace Tranga.MangaConnectors;
public class MangaConnectorJsonConverter : JsonConverter
{
private GlobalBase _clone;
private HashSet<MangaConnector> connectors;
private readonly HashSet<MangaConnector> _connectors;
internal MangaConnectorJsonConverter(GlobalBase clone, HashSet<MangaConnector> connectors)
{
this._clone = clone;
this.connectors = connectors;
this._connectors = connectors;
}
public override bool CanConvert(Type objectType)
@ -25,15 +25,15 @@ public class MangaConnectorJsonConverter : JsonConverter
switch (jo.GetValue("name")!.Value<string>()!)
{
case "MangaDex":
return this.connectors.First(c => c is MangaDex);
return this._connectors.First(c => c is MangaDex);
case "Manganato":
return this.connectors.First(c => c is Manganato);
return this._connectors.First(c => c is Manganato);
case "MangaKatana":
return this.connectors.First(c => c is MangaKatana);
return this._connectors.First(c => c is MangaKatana);
case "Mangasee":
return this.connectors.First(c => c is Mangasee);
return this._connectors.First(c => c is Mangasee);
case "Mangaworld":
return this.connectors.First(c => c is Mangaworld);
return this._connectors.First(c => c is Mangaworld);
}
throw new Exception();