VisitorNReflect

All types returned by NReflect implement the Visitor pattern. That means, the returned tree can be traversed by a vistor.

Overview

The following types are related to the pattern:

Visitor
Figure 1: Class diagram showing visitor related types within NReflect.

Each visitable type implements the interface NReflect.IVisitable and can be visited by an visitor. Each class of the namespaces NReflect.NREntities, NReflect.NRMembers, NReflect.NRParameters and NReflect.NRAttributes implement this interface so they are visitable.

Creating a new visitor

To create a new visitor, just implement the interface NReflect.IVisitor and start visiting like this:

1IVisitor visitor = new MyVisitor();
2nrAssembly.Accept(visitor);

See Also

Reference

Other Resources