Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove enterprise level code for 'false' #62925

Merged
merged 2 commits into from
Jul 26, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -687,14 +687,7 @@ internal override bool TryGetBaseList(ExpressionSyntax expression, out TypeKindO
internal override bool IsPublicOnlyAccessibility(ExpressionSyntax expression, Project project)
{
if (expression == null)
{
return false;
}

if (GeneratedTypesMustBePublic(project))
{
return true;
}

var node = expression as SyntaxNode;
SyntaxNode previousNode = null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -301,8 +301,7 @@ private bool GenerateInterface(TService service)
// If the 2 documents are in different project then we must have Public Accessibility.
// If we are generating in a website project, we also want to type to be public so the
// designer files can access the type.
if (documentToBeGeneratedIn.Project != document.Project ||
GeneratedTypesMustBePublic(documentToBeGeneratedIn.Project))
if (documentToBeGeneratedIn.Project != document.Project)
{
IsPublicAccessibilityForTypeGeneration = true;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
using Microsoft.CodeAnalysis.Formatting;
using Microsoft.CodeAnalysis.Internal.Log;
using Microsoft.CodeAnalysis.LanguageServices;
using Microsoft.CodeAnalysis.LanguageServices.ProjectInfoService;
using Microsoft.CodeAnalysis.PooledObjects;
using Microsoft.CodeAnalysis.Shared.Extensions;
using Microsoft.CodeAnalysis.Shared.Utilities;
Expand Down Expand Up @@ -293,16 +292,5 @@ protected static async Task<bool> IsWithinTheImportingNamespaceAsync(Document do

return false;
}

protected static bool GeneratedTypesMustBePublic(Project project)
{
var projectInfoService = project.Solution.Workspace.Services.GetService<IProjectInfoService>();
if (projectInfoService != null)
{
return projectInfoService.GeneratedTypesMustBePublic(project);
}

return false;
}
}
}

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -565,10 +565,6 @@ Namespace Microsoft.CodeAnalysis.VisualBasic.GenerateType
Return False
End If

If GeneratedTypesMustBePublic(project) Then
Return True
End If

Dim node As SyntaxNode = expression
While node IsNot Nothing
' Types in BaseList, Type Constraint or Member Types cannot be of more restricted accessibility than the declaring type
Expand Down

This file was deleted.

This file was deleted.