Exemple #1
0
 /// <summary>
 /// Checks if this <see cref="IWorldStatsNpcKillUserTable"/> contains the same values as another <see cref="IWorldStatsNpcKillUserTable"/>.
 /// </summary>
 /// <param name="source">The source <see cref="IWorldStatsNpcKillUserTable"/>.</param>
 /// <param name="otherItem">The <see cref="IWorldStatsNpcKillUserTable"/> to compare the values to.</param>
 /// <returns>
 /// True if this <see cref="IWorldStatsNpcKillUserTable"/> contains the same values as the <paramref name="otherItem"/>; otherwise false.
 /// </returns>
 public static Boolean HasSameValues(this IWorldStatsNpcKillUserTable source, IWorldStatsNpcKillUserTable 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="IWorldStatsNpcKillUserTable"/> contains the same values as another <see cref="IWorldStatsNpcKillUserTable"/>.
 /// </summary>
 /// <param name="source">The source <see cref="IWorldStatsNpcKillUserTable"/>.</param>
 /// <param name="otherItem">The <see cref="IWorldStatsNpcKillUserTable"/> to compare the values to.</param>
 /// <returns>
 /// True if this <see cref="IWorldStatsNpcKillUserTable"/> contains the same values as the <paramref name="otherItem"/>; otherwise false.
 /// </returns>
 public static Boolean HasSameValues(this IWorldStatsNpcKillUserTable source, IWorldStatsNpcKillUserTable 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 IWorldStatsNpcKillUserTable 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;
                }
            }
        }
Exemple #4
0
 /// <summary>
 /// Copies the values from the given <paramref name="source"/> into this WorldStatsNpcKillUserTable.
 /// </summary>
 /// <param name="source">The IWorldStatsNpcKillUserTable to copy the values from.</param>
 public void CopyValuesFrom(IWorldStatsNpcKillUserTable 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;
 }
Exemple #5
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(IWorldStatsNpcKillUserTable 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;
 }
Exemple #6
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 IWorldStatsNpcKillUserTable 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;
 }
Exemple #7
0
/// <summary>
/// Copies the values from the given <paramref name="source"/> into this WorldStatsNpcKillUserTable.
/// </summary>
/// <param name="source">The IWorldStatsNpcKillUserTable to copy the values from.</param>
        public void CopyValuesFrom(IWorldStatsNpcKillUserTable 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;
        }
Exemple #8
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(IWorldStatsNpcKillUserTable 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 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 IWorldStatsNpcKillUserTable 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;
        }
Exemple #10
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 IWorldStatsNpcKillUserTable 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;
                }
            }
        }
/// <summary>
/// Copies the values from the given <paramref name="source"/> into this WorldStatsNpcKillUserTable.
/// </summary>
/// <param name="source">The IWorldStatsNpcKillUserTable to copy the values from.</param>
public void CopyValuesFrom(IWorldStatsNpcKillUserTable 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(IWorldStatsNpcKillUserTable 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>
/// Initializes a new instance of the <see cref="WorldStatsNpcKillUserTable"/> class.
/// </summary>
/// <param name="source">IWorldStatsNpcKillUserTable to copy the initial values from.</param>
public WorldStatsNpcKillUserTable(IWorldStatsNpcKillUserTable source)
{
CopyValuesFrom(source);
}
Exemple #14
0
 /// <summary>
 /// Initializes a new instance of the <see cref="WorldStatsNpcKillUserTable"/> class.
 /// </summary>
 /// <param name="source">IWorldStatsNpcKillUserTable to copy the initial values from.</param>
 public WorldStatsNpcKillUserTable(IWorldStatsNpcKillUserTable source)
 {
     CopyValuesFrom(source);
 }
 /// <summary>
 /// Copies the values from the given <paramref name="source"/> into this WorldStatsNpcKillUserTable.
 /// </summary>
 /// <param name="source">The IWorldStatsNpcKillUserTable to copy the values from.</param>
 public void CopyValuesFrom(IWorldStatsNpcKillUserTable 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(IWorldStatsNpcKillUserTable 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;
 }