private static object Deserialize(FudgeSerializer fudgeSerializer, Type mappedtype, FudgeEncodedStreamReader fudgeEncodedStreamReader) { var methodInfo = fudgeSerializer.GetType().GetMethods().Where( m => m.Name == "Deserialize" && m.GetParameters().Count() == 1 && m.GetParameters().Single().ParameterType.IsAssignableFrom(fudgeEncodedStreamReader.GetType()) && m.ContainsGenericParameters ).Select(m => m.MakeGenericMethod(new[] { mappedtype })).Single(); return(methodInfo.Invoke(fudgeSerializer, new object[] { fudgeEncodedStreamReader })); }