/// <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 IQuestRequireFinishQuestTable source, DbParameterValues paramValues)
        {
            for (var i = 0; i < paramValues.Count; i++)
            {
                switch (paramValues.GetParameterName(i))
                {
                case "quest_id":
                    paramValues[i] = (UInt16)source.QuestID;
                    break;

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