public static void RunTestCase(TestCase test, TestDriverSettings settings) { if (settings == null) { settings = new TestDriverSettings(); } #if DEBUG DebugService.LogInfo("TestCase {0} started", test.Name); #endif test.Reset(); // TODO: provide option to clear caches CommonLanguageInfrastructure.ClearCaches(); try { RunCore(test, settings); } finally { CommonLanguageInfrastructure.ClearCaches(); } }
public static IAssembly LoadAssembly(string path, bool delbins) { try { if (!Path.IsPathRooted(path)) { path = Path.Combine(Environment.CurrentDirectory, path); } var asm = CommonLanguageInfrastructure.Deserialize(path, null); if (asm == null) { LogError(Errors.UnableToLoadAssembly, path); Environment.Exit(-1); } return(asm); } catch (Exception e) { LogException(e, Errors.UnableToLoadAssembly, path); Environment.Exit(-1); } finally { if (delbins) { DeleteBins(path); } } return(null); }
static IAssembly LoadAssembly(string path) { try { CommonLanguageInfrastructure.SubstituteFrameworkAssemblies = false; if (!Path.IsPathRooted(path)) { path = Path.Combine(Environment.CurrentDirectory, path); } return(CommonLanguageInfrastructure.Deserialize(path, null)); } catch (Exception e) { Console.WriteLine(e); Environment.Exit(-1); return(null); } }
//TODO: revise error handling, e.g. throw exception public static IAssembly Load(string path, VM vm, string tcroot, ref string error) { SetupCli(vm); #if DEBUG CommonLanguageInfrastructure.Debug = true; CommonLanguageInfrastructure.TestCaseDirectory = tcroot; #endif IAssembly asm; try { asm = CommonLanguageInfrastructure.Deserialize(path, null); } catch (Exception e) { error = String.Format("Unable to deserialize assembly.\nException:\n{0}", e); return(null); } return(asm); }
private static void FLI_Serialize() { using (var dlg = new OpenFileDialog()) { dlg.Filter = "Managed Assemblies (*.dll, *.exe)|*.dll;*.exe"; dlg.Multiselect = true; if (dlg.ShowDialog() != DialogResult.OK) { return; } try { string path = dlg.FileName; var asm = CommonLanguageInfrastructure.Deserialize(path, null); FlashLanguageInfrastructure.Serialize(asm, Path.ChangeExtension(path, ".swf"), "/format:swf"); } catch (Exception exc) { MessageBox.Show(exc.ToString()); } } }
private static IAssembly LoadAssembly(string path) { try { if (!Path.IsPathRooted(path)) { path = Path.Combine(Environment.CurrentDirectory, path); } var asm = CommonLanguageInfrastructure.Deserialize(path, null); if (asm == null) { Console.WriteLine("Unable to load assembly '{0}'", path); Environment.Exit(-1); } return(asm); } catch (Exception e) { Console.WriteLine("Unable to load assembly '{0}'", path); Environment.Exit(-1); } return(null); }
static void InitInfrastructures() { CommonLanguageInfrastructure.Init(); FlashLanguageInfrastructure.Init(); }
/// <summary> /// Initializes a new instance of the <see cref="JsCompiler"/> class. /// </summary> /// <param name="assemblyFile">The file of the assembly to be compiled.</param> public JsCompiler(FileInfo assemblyFile) : this((IAssembly)CommonLanguageInfrastructure.Deserialize(assemblyFile.FullName, null)) { }