当前位置: 首页>>代码示例>>C#>>正文


C# JsonTextReader.ReadInt32Array方法代码示例

本文整理汇总了C#中Newtonsoft.Json.JsonTextReader.ReadInt32Array方法的典型用法代码示例。如果您正苦于以下问题:C# JsonTextReader.ReadInt32Array方法的具体用法?C# JsonTextReader.ReadInt32Array怎么用?C# JsonTextReader.ReadInt32Array使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Newtonsoft.Json.JsonTextReader的用法示例。


在下文中一共展示了JsonTextReader.ReadInt32Array方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: Parse

        public void Parse()
        {
            if (_IsParsed) return;

            var json = Encoding.UTF8.GetString(this.data);
            using (var strReader = new System.IO.StringReader(json)) {
                using (var r = new JsonTextReader(strReader)) {
                    while (r.Read()) {
                        if (r.TokenType == JsonToken.PropertyName) {
                            switch (r.Value.ToString()) {
                                case "region":
                                    ParseRegions(r);
                                    break;
                                case "nonpop":
                                    _NonPops = r.ReadInt32Array();
                                    break;
                                case "item":
                                    _Items = r.ReadInt32Array();
                                    break;
                                case "instance_contents":
                                    _InstanceContents = r.ReadInt32Array();
                                    break;
                                default:
                                    Console.Error.WriteLine("Unknown 'BNpcName' data key: {0}", r.Value);
                                    throw new NotSupportedException();
                            }
                        }
                    }
                }
            }

            _IsParsed = true;
        }
开发者ID:KevinAllenWiegand,项目名称:SaintCoinach,代码行数:33,代码来源:BNpcName.Parse.cs

示例2: Parse

        public void Parse()
        {
            if (_IsParsed)
                return;

            var json = Encoding.UTF8.GetString(this.data);
            using (var strReader = new System.IO.StringReader(json)) {
                using (var r = new JsonTextReader(strReader)) {
                    while (r.Read()) {
                        if (r.TokenType == JsonToken.PropertyName) {
                            switch (r.Value.ToString()) {
                                case "client_quest":
                                    _AsQuestClient = r.ReadInt32Array();
                                    break;
                                case "coordinate":
                                    ParseCoordinate(r);
                                    break;
                                case "quest":
                                    _Quests = r.ReadInt32Array();
                                    break;
                                case "shop":
                                    ParseShops(r);
                                    break;
                                default:
                                    Console.Error.WriteLine("Unknown 'ENpcResident' data key: {0}", r.Value);
                                    throw new NotSupportedException();
                            }
                        }
                    }
                }
            }

            _IsParsed = true;
        }
开发者ID:viion,项目名称:SaintCoinach,代码行数:34,代码来源:ENpcResident.Parse.cs

示例3: Parse

        public void Parse()
        {
            if (_IsParsed) return;

            var json = Encoding.UTF8.GetString(this.data);
            using (var strReader = new System.IO.StringReader(json)) {
                using (var r = new JsonTextReader(strReader)) {
                    while (r.Read()) {
                        if (r.TokenType == JsonToken.PropertyName) {
                            switch (r.Value.ToString()) {
                                #region Boolean
                                case "OnlyOne":
                                    _OnlyOne = r.ReadInt32() != 0;
                                    break;
                                case "DisablePassedOthers":
                                    _DisablePassedOthers = r.ReadInt32() != 0;
                                    break;
                                case "Crest":
                                    _Crest = r.ReadInt32() != 0;
                                    break;
                                #endregion

                                #region Int64[]
                                case "bnpc":
                                    _BNpcs = r.ReadInt64Array();
                                    break;
                                #endregion

                                #region Int32[]
                                case "shopnpc":
                                    _ShopENpcs = r.ReadInt32Array();
                                    break;
                                case "instance_content":
                                    _InstanceContents = r.ReadInt32Array();
                                    break;
                                case "recipe":
                                    _Recipes = r.ReadInt32Array();
                                    break;
                                case "quest":
                                    _Quests = r.ReadInt32Array();
                                    break;
                                case "classjob":
                                    _ClassJobs = r.ReadInt32Array();
                                    break;
                                case "achievement":
                                    _Achievements = r.ReadInt32Array();
                                    break;
                                #endregion

                                #region Int32
                                case "sell_price":
                                    _SellPrice = r.ReadInt32();
                                    break;
                                case "Repair":
                                    _RepairClassJob = r.ReadInt32();
                                    break;
                                case "RepairItem":
                                    _RepairItem = r.ReadInt32();
                                    break;
                                case "repair_price":
                                    _RepairPrice = r.ReadInt32();
                                    break;
                                case "MateriaSocket":
                                    _MateriaSocket = r.ReadInt32();
                                    break;
                                case "MaterializeType":
                                    _MaterializeType = r.ReadInt32();
                                    break;
                                case "Stain":
                                    _Stain = r.ReadInt32();
                                    break;
                                case "CondClassJob":
                                    _CondClassJob = r.ReadInt32();
                                    break;
                                case "Series":
                                    _Series = r.ReadInt32();
                                    break;
                                case "RecastTime":
                                    _RecastTime = r.ReadInt32();
                                    break;
                                #endregion

                                #region Obj
                                case "basic_param":
                                    _BasicParams = ParseBasicParam(r);
                                    break;
                                case "basic_param_hq":
                                    _BasicParamsHq = ParseBasicParam(r);
                                    break;
                                case "action":
                                    _Actions = ParseActions(r);
                                    break;
                                case "action_hq":
                                    _ActionsHq = ParseActions(r);
                                    break;
                                case "bonus":
                                    _Bonuses = ParseBonuses(r);
                                    break;
                                case "bonus_hq":
                                    _BonusesHq = ParseBonuses(r);
//.........这里部分代码省略.........
开发者ID:KevinAllenWiegand,项目名称:SaintCoinach,代码行数:101,代码来源:Item.Parse.cs


注:本文中的Newtonsoft.Json.JsonTextReader.ReadInt32Array方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。