265 references to Emit
Microsoft.AspNetCore.App.Analyzers.Test (1)
Microsoft.AspNetCore.Http.Extensions.Tests (1)
Microsoft.AspNetCore.Http.Microbenchmarks (1)
Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation (1)
Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation.Test (1)
Microsoft.CodeAnalysis (1)
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (1)
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (90)
Emit\CompilationEmitTests.cs (46)
52emitResult = compilation.Emit(output, pdbStream: null, xmlDocumentationStream: null, win32Resources: null);
157emitResult = comp.Emit(output, pdbStream: null, xmlDocumentationStream: null, win32Resources: null);
214emitResult = comp.Emit(output, options: new EmitOptions(metadataOnly: true));
239emitResult = compUsing.Emit(output);
271emitResult = comp.Emit(peStream, xmlDocumentationStream: xmlStream, options: new EmitOptions(metadataOnly: true));
316emitResult = comp.Emit(peStream, xmlDocumentationStream: xmlStream, options: new EmitOptions(metadataOnly: true));
362emitResult = comp.Emit(peStream, xmlDocumentationStream: xmlStream, options: new EmitOptions(metadataOnly: true));
416emitResult = comp.Emit(peStream, xmlDocumentationStream: xmlStream, options: new EmitOptions(metadataOnly: true));
472emitResult = comp.Emit(peStream, xmlDocumentationStream: xmlStream, options: new EmitOptions(metadataOnly: true));
525emitResult = comp.Emit(peStream, xmlDocumentationStream: xmlStream, options: new EmitOptions(metadataOnly: true));
568EmitResult emitResult = comp.Emit(output, metadataPEStream: metadataOutput,
707EmitResult emitResult = comp.Emit(output, metadataPEStream: metadataOutput,
733EmitResult emitResult = comp.Emit(output, metadataPEStream: metadataOutput,
757EmitResult emitResult = comp.Emit(output, metadataPEStream: metadataOutput,
786EmitResult emitResult = comp.Emit(output, metadataPEStream: metadataOutput,
838EmitResult emitResult = comp.Emit(output, metadataPEStream: metadataOutput,
879EmitResult emitResult = comp.Emit(output, metadataPEStream: metadataOutput,
1326var refonlyDiagnostics = compilation.Emit(new MemoryStream(), pdbStream: null,
1335var refoutDiagnostics = compilation.Emit(peStream: new MemoryStream(), metadataPEStream: new MemoryStream(), pdbStream: null,
1975var result = comp.Emit(output, metadataPEStream: metadataOutput,
1987var result = comp.Emit(output,
2100var emitResult = comp.Emit(output, options: emitOptions);
2529Assert.Throws<ArgumentException>(() => comp.Emit(output, pdbOutput,
2543Assert.Throws<ArgumentException>(() => comp.Emit(output, metadataPEStream: metadataPeOutput,
2557Assert.Throws<ArgumentException>(() => comp.Emit(output, metadataPEStream: metadataPeOutput,
2572_ = comp.Emit(output, options: EmitOptions.Default.WithIncludePrivateMembers(false));
2585Assert.Throws<ArgumentException>(() => comp.Emit(output, metadataPEStream: metadataPeOutput,
2598Assert.Throws<ArgumentException>(() => comp.Emit(output,
2612var result = comp.Emit(output, metadataPEStream: metadataOutput,
2637Assert.Throws<ArgumentException>(() => comp.Emit(output,
2659var result = comp.Emit(output, pdbOutput, metadataPEStream: metadataOutput);
2708emitResult = libComp.Emit(output, options: new EmitOptions(metadataOnly: true));
2763emitResult = exeComp.Emit(output);
3374emitResult = compilation.Emit(output, pdbStream: null, xmlDocumentationStream: null, win32Resources: null);
3407emitResult = compilation.Emit(output, pdbStream: null, xmlDocumentationStream: null, win32Resources: null);
3445emitResult = compilation.Emit(output, pdbStream: null, xmlDocumentationStream: null, win32Resources: null);
4023Assert.True(compilation.Emit(stream, options: new EmitOptions(outputNameOverride: nameWithExtension)).Success);
4059Assert.True(compilation.Emit(stream, options: new EmitOptions(outputNameOverride: outputName + extension)).Success);
4089Assert.True(compilation.Emit(stream, options: new EmitOptions(outputNameOverride: nameOverride + extension)).Success);
4120Assert.True(compilation.Emit(stream, options: new EmitOptions(outputNameOverride: nameOverride)).Success);
4151Assert.True(compilation.Emit(stream, options: new EmitOptions(outputNameOverride: nameOverride + extension)).Success);
4182Assert.True(compilation.Emit(stream, options: new EmitOptions(outputNameOverride: nameOverride)).Success);
4233var result = compilation.Emit(new MemoryStream(), options: new EmitOptions(outputNameOverride: "x\0x"));
5180Assert.Throws<ArgumentException>(() => compilation.Emit(outReal));
5597var emitResult = compilation.Emit(output, pdbStream, xmlDocumentationStream, win32ResourcesStream);
5646var emitResult = compilation.Emit(output, options: emitOptions);
Emit\ResourceTests.cs (23)
47c1.Emit(output, win32Resources: c1.CreateDefaultWin32Resources(true, false, null, null));
138c1.Emit(output, win32Resources: memStream);
210var result = c1.Emit(new MemoryStream(), manifestResources:
221result = c1.Emit(new MemoryStream(), manifestResources:
240var result = c1.Emit(new MemoryStream(), manifestResources:
260var result = c1.Emit(new MemoryStream(), manifestResources:
273result = c1.Emit(new MemoryStream(), manifestResources:
293var result = c1.Emit(new MemoryStream(), manifestResources:
313var result = c1.Emit(new MemoryStream(), manifestResources:
323result = c1.Emit(new MemoryStream(), manifestResources:
340var result = c1.Emit(new MemoryStream(), manifestResources:
354result = c1.Emit(new MemoryStream(), manifestResources:
369result = c1.Emit(new MemoryStream(), manifestResources:
382result = c1.Emit(new MemoryStream(), manifestResources:
413var result = c1.Emit(output, manifestResources:
446emit = (c, s, r) => c.Emit(s, manifestResources: r, options: new EmitOptions(metadataOnly: metadataOnly));
516var result2 = c2.Emit(output2);
564var result3 = c3.Emit(output3);
622var result4 = c4.Emit(output4, manifestResources:
774var result = c1.Emit(output, manifestResources:
801var result = c1.Emit(output, manifestResources:
837c1.Emit(output, win32Resources: c1.CreateDefaultWin32Resources(true, false, null, null));
900var result = c1.Emit(new MemoryStream(), manifestResources:
Microsoft.CodeAnalysis.CSharp.Emit2.UnitTests (13)
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (30)
Microsoft.CodeAnalysis.CSharp.Scripting.Desktop.UnitTests (1)
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (6)
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (21)
Compilation\CompilationAPITests.cs (16)
389Assert.Throws<ArgumentException>(() => c.Emit(peStream));
390Assert.Throws<ArgumentException>(() => c.Emit(new MemoryStream(), pdbStream));
406EmitResult result = c.Emit(stream, options: options);
446Assert.Throws<ArgumentNullException>("peStream", () => comp.Emit(peStream: null));
447Assert.Throws<ArgumentException>("peStream", () => comp.Emit(peStream: new TestStream(canRead: true, canWrite: false, canSeek: true)));
448Assert.Throws<ArgumentException>("pdbStream", () => comp.Emit(peStream: new MemoryStream(), pdbStream: new TestStream(canRead: true, canWrite: false, canSeek: true)));
449Assert.Throws<ArgumentException>("pdbStream", () => comp.Emit(peStream: new MemoryStream(), pdbStream: new MemoryStream(), options: EmitOptions.Default.WithDebugInformationFormat(DebugInformationFormat.Embedded)));
451Assert.Throws<ArgumentException>("sourceLinkStream", () => comp.Emit(
457Assert.Throws<ArgumentException>("embeddedTexts", () => comp.Emit(
463Assert.Throws<ArgumentException>("embeddedTexts", () => comp.Emit(
469Assert.Throws<ArgumentException>("win32Resources", () => comp.Emit(
473Assert.Throws<ArgumentException>("win32Resources", () => comp.Emit(
478Assert.True(comp.Emit(
3098var result = module.Emit(moduleStream);
3117var result = module.Emit(moduleStream);
3138var result = module.Emit(moduleStream);
Microsoft.CodeAnalysis.CSharp.WinRT.UnitTests (20)
PdbTests.cs (20)
29var result = comp.Emit(output, outputPdb, null);
31result = comp.Emit(output, outputPdb);
33result = comp.Emit(peStream: output, xmlDocumentationStream: null);
35result = comp.Emit(peStream: output, pdbStream: outputPdb);
37result = comp.Emit(output, outputPdb, null);
39result = comp.Emit(output, outputPdb);
41result = comp.Emit(output, outputPdb, outputxml);
43result = comp.Emit(output, null, null, null);
45result = comp.Emit(output);
47result = comp.Emit(output, null, outputxml);
49result = comp.Emit(output, xmlDocumentationStream: outputxml);
51result = comp.Emit(output, xmlDocumentationStream: outputxml);
53result = comp.Emit(output, options: null);
55result = comp.Emit(output, options: EmitOptions.Default.WithHighEntropyVirtualAddressSpace(true));
57result = comp.Emit(output, options: EmitOptions.Default.WithOutputNameOverride("goo"));
59result = comp.Emit(output, options: EmitOptions.Default.WithPdbFilePath("goo.pdb"));
79var r = c.Emit(peStream, pdbStream);
95var r = c.Emit(peStream, pdbStream);
112var r = c.Emit(peStream, pdbStream);
127var result = comp.Emit(output, outputPdb, outputxml);
Microsoft.CodeAnalysis.Test.Utilities (3)
Microsoft.CodeAnalysis.VisualBasic.Emit.UnitTests (43)
Attributes\AssemblyAttributes.vb (11)
536AssertTheseDiagnostics(compilation.Emit(New System.IO.MemoryStream()).Diagnostics,
542AssertTheseDiagnostics(compilation.Emit(New System.IO.MemoryStream()).Diagnostics,
552AssertTheseDiagnostics(compilation.Emit(New System.IO.MemoryStream()).Diagnostics,
573AssertTheseDiagnostics(compilation.Emit(New System.IO.MemoryStream()).Diagnostics,
606AssertTheseDiagnostics(compilation.Emit(New System.IO.MemoryStream()).Diagnostics,
649AssertTheseDiagnostics(compilation.Emit(New System.IO.MemoryStream()).Diagnostics,
655AssertTheseDiagnostics(compilation.Emit(New System.IO.MemoryStream()).Diagnostics,
665AssertTheseDiagnostics(compilation.Emit(New System.IO.MemoryStream()).Diagnostics,
1055AssertTheseDiagnostics(compilation.Emit(New System.IO.MemoryStream()).Diagnostics,
1070AssertTheseDiagnostics(compilation.Emit(New System.IO.MemoryStream(), manifestResources:=hash_resources).Diagnostics,
1150Assert.True(comp.Emit(stream).Success)
Microsoft.CodeAnalysis.VisualBasic.Semantic.UnitTests (22)
Compilation\CompilationAPITests.vb (21)
417Dim result = comp.Emit(output, outputPdb, Nothing)
419result = comp.Emit(output, outputPdb)
421result = comp.Emit(peStream:=output, pdbStream:=outputPdb, xmlDocumentationStream:=Nothing, cancellationToken:=Nothing)
423result = comp.Emit(peStream:=output, pdbStream:=outputPdb, cancellationToken:=Nothing)
425result = comp.Emit(output, outputPdb)
427result = comp.Emit(output, outputPdb)
429result = comp.Emit(output, outputPdb, outputxml)
431result = comp.Emit(output, Nothing, Nothing, Nothing)
433result = comp.Emit(output)
435result = comp.Emit(output, Nothing, outputxml)
437result = comp.Emit(output, xmlDocumentationStream:=outputxml)
439result = comp.Emit(output, Nothing, outputxml)
441result = comp.Emit(output, xmlDocumentationStream:=outputxml)
452Assert.Throws(Of ArgumentNullException)("peStream", Sub() comp.Emit(peStream:=Nothing))
453Assert.Throws(Of ArgumentException)("peStream", Sub() comp.Emit(peStream:=New TestStream(canRead:=True, canWrite:=False, canSeek:=True)))
454Assert.Throws(Of ArgumentException)("pdbStream", Sub() comp.Emit(peStream:=New MemoryStream(), pdbStream:=New TestStream(canRead:=True, canWrite:=False, canSeek:=True)))
463Assert.Throws(Of ArgumentException)("embeddedTexts", Sub() comp.Emit(
475Assert.Throws(Of ArgumentException)("win32Resources", Sub() comp.Emit(
479Assert.Throws(Of ArgumentException)("win32Resources", Sub() comp.Emit(
484Assert.True(comp.Emit(
502Dim result = c.Emit(stream, options:=options)
Microsoft.CodeAnalysis.VisualBasic.Symbol.UnitTests (2)
Microsoft.CodeAnalysis.VisualBasic.Test.Utilities (1)
Microsoft.CodeAnalysis.Workspaces (1)
Microsoft.Gen.Logging.Unit.Tests (1)
Roslyn.Test.PdbUtilities (2)
System.Windows.Forms.Design.Tests (1)
WinShimmer (1)