public void SavePerson(Person GeneratedPerson, EventArgs args) { string fullname = (GeneratedPerson.name+" "+GeneratedPerson.surname); if (myfilter.Apply(fullname)) { using (StreamWriter sw = File.AppendText(outputpath)) { sw.WriteLine(fullname); } } }
public Person Generate(string timestamp) { Person NewPerson = new Person(GetRandomListValue(ListOfNames), GetRandomListValue(ListOfSurNames), timestamp); return NewPerson; }
public Person Generate() { Person NewPerson = new Person(GetRandomListValue(ListOfNames), GetRandomListValue(ListOfSurNames)); EventHandler handler = NewPersonGenerated; return NewPerson; }