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


C# IDataReader.GetUInt32方法代码示例

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


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

示例1: Read

        public static AccountData Read(IDataReader reader)
        {
            if (!reader.Read())
                return null;

            return new AccountData
            {
                Id             = reader.GetUInt64(0),
                UserName       = reader.GetString(1),
                Password       = reader.GetString(2),
                OneTimeKey     = reader.GetUInt32(3),
                Level          = reader.GetByte(4),
                FirstTimeFlags = new[] { reader.GetUInt32(5), reader.GetUInt32(6), reader.GetUInt32(7), reader.GetUInt32(8) }
            };
        }
开发者ID:4ptiv4,项目名称:GenesisSharp,代码行数:15,代码来源:AccountData.cs

示例2: Read

        public static SocialEntry Read(Int64 character, IDataReader reader, SocialType type)
        {
            if (!reader.Read())
                return null;

            SocialEntry entry;

            if (type == SocialType.Enemy)
            {
                var eentry = new EnemyEntry
                {
                    Race = reader.GetByte(1)
                };
                //eentry.TimesKilled = reader.GetByte("TimesKilled");
                //eentry.TimesKilledBy = reader.GetByte("TimesKilledBy");

                entry = eentry;
            }
            else
                entry = new SocialEntry();

            entry.Character = character;
            entry.OtherCharacter = reader.GetInt64(0);
            entry.Level = reader.GetByte(3);
            entry.LastContinentId = reader.GetUInt32(4);
            entry.Class = reader.GetByte(2);
            entry.Online = false;
            entry.Name = reader.GetString(5);
            entry.Type = (SocialType)reader.GetByte(6);

            return entry;
        }
开发者ID:4ptiv4,项目名称:GenesisSharp,代码行数:32,代码来源:SocialEntry.cs

示例3: Read

        public static CharacterData Read(IDataReader reader)
        {
            if (reader.Read())
            {
                return new CharacterData
                {
                    AccountId = reader.GetUInt64(0),
                    Coid = reader.GetInt64(1),
                    Cbid = reader.GetInt32(2),
                    TeamFaction = reader.GetInt32(3),
                    LastMapId = reader.GetUInt32(4),
                    LastStationMapId = reader.GetInt32(5),
                    X = reader.GetFloat(6),
                    Y = reader.GetFloat(7),
                    Z = reader.GetFloat(8),
                    Q1 = reader.GetFloat(9),
                    Q2 = reader.GetFloat(10),
                    Q3 = reader.GetFloat(11),
                    Q4 = reader.GetFloat(12),
                    Head = reader.GetInt32(13),
                    Body = reader.GetInt32(14),
                    HeadDetail = reader.GetInt32(15),
                    HeadDetail2 = reader.GetInt32(16),
                    Hair = reader.GetInt32(17),
                    Mouth = reader.GetInt32(18),
                    Eyes = reader.GetInt32(19),
                    Helmet = reader.GetInt32(20),
                    PrimaryColor = reader.GetUInt32(21),
                    SecondaryColor = reader.GetUInt32(22),
                    EyeColor = reader.GetUInt32(23),
                    HairColor = reader.GetUInt32(24),
                    SkinColor = reader.GetUInt32(25),
                    SpecialColor = reader.GetUInt32(26),
                    Level = reader.GetByte(27),
                    Name = reader.GetString(28),
                    ScaleOffset = reader.GetFloat(29),
                    ActiveVehicleCOID = reader.GetInt64(30),
                    LastStationId = reader.GetInt32(31),
                    Race = reader.GetByte(32),
                    Class = reader.GetByte(33),
                    CombatMode = reader.GetUInt32(34),
                    BattleMode = reader.GetInt16(35),
                    Credits = reader.GetUInt64(36),
                    CreditsDebt = reader.GetUInt64(37),
                    KmTravelled = reader.GetFloat(37),
                    Scale = reader.GetFloat(39),
                };
            }

            return null;
        }
开发者ID:4ptiv4,项目名称:GenesisSharp,代码行数:51,代码来源:CharacterData.cs

示例4: Read

        public static VehicleData Read(IDataReader reader)
        {
            if (reader.Read())
            {
                return new VehicleData
                {
                    Coid = reader.GetInt64(0),
                    OwnerCoid = reader.GetInt64(1),
                    Cbid = reader.GetInt32(2),
                    TeamFaction = reader.GetInt32(3),
                    X = reader.GetFloat(4),
                    Y = reader.GetFloat(5),
                    Z = reader.GetFloat(6),
                    Q1 = reader.GetFloat(7),
                    Q2 = reader.GetFloat(8),
                    Q3 = reader.GetFloat(9),
                    Q4 = reader.GetFloat(10),
                    Ornament = reader.GetInt64(11),
                    RaceItem = reader.GetInt64(12),
                    PowerPlant = reader.GetInt64(13),
                    Wheelset = reader.GetInt64(14),
                    Armor = reader.GetInt64(15),
                    MeleeWeapon = reader.GetInt64(16),
                    Front = reader.GetInt64(17),
                    Turret = reader.GetInt64(18),
                    Rear = reader.GetInt64(19),
                    Name = reader.GetString(20),
                    PrimaryColor = reader.GetUInt32(21),
                    SecondaryColor = reader.GetUInt32(22),
                    Trim = reader.GetByte(23),
                };
            }

            return null;
        }
开发者ID:4ptiv4,项目名称:GenesisSharp,代码行数:35,代码来源:VehicleData.cs


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