/// <summary> /// Checks if this <see cref="IGuildEventTable"/> contains the same values as another <see cref="IGuildEventTable"/>. /// </summary> /// <param name="source">The source <see cref="IGuildEventTable"/>.</param> /// <param name="otherItem">The <see cref="IGuildEventTable"/> to compare the values to.</param> /// <returns> /// True if this <see cref="IGuildEventTable"/> contains the same values as the <paramref name="otherItem"/>; otherwise false. /// </returns> public static Boolean HasSameValues(this IGuildEventTable source, IGuildEventTable otherItem) { return(Equals(source.Arg0, otherItem.Arg0) && Equals(source.Arg1, otherItem.Arg1) && Equals(source.Arg2, otherItem.Arg2) && Equals(source.CharacterID, otherItem.CharacterID) && Equals(source.Created, otherItem.Created) && Equals(source.EventID, otherItem.EventID) && Equals(source.GuildID, otherItem.GuildID) && Equals(source.ID, otherItem.ID) && Equals(source.TargetCharacterID, otherItem.TargetCharacterID)); }
/// <summary> /// Checks if this <see cref="IGuildEventTable"/> contains the same values as another <see cref="IGuildEventTable"/>. /// </summary> /// <param name="source">The source <see cref="IGuildEventTable"/>.</param> /// <param name="otherItem">The <see cref="IGuildEventTable"/> to compare the values to.</param> /// <returns> /// True if this <see cref="IGuildEventTable"/> contains the same values as the <paramref name="otherItem"/>; otherwise false. /// </returns> public static Boolean HasSameValues(this IGuildEventTable source, IGuildEventTable otherItem) { return Equals(source.Arg0, otherItem.Arg0) && Equals(source.Arg1, otherItem.Arg1) && Equals(source.Arg2, otherItem.Arg2) && Equals(source.CharacterID, otherItem.CharacterID) && Equals(source.Created, otherItem.Created) && Equals(source.EventID, otherItem.EventID) && Equals(source.GuildID, otherItem.GuildID) && Equals(source.ID, otherItem.ID) && Equals(source.TargetCharacterID, otherItem.TargetCharacterID); }
/// <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 IGuildEventTable source, NetGore.Db.DbParameterValues paramValues) { paramValues["arg0"] = (System.String)source.Arg0; paramValues["arg1"] = (System.String)source.Arg1; paramValues["arg2"] = (System.String)source.Arg2; paramValues["character_id"] = (System.Int32)source.CharacterID; paramValues["created"] = (System.DateTime)source.Created; paramValues["event_id"] = (System.Byte)source.EventID; paramValues["guild_id"] = (System.UInt16)source.GuildID; paramValues["id"] = (System.Int32)source.ID; paramValues["target_character_id"] = (System.Nullable <System.Int32>)source.TargetCharacterID; }
/// <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 IGuildEventTable source, DbParameterValues paramValues) { paramValues["arg0"] = source.Arg0; paramValues["arg1"] = source.Arg1; paramValues["arg2"] = source.Arg2; paramValues["character_id"] = (Int32)source.CharacterID; paramValues["created"] = source.Created; paramValues["event_id"] = source.EventID; paramValues["guild_id"] = (UInt16)source.GuildID; paramValues["id"] = source.ID; paramValues["target_character_id"] = (int?)source.TargetCharacterID; }
/// <summary> /// Copies the values from the given <paramref name="source"/> into this GuildEventTable. /// </summary> /// <param name="source">The IGuildEventTable to copy the values from.</param> public void CopyValuesFrom(IGuildEventTable source) { Arg0 = source.Arg0; Arg1 = source.Arg1; Arg2 = source.Arg2; CharacterID = source.CharacterID; Created = source.Created; EventID = source.EventID; GuildID = source.GuildID; ID = source.ID; TargetCharacterID = source.TargetCharacterID; }
/// <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(IGuildEventTable source, IDictionary <String, Object> dic) { dic["arg0"] = source.Arg0; dic["arg1"] = source.Arg1; dic["arg2"] = source.Arg2; dic["character_id"] = source.CharacterID; dic["created"] = source.Created; dic["event_id"] = source.EventID; dic["guild_id"] = source.GuildID; dic["id"] = source.ID; dic["target_character_id"] = source.TargetCharacterID; }
/// <summary> /// Copies the values from the given <paramref name="source"/> into this GuildEventTable. /// </summary> /// <param name="source">The IGuildEventTable to copy the values from.</param> public void CopyValuesFrom(IGuildEventTable source) { this.Arg0 = (System.String)source.Arg0; this.Arg1 = (System.String)source.Arg1; this.Arg2 = (System.String)source.Arg2; this.CharacterID = (DemoGame.CharacterID)source.CharacterID; this.Created = (System.DateTime)source.Created; this.EventID = (System.Byte)source.EventID; this.GuildID = (NetGore.Features.Guilds.GuildID)source.GuildID; this.ID = (System.Int32)source.ID; this.TargetCharacterID = (System.Nullable <DemoGame.CharacterID>)source.TargetCharacterID; }
/// <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(IGuildEventTable source, System.Collections.Generic.IDictionary <System.String, System.Object> dic) { dic["arg0"] = (System.String)source.Arg0; dic["arg1"] = (System.String)source.Arg1; dic["arg2"] = (System.String)source.Arg2; dic["character_id"] = (DemoGame.CharacterID)source.CharacterID; dic["created"] = (System.DateTime)source.Created; dic["event_id"] = (System.Byte)source.EventID; dic["guild_id"] = (NetGore.Features.Guilds.GuildID)source.GuildID; dic["id"] = (System.Int32)source.ID; dic["target_character_id"] = (System.Nullable <DemoGame.CharacterID>)source.TargetCharacterID; }
/// <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 IGuildEventTable source, NetGore.Db.DbParameterValues paramValues) { for (int i = 0; i < paramValues.Count; i++) { switch (paramValues.GetParameterName(i)) { case "arg0": paramValues[i] = (System.String)source.Arg0; break; case "arg1": paramValues[i] = (System.String)source.Arg1; break; case "arg2": paramValues[i] = (System.String)source.Arg2; break; case "character_id": paramValues[i] = (System.Int32)source.CharacterID; break; case "created": paramValues[i] = (System.DateTime)source.Created; break; case "event_id": paramValues[i] = (System.Byte)source.EventID; break; case "guild_id": paramValues[i] = (System.UInt16)source.GuildID; break; case "id": paramValues[i] = (System.Int32)source.ID; break; case "target_character_id": paramValues[i] = (System.Nullable <System.Int32>)source.TargetCharacterID; 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 IGuildEventTable source, DbParameterValues paramValues) { for (var i = 0; i < paramValues.Count; i++) { switch (paramValues.GetParameterName(i)) { case "arg0": paramValues[i] = source.Arg0; break; case "arg1": paramValues[i] = source.Arg1; break; case "arg2": paramValues[i] = source.Arg2; break; case "character_id": paramValues[i] = (Int32)source.CharacterID; break; case "created": paramValues[i] = source.Created; break; case "event_id": paramValues[i] = source.EventID; break; case "guild_id": paramValues[i] = (UInt16)source.GuildID; break; case "id": paramValues[i] = source.ID; break; case "target_character_id": paramValues[i] = (int?)source.TargetCharacterID; break; } } }
/// <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(IGuildEventTable source, IDictionary<String, Object> dic) { dic["arg0"] = source.Arg0; dic["arg1"] = source.Arg1; dic["arg2"] = source.Arg2; dic["character_id"] = source.CharacterID; dic["created"] = source.Created; dic["event_id"] = source.EventID; dic["guild_id"] = source.GuildID; dic["id"] = source.ID; dic["target_character_id"] = source.TargetCharacterID; }
/// <summary> /// Initializes a new instance of the <see cref="GuildEventTable"/> class. /// </summary> /// <param name="source">IGuildEventTable to copy the initial values from.</param> public GuildEventTable(IGuildEventTable source) { CopyValuesFrom(source); }
/// <summary> /// Copies the values from the given <paramref name="source"/> into this GuildEventTable. /// </summary> /// <param name="source">The IGuildEventTable to copy the values from.</param> public void CopyValuesFrom(IGuildEventTable source) { this.Arg0 = (System.String)source.Arg0; this.Arg1 = (System.String)source.Arg1; this.Arg2 = (System.String)source.Arg2; this.CharacterID = (DemoGame.CharacterID)source.CharacterID; this.Created = (System.DateTime)source.Created; this.EventID = (System.Byte)source.EventID; this.GuildID = (NetGore.Features.Guilds.GuildID)source.GuildID; this.ID = (System.Int32)source.ID; this.TargetCharacterID = (System.Nullable<DemoGame.CharacterID>)source.TargetCharacterID; }
/// <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(IGuildEventTable source, System.Collections.Generic.IDictionary<System.String,System.Object> dic) { dic["arg0"] = (System.String)source.Arg0; dic["arg1"] = (System.String)source.Arg1; dic["arg2"] = (System.String)source.Arg2; dic["character_id"] = (DemoGame.CharacterID)source.CharacterID; dic["created"] = (System.DateTime)source.Created; dic["event_id"] = (System.Byte)source.EventID; dic["guild_id"] = (NetGore.Features.Guilds.GuildID)source.GuildID; dic["id"] = (System.Int32)source.ID; dic["target_character_id"] = (System.Nullable<DemoGame.CharacterID>)source.TargetCharacterID; }