public static EmitSyntax Call(this EmitSyntax emit, SR.MethodInfo method) { var methodRef = emit.Methods.Import(method); if (method.IsStatic) { return(emit.Call(methodRef)); } else { return(emit.Callvirt(methodRef)); } }