You need to say
method = method.MakeGenericMethod(typeof(SomeClass));
at a minumum and preferably
var constructedMethod = method.MakeGenericMethod(typeof(SomeClass));
constructedMethod.Invoke(service, null);
as instances of MethodInfo
are immutable.
This is the same concept as
string s = "Foo ";
s.Trim();
Console.WriteLine(s.Length);
string t = s.Trim();
Console.WriteLine(t.Length);
causing
4
3
to print on the console.
By the way, your error message
"Late bound operations cannot be performed on types or methods for which ContainsGenericParameters
is true
."
if your clue that method
still contains generic parameters.