public SnackService(ILoggerFactory loggerFactory, IConfigurationRoot configurationRoot, VotingService votingService) { this.Logger = loggerFactory.CreateLogger("Nerdy.Services.Snacks"); this.VotingService = votingService; this.Configuration = configurationRoot; }
public SnaAPIService(ILoggerFactory loggerFactory, IConfigurationRoot configurationRoot, VotingService votingService) : base(loggerFactory, configurationRoot, votingService) { this.Logger = loggerFactory.CreateLogger("Nerdy.Services.SnaAPI"); this.inMemorySnacks = new List <Snack>(); this.api_auth_key = this.Configuration.GetValue("NerdyApi:Key", api_auth_key); this.api_base_url = this.Configuration.GetValue("NerdyApi:Url", api_base_url); this.Logger.LogDebug("API Key: " + api_auth_key); this.Logger.LogDebug("API Url: " + api_base_url); }