149 references to EmitOptions
Microsoft.AspNetCore.Http.Extensions.Tests (1)
RequestDelegateGenerator\RequestDelegateCreationTestBase.cs (1)
126var emitOptions = new EmitOptions(
Microsoft.AspNetCore.Http.Microbenchmarks (1)
src\Http\Http.Extensions\test\RequestDelegateGenerator\RequestDelegateCreationTestBase.cs (1)
126var emitOptions = new EmitOptions(
Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation (2)
CSharpCompiler.cs (2)
140return new EmitOptions(); 158var emitOptions = new EmitOptions(debugInformationFormat: debugInformationFormat);
Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation.Test (1)
RuntimeViewCompilerTest.cs (1)
787EmitOptionsSettable = new EmitOptions(debugInformationFormat: DebugInformationFormat.Embedded),
Microsoft.CodeAnalysis (5)
Emit\EmitOptions.cs (4)
20? new EmitOptions() 21: new EmitOptions().WithDebugInformationFormat(DebugInformationFormat.PortablePdb); 198: this( 251private EmitOptions(EmitOptions other) : this(
FileSystemExtensions.cs (1)
57options: new EmitOptions(pdbFilePath: pdbPath),
Microsoft.CodeAnalysis.CSharp.CommandLine.UnitTests (3)
CommandLineTests.cs (3)
7343var peHeaders = new PEHeaders(compilation.EmitToStream(options: new EmitOptions(subsystemVersion: SubsystemVersion.Create(5, 1)))); 9777Assert.Equal("v4.0.30319", ModuleMetadata.CreateFromImage(comp.EmitToArray(new EmitOptions(runtimeMetadataVersion: "v4.0.30319"))).Module.MetadataVersion); 9780Assert.Equal("_+@%#*^", ModuleMetadata.CreateFromImage(comp.EmitToArray(new EmitOptions(runtimeMetadataVersion: "_+@%#*^"))).Module.MetadataVersion);
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (3)
PdbSourceDocument\AbstractPdbSourceDocumentTests.cs (3)
297emitOptions = new EmitOptions(metadataOnly: true, includePrivateMembers: false); 301emitOptions = new EmitOptions(debugInformationFormat: DebugInformationFormat.PortablePdb, pdbFilePath: pdbFilePath); 306emitOptions = new EmitOptions(debugInformationFormat: DebugInformationFormat.Embedded);
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (45)
Emit\CompilationEmitTests.cs (40)
214emitResult = comp.Emit(output, options: new EmitOptions(metadataOnly: true)); 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)); 569options: new EmitOptions(includePrivateMembers: false)); 708options: new EmitOptions(includePrivateMembers: false)); 734options: new EmitOptions(includePrivateMembers: false)); 758options: new EmitOptions(includePrivateMembers: false)); 787options: new EmitOptions(includePrivateMembers: false)); 839options: new EmitOptions(includePrivateMembers: false)); 880options: new EmitOptions(includePrivateMembers: false)); 2708emitResult = libComp.Emit(output, options: new EmitOptions(metadataOnly: true)); 3721var peHeaders = new PEHeaders(compilation.EmitToStream(options: new EmitOptions(highEntropyVirtualAddressSpace: true))); 3757var peHeaders = new PEHeaders(compilation.EmitToStream(options: new EmitOptions(baseAddress: 0x0000000010111111))); 3762peHeaders = new PEHeaders(compilation.EmitToStream(options: new EmitOptions(baseAddress: 0x8000))); 3767peHeaders = new PEHeaders(compilation.EmitToStream(options: new EmitOptions(baseAddress: 0x7fff))); 3777peHeaders = new PEHeaders(compilation.EmitToStream(options: new EmitOptions(baseAddress: 0xffff7fff))); 3782peHeaders = new PEHeaders(compilation.EmitToStream(options: new EmitOptions(baseAddress: 0xffff8000))); 3791peHeaders = new PEHeaders(compilation.EmitToStream(options: new EmitOptions(baseAddress: 0xffffffffffff7fff))); 3796peHeaders = new PEHeaders(compilation.EmitToStream(options: new EmitOptions(baseAddress: 0xffffffffffff8000))); 3811var peHeaders = new PEHeaders(compilation.EmitToStream(options: new EmitOptions(fileAlignment: 1024))); 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")); 4671var emitOptions = new EmitOptions(runtimeMetadataVersion: "v1234"); 4756var emitOptions = new EmitOptions(runtimeMetadataVersion: "v1234"); 4801var emitOptions = new EmitOptions(runtimeMetadataVersion: "v1234"); 4857var emitOptions = new EmitOptions(runtimeMetadataVersion: "v1234"); 4888var emitOptions = new EmitOptions(runtimeMetadataVersion: "v1234"); 4936var emitOptions = new EmitOptions(runtimeMetadataVersion: "v1234"); 4965var emitOptions = new EmitOptions(runtimeMetadataVersion: "v1234"); 5013var emitOptions = new EmitOptions(runtimeMetadataVersion: "v1234"); 5644var emitOptions = new EmitOptions(metadataOnly: true);
Emit\CovariantReturnTests.cs (1)
231return compilation.EmitToImageReference(options: new CodeAnalysis.Emit.EmitOptions(runtimeMetadataVersion: "v5.1"));
Emit\DeterministicTests.cs (1)
488var optEmit = new EmitOptions()
Emit\EmitErrorTests.cs (1)
254var result = compilation2.Emit(executableStream, options: new EmitOptions(metadataOnly: true));
Emit\NoPiaEmbedTypes.cs (1)
142var result = compilation.Emit(executableStream, options: new EmitOptions(metadataOnly: true));
Emit\ResourceTests.cs (1)
446emit = (c, s, r) => c.Emit(s, manifestResources: r, options: new EmitOptions(metadataOnly: metadataOnly));
Microsoft.CodeAnalysis.CSharp.Emit2.UnitTests (3)
Emit\NumericIntPtrTests.cs (2)
10343var emitOptions = new EmitOptions(runtimeMetadataVersion: "v5.1", debugInformationFormat: DebugInformationFormat.PortablePdb); 11824emitOptions: new EmitOptions(runtimeMetadataVersion: "v5.1", debugInformationFormat: DebugInformationFormat.PortablePdb),
PDB\PDBTests.cs (1)
12882var result = compilation.Emit(outStream, options: new EmitOptions(pdbFilePath: "test\\?.pdb", debugInformationFormat: DebugInformationFormat.Embedded));
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (7)
Attributes\AttributeTests.cs (4)
4883syntaxTrees: new[] { Parse("public enum Bar { Baz }") }).EmitToStream(options: new EmitOptions(metadataOnly: true)); 4892"public class Goo { }") }).EmitToStream(options: new EmitOptions(metadataOnly: true)); 10036var emitResult2 = compilation2.Emit(peStream: new MemoryStream(), options: new EmitOptions(metadataOnly: true)); 10050var emitResult3 = compilation3.Emit(peStream: new MemoryStream(), options: new EmitOptions(metadataOnly: true));
Attributes\AttributeTests_Security.cs (1)
641comp.EmitToArray(options: new EmitOptions(runtimeMetadataVersion: "v4.0.31019"), expectedWarnings: new DiagnosticDescription[0]);
Attributes\AttributeTests_Synthesized.cs (2)
1800var reference = CreateCompilationWithMscorlib461(source, options: referenceOptions).EmitToImageReference(options: new EmitOptions(metadataOnly: true)); 1899var reference = CreateCompilationWithMscorlib461(source, options: referenceOptions).EmitToImageReference(options: new EmitOptions(metadataOnly: true));
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (6)
Semantics\InterpolationTests.cs (2)
1036.VerifyEmitDiagnostics(new CodeAnalysis.Emit.EmitOptions(runtimeMetadataVersion: "x.y"), 1069.VerifyEmitDiagnostics(new CodeAnalysis.Emit.EmitOptions(runtimeMetadataVersion: "x.y"),
Semantics\LambdaTests.cs (2)
525var emitResult = vbProject.Emit(metadataStream, options: new EmitOptions(metadataOnly: true)); 574var vbMetadata = vbProject.EmitToArray(options: new EmitOptions(metadataOnly: true));
Semantics\RawInterpolationTests.cs (2)
1036.VerifyEmitDiagnostics(new CodeAnalysis.Emit.EmitOptions(runtimeMetadataVersion: "x.y"), 1068.VerifyEmitDiagnostics(new CodeAnalysis.Emit.EmitOptions(runtimeMetadataVersion: "x.y"),
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (14)
Compilation\CompilationAPITests.cs (2)
399var options = new EmitOptions( 426var options = new EmitOptions(pdbChecksumAlgorithm: default(HashAlgorithmName));
Symbols\AccessorOverriddenOrHiddenMembersTests.cs (1)
871var mtdata = comp1.EmitToArray(options: new EmitOptions(metadataOnly: true));
Symbols\AnonymousTypesSymbolTests.cs (1)
592var result = compilation.Emit(stream, options: new EmitOptions(metadataOnly: metadataOnly));
Symbols\CovariantReturnTests.cs (5)
221}, assemblyName: "mscorlib").EmitToImageReference(options: new CodeAnalysis.Emit.EmitOptions(runtimeMetadataVersion: "v4.1")); 225}, assemblyName: "mscorlib").EmitToImageReference(options: new CodeAnalysis.Emit.EmitOptions(runtimeMetadataVersion: "v4.2")); 229}, assemblyName: "mscorlib").EmitToImageReference(options: new CodeAnalysis.Emit.EmitOptions(runtimeMetadataVersion: "v5.0")); 233}, assemblyName: "mscorlib").EmitToImageReference(options: new CodeAnalysis.Emit.EmitOptions(runtimeMetadataVersion: "v5.1")); 237}, assemblyName: "mscorlib").EmitToImageReference(options: new CodeAnalysis.Emit.EmitOptions(runtimeMetadataVersion: "v4.9"));
Symbols\ErrorTypeSymbolTests.cs (2)
31var reference1 = MetadataReference.CreateFromImage(compilation1.EmitToArray(options: new EmitOptions(metadataOnly: true))); 45var reference2 = MetadataReference.CreateFromImage(compilation2.EmitToArray(options: new EmitOptions(metadataOnly: true)));
Symbols\Source\BaseClassTests.cs (1)
1620var metadata1 = c1.EmitToArray(options: new EmitOptions(metadataOnly: true));
Symbols\SymbolErrorTests.cs (2)
104references: new[] { ModuleMetadata.CreateFromImage(module1.EmitToArray(options: new EmitOptions(metadataOnly: true))).GetReference() }); 109references: new[] { ModuleMetadata.CreateFromImage(module2.EmitToArray(options: new EmitOptions(metadataOnly: true))).GetReference() });
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (2)
Emit\CompilationOutputFilesTests.cs (1)
33var peImage = compilation.EmitToArray(new EmitOptions(debugInformationFormat: DebugInformationFormat.PortablePdb), pdbStream: pdbStream);
Emit\CompilationOutputsTests.cs (1)
57var peImage = compilation.EmitToArray(new EmitOptions(debugInformationFormat: format), pdbStream: pdbStream);
Microsoft.CodeAnalysis.Features.Test.Utilities (1)
EditAndContinue\EditAndContinueWorkspaceTestBase.cs (1)
304var (peImage, pdbImage) = compilation.EmitToArrays(new EmitOptions(debugInformationFormat: pdbFormat));
Microsoft.CodeAnalysis.Features.UnitTests (5)
EditAndContinue\EditAndContinueMethodDebugInfoReaderTests.cs (1)
67compilation.EmitToArray(new EmitOptions(debugInformationFormat: format), pdbStream: pdbStream);
EditAndContinue\EditAndContinueWorkspaceServiceTests.cs (4)
2597var (peImage, pdbImage) = compilationV1.EmitToArrays(new EmitOptions(debugInformationFormat: DebugInformationFormat.PortablePdb)); 3170var (peImageA, pdbImageA) = compilationA.EmitToArrays(new EmitOptions(debugInformationFormat: DebugInformationFormat.PortablePdb)); 3176var (peImageB, pdbImageB) = compilationB.EmitToArrays(new EmitOptions(debugInformationFormat: DebugInformationFormat.PortablePdb)); 3342var peImage = compilationV1.EmitToArray(new EmitOptions(debugInformationFormat: DebugInformationFormat.PortablePdb), pdbStream: pdbStream);
Microsoft.CodeAnalysis.Rebuild (1)
CompilationFactory.cs (1)
148options: new EmitOptions(
Microsoft.CodeAnalysis.Rebuild.UnitTests (5)
CompilationOptionsReaderTests.cs (1)
32var peBytes = compilation.EmitToArray(new EmitOptions(debugInformationFormat: DebugInformationFormat.Embedded));
CSharpRebuildTests.cs (1)
27var originalBytes = original.EmitToArray(new EmitOptions(debugInformationFormat: DebugInformationFormat.Embedded));
DeterministicKeyBuilderTests.cs (1)
35public static EmitOptions EmitOptions { get; } = new();
OptionRoundTripTests.cs (1)
83RoundTripUtil.VerifyRoundTrip(original, new EmitOptions(debugInformationFormat: DebugInformationFormat.PortablePdb, pdbFilePath: "test.pdb"));
RoundTripUtil.cs (1)
75emitOptions ??= new EmitOptions(debugInformationFormat: DebugInformationFormat.Embedded);
Microsoft.CodeAnalysis.Scripting (1)
ScriptBuilder.cs (1)
51private static readonly EmitOptions s_EmitOptionsWithDebuggingInformation = new EmitOptions(
Microsoft.CodeAnalysis.Test.Utilities (1)
PDB\DeterministicBuildCompilationTestHelpers.cs (1)
36var emitOptions = new EmitOptions(
Microsoft.CodeAnalysis.VisualBasic.CommandLine.UnitTests (1)
CommandLineTests.vb (1)
6498Dim peHeaders = New PEHeaders(comp.EmitToStream(New EmitOptions(subsystemVersion:=SubsystemVersion.Create(5, 1))))
Microsoft.CodeAnalysis.VisualBasic.Emit.UnitTests (31)
Attributes\AttributeTests.vb (4)
1879syntaxTrees:={Parse("Public Enum Bar : Baz : End Enum")}).EmitToArray(New EmitOptions(metadataOnly:=True)) 1894End Class]]>.Value)}).EmitToArray(options:=New EmitOptions(metadataOnly:=True)) 4828Dim emitResult2 = compilation2.Emit(peStream:=New MemoryStream(), options:=New EmitOptions(metadataOnly:=True)) 4843Dim emitResult3 = compilation3.Emit(peStream:=New MemoryStream(), options:=New EmitOptions(metadataOnly:=True))
Attributes\AttributeTests_Synthesized.vb (3)
1599Dim reference = CreateCompilationWithMscorlib45AndVBRuntime(source).EmitToImageReference(New EmitOptions(metadataOnly:=True)) 1624Dim reference = CreateCompilationWithMscorlib45AndVBRuntime(source, options:=TestOptions.DebugDll).EmitToImageReference(New EmitOptions(metadataOnly:=True)) 1749Dim reference = CreateCompilationWithMscorlib45AndVBRuntime(source, options:=options).EmitToImageReference(New EmitOptions(metadataOnly:=True))
CodeGen\AnonymousTypesCodeGenTests.vb (1)
169Dim result = compilation.Emit(stream, options:=New EmitOptions(metadataOnly:=j Mod 2 = 0))
CodeGen\CodeGenAsyncTests.vb (1)
2452Dim emitResult = compilation.Emit(stream, options:=New EmitOptions(metadataOnly:=True))
Emit\CompilationEmitTests.vb (19)
269emitResult = compilation.Emit(output, options:=New EmitOptions(metadataOnly:=True)) 323emitResult = compilation.Emit(output, xmlDocumentationStream:=xmlStream, options:=New EmitOptions(metadataOnly:=True)) 369emitResult = compilation.Emit(output, xmlDocumentationStream:=xmlStream, options:=New EmitOptions(metadataOnly:=True)) 415emitResult = compilation.Emit(output, xmlDocumentationStream:=xmlStream, options:=New EmitOptions(metadataOnly:=True)) 464emitResult = compilation.Emit(output, xmlDocumentationStream:=xmlStream, options:=New EmitOptions(metadataOnly:=True)) 514emitResult = compilation.Emit(output, xmlDocumentationStream:=xmlStream, options:=New EmitOptions(metadataOnly:=True)) 563emitResult = compilation.Emit(output, xmlDocumentationStream:=xmlStream, options:=New EmitOptions(metadataOnly:=True)) 2294Dim peHeaders = New PEHeaders(compilation.EmitToStream(options:=New EmitOptions(highEntropyVirtualAddressSpace:=True))) 2330Dim peHeaders = New PEHeaders(compilation.EmitToStream(options:=New EmitOptions(baseAddress:=&H10111111))) 2335peHeaders = New PEHeaders(compilation.EmitToStream(options:=New EmitOptions(baseAddress:=&H8000))) 2340peHeaders = New PEHeaders(compilation.EmitToStream(options:=New EmitOptions(baseAddress:=&H7FFF))) 2371Dim peHeaders = New PEHeaders(compilation.EmitToStream(options:=New EmitOptions(fileAlignment:=1024))) 2375peHeaders = New PEHeaders(compilation.EmitToStream(options:=New EmitOptions(fileAlignment:=4096))) 3389Assert.True(compilation.Emit(stream, options:=New EmitOptions(outputNameOverride:=nameOverride & extension)).Success) 3425Assert.True(compilation.Emit(stream, , options:=New EmitOptions(outputNameOverride:=nameOverride & extension)).Success) 3462Assert.True(compilation.Emit(stream, , options:=New EmitOptions(outputNameOverride:=nameOverride)).Success) 3499Assert.True(compilation.Emit(stream, , options:=New EmitOptions(outputNameOverride:=nameOverride & extension)).Success) 3536Assert.True(compilation.Emit(stream, , options:=New EmitOptions(outputNameOverride:=nameOverride)).Success) 3561Dim result = compilation.Emit(New MemoryStream(), options:=New EmitOptions(outputNameOverride:=" "))
Emit\NoPiaEmbedTypes.vb (1)
517Dim result = compilation.Emit(executableStream, options:=New EmitOptions(metadataOnly:=True))
PDB\PDBTests.vb (1)
4670Dim result = Compilation.Emit(outStream, options:=New EmitOptions(pdbFilePath:="test\\?.pdb", debugInformationFormat:=DebugInformationFormat.Embedded))
PDB\VisualBasicDeterministicBuildCompilationTests.vb (1)
175Dim emitOptions = New EmitOptions(debugInformationFormat:=DebugInformationFormat.Embedded)
Microsoft.CodeAnalysis.VisualBasic.Semantic.UnitTests (2)
Compilation\CompilationAPITests.vb (2)
495Dim options = New EmitOptions( 516Dim options = New EmitOptions(pdbChecksumAlgorithm:=New HashAlgorithmName())
Microsoft.CodeAnalysis.VisualBasic.Symbol.UnitTests (2)
SymbolsTests\Metadata\MetadataMemberTests.vb (1)
716Dim mtdata = DirectCast(comp1, Compilation).EmitToArray(options:=New EmitOptions(metadataOnly:=True))
SymbolsTests\Source\BaseClassTests.vb (1)
2207Dim compilationImage = compilation.EmitToArray(options:=New EmitOptions(metadataOnly:=True))
Microsoft.CodeAnalysis.Workspaces (1)
Workspace\Solution\SolutionCompilationState.SkeletonReferenceCache.cs (1)
76private static readonly EmitOptions s_metadataOnlyEmitOptions = new(
Microsoft.VisualStudio.LanguageServices.CSharp.UnitTests (2)
ProjectSystemShim\VisualStudioCompilationOutputFilesTests.cs (2)
41var peImage = compilation.EmitToArray(new EmitOptions(debugInformationFormat: pdbFormat, pdbFilePath: debugDirPdbPath), pdbStream: pdbStream); 90var peImage = compilation.EmitToArray(new EmitOptions(debugInformationFormat: DebugInformationFormat.PortablePdb, pdbFilePath: debugDirPdbPath), pdbStream: pdbStream);
SemanticSearch.BuildTask.UnitTests (3)
GenerateFilteredReferenceAssembliesTaskTests.cs (3)
113var libImage = libSource.EmitToArray(new EmitOptions(metadataOnly: true)).ToArray(); 158var libImage = libSource.EmitToArray(new EmitOptions(metadataOnly: true)).ToArray(); 198var libImage = libSource.EmitToArray(new EmitOptions(metadataOnly: true)).ToArray();