public static AggregationServer Generate() { AggregationServer aggregationServer = new AggregationServer { ServerName = RandomStringGenerator.GetRandomString(10), Sites = AggregationSiteGenerator.Generate(10) }; return(aggregationServer); }
public static List <AggregationServer> Generate(int count) { List <AggregationServer> aggregationServers = new List <AggregationServer>(); for (int i = 0; i < count; i++) { AggregationServer aggregationServer = Generate(); aggregationServers.Add(aggregationServer); } return(aggregationServers); }
static void Main(string[] args) { ConsoleKeyInfo ck; using (var server = new AggregationServer("127.0.0.1", 990)) { server.Start(); Console.WriteLine("server started"); do { ck = Console.ReadKey(); } while (ck.Key != ConsoleKey.Escape); } }