mirror of
https://github.com/sphildreth/roadie
synced 2024-11-23 12:43:13 +00:00
38 lines
No EOL
1.1 KiB
C#
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
|
|
};
|
|
}
|
|
}
|
|
} |