コード例 #1
0
/// <summary>
/// Sets the <paramref name="value"/> of a column by the database column's name.
/// </summary>
/// <param name="columnName">The database name of the column to get the <paramref name="value"/> for.</param>
/// <param name="value">Value to assign to the column.</param>
        public void SetValue(System.String columnName, System.Object value)
        {
            switch (columnName)
            {
            case "character_id":
                this.CharacterID = (DemoGame.CharacterID)value;
                break;

            case "item_id":
                this.ItemID = (DemoGame.ItemID)value;
                break;

            case "slot":
                this.Slot = (DemoGame.EquipmentSlot)value;
                break;

            default:
                throw new ArgumentException("Field not found.", "columnName");
            }
        }
コード例 #2
0
/// <summary>
/// Sets the <paramref name="value"/> of a column by the database column's name.
/// </summary>
/// <param name="columnName">The database name of the column to get the <paramref name="value"/> for.</param>
/// <param name="value">Value to assign to the column.</param>
public void SetValue(System.String columnName, System.Object value)
{
switch (columnName)
{
case "character_id":
this.CharacterID = (DemoGame.CharacterID)value;
break;

case "item_id":
this.ItemID = (DemoGame.ItemID)value;
break;

case "slot":
this.Slot = (DemoGame.EquipmentSlot)value;
break;

default:
throw new ArgumentException("Field not found.","columnName");
}
}
コード例 #3
0
/// <summary>
/// Copies the values from the given <paramref name="source"/> into this CharacterEquippedTable.
/// </summary>
/// <param name="source">The ICharacterEquippedTable to copy the values from.</param>
public void CopyValuesFrom(ICharacterEquippedTable source)
{
this.CharacterID = (DemoGame.CharacterID)source.CharacterID;
this.ItemID = (DemoGame.ItemID)source.ItemID;
this.Slot = (DemoGame.EquipmentSlot)source.Slot;
}
コード例 #4
0
/// <summary>
/// Initializes a new instance of the <see cref="CharacterEquippedTable"/> class.
/// </summary>
/// <param name="characterID">The initial value for the corresponding property.</param>
/// <param name="itemID">The initial value for the corresponding property.</param>
/// <param name="slot">The initial value for the corresponding property.</param>
public CharacterEquippedTable(DemoGame.CharacterID @characterID, DemoGame.ItemID @itemID, DemoGame.EquipmentSlot @slot)
{
this.CharacterID = (DemoGame.CharacterID)@characterID;
this.ItemID = (DemoGame.ItemID)@itemID;
this.Slot = (DemoGame.EquipmentSlot)@slot;
}
コード例 #5
0
/// <summary>
/// Copies the values from the given <paramref name="source"/> into this CharacterEquippedTable.
/// </summary>
/// <param name="source">The ICharacterEquippedTable to copy the values from.</param>
        public void CopyValuesFrom(ICharacterEquippedTable source)
        {
            this.CharacterID = (DemoGame.CharacterID)source.CharacterID;
            this.ItemID      = (DemoGame.ItemID)source.ItemID;
            this.Slot        = (DemoGame.EquipmentSlot)source.Slot;
        }
コード例 #6
0
/// <summary>
/// Initializes a new instance of the <see cref="CharacterEquippedTable"/> class.
/// </summary>
/// <param name="characterID">The initial value for the corresponding property.</param>
/// <param name="itemID">The initial value for the corresponding property.</param>
/// <param name="slot">The initial value for the corresponding property.</param>
        public CharacterEquippedTable(DemoGame.CharacterID @characterID, DemoGame.ItemID @itemID, DemoGame.EquipmentSlot @slot)
        {
            this.CharacterID = (DemoGame.CharacterID)@characterID;
            this.ItemID      = (DemoGame.ItemID)@itemID;
            this.Slot        = (DemoGame.EquipmentSlot)@slot;
        }