/// <summary> /// Monitors the specified P# assembly. /// </summary> /// <param name="dll">Assembly</param> private void MonitorAssembly(string dll) { var path = Assembly.GetAssembly(typeof(Program)).Location; var assembly = Assembly.LoadFrom(dll); string[] searchDirectories = new[] { Path.GetDirectoryName(path), Path.GetDirectoryName(assembly.Location), }; var resolver = new AssemblyResolver(); Array.ForEach(searchDirectories, d => resolver.AddSearchDirectory(d)); resolver.Attach(); var engine = new RemoteRaceInstrumentationEngine(); engine.Execute(this.Configuration); }
/// <summary> /// Monitors the specified P# assembly. /// </summary> /// <param name="dll">Assembly</param> private void MonitorAssembly(string dll) { var path = Assembly.GetAssembly(typeof(Program)).Location; var assembly = Assembly.LoadFrom(dll); string[] searchDirectories = new[]{ Path.GetDirectoryName(path), Path.GetDirectoryName(assembly.Location), }; var resolver = new AssemblyResolver(); Array.ForEach(searchDirectories, d => resolver.AddSearchDirectory(d)); resolver.Attach(); var engine = new RemoteRaceInstrumentationEngine(); engine.Execute(this.Configuration); }