165 instantiations of EmitOptions
Microsoft.AspNetCore.Http.Extensions.Tests (1)
Microsoft.AspNetCore.Http.Microbenchmarks (1)
Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation (2)
Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation.Test (1)
Microsoft.CodeAnalysis (18)
Microsoft.CodeAnalysis.CSharp.CommandLine.UnitTests (3)
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (3)
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);
Microsoft.CodeAnalysis.CSharp.Emit2.UnitTests (3)
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (7)
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (6)
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (14)
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (2)
Microsoft.CodeAnalysis.Features.Test.Utilities (1)
Microsoft.CodeAnalysis.Features.UnitTests (5)
Microsoft.CodeAnalysis.Rebuild (1)
Microsoft.CodeAnalysis.Rebuild.UnitTests (5)
Microsoft.CodeAnalysis.Scripting (1)
Microsoft.CodeAnalysis.Test.Utilities (1)
Microsoft.CodeAnalysis.UnitTests (3)
Microsoft.CodeAnalysis.VisualBasic.CommandLine.UnitTests (1)
Microsoft.CodeAnalysis.VisualBasic.Emit.UnitTests (31)
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:=" "))
Microsoft.CodeAnalysis.VisualBasic.Semantic.UnitTests (2)
Microsoft.CodeAnalysis.VisualBasic.Symbol.UnitTests (2)
Microsoft.CodeAnalysis.Workspaces (1)
Microsoft.VisualStudio.LanguageServices.CSharp.UnitTests (2)
SemanticSearch.BuildTask.UnitTests (3)
463 references to EmitOptions
Microsoft.AspNetCore.Http.Extensions.Tests (1)
Microsoft.AspNetCore.Http.Microbenchmarks (1)
Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation (5)
Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation.Test (2)
Microsoft.CodeAnalysis (48)
Compilation\Compilation.cs (14)
203EmitOptions? emitOptions = null,
215EmitOptions? emitOptions = null,
2199EmitOptions emitOptions,
2471EmitOptions emitOptions,
2642emitOptions: EmitOptions.Default,
2680EmitOptions options,
2704EmitOptions options,
2728EmitOptions options,
2789EmitOptions? options = null,
2817EmitOptions? options,
2935EmitOptions? options,
2943options = options ?? EmitOptions.Default.WithIncludePrivateMembers(metadataPEStream == null);
3150EmitOptions options,
3213EmitOptions emitOptions,
Microsoft.CodeAnalysis.CSharp (15)
Microsoft.CodeAnalysis.CSharp.CommandLine.UnitTests (2)
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (1)
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (115)
Emit\CompilationEmitTests.cs (82)
907var emitRefAssembly = EmitOptions.Default.WithEmitMetadataOnly(true).WithIncludePrivateMembers(false);
928var emitRefAssembly = EmitOptions.Default.WithEmitMetadataOnly(true).WithIncludePrivateMembers(false);
950var emitRefAssembly = EmitOptions.Default.WithEmitMetadataOnly(true).WithIncludePrivateMembers(false);
1206var image1 = comp1.EmitToStream(EmitOptions.Default.WithEmitMetadataOnly(true).WithIncludePrivateMembers(includePrivateMembers));
1210var image2 = comp2.EmitToStream(EmitOptions.Default.WithEmitMetadataOnly(true).WithIncludePrivateMembers(includePrivateMembers));
1285var refoutOptions = EmitOptions.Default.WithEmitMetadataOnly(false).WithIncludePrivateMembers(false);
1297var refonlyOptions = EmitOptions.Default.WithEmitMetadataOnly(true).WithIncludePrivateMembers(false);
1325var refonlyOptions = EmitOptions.Default.WithEmitMetadataOnly(true).WithIncludePrivateMembers(false);
1334var refoutOptions = EmitOptions.Default.WithEmitMetadataOnly(false).WithIncludePrivateMembers(false);
1808var image1 = comp1.EmitToImageReference(EmitOptions.Default);
1816var image2 = comp2.EmitToImageReference(EmitOptions.Default.WithEmitMetadataOnly(true).WithIncludePrivateMembers(false));
1868EmitOptions.Default.WithEmitMetadataOnly(false));
1874EmitOptions.Default.WithEmitMetadataOnly(true).WithIncludePrivateMembers(true));
1880EmitOptions.Default.WithEmitMetadataOnly(true).WithIncludePrivateMembers(false));
1884private static void VerifyRefAssemblyClient(string lib_cs, string source, Action<CSharpCompilation> validator, EmitOptions emitOptions)
1973var options = EmitOptions.Default.WithIncludePrivateMembers(false);
1985var options = EmitOptions.Default.WithEmitMetadataOnly(true).WithIncludePrivateMembers(false);
2088verifyIgnoresDiagnostics(EmitOptions.Default.WithEmitMetadataOnly(false).WithTolerateErrors(false), success: false);
2089verifyIgnoresDiagnostics(EmitOptions.Default.WithEmitMetadataOnly(true).WithTolerateErrors(false), success: expectSuccess);
2091void verifyIgnoresDiagnostics(EmitOptions emitOptions, bool success)
2128CompileAndVerify(comp, emitOptions: EmitOptions.Default, verify: Verification.Passes);
2131var realImage = comp.EmitToImageReference(EmitOptions.Default);
2159var emitRegularWithoutPrivateMembers = EmitOptions.Default.WithIncludePrivateMembers(false);
2187var emitMetadataOnly = EmitOptions.Default.WithEmitMetadataOnly(true);
2216var emitRefOnly = EmitOptions.Default.WithEmitMetadataOnly(true).WithIncludePrivateMembers(false);
2266CompileAndVerify(comp, emitOptions: EmitOptions.Default, verify: Verification.Passes);
2268var realImage = comp.EmitToImageReference(EmitOptions.Default);
2275var emitMetadataOnly = EmitOptions.Default.WithEmitMetadataOnly(true);
2287var emitRefOnly = EmitOptions.Default.WithEmitMetadataOnly(true).WithIncludePrivateMembers(false);
2333CompileAndVerify(comp, emitOptions: EmitOptions.Default, verify: Verification.Passes);
2335var realImage = comp.EmitToImageReference(EmitOptions.Default);
2342var emitMetadataOnly = EmitOptions.Default.WithEmitMetadataOnly(true);
2354var emitRefOnly = EmitOptions.Default.WithEmitMetadataOnly(true).WithIncludePrivateMembers(false);
2400CompileAndVerify(comp, emitOptions: EmitOptions.Default, verify: Verification.Passes);
2402var realImage = comp.EmitToImageReference(EmitOptions.Default);
2409var emitMetadataOnly = EmitOptions.Default.WithEmitMetadataOnly(true);
2421var emitRefOnly = EmitOptions.Default.WithEmitMetadataOnly(true).WithIncludePrivateMembers(false);
2460var emitRefOnly = EmitOptions.Default.WithEmitMetadataOnly(true).WithIncludePrivateMembers(false);
2505var emitRefOnly = EmitOptions.Default.WithEmitMetadataOnly(true).WithIncludePrivateMembers(false);
2530options: EmitOptions.Default.WithEmitMetadataOnly(true)));
2544options: EmitOptions.Default.WithEmitMetadataOnly(true)));
2558options: EmitOptions.Default.WithIncludePrivateMembers(true)));
2572_ = comp.Emit(output, options: EmitOptions.Default.WithIncludePrivateMembers(false));
2586options: EmitOptions.Default));
2599options: EmitOptions.Default.WithEmitMetadataOnly(true)));
2613options: EmitOptions.Default.WithDebugInformationFormat(DebugInformationFormat.Embedded).WithIncludePrivateMembers(false));
2638options: EmitOptions.Default.WithEmitMetadataOnly(true)
2723var module = new PEAssemblyBuilder((SourceAssemblySymbol)class1.ContainingAssembly, EmitOptions.Default,
3772peHeaders = new PEHeaders(compilation.EmitToStream(options: EmitOptions.Default));
3786peHeaders = new PEHeaders(compilation.EmitToStream(options: EmitOptions.Default));
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");
5194var result = compilation.Emit(output, pdbStream, options: EmitOptions.Default.WithDebugInformationFormat(DebugInformationFormat.PortablePdb));
5473var portablePdbOptions = EmitOptions.Default
5644var emitOptions = new EmitOptions(metadataOnly: true);
Microsoft.CodeAnalysis.CSharp.Emit2.UnitTests (34)
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (8)
Microsoft.CodeAnalysis.CSharp.Scripting.UnitTests (1)
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (21)
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (33)
Symbols\Source\MethodTests.cs (6)
1682var module = new PEAssemblyBuilder((SourceAssemblySymbol)@class.ContainingAssembly, EmitOptions.Default, OutputKind.DynamicallyLinkedLibrary,
1726var module = new PEAssemblyBuilder((SourceAssemblySymbol)@class.ContainingAssembly, EmitOptions.Default, OutputKind.DynamicallyLinkedLibrary,
1773var module = new PEAssemblyBuilder((SourceAssemblySymbol)@class.ContainingAssembly, EmitOptions.Default, OutputKind.DynamicallyLinkedLibrary,
1827var module = new PEAssemblyBuilder((SourceAssemblySymbol)@class.ContainingAssembly, EmitOptions.Default, OutputKind.DynamicallyLinkedLibrary,
1968var module = new PEAssemblyBuilder((SourceAssemblySymbol)classC.ContainingAssembly, EmitOptions.Default, OutputKind.DynamicallyLinkedLibrary,
2012var module = new PEAssemblyBuilder((SourceAssemblySymbol)classC.ContainingAssembly, EmitOptions.Default, OutputKind.DynamicallyLinkedLibrary,
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (1)
Microsoft.CodeAnalysis.CSharp.Test.Utilities (10)
Microsoft.CodeAnalysis.CSharp.WinRT.UnitTests (3)
Microsoft.CodeAnalysis.Features.Test.Utilities (1)
Microsoft.CodeAnalysis.Rebuild.UnitTests (6)
Microsoft.CodeAnalysis.Scripting (4)
Microsoft.CodeAnalysis.Test.Utilities (27)
Microsoft.CodeAnalysis.UnitTests (31)
Emit\EmitOptionsTests.cs (30)
21Func<EmitOptions, T, EmitOptions> factory,
22Func<EmitOptions, T> getter,
25var oldOpt1 = EmitOptions.Default;
33var newOpt1 = factory(oldOpt1, validNonDefaultValue);
37var newOpt1_alias = factory(newOpt1, validNonDefaultValue);
41var newOpt2 = factory(oldOpt1, validNonDefaultValue);
71/// If this test fails, please update the <see cref="EmitOptions.GetHashCode"/>
72/// and <see cref="EmitOptions.Equals(EmitOptions)"/> methods to
80typeof(EmitOptions),
81nameof(EmitOptions.EmitMetadataOnly),
82nameof(EmitOptions.SubsystemVersion),
83nameof(EmitOptions.FileAlignment),
84nameof(EmitOptions.HighEntropyVirtualAddressSpace),
85nameof(EmitOptions.BaseAddress),
86nameof(EmitOptions.DebugInformationFormat),
87nameof(EmitOptions.OutputNameOverride),
88nameof(EmitOptions.PdbFilePath),
89nameof(EmitOptions.PdbChecksumAlgorithm),
90nameof(EmitOptions.RuntimeMetadataVersion),
91nameof(EmitOptions.TolerateErrors),
92nameof(EmitOptions.IncludePrivateMembers),
93nameof(EmitOptions.InstrumentationKinds),
94nameof(EmitOptions.DefaultSourceFileEncoding),
95nameof(EmitOptions.FallbackSourceFileEncoding));
101var options1 = new EmitOptions(
114var options2 = new EmitOptions(
128var options3 = new EmitOptions(
Microsoft.CodeAnalysis.VisualBasic (10)
Microsoft.CodeAnalysis.VisualBasic.Emit.UnitTests (68)
Emit\CompilationEmitTests.vb (35)
609options:=EmitOptions.Default.WithIncludePrivateMembers(False))
637options:=EmitOptions.Default.WithIncludePrivateMembers(False))
660Dim emitRefAssembly = EmitOptions.Default.WithEmitMetadataOnly(True).WithIncludePrivateMembers(False)
683Dim emitRefAssembly = EmitOptions.Default.WithEmitMetadataOnly(True).WithIncludePrivateMembers(False)
700Dim emitRefAssembly = EmitOptions.Default.WithEmitMetadataOnly(True).WithIncludePrivateMembers(False)
994Dim options = EmitOptions.Default.WithIncludePrivateMembers(False)
1004Dim options = EmitOptions.Default.WithEmitMetadataOnly(True).WithIncludePrivateMembers(False)
1063Dim image1 As ImmutableArray(Of Byte) = comp1.EmitToArray(EmitOptions.Default.WithEmitMetadataOnly(True).WithIncludePrivateMembers(includePrivateMembers))
1068Dim image2 As ImmutableArray(Of Byte) = comp2.EmitToArray(EmitOptions.Default.WithEmitMetadataOnly(True).WithIncludePrivateMembers(includePrivateMembers))
1169Dim refonlyOptions = EmitOptions.[Default].WithEmitMetadataOnly(True).WithIncludePrivateMembers(False)
1175Dim refoutOptions = EmitOptions.[Default].WithEmitMetadataOnly(False).WithIncludePrivateMembers(False)
1290Dim image1 = comp1.EmitToImageReference(EmitOptions.Default)
1301Dim image2 = comp2.EmitToImageReference(EmitOptions.Default.WithEmitMetadataOnly(True).WithIncludePrivateMembers(False))
1363Dim options = EmitOptions.Default.WithEmitMetadataOnly(True).WithIncludePrivateMembers(False)
1383EmitOptions.Default.WithEmitMetadataOnly(False))
1387EmitOptions.Default.WithEmitMetadataOnly(True).WithIncludePrivateMembers(True))
1391EmitOptions.Default.WithEmitMetadataOnly(False).WithIncludePrivateMembers(False))
1395Private Sub VerifyRefAssemblyClient(lib_vb As String, source As String, validator As Action(Of VisualBasicCompilation), emitOptions As EmitOptions)
1434Dim EmitResult = comp.Emit(output, options:=EmitOptions.Default.WithEmitMetadataOnly(True))
1471Dim verifier = CompileAndVerify(comp, emitOptions:=EmitOptions.Default.WithEmitMetadataOnly(True), verify:=Verification.Passes)
1474Dim realImage = comp.EmitToImageReference(EmitOptions.Default)
1503Dim emitMetadataOnly = EmitOptions.Default.WithEmitMetadataOnly(True)
1537Dim emitRefOnly = EmitOptions.Default.WithEmitMetadataOnly(True).WithIncludePrivateMembers(False)
1588Dim verifier = CompileAndVerify(comp, emitOptions:=EmitOptions.Default.WithEmitMetadataOnly(True), verify:=Verification.Passes)
1591Dim realImage = comp.EmitToImageReference(EmitOptions.Default)
1605Dim emitMetadataOnly = EmitOptions.Default.WithEmitMetadataOnly(True)
1624Dim emitRefOnly = EmitOptions.Default.WithEmitMetadataOnly(True).WithIncludePrivateMembers(False)
1666Dim verifier = CompileAndVerify(comp, emitOptions:=EmitOptions.Default.WithEmitMetadataOnly(True), verify:=Verification.Passes)
1669Dim realImage = comp.EmitToImageReference(EmitOptions.Default)
1684Dim emitMetadataOnly = EmitOptions.Default.WithEmitMetadataOnly(True)
1704Dim emitRefOnly = EmitOptions.Default.WithEmitMetadataOnly(True).WithIncludePrivateMembers(False)
1733Dim verifier = CompileAndVerify(comp, emitOptions:=EmitOptions.Default.WithEmitMetadataOnly(True), verify:=Verification.Passes)
1736Dim emitRefOnly = EmitOptions.Default.WithEmitMetadataOnly(True).WithIncludePrivateMembers(False)
1761options:=EmitOptions.Default.WithEmitMetadataOnly(True)))
1774options:=EmitOptions.Default.WithEmitMetadataOnly(True)))
Microsoft.CodeAnalysis.VisualBasic.ExpressionCompiler (1)
Microsoft.CodeAnalysis.VisualBasic.Semantic.UnitTests (3)
Microsoft.CodeAnalysis.VisualBasic.Symbol.UnitTests (1)
Microsoft.CodeAnalysis.VisualBasic.Test.Utilities (6)
Microsoft.CodeAnalysis.Workspaces (1)
Roslyn.Test.PdbUtilities (3)