/// <summary> /// Copies the values from the given <paramref name="source"/> into this WorldStatsCountUserConsumeItemTable. /// </summary> /// <param name="source">The IWorldStatsCountUserConsumeItemTable to copy the values from.</param> public void CopyValuesFrom(IWorldStatsCountUserConsumeItemTable source) { Count = source.Count; ItemTemplateID = source.ItemTemplateID; LastUpdate = source.LastUpdate; UserID = source.UserID; }
/// <summary> /// Checks if this <see cref="IWorldStatsCountUserConsumeItemTable"/> contains the same values as another <see cref="IWorldStatsCountUserConsumeItemTable"/>. /// </summary> /// <param name="source">The source <see cref="IWorldStatsCountUserConsumeItemTable"/>.</param> /// <param name="otherItem">The <see cref="IWorldStatsCountUserConsumeItemTable"/> to compare the values to.</param> /// <returns> /// True if this <see cref="IWorldStatsCountUserConsumeItemTable"/> contains the same values as the <paramref name="otherItem"/>; otherwise false. /// </returns> public static System.Boolean HasSameValues(this IWorldStatsCountUserConsumeItemTable source, IWorldStatsCountUserConsumeItemTable otherItem) { return(Equals(source.Count, otherItem.Count) && Equals(source.ItemTemplateID, otherItem.ItemTemplateID) && Equals(source.LastUpdate, otherItem.LastUpdate) && Equals(source.UserID, otherItem.UserID)); }
/// <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(IWorldStatsCountUserConsumeItemTable source, IDictionary <String, Object> dic) { dic["count"] = source.Count; dic["item_template_id"] = source.ItemTemplateID; dic["last_update"] = source.LastUpdate; dic["user_id"] = source.UserID; }
/// <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 IWorldStatsCountUserConsumeItemTable source, NetGore.Db.DbParameterValues paramValues) { paramValues["count"] = (System.Int32)source.Count; paramValues["item_template_id"] = (System.UInt16)source.ItemTemplateID; paramValues["last_update"] = (System.DateTime)source.LastUpdate; paramValues["user_id"] = (System.Int32)source.UserID; }
/// <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 IWorldStatsCountUserConsumeItemTable source, NetGore.Db.DbParameterValues paramValues) { for (int i = 0; i < paramValues.Count; i++) { switch (paramValues.GetParameterName(i)) { case "count": paramValues[i] = (System.Int32)source.Count; break; case "item_template_id": paramValues[i] = (System.UInt16)source.ItemTemplateID; break; case "last_update": paramValues[i] = (System.DateTime)source.LastUpdate; break; case "user_id": paramValues[i] = (System.Int32)source.UserID; break; } } }
/// <summary> /// Copies the values from the given <paramref name="source"/> into this WorldStatsCountUserConsumeItemTable. /// </summary> /// <param name="source">The IWorldStatsCountUserConsumeItemTable to copy the values from.</param> public void CopyValuesFrom(IWorldStatsCountUserConsumeItemTable source) { this.Count = (System.Int32)source.Count; this.ItemTemplateID = (DemoGame.ItemTemplateID)source.ItemTemplateID; this.LastUpdate = (System.DateTime)source.LastUpdate; this.UserID = (DemoGame.CharacterID)source.UserID; }
/// <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(IWorldStatsCountUserConsumeItemTable source, System.Collections.Generic.IDictionary <System.String, System.Object> dic) { dic["count"] = (System.Int32)source.Count; dic["item_template_id"] = (DemoGame.ItemTemplateID)source.ItemTemplateID; dic["last_update"] = (System.DateTime)source.LastUpdate; dic["user_id"] = (DemoGame.CharacterID)source.UserID; }
/// <summary> /// Initializes a new instance of the <see cref="WorldStatsCountUserConsumeItemTable"/> class. /// </summary> /// <param name="source">IWorldStatsCountUserConsumeItemTable to copy the initial values from.</param> public WorldStatsCountUserConsumeItemTable(IWorldStatsCountUserConsumeItemTable source) { CopyValuesFrom(source); }
/// <summary> /// Checks if this <see cref="IWorldStatsCountUserConsumeItemTable"/> contains the same values as another <see cref="IWorldStatsCountUserConsumeItemTable"/>. /// </summary> /// <param name="source">The source <see cref="IWorldStatsCountUserConsumeItemTable"/>.</param> /// <param name="otherItem">The <see cref="IWorldStatsCountUserConsumeItemTable"/> to compare the values to.</param> /// <returns> /// True if this <see cref="IWorldStatsCountUserConsumeItemTable"/> contains the same values as the <paramref name="otherItem"/>; otherwise false. /// </returns> public static System.Boolean HasSameValues(this IWorldStatsCountUserConsumeItemTable source, IWorldStatsCountUserConsumeItemTable otherItem) { return Equals(source.Count, otherItem.Count) && Equals(source.ItemTemplateID, otherItem.ItemTemplateID) && Equals(source.LastUpdate, otherItem.LastUpdate) && Equals(source.UserID, otherItem.UserID); }
/// <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(IWorldStatsCountUserConsumeItemTable source, IDictionary<String, Object> dic) { dic["count"] = source.Count; dic["item_template_id"] = source.ItemTemplateID; dic["last_update"] = source.LastUpdate; dic["user_id"] = source.UserID; }
/// <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(IWorldStatsCountUserConsumeItemTable source, System.Collections.Generic.IDictionary<System.String,System.Object> dic) { dic["count"] = (System.Int32)source.Count; dic["item_template_id"] = (DemoGame.ItemTemplateID)source.ItemTemplateID; dic["last_update"] = (System.DateTime)source.LastUpdate; dic["user_id"] = (DemoGame.CharacterID)source.UserID; }