static bool IsCallToGetCallingAssembly (Instruction instruction) { var code = instruction.OpCode.Code; if (code != Code.Call && code != Code.Callvirt) return false; return IsGetCallingAssembly (instruction.GetMethod ()); }
private Severity? IsProblematicCall (Instruction call) { MethodReference method = call.GetMethod (); if (method != null) { Func<MethodReference, Instruction, Severity?> sev; if (problematicMethods.TryGetValue (method.Name, out sev)) return sev (method, call); } return null; }