Example #1
0
        /// <summary>
        /// Initialize a new <see cref="Counter"/> instance with the given parameters.
        /// </summary>
        /// <param name="name">The name of the counter.</param>
        /// <param name="description">The description of the counter.</param>
        /// <param name="mode">The mode of the counter sampling.</param>
        /// <param name="displayType">The default display mode for the counter.</param>
        public Counter(string name, string description, CounterMode mode, CounterDisplayType displayType)
        {
            this.Mode        = mode;
            this.Name        = name;
            this.Description = description;

            // HACK
            this.Mode = CounterMode.Historical;

            if (this.Mode == CounterMode.Historical)
            {
                this.History = new CircularList <double>(CounterHistorySize, true);
            }
            this.DisplayType = displayType;
        }
Example #2
0
        /// <summary>
        /// Initialize a new <see cref="Counter"/> instance with the given parameters.
        /// </summary>
        /// <param name="name">The name of the counter.</param>
        /// <param name="description">The description of the counter.</param>
        /// <param name="mode">The mode of the counter sampling.</param>
        /// <param name="displayType">The default display mode for the counter.</param>
        public Counter( string name, string description, CounterMode mode, CounterDisplayType displayType )
        {
            this.Mode = mode;
            this.Name = name;
            this.Description = description;

            // HACK
            this.Mode = CounterMode.Historical;

            if( this.Mode == CounterMode.Historical )
                this.History = new CircularList<double>( CounterHistorySize, true );
            this.DisplayType = displayType;
        }
Example #3
0
 /// <summary>
 /// Initialize a new <see cref="Counter"/> instance with the given parameters.
 /// </summary>
 /// <param name="name">The name of the counter.</param>
 /// <param name="description">The description of the counter.</param>
 /// <param name="displayType">The default display mode for the ocunter.</param>
 public Counter(string name, string description, CounterDisplayType displayType)
     : this(name, description, CounterMode.Historical, displayType)
 {
 }
Example #4
0
 /// <summary>
 /// Initialize a new <see cref="Counter"/> instance with the given parameters.
 /// </summary>
 /// <param name="name">The name of the counter.</param>
 /// <param name="description">The description of the counter.</param>
 /// <param name="displayType">The default display mode for the ocunter.</param>
 public Counter( string name, string description, CounterDisplayType displayType )
     : this(name, description, CounterMode.Historical, displayType)
 {
 }