50 references to WithMainTypeName
Microsoft.CodeAnalysis.CSharp (1)
CSharpCompilationOptions.cs (1)
780return WithMainTypeName(mainTypeName);
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (40)
CodeGen\CodeGenAsyncMainTests.cs (4)
40var sourceCompilation = CreateCompilationWithMscorlib40(source, options: TestOptions.DebugExe.WithMainTypeName("Program"), parseOptions: TestOptions.Regular.WithLanguageVersion(LanguageVersion.CSharp7_1)); 93var sourceCompilation = CreateCompilationWithMscorlib40(source, options: TestOptions.DebugExe.WithMainTypeName("Program"), parseOptions: TestOptions.Regular.WithLanguageVersion(LanguageVersion.CSharp7)); 1246var compilation = CreateCompilationWithMscorlib461(source, options: TestOptions.ReleaseExe.WithMainTypeName("A")).VerifyDiagnostics( 1368var compilation = CreateCompilationWithMscorlib461(source, options: TestOptions.ReleaseExe.WithMainTypeName("A")).VerifyDiagnostics();
Emit\CompilationEmitTests.cs (4)
80var compilation = CreateCompilation(source, options: TestOptions.ReleaseExe.WithMainTypeName("abc.X")); 83compilation = CreateCompilation(source, options: TestOptions.ReleaseExe.WithMainTypeName("\"abc.X\"")); 99compilation = CreateCompilation(source, options: TestOptions.ReleaseExe.WithMainTypeName("решения.X")); 102compilation = CreateCompilation(source, options: TestOptions.ReleaseExe.WithMainTypeName("\"решения.X\""));
Emit\EntryPointTests.cs (32)
18return CreateCompilation(source, options: TestOptions.ReleaseExe.WithWarningLevel(5).WithMainTypeName(mainTypeName), parseOptions: parseOptions); 410var compilation = CreateCompilation(source, options: TestOptions.ReleaseExe.WithMainTypeName("N.M")); 428var compilation = CreateCompilation(source, options: TestOptions.ReleaseExe.WithMainTypeName("C.D")); 446var compilation = CreateCompilation(source, options: TestOptions.ReleaseExe.WithMainTypeName("C.D")); 494compilation = CreateCompilation(cs, options: TestOptions.ReleaseExe.WithMainTypeName("C")); 502compilation = CreateCompilation(cs, options: TestOptions.ReleaseExe.WithMainTypeName("D.DD")); 530CompileAndVerify(source, options: TestOptions.ReleaseExe.WithMainTypeName("A.B.C"), expectedOutput: "1"); 554CompileAndVerify(source, options: TestOptions.ReleaseExe.WithMainTypeName("A.B.C"), expectedOutput: "1"); 580CreateCompilation(source, options: TestOptions.ReleaseExe.WithMainTypeName("A.B.C")).VerifyDiagnostics( 602var compilation = CreateCompilation(source, options: TestOptions.ReleaseExe.WithMainTypeName("C")); 624var compilation = CreateCompilation(source, options: TestOptions.ReleaseExe.WithMainTypeName("C")); 647var compilation = CreateCompilation(source, options: TestOptions.ReleaseExe.WithMainTypeName("C")); 675var compilation = CreateCompilation(source, options: TestOptions.ReleaseExe.WithMainTypeName("C")); 696var compilation = CreateCompilation(source, options: TestOptions.ReleaseExe.WithMainTypeName("C")); 812var compilation = CreateCompilation(source, options: TestOptions.ReleaseExe.WithMainTypeName("C")); 815compilation = CreateCompilation(source, options: TestOptions.ReleaseExe.WithMainTypeName("D")); 831options: TestOptions.ReleaseExe.WithMainTypeName("D")); 849options: TestOptions.ReleaseExe.WithMainTypeName("C")); 857options: TestOptions.ReleaseExe.WithMainTypeName("D")); 865options: TestOptions.ReleaseExe.WithMainTypeName("I")); 895var compilation = CreateCompilation(source, options: TestOptions.ReleaseExe.WithMainTypeName("C")); 900compilation = CreateCompilation(source, options: TestOptions.ReleaseExe.WithMainTypeName("D")); 907compilation = CreateCompilation(source, options: TestOptions.ReleaseExe.WithMainTypeName("E")); 933options: TestOptions.ReleaseExe.WithMainTypeName("C")); 1389CreateCompilation(source, options: TestOptions.ReleaseExe.WithMainTypeName("D")).VerifyDiagnostics( 1441CreateCompilation(source, options: TestOptions.ReleaseExe.WithMainTypeName(string.Empty)).VerifyDiagnostics( 1455CreateCompilation(source, options: TestOptions.ReleaseExe.WithMainTypeName("D")).VerifyDiagnostics( 1470CreateCompilation(source, options: TestOptions.ReleaseExe.WithMainTypeName("d")).VerifyDiagnostics( 1488CreateCompilationWithMscorlib40AndSystemCore(source, options: TestOptions.ReleaseExe.WithMainTypeName("B")).VerifyDiagnostics( 1493CreateCompilationWithMscorlib40AndSystemCore(source, options: TestOptions.ReleaseExe.WithMainTypeName("extension")).VerifyDiagnostics( 1511CreateCompilation(source, options: TestOptions.ReleaseExe.WithMainTypeName("Main")).VerifyDiagnostics( 1533CreateCompilation(source, options: TestOptions.ReleaseExe.WithMainTypeName("Program")).VerifyDiagnostics();
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (2)
Semantics\TopLevelStatementsTests.cs (2)
5317var comp = CreateCompilation(text, options: TestOptions.DebugExe.WithMainTypeName("Program2"), parseOptions: DefaultParseOptions); 5344var comp = CreateCompilation(text, options: TestOptions.DebugExe.WithMainTypeName(""), parseOptions: DefaultParseOptions);
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (6)
Compilation\CompilationAPITests.cs (1)
1869var compilation = CreateCompilation(source, options: TestOptions.ReleaseExe.WithMainTypeName("B"));
Compilation\CSharpCompilationOptionsTests.cs (4)
111TestProperty((old, value) => old.WithMainTypeName(value), opt => opt.MainTypeName, "Goo.Bar"); 159Assert.Equal(0, new CSharpCompilationOptions(OutputKind.ConsoleApplication).WithMainTypeName(null).Errors.Length); 160new CSharpCompilationOptions(OutputKind.ConsoleApplication).WithMainTypeName("blah\0goo").VerifyErrors( 164new CSharpCompilationOptions(OutputKind.ConsoleApplication).WithMainTypeName("").VerifyErrors(
Symbols\DefaultInterfaceImplementationTests.cs (1)
46372var compilation1 = CreateCompilation(source1, options: TestOptions.DebugExe.WithMainTypeName("I2"),
Microsoft.VisualStudio.LanguageServices.CSharp (1)
ProjectSystemShim\CSharpProjectShim.OptionsProcessor.cs (1)
144.WithMainTypeName(_mainTypeName)