I just published by first nuget package. It is a library for generating sample identity information. It allows you to write code like this:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var randomName = new NameGenerator(); | |
const int takeCount = 2; | |
Console.WriteLine("First {0} male names", takeCount); | |
foreach (var name in randomName.MaleNames().Take(takeCount)) | |
Console.WriteLine(name); | |
Console.WriteLine(); | |
Console.WriteLine("First {0} female names", takeCount); | |
foreach (var name in randomName.FemaleNames().Take(takeCount)) | |
Console.WriteLine(name); | |
Console.WriteLine(); | |
Console.WriteLine("First {0} all names", takeCount); | |
foreach (var name in randomName.Names().Take(takeCount)) | |
Console.WriteLine(name); |
Which produces this output:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
First 2 male names | |
Steve Ashcraft | |
Christopher Timothy Bischoff | |
First 2 female names | |
Denise Jan Dellinger | |
Brigida Carpenter | |
First 2 all names | |
Ivan Brent Duffey | |
Christy Mildred Clark |
For more information I recommend you check out the project page over at github or bitbucket.
Cool idea! Idle thought, not sure for whom it would be useful, but I've always found the "outliers" and international variations on names interesting. For testing purposes it would be cool to generate those out of the library too.... :)
ReplyDelete