internal override void Scan() { // First we need to verify if it is actually acceptable to modify the method in any way. if (!CanScrambleMethod(TargetMethod, ScramblePublicMethods)) { return; } if (TargetMethod.HasBody) { foreach (var v in TargetMethod.Body.Variables) { RegisterGeneric(v.Type); } } if (TargetMethod.HasReturnType) { RegisterGeneric(TargetMethod.ReturnType); } foreach (var param in TargetMethod.Parameters.Where(ProcessParameter)) { RegisterGeneric(param.Type); } if (TargetMethod.HasBody) { foreach (var i in TargetMethod.Body.Instructions) { if (i.Operand != null) { Analyzers.Analyze(i); } } } }