SetupFactory() public méthode

public SetupFactory ( int botCount ) : void
botCount int
Résultat void
Exemple #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();
     }
 }
Exemple #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();
     }
 }
Exemple #3
0
 static void Main(string[] args)
 {
     using (BotFactory factory = new BotFactory())
     {
         factory.SetupFactory(Settings.Default.BotsCount);
         GC.KeepAlive(factory);
     }
 }
Exemple #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);
     }
 }
Exemple #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);
     }
 }