1
0
Fork 0
mirror of https://github.com/Radarr/Radarr synced 2025-01-01 04:45:35 +00:00
Radarr/NzbDrone.Core/Indexers/IndexerWithSetting.cs

16 lines
445 B
C#
Raw Normal View History

using NzbDrone.Common;
2013-04-10 23:44:48 +00:00
namespace NzbDrone.Core.Indexers
{
public abstract class IndexerWithSetting<TSetting> : IndexerBase where TSetting : class, IIndexerSetting, new()
2013-04-10 23:44:48 +00:00
{
public TSetting Settings { get; private set; }
2013-04-10 23:44:48 +00:00
public TSetting ImportSettingsFromJson(string json)
2013-04-10 23:44:48 +00:00
{
Settings = new JsonSerializer().Deserialize<TSetting>(json) ?? new TSetting();
return Settings;
2013-04-10 23:44:48 +00:00
}
}
}