コード例 #1
0
/// <summary>
/// Copies the values from the given <paramref name="source"/> into this WorldStatsCountUserKillNpcTable.
/// </summary>
/// <param name="source">The IWorldStatsCountUserKillNpcTable to copy the values from.</param>
        public void CopyValuesFrom(IWorldStatsCountUserKillNpcTable source)
        {
            this.Count         = (System.Int32)source.Count;
            this.LastUpdate    = (System.DateTime)source.LastUpdate;
            this.NPCTemplateID = (DemoGame.CharacterTemplateID)source.NPCTemplateID;
            this.UserID        = (DemoGame.CharacterID)source.UserID;
        }
コード例 #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(IWorldStatsCountUserKillNpcTable source, IDictionary <String, Object> dic)
 {
     dic["count"]           = source.Count;
     dic["last_update"]     = source.LastUpdate;
     dic["npc_template_id"] = source.NPCTemplateID;
     dic["user_id"]         = source.UserID;
 }
コード例 #3
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(IWorldStatsCountUserKillNpcTable source, System.Collections.Generic.IDictionary <System.String, System.Object> dic)
        {
            dic["count"]           = (System.Int32)source.Count;
            dic["last_update"]     = (System.DateTime)source.LastUpdate;
            dic["npc_template_id"] = (DemoGame.CharacterTemplateID)source.NPCTemplateID;
            dic["user_id"]         = (DemoGame.CharacterID)source.UserID;
        }
コード例 #4
0
 /// <summary>
 /// Copies the values from the given <paramref name="source"/> into this WorldStatsCountUserKillNpcTable.
 /// </summary>
 /// <param name="source">The IWorldStatsCountUserKillNpcTable to copy the values from.</param>
 public void CopyValuesFrom(IWorldStatsCountUserKillNpcTable source)
 {
     Count         = source.Count;
     LastUpdate    = source.LastUpdate;
     NPCTemplateID = source.NPCTemplateID;
     UserID        = source.UserID;
 }
 /// <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 IWorldStatsCountUserKillNpcTable source, DbParameterValues paramValues)
 {
     paramValues["count"]           = source.Count;
     paramValues["last_update"]     = source.LastUpdate;
     paramValues["npc_template_id"] = (UInt16)source.NPCTemplateID;
     paramValues["user_id"]         = (Int32)source.UserID;
 }
/// <summary>
/// Checks if this <see cref="IWorldStatsCountUserKillNpcTable"/> contains the same values as another <see cref="IWorldStatsCountUserKillNpcTable"/>.
/// </summary>
/// <param name="source">The source <see cref="IWorldStatsCountUserKillNpcTable"/>.</param>
/// <param name="otherItem">The <see cref="IWorldStatsCountUserKillNpcTable"/> to compare the values to.</param>
/// <returns>
/// True if this <see cref="IWorldStatsCountUserKillNpcTable"/> contains the same values as the <paramref name="otherItem"/>; otherwise false.
/// </returns>
        public static System.Boolean HasSameValues(this IWorldStatsCountUserKillNpcTable source, IWorldStatsCountUserKillNpcTable otherItem)
        {
            return(Equals(source.Count, otherItem.Count) &&
                   Equals(source.LastUpdate, otherItem.LastUpdate) &&
                   Equals(source.NPCTemplateID, otherItem.NPCTemplateID) &&
                   Equals(source.UserID, otherItem.UserID));
        }
/// <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 IWorldStatsCountUserKillNpcTable source, NetGore.Db.DbParameterValues paramValues)
        {
            for (int i = 0; i < paramValues.Count; i++)
            {
                switch (paramValues.GetParameterName(i))
                {
                case "count":
                    paramValues[i] = (System.Int32)source.Count;
                    break;


                case "last_update":
                    paramValues[i] = (System.DateTime)source.LastUpdate;
                    break;


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


                case "user_id":
                    paramValues[i] = (System.Int32)source.UserID;
                    break;
                }
            }
        }
コード例 #8
0
/// <summary>
/// Initializes a new instance of the <see cref="WorldStatsCountUserKillNpcTable"/> class.
/// </summary>
/// <param name="source">IWorldStatsCountUserKillNpcTable to copy the initial values from.</param>
        public WorldStatsCountUserKillNpcTable(IWorldStatsCountUserKillNpcTable source)
        {
            CopyValuesFrom(source);
        }
/// <summary>
/// Checks if this <see cref="IWorldStatsCountUserKillNpcTable"/> contains the same values as another <see cref="IWorldStatsCountUserKillNpcTable"/>.
/// </summary>
/// <param name="source">The source <see cref="IWorldStatsCountUserKillNpcTable"/>.</param>
/// <param name="otherItem">The <see cref="IWorldStatsCountUserKillNpcTable"/> to compare the values to.</param>
/// <returns>
/// True if this <see cref="IWorldStatsCountUserKillNpcTable"/> contains the same values as the <paramref name="otherItem"/>; otherwise false.
/// </returns>
public static System.Boolean HasSameValues(this IWorldStatsCountUserKillNpcTable source, IWorldStatsCountUserKillNpcTable otherItem)
{
return Equals(source.Count, otherItem.Count) && 
Equals(source.LastUpdate, otherItem.LastUpdate) && 
Equals(source.NPCTemplateID, otherItem.NPCTemplateID) && 
Equals(source.UserID, otherItem.UserID);
}
コード例 #10
0
/// <summary>
/// Copies the values from the given <paramref name="source"/> into this WorldStatsCountUserKillNpcTable.
/// </summary>
/// <param name="source">The IWorldStatsCountUserKillNpcTable to copy the values from.</param>
public void CopyValuesFrom(IWorldStatsCountUserKillNpcTable source)
{
this.Count = (System.Int32)source.Count;
this.LastUpdate = (System.DateTime)source.LastUpdate;
this.NPCTemplateID = (DemoGame.CharacterTemplateID)source.NPCTemplateID;
this.UserID = (DemoGame.CharacterID)source.UserID;
}
コード例 #11
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(IWorldStatsCountUserKillNpcTable source, System.Collections.Generic.IDictionary<System.String,System.Object> dic)
{
dic["count"] = (System.Int32)source.Count;
dic["last_update"] = (System.DateTime)source.LastUpdate;
dic["npc_template_id"] = (DemoGame.CharacterTemplateID)source.NPCTemplateID;
dic["user_id"] = (DemoGame.CharacterID)source.UserID;
}
コード例 #12
0
/// <summary>
/// Initializes a new instance of the <see cref="WorldStatsCountUserKillNpcTable"/> class.
/// </summary>
/// <param name="source">IWorldStatsCountUserKillNpcTable to copy the initial values from.</param>
public WorldStatsCountUserKillNpcTable(IWorldStatsCountUserKillNpcTable source)
{
CopyValuesFrom(source);
}
コード例 #13
0
 /// <summary>
 /// Copies the values from the given <paramref name="source"/> into this WorldStatsCountUserKillNpcTable.
 /// </summary>
 /// <param name="source">The IWorldStatsCountUserKillNpcTable to copy the values from.</param>
 public void CopyValuesFrom(IWorldStatsCountUserKillNpcTable source)
 {
     Count = source.Count;
     LastUpdate = source.LastUpdate;
     NPCTemplateID = source.NPCTemplateID;
     UserID = source.UserID;
 }
コード例 #14
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(IWorldStatsCountUserKillNpcTable source, IDictionary<String, Object> dic)
 {
     dic["count"] = source.Count;
     dic["last_update"] = source.LastUpdate;
     dic["npc_template_id"] = source.NPCTemplateID;
     dic["user_id"] = source.UserID;
 }