Exemple #1
0
 public SnackService(ILoggerFactory loggerFactory,
                     IConfigurationRoot configurationRoot, VotingService votingService)
 {
     this.Logger        = loggerFactory.CreateLogger("Nerdy.Services.Snacks");
     this.VotingService = votingService;
     this.Configuration = configurationRoot;
 }
Exemple #2
0
        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);
        }