/// <summary> /// Copies the column values into the given DbParameterValues using the database column name /// with a prefixed @ as the key. The keys must already exist in the DbParameterValues; /// this method will not create them if they are missing. /// </summary> /// <param name="source">The object to copy the values from.</param> /// <param name="paramValues">The DbParameterValues to copy the values into.</param> public static void CopyValues(this ICharacterTemplateEquippedTable source, NetGore.Db.DbParameterValues paramValues) { paramValues["chance"] = (System.UInt16)source.Chance; paramValues["character_template_id"] = (System.UInt16)source.CharacterTemplateID; paramValues["id"] = (System.Int32)source.ID; paramValues["item_template_id"] = (System.UInt16)source.ItemTemplateID; }
/// <summary> /// Copies the column values into the given DbParameterValues using the database column name /// with a prefixed @ as the key. The key must already exist in the DbParameterValues /// for the value to be copied over. If any of the keys in the DbParameterValues do not /// match one of the column names, or if there is no field for a key, then it will be /// ignored. Because of this, it is important to be careful when using this method /// since columns or keys can be skipped without any indication. /// </summary> /// <param name="source">The object to copy the values from.</param> /// <param name="paramValues">The DbParameterValues to copy the values into.</param> public static void TryCopyValues(this ICharacterTemplateEquippedTable source, NetGore.Db.DbParameterValues paramValues) { for (int i = 0; i < paramValues.Count; i++) { switch (paramValues.GetParameterName(i)) { case "chance": paramValues[i] = (System.UInt16)source.Chance; break; case "character_template_id": paramValues[i] = (System.UInt16)source.CharacterTemplateID; break; case "id": paramValues[i] = (System.Int32)source.ID; break; case "item_template_id": paramValues[i] = (System.UInt16)source.ItemTemplateID; break; } } }
/// <summary> /// Checks if this <see cref="ICharacterTemplateEquippedTable"/> contains the same values as another <see cref="ICharacterTemplateEquippedTable"/>. /// </summary> /// <param name="source">The source <see cref="ICharacterTemplateEquippedTable"/>.</param> /// <param name="otherItem">The <see cref="ICharacterTemplateEquippedTable"/> to compare the values to.</param> /// <returns> /// True if this <see cref="ICharacterTemplateEquippedTable"/> contains the same values as the <paramref name="otherItem"/>; otherwise false. /// </returns> public static System.Boolean HasSameValues(this ICharacterTemplateEquippedTable source, ICharacterTemplateEquippedTable otherItem) { return(Equals(source.Chance, otherItem.Chance) && Equals(source.CharacterTemplateID, otherItem.CharacterTemplateID) && Equals(source.ID, otherItem.ID) && Equals(source.ItemTemplateID, otherItem.ItemTemplateID)); }
/// <summary> /// Copies the values from the given <paramref name="source"/> into this CharacterTemplateEquippedTable. /// </summary> /// <param name="source">The ICharacterTemplateEquippedTable to copy the values from.</param> public void CopyValuesFrom(ICharacterTemplateEquippedTable source) { Chance = source.Chance; CharacterTemplateID = source.CharacterTemplateID; ID = source.ID; ItemTemplateID = source.ItemTemplateID; }
/// <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(ICharacterTemplateEquippedTable source, IDictionary <String, Object> dic) { dic["chance"] = source.Chance; dic["character_template_id"] = source.CharacterTemplateID; dic["id"] = source.ID; dic["item_template_id"] = source.ItemTemplateID; }
/// <summary> /// Copies the values from the given <paramref name="source"/> into this CharacterTemplateEquippedTable. /// </summary> /// <param name="source">The ICharacterTemplateEquippedTable to copy the values from.</param> public void CopyValuesFrom(ICharacterTemplateEquippedTable source) { this.Chance = (DemoGame.ItemChance)source.Chance; this.CharacterTemplateID = (DemoGame.CharacterTemplateID)source.CharacterTemplateID; this.ID = (System.Int32)source.ID; this.ItemTemplateID = (DemoGame.ItemTemplateID)source.ItemTemplateID; }
/// <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(ICharacterTemplateEquippedTable source, System.Collections.Generic.IDictionary <System.String, System.Object> dic) { dic["chance"] = (DemoGame.ItemChance)source.Chance; dic["character_template_id"] = (DemoGame.CharacterTemplateID)source.CharacterTemplateID; dic["id"] = (System.Int32)source.ID; dic["item_template_id"] = (DemoGame.ItemTemplateID)source.ItemTemplateID; }
/// <summary> /// Checks if this <see cref="ICharacterTemplateEquippedTable"/> contains the same values as another <see cref="ICharacterTemplateEquippedTable"/>. /// </summary> /// <param name="source">The source <see cref="ICharacterTemplateEquippedTable"/>.</param> /// <param name="otherItem">The <see cref="ICharacterTemplateEquippedTable"/> to compare the values to.</param> /// <returns> /// True if this <see cref="ICharacterTemplateEquippedTable"/> contains the same values as the <paramref name="otherItem"/>; otherwise false. /// </returns> public static Boolean HasSameValues(this ICharacterTemplateEquippedTable source, ICharacterTemplateEquippedTable otherItem) { return Equals(source.Chance, otherItem.Chance) && Equals(source.CharacterTemplateID, otherItem.CharacterTemplateID) && Equals(source.ID, otherItem.ID) && Equals(source.ItemTemplateID, otherItem.ItemTemplateID); }
/// <summary> /// Copies the values from the given <paramref name="source"/> into this CharacterTemplateEquippedTable. /// </summary> /// <param name="source">The ICharacterTemplateEquippedTable to copy the values from.</param> public void CopyValuesFrom(ICharacterTemplateEquippedTable source) { this.Chance = (DemoGame.ItemChance)source.Chance; this.CharacterTemplateID = (DemoGame.CharacterTemplateID)source.CharacterTemplateID; this.ID = (System.Int32)source.ID; this.ItemTemplateID = (DemoGame.ItemTemplateID)source.ItemTemplateID; }
/// <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(ICharacterTemplateEquippedTable source, System.Collections.Generic.IDictionary<System.String,System.Object> dic) { dic["chance"] = (DemoGame.ItemChance)source.Chance; dic["character_template_id"] = (DemoGame.CharacterTemplateID)source.CharacterTemplateID; dic["id"] = (System.Int32)source.ID; dic["item_template_id"] = (DemoGame.ItemTemplateID)source.ItemTemplateID; }
/// <summary> /// Initializes a new instance of the <see cref="CharacterTemplateEquippedTable"/> class. /// </summary> /// <param name="source">ICharacterTemplateEquippedTable to copy the initial values from.</param> public CharacterTemplateEquippedTable(ICharacterTemplateEquippedTable source) { CopyValuesFrom(source); }
/// <summary> /// Copies the values from the given <paramref name="source"/> into this CharacterTemplateEquippedTable. /// </summary> /// <param name="source">The ICharacterTemplateEquippedTable to copy the values from.</param> public void CopyValuesFrom(ICharacterTemplateEquippedTable source) { Chance = source.Chance; CharacterTemplateID = source.CharacterTemplateID; ID = source.ID; ItemTemplateID = source.ItemTemplateID; }
/// <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(ICharacterTemplateEquippedTable source, IDictionary<String, Object> dic) { dic["chance"] = source.Chance; dic["character_template_id"] = source.CharacterTemplateID; dic["id"] = source.ID; dic["item_template_id"] = source.ItemTemplateID; }
/// <summary> /// Initializes a new instance of the <see cref="CharacterTemplateEquippedTable"/> class. /// </summary> /// <param name="source">ICharacterTemplateEquippedTable to copy the initial values from.</param> public CharacterTemplateEquippedTable(ICharacterTemplateEquippedTable source) { CopyValuesFrom(source); }