roslyn icon indicating copy to clipboard operation
roslyn copied to clipboard

[API Proposal]: Breaking change - Make some types static

Open Youssef1313 opened this issue 3 years ago • 1 comments

Background and Motivation

See discussion in #65830

Proposed API

Namespace Microsoft.CodeAnalysis.VisualBasic
-     Partial Public Class SyntaxFacts
+     Partial Public NotInheritable Class SyntaxFacts
+         Private Sub New()
+         End Sub
      End Class
End Namespace
Namespace Microsoft.CodeAnalysis.VisualBasic.Syntax
-     Public Class SyntaxNodeRemover
+     Public NotInheritable Class SyntaxNodeRemover
+         Private Sub New()
+         End Sub
      End Class
End Namespace
namespace Microsoft.CodeAnalysis.CodeStyle
{
-     public class CodeStyleOptions
+     public static class CodeStyleOptions
      {
      }
}

Youssef1313 avatar Dec 09 '22 14:12 Youssef1313

Note, our next API review session isn't until Jan 5th (much of the office is out for US holidays), so it'll be a bit before we get to this.

333fred avatar Dec 13 '22 18:12 333fred

API Review

  • First two are already static on the C# side, seems ok
  • Third has similar examples on other option holder types.

Conclusion: Approved.

333fred avatar Jan 05 '23 21:01 333fred