roadie/Roadie.Api.Library/SearchEngines/MetaData/MetaDataProviderBase.cs
2019-07-03 11:21:29 -05:00

38 lines
No EOL
1.1 KiB
C#

using Microsoft.Extensions.Logging;
using Roadie.Library.Caching;
using Roadie.Library.Configuration;
using System.Net;
namespace Roadie.Library.MetaData
{
public abstract class MetaDataProviderBase
{
protected readonly ICacheManager _cacheManager;
protected readonly IRoadieSettings _configuration;
protected readonly ILogger _logger;
protected IApiKey _apiKey = null;
public virtual bool IsEnabled => true;
protected IApiKey ApiKey => _apiKey;
protected ICacheManager CacheManager => _cacheManager;
protected IRoadieSettings Configuration => _configuration;
protected ILogger Logger => _logger;
public MetaDataProviderBase(IRoadieSettings configuration, ICacheManager cacheManager, ILogger logger)
{
_configuration = configuration;
_cacheManager = cacheManager;
_logger = logger;
ServicePointManager.ServerCertificateValidationCallback += delegate
{
return true; // **** Always accept
};
}
}
}