dotnet / roslyn

The Roslyn .NET compiler provides C# and Visual Basic languages with rich code analysis APIs.
https://docs.microsoft.com/dotnet/csharp/roslyn-sdk/
MIT License
19.04k stars 4.03k forks source link

API Proposal: OptionSet handling #47

Closed mkrueger closed 8 years ago

mkrueger commented 9 years ago

-Why it's not possible to create own option sets or provide option services ?

In general the option API seems to be tailored for a 'read only' use.

paulvanbrenk commented 9 years ago

+1 for making the OptionSet more useful.

Use case In the codeformatter project [https://github.com/dotnet/codeformatter], the code in the project is formatted using the standard Roslyn formatter. This formatter however uses the default formatting options, e.g. "Open Brace on New Line for types", unless you supply an OptionSet, however there is currently no way to instantiate that class since the constructor is internal and the class is sealed.

Pilchie commented 8 years ago

Pulling into 1.2, as this is something that we're looking at related to #7071 (like #7058 and #7059).

Pilchie commented 8 years ago

Let's actually use #7058 to track this.