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


C# SQLiteDataReader.GetInt32Optional方法代码示例

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


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

示例1: SortieConsumptionRecord

        internal SortieConsumptionRecord(SQLiteDataReader rpReader) : base(rpReader)
        {
            ID = rpReader.GetInt64("id");

            var rMapMaxHP = rpReader.GetInt32Optional("map_max_hp");
            if (rMapMaxHP.HasValue)
            {
                var rMapHP = rpReader.GetInt32Optional("map_hp");
                if (rMapHP.HasValue)
                    MapHP = new ClampedValue(rMapMaxHP.Value, rMapHP.Value);
            }

            Fuel = rpReader.GetInt32("fuel");
            Bullet = rpReader.GetInt32("bullet");
            Steel = rpReader.GetInt32("steel");
            Bauxite = rpReader.GetInt32("bauxite");
            Bucket = rpReader.GetInt32("bucket");

            RankingPoint = rpReader.GetDoubleOptional("ranking_point");
        }
开发者ID:amatukaze,项目名称:IntelligentNavalGun,代码行数:20,代码来源:SortieConsumptionRecord.cs

示例2: SortieRecordBase

        public SortieRecordBase(SQLiteDataReader rpReader)
        {
            var rMapID = rpReader.GetInt32("map");
            Map = MapService.Instance.GetMasterInfo(rMapID);

            var rEventMapDifficulty = rpReader.GetInt32Optional("difficulty");
            if (rEventMapDifficulty.HasValue)
            {
                IsEventMap = true;
                EventMapDifficulty = (EventMapDifficulty)rEventMapDifficulty.Value;
            }
        }
开发者ID:amatukaze,项目名称:IntelligentNavalGun,代码行数:12,代码来源:SortieRecordBase.cs

示例3: DevelopmentRecord

        internal DevelopmentRecord(SQLiteDataReader rpReader)
        {
            ID = rpReader.GetInt64("time");

            var rEquipmentID = rpReader.GetInt32Optional("equipment");
            if (rEquipmentID.HasValue)
                Equipment = KanColleGame.Current.MasterInfo.Equipment[rEquipmentID.Value];

            FuelConsumption = rpReader.GetInt32("fuel");
            BulletConsumption = rpReader.GetInt32("bullet");
            SteelConsumption = rpReader.GetInt32("steel");
            BauxiteConsumption = rpReader.GetInt32("bauxite");

            SecretaryShip = KanColleGame.Current.MasterInfo.Ships[rpReader.GetInt32("flagship")];
            HeadquarterLevel = rpReader.GetInt32("hq_level");
        }
开发者ID:amatukaze,项目名称:IntelligentNavalGun,代码行数:16,代码来源:DevelopmentRecord.cs

示例4: ConstructionRecord

        internal ConstructionRecord(SQLiteDataReader rpReader)
        {
            ID = rpReader.GetInt64("time");

            Ship = KanColleGame.Current.MasterInfo.Ships[rpReader.GetInt32("ship")];

            FuelConsumption = rpReader.GetInt32("fuel");
            BulletConsumption = rpReader.GetInt32("bullet");
            SteelConsumption = rpReader.GetInt32("steel");
            BauxiteConsumption = rpReader.GetInt32("bauxite");
            DevelopmentMaterialConsumption = rpReader.GetInt32("dev_material");

            SecretaryShip = KanColleGame.Current.MasterInfo.Ships[rpReader.GetInt32("flagship")];
            HeadquarterLevel = rpReader.GetInt32("hq_level");

            EmptyDockCount = rpReader.GetInt32Optional("empty_dock");
        }
开发者ID:amatukaze,项目名称:IntelligentNavalGun,代码行数:17,代码来源:ConstructionRecord.cs


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