/// <summary> /// Copies the values from the given <paramref name="source"/> into this WorldStatsQuestAcceptTable. /// </summary> /// <param name="source">The IWorldStatsQuestAcceptTable to copy the values from.</param> public void CopyValuesFrom(IWorldStatsQuestAcceptTable source) { ID = source.ID; MapID = source.MapID; QuestID = source.QuestID; UserID = source.UserID; When = source.When; X = source.X; Y = source.Y; }
/// <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(IWorldStatsQuestAcceptTable source, System.Collections.Generic.IDictionary <System.String, System.Object> dic) { dic["id"] = (System.UInt32)source.ID; dic["map_id"] = (System.Nullable <NetGore.World.MapID>)source.MapID; dic["quest_id"] = (NetGore.Features.Quests.QuestID)source.QuestID; dic["user_id"] = (DemoGame.CharacterID)source.UserID; dic["when"] = (System.DateTime)source.When; dic["x"] = (System.UInt16)source.X; dic["y"] = (System.UInt16)source.Y; }
/// <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(IWorldStatsQuestAcceptTable source, IDictionary <String, Object> dic) { dic["id"] = source.ID; dic["map_id"] = source.MapID; dic["quest_id"] = source.QuestID; dic["user_id"] = source.UserID; dic["when"] = source.When; dic["x"] = source.X; dic["y"] = source.Y; }
/// <summary> /// Copies the values from the given <paramref name="source"/> into this WorldStatsQuestAcceptTable. /// </summary> /// <param name="source">The IWorldStatsQuestAcceptTable to copy the values from.</param> public void CopyValuesFrom(IWorldStatsQuestAcceptTable source) { this.ID = (System.UInt32)source.ID; this.MapID = (System.Nullable <NetGore.World.MapID>)source.MapID; this.QuestID = (NetGore.Features.Quests.QuestID)source.QuestID; this.UserID = (DemoGame.CharacterID)source.UserID; this.When = (System.DateTime)source.When; this.X = (System.UInt16)source.X; this.Y = (System.UInt16)source.Y; }
/// <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 IWorldStatsQuestAcceptTable source, NetGore.Db.DbParameterValues paramValues) { paramValues["id"] = (System.UInt32)source.ID; paramValues["map_id"] = (System.Nullable <System.UInt16>)source.MapID; paramValues["quest_id"] = (System.UInt16)source.QuestID; paramValues["user_id"] = (System.Int32)source.UserID; paramValues["when"] = (System.DateTime)source.When; paramValues["x"] = (System.UInt16)source.X; paramValues["y"] = (System.UInt16)source.Y; }
/// <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 IWorldStatsQuestAcceptTable source, DbParameterValues paramValues) { paramValues["id"] = source.ID; paramValues["map_id"] = (ushort?)source.MapID; paramValues["quest_id"] = (UInt16)source.QuestID; paramValues["user_id"] = (Int32)source.UserID; paramValues["when"] = source.When; paramValues["x"] = source.X; paramValues["y"] = source.Y; }
/// <summary> /// Checks if this <see cref="IWorldStatsQuestAcceptTable"/> contains the same values as another <see cref="IWorldStatsQuestAcceptTable"/>. /// </summary> /// <param name="source">The source <see cref="IWorldStatsQuestAcceptTable"/>.</param> /// <param name="otherItem">The <see cref="IWorldStatsQuestAcceptTable"/> to compare the values to.</param> /// <returns> /// True if this <see cref="IWorldStatsQuestAcceptTable"/> contains the same values as the <paramref name="otherItem"/>; otherwise false. /// </returns> public static System.Boolean HasSameValues(this IWorldStatsQuestAcceptTable source, IWorldStatsQuestAcceptTable otherItem) { return(Equals(source.ID, otherItem.ID) && Equals(source.MapID, otherItem.MapID) && Equals(source.QuestID, otherItem.QuestID) && Equals(source.UserID, otherItem.UserID) && Equals(source.When, otherItem.When) && Equals(source.X, otherItem.X) && Equals(source.Y, otherItem.Y)); }
/// <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 IWorldStatsQuestAcceptTable source, NetGore.Db.DbParameterValues paramValues) { for (int i = 0; i < paramValues.Count; i++) { switch (paramValues.GetParameterName(i)) { case "id": paramValues[i] = (System.UInt32)source.ID; break; case "map_id": paramValues[i] = (System.Nullable <System.UInt16>)source.MapID; break; case "quest_id": paramValues[i] = (System.UInt16)source.QuestID; break; case "user_id": paramValues[i] = (System.Int32)source.UserID; break; case "when": paramValues[i] = (System.DateTime)source.When; break; case "x": paramValues[i] = (System.UInt16)source.X; break; case "y": paramValues[i] = (System.UInt16)source.Y; break; } } }
/// <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 IWorldStatsQuestAcceptTable source, DbParameterValues paramValues) { for (var i = 0; i < paramValues.Count; i++) { switch (paramValues.GetParameterName(i)) { case "id": paramValues[i] = source.ID; break; case "map_id": paramValues[i] = (ushort?)source.MapID; break; case "quest_id": paramValues[i] = (UInt16)source.QuestID; break; case "user_id": paramValues[i] = (Int32)source.UserID; break; case "when": paramValues[i] = source.When; break; case "x": paramValues[i] = source.X; break; case "y": paramValues[i] = source.Y; break; } } }
/// <summary> /// Copies the values from the given <paramref name="source"/> into this WorldStatsQuestAcceptTable. /// </summary> /// <param name="source">The IWorldStatsQuestAcceptTable to copy the values from.</param> public void CopyValuesFrom(IWorldStatsQuestAcceptTable source) { this.ID = (System.UInt32)source.ID; this.MapID = (System.Nullable<NetGore.World.MapID>)source.MapID; this.QuestID = (NetGore.Features.Quests.QuestID)source.QuestID; this.UserID = (DemoGame.CharacterID)source.UserID; this.When = (System.DateTime)source.When; this.X = (System.UInt16)source.X; this.Y = (System.UInt16)source.Y; }
/// <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(IWorldStatsQuestAcceptTable source, System.Collections.Generic.IDictionary<System.String,System.Object> dic) { dic["id"] = (System.UInt32)source.ID; dic["map_id"] = (System.Nullable<NetGore.World.MapID>)source.MapID; dic["quest_id"] = (NetGore.Features.Quests.QuestID)source.QuestID; dic["user_id"] = (DemoGame.CharacterID)source.UserID; dic["when"] = (System.DateTime)source.When; dic["x"] = (System.UInt16)source.X; dic["y"] = (System.UInt16)source.Y; }
/// <summary> /// Initializes a new instance of the <see cref="WorldStatsQuestAcceptTable"/> class. /// </summary> /// <param name="source">IWorldStatsQuestAcceptTable to copy the initial values from.</param> public WorldStatsQuestAcceptTable(IWorldStatsQuestAcceptTable source) { CopyValuesFrom(source); }
/// <summary> /// Checks if this <see cref="IWorldStatsQuestAcceptTable"/> contains the same values as another <see cref="IWorldStatsQuestAcceptTable"/>. /// </summary> /// <param name="source">The source <see cref="IWorldStatsQuestAcceptTable"/>.</param> /// <param name="otherItem">The <see cref="IWorldStatsQuestAcceptTable"/> to compare the values to.</param> /// <returns> /// True if this <see cref="IWorldStatsQuestAcceptTable"/> contains the same values as the <paramref name="otherItem"/>; otherwise false. /// </returns> public static System.Boolean HasSameValues(this IWorldStatsQuestAcceptTable source, IWorldStatsQuestAcceptTable otherItem) { return Equals(source.ID, otherItem.ID) && Equals(source.MapID, otherItem.MapID) && Equals(source.QuestID, otherItem.QuestID) && Equals(source.UserID, otherItem.UserID) && Equals(source.When, otherItem.When) && Equals(source.X, otherItem.X) && Equals(source.Y, otherItem.Y); }
/// <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(IWorldStatsQuestAcceptTable source, IDictionary<String, Object> dic) { dic["id"] = source.ID; dic["map_id"] = source.MapID; dic["quest_id"] = source.QuestID; dic["user_id"] = source.UserID; dic["when"] = source.When; dic["x"] = source.X; dic["y"] = source.Y; }