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


C# IDataRecord.GetUInt16方法代码示例

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


在下文中一共展示了IDataRecord.GetUInt16方法的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 CharacterTemplateInventoryTable source, IDataRecord dataRecord)
        {
            Int32 i;

            i = dataRecord.GetOrdinal("chance");

            source.Chance = (ItemChance)dataRecord.GetUInt16(i);

            i = dataRecord.GetOrdinal("character_template_id");

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

            i = dataRecord.GetOrdinal("id");

            source.ID = dataRecord.GetInt32(i);

            i = dataRecord.GetOrdinal("item_template_id");

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

            i = dataRecord.GetOrdinal("max");

            source.Max = dataRecord.GetByte(i);

            i = dataRecord.GetOrdinal("min");

            source.Min = dataRecord.GetByte(i);
        }
开发者ID:mateuscezar,项目名称:netgore,代码行数:35,代码来源:CharacterTemplateInventoryTableDbExtensions.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 QuestRequireFinishQuestTable source, IDataRecord dataRecord)
        {
            Int32 i;

            i = dataRecord.GetOrdinal("quest_id");

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

            i = dataRecord.GetOrdinal("req_quest_id");

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

示例3: 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 ShopItemTable source, IDataRecord dataRecord)
        {
            Int32 i;

            i = dataRecord.GetOrdinal("item_template_id");

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

            i = dataRecord.GetOrdinal("shop_id");

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

示例4: 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 CharacterTemplateQuestProviderTable source, IDataRecord dataRecord)
        {
            Int32 i;

            i = dataRecord.GetOrdinal("character_template_id");

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

            i = dataRecord.GetOrdinal("quest_id");

            source.QuestID = (QuestID)dataRecord.GetUInt16(i);
        }
开发者ID:mateuscezar,项目名称:netgore,代码行数:19,代码来源:CharacterTemplateQuestProviderTableDbExtensions.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 WorldStatsQuestCancelTable 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:mateuscezar,项目名称:netgore,代码行数:39,代码来源:WorldStatsQuestCancelTableDbExtensions.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 QuestRequireKillTable source, IDataRecord dataRecord)
        {
            Int32 i;

            i = dataRecord.GetOrdinal("amount");

            source.Amount = dataRecord.GetUInt16(i);

            i = dataRecord.GetOrdinal("character_template_id");

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

            i = dataRecord.GetOrdinal("quest_id");

            source.QuestID = (QuestID)dataRecord.GetUInt16(i);
        }
开发者ID:mateuscezar,项目名称:netgore,代码行数:23,代码来源:QuestRequireKillTableDbExtensions.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 QuestRequireFinishItemTable source, IDataRecord dataRecord)
        {
            Int32 i;

            i = dataRecord.GetOrdinal("amount");

            source.Amount = dataRecord.GetByte(i);

            i = dataRecord.GetOrdinal("item_template_id");

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

            i = dataRecord.GetOrdinal("quest_id");

            source.QuestID = (QuestID)dataRecord.GetUInt16(i);
        }
开发者ID:Vizzini,项目名称:netgore,代码行数:23,代码来源:QuestRequireFinishItemTableDbExtensions.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 WorldStatsUserConsumeItemTable source, IDataRecord dataRecord)
        {
            Int32 i;

            i = dataRecord.GetOrdinal("id");

            source.ID = dataRecord.GetUInt32(i);

            i = dataRecord.GetOrdinal("item_template_id");

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

            i = dataRecord.GetOrdinal("map_id");

            source.MapID = (Nullable<MapID>)(dataRecord.IsDBNull(i) ? (ushort?)null : 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,代码来源:WorldStatsUserConsumeItemTableDbExtensions.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 CharacterTemplateEquippedTable source, IDataRecord dataRecord)
        {
            Int32 i;

            i = dataRecord.GetOrdinal("chance");

            source.Chance = (ItemChance)dataRecord.GetUInt16(i);

            i = dataRecord.GetOrdinal("character_template_id");

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

            i = dataRecord.GetOrdinal("id");

            source.ID = dataRecord.GetInt32(i);

            i = dataRecord.GetOrdinal("item_template_id");

            source.ItemTemplateID = (ItemTemplateID)dataRecord.GetUInt16(i);
        }
开发者ID:Vizzini,项目名称:netgore,代码行数:27,代码来源:CharacterTemplateEquippedTableDbExtensions.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 CharacterQuestStatusKillsTable source, IDataRecord dataRecord)
        {
            Int32 i;

            i = dataRecord.GetOrdinal("character_id");

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

            i = dataRecord.GetOrdinal("character_template_id");

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

            i = dataRecord.GetOrdinal("count");

            source.Count = dataRecord.GetUInt16(i);

            i = dataRecord.GetOrdinal("quest_id");

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

示例11: 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 MapTable source, IDataRecord dataRecord)
        {
            Int32 i;

            i = dataRecord.GetOrdinal("id");

            source.ID = (MapID)dataRecord.GetUInt16(i);

            i = dataRecord.GetOrdinal("name");

            source.Name = dataRecord.GetString(i);
        }
开发者ID:mateuscezar,项目名称:netgore,代码行数:19,代码来源:MapTableDbExtensions.cs

示例12: 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 CharacterTemplateSkillTable source, IDataRecord dataRecord)
        {
            Int32 i;

            i = dataRecord.GetOrdinal("character_template_id");

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

            i = dataRecord.GetOrdinal("skill_id");

            source.SkillID = (SkillType)dataRecord.GetByte(i);
        }
开发者ID:mateuscezar,项目名称:netgore,代码行数:19,代码来源:CharacterTemplateSkillTableDbExtensions.cs

示例13: 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 EventCountersItemTemplateTable source, IDataRecord dataRecord)
        {
            Int32 i;

            i = dataRecord.GetOrdinal("counter");

            source.Counter = dataRecord.GetInt64(i);

            i = dataRecord.GetOrdinal("item_template_event_counter_id");

            source.ItemTemplateEventCounterId = dataRecord.GetByte(i);

            i = dataRecord.GetOrdinal("item_template_id");

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

示例14: 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 EventCountersMapTable source, IDataRecord dataRecord)
        {
            Int32 i;

            i = dataRecord.GetOrdinal("counter");

            source.Counter = dataRecord.GetInt64(i);

            i = dataRecord.GetOrdinal("map_event_counter_id");

            source.MapEventCounterId = dataRecord.GetByte(i);

            i = dataRecord.GetOrdinal("map_id");

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

示例15: 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 EventCountersNpcTable source, IDataRecord dataRecord)
        {
            Int32 i;

            i = dataRecord.GetOrdinal("counter");

            source.Counter = dataRecord.GetInt64(i);

            i = dataRecord.GetOrdinal("npc_event_counter_id");

            source.NPCEventCounterID = dataRecord.GetByte(i);

            i = dataRecord.GetOrdinal("npc_template_id");

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


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