.NET Framework Introduction: Metadata

Slides:



Advertisements
Similar presentations
.NET Technology. Introduction Overview of.NET What.NET means for Developers, Users and Businesses Two.NET Research Projects:.NET Generics AsmL.
Advertisements

Using.NET Platform Note: Most of the material of these slides have been taken & extended from Nakov’s excellent overview for.NET framework, MSDN and wikipedia.
RPC Robert Grimm New York University Remote Procedure Calls.
Abstract Data Types Data abstraction, or abstract data types, is a programming methodology where one defines not only the data structure to be used, but.
.NET Framework Overview Pingping Ma Nov 16 th, 2006.
The Type System1. 2.NET Type System The type system is the part of the CLR that defines all the types that programmers can use, and allows developers.
Overview of the.NET Framework. What is the.NET Framework A new computing platform designed to simplify application development A consistent object-oriented.
Introduction to the C# Programming Language for the VB Programmer.
Introducing the Common Language Runtime for.NET. The Common Language Runtime The Common Language Runtime (CLR) The Common Language Runtime (CLR) –Execution.
“DOK 322 DBMS” Y.T. Database Design Hacettepe University Department of Information Management DOK 322: Database Management Systems.
Page 1 Building Reliable Component-based Systems Chapter 4 - Component Models and Technology Chapter 4 Component Models and Technology.
ASP.NET Programming with C# and SQL Server First Edition
Introducing the Common Language Runtime. The Common Language Runtime The Common Language Runtime (CLR) The Common Language Runtime (CLR) –Execution engine.
C++ fundamentals.
Intro to dot Net Dr. John Abraham UTPA – Fall 09 CSCI 3327.
Microsoft Visual Basic 2012 CHAPTER ONE Introduction to Visual Basic 2012 Programming.
Microsoft Visual Basic 2005 CHAPTER 1 Introduction to Visual Basic 2005 Programming.
A Free sample background from © 2001 By Default!Slide 1.NET Overview BY: Pinkesh Desai.
Overview of Microsoft.Net and Vb.Net ITSE 2349 Spring 2002 Material from Microsoft.Net an Overview for ACC faculty by Stuart Laughton and Introduction.
Lecture Roger Sutton CO530 Automation Tools 5: Class Libraries and Assemblies 1.
1 Introduction to.NET Framework. 2.NETFramework Internet COM+ Orchestration Orchestration Windows.NET Enterprise ServersBuildingBlockServices Visual Studio.NET.
Introduction to .Net Framework
The Metadata System1. 2 Introduction Metadata is data that describes data. Traditionally, metadata has been found in language- specific files (e.g. C/C++
Module 1: Introduction to C# Module 2: Variables and Data Types
Session 1 - Introduction and Data Access Layer
Meir Botner David Ben-David. Project Goal Build a messenger that allows a customer to communicate with a service provider for a fee.
CIS NET Applications1 Chapter 2 –.NET Component- Oriented Programming Essentials.
.NET Framework & C#.
Appendix D: Microsoft.NET Framework Overview. Overview.NET Framework Architecture.NET Namespaces.
 Internet providing backbone for applications  Use of several web sites and devices to provide one complete solution  Software as services  Quick software.
Lecture Set 1 Part B: Understanding Visual Studio and.NET – Structure and Terminology 1/16/ :04 PM.
Understanding Code Compilation and Deployment Lesson 4.
Lesley Bross, August 29, 2010 ArcGIS 10 add-in glossary.
Obsydian OLE Automation Ranjit Sahota Chief Architect Obsydian Development Ranjit Sahota Chief Architect Obsydian Development.
ASSEMBLY. A SSEMBLY Assemblies are the fundamental units of applications in the.net framework An assembly can contain classes, structures, interfaces.
Introduction .NET Framework
.NET Framework Danish Sami UG Lead.NetFoundry
COMPONENT INTERFACE By, Mr. Srinivas.. What is Component Interface? A means to access the PeopleSoft application without using the PeopleSoft pages. It.
C#C# Introduction CS3260 Dennis A. Fairclough Version 1.0 Introduction CS3260 Dennis A. Fairclough Version 1.0.
tom perkins1 XML Web Services -.NET FRAMEWORK – Part 1 CHAPTER 1.1 – 1.3.
SWE 316: Software Design and Architecture Objectives Lecture # 18 Introduction to Components SWE 316: Software Design and Architecture To learn:  benefits.
Chapter 6 Introduction to Defining Classes. Objectives: Design and implement a simple class from user requirements. Organize a program in terms of a view.
PRIOR TO WEB SERVICES THE OTHER TECHNOLOGIES ARE:.
Attributes C#.Net Software Development Version 1.0.
Session 07 Module 13 - Collections. Collections / Session 7 / 2 of 32 Review  A delegate in C# is used to refer to a method in a safe manner.  To invoke.
Getting Started with.NET Getting Started with.NET/Lesson 1/Slide 1 of 31 Objectives In this lesson, you will learn to: *Identify the components of the.NET.
Object Oriented Software Development 4. C# data types, objects and references.
C# and.NET. .NET Architecture  Compiling and running code that targets.NET  Advantages of Microsoft Intermediate Language (MSIL)  Value and Reference.
Common Language Runtime Introduction  The common language runtime is one of the most essential component of the.Net Framework.  It acts.
.NET Mobile Application Development XML Web Services.
Bruno Cabral “Reflection, Code Generation and Instrumentation in the.NET platform” University of Coimbra.
July 22, 2001Introduction to.NET1 Introduction to.NET Framework Gholamali Semsarzadeh July 2001.
Text Introduction to.NET Framework. CONFIDENTIAL Agenda .NET Training – Purpose  What is.NET?  Why.NET?  Advantages  Architecture  Components: CLR,
Lecture Set 1 Part B: Understanding Visual Studio and.NET – Structure and Terminology 1/16/ :04 PM.
Microsoft Visual Basic 2015 CHAPTER ONE Introduction to Visual Basic 2015 Programming.
METADATA IN.NET Presented By Sukumar Manduva. INTRODUCTION  What is Metadata ? Metadata is a binary information which contains the complete description.
INTRODUCTION BEGINNING C#. C# AND THE.NET RUNTIME AND LIBRARIES The C# compiler compiles and convert C# programs. NET Common Language Runtime (CLR) executes.
Using Application Domains Effectively
Introduction to Visual Basic 2008 Programming
Microsoft .NET 3. Language Innovations Pan Wuming 2017.
.NET and .NET Core 2. .NET Runtimes Pan Wuming 2017.
Introduction to C# AKEEL AHMED.
Chapter 2 Database Environment.
CIS16 Application Development – Programming with Visual Basic
.NET and .NET Core 10. Enabling Contracts Pan Wuming 2017.
Reusability 11/29/2018© 2006 ITT Educational Services Inc.
Module 10: Implementing Managed Code in the Database
Database Design Hacettepe University
Jim Fawcett CSE775 – Distributed Objects Spring 2006
Copyright 1999 B.Ramamurthy
Presentation transcript:

.NET Framework Introduction: Metadata Ketan Bibave

Overview What is Metadata? How is Metadata? Structure of Metadata Tables Functions or benefits of Metadata

What is Metadata? The .NET Framework makes component interoperation even easier by allowing compilers to emit additional declarative information into all modules and assemblies. This information, called metadata, helps components to interact seamlessly. It also known as “self-contained” type library. Metadata is binary information describing your program that is stored in Managed module. Every type and member that is defined and referenced in a module or assembly is described within metadata. 

How is Metadata? 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. All Metadata in the form of tables and all table internally in the forms of hexadecimal numbers. Metadata is of two type DefType (Defined) RefType (Referenced) There are only 15 tables divided into above two types of tables.

How is Metadata? Metadata Token A metadata token is a four-byte number. The top byte denotes the metadata table to which a particular token refers (method, type, and so on). The remaining three bytes specify the row in the metadata table that corresponds to the programming element being described. If we define a method in C# and compile it into a PE file, the following metadata token might exist in the MSIL portion of the PE file 0x06000004 The top byte (0x06) indicates that this is a MethodDef token. The lower three bytes (000004) tells the common language runtime to look in the fourth row of the MethodDef table for the information that describes this method definition Metadata also stores information in four heap structures: string, blob, user string, and GUID. All the strings used to name types and members are stored in the string heap. For example, a method table does not directly store the name of a particular method, but points to the method's name stored in the string heap.

Structure of Metadata Tables 15 Type of Table 11 Defined Type 7 Module Type 4 Assembly Type 4 Reference Type

Structure of Metadata Tables: 11 Defined Type Table Module Type ModuleDef 0x00 TypeDef 0x02 FieldDef 0x04 MethodDef 0x06 ParamDef 0x08 PropertyDef 0x17 EventDef 0x14 Assembly Type AssemblyDef 0x20 FileDef 0x26 ExportedTypeDef 0x27 ManifestResourceDef 0x28

Structure of Metadata Tables: 4 Reference Type Table AssemblyRef 0x23 ModuleRef 0x1 TypeRef 0x01 MemberRef 0x0a

Functions or benefits of Metadata Metadata allows CLR to do Type Safe Verification and hence metadata makes AppDomain possible. CLR uses metadata for following operations For object lifetime maintenance and therefore metadata is responsible to automatic garbage collection. For serialization, deserialization, marshalling and Remote method Invocation using Network data transfer CLR does Introspection and Reflection. IDE uses metadata for intellisense feature. Metadata eliminates the need for Interface Definition Language (IDL) files, header files, or any external method of component reference. Metadata enables .NET Framework languages to describe themselves automatically in a language-neutral manner

Functions or benefits of Metadata Self-describing files Common language runtime modules and assemblies are self-describing. Metadata automatically provides the functionality of IDL in COM, so we can use one file for both definition and implementation. Language interoperability and easier component-based design. We can create an instance of any class written in any managed language without worrying about explicit marshalling or using custom interoperability code. Attributes Attributes are used to control in more detail how your program behaves at run time. We can emit our own custom metadata into .NET Framework files through user-defined custom attributes.

External References Gokhale Sir Notes. Metadata and Self-Describing Components Metadata and the PE File Structure Run-Time Use of Metadata