/// <summary> /// Конструктор CounterPropertyInfo /// </summary> /// <param name="containerType">Тип контейнера</param> /// <param name="counterProp">Свойство</param> /// <param name="counterAttrib">Атрибут</param> /// <param name="counterType">Тип счётчика</param> /// <param name="counterSetter">Делегат установки значения счётчика</param> /// <param name="couterGetter">Делегат для получения счётчика</param> public CounterPropertyInfo(Type containerType, PropertyInfo counterProp, CounterAttribute counterAttrib, CounterTypes counterType, GenericSetter counterSetter, GenericGetter couterGetter) { if (containerType == null) { throw new ArgumentNullException("containerType"); } if (counterProp == null) { throw new ArgumentNullException("counterProp"); } if (counterAttrib == null) { throw new ArgumentNullException("counterAttrib"); } if (counterSetter == null) { throw new ArgumentNullException("counterSetter"); } if (couterGetter == null) { throw new ArgumentNullException("couterGetter"); } CounterContainerType = containerType; Property = counterProp; Attribute = counterAttrib; CounterType = counterType; _setter = counterSetter; _getter = couterGetter; }
public override string ToString() { return($"{count} {CounterAttribute.GetCounterAttribute(type).Name}"); }