Пример #1
0
 public HomeController(IConfiguration iConfiguration, ILoggerFactory loggerFactory, ICacheService iService)
 {
     configuration = iConfiguration;
     fileNameJson  = configuration["FileNameJson"];
     fileNameXML   = configuration["FileNameXML"];
     dataType      = configuration["DataType"];
     service       = iService;
     if (dataType == "json")
     {
         JsonParser.CreateIfNotExists(fileNameJson);
     }
     if (dataType == "xml")
     {
         XMLParser.CreateIfNotExists(fileNameXML);
     }
     logger = loggerFactory.CreateLogger("FileLogger");
     cache  = service.GetCache();
 }