Example #1
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 IEventCountersGuildTable source, DbParameterValues paramValues)
        {
            for (var i = 0; i < paramValues.Count; i++)
            {
                switch (paramValues.GetParameterName(i))
                {
                case "counter":
                    paramValues[i] = source.Counter;
                    break;

                case "guild_event_counter_id":
                    paramValues[i] = source.GuildEventCounterId;
                    break;

                case "guild_id":
                    paramValues[i] = (UInt16)source.GuildID;
                    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 IEventCountersGuildTable source, NetGore.Db.DbParameterValues paramValues)
        {
            for (int i = 0; i < paramValues.Count; i++)
            {
                switch (paramValues.GetParameterName(i))
                {
                case "counter":
                    paramValues[i] = (System.Int64)source.Counter;
                    break;


                case "guild_event_counter_id":
                    paramValues[i] = (System.Byte)source.GuildEventCounterId;
                    break;


                case "guild_id":
                    paramValues[i] = (System.UInt16)source.GuildID;
                    break;
                }
            }
        }
/// <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 IEventCountersGuildTable source, NetGore.Db.DbParameterValues paramValues)
        {
            paramValues["counter"] = (System.Int64)source.Counter;
            paramValues["guild_event_counter_id"] = (System.Byte)source.GuildEventCounterId;
            paramValues["guild_id"] = (System.UInt16)source.GuildID;
        }
/// <summary>
/// Checks if this <see cref="IEventCountersGuildTable"/> contains the same values as another <see cref="IEventCountersGuildTable"/>.
/// </summary>
/// <param name="source">The source <see cref="IEventCountersGuildTable"/>.</param>
/// <param name="otherItem">The <see cref="IEventCountersGuildTable"/> to compare the values to.</param>
/// <returns>
/// True if this <see cref="IEventCountersGuildTable"/> contains the same values as the <paramref name="otherItem"/>; otherwise false.
/// </returns>
        public static System.Boolean HasSameValues(this IEventCountersGuildTable source, IEventCountersGuildTable otherItem)
        {
            return(Equals(source.Counter, otherItem.Counter) &&
                   Equals(source.GuildEventCounterId, otherItem.GuildEventCounterId) &&
                   Equals(source.GuildID, otherItem.GuildID));
        }
/// <summary>
/// Copies the values from the given <paramref name="source"/> into this EventCountersGuildTable.
/// </summary>
/// <param name="source">The IEventCountersGuildTable to copy the values from.</param>
public void CopyValuesFrom(IEventCountersGuildTable source)
{
this.Counter = (System.Int64)source.Counter;
this.GuildEventCounterId = (System.Byte)source.GuildEventCounterId;
this.GuildID = (NetGore.Features.Guilds.GuildID)source.GuildID;
}
/// <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(IEventCountersGuildTable source, System.Collections.Generic.IDictionary<System.String,System.Object> dic)
{
dic["counter"] = (System.Int64)source.Counter;
dic["guild_event_counter_id"] = (System.Byte)source.GuildEventCounterId;
dic["guild_id"] = (NetGore.Features.Guilds.GuildID)source.GuildID;
}
/// <summary>
/// Initializes a new instance of the <see cref="EventCountersGuildTable"/> class.
/// </summary>
/// <param name="source">IEventCountersGuildTable to copy the initial values from.</param>
public EventCountersGuildTable(IEventCountersGuildTable source)
{
CopyValuesFrom(source);
}
 /// <summary>
 /// Copies the values from the given <paramref name="source"/> into this EventCountersGuildTable.
 /// </summary>
 /// <param name="source">The IEventCountersGuildTable to copy the values from.</param>
 public void CopyValuesFrom(IEventCountersGuildTable source)
 {
     Counter = source.Counter;
     GuildEventCounterId = source.GuildEventCounterId;
     GuildID = source.GuildID;
 }
 /// <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(IEventCountersGuildTable source, IDictionary<String, Object> dic)
 {
     dic["counter"] = source.Counter;
     dic["guild_event_counter_id"] = source.GuildEventCounterId;
     dic["guild_id"] = source.GuildID;
 }
/// <summary>
/// Checks if this <see cref="IEventCountersGuildTable"/> contains the same values as another <see cref="IEventCountersGuildTable"/>.
/// </summary>
/// <param name="source">The source <see cref="IEventCountersGuildTable"/>.</param>
/// <param name="otherItem">The <see cref="IEventCountersGuildTable"/> to compare the values to.</param>
/// <returns>
/// True if this <see cref="IEventCountersGuildTable"/> contains the same values as the <paramref name="otherItem"/>; otherwise false.
/// </returns>
public static System.Boolean HasSameValues(this IEventCountersGuildTable source, IEventCountersGuildTable otherItem)
{
return Equals(source.Counter, otherItem.Counter) && 
Equals(source.GuildEventCounterId, otherItem.GuildEventCounterId) && 
Equals(source.GuildID, otherItem.GuildID);
}
Example #11
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 IEventCountersGuildTable source, DbParameterValues paramValues)
 {
     paramValues["counter"] = source.Counter;
     paramValues["guild_event_counter_id"] = source.GuildEventCounterId;
     paramValues["guild_id"] = (UInt16)source.GuildID;
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="EventCountersGuildTable"/> class.
 /// </summary>
 /// <param name="source">IEventCountersGuildTable to copy the initial values from.</param>
 public EventCountersGuildTable(IEventCountersGuildTable source)
 {
     CopyValuesFrom(source);
 }
 /// <summary>
 /// Copies the values from the given <paramref name="source"/> into this EventCountersGuildTable.
 /// </summary>
 /// <param name="source">The IEventCountersGuildTable to copy the values from.</param>
 public void CopyValuesFrom(IEventCountersGuildTable source)
 {
     Counter             = source.Counter;
     GuildEventCounterId = source.GuildEventCounterId;
     GuildID             = source.GuildID;
 }
 /// <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(IEventCountersGuildTable source, IDictionary <String, Object> dic)
 {
     dic["counter"] = source.Counter;
     dic["guild_event_counter_id"] = source.GuildEventCounterId;
     dic["guild_id"] = source.GuildID;
 }
Example #15
0
/// <summary>
/// Copies the values from the given <paramref name="source"/> into this EventCountersGuildTable.
/// </summary>
/// <param name="source">The IEventCountersGuildTable to copy the values from.</param>
        public void CopyValuesFrom(IEventCountersGuildTable source)
        {
            this.Counter             = (System.Int64)source.Counter;
            this.GuildEventCounterId = (System.Byte)source.GuildEventCounterId;
            this.GuildID             = (NetGore.Features.Guilds.GuildID)source.GuildID;
        }
Example #16
0
/// <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(IEventCountersGuildTable source, System.Collections.Generic.IDictionary <System.String, System.Object> dic)
        {
            dic["counter"] = (System.Int64)source.Counter;
            dic["guild_event_counter_id"] = (System.Byte)source.GuildEventCounterId;
            dic["guild_id"] = (NetGore.Features.Guilds.GuildID)source.GuildID;
        }