Common Language Infrastructure (CLI)
Introduction and Class Library Factorization
Hewlett-Packard Intel Microsoft
Common Language Infrastructure (CLI) Introduction and Class - - PowerPoint PPT Presentation
Common Language Infrastructure (CLI) Introduction and Class Library Factorization Hewlett-Packard Intel Microsoft Outline What is the CLI? Factoring the Base Class Libraries Categories Packages by Category Questions and
Hewlett-Packard Intel Microsoft
Stack frame size Types of local variables and parameters Pinned variable information Exception handler table
Common Language Specification (CLS)
Includes referenced assemblies Allows crypto-strong names Records version information Security boundary
Name and defining assembly Member information (fields, methods, etc.)
Simple stack machine model Typeless opcodes (add, not add.int32)
Signed and unsigned via opcode, not type Rich set of conversion operations
Verifiable subset Tail calls, virtual dispatch, call via function pointer,
Typed variable argument lists, dynamically typed
Objects, vectors, and strings are built-in
As are 32- and 64-bit integers and floats, and 32/64-bit
agnostic integers
Adheres to the CLS rules
Size constraints (RAM, ROM, Flash) Computational constraints (FPU, 64bit support) Feature requirements
Minimal base is always present File format independent of factorization Library factorization is the driver
… vendors to specify what’s available … developers to specify requirements
Fixes file format Minimal functionality and hardware Hand-picked classes and methods
Minimal hardware support required Most common language features
Features required for C# with minimal hardware support
Depends on classes defined in Kernel
Implemented a la cart by runtime vendors Required a la cart by developers
A class can only be in one package Minimize and specify dependencies on packages Base class in package or one it depends on
Check it makes sense, new dependencies Interfaces may be in another package
Methods will exist, just can’t cast to interface
Requires Kernel, Basic Language, and
Requires above plus Reflection
Requires Kernel, Basic Language,
Kernel, Basic Language, Common DT, Advanced DT, Networking, XML, IO, Collections Ex: Connected XML C# Application Kernel, Basic Language, Common DT, Networking Ex: Connected C# Application Kernel, Basic Language C# Program Kernel Minimal Required Packages Scenario
Core Execution Engine Base Language XML Standard IO Networking Common Data Types Advanced Data Types Collections Core Execution Engine Core Execution Engine Core Execution Engine Base Language Base Language Common Data Types NetworkingMinimal .Net Execution Example: Advanced C# App Example: Connected C# App C# Program Execution
For ease of discussion only
C ore Ex ec ution Engine D ev elopm ent Tim e C las s es Bas e Language G lobalization Adv anc ed XML R em oting As y nc h Support XML S tandard IO N etwork ing Sec urity Threading Serialization R egular E x pres s ions Ex tended N um eric s C om m on D ata Ty pes Adv anc ed D ata Ty pes C ollec tions N on-C LS Support R ef lec tion U nm anaged H os ting GCEE Functionality Not In Buckets High Level Program m ing Com m on Program m ing Utilities Abstract O S Interfaces
Platform-independent operating system
Classes that support common programming
Programming patterns for the 2000s: XML, remote
Revealing underlying operations to
Kernel, Basic Language, and support for
System.Net.*
System.IsolatedStorage, System.Security, …
System.Console, System.IO, System.Text, …
System.Threading, …
System.DateTime, System.Text.StringBuilder, etc.
System.BitConverter, System.URI, …
System.Collections
System.Decimal, System.Double, etc.
System.Text.RegularExpressions.*
System.Runtime.Serialization.*, etc.
System.AsyncCallback, System.IAsyncResult
System.Globalization.*, System.Resources.*, etc.
System.Runtime.Remoting.*
System.Xml.* (parsing and generation)
System.Xml.Xsl.*, System.Xml.XPath.*
System.WeakReference,
System.OperatingSystem, etc.
System.ArgIterator, etc.
System.Reflection.*, etc.
System.Runtime.InteropServices, etc.
1, 2, and 4 byte integers, arrays, string, object, etc.
System.EventHandler, System.IFormattable,
System.Diagnostics.*,