Added method to delete Library/Notification-Connector
This commit is contained in:
parent
f916cda0f1
commit
a94d3d6b40
@ -57,6 +57,11 @@ public abstract class GlobalBase
|
|||||||
File.WriteAllText(settings.notificationConnectorsFilePath, JsonConvert.SerializeObject(notificationConnectors));
|
File.WriteAllText(settings.notificationConnectorsFilePath, JsonConvert.SerializeObject(notificationConnectors));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected void DeleteNotificationConnector(NotificationConnector.NotificationManagerType notificationManagerType)
|
||||||
|
{
|
||||||
|
notificationConnectors.RemoveWhere(nc => nc.notificationManagerType == notificationManagerType);
|
||||||
|
}
|
||||||
|
|
||||||
protected void UpdateLibraries()
|
protected void UpdateLibraries()
|
||||||
{
|
{
|
||||||
foreach(LibraryConnector lc in libraryConnectors)
|
foreach(LibraryConnector lc in libraryConnectors)
|
||||||
@ -73,6 +78,11 @@ public abstract class GlobalBase
|
|||||||
File.WriteAllText(settings.libraryConnectorsFilePath, JsonConvert.SerializeObject(libraryConnectors));
|
File.WriteAllText(settings.libraryConnectorsFilePath, JsonConvert.SerializeObject(libraryConnectors));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected void DeleteLibraryConnector(LibraryConnector.LibraryType libraryType)
|
||||||
|
{
|
||||||
|
libraryConnectors.RemoveWhere(lc => lc.libraryType == libraryType);
|
||||||
|
}
|
||||||
|
|
||||||
protected bool IsFileInUse(string filePath)
|
protected bool IsFileInUse(string filePath)
|
||||||
{
|
{
|
||||||
if (!File.Exists(filePath))
|
if (!File.Exists(filePath))
|
||||||
|
Loading…
Reference in New Issue
Block a user