Created
July 9, 2025 18:00
-
-
Save rezanid/bf7af68e198a6c161167672f8b411669 to your computer and use it in GitHub Desktop.
How to get .editorconfig options using Roslyn / Visual Studio SDK
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public string GetNamespaceStyle(Document document) | |
| { | |
| var options = await document.GetOptionsAsync(cancellationToken); | |
| var optionKey = new OptionKey(new Option<string>("code_style", "csharp_style_namespace_declarations", "block_scoped")); | |
| return options.GetOption<string>(optionKey); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment