public void RunPhpVH() { TestDirectory = new DirectoryInfo(Path.Combine(WebRoot, Name + "Test")); if (TestDirectory.Exists) { TestDirectory.Delete(true); } TestDirectory.Create(); GetTestReports().Iter(x => x.Delete(true)); Php .Concat(new [] { "Php\\FalsePositiveCheck.php" }) .Iter(x => File.Copy(x, Path.Combine(TestDirectory.FullName, Path.GetFileName(x)))); if (LaunchInAppDomain) { var domain = AppDomain.CreateDomain("testDomain"); domain.ExecuteAssembly("phpvh.exe", CreateArgs2()); AppDomain.Unload(domain); } else { LaunchProcess(); } }
public object Clone() { var av = new AttVal(); if (Next != null) { av.Next = (AttVal)Next.Clone(); } if (Attribute != null) { av.Attribute = Attribute; } if (Val != null) { av.Val = Val; } av.Delim = Delim; if (Asp != null) { av.Asp = (Node)Asp.Clone(); } if (Php != null) { av.Php = (Node)Php.Clone(); } av.Dict = AttributeTable.DefaultAttributeTable.FindAttribute(this); return(av); }
public void RunPhpVH() { if (!Directory.Exists(Settings.Webroot)) { throw new DirectoryNotFoundException(string.Format("Directory {0} not found.", Settings.Webroot)); } TestDirectory = new DirectoryInfo(Path.Combine(Settings.Webroot, Name + "Test")); if (TestDirectory.Exists) { TestDirectory.Delete(true); } TestDirectory.Create(); GetTestReports().Iter(x => x.Delete(true)); Php .Concat(new[] { "Php\\FalsePositiveCheck.php" }) .Iter(x => File.Copy(x, Path.Combine(TestDirectory.FullName, Path.GetFileName(x)))); if (Settings.LaunchInAppDomain) { var domain = AppDomain.CreateDomain("testDomain"); domain.ExecuteAssembly("phpvh.exe", CreateArgs2()); AppDomain.Unload(domain); } else { LaunchProcess(); } }
public void RunningPhpCgiTest() { Php php = new Php(); string request = "hello world!!!"; string result = php.Excute("echo \"hello world!!!\";"); Assert.AreEqual(result, request); }
public void UpdateDatabase() { while (!stop) { Console.WriteLine("Updating serverlist!"); Program.cR.Sleep(); Php.addServer(Functions.MyIp(), Constants.MAXPLAYERS, openSlots, 0); Program.cR.Awake(); Thread.Sleep(30000); //Sov i 30 sec } }
public static void ReadCommands() { String[] all_Commands = new String[4]; all_Commands[0] = "all_commands : Writes a list of all commands"; all_Commands[1] = "start_client : Start a client that connects to the server"; all_Commands[2] = "kill_client : Ending all open clients"; all_Commands[3] = "other : List of all avaiable servers"; command = Console.ReadLine(); if (command.Equals("start_client")) { System.Console.WriteLine("Starting client!"); Functions.RunClientFromServer(); } else if (command.Equals("kill_client")) { System.Console.WriteLine("Ending client-process!"); Functions.EndClient(); } else if (command.Equals("all_commands")) { Console.WriteLine("\n"); for (int i = 0; i < all_Commands.Length; i++) { Console.WriteLine(all_Commands[i]); } } else if (command.Equals("other")) { sL = Php.getServers(); sL.getIp(); } else { System.Console.WriteLine("Unknown command! \n Write all_commands to see commands"); } }