public override bool Walk(FunctionDefinition node) { if (IsInitializeComponentMethod(node)) { Type type = GetComponentType(); component = componentCreator.CreateComponent(type, componentName); IResourceReader reader = componentCreator.GetResourceReader(CultureInfo.InvariantCulture); if (reader != null) { reader.Dispose(); } node.Body.Walk(this); } return(false); }
protected override void Walk(MethodDefinition node) { if (IsInitializeComponentMethod(node)) { Type type = GetComponentType(); component = componentCreator.CreateComponent(type, componentName); IResourceReader reader = componentCreator.GetResourceReader(CultureInfo.InvariantCulture); if (reader != null) { reader.Dispose(); } WalkMethodStatements(node.Body.Statements); } }