.NET Framework picks (1) metadata

xiaoxiao2021-03-06  120

.NET Framework picks (1) metadata

Contents 1. Overview 2. Metadata Advantages 3. Metadata and PE file structure

1 Overview

In the past, software components (.exe or .dll) written in a language cannot be conveniently used in another language. In this question, COM moves forward. The .NET Framework allows the compiler to issue additional illustrative information to all modules and assemblies, making components more simpler. This information called "metadata" helps components seamlessly interact.

Metadata is a binary information. To describe the program stored in a public language runtime portable executable executable or stored in memory. When you compile your code as a PE file, the metadata is inserted into part of the file. The code is converted to the Microsoft Intermediate Language (MSIL) and insert it into another part of the file. Each paste and member of the definition and reference in the module or program set will be described in the metadata. When the code is executed, the running library loads metadata into memory and references it to discover class, members, inheritance, etc. related to code.

Metadata describes each type and member defined in the code in a non-specific language. Metadata stores the following information: The following description of the assembly: Identify (Name, Version, Region, Public Key) The type of security privileges required for other assessments dependent on the assembly. Type Description Name, Visibility, Base class and implementation interface members (methods, fields, properties, events, nested types). Property modification types and other explanatory elements of members

2. Metadata advantages:

For a simpler programming model, metadata is critical. This model does not require an interface definition language (IDL) file, header file, or any external component reference method allows the .NET language to automatically perform itself in a non-specific language. description. By the attribute can be expanded to the metadata

Self-description File Public Language Runtime Modules and assemblies are described. The module metadata contains all the information metadata required to interact with another module to automatically provide the IDL of the IDL to the COM, allowing a file to be used to define and implement the running module and the assembly without the need to register the run library to the operating system. The instructions always reflect the implementation code in the compilation file, thereby improving the reliability of the application. Language interoperability and simpler component-based design metadata provide all necessary information about compiled code for inheriting classes from PE files written in different languages. You can create any class of any class written in any hosted language (any language facing public language logo), do not have to worry about explicitly sending or using custom intercompanical code properties .NET Framework allows specific each in compilation files. The metadata of the class (called attribute). The property is used to more accurately control how your program works when you run. You can issue a custom metadata to the .NET Framework file by user-defined custom properties. 3. Metadata and PE file structure Most developers do not need to understand the implementation details of metadata

Metadata stores MSIL stores in a portion of the PE file in another part of the PE file contains a series of tables and stack data structures MSIL section contains MSIL and reference to the metadata tag of the PE file metadata. Tool (MSIL Anti-Disassembly ILDASM.exe) To view the MSIL of the code or use the Running Debugger (Cordbg.exe) to perform a metadata tag. According to your own understanding: The metadata should be a structure that describes the specified code segment "What" uses metadata, you can let the compiler or other program "know" the object "What is" "What is".

转载请注明原文地址:https://www.9cbs.com/read-99664.html

New Post(0)