private RuntimeInstance CreateRuntime( string source, ImmutableArray <MetadataReference> compileReferences, ImmutableArray <MetadataReference> runtimeReferences) { var compilation0 = CreateCompilationWithMscorlib( source, options: TestOptions.DebugDll, assemblyName: ExpressionCompilerUtilities.GenerateUniqueName(), references: compileReferences); byte[] exeBytes; byte[] pdbBytes; ImmutableArray <MetadataReference> references; compilation0.EmitAndGetReferences(out exeBytes, out pdbBytes, out references); return(CreateRuntimeInstance( ExpressionCompilerUtilities.GenerateUniqueName(), runtimeReferences.AddIntrinsicAssembly(), exeBytes, SymReaderFactory.CreateReader(pdbBytes))); }
private RuntimeInstance CreateRuntime( string source, ImmutableArray<MetadataReference> compileReferences, ImmutableArray<MetadataReference> runtimeReferences) { var compilation0 = CreateCompilationWithMscorlib( source, options: TestOptions.DebugDll, assemblyName: ExpressionCompilerUtilities.GenerateUniqueName(), references: compileReferences); byte[] exeBytes; byte[] pdbBytes; ImmutableArray<MetadataReference> references; compilation0.EmitAndGetReferences(out exeBytes, out pdbBytes, out references); return CreateRuntimeInstance( ExpressionCompilerUtilities.GenerateUniqueName(), runtimeReferences.AddIntrinsicAssembly(), exeBytes, new SymReader(pdbBytes)); }