本文整理汇总了C#中System.GetUInt16方法的典型用法代码示例。如果您正苦于以下问题:C# System.GetUInt16方法的具体用法?C# System.GetUInt16怎么用?C# System.GetUInt16使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类System
的用法示例。
在下文中一共展示了System.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 WorldStatsQuestAcceptTable source, System.Data.IDataRecord dataRecord)
{
System.Int32 i;
i = dataRecord.GetOrdinal("id");
source.ID = (System.UInt32)(System.UInt32)dataRecord.GetUInt32(i);
i = dataRecord.GetOrdinal("map_id");
source.MapID = (System.Nullable<NetGore.World.MapID>)(System.Nullable<NetGore.World.MapID>)(dataRecord.IsDBNull(i) ? (System.Nullable<System.UInt16>)null : dataRecord.GetUInt16(i));
i = dataRecord.GetOrdinal("quest_id");
source.QuestID = (NetGore.Features.Quests.QuestID)(NetGore.Features.Quests.QuestID)dataRecord.GetUInt16(i);
i = dataRecord.GetOrdinal("user_id");
source.UserID = (DemoGame.CharacterID)(DemoGame.CharacterID)dataRecord.GetInt32(i);
i = dataRecord.GetOrdinal("when");
source.When = (System.DateTime)(System.DateTime)dataRecord.GetDateTime(i);
i = dataRecord.GetOrdinal("x");
source.X = (System.UInt16)(System.UInt16)dataRecord.GetUInt16(i);
i = dataRecord.GetOrdinal("y");
source.Y = (System.UInt16)(System.UInt16)dataRecord.GetUInt16(i);
}
示例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 CharacterTemplateInventoryTable source, System.Data.IDataRecord dataRecord)
{
System.Int32 i;
i = dataRecord.GetOrdinal("chance");
source.Chance = (DemoGame.ItemChance)(DemoGame.ItemChance)dataRecord.GetUInt16(i);
i = dataRecord.GetOrdinal("character_template_id");
source.CharacterTemplateID = (DemoGame.CharacterTemplateID)(DemoGame.CharacterTemplateID)dataRecord.GetUInt16(i);
i = dataRecord.GetOrdinal("id");
source.ID = (System.Int32)(System.Int32)dataRecord.GetInt32(i);
i = dataRecord.GetOrdinal("item_template_id");
source.ItemTemplateID = (DemoGame.ItemTemplateID)(DemoGame.ItemTemplateID)dataRecord.GetUInt16(i);
i = dataRecord.GetOrdinal("max");
source.Max = (System.Byte)(System.Byte)dataRecord.GetByte(i);
i = dataRecord.GetOrdinal("min");
source.Min = (System.Byte)(System.Byte)dataRecord.GetByte(i);
}
示例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 WorldStatsUserConsumeItemTable source, System.Data.IDataRecord dataRecord)
{
System.Int32 i;
i = dataRecord.GetOrdinal("id");
source.ID = (System.UInt32)(System.UInt32)dataRecord.GetUInt32(i);
i = dataRecord.GetOrdinal("item_template_id");
source.ItemTemplateID = (DemoGame.ItemTemplateID)(DemoGame.ItemTemplateID)dataRecord.GetUInt16(i);
i = dataRecord.GetOrdinal("map_id");
source.MapID = (System.Nullable<NetGore.World.MapID>)(System.Nullable<NetGore.World.MapID>)(dataRecord.IsDBNull(i) ? (System.Nullable<System.UInt16>)null : dataRecord.GetUInt16(i));
i = dataRecord.GetOrdinal("user_id");
source.UserID = (DemoGame.CharacterID)(DemoGame.CharacterID)dataRecord.GetInt32(i);
i = dataRecord.GetOrdinal("when");
source.When = (System.DateTime)(System.DateTime)dataRecord.GetDateTime(i);
i = dataRecord.GetOrdinal("x");
source.X = (System.UInt16)(System.UInt16)dataRecord.GetUInt16(i);
i = dataRecord.GetOrdinal("y");
source.Y = (System.UInt16)(System.UInt16)dataRecord.GetUInt16(i);
}
示例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 ShopItemTable source, System.Data.IDataRecord dataRecord)
{
System.Int32 i;
i = dataRecord.GetOrdinal("item_template_id");
source.ItemTemplateID = (DemoGame.ItemTemplateID)(DemoGame.ItemTemplateID)dataRecord.GetUInt16(i);
i = dataRecord.GetOrdinal("shop_id");
source.ShopID = (NetGore.Features.Shops.ShopID)(NetGore.Features.Shops.ShopID)dataRecord.GetUInt16(i);
}
示例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 CharacterTemplateQuestProviderTable source, System.Data.IDataRecord dataRecord)
{
System.Int32 i;
i = dataRecord.GetOrdinal("character_template_id");
source.CharacterTemplateID = (DemoGame.CharacterTemplateID)(DemoGame.CharacterTemplateID)dataRecord.GetUInt16(i);
i = dataRecord.GetOrdinal("quest_id");
source.QuestID = (NetGore.Features.Quests.QuestID)(NetGore.Features.Quests.QuestID)dataRecord.GetUInt16(i);
}
示例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 QuestRequireStartQuestTable source, System.Data.IDataRecord dataRecord)
{
System.Int32 i;
i = dataRecord.GetOrdinal("quest_id");
source.QuestID = (NetGore.Features.Quests.QuestID)(NetGore.Features.Quests.QuestID)dataRecord.GetUInt16(i);
i = dataRecord.GetOrdinal("req_quest_id");
source.ReqQuestID = (NetGore.Features.Quests.QuestID)(NetGore.Features.Quests.QuestID)dataRecord.GetUInt16(i);
}
示例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 QuestRequireKillTable source, System.Data.IDataRecord dataRecord)
{
System.Int32 i;
i = dataRecord.GetOrdinal("amount");
source.Amount = (System.UInt16)(System.UInt16)dataRecord.GetUInt16(i);
i = dataRecord.GetOrdinal("character_template_id");
source.CharacterTemplateID = (DemoGame.CharacterTemplateID)(DemoGame.CharacterTemplateID)dataRecord.GetUInt16(i);
i = dataRecord.GetOrdinal("quest_id");
source.QuestID = (NetGore.Features.Quests.QuestID)(NetGore.Features.Quests.QuestID)dataRecord.GetUInt16(i);
}
示例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 QuestRequireStartItemTable source, System.Data.IDataRecord dataRecord)
{
System.Int32 i;
i = dataRecord.GetOrdinal("amount");
source.Amount = (System.Byte)(System.Byte)dataRecord.GetByte(i);
i = dataRecord.GetOrdinal("item_template_id");
source.ItemTemplateID = (DemoGame.ItemTemplateID)(DemoGame.ItemTemplateID)dataRecord.GetUInt16(i);
i = dataRecord.GetOrdinal("quest_id");
source.QuestID = (NetGore.Features.Quests.QuestID)(NetGore.Features.Quests.QuestID)dataRecord.GetUInt16(i);
}
示例9: NumericUrlRangeModel
private NumericUrlRangeModel(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context)
: base(info, context)
{
this.range1 = info.GetInt32("range1");
this.range2 = info.GetInt32("range2");
this.zero = info.GetUInt16("zero");
}
示例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 WorldStatsNpcKillUserTable source, System.Data.IDataRecord dataRecord)
{
System.Int32 i;
i = dataRecord.GetOrdinal("id");
source.ID = (System.UInt32)(System.UInt32)dataRecord.GetUInt32(i);
i = dataRecord.GetOrdinal("map_id");
source.MapID = (System.Nullable<NetGore.World.MapID>)(System.Nullable<NetGore.World.MapID>)(dataRecord.IsDBNull(i) ? (System.Nullable<System.UInt16>)null : dataRecord.GetUInt16(i));
i = dataRecord.GetOrdinal("npc_template_id");
source.NPCTemplateID = (System.Nullable<DemoGame.CharacterTemplateID>)(System.Nullable<DemoGame.CharacterTemplateID>)(dataRecord.IsDBNull(i) ? (System.Nullable<System.UInt16>)null : dataRecord.GetUInt16(i));
i = dataRecord.GetOrdinal("npc_x");
source.NpcX = (System.UInt16)(System.UInt16)dataRecord.GetUInt16(i);
i = dataRecord.GetOrdinal("npc_y");
source.NpcY = (System.UInt16)(System.UInt16)dataRecord.GetUInt16(i);
i = dataRecord.GetOrdinal("user_id");
source.UserID = (DemoGame.CharacterID)(DemoGame.CharacterID)dataRecord.GetInt32(i);
i = dataRecord.GetOrdinal("user_level");
source.UserLevel = (System.Int16)(System.Int16)dataRecord.GetInt16(i);
i = dataRecord.GetOrdinal("user_x");
source.UserX = (System.UInt16)(System.UInt16)dataRecord.GetUInt16(i);
i = dataRecord.GetOrdinal("user_y");
source.UserY = (System.UInt16)(System.UInt16)dataRecord.GetUInt16(i);
i = dataRecord.GetOrdinal("when");
source.When = (System.DateTime)(System.DateTime)dataRecord.GetDateTime(i);
}
示例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 MapSpawnTable source, System.Data.IDataRecord dataRecord)
{
System.Int32 i;
i = dataRecord.GetOrdinal("amount");
source.Amount = (System.Byte)(System.Byte)dataRecord.GetByte(i);
i = dataRecord.GetOrdinal("character_template_id");
source.CharacterTemplateID = (DemoGame.CharacterTemplateID)(DemoGame.CharacterTemplateID)dataRecord.GetUInt16(i);
i = dataRecord.GetOrdinal("direction_id");
source.DirectionId = (NetGore.Direction)(NetGore.Direction)dataRecord.GetInt16(i);
i = dataRecord.GetOrdinal("height");
source.Height = (System.Nullable<System.UInt16>)(System.Nullable<System.UInt16>)(dataRecord.IsDBNull(i) ? (System.Nullable<System.UInt16>)null : dataRecord.GetUInt16(i));
i = dataRecord.GetOrdinal("id");
source.ID = (DemoGame.MapSpawnValuesID)(DemoGame.MapSpawnValuesID)dataRecord.GetInt32(i);
i = dataRecord.GetOrdinal("map_id");
source.MapID = (NetGore.World.MapID)(NetGore.World.MapID)dataRecord.GetUInt16(i);
i = dataRecord.GetOrdinal("respawn");
source.Respawn = (System.UInt16)(System.UInt16)dataRecord.GetUInt16(i);
i = dataRecord.GetOrdinal("width");
source.Width = (System.Nullable<System.UInt16>)(System.Nullable<System.UInt16>)(dataRecord.IsDBNull(i) ? (System.Nullable<System.UInt16>)null : dataRecord.GetUInt16(i));
i = dataRecord.GetOrdinal("x");
source.X = (System.Nullable<System.UInt16>)(System.Nullable<System.UInt16>)(dataRecord.IsDBNull(i) ? (System.Nullable<System.UInt16>)null : dataRecord.GetUInt16(i));
i = dataRecord.GetOrdinal("y");
source.Y = (System.Nullable<System.UInt16>)(System.Nullable<System.UInt16>)(dataRecord.IsDBNull(i) ? (System.Nullable<System.UInt16>)null : dataRecord.GetUInt16(i));
}
示例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 CharacterTemplateEquippedTable source, System.Data.IDataRecord dataRecord)
{
System.Int32 i;
i = dataRecord.GetOrdinal("chance");
source.Chance = (DemoGame.ItemChance)(DemoGame.ItemChance)dataRecord.GetUInt16(i);
i = dataRecord.GetOrdinal("character_template_id");
source.CharacterTemplateID = (DemoGame.CharacterTemplateID)(DemoGame.CharacterTemplateID)dataRecord.GetUInt16(i);
i = dataRecord.GetOrdinal("id");
source.ID = (System.Int32)(System.Int32)dataRecord.GetInt32(i);
i = dataRecord.GetOrdinal("item_template_id");
source.ItemTemplateID = (DemoGame.ItemTemplateID)(DemoGame.ItemTemplateID)dataRecord.GetUInt16(i);
}
示例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 CharacterTemplateSkillTable source, System.Data.IDataRecord dataRecord)
{
System.Int32 i;
i = dataRecord.GetOrdinal("character_template_id");
source.CharacterTemplateID = (DemoGame.CharacterTemplateID)(DemoGame.CharacterTemplateID)dataRecord.GetUInt16(i);
i = dataRecord.GetOrdinal("skill_id");
source.SkillID = (DemoGame.SkillType)(DemoGame.SkillType)dataRecord.GetByte(i);
}
示例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 MapTable source, System.Data.IDataRecord dataRecord)
{
System.Int32 i;
i = dataRecord.GetOrdinal("id");
source.ID = (NetGore.World.MapID)(NetGore.World.MapID)dataRecord.GetUInt16(i);
i = dataRecord.GetOrdinal("name");
source.Name = (System.String)(System.String)dataRecord.GetString(i);
}
示例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 CharacterStatusEffectTable source, System.Data.IDataRecord dataRecord)
{
System.Int32 i;
i = dataRecord.GetOrdinal("character_id");
source.CharacterID = (DemoGame.CharacterID)(DemoGame.CharacterID)dataRecord.GetInt32(i);
i = dataRecord.GetOrdinal("id");
source.ID = (DemoGame.ActiveStatusEffectID)(DemoGame.ActiveStatusEffectID)dataRecord.GetInt32(i);
i = dataRecord.GetOrdinal("power");
source.Power = (System.UInt16)(System.UInt16)dataRecord.GetUInt16(i);
i = dataRecord.GetOrdinal("status_effect_id");
source.StatusEffect = (DemoGame.StatusEffectType)(DemoGame.StatusEffectType)dataRecord.GetByte(i);
i = dataRecord.GetOrdinal("time_left_secs");
source.TimeLeftSecs = (System.UInt16)(System.UInt16)dataRecord.GetUInt16(i);
}