Thursday, August 16, 2018

Metadata


Metadata
Metadata in .Net is binary information which describes the characteristics of a resource . This information include Description of the Assembly , Data Types and members with their declarations and implementations, references to other types and members , Security permissions etc. A module's metadata contains everything that needed to interact with another module. In .NET, metadata includes type definitions, version information, external assembly references, and other standardized information. In order for two systems, components, or objects to interoperate with one another, at least one must know something about the other.
During the compile time Metadata created with Microsoft Intermediate Language (MSIL) and stored in a file called a Manifest . Both Metadata and Microsoft Intermediate Language (MSIL) together wrapped in a Portable Executable (PE) file. During the runtime of a program Just In Time (JIT) compiler of the Common Language Runtime (CLR) uses the Metadata and converts Microsoft Intermediate Language (MSIL) into native code. When code is executed, the runtime loads metadata into memory and references it to discover information about your code's classes, members, inheritance, and so on. Moreover Metadata eliminating the need for Interface Definition Language (IDL) files, header files, or any external method of component reference.
Metadata stores the following information:
  • Description of the assembly
    • Identity (name, version, culture, public key).
    • The types that are exported.
    • Other assemblies that this assembly depends on.
    • Security permissions needed to run.
  • Description of types
    • Name, visibility, base class, and interfaces implemented.
    • Members (methods, fields, properties, events, nested types).
  • Attributes
    • Additional descriptive elements that modify types and members.

No comments:

Post a Comment