SetupFactory() public method

public SetupFactory ( int botCount ) : void
botCount int
return void
Example #1
0
 static void Main(string[] args)
 {
     try
     {
         using (BotFactory factory = new BotFactory())
         {
             Random random = new Random();
             factory.SetupFactory(random.Next(Settings.Default.MinBotsCount, Settings.Default.MaxBotsCount));
             GC.KeepAlive(factory);
         }
     }
     catch (UnauthorizedAccessException ex)
     {
         Console.WriteLine(ex.Message);
         Console.WriteLine("Try running the application as Administrator or check if the files have the Read-Only flag set");
         Console.ReadLine();
     }
     catch (ConfigurationException ex)
     {
         Console.WriteLine(ex.Message);
         if (ex.InnerException != null)
         {
             Console.WriteLine(ex.InnerException.Message);
         }
         Console.ReadLine();
     }
 }
Example #2
0
 static void Main(string[] args)
 {
     try
     {
         using (BotFactory factory = new BotFactory())
         {
             Random random = new Random();
             factory.SetupFactory(random.Next(Settings.Default.MinBotsCount, Settings.Default.MaxBotsCount));
             GC.KeepAlive(factory);
         }
     }
     catch(UnauthorizedAccessException ex)
     {
         Console.WriteLine(ex.Message);
         Console.WriteLine("Try running the application as Administrator or check if the files have the Read-Only flag set");
         Console.ReadLine();
     }
     catch(ConfigurationException ex)
     {
         Console.WriteLine(ex.Message);
         if (ex.InnerException != null)
             Console.WriteLine(ex.InnerException.Message);
         Console.ReadLine();
     }
 }
Example #3
0
 static void Main(string[] args)
 {
     using (BotFactory factory = new BotFactory())
     {
         factory.SetupFactory(Settings.Default.BotsCount);
         GC.KeepAlive(factory);
     }
 }
Example #4
0
 static void Main(string[] args)
 {
     using (BotFactory factory = new BotFactory())
     {
         Random random = new Random();
         factory.SetupFactory(random.Next(Settings.Default.MinBotsCount, Settings.Default.MaxBotsCount));
         GC.KeepAlive(factory);
     }
 }
Example #5
0
 static void Main(string[] args)
 {
     using (BotFactory factory = new BotFactory())
     {
         Random random = new Random();
         factory.SetupFactory(random.Next(Settings.Default.MinBotsCount, Settings.Default.MaxBotsCount));
         GC.KeepAlive(factory);
     }
 }