Пример #1
0
        /// <summary>
        /// Ensures the initialized.
        /// </summary>
        private static void EnsureInitialized()
        {
            if (configData != null)
            {
                return;
            }

            if (File.Exists(Properties.ConfigFileName))
            {
                // Read from existing config
                configData = CommonHelper.ReadObject<ConfigData>(Properties.ConfigFileName);
            }
            else
            {
                // Create a new one
                Logger.Warn("{0} not found in {1}. Creating a default one...", Properties.ConfigFileName, Directory.GetCurrentDirectory());

                configData = new ConfigData();
                configData.SetDefault();
            }
        }
Пример #2
0
 public void ConfigDataTest()
 {
     ConfigData data = new ConfigData();
     data.SetDefault();
 }