50 references to WithMainTypeName
Microsoft.CodeAnalysis.CSharp (1)
CSharpCompilationOptions.cs (1)
780
return
WithMainTypeName
(mainTypeName);
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)
80
var compilation = CreateCompilation(source, options: TestOptions.ReleaseExe.
WithMainTypeName
("abc.X"));
83
compilation = CreateCompilation(source, options: TestOptions.ReleaseExe.
WithMainTypeName
("\"abc.X\""));
99
compilation = CreateCompilation(source, options: TestOptions.ReleaseExe.
WithMainTypeName
("решения.X"));
102
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.Semantic.UnitTests (2)
Semantics\TopLevelStatementsTests.cs (2)
5317
var comp = CreateCompilation(text, options: TestOptions.DebugExe.
WithMainTypeName
("Program2"), parseOptions: DefaultParseOptions);
5344
var comp = CreateCompilation(text, options: TestOptions.DebugExe.
WithMainTypeName
(""), parseOptions: DefaultParseOptions);
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (6)
Compilation\CompilationAPITests.cs (1)
1869
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)
46372
var compilation1 = CreateCompilation(source1, options: TestOptions.DebugExe.
WithMainTypeName
("I2"),
Microsoft.VisualStudio.LanguageServices.CSharp (1)
ProjectSystemShim\CSharpProjectShim.OptionsProcessor.cs (1)
144
.
WithMainTypeName
(_mainTypeName)