diff --git a/Tranga/GlobalBase.cs b/Tranga/GlobalBase.cs index 1208f9a..a37fd5e 100644 --- a/Tranga/GlobalBase.cs +++ b/Tranga/GlobalBase.cs @@ -57,6 +57,11 @@ public abstract class GlobalBase File.WriteAllText(settings.notificationConnectorsFilePath, JsonConvert.SerializeObject(notificationConnectors)); } + protected void DeleteNotificationConnector(NotificationConnector.NotificationManagerType notificationManagerType) + { + notificationConnectors.RemoveWhere(nc => nc.notificationManagerType == notificationManagerType); + } + protected void UpdateLibraries() { foreach(LibraryConnector lc in libraryConnectors) @@ -73,6 +78,11 @@ public abstract class GlobalBase File.WriteAllText(settings.libraryConnectorsFilePath, JsonConvert.SerializeObject(libraryConnectors)); } + protected void DeleteLibraryConnector(LibraryConnector.LibraryType libraryType) + { + libraryConnectors.RemoveWhere(lc => lc.libraryType == libraryType); + } + protected bool IsFileInUse(string filePath) { if (!File.Exists(filePath))