Skip to content

Multi-level Nesting Applied in Reverse #49

@MooVC

Description

@MooVC

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

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions