pgenfer / mixinSharp

extension for VS2015 that adds mixins to C#
MIT License
11 stars 1 forks source link

Avoid line breaks when generating properties #17

Closed pgenfer closed 8 years ago

pgenfer commented 8 years ago

Currently, when properties are auto generated in the child class, the result will look like this:

public string Name
 {
      get
       {
           return _name.Name;
       }

        set
        {
            _name.Name = value;
        }
}

If a mixin has many properties or a child class included many mixins this would blow the code size needlessly.
Since the forwarding code is only a one-liner, it would make more sense to put complete getter/setter code in one line. The result would then look like:

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