refactor: rename BaseConfiguration to ServiceConfiguration

recyclarr
Robert Dailey 4 years ago
parent 20c155e606
commit 420635d781

@ -11,7 +11,7 @@ using YamlDotNet.Serialization.NamingConventions;
namespace Trash.Config
{
public class ConfigurationLoader<T> : IConfigurationLoader<T>
where T : BaseConfiguration
where T : ServiceConfiguration
{
private readonly IConfigurationProvider<T> _configProvider;
private readonly IDeserializer _deserializer;

@ -1,7 +1,7 @@
namespace Trash.Config
{
internal class ConfigurationProvider<T> : IConfigurationProvider<T>
where T : BaseConfiguration
where T : ServiceConfiguration
{
public T? ActiveConfiguration { get; set; }
}

@ -4,7 +4,7 @@ using System.IO;
namespace Trash.Config
{
public interface IConfigurationLoader<out T>
where T : BaseConfiguration
where T : ServiceConfiguration
{
IEnumerable<T> Load(string propertyName, string configSection);
IEnumerable<T> LoadFromStream(TextReader stream, string configSection);

@ -1,7 +1,7 @@
namespace Trash.Config
{
public interface IConfigurationProvider<T>
where T : BaseConfiguration
where T : ServiceConfiguration
{
T? ActiveConfiguration { get; set; }
}

@ -1,6 +1,6 @@
namespace Trash.Config
{
public abstract class BaseConfiguration
public abstract class ServiceConfiguration
{
public string BaseUrl { get; init; } = "";
public string ApiKey { get; init; } = "";

@ -6,7 +6,7 @@ using Trash.Radarr.QualityDefinition;
namespace Trash.Radarr
{
[UsedImplicitly(ImplicitUseTargetFlags.WithMembers)]
public class RadarrConfiguration : BaseConfiguration
public class RadarrConfiguration : ServiceConfiguration
{
public QualityDefinitionConfig? QualityDefinition { get; init; }

@ -8,7 +8,7 @@ using Trash.Sonarr.ReleaseProfile;
namespace Trash.Sonarr
{
[UsedImplicitly(ImplicitUseTargetFlags.WithMembers)]
public class SonarrConfiguration : BaseConfiguration
public class SonarrConfiguration : ServiceConfiguration
{
public IList<ReleaseProfileConfig> ReleaseProfiles { get; set; } = new List<ReleaseProfileConfig>();
public SonarrQualityDefinitionType? QualityDefinition { get; init; }

Loading…
Cancel
Save