In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-30 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/02 Report--
Editor to share with you a sample analysis of CLR assemblies, I believe that most people do not know much about it, so share this article for your reference, I hope you can learn a lot after reading this article, let's go to know it!
The architecture of CLR assembly tutorials
An assembly is an abstract concept, and an assembly is a logical grouping of one or more managed modules, resource files, and "manifests" that describe programs that make up assembly files. From the concept of the definition of assembly above, we can see that the assembly mainly consists of two parts: managed module and resource file. Let's introduce them one by one.
1. Managed module
The managed module is a standard 32-member Microsoft Windows Portable body (PE32) file, or a standard 64-bit Windows Portable value Enforcement (PE32+) file. Make up the parts of the managed module: PE32 (32-bit version) or PE32+ (64-bit version), CLR header, metadata, intermediate language (Microsoft Intermediate Laguage,MSIL) code. Note that CLR (Common Language Runtime,CLR) cannot directly handle managed modules.
A, PE header: mainly identifies the file running environment, PE32 can run on 32-bit and 64-bit versions, PE64 indicates that the managed module can only run on 64-bit versions.
B, CLR header: it mainly includes the requirement of CLR version, the entry method of managed block (Main ()) and so on.
C, metadata: it mainly describes the types and members defined and referenced by the managed module.
D, intermediate language code: simply say that the source code is generated by the compiler to another kind of code that CLR can handle.
It can be said that "metadata" plays a very important role in hosting blocks, and the "IntelliSense" feature comes from metadata when writing code, and can reconstruct the object state on the remote machine, and so on.
2. Resource files
The resource file is relatively simple, containing some of the resources used by some applications: GIF, JPEG.
3. List
Mainly lists the file sets that make up the assembly.
II. Classification of assemblies for CLR assembly tutorials
There are two main types of assemblies: strong named assemblies and weak named assemblies. The two assemblies are structurally identical. The real difference between the two is that the strong-named assembly uses the publisher's public / private key to allow a unique identification of the assembly.
1. Strongly named assemblies
A strongly named assembly includes four important attributes: a file name (no extension), a version number, and a linguistic and cultural identity to have a public key. These properties uniquely identify the assembly.
2. Weak named assemblies
To put it simply, without the above strong-named assembly, all the properties are weak-named assemblies.
Deployment of assemblies for CLR assembly tutorials
Assembly deployment is mainly divided into private deployment and global deployment. Strong named assemblies can be deployed privately or globally, while weakly named assemblies can only be deployed privately.
The above is all the content of the article "sample Analysis of CLR assemblies". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.