ppittle / pMixins

pMixins - Mixin framework for C#
http://pMixins.com
Apache License 2.0
23 stars 5 forks source link

Mixed in Attributes Constructor parameters - does not mixin `typeof` parameters #41

Open ppittle opened 9 years ago

ppittle commented 9 years ago

Given an Attribute:

public class CustomAttribute : Attribute 
{
      public CustomAttribute(Type example){}

      public Type OtherType {get;set;}
}

Given a Mixin:

public class Mixin {
     [CustomAttribute(typeof(object), OtherType = typeof(string)]
     public string Property{get;set;}
}

Given a Target:

[pMixin(Mixin = typeof(Mixin))]
public partial class Target{}

CustomAttribute is not correctly decorated mixed in Property.

Is:

[CustomAttribute(null, OtherType = null)]
public virtual global::string Property {}

Should be:

[CustomAttribute(typeof(object), OtherType = typeof(string))]
public virtual global::string Property {}