/// <summary>
 /// Checks if this <see cref="IWorldStatsUserKillNpcTable"/> contains the same values as another <see cref="IWorldStatsUserKillNpcTable"/>.
 /// </summary>
 /// <param name="source">The source <see cref="IWorldStatsUserKillNpcTable"/>.</param>
 /// <param name="otherItem">The <see cref="IWorldStatsUserKillNpcTable"/> to compare the values to.</param>
 /// <returns>
 /// True if this <see cref="IWorldStatsUserKillNpcTable"/> contains the same values as the <paramref name="otherItem"/>; otherwise false.
 /// </returns>
 public static Boolean HasSameValues(this IWorldStatsUserKillNpcTable source, IWorldStatsUserKillNpcTable otherItem)
 {
     return(Equals(source.ID, otherItem.ID) && Equals(source.MapID, otherItem.MapID) &&
            Equals(source.NPCTemplateID, otherItem.NPCTemplateID) && Equals(source.NpcX, otherItem.NpcX) &&
            Equals(source.NpcY, otherItem.NpcY) && Equals(source.UserID, otherItem.UserID) &&
            Equals(source.UserLevel, otherItem.UserLevel) && Equals(source.UserX, otherItem.UserX) &&
            Equals(source.UserY, otherItem.UserY) && Equals(source.When, otherItem.When));
 }
 /// <summary>
 /// Checks if this <see cref="IWorldStatsUserKillNpcTable"/> contains the same values as another <see cref="IWorldStatsUserKillNpcTable"/>.
 /// </summary>
 /// <param name="source">The source <see cref="IWorldStatsUserKillNpcTable"/>.</param>
 /// <param name="otherItem">The <see cref="IWorldStatsUserKillNpcTable"/> to compare the values to.</param>
 /// <returns>
 /// True if this <see cref="IWorldStatsUserKillNpcTable"/> contains the same values as the <paramref name="otherItem"/>; otherwise false.
 /// </returns>
 public static Boolean HasSameValues(this IWorldStatsUserKillNpcTable source, IWorldStatsUserKillNpcTable otherItem)
 {
     return Equals(source.ID, otherItem.ID) && Equals(source.MapID, otherItem.MapID) &&
            Equals(source.NPCTemplateID, otherItem.NPCTemplateID) && Equals(source.NpcX, otherItem.NpcX) &&
            Equals(source.NpcY, otherItem.NpcY) && Equals(source.UserID, otherItem.UserID) &&
            Equals(source.UserLevel, otherItem.UserLevel) && Equals(source.UserX, otherItem.UserX) &&
            Equals(source.UserY, otherItem.UserY) && Equals(source.When, otherItem.When);
 }
/// <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 IWorldStatsUserKillNpcTable 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 "map_id":
                    paramValues[i] = (System.Nullable <System.UInt16>)source.MapID;
                    break;


                case "npc_template_id":
                    paramValues[i] = (System.Nullable <System.UInt16>)source.NPCTemplateID;
                    break;


                case "npc_x":
                    paramValues[i] = (System.UInt16)source.NpcX;
                    break;


                case "npc_y":
                    paramValues[i] = (System.UInt16)source.NpcY;
                    break;


                case "user_id":
                    paramValues[i] = (System.Int32)source.UserID;
                    break;


                case "user_level":
                    paramValues[i] = (System.Int16)source.UserLevel;
                    break;


                case "user_x":
                    paramValues[i] = (System.UInt16)source.UserX;
                    break;


                case "user_y":
                    paramValues[i] = (System.UInt16)source.UserY;
                    break;


                case "when":
                    paramValues[i] = (System.DateTime)source.When;
                    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 IWorldStatsUserKillNpcTable source, DbParameterValues paramValues)
 {
     paramValues["id"]              = source.ID;
     paramValues["map_id"]          = (ushort?)source.MapID;
     paramValues["npc_template_id"] = (ushort?)source.NPCTemplateID;
     paramValues["npc_x"]           = source.NpcX;
     paramValues["npc_y"]           = source.NpcY;
     paramValues["user_id"]         = (Int32)source.UserID;
     paramValues["user_level"]      = source.UserLevel;
     paramValues["user_x"]          = source.UserX;
     paramValues["user_y"]          = source.UserY;
     paramValues["when"]            = source.When;
 }
Пример #5
0
 /// <summary>
 /// Copies the values from the given <paramref name="source"/> into this WorldStatsUserKillNpcTable.
 /// </summary>
 /// <param name="source">The IWorldStatsUserKillNpcTable to copy the values from.</param>
 public void CopyValuesFrom(IWorldStatsUserKillNpcTable source)
 {
     ID            = source.ID;
     MapID         = source.MapID;
     NPCTemplateID = source.NPCTemplateID;
     NpcX          = source.NpcX;
     NpcY          = source.NpcY;
     UserID        = source.UserID;
     UserLevel     = source.UserLevel;
     UserX         = source.UserX;
     UserY         = source.UserY;
     When          = source.When;
 }
Пример #6
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(IWorldStatsUserKillNpcTable source, IDictionary <String, Object> dic)
 {
     dic["id"]              = source.ID;
     dic["map_id"]          = source.MapID;
     dic["npc_template_id"] = source.NPCTemplateID;
     dic["npc_x"]           = source.NpcX;
     dic["npc_y"]           = source.NpcY;
     dic["user_id"]         = source.UserID;
     dic["user_level"]      = source.UserLevel;
     dic["user_x"]          = source.UserX;
     dic["user_y"]          = source.UserY;
     dic["when"]            = source.When;
 }
/// <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 IWorldStatsUserKillNpcTable source, NetGore.Db.DbParameterValues paramValues)
        {
            paramValues["id"]              = (System.UInt32)source.ID;
            paramValues["map_id"]          = (System.Nullable <System.UInt16>)source.MapID;
            paramValues["npc_template_id"] = (System.Nullable <System.UInt16>)source.NPCTemplateID;
            paramValues["npc_x"]           = (System.UInt16)source.NpcX;
            paramValues["npc_y"]           = (System.UInt16)source.NpcY;
            paramValues["user_id"]         = (System.Int32)source.UserID;
            paramValues["user_level"]      = (System.Int16)source.UserLevel;
            paramValues["user_x"]          = (System.UInt16)source.UserX;
            paramValues["user_y"]          = (System.UInt16)source.UserY;
            paramValues["when"]            = (System.DateTime)source.When;
        }
/// <summary>
/// Copies the values from the given <paramref name="source"/> into this WorldStatsUserKillNpcTable.
/// </summary>
/// <param name="source">The IWorldStatsUserKillNpcTable to copy the values from.</param>
        public void CopyValuesFrom(IWorldStatsUserKillNpcTable source)
        {
            this.ID            = (System.UInt32)source.ID;
            this.MapID         = (System.Nullable <NetGore.World.MapID>)source.MapID;
            this.NPCTemplateID = (System.Nullable <DemoGame.CharacterTemplateID>)source.NPCTemplateID;
            this.NpcX          = (System.UInt16)source.NpcX;
            this.NpcY          = (System.UInt16)source.NpcY;
            this.UserID        = (DemoGame.CharacterID)source.UserID;
            this.UserLevel     = (System.Int16)source.UserLevel;
            this.UserX         = (System.UInt16)source.UserX;
            this.UserY         = (System.UInt16)source.UserY;
            this.When          = (System.DateTime)source.When;
        }
/// <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(IWorldStatsUserKillNpcTable source, System.Collections.Generic.IDictionary <System.String, System.Object> dic)
        {
            dic["id"]              = (System.UInt32)source.ID;
            dic["map_id"]          = (System.Nullable <NetGore.World.MapID>)source.MapID;
            dic["npc_template_id"] = (System.Nullable <DemoGame.CharacterTemplateID>)source.NPCTemplateID;
            dic["npc_x"]           = (System.UInt16)source.NpcX;
            dic["npc_y"]           = (System.UInt16)source.NpcY;
            dic["user_id"]         = (DemoGame.CharacterID)source.UserID;
            dic["user_level"]      = (System.Int16)source.UserLevel;
            dic["user_x"]          = (System.UInt16)source.UserX;
            dic["user_y"]          = (System.UInt16)source.UserY;
            dic["when"]            = (System.DateTime)source.When;
        }
        /// <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 IWorldStatsUserKillNpcTable source, DbParameterValues paramValues)
        {
            for (var i = 0; i < paramValues.Count; i++)
            {
                switch (paramValues.GetParameterName(i))
                {
                case "id":
                    paramValues[i] = source.ID;
                    break;

                case "map_id":
                    paramValues[i] = (ushort?)source.MapID;
                    break;

                case "npc_template_id":
                    paramValues[i] = (ushort?)source.NPCTemplateID;
                    break;

                case "npc_x":
                    paramValues[i] = source.NpcX;
                    break;

                case "npc_y":
                    paramValues[i] = source.NpcY;
                    break;

                case "user_id":
                    paramValues[i] = (Int32)source.UserID;
                    break;

                case "user_level":
                    paramValues[i] = source.UserLevel;
                    break;

                case "user_x":
                    paramValues[i] = source.UserX;
                    break;

                case "user_y":
                    paramValues[i] = source.UserY;
                    break;

                case "when":
                    paramValues[i] = source.When;
                    break;
                }
            }
        }
Пример #11
0
 /// <summary>
 /// Initializes a new instance of the <see cref="WorldStatsUserKillNpcTable"/> class.
 /// </summary>
 /// <param name="source">IWorldStatsUserKillNpcTable to copy the initial values from.</param>
 public WorldStatsUserKillNpcTable(IWorldStatsUserKillNpcTable source)
 {
     CopyValuesFrom(source);
 }
Пример #12
0
/// <summary>
/// Copies the values from the given <paramref name="source"/> into this WorldStatsUserKillNpcTable.
/// </summary>
/// <param name="source">The IWorldStatsUserKillNpcTable to copy the values from.</param>
public void CopyValuesFrom(IWorldStatsUserKillNpcTable source)
{
this.ID = (System.UInt32)source.ID;
this.MapID = (System.Nullable<NetGore.World.MapID>)source.MapID;
this.NPCTemplateID = (System.Nullable<DemoGame.CharacterTemplateID>)source.NPCTemplateID;
this.NpcX = (System.UInt16)source.NpcX;
this.NpcY = (System.UInt16)source.NpcY;
this.UserID = (DemoGame.CharacterID)source.UserID;
this.UserLevel = (System.Int16)source.UserLevel;
this.UserX = (System.UInt16)source.UserX;
this.UserY = (System.UInt16)source.UserY;
this.When = (System.DateTime)source.When;
}
Пример #13
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(IWorldStatsUserKillNpcTable source, System.Collections.Generic.IDictionary<System.String,System.Object> dic)
{
dic["id"] = (System.UInt32)source.ID;
dic["map_id"] = (System.Nullable<NetGore.World.MapID>)source.MapID;
dic["npc_template_id"] = (System.Nullable<DemoGame.CharacterTemplateID>)source.NPCTemplateID;
dic["npc_x"] = (System.UInt16)source.NpcX;
dic["npc_y"] = (System.UInt16)source.NpcY;
dic["user_id"] = (DemoGame.CharacterID)source.UserID;
dic["user_level"] = (System.Int16)source.UserLevel;
dic["user_x"] = (System.UInt16)source.UserX;
dic["user_y"] = (System.UInt16)source.UserY;
dic["when"] = (System.DateTime)source.When;
}
Пример #14
0
/// <summary>
/// Initializes a new instance of the <see cref="WorldStatsUserKillNpcTable"/> class.
/// </summary>
/// <param name="source">IWorldStatsUserKillNpcTable to copy the initial values from.</param>
public WorldStatsUserKillNpcTable(IWorldStatsUserKillNpcTable source)
{
CopyValuesFrom(source);
}
 /// <summary>
 /// Copies the values from the given <paramref name="source"/> into this WorldStatsUserKillNpcTable.
 /// </summary>
 /// <param name="source">The IWorldStatsUserKillNpcTable to copy the values from.</param>
 public void CopyValuesFrom(IWorldStatsUserKillNpcTable source)
 {
     ID = source.ID;
     MapID = source.MapID;
     NPCTemplateID = source.NPCTemplateID;
     NpcX = source.NpcX;
     NpcY = source.NpcY;
     UserID = source.UserID;
     UserLevel = source.UserLevel;
     UserX = source.UserX;
     UserY = source.UserY;
     When = source.When;
 }
 /// <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(IWorldStatsUserKillNpcTable source, IDictionary<String, Object> dic)
 {
     dic["id"] = source.ID;
     dic["map_id"] = source.MapID;
     dic["npc_template_id"] = source.NPCTemplateID;
     dic["npc_x"] = source.NpcX;
     dic["npc_y"] = source.NpcY;
     dic["user_id"] = source.UserID;
     dic["user_level"] = source.UserLevel;
     dic["user_x"] = source.UserX;
     dic["user_y"] = source.UserY;
     dic["when"] = source.When;
 }