Describe the bug
When the class annotated with Monify is more than two levels down, the order of the parent classes are reversed, resulting in invalid code.
To Reproduce
Define your nested class:
public partial class Snippet
{
public partial class BlockOptions
{
[Monify(Type = typeof(int))]
public partial class InlineStyle
{
Observe the generated code:
partial class Snippet
{
partial class BlockOptions
{
sealed partial class InlineStyle
{
Expected behavior
The generated code should respect the order to which the classes were defined:
partial class BlockOptions
{
partial class Snippet
{
sealed partial class InlineStyle
{
Environment (please complete the following information):
- Monify Version: 1.3.0
- .NET Version (Your Project): .NET Standard 2.0
- IDE: Visual Studio 2026 v18.0.2
Describe the bug
When the class annotated with
Monifyis more than two levels down, the order of the parent classes are reversed, resulting in invalid code.To Reproduce
Define your nested class:
Observe the generated code:
Expected behavior
The generated code should respect the order to which the classes were defined:
Environment (please complete the following information):