. NET Type level viewing tool,. net Type level
To quickly learn about A. NET Library last week, you need to view its type hierarchy. It is always inconvenient to indicate a type level in the article or to use text comfortably. Although Reflector can display the type hierarchy, I cannot easily convert the displayed type hierarchy into text format. Besides, Reflector uses the full name of the type when displaying the base class and the derived class, but sometimes I only need to see the simple name of the type. I have also looked for several other tools, such.. NET Framework SDK used to bring the Windows window class (wincv.exe), but it only displays the information of the type itself and the information of the base class, and does not display the information of the derived class, it is still not enough.
I did not find a ready-to-use tool, so I had to write one myself. Therefore, C #/WinForms is used to write a simple GUI program, which is used to display the type level information and copy the type level to the clipboard in the form of text.
One:
Corresponding to the text representation in this figure:
Java code
- IList <T>
- Collection <T>
- KeyedCollection <TKey, TItem>
- List <T>
- ReadOnlyCollection <T>
========================================================== ==========================================
Open Source:
The program uses the license open source code in the form of MIT. Programs and source code can be obtained in the compressed package attached to this post.
Running Environment:
This program requires. NET Framework because of the use of LINQ.
3.5To run normally. If you need to port to. NET Framework 2.0, you can use the Mono System. Core. dll implementation.
========================================================== ==========================================
Usage:
You can provide parameters from the command line to open the assembly. The format is:
ClassHierarchyViewer <assembly-path>
Or you can start the program directly and open assembly in any of the following three ways:
1. Enter the complete assembly Name (Name, Version, Culture, PublicKeyToken) in the text box, and press ENTER or click "Load By Name;
2. Press the "Open File..." button to select assembly in the dialog box;
3. Drag and Drop assembly from the file browser to the window of the program.
At the same time, only one assembly is displayed in the window.
Other functions should be self-evident. I will post the content of the readme file directly:
Reference /////////////////////////////////////// /////////////////////////
Name: ClassHierarchyViewer
Author: redna xelafx (Kris Mok, rednaxela0607@hotmail.com)
Version: 0.3.0.1
Release Date: 2008-09-23
License: MIT style license. See License.txt.
//////////////////////////////////////// ////////////////////////
Description:
A simple tool that shows the class hierarchy within a given
. NET assembly.
Required Environment:
Windows XP or Vista, with. NET Framework 3.5 or above installed.
//////////////////////////////////////// ////////////////////////
Usage:
1. Start program from command line:
Usage: ClassHierarchyViewer <assembly-path>
-Or-
2. Start program from GUI:
Assemblies can be loaded by one:
* Enter the assembly's full name in the combobox, then click
"Load By Name" button;
* Enter the assembly's full name in the combobox, and hit
Enter;
* Click "Open File..." button, and choose an assembly file;
* Drag and drop a assembly file from Explorer.
Only one assembly is active at a time.
A few commonly used BCL assemblies 'names are added to
Combox already, including:
Mscorlib, Version = 2.0.0.0, Culture = neutral, PublicKeyToken = b77a5c561934e089
System, Version = 2.0.0.0, Culture = neutral, PublicKeyToken = b77a5c561934e089
System. AddIn, Version = 3.5.0.0, Culture = neutral, PublicKeyToken = b77a5c561934e089
System. Configuration, Version = 2.0.0.0, Culture = neutral, PublicKeyToken = b03f5f7f11d50a3a
System. Core, Version = 3.5.0.0, Culture = neutral, PublicKeyToken = b77a5c561934e089
System. Data, Version = 2.0.0.0, Culture = neutral, PublicKeyToken = b77a5c561934e089
System. Data. Entity, Version = 3.5.0.0, Culture = neutral, PublicKeyToken = b77a5c561934e089
System. Data. Linq, Version = 3.5.0.0, Culture = neutral, PublicKeyToken = b77a5c561934e089
System. Deployment, Version = 2.0.0.0, Culture = neutral, PublicKeyToken = b03f5f7f11d50a3a
System. Design, Version = 2.0.0.0, Culture = neutral, PublicKeyToken = b03f5f7f11d50a3a
System. DirectoryServices, Version = 2.0.0.0, Culture = neutral, PublicKeyToken = b03f5f7f11d50a3a
System. Drawing, Version = 2.0.0.0, Culture = neutral, PublicKeyToken = b03f5f7f11d50a3a
System. Drawing. Design, Version = 2.0.0.0, Culture = neutral, PublicKeyToken = b03f5f7f11d50a3a
System. Messaging, Version = 2.0.0.0, Culture = neutral, PublicKeyToken = 969db8053d3322ac
System. Net, Version = 3.5.0.0, Culture = neutral, PublicKeyToken = b03f5f7f11d50a3a
System. ServiceModel, Version = 3.0.0.0, Culture = neutral, PublicKeyToken = b77a5c561934e089
System. Web, Version = 2.0.0.0, Culture = neutral, PublicKeyToken = b03f5f7f11d50a3a
System. Windows. Forms, Version = 2.0.0.0, Culture = neutral, PublicKeyToken = b77a5c561934e089
System. Xml, Version = 2.0.0.0, Culture = neutral, PublicKeyToken = b77a5c561934e089
//////////////////////////////////////// ////////////////////////
Functions:
The GUI window is divided into 3 major components:
1. Class List Window (on the left)
Displays all types (partition t "<Module>") in the given assembly,
Grouped by their namespaces, sorted by the type's name.
Types that are not visible outside the assembly are marked gray.
2. Class Hierarchy Window (on the upper right)
When a type is selected in the Class List Window, its type
Hierarchy will be shown in this window.
The hierarchy shown primary des the type itself, its base type (up
To System. Object), and all its derived types.
Checking/unchecking the "Full Name" checkbox will cause this
Window to reload, showing types with their simple name/full name.
Clicking "Copy to Clipboard" button will copy the type hierarchy
To the clipboard, in text representaion.
3. Class Member Window (on the lower right)
When a type is selected in the Class Hierarchy Window, its
Members will be shown in this window. This does not include
A type's nested types.
Checking/unchecking the "Use Alias" checkbox will cause this
Window to reload, showing types with their alias/name.
//////////////////////////////////////// ////////////////////////
Known Issues:
1. TreeViews flicker when mouse moves over them rapidly.
Haven'tfound any solution to this, maybe that's just how
WinForms behaves.
2. Copying the type hierarchy causes flickering.
This is because of the way data is loaded: derived types are
Added onto the tree when a node is expanded. To make sure
Derived types are added correctly, the whole tree is expanded
Before its text representation can be gathered. This will be
Improved in later versions with M-V-VM pattern.
3. Properties 'getter and setter methods Aren' t associated
The properties 'nodes.
Due to the lack of developing time, certain useful functions
Such as this one is not implemented yet. Will be fixed in
Later versions.
4. doesn't show what interfaces a type implements.
Same as above. Will be fixed.
5. Cannot load an assembly from GAC just by browsing in the open
File dialog.
I know. That's why there's an alternative, to load assemblies
With their full names. Later on I might add a dialog to select
Assemblies from GAC.
//////////////////////////////////////// ////////////////////////
Note:
The icons used in this program originated from Microsoft Visual
Maxcompute Studio 2008's image libraries, Visual Studio Image Library:
24bit Objects and Objects (WinVista style,. png ).
License:
Reference The MIT License
Copyright (c) 2008 redna xelafx (Kris Mok, rednaxela0607@hotmail.com)
Permission is hereby granted, free of charge, to any person obtaining a copy
Of this software and associated documentation files (the "Software"), to deal
In the Software without restriction, including without limitation the rights
To use, copy, modify, merge, publish, distribute, sublicense, and/or decrypt
Copies of the Software, and to permit persons to whom the Software is
Furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be supported in
All copies or substantial portions of the Software.
The software is provided "as is", without warranty of any kind, EXPRESS OR
IMPLIED, including but not limited to the warranties of merchantability,
Fitness for a particle purpose and noninfringement. IN NO EVENT SHALL
Authors or copyright holders be liable for any claim, DAMAGES OR OTHER
LIABILITY, whether in an action of contract, tort or otherwise, arising from,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
The software.
The biggest restriction of this simple program is that it cannot freely open the assembly in GAC, because it is installed on Windows.. NET Framework, the GAC directory is managed by Fusion by default. You need to modify the Registry to disable this function to see the path of assembly in GAC. Of course, I can scan all the assemblies under % WINDOWS % \ Assembly \, but this function has not been used yet; other similar programs are very slow in scanning GAC, so I'm not sure I want to include this feature. Now, the assembly in GAC can be opened with a strong name, but the user will work harder. The names in the drop-down list in the text box can meet the general needs.
If you have any comments or suggestions, please submit them. Please contact us via SMS or email if necessary. Thank you ^
- ClassHierarchyViewer_0.3.zip (1 MB)
- ClassHierarchyViewer_0.3.0.1.zip (1 MB)
C # class library inheritance hierarchy
View the documents in vs by yourself.
On the logic layer of the TCP/IP model, the Net class is divided into several layers?
The. Net class can be considered to contain three layers: Request/response layer, application protocol layer, and transmission layer. WebReqeust and WebResponse represent the request/response layer. Classes supporting Http, Tcp, and Udp constitute the application protocol layer, while the Socket class is in the transmission layer.