protected virtual void Visit(MethodDefinition methodDefinition, Context context) { VisitTypeReference(methodDefinition.ReturnType, context.ReturnType(methodDefinition)); foreach (var customAttribute in methodDefinition.CustomAttributes) { Visit(customAttribute, context.Attribute(methodDefinition)); } foreach (var genericParameter in methodDefinition.GenericParameters) { Visit(genericParameter, context.GenericParameter(methodDefinition)); } foreach (var parameterDefinition in methodDefinition.Parameters) { Visit(parameterDefinition, context.Parameter(methodDefinition)); } if (!methodDefinition.HasBody) { return; } Visit(methodDefinition.Body, context.MethodBody(methodDefinition)); }
protected virtual void Visit(MethodDefinition methodDefinition, Context context) { this.VisitTypeReference(methodDefinition.ReturnType, context.ReturnType(methodDefinition)); foreach (Mono.Cecil.CustomAttribute attribute in methodDefinition.CustomAttributes) { this.Visit(attribute, context.Attribute(methodDefinition)); } foreach (GenericParameter parameter in methodDefinition.GenericParameters) { this.Visit(parameter, context.GenericParameter(methodDefinition)); } foreach (ParameterDefinition definition in methodDefinition.Parameters) { this.Visit(definition, context.Parameter(methodDefinition)); } if (methodDefinition.HasBody) { this.Visit(methodDefinition.Body, context.MethodBody(methodDefinition)); } }