Skip to content

Commit

Permalink
Added unique email extraction
Browse files Browse the repository at this point in the history
  • Loading branch information
akhil committed Aug 12, 2019
1 parent b2202df commit af30a01
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
4 changes: 2 additions & 2 deletions Form1.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 6 additions & 5 deletions Form1.cs
Original file line number Diff line number Diff line change
Expand Up @@ -76,14 +76,15 @@ private void ExtractEmailAddressButton_Click(object sender, EventArgs e)
}
ProcessStartInfo startInfo = grepStartInfo(ofd.FileName);
Console.WriteLine("Grep arguments: " + startInfo.Arguments);
string[] emails = getTextfromProcess(startInfo);
Console.WriteLine("extract email Count" + emails.Length.ToString());
var emails = new HashSet<string>(getTextfromProcess(startInfo)).ToList();
emails.Sort();
Console.WriteLine("extract email Count" + emails.Count);

populateEmailView(emailListView, emails);
populateEmailView(emailListView, emails.ToArray());

if (emails.Length > 0)
if (emails.Count > 0)
{
emailCountLabel.Text = "Email Count: " + emails.Length;
emailCountLabel.Text = "Unique Email Count: " + emails.Count;
downloadEmailAddressButton.Enabled = true;
}
else
Expand Down

0 comments on commit af30a01

Please sign in to comment.