12345678910111213141516171819202122232425262728293031323334353637383940414243 |
-
- using System;
- using Update.Config;
- namespace Update
- {
-
-
-
- public class Const
- {
- public static string URL => ConfigUtils.GetAppSettingsConfig(nameof(Const.URL));
- public static string Key => ConfigUtils.GetAppSettingsConfig(nameof(Const.Key));
-
- public static readonly string RevitServiceId = ConfigUtils.GetAppSettingsConfig(nameof(Const.RevitServiceId));
- public static readonly string RevitServiceSecret = ConfigUtils.GetAppSettingsConfig(nameof(Const.RevitServiceSecret));
-
- public static readonly bool IsAutoUpdate= ConvertToBoolean(ConfigUtils.GetAppSettingsConfig(nameof(Const.IsAutoUpdate)));
- private static bool ConvertToBoolean(string key)
- {
- bool result = false;
- try
- {
- result= Convert.ToBoolean(key);
- }
- catch (Exception e)
- {
- Console.WriteLine(e);
- }
- return result;
- }
- }
- }
|