3 writes to MainTypeName
Microsoft.CodeAnalysis (1)
Compilation\CompilationOptions.cs (1)
299this.MainTypeName = mainTypeName;
Microsoft.CodeAnalysis.CSharp (1)
CSharpCompilationOptions.cs (1)
315return new CSharpCompilationOptions(this) { MainTypeName = name };
Microsoft.CodeAnalysis.VisualBasic (1)
VisualBasicCompilationOptions.vb (1)
523Return New VisualBasicCompilationOptions(Me) With {.MainTypeName = name}
49 references to MainTypeName
Microsoft.CodeAnalysis (6)
Compilation\Compilation.cs (1)
2764/// The CLR starts executing the static Main method of <see cref="CompilationOptions.MainTypeName"/> type. When the first breakpoint is hit
Compilation\CompilationOptions.cs (4)
633string.Equals(this.MainTypeName, other.MainTypeName, StringComparison.Ordinal) && 680Hash.Combine(this.MainTypeName != null ? StringComparer.Ordinal.GetHashCode(this.MainTypeName) : 0,
Compilation\DeterministicKeyBuilder.cs (1)
445writer.Write("mainTypeName", options.MainTypeName);
Microsoft.CodeAnalysis.CSharp (10)
Compilation\CSharpCompilation.cs (4)
1890if (this.Options.MainTypeName != null && !this.Options.MainTypeName.IsValidClrTypeName()) 1903if (this.Options.MainTypeName != null && simpleProgramEntryPointSymbol is object) 1929string? mainTypeName = this.Options.MainTypeName;
CSharpCompilationOptions.cs (6)
234mainTypeName: other.MainTypeName, 310if (name == this.MainTypeName) 667if (this.MainTypeName != null) 674if (!MainTypeName.IsValidClrTypeName()) 676builder.Add(Diagnostic.Create(MessageProvider.Instance, (int)ErrorCode.ERR_BadCompilationOptionValue, nameof(MainTypeName), MainTypeName));
Microsoft.CodeAnalysis.CSharp.CodeStyle (1)
src\Analyzers\CSharp\Analyzers\ConvertProgram\ConvertProgramAnalysis_TopLevelStatements.cs (1)
39var mainTypeFullName = compilation.Options.MainTypeName;
Microsoft.CodeAnalysis.CSharp.CommandLine.UnitTests (7)
CommandLineTests.cs (7)
624Assert.Equal("Test", args.CompilationOptions.MainTypeName); 628Assert.Equal("Test", args.CompilationOptions.MainTypeName); 632Assert.Equal("Test.Class1", args.CompilationOptions.MainTypeName); 636Assert.Equal("Test", args.CompilationOptions.MainTypeName); 640Assert.Equal("Test", args.CompilationOptions.MainTypeName); 644Assert.Equal("Test.Class1", args.CompilationOptions.MainTypeName); 649Assert.Equal("решения.Class1", args.CompilationOptions.MainTypeName);
Microsoft.CodeAnalysis.CSharp.Features (1)
src\Analyzers\CSharp\Analyzers\ConvertProgram\ConvertProgramAnalysis_TopLevelStatements.cs (1)
39var mainTypeFullName = compilation.Options.MainTypeName;
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (2)
Compilation\CSharpCompilationOptionsTests.cs (2)
75TestHiddenProperty((old, value) => old.WithMainTypeName(value), opt => opt.MainTypeName, "Goo.Bar"); 111TestProperty((old, value) => old.WithMainTypeName(value), opt => opt.MainTypeName, "Goo.Bar");
Microsoft.CodeAnalysis.Rebuild.UnitTests (1)
RoundTripUtil.cs (1)
226case nameof(CompilationOptions.MainTypeName):
Microsoft.CodeAnalysis.VisualBasic (9)
Compilation\VisualBasicCompilation.vb (3)
1502If Me.Options.MainTypeName IsNot Nothing AndAlso Not Me.Options.MainTypeName.IsValidClrTypeName() Then 1523Dim mainTypeName As String = Me.Options.MainTypeName
Symbols\Source\SourceNamedTypeSymbol.vb (1)
2620Dim mainTypeName As String = DeclaringCompilation.Options.MainTypeName
VisualBasicCompilationOptions.vb (5)
301mainTypeName:=other.MainTypeName, 519If String.Equals(name, Me.MainTypeName, StringComparison.Ordinal) Then 1054If MainTypeName IsNot Nothing AndAlso Not MainTypeName.IsValidClrTypeName() Then 1055builder.Add(Diagnostic.Create(MessageProvider.Instance, ERRID.ERR_InvalidSwitchValue, NameOf(MainTypeName), MainTypeName))
Microsoft.CodeAnalysis.VisualBasic.CommandLine.UnitTests (8)
CommandLineTests.vb (8)
441Assert.Equal("Test", args.CompilationOptions.MainTypeName) 445Assert.Equal("Test", args.CompilationOptions.MainTypeName) 453Assert.Equal("test.Module1", args.CompilationOptions.MainTypeName) 459Assert.Equal("решения.Module1", args.CompilationOptions.MainTypeName) 1949Assert.Equal("A.B.C", parsedArgs.CompilationOptions.MainTypeName) 1954Assert.Equal("X.Y.Z", parsedArgs.CompilationOptions.MainTypeName) 1958Assert.Null(parsedArgs.CompilationOptions.MainTypeName) ' EDMAURER Dev11 accepts and MainTypeName is " " 1973Assert.Equal("XYZ", parsedArgs.CompilationOptions.MainTypeName)
Microsoft.CodeAnalysis.Workspaces (1)
Serialization\AbstractOptionsSerializationService.cs (1)
31writer.WriteString(options.MainTypeName);
Microsoft.CodeAnalysis.Workspaces.MSBuild.UnitTests (1)
VisualStudioMSBuildWorkspaceTests.cs (1)
1553await AssertCSCompilationOptionsAsync("Foo", options => options.MainTypeName);
Microsoft.CodeAnalysis.Workspaces.UnitTests (2)
SolutionTests\TryApplyChangesTests.cs (2)
88canApplyCompilationOptions: (_, newCompilationOptions) => newCompilationOptions.MainTypeName == "Test"); 101canApplyCompilationOptions: (_, newCompilationOptions) => newCompilationOptions.MainTypeName == "Expected");