/// <summary>
/// Copies the values from the given <paramref name="source"/> into this WorldStatsUserConsumeItemTable.
/// </summary>
/// <param name="source">The IWorldStatsUserConsumeItemTable to copy the values from.</param>
        public void CopyValuesFrom(IWorldStatsUserConsumeItemTable source)
        {
            this.ID             = (System.UInt32)source.ID;
            this.ItemTemplateID = (DemoGame.ItemTemplateID)source.ItemTemplateID;
            this.MapID          = (System.Nullable <NetGore.World.MapID>)source.MapID;
            this.UserID         = (DemoGame.CharacterID)source.UserID;
            this.When           = (System.DateTime)source.When;
            this.X = (System.UInt16)source.X;
            this.Y = (System.UInt16)source.Y;
        }
Exemplo n.º 2
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(IWorldStatsUserConsumeItemTable source, IDictionary <String, Object> dic)
 {
     dic["id"] = source.ID;
     dic["item_template_id"] = source.ItemTemplateID;
     dic["map_id"]           = source.MapID;
     dic["user_id"]          = source.UserID;
     dic["when"]             = source.When;
     dic["x"] = source.X;
     dic["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(IWorldStatsUserConsumeItemTable source, System.Collections.Generic.IDictionary <System.String, System.Object> dic)
        {
            dic["id"] = (System.UInt32)source.ID;
            dic["item_template_id"] = (DemoGame.ItemTemplateID)source.ItemTemplateID;
            dic["map_id"]           = (System.Nullable <NetGore.World.MapID>)source.MapID;
            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;
        }
Exemplo n.º 4
0
 /// <summary>
 /// Copies the values from the given <paramref name="source"/> into this WorldStatsUserConsumeItemTable.
 /// </summary>
 /// <param name="source">The IWorldStatsUserConsumeItemTable to copy the values from.</param>
 public void CopyValuesFrom(IWorldStatsUserConsumeItemTable source)
 {
     ID             = source.ID;
     ItemTemplateID = source.ItemTemplateID;
     MapID          = source.MapID;
     UserID         = source.UserID;
     When           = source.When;
     X = source.X;
     Y = 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 IWorldStatsUserConsumeItemTable source, NetGore.Db.DbParameterValues paramValues)
        {
            paramValues["id"] = (System.UInt32)source.ID;
            paramValues["item_template_id"] = (System.UInt16)source.ItemTemplateID;
            paramValues["map_id"]           = (System.Nullable <System.UInt16>)source.MapID;
            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>
/// Checks if this <see cref="IWorldStatsUserConsumeItemTable"/> contains the same values as another <see cref="IWorldStatsUserConsumeItemTable"/>.
/// </summary>
/// <param name="source">The source <see cref="IWorldStatsUserConsumeItemTable"/>.</param>
/// <param name="otherItem">The <see cref="IWorldStatsUserConsumeItemTable"/> to compare the values to.</param>
/// <returns>
/// True if this <see cref="IWorldStatsUserConsumeItemTable"/> contains the same values as the <paramref name="otherItem"/>; otherwise false.
/// </returns>
        public static System.Boolean HasSameValues(this IWorldStatsUserConsumeItemTable source, IWorldStatsUserConsumeItemTable otherItem)
        {
            return(Equals(source.ID, otherItem.ID) &&
                   Equals(source.ItemTemplateID, otherItem.ItemTemplateID) &&
                   Equals(source.MapID, otherItem.MapID) &&
                   Equals(source.UserID, otherItem.UserID) &&
                   Equals(source.When, otherItem.When) &&
                   Equals(source.X, otherItem.X) &&
                   Equals(source.Y, otherItem.Y));
        }
Exemplo n.º 7
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 IWorldStatsUserConsumeItemTable source, DbParameterValues paramValues)
 {
     paramValues["id"] = source.ID;
     paramValues["item_template_id"] = (UInt16)source.ItemTemplateID;
     paramValues["map_id"]           = (ushort?)source.MapID;
     paramValues["user_id"]          = (Int32)source.UserID;
     paramValues["when"]             = source.When;
     paramValues["x"] = source.X;
     paramValues["y"] = source.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 IWorldStatsUserConsumeItemTable 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 "item_template_id":
                    paramValues[i] = (System.UInt16)source.ItemTemplateID;
                    break;


                case "map_id":
                    paramValues[i] = (System.Nullable <System.UInt16>)source.MapID;
                    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;
                }
            }
        }
Exemplo n.º 9
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 IWorldStatsUserConsumeItemTable source, DbParameterValues paramValues)
        {
            for (var i = 0; i < paramValues.Count; i++)
            {
                switch (paramValues.GetParameterName(i))
                {
                case "id":
                    paramValues[i] = source.ID;
                    break;

                case "item_template_id":
                    paramValues[i] = (UInt16)source.ItemTemplateID;
                    break;

                case "map_id":
                    paramValues[i] = (ushort?)source.MapID;
                    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;
                }
            }
        }
Exemplo n.º 10
0
/// <summary>
/// Initializes a new instance of the <see cref="WorldStatsUserConsumeItemTable"/> class.
/// </summary>
/// <param name="source">IWorldStatsUserConsumeItemTable to copy the initial values from.</param>
        public WorldStatsUserConsumeItemTable(IWorldStatsUserConsumeItemTable source)
        {
            CopyValuesFrom(source);
        }
 /// <summary>
 /// Copies the values from the given <paramref name="source"/> into this WorldStatsUserConsumeItemTable.
 /// </summary>
 /// <param name="source">The IWorldStatsUserConsumeItemTable to copy the values from.</param>
 public void CopyValuesFrom(IWorldStatsUserConsumeItemTable source)
 {
     ID = source.ID;
     ItemTemplateID = source.ItemTemplateID;
     MapID = source.MapID;
     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(IWorldStatsUserConsumeItemTable source, IDictionary<String, Object> dic)
 {
     dic["id"] = source.ID;
     dic["item_template_id"] = source.ItemTemplateID;
     dic["map_id"] = source.MapID;
     dic["user_id"] = source.UserID;
     dic["when"] = source.When;
     dic["x"] = source.X;
     dic["y"] = source.Y;
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="WorldStatsUserConsumeItemTable"/> class.
 /// </summary>
 /// <param name="source">IWorldStatsUserConsumeItemTable to copy the initial values from.</param>
 public WorldStatsUserConsumeItemTable(IWorldStatsUserConsumeItemTable source)
 {
     CopyValuesFrom(source);
 }
/// <summary>
/// Copies the values from the given <paramref name="source"/> into this WorldStatsUserConsumeItemTable.
/// </summary>
/// <param name="source">The IWorldStatsUserConsumeItemTable to copy the values from.</param>
public void CopyValuesFrom(IWorldStatsUserConsumeItemTable source)
{
this.ID = (System.UInt32)source.ID;
this.ItemTemplateID = (DemoGame.ItemTemplateID)source.ItemTemplateID;
this.MapID = (System.Nullable<NetGore.World.MapID>)source.MapID;
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(IWorldStatsUserConsumeItemTable source, System.Collections.Generic.IDictionary<System.String,System.Object> dic)
{
dic["id"] = (System.UInt32)source.ID;
dic["item_template_id"] = (DemoGame.ItemTemplateID)source.ItemTemplateID;
dic["map_id"] = (System.Nullable<NetGore.World.MapID>)source.MapID;
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>
 /// Checks if this <see cref="IWorldStatsUserConsumeItemTable"/> contains the same values as another <see cref="IWorldStatsUserConsumeItemTable"/>.
 /// </summary>
 /// <param name="source">The source <see cref="IWorldStatsUserConsumeItemTable"/>.</param>
 /// <param name="otherItem">The <see cref="IWorldStatsUserConsumeItemTable"/> to compare the values to.</param>
 /// <returns>
 /// True if this <see cref="IWorldStatsUserConsumeItemTable"/> contains the same values as the <paramref name="otherItem"/>; otherwise false.
 /// </returns>
 public static Boolean HasSameValues(this IWorldStatsUserConsumeItemTable source, IWorldStatsUserConsumeItemTable otherItem)
 {
     return Equals(source.ID, otherItem.ID) && Equals(source.ItemTemplateID, otherItem.ItemTemplateID) &&
            Equals(source.MapID, otherItem.MapID) && Equals(source.UserID, otherItem.UserID) &&
            Equals(source.When, otherItem.When) && Equals(source.X, otherItem.X) && Equals(source.Y, otherItem.Y);
 }