Ejemplo n.º 1
0
        void OnDoWork(object item)
        {
            runner = new GendarmeRunner();
            runner.ProgressChanged += new GendarmeRunner.ProgressChangedHandler(OnProgressChanged);
            LoadConfiguration();
            current_progress = 0;
            if (item is string)
            {
                AssemblyDefinition ass = AssemblyFactory.GetAssembly(item as string);
                runner.ProcessWithProgress(ass);
            }
            string s = "";

            foreach (Violation v in runner.Violations)
            {
                RuleInformation ri = RuleInformationManager.GetRuleInformation(v.Rule);
                foreach (Gendarme.Framework.Message m in v.Messages)
                {
                    this.Invoke((ThreadStart) delegate() {
                        listView1.BeginUpdate();
                        ListViewItem listItem = new ListViewItem();
                        listItem.ImageIndex   = 0;
                        listItem.Text         = m.Type.ToString();
                        listItem.SubItems.Add(m.Location.ToString());
                        listItem.SubItems.Add(m.Text);

                        listView1.Items.Add(listItem);
                        listView1.EndUpdate();
                    });
                }
            }


            SetProgress(1);
        }
 public RuleInformationWithOutcome(RuleInformation info)
 {
     Info = info;
 }