private void Translator_VisitedInvocationExpression(object sender, VisitedEventArgs <InvocationExpression> e) { if (e.Handled) { return; } var mr = e.Node.Annotation <MethodReference>(); if (TargetMethod.IsEquivalentTo(mr) || (TargetType != null && TargetType.IsBaseTypeOf(mr.DeclaringType) && TargetMethodName == mr.Name)) { OnInvocationExpressionMatched((ILTranslator)sender, e); } }
private void Translator_VisitedMethodDeclaration(object sender, VisitedEventArgs <MethodDeclaration> e) { if (e.Handled) { return; } var mr = e.Node.Annotation <MethodDefinition>(); if ((TargetMethod != null && TargetMethod.IsEquivalentTo(mr)) || (TargetType != null && TargetType.IsBaseTypeOf(mr.DeclaringType) && TargetMethodName == mr.Name)) { OnMethodDeclarationMatched((ILTranslator)sender, e); } }