Common Language Runtime (CLR)
1. Security Changes in the .NET Framework 4
2. Parallel Computing
3. Code Contracts
4. Lazy Initialiation
5. Event Tracing for Windows
6. Dynamic Language Runtime
7. Covariance and Contravariance
Base Class Libraries
1. Collections and Data Structures
Common Language Runtime (CLR)
1. Security Changes in the .NET Framework 4
a. Machine-wide security policy has been eliminated
b. Security transparency has become the default enforcement mechanism
Security involves three interacting pieces: sandboxing, permissions, and enforcement.
Sandboxing ----> Creating isolated domains where some code is treated as fully trusted and other code is restricted to the permissions in the grant set for the sandbox.
The application code that runs within the grant set of the sandbox is considered to be transparent; that is, it cannot perform any operations that can affect security. The grant set for the sandbox is determined by evidence. Evidence identifies what specific permissions are required by sandboxes, and what kinds of sandboxes can be created.
Enforcement ----> allowing transparent code to execute only within its grant set.
Transparency is an enforcement mechanism that separates code that runs as part of the application from code that runs as part of the infrastructure.
Transparency draws a barrier between code that can do privileged things (critical code), such as calling native code, and code that cannot (transparent code).
Transparent code can execute commands within the bounds of the permission set it is operating in, but cannot execute, derive from, or contain critical code.
Level 2 Transparency
Level 2 transparency was introduced in the .NET Framework version 4.
The three tenets of this model are transparent code, security-safe-critical code, and security-critical code.
Transparent code can call only other transparent code or security-safe-critical code.
Security-safe-critical code is fully trusted but is callable by transparent code. It exposes a limited surface area of full-trust code.
Security-critical code can call any code and is fully trusted, but it cannot be called by transparent code.
2. Parallel Computing
new Parallel and Task classes
Parallel LINQ (PLINQ)
3. Code Contracts
new System.Diagnostics.Contracts namespace contains classes that provide a language-neutral way to express coding assumptions in the form of pre-conditions, post-conditions, and object invariants
4. Lazy Initialiation
With lazy initialization, the memory for an object is not allocated until it is needed. Lazy initialization can improve performance by spreading object allocations evenly across the lifetime of a program. You can enable lazy initialization for any custom type by wrapping the type inside a System.Lazy(Of T) class.
5. Event Tracing for Windows
now access the Event Tracing for Windows (ETW) events for diagnostic purposes to improve performance
6. Dynamic Language Runtime
The dynamic language runtime (DLR) is a new runtime environment that adds a set of services for dynamic languages to the CLR. The DLR makes it easier to develop dynamic languages to run on the .NET Framework and to add dynamic features to statically typed languages. To support the DLR, the new System.Dynamic namespace is added to the .NET Framework. In addition, several new classes that support the .NET Framework infrastructure are added to the System.Runtime.CompilerServices namespace
7. Covariance and Contravariance
Covariance and contravariance enable implicit reference conversion for array types, delegate types, and generic type arguments. Covariance preserves assignment compatibility and contravariance reverses it.
Covariance for arrays enables implicit conversion of an array of a more derived type to an array of a less derived type.
object[] array = new String[10];
Base Class Libraries
1. Collections and Data Structures
BigInteger
The new System.Numerics.BigInteger structure is an arbitrary-precision integer data type that supports all the standard integer operations, including bit manipulation.
SortedSet Generic Class
The new System.Collections.Generic.SortedSet(Of T) class provides a self-balancing tree that maintains data in sorted order after insertions, deletions, and searches.
Tuples
A tuple is a simple generic data structure that holds an ordered set of items of heterogeneous types
No comments:
Post a Comment