Пример #1
0
 public void Update(IEnumerable<CodeFile> files) {
     var filter = Filter;
     var rule = new ExtractingRule(Enumerable.Repeat(filter, 1));
     var fileList = files.ToList();
     ExactMatch = fileList.Where(f => f.ReadOnly).All(
             f => f.RangesEquals(filter.ElementName, rule.ExtractRange2Elements(f.Ast)));
     Text = (ExactMatch ? "* " : "")
            + fileList.Select(f => f.Ast).Select(filter.CountRemovableTargets).Sum()
            + ": " + filter;
 }
Пример #2
0
 private bool CanApplyAll(ExtractingRule rule = null) {
     rule = rule ?? InferRule();
     return btnApply.Enabled && FreezedFiles.All(
             f => f.RangesEquals(rule.ExtractRange2Elements(f.Ast)));
 }