/// <summary> /// Checks if specified element violates size limit. /// </summary> private void CheckSizeLimit(CsElement element, Rules rule, NumericValue limit) { int size = CodeHelper.GetElementSizeByDeclaration(element); if (size > limit.Value) { m_parent.AddViolation( element, rule, limit.Value, size); } }
/// <summary> /// Initializes a new instance. /// </summary> public CharLimitOptionsData() : base(NumericValue.CreateCharLimit(), CustomRulesResources.LimitOptionsCharFormat) { m_tabSize = NumericValue.CreateTabSize(); }
/// <summary> /// Initializes a new instance. /// </summary> public LimitOptionsData(NumericValue limit, string textFormat) { m_limit = limit; m_textFormat = textFormat; }