Example #1
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(ICharacterQuestStatusKillsTable source, IDictionary <String, Object> dic)
 {
     dic["character_id"]          = source.CharacterID;
     dic["character_template_id"] = source.CharacterTemplateID;
     dic["count"]    = source.Count;
     dic["quest_id"] = source.QuestID;
 }
Example #2
0
 /// <summary>
 /// Copies the values from the given <paramref name="source"/> into this CharacterQuestStatusKillsTable.
 /// </summary>
 /// <param name="source">The ICharacterQuestStatusKillsTable to copy the values from.</param>
 public void CopyValuesFrom(ICharacterQuestStatusKillsTable source)
 {
     CharacterID         = source.CharacterID;
     CharacterTemplateID = source.CharacterTemplateID;
     Count   = source.Count;
     QuestID = source.QuestID;
 }
Example #3
0
/// <summary>
/// Copies the values from the given <paramref name="source"/> into this CharacterQuestStatusKillsTable.
/// </summary>
/// <param name="source">The ICharacterQuestStatusKillsTable to copy the values from.</param>
        public void CopyValuesFrom(ICharacterQuestStatusKillsTable source)
        {
            this.CharacterID         = (DemoGame.CharacterID)source.CharacterID;
            this.CharacterTemplateID = (DemoGame.CharacterTemplateID)source.CharacterTemplateID;
            this.Count   = (System.UInt16)source.Count;
            this.QuestID = (NetGore.Features.Quests.QuestID)source.QuestID;
        }
 /// <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 ICharacterQuestStatusKillsTable source, DbParameterValues paramValues)
 {
     paramValues["character_id"]          = (Int32)source.CharacterID;
     paramValues["character_template_id"] = (UInt16)source.CharacterTemplateID;
     paramValues["count"]    = source.Count;
     paramValues["quest_id"] = (UInt16)source.QuestID;
 }
Example #5
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(ICharacterQuestStatusKillsTable source, System.Collections.Generic.IDictionary <System.String, System.Object> dic)
        {
            dic["character_id"]          = (DemoGame.CharacterID)source.CharacterID;
            dic["character_template_id"] = (DemoGame.CharacterTemplateID)source.CharacterTemplateID;
            dic["count"]    = (System.UInt16)source.Count;
            dic["quest_id"] = (NetGore.Features.Quests.QuestID)source.QuestID;
        }
Example #6
0
/// <summary>
/// Checks if this <see cref="ICharacterQuestStatusKillsTable"/> contains the same values as another <see cref="ICharacterQuestStatusKillsTable"/>.
/// </summary>
/// <param name="source">The source <see cref="ICharacterQuestStatusKillsTable"/>.</param>
/// <param name="otherItem">The <see cref="ICharacterQuestStatusKillsTable"/> to compare the values to.</param>
/// <returns>
/// True if this <see cref="ICharacterQuestStatusKillsTable"/> contains the same values as the <paramref name="otherItem"/>; otherwise false.
/// </returns>
        public static System.Boolean HasSameValues(this ICharacterQuestStatusKillsTable source, ICharacterQuestStatusKillsTable otherItem)
        {
            return(Equals(source.CharacterID, otherItem.CharacterID) &&
                   Equals(source.CharacterTemplateID, otherItem.CharacterTemplateID) &&
                   Equals(source.Count, otherItem.Count) &&
                   Equals(source.QuestID, otherItem.QuestID));
        }
Example #7
0
/// <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 ICharacterQuestStatusKillsTable source, NetGore.Db.DbParameterValues paramValues)
        {
            for (int i = 0; i < paramValues.Count; i++)
            {
                switch (paramValues.GetParameterName(i))
                {
                case "character_id":
                    paramValues[i] = (System.Int32)source.CharacterID;
                    break;


                case "character_template_id":
                    paramValues[i] = (System.UInt16)source.CharacterTemplateID;
                    break;


                case "count":
                    paramValues[i] = (System.UInt16)source.Count;
                    break;


                case "quest_id":
                    paramValues[i] = (System.UInt16)source.QuestID;
                    break;
                }
            }
        }
 /// <summary>
 /// Copies the values from the given <paramref name="source"/> into this CharacterQuestStatusKillsTable.
 /// </summary>
 /// <param name="source">The ICharacterQuestStatusKillsTable to copy the values from.</param>
 public void CopyValuesFrom(ICharacterQuestStatusKillsTable source)
 {
     CharacterID = source.CharacterID;
     CharacterTemplateID = source.CharacterTemplateID;
     Count = source.Count;
     QuestID = source.QuestID;
 }
 /// <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(ICharacterQuestStatusKillsTable source, IDictionary<String, Object> dic)
 {
     dic["character_id"] = source.CharacterID;
     dic["character_template_id"] = source.CharacterTemplateID;
     dic["count"] = source.Count;
     dic["quest_id"] = source.QuestID;
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="CharacterQuestStatusKillsTable"/> class.
 /// </summary>
 /// <param name="source">ICharacterQuestStatusKillsTable to copy the initial values from.</param>
 public CharacterQuestStatusKillsTable(ICharacterQuestStatusKillsTable source)
 {
     CopyValuesFrom(source);
 }
Example #11
0
 /// <summary>
 /// Initializes a new instance of the <see cref="CharacterQuestStatusKillsTable"/> class.
 /// </summary>
 /// <param name="source">ICharacterQuestStatusKillsTable to copy the initial values from.</param>
 public CharacterQuestStatusKillsTable(ICharacterQuestStatusKillsTable source)
 {
     CopyValuesFrom(source);
 }
 /// <summary>
 /// Checks if this <see cref="ICharacterQuestStatusKillsTable"/> contains the same values as another <see cref="ICharacterQuestStatusKillsTable"/>.
 /// </summary>
 /// <param name="source">The source <see cref="ICharacterQuestStatusKillsTable"/>.</param>
 /// <param name="otherItem">The <see cref="ICharacterQuestStatusKillsTable"/> to compare the values to.</param>
 /// <returns>
 /// True if this <see cref="ICharacterQuestStatusKillsTable"/> contains the same values as the <paramref name="otherItem"/>; otherwise false.
 /// </returns>
 public static Boolean HasSameValues(this ICharacterQuestStatusKillsTable source, ICharacterQuestStatusKillsTable otherItem)
 {
     return Equals(source.CharacterID, otherItem.CharacterID) &&
            Equals(source.CharacterTemplateID, otherItem.CharacterTemplateID) && Equals(source.Count, otherItem.Count) &&
            Equals(source.QuestID, otherItem.QuestID);
 }
/// <summary>
/// Copies the values from the given <paramref name="source"/> into this CharacterQuestStatusKillsTable.
/// </summary>
/// <param name="source">The ICharacterQuestStatusKillsTable to copy the values from.</param>
public void CopyValuesFrom(ICharacterQuestStatusKillsTable source)
{
this.CharacterID = (DemoGame.CharacterID)source.CharacterID;
this.CharacterTemplateID = (DemoGame.CharacterTemplateID)source.CharacterTemplateID;
this.Count = (System.UInt16)source.Count;
this.QuestID = (NetGore.Features.Quests.QuestID)source.QuestID;
}
/// <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(ICharacterQuestStatusKillsTable source, System.Collections.Generic.IDictionary<System.String,System.Object> dic)
{
dic["character_id"] = (DemoGame.CharacterID)source.CharacterID;
dic["character_template_id"] = (DemoGame.CharacterTemplateID)source.CharacterTemplateID;
dic["count"] = (System.UInt16)source.Count;
dic["quest_id"] = (NetGore.Features.Quests.QuestID)source.QuestID;
}