示例#1
0
 /// <summary> 加载平台配置文件 </summary>
 /// <param name="type"></param>
 protected void LoadPlatform(PlatformType type)
 {
     if (Config != null)
         return;
     var config = ConfigUtils<PlatformConfig>.Instance.Get();
     if (config != null)
     {
         Callback = config.Callback;
         Config = config.Platforms.FirstOrDefault(t => t.PlatType == type.GetValue())
                  ?? new Platform();
     }
     else
     {
         Config = new Platform();
     }
 }
示例#2
0
        /// <summary> 加载平台配置文件 </summary>
        /// <param name="type"></param>
        protected void LoadPlatform(PlatformType type)
        {
            if (Config != null)
            {
                return;
            }
            var config = ConfigUtils <PlatformConfig> .Instance.Get();

            if (config != null)
            {
                Callback = config.Callback;
                Config   = config.Platforms.FirstOrDefault(t => t.PlatType == type.GetValue())
                           ?? new Platform();
            }
            else
            {
                Config = new Platform();
            }
        }