Esempio n. 1
0
        /// <summary>
        /// Adds the specified type.
        /// </summary>
        /// <param name="type">The type.</param>
        /// <param name="value">The value.</param>
        /// <returns>Queue message counter.</returns>
        public PolledEventMessageMeter Add(PolledEventMessageMeterType type, long value)
        {
            PolledEventMessageMeter counter = this[type];

            counter.Value = value;
            return(counter);
        }
 /// <summary>
 /// Gets or sets the <see cref="System.Int64"/> with the specified type.
 /// </summary>
 /// <value></value>
 public long this[PolledEventMessageMeterType type]
 {
     get
     {
         return(this.Meters[type].CoalesceValue);
     }
     set
     {
         this.Meters[type].Value = value;
     }
 }
Esempio n. 3
0
        /// <summary>
        /// Adds the specified meter id.
        /// </summary>
        /// <param name="meterId">The meter id.</param>
        /// <param name="value">The value.</param>
        /// <returns>Queue message counter.</returns>
        public PolledEventMessageMeter Add(int meterId, long value)
        {
            PolledEventMessageMeterType type = PolledEventMessageMeterType.Unknown;

            if (Enum.IsDefined(typeof(PolledEventMessageMeterType), meterId))
            {
                type = (PolledEventMessageMeterType)meterId;
            }
            if (type == PolledEventMessageMeterType.Unknown)
            {
                return(null);
            }
            return(this.Add(type, value));
        }
Esempio n. 4
0
        /// <summary>
        /// Gets or sets the <see cref="BMC.ExchangeMonitor.Core.MSMQ.QueueMessageMeter"/> with the specified ERROR.
        /// </summary>
        /// <value></value>
        public PolledEventMessageMeter this[PolledEventMessageMeterType type]
        {
            get
            {
                PolledEventMessageMeter counter = null;

                if (!_currentMeters.ContainsKey(type))
                {
                    counter = new PolledEventMessageMeter(_parent, type);
                    _currentMeters.Add(type, counter);
                }
                else
                {
                    counter = _currentMeters[type];
                }

                return(counter);
            }
        }
 /// <summary>
 /// Initializes a new instance of the <see cref="PolledEventMessageMeter"/> class.
 /// </summary>
 /// <param name="parent">The parent.</param>
 /// <param name="type">The type.</param>
 internal PolledEventMessageMeter(PolledEventMessage parent, PolledEventMessageMeterType type)
     : base(string.Empty)
 {
     _parent = parent;
     this.Type = type;
 }
 /// <summary>
 /// Gets or sets the <see cref="System.Int64"/> with the specified type.
 /// </summary>
 /// <value></value>
 public long this[PolledEventMessageMeterType type]
 {
     get
     {
         return this.Meters[type].CoalesceValue;
     }
     set
     {
         this.Meters[type].Value = value;
     }
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="PolledEventMessageMeter"/> class.
 /// </summary>
 /// <param name="parent">The parent.</param>
 /// <param name="type">The type.</param>
 internal PolledEventMessageMeter(PolledEventMessage parent, PolledEventMessageMeterType type)
     : base(string.Empty)
 {
     _parent   = parent;
     this.Type = type;
 }
        /// <summary>
        /// Gets or sets the <see cref="BMC.ExchangeMonitor.Core.MSMQ.QueueMessageMeter"/> with the specified ERROR.
        /// </summary>
        /// <value></value>
        public PolledEventMessageMeter this[PolledEventMessageMeterType type]
        {
            get
            {
                PolledEventMessageMeter counter = null;

                if (!_currentMeters.ContainsKey(type))
                {
                    counter = new PolledEventMessageMeter(_parent, type);
                    _currentMeters.Add(type, counter);
                }
                else
                {
                    counter = _currentMeters[type];
                }

                return counter;
            }
        }
 /// <summary>
 /// Adds the specified type.
 /// </summary>
 /// <param name="type">The type.</param>
 /// <param name="value">The value.</param>
 /// <returns>Queue message counter.</returns>
 public PolledEventMessageMeter Add(PolledEventMessageMeterType type, long value)
 {
     PolledEventMessageMeter counter = this[type];
     counter.Value = value;
     return counter;
 }