/// <summary> /// Copies the values from the given <paramref name="source"/> into this GuildMemberTable. /// </summary> /// <param name="source">The IGuildMemberTable to copy the values from.</param> public void CopyValuesFrom(IGuildMemberTable source) { this.CharacterID = (DemoGame.CharacterID)source.CharacterID; this.GuildID = (NetGore.Features.Guilds.GuildID)source.GuildID; this.Joined = (System.DateTime)source.Joined; this.Rank = (NetGore.Features.Guilds.GuildRank)source.Rank; }
/// <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 IGuildMemberTable source, DbParameterValues paramValues) { paramValues["character_id"] = (Int32)source.CharacterID; paramValues["guild_id"] = (UInt16)source.GuildID; paramValues["joined"] = source.Joined; paramValues["rank"] = (Byte)source.Rank; }
/// <summary> /// Copies the values from the given <paramref name="source"/> into this GuildMemberTable. /// </summary> /// <param name="source">The IGuildMemberTable to copy the values from.</param> public void CopyValuesFrom(IGuildMemberTable source) { CharacterID = source.CharacterID; GuildID = source.GuildID; Joined = source.Joined; Rank = source.Rank; }
/// <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(IGuildMemberTable source, System.Collections.Generic.IDictionary <System.String, System.Object> dic) { dic["character_id"] = (DemoGame.CharacterID)source.CharacterID; dic["guild_id"] = (NetGore.Features.Guilds.GuildID)source.GuildID; dic["joined"] = (System.DateTime)source.Joined; dic["rank"] = (NetGore.Features.Guilds.GuildRank)source.Rank; }
/// <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(IGuildMemberTable source, IDictionary <String, Object> dic) { dic["character_id"] = source.CharacterID; dic["guild_id"] = source.GuildID; dic["joined"] = source.Joined; dic["rank"] = source.Rank; }
/// <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 IGuildMemberTable source, NetGore.Db.DbParameterValues paramValues) { paramValues["character_id"] = (System.Int32)source.CharacterID; paramValues["guild_id"] = (System.UInt16)source.GuildID; paramValues["joined"] = (System.DateTime)source.Joined; paramValues["rank"] = (System.Byte)source.Rank; }
/// <summary> /// Checks if this <see cref="IGuildMemberTable"/> contains the same values as another <see cref="IGuildMemberTable"/>. /// </summary> /// <param name="source">The source <see cref="IGuildMemberTable"/>.</param> /// <param name="otherItem">The <see cref="IGuildMemberTable"/> to compare the values to.</param> /// <returns> /// True if this <see cref="IGuildMemberTable"/> contains the same values as the <paramref name="otherItem"/>; otherwise false. /// </returns> public static System.Boolean HasSameValues(this IGuildMemberTable source, IGuildMemberTable otherItem) { return(Equals(source.CharacterID, otherItem.CharacterID) && Equals(source.GuildID, otherItem.GuildID) && Equals(source.Joined, otherItem.Joined) && Equals(source.Rank, otherItem.Rank)); }
/// <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 IGuildMemberTable 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 "guild_id": paramValues[i] = (System.UInt16)source.GuildID; break; case "joined": paramValues[i] = (System.DateTime)source.Joined; break; case "rank": paramValues[i] = (System.Byte)source.Rank; 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 IGuildMemberTable 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 "guild_id": paramValues[i] = (UInt16)source.GuildID; break; case "joined": paramValues[i] = source.Joined; break; case "rank": paramValues[i] = (Byte)source.Rank; break; } } }
/// <summary> /// Checks if this <see cref="IGuildMemberTable"/> contains the same values as another <see cref="IGuildMemberTable"/>. /// </summary> /// <param name="source">The source <see cref="IGuildMemberTable"/>.</param> /// <param name="otherItem">The <see cref="IGuildMemberTable"/> to compare the values to.</param> /// <returns> /// True if this <see cref="IGuildMemberTable"/> contains the same values as the <paramref name="otherItem"/>; otherwise false. /// </returns> public static System.Boolean HasSameValues(this IGuildMemberTable source, IGuildMemberTable otherItem) { return Equals(source.CharacterID, otherItem.CharacterID) && Equals(source.GuildID, otherItem.GuildID) && Equals(source.Joined, otherItem.Joined) && Equals(source.Rank, otherItem.Rank); }
/// <summary> /// Copies the values from the given <paramref name="source"/> into this GuildMemberTable. /// </summary> /// <param name="source">The IGuildMemberTable to copy the values from.</param> public void CopyValuesFrom(IGuildMemberTable source) { CharacterID = source.CharacterID; GuildID = source.GuildID; Joined = source.Joined; Rank = source.Rank; }
/// <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(IGuildMemberTable source, IDictionary<String, Object> dic) { dic["character_id"] = source.CharacterID; dic["guild_id"] = source.GuildID; dic["joined"] = source.Joined; dic["rank"] = source.Rank; }
/// <summary> /// Initializes a new instance of the <see cref="GuildMemberTable"/> class. /// </summary> /// <param name="source">IGuildMemberTable to copy the initial values from.</param> public GuildMemberTable(IGuildMemberTable source) { CopyValuesFrom(source); }
/// <summary> /// Copies the values from the given <paramref name="source"/> into this GuildMemberTable. /// </summary> /// <param name="source">The IGuildMemberTable to copy the values from.</param> public void CopyValuesFrom(IGuildMemberTable source) { this.CharacterID = (DemoGame.CharacterID)source.CharacterID; this.GuildID = (NetGore.Features.Guilds.GuildID)source.GuildID; this.Joined = (System.DateTime)source.Joined; this.Rank = (NetGore.Features.Guilds.GuildRank)source.Rank; }
/// <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(IGuildMemberTable source, System.Collections.Generic.IDictionary<System.String,System.Object> dic) { dic["character_id"] = (DemoGame.CharacterID)source.CharacterID; dic["guild_id"] = (NetGore.Features.Guilds.GuildID)source.GuildID; dic["joined"] = (System.DateTime)source.Joined; dic["rank"] = (NetGore.Features.Guilds.GuildRank)source.Rank; }
/// <summary> /// Initializes a new instance of the <see cref="GuildMemberTable"/> class. /// </summary> /// <param name="source">IGuildMemberTable to copy the initial values from.</param> public GuildMemberTable(IGuildMemberTable source) { CopyValuesFrom(source); }