KvanTTT / CSharp-Minifier

Library for C# code minification based on NRefactory. That is lib for spaces, line breaks, comments removing, reduction of identifiers name length and so on in C# code.
Apache License 2.0
41 stars 21 forks source link

Ignores interface signature #33

Open thomasdiemar opened 8 years ago

thomasdiemar commented 8 years ago

Code

    public interface IT
    {
        int Getter { get; }
        int Setter { set; }
        int GetterSetter { get; set; }
        void Method();
    }

    public class T : IT
    {
        public void Method() { }
        protected int Test = 0;
        public int Getter { get { return 1; } }
        public int Setter { set {  } }
        public int GetterSetter { get { return 2; } set { } }
    }

Result

public interface f{int a{get;}int b{set;}int c{get;set;}void d();}
public class g :f{public void a(){}protected int b=0;public int c{get{return 1;}}public int d{
set{}}public int e{get{return 2;}set{}}}

So you cant use interfaces...

KvanTTT commented 8 years ago

NRefactory can not handle with inheritance properly :(

thomasdiemar commented 8 years ago

Hey Kvan. Is there any work going on with this. I kinda need it ;) Not only this issue but in general...

KvanTTT commented 8 years ago

@thomasdiemar, some issues linked to inheritance can be resolved with Roslyn. I have not plans to rewrite this library in nearest future.