63 references to WithMainTypeName
Microsoft.CodeAnalysis.CSharp (1)
CSharpCompilationOptions.cs (1)
780
return
WithMainTypeName
(mainTypeName);
Microsoft.CodeAnalysis.CSharp.CommandLine.UnitTests (2)
CommandLineTests.cs (2)
7448
options = options.
WithMainTypeName
("a");
7483
options = options.
WithMainTypeName
(null);
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (40)
CodeGen\CodeGenAsyncMainTests.cs (4)
40
var sourceCompilation = CreateCompilationWithMscorlib40(source, options: TestOptions.DebugExe.
WithMainTypeName
("Program"), parseOptions: TestOptions.Regular.WithLanguageVersion(LanguageVersion.CSharp7_1));
93
var sourceCompilation = CreateCompilationWithMscorlib40(source, options: TestOptions.DebugExe.
WithMainTypeName
("Program"), parseOptions: TestOptions.Regular.WithLanguageVersion(LanguageVersion.CSharp7));
1246
var compilation = CreateCompilationWithMscorlib461(source, options: TestOptions.ReleaseExe.
WithMainTypeName
("A")).VerifyDiagnostics(
1368
var compilation = CreateCompilationWithMscorlib461(source, options: TestOptions.ReleaseExe.
WithMainTypeName
("A")).VerifyDiagnostics();
Emit\CompilationEmitTests.cs (4)
81
var compilation = CreateCompilation(source, options: TestOptions.ReleaseExe.
WithMainTypeName
("abc.X"));
84
compilation = CreateCompilation(source, options: TestOptions.ReleaseExe.
WithMainTypeName
("\"abc.X\""));
100
compilation = CreateCompilation(source, options: TestOptions.ReleaseExe.
WithMainTypeName
("решения.X"));
103
compilation = CreateCompilation(source, options: TestOptions.ReleaseExe.
WithMainTypeName
("\"решения.X\""));
Emit\EntryPointTests.cs (32)
18
return CreateCompilation(source, options: TestOptions.ReleaseExe.WithWarningLevel(5).
WithMainTypeName
(mainTypeName), parseOptions: parseOptions);
410
var compilation = CreateCompilation(source, options: TestOptions.ReleaseExe.
WithMainTypeName
("N.M"));
428
var compilation = CreateCompilation(source, options: TestOptions.ReleaseExe.
WithMainTypeName
("C.D"));
446
var compilation = CreateCompilation(source, options: TestOptions.ReleaseExe.
WithMainTypeName
("C.D"));
494
compilation = CreateCompilation(cs, options: TestOptions.ReleaseExe.
WithMainTypeName
("C"));
502
compilation = CreateCompilation(cs, options: TestOptions.ReleaseExe.
WithMainTypeName
("D.DD"));
530
CompileAndVerify(source, options: TestOptions.ReleaseExe.
WithMainTypeName
("A.B.C"), expectedOutput: "1");
554
CompileAndVerify(source, options: TestOptions.ReleaseExe.
WithMainTypeName
("A.B.C"), expectedOutput: "1");
580
CreateCompilation(source, options: TestOptions.ReleaseExe.
WithMainTypeName
("A.B.C")).VerifyDiagnostics(
602
var compilation = CreateCompilation(source, options: TestOptions.ReleaseExe.
WithMainTypeName
("C"));
624
var compilation = CreateCompilation(source, options: TestOptions.ReleaseExe.
WithMainTypeName
("C"));
647
var compilation = CreateCompilation(source, options: TestOptions.ReleaseExe.
WithMainTypeName
("C"));
675
var compilation = CreateCompilation(source, options: TestOptions.ReleaseExe.
WithMainTypeName
("C"));
696
var compilation = CreateCompilation(source, options: TestOptions.ReleaseExe.
WithMainTypeName
("C"));
812
var compilation = CreateCompilation(source, options: TestOptions.ReleaseExe.
WithMainTypeName
("C"));
815
compilation = CreateCompilation(source, options: TestOptions.ReleaseExe.
WithMainTypeName
("D"));
831
options: TestOptions.ReleaseExe.
WithMainTypeName
("D"));
849
options: TestOptions.ReleaseExe.
WithMainTypeName
("C"));
857
options: TestOptions.ReleaseExe.
WithMainTypeName
("D"));
865
options: TestOptions.ReleaseExe.
WithMainTypeName
("I"));
895
var compilation = CreateCompilation(source, options: TestOptions.ReleaseExe.
WithMainTypeName
("C"));
900
compilation = CreateCompilation(source, options: TestOptions.ReleaseExe.
WithMainTypeName
("D"));
907
compilation = CreateCompilation(source, options: TestOptions.ReleaseExe.
WithMainTypeName
("E"));
933
options: TestOptions.ReleaseExe.
WithMainTypeName
("C"));
1389
CreateCompilation(source, options: TestOptions.ReleaseExe.
WithMainTypeName
("D")).VerifyDiagnostics(
1441
CreateCompilation(source, options: TestOptions.ReleaseExe.
WithMainTypeName
(string.Empty)).VerifyDiagnostics(
1455
CreateCompilation(source, options: TestOptions.ReleaseExe.
WithMainTypeName
("D")).VerifyDiagnostics(
1470
CreateCompilation(source, options: TestOptions.ReleaseExe.
WithMainTypeName
("d")).VerifyDiagnostics(
1488
CreateCompilationWithMscorlib40AndSystemCore(source, options: TestOptions.ReleaseExe.
WithMainTypeName
("B")).VerifyDiagnostics(
1493
CreateCompilationWithMscorlib40AndSystemCore(source, options: TestOptions.ReleaseExe.
WithMainTypeName
("extension")).VerifyDiagnostics(
1511
CreateCompilation(source, options: TestOptions.ReleaseExe.
WithMainTypeName
("Main")).VerifyDiagnostics(
1533
CreateCompilation(source, options: TestOptions.ReleaseExe.
WithMainTypeName
("Program")).VerifyDiagnostics();
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (11)
Semantics\ExtensionTests.cs (11)
37831
comp = CreateCompilation(source, options: TestOptions.ReleaseExe.
WithMainTypeName
("E"));
37852
comp = CreateCompilation(source, options: TestOptions.ReleaseExe.
WithMainTypeName
("E"));
37871
var comp = CreateCompilation(source, options: TestOptions.ReleaseExe.
WithMainTypeName
("E.<>E__0"));
37894
var comp = CreateCompilation(source, options: TestOptions.ReleaseExe.
WithMainTypeName
("E."));
37899
comp = CreateCompilation(source, options: TestOptions.ReleaseExe.
WithMainTypeName
("E. "));
37904
comp = CreateCompilation(source, options: TestOptions.ReleaseExe.
WithMainTypeName
(""));
37908
comp = CreateCompilation(source, options: TestOptions.ReleaseExe.
WithMainTypeName
(" "));
37913
comp = CreateCompilation(source, options: TestOptions.ReleaseExe.
WithMainTypeName
(".A"));
37934
comp = CreateCompilation(source, options: TestOptions.ReleaseExe.
WithMainTypeName
("E"));
37953
comp = CreateCompilation(source, options: TestOptions.ReleaseExe.
WithMainTypeName
("E"));
37977
comp = CreateCompilation(source, options: TestOptions.ReleaseExe.
WithMainTypeName
("E"));
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (2)
Semantics\TopLevelStatementsTests.cs (2)
5318
var comp = CreateCompilation(text, options: TestOptions.DebugExe.
WithMainTypeName
("Program2"), parseOptions: DefaultParseOptions);
5345
var comp = CreateCompilation(text, options: TestOptions.DebugExe.
WithMainTypeName
(""), parseOptions: DefaultParseOptions);
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (6)
Compilation\CompilationAPITests.cs (1)
1868
var compilation = CreateCompilation(source, options: TestOptions.ReleaseExe.
WithMainTypeName
("B"));
Compilation\CSharpCompilationOptionsTests.cs (4)
111
TestProperty((old, value) => old.
WithMainTypeName
(value), opt => opt.MainTypeName, "Goo.Bar");
159
Assert.Equal(0, new CSharpCompilationOptions(OutputKind.ConsoleApplication).
WithMainTypeName
(null).Errors.Length);
160
new CSharpCompilationOptions(OutputKind.ConsoleApplication).
WithMainTypeName
("blah\0goo").VerifyErrors(
164
new CSharpCompilationOptions(OutputKind.ConsoleApplication).
WithMainTypeName
("").VerifyErrors(
Symbols\DefaultInterfaceImplementationTests.cs (1)
46378
var compilation1 = CreateCompilation(source1, options: TestOptions.DebugExe.
WithMainTypeName
("I2"),
Microsoft.VisualStudio.LanguageServices.CSharp (1)
ProjectSystemShim\CSharpProjectShim.OptionsProcessor.cs (1)
145
.
WithMainTypeName
(_mainTypeName)