Skip to content

Releases: pgenfer/mixinSharp

Maintenance release

03 Dec 20:35
Compare
Choose a tag to compare

Contains the following bugfixes:

#23
#24

Event support

13 Aug 22:32
Compare
Choose a tag to compare

The following issues are implemented / fixed

Forwarding to mixin events is now supported:

If the mixin declares an event

public class NameMixin
{
    public event EventHandler NameChanged;
}

The generated code will include the event in the child class and event access will be forwarded to the mixin:

// child class that includes the mixin
public class Person
{
    private NameMixin _name = new NameMixin();

    public event EventHandler NameChanged
    {
        add { _name.NameChanged += value; }
        remove { _name.NameChanged -= value; }
    }
}

Maintenance release

28 Jul 21:28
Compare
Choose a tag to compare

The following issues are fixed / implemented in this release:

The generated property code now avoids unnecessary line breaks, instead of

public string Name
{
   get
   {
      return _name.Name;
    }
    set
    {
      _name.Name = value;
    }
}

the generated accessor code will only take one line:

public string Name
{
   get { return _name.Name; }
   set { _name.Name = value; }
}

Interfaces can be implemented with mixins

14 Jul 21:40
Compare
Choose a tag to compare

The following product items are implemented in this solution:

#14
Opening the code refactoring menu over an interface gives you an option to implement this interface with a mixin.
Please check the Tutorial section for more details.

#16 (thanks to @aluanhaddad for providing the implementation)
mixinSharp will now also support Visual Studio 15 ( available as preview )

Add mixin's interface to interface list of child class

13 May 17:02
Compare
Choose a tag to compare

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.

Optional constructor injection for mixins

20 Apr 18:24
Compare
Choose a tag to compare

A new optional feature is now avaiable:

Mixins can be automatically initialized via constructor injection. Check out the following code:

// BEFORE code refactoring: 
// no initialization code for the mixin
public class Person
{
    private NameMixin _name;
}

When the corresponding option is set, executing the refactoring step will lead to the following code:

// AFTER code refactoring: 
// Constructor injection of the mixin instance
// was added to the class automatically.
public class Person
{
    private NameMixin _name;
    public Person(NameMixin name = null)
    {
        _name = name;
    }
}

If the feature is enabled, mixinSharp will automatically generate the required constructor (or changes existing ones) and will inject an instance of the mixin through the constructor.

Please check out the Options section for more details.

Bugfix release

30 Mar 22:51
Compare
Choose a tag to compare

The following bugs were fixed in this release:

#9
#10

Options dialog for creating region directives and code documentation

26 Mar 21:08
Compare
Choose a tag to compare

Following features are available now:

  • Options dialog
  • Included mixin code can be surrounded by region directives (can be activated via options)
  • Code documentation from mixin members can also be applied to fowarding methods (can be activated via options)

Minor bug fixes

05 Mar 22:19
Compare
Choose a tag to compare

Contains some minor bug fixes.
Issues
#6
#7
are fixed.

Initial version (feature complete)

27 Feb 23:27
Compare
Choose a tag to compare

Version 1.0 is feature complete and production ready.