protected virtual void Visit(ModuleDefinition moduleDefinition, Context context) { foreach (TypeDefinition definition in moduleDefinition.Types) { this.Visit(definition, context.Member(moduleDefinition)); } }
protected virtual void Visit(AssemblyDefinition assemblyDefinition, Context context) { foreach (ModuleDefinition definition in assemblyDefinition.Modules) { this.Visit(definition, context.Member(assemblyDefinition)); } }
protected virtual void Visit(ModuleDefinition moduleDefinition, Context context) { foreach (var typeDefinition in moduleDefinition.Types) { Visit(typeDefinition, context.Member(moduleDefinition)); } }
protected virtual void Visit(TypeDefinition typeDefinition, Context context) { if (typeDefinition.BaseType != null) { VisitTypeReference(typeDefinition.BaseType, context.BaseType(typeDefinition)); } foreach (var customAttribute in typeDefinition.CustomAttributes) { Visit(customAttribute, context.Attribute(typeDefinition)); } foreach (var typeReference in typeDefinition.Interfaces) { VisitTypeReference(typeReference, context.Interface(typeDefinition)); } foreach (var genericParameter in typeDefinition.GenericParameters) { Visit(genericParameter, context.GenericParameter(context)); } foreach (var propertyDefinition in typeDefinition.Properties) { Visit(propertyDefinition, context.Member(typeDefinition)); } foreach (var fieldDefinition in typeDefinition.Fields) { Visit(fieldDefinition, context.Member(typeDefinition)); } foreach (var eventDefinition in typeDefinition.Events) { Visit(eventDefinition, context.Member(typeDefinition)); } foreach (var methodDefinition in typeDefinition.Methods) { Visit(methodDefinition, context.Member(typeDefinition)); } foreach (var nestedType in typeDefinition.NestedTypes) { Visit(nestedType, context.NestedType(typeDefinition)); } }
protected override void Visit(TypeDefinition typeDefinition, Unity.Cecil.Visitor.Context context) { if (context.Role != Role.NestedType) { if (typeDefinition.BaseType != null) { base.VisitTypeReference(typeDefinition.BaseType, context.BaseType(typeDefinition)); } foreach (FieldDefinition definition in typeDefinition.Fields) { this.Visit(definition, context.Member(typeDefinition)); } if (this._mode != CollectionMode.Types) { foreach (MethodDefinition definition2 in typeDefinition.Methods) { this.Visit(definition2, context.Member(typeDefinition)); } } } }
protected virtual void Visit(TypeDefinition typeDefinition, Context context) { if (typeDefinition.BaseType != null) { this.VisitTypeReference(typeDefinition.BaseType, context.BaseType(typeDefinition)); } foreach (Mono.Cecil.CustomAttribute attribute in typeDefinition.CustomAttributes) { this.Visit(attribute, context.Attribute(typeDefinition)); } foreach (InterfaceImplementation implementation in typeDefinition.Interfaces) { this.Visit(implementation, context.Interface(typeDefinition)); } foreach (GenericParameter parameter in typeDefinition.GenericParameters) { this.Visit(parameter, context.GenericParameter(context)); } foreach (PropertyDefinition definition in typeDefinition.Properties) { this.Visit(definition, context.Member(typeDefinition)); } foreach (FieldDefinition definition2 in typeDefinition.Fields) { this.Visit(definition2, context.Member(typeDefinition)); } foreach (MethodDefinition definition3 in typeDefinition.Methods) { this.Visit(definition3, context.Member(typeDefinition)); } foreach (EventDefinition definition4 in typeDefinition.Events) { this.Visit(definition4, context.Member(typeDefinition)); } foreach (TypeDefinition definition5 in typeDefinition.NestedTypes) { this.Visit(definition5, context.NestedType(typeDefinition)); } }
protected virtual void Visit(Mono.Cecil.Cil.MethodBody methodBody, Context context) { foreach (ExceptionHandler handler in methodBody.ExceptionHandlers) { this.Visit(handler, context.Member(handler)); } foreach (VariableDefinition definition in methodBody.Variables) { this.Visit(definition, context.LocalVariable(methodBody)); } foreach (Instruction instruction in methodBody.Instructions) { this.Visit(instruction, context); } }