Ejemplo n.º 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();
     }
 }
Ejemplo n.º 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();
            }
        }