added playlist loader

registered appconfig as singleton
added config interfaces
This commit is contained in:
2018-12-29 00:38:20 +01:00
parent f37d8d49ea
commit 590c73f834
11 changed files with 128 additions and 26 deletions

View File

@@ -4,12 +4,25 @@ using System.Diagnostics;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.Logging;
using Tv7Playlist.Models;
namespace Tv7Playlist.Controllers
{
public class HomeController : Controller
{
private readonly ILogger<HomeController> _logger;
public HomeController(ILogger<HomeController> logger, IConfiguration configuration)
{
if (configuration == null) throw new ArgumentNullException(nameof(configuration));
_logger = logger ?? throw new ArgumentNullException(nameof(logger));
var appConfig = configuration.Get<AppConfig>();
}
public IActionResult Index()
{
return View();