Skip to content

Commit

Permalink
- Hide "public static" for namespaces from symbol tool tip
Browse files Browse the repository at this point in the history
  • Loading branch information
wmjordan committed May 12, 2023
1 parent 6f2ca8c commit 0eeafd1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Codist/Semantics/CodeAnalysisHelper.Symbol.cs
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ public static string GetAbstractionModifier(this ISymbol symbol) {
}
return "abstract ";
}
if (symbol.IsStatic) {
if (symbol.IsStatic && symbol.Kind != SymbolKind.Namespace) {
return "static ";
}
if (symbol.IsVirtual) {
Expand All @@ -258,7 +258,7 @@ public static string GetAbstractionModifier(this ISymbol symbol) {

public static string GetAccessibility(this ISymbol symbol) {
switch (symbol.DeclaredAccessibility) {
case Accessibility.Public: return "public ";
case Accessibility.Public: return symbol.Kind != SymbolKind.Namespace ? "public " : String.Empty;
case Accessibility.Private:
return symbol.GetExplicitInterfaceImplementations().Count != 0 ? String.Empty : "private ";
case Accessibility.ProtectedAndInternal: return "internal protected ";
Expand Down

0 comments on commit 0eeafd1

Please sign in to comment.