/// <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(ICharacterQuestStatusTable source, System.Collections.Generic.IDictionary <System.String, System.Object> dic)
        {
            dic["character_id"] = (DemoGame.CharacterID)source.CharacterID;
            dic["completed_on"] = (System.Nullable <System.DateTime>)source.CompletedOn;
            dic["quest_id"]     = (NetGore.Features.Quests.QuestID)source.QuestID;
            dic["started_on"]   = (System.DateTime)source.StartedOn;
        }
/// <summary>
/// Copies the values from the given <paramref name="source"/> into this CharacterQuestStatusTable.
/// </summary>
/// <param name="source">The ICharacterQuestStatusTable to copy the values from.</param>
        public void CopyValuesFrom(ICharacterQuestStatusTable source)
        {
            this.CharacterID = (DemoGame.CharacterID)source.CharacterID;
            this.CompletedOn = (System.Nullable <System.DateTime>)source.CompletedOn;
            this.QuestID     = (NetGore.Features.Quests.QuestID)source.QuestID;
            this.StartedOn   = (System.DateTime)source.StartedOn;
        }
 /// <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(ICharacterQuestStatusTable source, IDictionary <String, Object> dic)
 {
     dic["character_id"] = source.CharacterID;
     dic["completed_on"] = source.CompletedOn;
     dic["quest_id"]     = source.QuestID;
     dic["started_on"]   = source.StartedOn;
 }
 /// <summary>
 /// Copies the values from the given <paramref name="source"/> into this CharacterQuestStatusTable.
 /// </summary>
 /// <param name="source">The ICharacterQuestStatusTable to copy the values from.</param>
 public void CopyValuesFrom(ICharacterQuestStatusTable source)
 {
     CharacterID = source.CharacterID;
     CompletedOn = source.CompletedOn;
     QuestID     = source.QuestID;
     StartedOn   = source.StartedOn;
 }
/// <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 ICharacterQuestStatusTable source, NetGore.Db.DbParameterValues paramValues)
        {
            paramValues["character_id"] = (System.Int32)source.CharacterID;
            paramValues["completed_on"] = (System.Nullable <System.DateTime>)source.CompletedOn;
            paramValues["quest_id"]     = (System.UInt16)source.QuestID;
            paramValues["started_on"]   = (System.DateTime)source.StartedOn;
        }
/// <summary>
/// Checks if this <see cref="ICharacterQuestStatusTable"/> contains the same values as another <see cref="ICharacterQuestStatusTable"/>.
/// </summary>
/// <param name="source">The source <see cref="ICharacterQuestStatusTable"/>.</param>
/// <param name="otherItem">The <see cref="ICharacterQuestStatusTable"/> to compare the values to.</param>
/// <returns>
/// True if this <see cref="ICharacterQuestStatusTable"/> contains the same values as the <paramref name="otherItem"/>; otherwise false.
/// </returns>
        public static System.Boolean HasSameValues(this ICharacterQuestStatusTable source, ICharacterQuestStatusTable otherItem)
        {
            return(Equals(source.CharacterID, otherItem.CharacterID) &&
                   Equals(source.CompletedOn, otherItem.CompletedOn) &&
                   Equals(source.QuestID, otherItem.QuestID) &&
                   Equals(source.StartedOn, otherItem.StartedOn));
        }
/// <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 ICharacterQuestStatusTable 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 "completed_on":
                    paramValues[i] = (System.Nullable <System.DateTime>)source.CompletedOn;
                    break;


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


                case "started_on":
                    paramValues[i] = (System.DateTime)source.StartedOn;
                    break;
                }
            }
        }
示例#8
0
 /// <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 ICharacterQuestStatusTable source, DbParameterValues paramValues)
 {
     paramValues["character_id"] = (Int32)source.CharacterID;
     paramValues["completed_on"] = source.CompletedOn;
     paramValues["quest_id"]     = (UInt16)source.QuestID;
     paramValues["started_on"]   = source.StartedOn;
 }
示例#9
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 ICharacterQuestStatusTable source, DbParameterValues paramValues)
        {
            for (var i = 0; i < paramValues.Count; i++)
            {
                switch (paramValues.GetParameterName(i))
                {
                case "character_id":
                    paramValues[i] = (Int32)source.CharacterID;
                    break;

                case "completed_on":
                    paramValues[i] = source.CompletedOn;
                    break;

                case "quest_id":
                    paramValues[i] = (UInt16)source.QuestID;
                    break;

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