Esempio n. 1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ShopItemTable"/> class.
 /// </summary>
 /// <param name="source">IShopItemTable to copy the initial values from.</param>
 public ShopItemTable(IShopItemTable source)
 {
     CopyValuesFrom(source);
 }
 /// <summary>
 /// Checks if this <see cref="IShopItemTable"/> contains the same values as another <see cref="IShopItemTable"/>.
 /// </summary>
 /// <param name="source">The source <see cref="IShopItemTable"/>.</param>
 /// <param name="otherItem">The <see cref="IShopItemTable"/> to compare the values to.</param>
 /// <returns>
 /// True if this <see cref="IShopItemTable"/> contains the same values as the <paramref name="otherItem"/>; otherwise false.
 /// </returns>
 public static Boolean HasSameValues(this IShopItemTable source, IShopItemTable otherItem)
 {
     return Equals(source.ItemTemplateID, otherItem.ItemTemplateID) && Equals(source.ShopID, otherItem.ShopID);
 }
Esempio n. 3
0
 /// <summary>
 /// Copies the values from the given <paramref name="source"/> into this ShopItemTable.
 /// </summary>
 /// <param name="source">The IShopItemTable to copy the values from.</param>
 public void CopyValuesFrom(IShopItemTable source)
 {
     ItemTemplateID = source.ItemTemplateID;
     ShopID = source.ShopID;
 }
Esempio n. 4
0
 /// <summary>
 /// Copies the column values into the given Dictionary using the database column name
 /// with a prefixed @ as the key. The keys must already exist in the Dictionary;
 /// this method will not create them if they are missing.
 /// </summary>
 /// <param name="source">The object to copy the values from.</param>
 /// <param name="dic">The Dictionary to copy the values into.</param>
 public static void CopyValues(IShopItemTable source, IDictionary<String, Object> dic)
 {
     dic["item_template_id"] = source.ItemTemplateID;
     dic["shop_id"] = source.ShopID;
 }
Esempio n. 5
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ShopItem"/> class.
 /// </summary>
 /// <param name="shopItemTable">The shop item table.</param>
 public ShopItem(IShopItemTable shopItemTable)
 {
     _shopID       = shopItemTable.ShopID;
     _itemTemplate = _itemTemplateManager[shopItemTable.ItemTemplateID];
 }
Esempio n. 6
0
/// <summary>
/// Copies the values from the given <paramref name="source"/> into this ShopItemTable.
/// </summary>
/// <param name="source">The IShopItemTable to copy the values from.</param>
public void CopyValuesFrom(IShopItemTable source)
{
this.ItemTemplateID = (DemoGame.ItemTemplateID)source.ItemTemplateID;
this.ShopID = (NetGore.Features.Shops.ShopID)source.ShopID;
}
Esempio n. 7
0
/// <summary>
/// Copies the column values into the given Dictionary using the database column name
/// with a prefixed @ as the key. The keys must already exist in the Dictionary;
/// this method will not create them if they are missing.
/// </summary>
/// <param name="source">The object to copy the values from.</param>
/// <param name="dic">The Dictionary to copy the values into.</param>
public static void CopyValues(IShopItemTable source, System.Collections.Generic.IDictionary<System.String,System.Object> dic)
{
dic["item_template_id"] = (DemoGame.ItemTemplateID)source.ItemTemplateID;
dic["shop_id"] = (NetGore.Features.Shops.ShopID)source.ShopID;
}