コード例 #1
0
        /// <summary>
        /// Add a new statistics, with a given duration, to the stack.
        /// </summary>
        /// <remarks>Entries with durations of 0 or less never expire.</remarks>
        public void AddStatistics(StatisticsValue statistics, int duration)
        {
            if (duration < 0)
            {
                throw new ArgumentOutOfRangeException("duration");
            }

            StatisticsValueStackEntry entry = new StatisticsValueStackEntry();
            entry.Statistics = statistics;
            entry.RemainingDuration = duration;

            entries.Add(entry);

            CalculateTotalStatistics();
        }
コード例 #2
0
        /// <summary>
        /// Add a new statistics, with a given duration, to the stack.
        /// </summary>
        /// <remarks>Entries with durations of 0 or less never expire.</remarks>
        public void AddStatistics(StatisticsValue statistics, int duration)
        {
            if (duration < 0)
            {
                throw new ArgumentOutOfRangeException("duration");
            }

            StatisticsValueStackEntry entry = new StatisticsValueStackEntry();

            entry.Statistics        = statistics;
            entry.RemainingDuration = duration;

            entries.Add(entry);

            CalculateTotalStatistics();
        }