Capgemini / Cauldron

C# Toolkit
MIT License
76 stars 18 forks source link

CreateType has problems with previous calls #38

Closed reflection-emit closed 6 years ago

reflection-emit commented 6 years ago

Example: public static TResult Blabla<T, TResult>(this T value, Func<T, TResult> function) => function(value); var blub = "Hi;This;Is;Me"; var huhu = blub.Split(';').Blabla(x=> new { Name = x[3], Description = x[1] }).CreateType<ISpecial>();

CreateType should check for generic resturn type on "Blabla" call and use this to create the anonymous type. The current implementation also does not consider static methods.

reflection-emit commented 6 years ago

fixed... OMG!