public void RunApplication(params string[] args) { ConsoleApplicationManager .For <T>() .UsingFactory(Factory) .Run(args); }
static void Main(string[] args) { ConsoleApplicationManager.For <XCopyApplication>() .SetWindowTitle("XCopyApplication") .SetWindowWidth(100) .Run(args); Console.ReadLine(); }
public static void Main(string[] args) { var application = ConsoleApplicationManager.For <ConsoloversApplication1Application>().Run(args); if (application.Arguments.WaitForKey) { Console.ReadLine(); } }
public API() { Log("Initializing..."); ConsoleApplicationManager.Init(); Log("Start application..."); ConsoleApplicationManager.Start(); Log("Waiting for server start done..."); }
private static void Main(string[] args) { var application = ConsoleApplicationManager.For <TheApplication>().SetWindowWidth(150).SetWindowHeight(40).Run(args); if (application.Arguments.WaitForDebugger) { Console.WriteLine("Waiting for key"); Console.ReadLine(); } }
public void EnsureRunInitializesWhenRequired() { var args = new string[0]; var runned = new ConsoleApplicationManager <ApplicationWithArguments>().Run(args); runned.Args.Should().BeSameAs(args); runned.TestParameters.Should().NotBeNull(); runned.Mock.Verify(x => x.Run(), Times.Once); }
static void Main(string[] args) { var container = new Container(); container.Register <ResourceManager>(Properties.Resources.ResourceManager).WithLifetime(Lifetime.Singleton); var objectFactory = new DefaultFactory(container); ConsoleApplicationManager.For <Program>().UsingFactory(objectFactory).Run(args); Console.ReadLine(); }
private static void Main(string[] args) { string text = null; while (text != "exit") { text = new InputBox <string>("Enter some long text: ", "SomeText").ReadLine(10); Console.WriteLine(text); } new ConsoleProxy().WaitForKey(ConsoleKey.Escape); ConsoleApplicationManager.For <MyProgramLogic>().Run(args); }
private static void Main(string[] args) { try { ConsoleApplicationManager.RunApplication(args); } catch (Exception e) { Console.WriteLine("Unhandled Exception thrown. Details follow:"); Console.WriteLine(e.Message); Console.WriteLine(e.StackTrace); } }
public IApplication Run(string[] args) { if (createApplication == null) { createApplication = new DefaultFactory().CreateInstance; } var applicationManager = new ConsoleApplicationManager(createApplication) { WindowTitle = WindowTitle, }; return(applicationManager.Run(applicationType, args)); }
static void Main() { var container = new Container(); container.Register <ResourceManager>(Properties.Resources.ResourceManager).WithLifetime(Lifetime.Singleton); var objectFactory = new DefaultFactory(container); var program = ConsoleApplicationManager.For <Program>().UsingFactory(objectFactory).Run(); PrintArgs(program.Arguments); if (program.Arguments != null && program.Arguments.Wait) { Console.WriteLine(); program.WaitForEnter(); } }
static void Main(string[] args) { ConsoleApplicationManager.RunThis(args); }
public override void GameStartDone() { ConsoleApplicationManager.GameStartDone(); Log("Mod initialized"); }
public void EnsureRunIsCalledOnRunable() { var runned = new ConsoleApplicationManager <Runable>().Run(new string[0]); runned.Mock.Verify(x => x.Run(), Times.Once); }
private static void Main(string[] args) { ConsoleApplicationManager.For <DeleteMeApplication>() .Run(args); }
public void RunApplication(string args) { ConsoleApplicationManager.For <TestApplication <T> >().UsingFactory(Factory).Run(args); }
public override void GameShutdown() { Log("Server shutdown!"); ConsoleApplicationManager.GameShutdown(); }