Exemplo n.º 1
0
 //Called through reflection
 private static KeyValuePair <Type, UpconvertFunc> ToFuncFrom <TSource, TDestination>(IUpconvertEvent <TSource, TDestination> upconverter)
 => new KeyValuePair <Type, UpconvertFunc>(typeof(TSource), x => new UpconvertResult(new ItemWithType(
                                                                                         upconverter.Upconvert((TSource)x.instance))));
Exemplo n.º 2
0
 //Called through reflection
 private static KeyValuePair <Type, UpconvertFunc> ToFuncFrom <TSource>(IUpconvertEvent <TSource> upconverter)
 => new KeyValuePair <Type, UpconvertFunc>(typeof(TSource), x => new UpconvertResult(
                                               upconverter.Upconvert((TSource)x.instance).Select(i => new ItemWithType(i))));