Now the problem is that method needs to know the object type for it to work (internal generics) but we are passing an object, so it will fail. However the CreateObject method can determine the type and it recreates the original without problem.

The question is : how can we somehow give the type information to method so it doesn't break at runtime?