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


C# IDataRecord.GetUInt32方法代码示例

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


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

示例1: ReadValues

        /// <summary>
        /// Reads the values from an <see cref="IDataRecord"/> and assigns the read values to this
        /// object's properties. The database column's name is used to as the key, so the value
        /// will not be found if any aliases are used or not all columns were selected.
        /// </summary>
        /// <param name="source">The object to add the extension method to.</param>
        /// <param name="dataRecord">The <see cref="IDataRecord"/> to read the values from. Must already be ready to be read from.</param>
        public static void ReadValues(this WorldStatsQuestCompleteTable source, IDataRecord dataRecord)
        {
            Int32 i;

            i = dataRecord.GetOrdinal("id");

            source.ID = dataRecord.GetUInt32(i);

            i = dataRecord.GetOrdinal("map_id");

            source.MapID = (Nullable<MapID>)(dataRecord.IsDBNull(i) ? (ushort?)null : dataRecord.GetUInt16(i));

            i = dataRecord.GetOrdinal("quest_id");

            source.QuestID = (QuestID)dataRecord.GetUInt16(i);

            i = dataRecord.GetOrdinal("user_id");

            source.UserID = (CharacterID)dataRecord.GetInt32(i);

            i = dataRecord.GetOrdinal("when");

            source.When = dataRecord.GetDateTime(i);

            i = dataRecord.GetOrdinal("x");

            source.X = dataRecord.GetUInt16(i);

            i = dataRecord.GetOrdinal("y");

            source.Y = dataRecord.GetUInt16(i);
        }
开发者ID:Vizzini,项目名称:netgore,代码行数:39,代码来源:WorldStatsQuestCompleteTableDbExtensions.cs

示例2: ReadValues

        /// <summary>
        /// Reads the values from an <see cref="IDataRecord"/> and assigns the read values to this
        /// object's properties. The database column's name is used to as the key, so the value
        /// will not be found if any aliases are used or not all columns were selected.
        /// </summary>
        /// <param name="source">The object to add the extension method to.</param>
        /// <param name="dataRecord">The <see cref="IDataRecord"/> to read the values from. Must already be ready to be read from.</param>
        public static void ReadValues(this WorldStatsUserLevelTable source, IDataRecord dataRecord)
        {
            Int32 i;

            i = dataRecord.GetOrdinal("character_id");

            source.CharacterID = (CharacterID)dataRecord.GetInt32(i);

            i = dataRecord.GetOrdinal("id");

            source.ID = dataRecord.GetUInt32(i);

            i = dataRecord.GetOrdinal("level");

            source.Level = dataRecord.GetByte(i);

            i = dataRecord.GetOrdinal("map_id");

            source.MapID = (Nullable<MapID>)(dataRecord.IsDBNull(i) ? (ushort?)null : dataRecord.GetUInt16(i));

            i = dataRecord.GetOrdinal("when");

            source.When = dataRecord.GetDateTime(i);

            i = dataRecord.GetOrdinal("x");

            source.X = dataRecord.GetUInt16(i);

            i = dataRecord.GetOrdinal("y");

            source.Y = dataRecord.GetUInt16(i);
        }
开发者ID:Vizzini,项目名称:netgore,代码行数:39,代码来源:WorldStatsUserLevelTableDbExtensions.cs

示例3: EntityInitialState

 public EntityInitialState(IDataRecord record)
 {
     this.id = record.GetGuid("Id");
     this.timeStamp = record.GetDateTime("TimeStamp");
     this.parent = record.GetOrdinal("Parent") > -1 ? record.GetGuid("Parent") : Guid.Empty;
     this.sequence = record.GetOrdinal("Sequence") > -1 ? record.GetUInt32("Sequence") : 0;
     this.isNew = false;
     this.record = record;
 }
开发者ID:bossaia,项目名称:alexandrialibrary,代码行数:9,代码来源:EntityInitialState.cs

示例4: ValueInitialState

        public ValueInitialState(IDataRecord record)
        {
            if (record == null)
                throw new ArgumentNullException("record");

            this.id = record.GetGuid("Id");
            this.parent = record.GetGuid("Parent");
            this.sequence = record.GetUInt32("Sequence");
            this.isNew = false;
            this.record = record;
        }
开发者ID:bossaia,项目名称:alexandrialibrary,代码行数:11,代码来源:ValueInitialState.cs

示例5: ReadValues

        /// <summary>
        /// Reads the values from an <see cref="IDataRecord"/> and assigns the read values to this
        /// object's properties. The database column's name is used to as the key, so the value
        /// will not be found if any aliases are used or not all columns were selected.
        /// </summary>
        /// <param name="source">The object to add the extension method to.</param>
        /// <param name="dataRecord">The <see cref="IDataRecord"/> to read the values from. Must already be ready to be read from.</param>
        public static void ReadValues(this AccountIpsTable source, IDataRecord dataRecord)
        {
            Int32 i;

            i = dataRecord.GetOrdinal("account_id");

            source.AccountID = (AccountID)dataRecord.GetInt32(i);

            i = dataRecord.GetOrdinal("id");

            source.ID = dataRecord.GetUInt32(i);

            i = dataRecord.GetOrdinal("ip");

            source.Ip = dataRecord.GetUInt32(i);

            i = dataRecord.GetOrdinal("time");

            source.Time = dataRecord.GetDateTime(i);
        }
开发者ID:mateuscezar,项目名称:netgore,代码行数:27,代码来源:AccountIpsTableDbExtensions.cs

示例6: ReadValues

        /// <summary>
        /// Reads the values from an <see cref="IDataRecord"/> and assigns the read values to this
        /// object's properties. The database column's name is used to as the key, so the value
        /// will not be found if any aliases are used or not all columns were selected.
        /// </summary>
        /// <param name="source">The object to add the extension method to.</param>
        /// <param name="dataRecord">The <see cref="IDataRecord"/> to read the values from. Must already be ready to be read from.</param>
        public static void ReadValues(this AccountTable source, IDataRecord dataRecord)
        {
            Int32 i;

            i = dataRecord.GetOrdinal("creator_ip");

            source.CreatorIp = dataRecord.GetUInt32(i);

            i = dataRecord.GetOrdinal("current_ip");

            source.CurrentIp = (dataRecord.IsDBNull(i) ? (uint?)null : dataRecord.GetUInt32(i));

            i = dataRecord.GetOrdinal("email");

            source.Email = dataRecord.GetString(i);

            i = dataRecord.GetOrdinal("id");

            source.ID = (AccountID)dataRecord.GetInt32(i);

            i = dataRecord.GetOrdinal("name");

            source.Name = dataRecord.GetString(i);

            i = dataRecord.GetOrdinal("password");

            source.Password = dataRecord.GetString(i);

            i = dataRecord.GetOrdinal("permissions");

            source.Permissions = (UserPermissions)dataRecord.GetByte(i);

            i = dataRecord.GetOrdinal("time_created");

            source.TimeCreated = dataRecord.GetDateTime(i);

            i = dataRecord.GetOrdinal("time_last_login");

            source.TimeLastLogin = dataRecord.GetDateTime(i);
        }
开发者ID:Vizzini,项目名称:netgore,代码行数:47,代码来源:AccountTableDbExtensions.cs

示例7: ReadValues

        /// <summary>
        /// Reads the values from an <see cref="IDataRecord"/> and assigns the read values to this
        /// object's properties. The database column's name is used to as the key, so the value
        /// will not be found if any aliases are used or not all columns were selected.
        /// </summary>
        /// <param name="source">The object to add the extension method to.</param>
        /// <param name="dataRecord">The <see cref="IDataRecord"/> to read the values from. Must already be ready to be read from.</param>
        public static void ReadValues(this WorldStatsUserKillNpcTable source, IDataRecord dataRecord)
        {
            Int32 i;

            i = dataRecord.GetOrdinal("id");

            source.ID = dataRecord.GetUInt32(i);

            i = dataRecord.GetOrdinal("map_id");

            source.MapID = (Nullable<MapID>)(dataRecord.IsDBNull(i) ? (ushort?)null : dataRecord.GetUInt16(i));

            i = dataRecord.GetOrdinal("npc_template_id");

            source.NPCTemplateID =
                (Nullable<CharacterTemplateID>)(dataRecord.IsDBNull(i) ? (ushort?)null : dataRecord.GetUInt16(i));

            i = dataRecord.GetOrdinal("npc_x");

            source.NpcX = dataRecord.GetUInt16(i);

            i = dataRecord.GetOrdinal("npc_y");

            source.NpcY = dataRecord.GetUInt16(i);

            i = dataRecord.GetOrdinal("user_id");

            source.UserID = (CharacterID)dataRecord.GetInt32(i);

            i = dataRecord.GetOrdinal("user_level");

            source.UserLevel = dataRecord.GetByte(i);

            i = dataRecord.GetOrdinal("user_x");

            source.UserX = dataRecord.GetUInt16(i);

            i = dataRecord.GetOrdinal("user_y");

            source.UserY = dataRecord.GetUInt16(i);

            i = dataRecord.GetOrdinal("when");

            source.When = dataRecord.GetDateTime(i);
        }
开发者ID:mateuscezar,项目名称:netgore,代码行数:52,代码来源:WorldStatsUserKillNpcTableDbExtensions.cs

示例8: ReadValues

        /// <summary>
        /// Reads the values from an <see cref="IDataRecord"/> and assigns the read values to this
        /// object's properties. The database column's name is used to as the key, so the value
        /// will not be found if any aliases are used or not all columns were selected.
        /// </summary>
        /// <param name="source">The object to add the extension method to.</param>
        /// <param name="dataRecord">The <see cref="IDataRecord"/> to read the values from. Must already be ready to be read from.</param>
        public static void ReadValues(this WorldStatsGuildUserChangeTable source, IDataRecord dataRecord)
        {
            Int32 i;

            i = dataRecord.GetOrdinal("guild_id");

            source.GuildID = (Nullable<GuildID>)(dataRecord.IsDBNull(i) ? (ushort?)null : dataRecord.GetUInt16(i));

            i = dataRecord.GetOrdinal("id");

            source.ID = dataRecord.GetUInt32(i);

            i = dataRecord.GetOrdinal("user_id");

            source.UserID = (CharacterID)dataRecord.GetInt32(i);

            i = dataRecord.GetOrdinal("when");

            source.When = dataRecord.GetDateTime(i);
        }
开发者ID:Vizzini,项目名称:netgore,代码行数:27,代码来源:WorldStatsGuildUserChangeTableDbExtensions.cs

示例9: ReadValues

        /// <summary>
        /// Reads the values from an <see cref="IDataRecord"/> and assigns the read values to this
        /// object's properties. The database column's name is used to as the key, so the value
        /// will not be found if any aliases are used or not all columns were selected.
        /// </summary>
        /// <param name="source">The object to add the extension method to.</param>
        /// <param name="dataRecord">The <see cref="IDataRecord"/> to read the values from. Must already be ready to be read from.</param>
        public static void ReadValues(this WorldStatsNetworkTable source, IDataRecord dataRecord)
        {
            Int32 i;

            i = dataRecord.GetOrdinal("connections");

            source.Connections = dataRecord.GetUInt16(i);

            i = dataRecord.GetOrdinal("id");

            source.ID = dataRecord.GetUInt32(i);

            i = dataRecord.GetOrdinal("recv_bytes");

            source.RecvBytes = dataRecord.GetUInt32(i);

            i = dataRecord.GetOrdinal("recv_messages");

            source.RecvMessages = dataRecord.GetUInt32(i);

            i = dataRecord.GetOrdinal("recv_packets");

            source.RecvPackets = dataRecord.GetUInt32(i);

            i = dataRecord.GetOrdinal("sent_bytes");

            source.SentBytes = dataRecord.GetUInt32(i);

            i = dataRecord.GetOrdinal("sent_messages");

            source.SentMessages = dataRecord.GetUInt32(i);

            i = dataRecord.GetOrdinal("sent_packets");

            source.SentPackets = dataRecord.GetUInt32(i);

            i = dataRecord.GetOrdinal("when");

            source.When = dataRecord.GetDateTime(i);
        }
开发者ID:Vizzini,项目名称:netgore,代码行数:47,代码来源:WorldStatsNetworkTableDbExtensions.cs

示例10: ReadValues

        /// <summary>
        /// Reads the values from an <see cref="IDataRecord"/> and assigns the read values to this
        /// object's properties. The database column's name is used to as the key, so the value
        /// will not be found if any aliases are used or not all columns were selected.
        /// </summary>
        /// <param name="source">The object to add the extension method to.</param>
        /// <param name="dataRecord">The <see cref="IDataRecord"/> to read the values from. Must already be ready to be read from.</param>
        public static void ReadValues(this WorldStatsUserShoppingTable source, IDataRecord dataRecord)
        {
            Int32 i;

            i = dataRecord.GetOrdinal("amount");

            source.Amount = dataRecord.GetByte(i);

            i = dataRecord.GetOrdinal("character_id");

            source.CharacterID = (CharacterID)dataRecord.GetInt32(i);

            i = dataRecord.GetOrdinal("cost");

            source.Cost = dataRecord.GetInt32(i);

            i = dataRecord.GetOrdinal("id");

            source.ID = dataRecord.GetUInt32(i);

            i = dataRecord.GetOrdinal("item_template_id");

            source.ItemTemplateID = (Nullable<ItemTemplateID>)(dataRecord.IsDBNull(i) ? (ushort?)null : dataRecord.GetUInt16(i));

            i = dataRecord.GetOrdinal("map_id");

            source.MapID = (Nullable<MapID>)(dataRecord.IsDBNull(i) ? (ushort?)null : dataRecord.GetUInt16(i));

            i = dataRecord.GetOrdinal("sale_type");

            source.SaleType = dataRecord.GetSByte(i);

            i = dataRecord.GetOrdinal("shop_id");

            source.ShopID = (ShopID)dataRecord.GetUInt16(i);

            i = dataRecord.GetOrdinal("when");

            source.When = dataRecord.GetDateTime(i);

            i = dataRecord.GetOrdinal("x");

            source.X = dataRecord.GetUInt16(i);

            i = dataRecord.GetOrdinal("y");

            source.Y = dataRecord.GetUInt16(i);
        }
开发者ID:mateuscezar,项目名称:netgore,代码行数:55,代码来源:WorldStatsUserShoppingTableDbExtensions.cs

示例11: TryReadValues

        /// <summary>
        /// Reads the values from an <see cref="IDataReader"/> and assigns the read values to this
        /// object's properties. Unlike ReadValues(), this method not only doesn't require
        /// all values to be in the <see cref="IDataReader"/>, but also does not require the values in
        /// the <see cref="IDataReader"/> to be a defined field for the table this class represents.
        /// Because of this, you need to be careful when using this method because values
        /// can easily be skipped without any indication.
        /// </summary>
        /// <param name="source">The object to add the extension method to.</param>
        /// <param name="dataRecord">The <see cref="IDataReader"/> to read the values from. Must already be ready to be read from.</param>
        public static void TryReadValues(this WorldStatsUserShoppingTable source, IDataRecord dataRecord)
        {
            for (var i = 0; i < dataRecord.FieldCount; i++)
            {
                switch (dataRecord.GetName(i))
                {
                    case "amount":
                        source.Amount = dataRecord.GetByte(i);
                        break;

                    case "character_id":
                        source.CharacterID = (CharacterID)dataRecord.GetInt32(i);
                        break;

                    case "cost":
                        source.Cost = dataRecord.GetInt32(i);
                        break;

                    case "id":
                        source.ID = dataRecord.GetUInt32(i);
                        break;

                    case "item_template_id":
                        source.ItemTemplateID =
                            (Nullable<ItemTemplateID>)(dataRecord.IsDBNull(i) ? (ushort?)null : dataRecord.GetUInt16(i));
                        break;

                    case "map_id":
                        source.MapID = (Nullable<MapID>)(dataRecord.IsDBNull(i) ? (ushort?)null : dataRecord.GetUInt16(i));
                        break;

                    case "sale_type":
                        source.SaleType = dataRecord.GetSByte(i);
                        break;

                    case "shop_id":
                        source.ShopID = (ShopID)dataRecord.GetUInt16(i);
                        break;

                    case "when":
                        source.When = dataRecord.GetDateTime(i);
                        break;

                    case "x":
                        source.X = dataRecord.GetUInt16(i);
                        break;

                    case "y":
                        source.Y = dataRecord.GetUInt16(i);
                        break;
                }
            }
        }
开发者ID:mateuscezar,项目名称:netgore,代码行数:63,代码来源:WorldStatsUserShoppingTableDbExtensions.cs

示例12: TryReadValues

        /// <summary>
        /// Reads the values from an <see cref="IDataReader"/> and assigns the read values to this
        /// object's properties. Unlike ReadValues(), this method not only doesn't require
        /// all values to be in the <see cref="IDataReader"/>, but also does not require the values in
        /// the <see cref="IDataReader"/> to be a defined field for the table this class represents.
        /// Because of this, you need to be careful when using this method because values
        /// can easily be skipped without any indication.
        /// </summary>
        /// <param name="source">The object to add the extension method to.</param>
        /// <param name="dataRecord">The <see cref="IDataReader"/> to read the values from. Must already be ready to be read from.</param>
        public static void TryReadValues(this AccountTable source, IDataRecord dataRecord)
        {
            for (var i = 0; i < dataRecord.FieldCount; i++)
            {
                switch (dataRecord.GetName(i))
                {
                    case "creator_ip":
                        source.CreatorIp = dataRecord.GetUInt32(i);
                        break;

                    case "current_ip":
                        source.CurrentIp = (dataRecord.IsDBNull(i) ? (uint?)null : dataRecord.GetUInt32(i));
                        break;

                    case "email":
                        source.Email = dataRecord.GetString(i);
                        break;

                    case "id":
                        source.ID = (AccountID)dataRecord.GetInt32(i);
                        break;

                    case "name":
                        source.Name = dataRecord.GetString(i);
                        break;

                    case "password":
                        source.Password = dataRecord.GetString(i);
                        break;

                    case "permissions":
                        source.Permissions = (UserPermissions)dataRecord.GetByte(i);
                        break;

                    case "time_created":
                        source.TimeCreated = dataRecord.GetDateTime(i);
                        break;

                    case "time_last_login":
                        source.TimeLastLogin = dataRecord.GetDateTime(i);
                        break;
                }
            }
        }
开发者ID:Vizzini,项目名称:netgore,代码行数:54,代码来源:AccountTableDbExtensions.cs

示例13: TryReadValues

        /// <summary>
        /// Reads the values from an <see cref="IDataReader"/> and assigns the read values to this
        /// object's properties. Unlike ReadValues(), this method not only doesn't require
        /// all values to be in the <see cref="IDataReader"/>, but also does not require the values in
        /// the <see cref="IDataReader"/> to be a defined field for the table this class represents.
        /// Because of this, you need to be careful when using this method because values
        /// can easily be skipped without any indication.
        /// </summary>
        /// <param name="source">The object to add the extension method to.</param>
        /// <param name="dataRecord">The <see cref="IDataReader"/> to read the values from. Must already be ready to be read from.</param>
        public static void TryReadValues(this AccountIpsTable source, IDataRecord dataRecord)
        {
            for (var i = 0; i < dataRecord.FieldCount; i++)
            {
                switch (dataRecord.GetName(i))
                {
                    case "account_id":
                        source.AccountID = (AccountID)dataRecord.GetInt32(i);
                        break;

                    case "id":
                        source.ID = dataRecord.GetUInt32(i);
                        break;

                    case "ip":
                        source.Ip = dataRecord.GetUInt32(i);
                        break;

                    case "time":
                        source.Time = dataRecord.GetDateTime(i);
                        break;
                }
            }
        }
开发者ID:mateuscezar,项目名称:netgore,代码行数:34,代码来源:AccountIpsTableDbExtensions.cs

示例14: TryReadValues

        /// <summary>
        /// Reads the values from an <see cref="IDataReader"/> and assigns the read values to this
        /// object's properties. Unlike ReadValues(), this method not only doesn't require
        /// all values to be in the <see cref="IDataReader"/>, but also does not require the values in
        /// the <see cref="IDataReader"/> to be a defined field for the table this class represents.
        /// Because of this, you need to be careful when using this method because values
        /// can easily be skipped without any indication.
        /// </summary>
        /// <param name="source">The object to add the extension method to.</param>
        /// <param name="dataRecord">The <see cref="IDataReader"/> to read the values from. Must already be ready to be read from.</param>
        public static void TryReadValues(this WorldStatsGuildUserChangeTable source, IDataRecord dataRecord)
        {
            for (var i = 0; i < dataRecord.FieldCount; i++)
            {
                switch (dataRecord.GetName(i))
                {
                    case "guild_id":
                        source.GuildID = (Nullable<GuildID>)(dataRecord.IsDBNull(i) ? (ushort?)null : dataRecord.GetUInt16(i));
                        break;

                    case "id":
                        source.ID = dataRecord.GetUInt32(i);
                        break;

                    case "user_id":
                        source.UserID = (CharacterID)dataRecord.GetInt32(i);
                        break;

                    case "when":
                        source.When = dataRecord.GetDateTime(i);
                        break;
                }
            }
        }
开发者ID:Vizzini,项目名称:netgore,代码行数:34,代码来源:WorldStatsGuildUserChangeTableDbExtensions.cs

示例15: TryReadValues

        /// <summary>
        /// Reads the values from an <see cref="IDataReader"/> and assigns the read values to this
        /// object's properties. Unlike ReadValues(), this method not only doesn't require
        /// all values to be in the <see cref="IDataReader"/>, but also does not require the values in
        /// the <see cref="IDataReader"/> to be a defined field for the table this class represents.
        /// Because of this, you need to be careful when using this method because values
        /// can easily be skipped without any indication.
        /// </summary>
        /// <param name="source">The object to add the extension method to.</param>
        /// <param name="dataRecord">The <see cref="IDataReader"/> to read the values from. Must already be ready to be read from.</param>
        public static void TryReadValues(this WorldStatsUserLevelTable source, IDataRecord dataRecord)
        {
            for (var i = 0; i < dataRecord.FieldCount; i++)
            {
                switch (dataRecord.GetName(i))
                {
                    case "character_id":
                        source.CharacterID = (CharacterID)dataRecord.GetInt32(i);
                        break;

                    case "id":
                        source.ID = dataRecord.GetUInt32(i);
                        break;

                    case "level":
                        source.Level = dataRecord.GetByte(i);
                        break;

                    case "map_id":
                        source.MapID = (Nullable<MapID>)(dataRecord.IsDBNull(i) ? (ushort?)null : dataRecord.GetUInt16(i));
                        break;

                    case "when":
                        source.When = dataRecord.GetDateTime(i);
                        break;

                    case "x":
                        source.X = dataRecord.GetUInt16(i);
                        break;

                    case "y":
                        source.Y = dataRecord.GetUInt16(i);
                        break;
                }
            }
        }
开发者ID:Vizzini,项目名称:netgore,代码行数:46,代码来源:WorldStatsUserLevelTableDbExtensions.cs


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