Exploring Assembly Metadata Using the Reflection Viewer

From RAD Studio
Jump to: navigation, search

Go Up to How To Manage Files and Folders


You can open and explore the namespaces and types contained within a .NET assembly. The assembly metadata is displayed in the Reflection viewer, whose left pane contains a tree structure of the namespaces and types within the assembly. The right pane displays specific information on the selected item in the tree. The Call Graph tab shows you a list of the methods called by the selected method, as well as a list of the methods that call the selected method.

Although RAD Studio does not support development for the .NET platform, you can open multiple .NET assemblies in the Reflection viewer. Each open assembly is displayed in the tree in the left-pane; the top-level node for a .NET assembly is denoted by the assembly node icon (CLR) icon.

Note: This viewer is still supported in RAD Studio even though the Delphi for .NET compiler is no longer part of the product. COM interop development, for example, can involve interaction between COM and .NET features.

There are several ways to open the Reflection viewer:

  • Choose File > Open and select any managed assembly.
  • Use the standalone application (Reflection.exe).

To close a particular assembly, right-click the top-level assembly node icon icon and select Close.

To open the Reflection viewer from the IDE:

  1. Choose File > Open.
  2. In the Open dialog box, from the Files of type drop-down list, select Assembly Metadata.
  3. Navigate to the folder where a .NET assembly is located. Select the assembly and click Open.

Tip: You can use the Browser buttons on the toolbar to navigate backwards and forwards to previously selected items in the left pane.

Using the Call Graph tab

  1. Select a method node (Method1 icon) in the left pane.
  2. Select the Call Graph tab.The top half of the Call Graph tab shows you a list of methods that call the method you selected in the left pane.The bottom half of the Call Graph tab shows you the methods called by the method you selected in the left pane.Methods that exist in the same assembly as the currently selected method appear as clickable links, and are displayed in blue underlined text. Clicking on a link causes that method to become selected in the tree in the left-hand pane.

    Note: The standalone Reflection viewer (Reflection.exe) has a Find button for searching an assembly, and two arrow buttons that move the viewer forward and backward in the viewer history.

See Also