Пример #1
0
 public DataAccess()
 {
     #region AppSettings
     if (DataEx.xml_SettingsExists)
     {
         appSettings = DataEx.getInstanceFromXml <AppSettings>();
     }
     else
     {
         appSettings = new AppSettings();
         appSettings.saveInstance();
     }
     #endregion
 }
Пример #2
0
 public DataAccess()
 {
     log.Info("Setting up DataAccess.");
     #region AppSettings
     if (DataEx.xml_SettingsExists)
     {
         log.Info("Reading from local AppSettings.");
         appSettings = DataEx.getInstanceFromXml <AppSettings>();
         if (appSettings == default(AppSettings))
         {
             log.Warn("Instance is null! Creating new.");
             appSettings = new AppSettings();
             appSettings.saveInstance();
         }
     }
     else
     {
         log.Warn("AppSettings doesn't exist! Creating new.");
         appSettings = new AppSettings();
         appSettings.saveInstance();
     }
     executablesManage();
     #endregion
 }