Skip to content

Add mixin's interface to interface list of child class

Compare
Choose a tag to compare
@pgenfer pgenfer released this 13 May 17:02
· 28 commits to master since this release

Feature #13 is now implemented:
The interfaces of a mixin can now be added to the interface list of the child class when the mixin is included into the child class.
Example:

// the following interface is available
public interface INamed
{ 
    string Name { get; set; }
}
// a mixin implements this interface
public class NameMixin : INamed 
{
   // implementation omitted
}

If this mixin is now included in the following child class:

public class Person
{
   private NameMixin _name;
}

The resulting child class will also provide the same interfaces as its mixin:

public class Person : INamed
{
  private NameMixin _name;
 // implementation omitted
}

Typenames will be reduced depending on the availability of using statements. If no corresponding using statements are available, full qualified type names will be used.