public static void CodeSnippet() { string loc = @"C:\Temp"; //Path.GetFullPath(Assembly.GetExecutingAssembly().Location + @"\.."); Domain domain = AppDomainStarter.Start <Domain>(loc, "Domain", null, true); //domain.TestEvent += new Action(new Program().HandleTestEvent); // A place for trying out random code snippets Func <int, bool> ai = new Foo().Positive; Predicate <int> ai2 = new Predicate <int>(ai); ai(0); ai2(0); }
public void BeginOpenAssemblies(string[] filenames, bool partialTrust) { var newRoots = new List <RowModel>(); for (int i = 0; i < filenames.Length; i++) { string fn = filenames[i]; string baseFolder = Path.GetFullPath(Path.Combine(fn, "..")); var task = AppDomainStarter.Start <AssemblyScanTask>(baseFolder, Path.GetFileName(fn), new object[] { fn, baseFolder }, partialTrust); var root = new TaskRowModel(Path.GetFileName(fn), TestNodeType.Assembly, task, false); newRoots.Add(root); _roots.Add(root); } _runner.AddTasks(newRoots.Select(row => row.Task)); _runner.AutoStartTasks(); }