Skip to content

Interface and Abstract Class Nesting #386

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

DJGosnell
Copy link

@DJGosnell DJGosnell commented Mar 27, 2025

Expands upon #333 and allows for nesting inside abstract partial class and partial interface.
Added tests for each type of nesting allowed.

This additionally fixes an issue with the current implementation where the XML remarks are added to the containing type instead of the MemoryPack type itself.

The only part about this that I feel unhappy with is the added Action in the Emit(StringBuilder writer, IGeneratorContext context, Action appendTypeRemarks) method. The reason I did this was I needed to capture multiple variables in another scope with the AppendTypeRemarks(string? serializationInfoLogDirectoryPath, TypeMeta typeMeta, StringBuilder sb, string fullType) method as the remarks need to be applied to different locations based upon usage of either the typeMeta.EmitUnionFormatterTemplate or the typeMeta.Emit

If you have a better idea, I am happy to re-work it to be cleaner.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant