Skip to content

v1.0.0-beta.7

Latest

Choose a tag to compare

@StevenTCramer StevenTCramer released this 17 Oct 17:03
· 2 commits to master since this release
16664ae

Changes

Bug Fixes

  • Fix inherited interface members generation (Closes #27)

    • Interface delegation now generates members from ALL inherited interfaces
    • For example, IList<T> now generates all 13+ members from IList<T>, ICollection<T>, and IEnumerable<T>
    • Previously only generated 4 members from the direct interface
  • Fix indexer generation (Closes #25)

    • Indexers now generate with correct parameter syntax: public T this[int index]
    • Fixes CS1551 error ("Indexers must have at least one parameter")
    • Enables delegation for interfaces like IList<T>, IDictionary<K,V>, etc.

Improvements

  • Local NuGet cache - Added RestorePackagesPath to use local cache instead of global
  • Improved duplicate detection - Method keys now include return types to handle overloads properly
  • Version management - Use $(Version) variable for single source of truth

Documentation

  • Comprehensive documentation for interface delegation generator
  • Usage examples with code samples
  • Requirements and constraints
  • Diagnostic error descriptions (TW1001, TW1002, TW1003)

Generated Code Example

Interface delegation with inherited members:

public partial class ListWrapper<T> : IList<T>
{
    [Implements]
    private readonly List<T> InnerList = new();
}

Generates all inherited members:

  • ICollection: Add, Clear, Contains, CopyTo, Remove, Count, IsReadOnly
  • IEnumerable: GetEnumerator
  • IList: IndexOf, Insert, RemoveAt, this[int index]

Known Limitations

  • IEnumerable.GetEnumerator() (non-generic) requires explicit interface implementation due to return type conflict. This will be addressed in a future update.

Full Changelog

  • Fix indexer generation with proper parameters
  • Add inherited interface member processing
  • Add local NuGet cache configuration
  • Update documentation with examples
  • Bump version to beta.7
  • Use variable for centralized version management

🤖 Generated with Claude Code