Jump to content

Standard Libraries (CLI)

From Wikipedia, the free encyclopedia
(Redirected fromBase Class Library)

TheStandard Librariesare a set of libraries included in theCommon Language Infrastructure(CLI) in order to encapsulate many common functions, such as file reading and writing,XMLdocument manipulation,exception handling,applicationglobalization,network communication,threading,andreflection,which makes the programmer's job easier. It is much larger in scope than standard libraries for most other languages, includingC++,and is comparable in scope and coverage to thestandard libraries of Java.

The Standard Libraries are the Base Class Library (BCL), Runtime Infrastructure Library (both part of the kernel profile), Network Library, Reflection Library, XML Library (which with the first two listed libraries form the compact profile), Extended Array Library, Parallel Library, Floating Point Library and Vararg Library.

TheFramework Class Library(FCL) is the original implementation of the Standard Libraries as the.NET Framework, which includes it, is the first implementation of the CLI.

Profiles

[edit]

The main standard libraries are organized into two Standard Profiles, the Kernel Profile, and the Compact Profile.[1]The following standard libraries do not belong to any profile: the Extended Array Library, the Extended Numerics Library, the Parallel Library and the Vararg Library.[2][3][4][5]

Kernel Profile

[edit]

The Kernel Profile is a subset of the Compact Profile. The Kernel Profile contains the Base Class Library (BCL) and Runtime Infrastructure Library.[6]

Compact Profile

[edit]

The Compact Profile contains those libraries in the Kernel Profile as well as the Network Library, the Reflection Library and the XML Library.[7]

Libraries

[edit]

Base Class Library

[edit]

The Base Class Library is a simple runtime library for modern programming languages. It serves as the Standard for the runtime library for the language C# as well as one of the CLI Standard Libraries. It provides types to represent the built-in data types of the CLI, simple file access, custom attributes, security attributes, string manipulation, formatting, streams, collections, among other things.[8]It defines types in the following namespaces:

System
Defines the Object class which allreference typeobjects derive from (including value-type objects) and the ValueType class which allvalue typeobjects derive from. It also defines the base data types likeintegers,floating point numbers,character,strings,Boolean,enumerationand more. Support for the environment and platform and acommand-line interfaceis provided along with base classes forexceptionsandattributes.It definesarraysanddelegates,mathematical functions and many other types.
System.Collections
Defines many commoncontainer typesused in programming, such asdictionaries,hashtables,lists,queuesandstacks.
System.Collections.Generic
Definesgeneric typesof the container types in the System.Collections namespace.
System.Diagnostics
Defines types that provide the ability to diagnose applications. It includesevent logging,performance counters,tracingand interaction with system processes.
System.Globalization
Defines types that define culture-related information, including language, country/region, calendars in use, format patterns for dates, currency and numbers and sort order for strings.
System.IO
Defines type that enable reading from and writing to differentstreams,such as files or otherdata streams.Also provides a connection to thefile system.
System.Security
Defines types that represent the security system and permissions.
System.Security.Permissions
Defines types that control access to operations and resources based on policy.
System.Text
Defines types that support variouscharacter encodings,regular expressionsand a more efficient mechanism for manipulating strings.
System.Threading
Defines types that enablemultithreaded programming.
UML package diagram of the stream hierarchy in.NET

Runtime Infrastructure Library

[edit]

The Runtime Infrastructure Library provides the services needed by a compiler to target the CLI and the facilities needed to dynamically load types from a stream in a specified file format.[9]It defines types in the following namespaces:

System
Defines types for theapplication domain,pointers,handlesand more.
System.Reflection
Defines types that provide a managed view of loaded types, methods and fields, and that can dynamically create and invoke types. These types are relevant to theprogram runtime.
System.Runtime.CompilerServices
Defines types that provide functionality for compiler writers who use managed code to specifyattributesinmetadatathat affect the run-time behavior of theVirtual Execution System.
System.Runtime.InteropServices
Defines types that supportPlatform Invocation Services(P/Invoke).

Network Library

[edit]

The Network Library provides simple networking services including direct access to network ports as well as HTTP support.[10]It defines types in the following namespaces:

System
Defines types that provide an object representation of auniform resource identifier(URI) and easy access to the parts of the URI.
System.Collections.Specialized
Defines specialized and strongly-typed collections; for example, a linked list dictionary, a bit vector, and collections that contain only strings.
System.Net
Defines types that provide a simple programming interface for a number ofnetwork protocols.
System.Net.Sockets
Defines type that provide a managed implementation of theWindows Sockets(Winsock) interface for developers who need to tightly control access to the network.

Reflection Library

[edit]

The Reflection Library provides the ability to examine the structure of types, create instances of types and invoke methods on types, all based on a description of the type.[11]It defines types in the following namespaces:

System
Defines thevoid type,a return value type for a method that does not return a value.
System.Globalization
Defines type that provide information about a specific culture (called a locale for unmanaged code development). The information includes the names for the culture, the writing system, the calendar used and formatting for dates and sort strings.
System.Reflection
Defines types that provide a managed view of loaded types, methods and fields, and that can dynamically create and invoke types.
System.Security.Permissions
Defines types that control access to operations and resources based on policy. These types are relevant to thereflection.

XML Library

[edit]

The XML Library provides a simple "pull-style" parser for XML. It is designed for resource-constrained devices, yet provides a simple user model.[12]It defines types in the following namespace.

System.Xml
Defines types for processingXML.

Extended Array Library

[edit]

The Extended Array Library provides support for non-vector arrays. That is, arrays that have more than one dimension or arrays that have non-zero lower bounds.[2]The Extended Array Library doesn't add any extra types, but it does extend the array-handling mechanism.[13]

Extended Numerics Library

[edit]

The Extended Numerics Library provides support for floating-point (System.Single, System.Double) and extended-precision (System.Decimal) data types. Like the Base Class Library, this library is directly referenced by the C# standard.[3]

Parallel Library

[edit]

The Parallel Library provides easy parallelism for non-expert programmers, so that multithreaded CPUs can be exploited.[4]

Vararg Library

[edit]

The Vararg Library provides support for dealing with variable-length argument lists.[5]

See also

[edit]

References

[edit]
  1. ^"IV.3 The Standard Profiles".Standard ECMA-335 –Common Language Infrastructure(CLI)(Technical report) (6th ed.).Ecma International.June 2012. p. 437.
  2. ^ab"IV.5.8 Extended array library".Standard ECMA-335 –Common Language Infrastructure(CLI)(Technical report) (6th ed.).Ecma International.June 2012. p. 441.
  3. ^ab"IV.5.7 Extended numerics library".Standard ECMA-335 –Common Language Infrastructure(CLI)(Technical report) (6th ed.).Ecma International.June 2012. p. 441.
  4. ^ab"IV.5.10 Parallel library".Standard ECMA-335 –Common Language Infrastructure(CLI)(Technical report) (6th ed.).Ecma International.June 2012. p. 441.
  5. ^ab"IV.5.9 Vararg library".Standard ECMA-335 –Common Language Infrastructure(CLI)(Technical report) (6th ed.).Ecma International.June 2012. p. 441.
  6. ^"IV.3.1 The Kernel Profile".Standard ECMA-335 –Common Language Infrastructure(CLI)(Technical report) (6th ed.).Ecma International.June 2012. p. 437.
  7. ^"IV.3.2 The Compact Profile".Standard ECMA-335 –Common Language Infrastructure(CLI)(Technical report) (6th ed.).Ecma International.June 2012. p. 437.
  8. ^"IV.5.3 Base Class Library (BCL)".Standard ECMA-335 –Common Language Infrastructure(CLI)(Technical report) (6th ed.).Ecma International.June 2012. p. 440.
  9. ^"IV.5.2 Runtime infrastructure library".Standard ECMA-335 –Common Language Infrastructure(CLI)(Technical report) (6th ed.).Ecma International.June 2012. p. 440.
  10. ^"IV.5.4 Network library".Standard ECMA-335 –Common Language Infrastructure(CLI)(Technical report) (6th ed.).Ecma International.June 2012. p. 440.
  11. ^"IV.5.5 Reflection library".Standard ECMA-335 –Common Language Infrastructure(CLI)(Technical report) (6th ed.).Ecma International.June 2012. p. 440.
  12. ^"IV.5.6 XML library".Standard ECMA-335 –Common Language Infrastructure(CLI)(Technical report) (6th ed.).Ecma International.June 2012. p. 440.
  13. ^King, Jason; Easton, Mark (2004). "Chapter 4: The NET Framework Dissected". In Gilmore, Jason (ed.).Cross-Platform.NET Development: Using Mono, Portable.NET, and Microsoft.NET.Apress.p. 110.ISBN1-59059-330-8.LCCN2004018339.
[edit]