Ejemplo n.º 1
0
        public virtual void IncrCounter <_T0>(Enum <_T0> key, long amount)
            where _T0 : Enum <E>
        {
            string groupName = key.GetDeclaringClass().FullName;

            if (GetCounterGroup(groupName) == null)
            {
                CounterGroup cGrp = new CounterGroupPBImpl();
                cGrp.SetName(groupName);
                cGrp.SetDisplayName(groupName);
                SetCounterGroup(groupName, cGrp);
            }
            if (GetCounterGroup(groupName).GetCounter(key.Name()) == null)
            {
                Counter c = new CounterPBImpl();
                c.SetName(key.Name());
                c.SetDisplayName(key.Name());
                c.SetValue(0l);
                GetCounterGroup(groupName).SetCounter(key.Name(), c);
            }
            Counter counter = GetCounterGroup(groupName).GetCounter(key.Name());

            counter.SetValue(counter.GetValue() + amount);
        }
Ejemplo n.º 2
0
 public _IEnumerable_156(CounterGroupPBImpl _enclosing)
 {
     this._enclosing = _enclosing;
 }