コード例 #1
0
        public Task GameGetSetting([FromForm] GameProviderType type)
        {
            IGameProvider iProvider = GameFactory.GetFactory(type, string.Empty);

            return(this.GetResult(new
            {
                Setting = iProvider == null ? new JsonString("[]") : new JsonString(iProvider.ToSetting())
            }));
        }
コード例 #2
0
ファイル: GameController.cs プロジェクト: haositongxue/avia
        public Task GameSettingInfo([FromForm] int?id)
        {
            GameSetting setting = id == null ? new GameSetting():
                                  (GameSettingAgent.Instance().GetGameSettingInfo(id.Value) ?? new GameSetting());

            IGameProvider iProvider = GameFactory.GetFactory(setting.Type.ToString(), setting.SettingString);

            return(this.GetResult(new
            {
                setting.ID,
                setting.Name,
                setting.Code,
                setting.Type,
                setting.Status,
                setting.MaintainTime,
                setting.Remark,
                Setting = setting.ID == 0 ? new JsonString("[]") : new JsonString(iProvider.ToSetting())
            }));
        }
コード例 #3
0
        public Task GameInfo([FromForm] int?id)
        {
            GameProvider provider = id == null ? new GameProvider()
            {
                Name = "", SettingString = "",
            }
             : (ProviderAgent.Instance().GetGameProviderInfo(id.Value) ?? new GameProvider()
            {
                Name = "", SettingString = "",
            });
            IGameProvider iProvider = GameFactory.GetFactory(provider.Type, provider.SettingString);

            return(this.GetResult(new
            {
                provider.ID,
                provider.Name,
                provider.Type,
                Setting = provider.ID == 0 ? new JsonString("[]"): new JsonString(iProvider.ToSetting())
            }));
        }