public ClientService(IHostingHelper hostingHelper, IStringHelper stringHelper, IAppSettingsHelper appSettingsHelper) { this.appSettingsHelper = appSettingsHelper; this.stringHelper = stringHelper; validationItems = new Dictionary <string, List <ValidationItem> >(); pathToFile = hostingHelper.GetRootPath("App_Data\\clients.json"); using (TextReader reader = new StreamReader(pathToFile, Encoding.UTF8)) { clientItems = JsonConvert.DeserializeObject <Dictionary <string, ClientItem> >(reader.ReadToEnd()); } }
public FrameworkService(IHostingHelper hostingHelper, IAppSettingsHelper appSettingsHelper) { this.hostingHelper = hostingHelper; this.appSettingsHelper = appSettingsHelper; }