* What does Metadata do?
Metadata describes every type and member defined in your code in a language-neutral manner. Metadata stores the following information:
o 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.
o Description of types.
+ Name, visibility, base class, and interfaces implemented.
+ Members (methods, fields, properties, events, nested types).
o Attributes
+ Additional descriptive elements that modify types and members.
* What are the benefits of Metadata?
Metadata is the key to a simpler programming model, eliminating the need for Interface Definition Language (IDL) files, header files, or any external method of component reference. Metadata allows .NET languages to describe themselves automatically in a language-neutral manner, unseen by both the developer and the user. Additionally, metadata is extensible through the use of attributes. Metadata provides the following major benefits:
o Self-describing files
Common language runtime modules and assemblies are self-describing. A module's metadata contains everything needed to interact with another module. Metadata automatically provides the functionality of IDL in COM, allowing you to use one file for both definition and implementation. Runtime modules and assemblies do not even require registration with the operating system. As a result, the descriptions used by the runtime always reflect the actual code in your compiled file, which increases application reliability.
o Language Interoperability and easier component-based design
Metadata provides all the information required about compiled code for you to inherit a class from a PE file written in a different language. You can create an instance of any class written in any managed language (any language that targets the common language runtime) without worrying about explicit marshaling or using custom interoperability code.
o Attributes
The .NET Framework allows you to declare specific kinds of metadata, called attributes, in your compiled file. Attributes can be found throughout the .NET Framework and are used to control in more detail how your program behaves at run time. Additionally, you can emit your own custom metadata into .NET Framework files through user-defined custom attributes. For more information, see Extending Metadata Using Attributes.
Subscribe by Email
Follow Updates Articles from This Blog via Email
No Comments
comments