Пример #1
0
        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());
            }
        }
Пример #2
0
 public FrameworkService(IHostingHelper hostingHelper, IAppSettingsHelper appSettingsHelper)
 {
     this.hostingHelper     = hostingHelper;
     this.appSettingsHelper = appSettingsHelper;
 }