63 references to WithOptions
Microsoft.AspNetCore.App.Analyzers.Test (1)
Infrastructure\WellKnownTypesTests.cs (1)
77var compilation = CSharpCompilation.Create(assemblyName, trees).WithOptions(options);
Microsoft.CodeAnalysis.CSharp (1)
Compilation\CSharpCompilation.cs (1)
3956return this.WithOptions((CSharpCompilationOptions)options);
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (13)
CodeGen\CodeGenAsyncTests.cs (9)
4420CompileAndVerify(comp.WithOptions(TestOptions.ReleaseExe), expectedOutput: expectedOutput); 4455CompileAndVerify(comp.WithOptions(TestOptions.ReleaseExe)); 4496CompileAndVerify(comp.WithOptions(TestOptions.ReleaseExe), expectedOutput: "0"); 4603CompileAndVerify(comp.WithOptions(TestOptions.ReleaseExe)); 4698CompileAndVerify(comp.WithOptions(TestOptions.ReleaseExe)); 4739CompileAndVerify(comp.WithOptions(TestOptions.ReleaseExe)); 4796CompileAndVerify(comp.WithOptions(TestOptions.ReleaseExe), expectedOutput: expectedOutput); 4849CompileAndVerify(comp.WithOptions(TestOptions.ReleaseExe), expectedOutput: expectedOutput); 4909CompileAndVerify(comp.WithOptions(TestOptions.ReleaseExe), expectedOutput: expectedOutput);
CodeGen\CodeGenTupleTest.cs (2)
25333var comp2 = comp.WithOptions(comp.Options.WithTopLevelBinderFlags(BinderFlags.IgnoreCorLibraryDuplicatedTypes)); 25339.WithOptions(comp.Options.WithTopLevelBinderFlags(BinderFlags.IgnoreCorLibraryDuplicatedTypes));
Emit\CompilationEmitTests.cs (1)
4749useCompilation = useCompilation.WithOptions(useCompilation.Options.WithSpecificDiagnosticOptions(warnings));
Emit\EmitMetadataTests.cs (1)
2223CompileAndVerify(comp.WithAssemblyName("EmitWithNoResourcesAllPlatforms_" + platform.ToString()).WithOptions(options));
Microsoft.CodeAnalysis.CSharp.Emit2.UnitTests (3)
Emit\EditAndContinue\AssemblyReferencesTests.cs (3)
586var compilation1 = compilation0.WithSource(source1.Tree).WithOptions(options.WithCurrentLocalTime(new DateTime(2016, 1, 1, 1, 0, 10))); 587var compilation2 = compilation1.WithSource(source2.Tree).WithOptions(options.WithCurrentLocalTime(new DateTime(2016, 1, 1, 1, 0, 20))); 588var compilation3 = compilation2.WithSource(source3.Tree).WithOptions(options.WithCurrentLocalTime(new DateTime(2016, 1, 1, 1, 0, 30)));
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (17)
Attributes\AttributeTests_Assembly.cs (7)
184other = other.WithOptions(other.Options.WithSpecificDiagnosticOptions(warnings)); 216other = other.WithOptions(other.Options.WithSpecificDiagnosticOptions(warnings)); 419compilation = compilation.WithOptions(TestOptions.ReleaseModule); 432compilation = compilation.WithOptions(compilation.Options.WithSpecificDiagnosticOptions(warnings)); 448compilation = compilation.WithOptions(TestOptions.ReleaseModule); 467compilation = compilation.WithOptions(TestOptions.ReleaseModule); 502compilation = compilation.WithOptions(TestOptions.ReleaseModule);
Attributes\InternalsVisibleToAndStrongNameTests.cs (1)
1822other = other.WithOptions(TestOptions.SigningReleaseModule.WithCryptoKeyFile(s_publicKeyFile));
Diagnostics\DiagnosticAnalyzerTests.cs (4)
1380return compilation.WithOptions(options); 1553var warnAsErrorCompilation = compilation.WithOptions(options); 4201compilation = compilation.WithOptions(options); 4226compilation = compilation.WithOptions(options);
Diagnostics\DiagnosticSuppressorTests.cs (2)
314compilation = compilation.WithOptions(compilation.Options.WithSpecificDiagnosticOptions(specificDiagnosticOptions)); 362compilation = compilation.WithOptions(compilation.Options.WithSpecificDiagnosticOptions(specificDiagnosticOptions));
Diagnostics\GetDiagnosticsTests.cs (3)
660compilation = compilation.WithOptions(compilation.Options.WithConcurrentBuild(true)); 713compilation = compilation.WithOptions(compilation.Options.WithConcurrentBuild(true)); 740compilation = compilation.WithOptions(compilation.Options.WithConcurrentBuild(concurrent));
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (4)
Semantics\OperatorTests.cs (4)
7716compilation = compilation.WithOptions(TestOptions.ReleaseDll.WithOverflowChecks(true)); 8599compilation = compilation.WithOptions(TestOptions.ReleaseDll.WithOverflowChecks(true)); 8647compilation = compilation.WithOptions(TestOptions.ReleaseDll.WithOverflowChecks(true)); 8697compilation = compilation.WithOptions(TestOptions.ReleaseDll.WithOverflowChecks(true));
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (22)
Compilation\CompilationAPITests.cs (12)
1969var c2 = c1.WithOptions(TestOptions.ReleaseExe); 1972c2 = c1.WithOptions(TestOptions.ReleaseDll.WithOutputKind(OutputKind.WindowsApplication)); 1975c2 = c1.WithOptions(TestOptions.ReleaseDll); 1978c2 = c1.WithOptions(TestOptions.ReleaseDll.WithOutputKind(OutputKind.NetModule)); 1983c2 = c1.WithOptions(TestOptions.ReleaseExe); 1986c2 = c1.WithOptions(TestOptions.ReleaseDll); 1989c2 = c1.WithOptions(TestOptions.CreateTestOptions(OutputKind.WindowsApplication, OptimizationLevel.Debug)); 1992c2 = c1.WithOptions(TestOptions.DebugModule.WithAllowUnsafe(true)); 2005var c3 = c1.WithOptions(TestOptions.ReleaseDll.WithMetadataReferenceResolver(c1.Options.MetadataReferenceResolver)); 2014var c2 = c1.WithOptions(TestOptions.ReleaseDll.WithXmlReferenceResolver(new XmlFileResolver(null))); 2017var c3 = c1.WithOptions(TestOptions.ReleaseDll.WithXmlReferenceResolver(c1.Options.XmlReferenceResolver)); 2209var c4 = c3.WithOptions(TestOptions.DebugModule);
Compilation\ReferenceManagerTests.cs (1)
1448var withCircularReference2 = withCircularReference1.WithOptions(TestOptions.ReleaseDll);
Symbols\GenericConstraintTests.cs (1)
7312comp.WithOptions(comp.Options.WithSpecificDiagnosticOptions("CS1701", ReportDiagnostic.Suppress)),
Symbols\Metadata\MetadataMemberTests.cs (5)
741compilation = compilation.WithOptions(options.WithMetadataImportOptions(MetadataImportOptions.Internal)); 748compilation = compilation.WithOptions(options.WithMetadataImportOptions(MetadataImportOptions.All)); 755compilation = compilation.WithOptions(options.WithMetadataImportOptions((MetadataImportOptions)byte.MaxValue)); 803compilation = compilation.WithOptions(TestOptions.DebugDll.WithMetadataImportOptions(MetadataImportOptions.All)); 810compilation = compilation.WithOptions(TestOptions.DebugDll.WithMetadataImportOptions((MetadataImportOptions)byte.MaxValue));
Symbols\Source\ClsComplianceTests.cs (3)
3885comp2.WithOptions(TestOptions.ReleaseDll.WithConcurrentBuild(true)).VerifyDiagnostics( 3890var comp3 = comp2.WithOptions(TestOptions.ReleaseModule.WithConcurrentBuild(false)); 3896comp3.WithOptions(TestOptions.ReleaseModule.WithConcurrentBuild(true)).VerifyDiagnostics(
Microsoft.CodeAnalysis.CSharp.Workspaces.UnitTests (2)
CodeGeneration\AddImportsTests.cs (1)
837.WithOptions(new CSharpCompilationOptions(OutputKind.DynamicallyLinkedLibrary))
CodeGeneration\SyntaxGeneratorTests.cs (1)
2549WithOptions(new CSharpCompilationOptions(OutputKind.DynamicallyLinkedLibrary)).