public static StandUpTimer Launch(string executable = "StandUpTimer.exe", int sittingWaitTime = 1200000, bool deleteCookies = true) { if (deleteCookies) { CookieContainerPersistance.DeleteCookiesFromDisk(); } var processStartInfo = new ProcessStartInfo(executable, $"--sit {sittingWaitTime} --stand 3600000 --noUpdate --baseUrl http://localhost:12346/"); return(new StandUpTimer(Application.Launch(processStartInfo))); }
private static Server BootstrapServer(string baseUrl) { var cookieContainer = CookieContainerPersistance.ReadCookiesFromDisk(); var handler = new HttpClientHandler { CookieContainer = cookieContainer, UseCookies = true }; var httpClient = new HttpClient(handler) { BaseAddress = new Uri(baseUrl) }; return(new Server(httpClient, cookieContainer)); }