Fix interface delegation to include inherited interface members#28
Merged
Conversation
Fixes #27 - Process all inherited interfaces recursively using AllInterfaces - Add ProcessInterfaceMembers helper to traverse interface hierarchy - Include return type in method key to handle overloaded GetEnumerator - Add local NuGet cache to avoid global cache issues - Add version marker comment for debugging (YO YO YO MAMA v2) - Update .gitignore to exclude .nuget-cache/ The fix now generates ALL interface members including those from base interfaces. For example, IList<T> now generates: - IList<T> members: IndexOf, Insert, RemoveAt, this[int] - ICollection<T> members: Add, Clear, Contains, CopyTo, Remove, Count, IsReadOnly - IEnumerable<T> members: GetEnumerator Known limitation: IEnumerable (non-generic) GetEnumerator() requires explicit interface implementation due to return type conflict. This will be addressed in a future update.
- Update version from beta.6 to beta.7 - Change Directory.Packages.props to use $(Version) variable - Single source of truth for version in source/Directory.Build.props
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes #27 - Interface delegation now generates members from inherited interfaces, not just the directly specified interface.
Problem
The generator only produced members from the directly specified interface, missing all inherited interface members. For example,
IList<T>only generated 4 members instead of 14 (missing allICollection<T>andIEnumerable<T>members).Solution
AllInterfacesChanges
Core Fix
GenerateInterfaceDelegationto process inherited interfacesProcessInterfaceMembersmethod to traverse hierarchyBuild Configuration
RestorePackagesPathfor local NuGet cache.nuget-cache/directoryGenerated Output Example
Before (only IList members):
After (all inherited members):
Known Limitations
IEnumerable.GetEnumerator()(non-generic) requires explicit interface implementation due to return type conflict with the generic version. This is a rare edge case that will be addressed in a future update if needed.Test Plan
IList<T>delegation🤖 Generated with Claude Code