I like to indent the code in my #region
blocks for readability (personal preference). However the default behavior of the Text Editor is to inline code with its surrounding region, as follows:
#region
// code defaults to this position
#endregion
I have not been able to find any extensions that will allow the following indentation behavior:
#region
// code should indent to here by default
#endregion
Can roslyn code analysis be used to write an analyzer which enforced this formatting?