Rename TBaseObject -> GlobalBase

Remove Notification and Library Connectors from GlobalBase
This commit is contained in:
2023-08-01 18:24:19 +02:00
parent c45e4ddf90
commit e4086a8892
14 changed files with 66 additions and 86 deletions

View File

@ -11,11 +11,11 @@ namespace Tranga.MangaConnectors;
/// Base-Class for all Connectors
/// Provides some methods to be used by all Connectors, as well as a DownloadClient
/// </summary>
public abstract class Connector : TBaseObject
public abstract class Connector : GlobalBase
{
internal DownloadClient downloadClient { get; init; } = null!;
protected Connector(TBaseObject clone) : base(clone)
protected Connector(GlobalBase clone) : base(clone)
{
if (!Directory.Exists(settings.coverImageCache))
Directory.CreateDirectory(settings.coverImageCache);

View File

@ -2,7 +2,7 @@
namespace Tranga.MangaConnectors;
internal class DownloadClient : TBaseObject
internal class DownloadClient : GlobalBase
{
private static readonly HttpClient Client = new()
{
@ -12,7 +12,7 @@ internal class DownloadClient : TBaseObject
private readonly Dictionary<byte, DateTime> _lastExecutedRateLimit;
private readonly Dictionary<byte, TimeSpan> _rateLimit;
public DownloadClient(Dictionary<byte, int> rateLimitRequestsPerMinute, TBaseObject clone) : base(clone)
public DownloadClient(Dictionary<byte, int> rateLimitRequestsPerMinute, GlobalBase clone) : base(clone)
{
_lastExecutedRateLimit = new();
_rateLimit = new();

View File

@ -17,7 +17,7 @@ public class MangaDex : Connector
Author,
}
public MangaDex(TBaseObject clone) : base(clone)
public MangaDex(GlobalBase clone) : base(clone)
{
name = "MangaDex";
this.downloadClient = new DownloadClient(new Dictionary<byte, int>()

View File

@ -9,7 +9,7 @@ public class MangaKatana : Connector
{
public override string name { get; }
public MangaKatana(TBaseObject clone) : base(clone)
public MangaKatana(GlobalBase clone) : base(clone)
{
this.name = "MangaKatana";
this.downloadClient = new DownloadClient(new Dictionary<byte, int>()

View File

@ -9,7 +9,7 @@ public class Manganato : Connector
{
public override string name { get; }
public Manganato(TBaseObject clone) : base(clone)
public Manganato(GlobalBase clone) : base(clone)
{
this.name = "Manganato";
this.downloadClient = new DownloadClient(new Dictionary<byte, int>()

View File

@ -14,7 +14,7 @@ public class Mangasee : Connector
private IBrowser? _browser;
private const string ChromiumVersion = "1154303";
public Mangasee(TBaseObject clone) : base(clone)
public Mangasee(GlobalBase clone) : base(clone)
{
this.name = "Mangasee";
this.downloadClient = new DownloadClient(new Dictionary<byte, int>()