logo
CSharp_Prog_Guide

Обозреватель объектов

Обозреватель объектов позволяет просматривать сведения о типах как в собственных, так и в управляемых библиотеках DLL, включая COM-объекты. В то время как сведения, отображаемые в обозревателе объектов аналогичны сведениям в представлении класса, при помощи обозревателя объектов можно проанализировать любую библиотеку DLL в системе, а не только библиотеки, на которые имеются ссылки в проекте. Кроме того, в обозревателе объектов также отображаются комментарии XML-документации для выбранного типа. На следующем рисунке показано, как в обозревателе объектов отображаются сведения о типах в двоичных файлах.

Metadata as Source:

The Metadata As Source feature enables you to view type information for classes in managed assemblies as if it were source code in your own project. This is a convenient way to view the signatures for all the public methods in a class at a glance when you do not have access to the actual source code.

For example, if you enter the statement System.Console.WriteLine() in the code editor, place the insertion point within Console and then right-click and select Go To Definition, you will see what looks like a source code file containing the declaration of the Console class. This declaration is constructed from the metadata in the assembly using Reflection, and although it does not expose the implementation of any methods, it does show any XML documentation comments that are present.

You can also use the Metadata As Source feature by selecting a managed type in the Object Browser, and clicking Code Definition Window on the View menu.

Code Analysis for Managed Code

The code analysis for managed code tool analyzes managed assemblies and reports information such as potential security problems, and violations of the programming and design rules set forth in the Microsoft .NET Framework Design Guidelines. This information is presented as warnings. You access the tool in the Project Designer by right-clicking Properties in Solution Explorer, and selecting Open.