Capgemini / Cauldron

C# Toolkit

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

CreateType has problems with previous calls

reflection-emit opened this issue · comments

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.

fixed... OMG!