.NET Framework learning notes

zhaozj2021-02-16  112

The .NET platform is mainly composed of 5 parts: operating system, .NET Enterprise Server Product, .NET Web Services (Passport) and .NET Framework. The .NET Frame has a public class framework for CLR (Common Language Runtime) and all .NET supported ----- FCL (FRMEWORK CLASS LIBRY) currently supports 20 languages. The FCL has a total of 99 namespaces. There is a pure static environment, pure dynamic environment, three types based on the stack. The CLR belongs to a purely dynamic operation. The main components are VEE (Virtual Execution Engine), the main task is to manage and execute the code written by the .NET language. The execution process of the CLR: First, the class loader is found and loaded, activated, and then verify that the program is verified, JIT is compiled and converted to the cost machine code, and the target machine can be dynamically Optimization, execution code and other services required (security testing, exception processing, height, etc.) are responsible for executing components, and automatically recover useless object resources. ??? CLI (Common Language Infrastructure Public Language Infrastructure) mainly has CTS (Common Type System), CLS (Common Language Specification Public Language Specification) and VES (VES (Virtual Execution System). Among them, CTS is in a core position, which is a unified type system of compilers, various tools, applications, and CLI publications. It makes .NET platforms have multiple language integration performance, which is also a safe guarantee, it can support Object-oriented language, you can also support C language. There are two types: value type and reference type. CLS consists of 41 rules and other provisions, which is a supplement of CTS, which is to improve the interoperability of the collections of the library and the premium language.

The hosted code is a code written by the language supported by the .NET Framework. .NET Framework In order to make these code can be executed, a number of core run services is provided, so these code must provide the most basic information to the CLR, which is called "metadata". In the program, it behaves as data in parentheses before or prior to the class. You can create their own metadata attributes through inheritance System.Attribute, such as: [AttributeUsage (AttributeTargets.Class)] public class InspiredByAttribute: System.Attribute {?? public string InspiredB;} refers to one or more parts with a main inlet Applications or libraries. Accessories can reference accessories. There are private accessories and shared accessories. Private accessories are in a single application directory, shared accessories are stored in the Global Accessories Cache (GAC), which can be registered with Gacutil -i Somedll.dll into the GAC to become shared accessories. There is a version coordination of shared accessories, which enhances version constraints for shared accessories. The version number consists of four numbers (such as: 5.5.2.33). If there is any different accessories in the first two numbers, it is considered to be incompatible; if the third is different, it is considered "possible"; if The fourth is different, it is considered to be compatible. These rules can be specified by configuration files. The list is a description, including resources, types, and references. Garbage collection is responsible for managing object life and its occupation of the memory by runtime components. .NET garbage collector work mechanism: Periodically traversed the list of objects currently referenced, wherever the object that is not discovered is ready to destroy and recover the occupied memory. Serialization refers to the process of converting objects into a byte stream, and the deserialization is the process of constructing an object from byte stream. ??????? Code Access Security: CAS is a part of the .NET security model to determine whether a certain code allows for execution and what resources. You can view CASPOL -LG to view the CAS code group on the machine. Example: caspol -ag 1.3 -site www.pconline.com.cn FullTrust ?? To use the website fully access your machine, not restricted. ?????? Reflection: The metadata of the fitting is accessed by programming, because the assembly is self-description, the install fitting includes metadata to its own description, so it can be reflected to access its metadata. .NET itself has some base classes to achieve reflection.

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

New Post(0)