public object Clone() { var clone = new WhoisRecord(Text); return clone; }
public void ShowSampleStatistics() { var files = Directory.GetFiles(@"..\..\..\Whois.Tests\Samples\Domains", "*.txt"); var visitor = new PatternExtractorVisitor(); foreach (var file in files) { var text = File.ReadAllText(file); var record = new WhoisRecord(text); var matches = visitor.MatchPatterns(record); if (matches.Any()) { var match = matches.First(); Console.WriteLine("{0} matches: {1}", match.Replacements.Count, Path.GetFileName(file)); } else { Console.WriteLine("No matches: {0}", file); } } }