26
Новости в Новости в .NET CLR 2.0 .NET CLR 2.0 Светлин Наков Светлин Наков Българска асоциация на Българска асоциация на разработчиците на софтуер разработчиците на софтуер

Новости в.NET CLR 2.0 Светлин Наков Българска асоциация на разработчиците на софтуер

Embed Size (px)

Citation preview

Page 1: Новости в.NET CLR 2.0 Светлин Наков Българска асоциация на разработчиците на софтуер

Новости вНовости в.NET CLR 2.0.NET CLR 2.0

Новости вНовости в.NET CLR 2.0.NET CLR 2.0

Светлин НаковСветлин НаковБългарска асоциация наБългарска асоциация наразработчиците на софтуерразработчиците на софтуер

Page 2: Новости в.NET CLR 2.0 Светлин Наков Българска асоциация на разработчиците на софтуер

Developer RoadmapDeveloper Roadmap

• “ “Orcas” releaseOrcas” release

• Windows “Longhorn” Windows “Longhorn” integrationintegration

• New UI tools and New UI tools and designers designers

• Extensive managed Extensive managed interfacesinterfaces

Visual Studio Visual Studio Orcas Orcas

“Longhorn”“Longhorn”

Visual StudioVisual Studio.NET 2003.NET 2003

• “ “Everett Release”Everett Release”

• Windows Server 2003 Windows Server 2003 integrationintegration

• Support for .NET Support for .NET Compact Framework Compact Framework and device and device development development

• Improved performanceImproved performance

Visual Studio 2005 Visual Studio 2005 “Yukon”“Yukon”

• “ “Whidbey” releaseWhidbey” release

• SQL Server SQL Server integrationintegration

• Improved IDE Improved IDE productivity and productivity and community supportcommunity support

• Extended support for Extended support for XML Web servicesXML Web services

• Office Office programmabilityprogrammability

Page 3: Новости в.NET CLR 2.0 Светлин Наков Българска асоциация на разработчиците на софтуер

AgendaAgenda

Extending the PlatformExtending the PlatformSQL Server IntegrationSQL Server Integration

Moving to 64 bitMoving to 64 bit

Improving the PlatformImproving the PlatformPerformance workPerformance work

RAD DebuggingRAD Debugging

Security improvementsSecurity improvements

Innovating in the PlatformInnovating in the PlatformGenerics supportGenerics support

BCL EnhancementsBCL Enhancements

Page 4: Новости в.NET CLR 2.0 Светлин Наков Българска асоциация на разработчиците на софтуер

SQL Server IntegrationDesign GoalSQL Server IntegrationDesign Goal

Bring framework programming model into Bring framework programming model into the database tierthe database tier

Allow business logic to easily migrate to Allow business logic to easily migrate to the most appropriate tierthe most appropriate tier

Enable Enable safe safe database extensionsdatabase extensions

ResultResult: Stored Procedures, Triggers, data : Stored Procedures, Triggers, data types defined in managed codetypes defined in managed code

Page 5: Новости в.NET CLR 2.0 Светлин Наков Българска асоциация на разработчиците на софтуер

VS .NET VS .NET ProjectProject

Assembly: Assembly: geom.dllgeom.dll

VB, C#, …VB, C#, … BuildBuild

SQL ServerSQL Server

SQL Data Definition: SQL Data Definition: create create assembly … assembly … create function … create function … create create procedure … procedure … create trigger … create trigger … create create type …type …SQL Queries: SQL Queries:

SELECT name FROM Supplier SELECT name FROM Supplier WHERE Location::Distance ( @point ) < 3WHERE Location::Distance ( @point ) < 3

CLR hosted by CLR hosted by SQL (in-proc)SQL (in-proc)

SQL CLR Functionality SQL CLR Functionality SQL CLR Functionality SQL CLR Functionality

Define Location.Distance()Define Location.Distance()

Page 6: Новости в.NET CLR 2.0 Светлин Наков Българска асоциация на разработчиците на софтуер

Sql Programming Model Splitting a stringSql Programming Model Splitting a string

The old way…. The old way….

declare @str varchar(200)declare @str varchar(200)select @Str = 'Microsoft Corporation|SQL Server|2003|SQL-select @Str = 'Microsoft Corporation|SQL Server|2003|SQL-CLR|2002-08-20|11:32:00|Document|3.b.3'CLR|2002-08-20|11:32:00|Document|3.b.3'SELECTSELECTsubstring(@Str + '|', 0 + 1, substring(@Str + '|', 0 + 1, charindex('|', @Str + '|', 0 + 1) - 0 - 1 ),charindex('|', @Str + '|', 0 + 1) - 0 - 1 ),substring(@Str + '|', charindex('|', @Str + '|') + 1, substring(@Str + '|', charindex('|', @Str + '|') + 1, charindex('|', @Str + '|',charindex('|', @Str + '|', charindex('|', @Str + '|') + 1) - charindex('|', @Str + '|') + 1) - charindex('|', @Str + '|') - 1 ),charindex('|', @Str + '|') - 1 ),substring(@Str + '|', charindex('|', @Str + '|', substring(@Str + '|', charindex('|', @Str + '|', charindex('|', @Str + '|') + 1) + 1,charindex('|', @Str + '|') + 1) + 1, charindex('|', @Str + '|', charindex('|', @Str + '|',charindex('|', @Str + '|', charindex('|', @Str + '|', charindex('|', @Str + '|') + 1) + 1) -charindex('|', @Str + '|') + 1) + 1) - charindex('|', @Str + '|', charindex('|', @Str + '|', charindex('|', @Str + '|') + 1) - 1 ),charindex('|', @Str + '|') + 1) - 1 ),……

declare @str varchar(200)declare @str varchar(200)select @Str = 'Microsoft Corporation|SQL Server|2003|SQL-CLR|2002-select @Str = 'Microsoft Corporation|SQL Server|2003|SQL-CLR|2002-08-20|11:32:00|Document|3.b.3'08-20|11:32:00|Document|3.b.3'SELECTSELECTsubstring(@Str + '|', 0 + 1, substring(@Str + '|', 0 + 1, charindex('|', @Str + '|', 0 + 1) - 0 - 1 ),charindex('|', @Str + '|', 0 + 1) - 0 - 1 ),substring(@Str + '|', charindex('|', @Str + '|') + 1, substring(@Str + '|', charindex('|', @Str + '|') + 1, charindex('|', @Str + '|',charindex('|', @Str + '|', charindex('|', @Str + '|') + 1) - charindex('|', @Str + '|') + 1) - charindex('|', @Str + '|') - 1 ),charindex('|', @Str + '|') - 1 ),substring(@Str + '|', charindex('|', @Str + '|', substring(@Str + '|', charindex('|', @Str + '|', charindex('|', @Str + '|') + 1) + 1,charindex('|', @Str + '|') + 1) + 1, charindex('|', @Str + '|', charindex('|', @Str + '|',charindex('|', @Str + '|', charindex('|', @Str + '|', charindex('|', @Str + '|') + 1) + 1) -charindex('|', @Str + '|') + 1) + 1) - charindex('|', @Str + '|', charindex('|', @Str + '|', charindex('|', @Str + '|') + 1) - 1 ),charindex('|', @Str + '|') + 1) - 1 ),substring(@Str + '|', charindex('|', @Str + '|', substring(@Str + '|', charindex('|', @Str + '|', charindex('|', @Str + '|',charindex('|', @Str + '|', charindex('|', @Str + '|') + 1) + 1) + 1, charindex('|', @Str + '|') + 1) + 1) + 1, charindex('|', @Str + '|',charindex('|', @Str + '|', charindex('|', @Str + '|', charindex('|', @Str + '|',charindex('|', @Str + '|', charindex('|', @Str + '|', charindex('|', @Str + '|') + 1) + 1) + 1) -charindex('|', @Str + '|') + 1) + 1) + 1) - charindex('|', @Str + '|', charindex('|', @Str + '|',charindex('|', @Str + '|', charindex('|', @Str + '|', charindex('|', @Str + '|') + 1) + 1) - 1 ),charindex('|', @Str + '|') + 1) + 1) - 1 ),substring(@Str + '|', charindex('|', @Str + '|', substring(@Str + '|', charindex('|', @Str + '|', charindex('|', @Str + '|',charindex('|', @Str + '|', charindex('|', @Str + '|', charindex('|', @Str + '|', charindex('|', @Str + '|') + 1) + 1) + 1) + 1,charindex('|', @Str + '|') + 1) + 1) + 1) + 1, charindex('|', @Str + '|', charindex('|', @Str + '|', charindex('|', @Str + '|', charindex('|', @Str + '|', charindex('|', @Str + '|',charindex('|', @Str + '|', charindex('|', @Str + '|', charindex('|', @Str + '|', charindex('|', @Str + '|') + 1) + 1) + 1) + 1) -charindex('|', @Str + '|') + 1) + 1) + 1) + 1) - charindex('|', @Str + '|', charindex('|', @Str + '|',charindex('|', @Str + '|', charindex('|', @Str + '|', charindex('|', @Str + '|',charindex('|', @Str + '|', charindex('|', @Str + '|') + 1) + 1) + 1) - 1 ),charindex('|', @Str + '|') + 1) + 1) + 1) - 1 ),substring(@Str + '|', charindex('|', @Str + '|', substring(@Str + '|', charindex('|', @Str + '|', charindex('|', @Str + '|',charindex('|', @Str + '|', charindex('|', @Str + '|', charindex('|', @Str + '|', charindex('|', @Str + '|', charindex('|', @Str + '|', charindex('|', @Str + '|') + 1) + 1) + 1) + 1) + 1,charindex('|', @Str + '|') + 1) + 1) + 1) + 1) + 1, charindex('|', @Str + '|', charindex('|', @Str + '|', charindex('|', @Str + '|', charindex('|', @Str + '|', charindex('|', @Str + '|',charindex('|', @Str + '|', charindex('|', @Str + '|', charindex('|', @Str + '|',charindex('|', @Str + '|', charindex('|', @Str + '|', charindex('|', @Str + '|') + 1) + 1) + 1) + 1) + 1) -charindex('|', @Str + '|') + 1) + 1) + 1) + 1) + 1) - charindex('|', @Str + '|', charindex('|', @Str + '|', charindex('|', @Str + '|', charindex('|', @Str + '|', charindex('|', @Str + '|',charindex('|', @Str + '|', charindex('|', @Str + '|', charindex('|', @Str + '|', charindex('|', @Str + '|') + 1) + 1) + 1) + 1) - 1 ),charindex('|', @Str + '|') + 1) + 1) + 1) + 1) - 1 ),substring(@Str + '|', charindex('|', @Str + '|', substring(@Str + '|', charindex('|', @Str + '|', charindex('|', @Str + '|',charindex('|', @Str + '|', charindex('|', @Str + '|', charindex('|', @Str + '|', charindex('|', @Str + '|', charindex('|', @Str + '|', charindex('|', @Str + '|',charindex('|', @Str + '|', charindex('|', @Str + '|') + 1) + 1) + 1) + 1) + 1) + 1, charindex('|', @Str + '|') + 1) + 1) + 1) + 1) + 1) + 1, charindex('|', @Str + '|',charindex('|', @Str + '|', charindex('|', @Str + '|', charindex('|', @Str + '|', charindex('|', @Str + '|', charindex('|', @Str + '|', charindex('|', @Str + '|',charindex('|', @Str + '|', charindex('|', @Str + '|', charindex('|', @Str + '|',charindex('|', @Str + '|', charindex('|', @Str + '|', charindex('|', @Str + '|') + 1) + 1) + 1) + 1) + 1) + 1) - charindex('|', @Str + '|') + 1) + 1) + 1) + 1) + 1) + 1) - charindex('|', @Str + '|',charindex('|', @Str + '|', charindex('|', @Str + '|', charindex('|', @Str + '|', charindex('|', @Str + '|', charindex('|', @Str + '|', charindex('|', @Str + '|',charindex('|', @Str + '|', charindex('|', @Str + '|', charindex('|', @Str + '|', charindex('|', @Str + '|') + 1) + 1) + 1) + 1) + 1) - 1 ),charindex('|', @Str + '|') + 1) + 1) + 1) + 1) + 1) - 1 ),substring(@Str + '|', charindex('|', @Str + '|', substring(@Str + '|', charindex('|', @Str + '|', charindex('|', @Str + '|',charindex('|', @Str + '|', charindex('|', @Str + '|', charindex('|', @Str + '|', charindex('|', @Str + '|', charindex('|', @Str + '|', charindex('|', @Str + '|',charindex('|', @Str + '|', charindex('|', @Str + '|', charindex('|', @Str + '|', charindex('|', @Str + '|') + 1) + 1) + 1) + 1) + 1) + 1) + 1,charindex('|', @Str + '|') + 1) + 1) + 1) + 1) + 1) + 1) + 1, charindex('|', @Str + '|', charindex('|', @Str + '|', charindex('|', @Str + '|', charindex('|', @Str + '|', charindex('|', @Str + '|',charindex('|', @Str + '|', charindex('|', @Str + '|', charindex('|', @Str + '|',charindex('|', @Str + '|', charindex('|', @Str + '|', charindex('|', @Str + '|', charindex('|', @Str + '|',charindex('|', @Str + '|', charindex('|', @Str + '|', charindex('|', @Str + '|') + 1) + 1) + 1) + 1) + 1) + 1) + 1) - charindex('|', @Str + '|') + 1) + 1) + 1) + 1) + 1) + 1) + 1) - charindex('|', @Str + '|',charindex('|', @Str + '|', charindex('|', @Str + '|', charindex('|', @Str + '|', charindex('|', @Str + '|', charindex('|', @Str + '|', charindex('|', @Str + '|',charindex('|', @Str + '|', charindex('|', @Str + '|', charindex('|', @Str + '|',charindex('|', @Str + '|', charindex('|', @Str + '|', charindex('|', @Str + '|') + 1) + 1) + 1) + 1) + 1) + 1) - 1 ) charindex('|', @Str + '|') + 1) + 1) + 1) + 1) + 1) + 1) - 1 )

Page 7: Новости в.NET CLR 2.0 Светлин Наков Българска асоциация на разработчиците на софтуер

Sql Programming Model Splitting a stringSql Programming Model Splitting a string

Public Shared Sub SplitString()Public Shared Sub SplitString() Dim s As StringDim s As String s = "Microsoft Corporation|SQL s = "Microsoft Corporation|SQL Server|Server|2003|SQL-CLR|2002-08-2003|SQL-CLR|2002-08- 20|11:32:00|20|11:32:00|Document|3.b.3"Document|3.b.3" Dim myArray() As String = Split(s, "|")Dim myArray() As String = Split(s, "|")End SubEnd Sub

The new way…. The new way….

Page 8: Новости в.NET CLR 2.0 Светлин Наков Българска асоциация на разработчиците на софтуер

Moving to 64 bitMoving to 64 bit64 bit for Servers and workstations64 bit for Servers and workstations

X64 and IA64 bit supportX64 and IA64 bit support

Enable SQL Server 2005 and ASP.NETEnable SQL Server 2005 and ASP.NET

Verifiable managed binaries just run!Verifiable managed binaries just run!

Support for WoW64Support for WoW64Enables 32bit apps to run on 64 bit machinesEnables 32bit apps to run on 64 bit machines

1.0 and 1.1 apps always run in the WoW1.0 and 1.1 apps always run in the WoW

VS: Runs as a 32bit applicationVS: Runs as a 32bit applicationYou can develop, deploy, and debug 32 and You can develop, deploy, and debug 32 and 64bit applications64bit applications

Page 9: Новости в.NET CLR 2.0 Светлин Наков Българска асоциация на разработчиците на софтуер

PerformancePerformanceObjectives: make .NET an even greater Objectives: make .NET an even greater

programming platformprogramming platformLong-Term: make the performance characteristics of the Long-Term: make the performance characteristics of the CLR similar to native codeCLR similar to native code

Reduce marginal cost of additional managed processesReduce marginal cost of additional managed processes

Reduce startup time and working setReduce startup time and working set

NGenNGenCompiles IL code to native code, saving results to diskCompiles IL code to native code, saving results to disk

Advantages: no need to recompile IL to native code, and Advantages: no need to recompile IL to native code, and class layout already set so better startup timeclass layout already set so better startup time

VS 2005: Significant reductions in the amount of private, VS 2005: Significant reductions in the amount of private, non-shareable working setnon-shareable working set

OS: ‘no-Jit’ plan, all managed code will be NGenedOS: ‘no-Jit’ plan, all managed code will be NGened

Page 10: Новости в.NET CLR 2.0 Светлин Наков Българска асоциация на разработчиците на софтуер

Performance everywherePerformance everywhereNew, Performant APIsNew, Performant APIs

APIs for faster resource lookupAPIs for faster resource lookup

Lightweight CodeGen: only generates essential Lightweight CodeGen: only generates essential code (contrast to Reflect Emit)code (contrast to Reflect Emit)

Existing APIs ImprovedExisting APIs Improved

Cross AppDomain RemotingCross AppDomain RemotingBetween 1.1 and 200x faster. Biggest gains for simpler items Between 1.1 and 200x faster. Biggest gains for simpler items (strings, integers, serializable objects)(strings, integers, serializable objects)

Delegate invoke performance has more than Delegate invoke performance has more than doubleddoubled

AppDomain Footprints: significantly reducedAppDomain Footprints: significantly reduced

UTF8Encoding: translation is 2.5x fasterUTF8Encoding: translation is 2.5x faster

Page 11: Новости в.NET CLR 2.0 Светлин Наков Българска асоциация на разработчиците на софтуер

RAD DebuggingRAD Debugging

Edit and Continue: Edit Code at runtimeEdit and Continue: Edit Code at runtimeAllowed Edits: ExamplesAllowed Edits: Examples

Add private fields to a classAdd private fields to a class

Add private non-virtual methods to a classAdd private non-virtual methods to a class

Change a function body, even while steppingChange a function body, even while stepping

Disallowed Edits: ExamplesDisallowed Edits: Examples

Removing fields/methodsRemoving fields/methods

Edits to generic classesEdits to generic classes

Serialization will not recognize new fieldsSerialization will not recognize new fields

Display Attributes for a better debugging Display Attributes for a better debugging experienceexperience

Page 12: Новости в.NET CLR 2.0 Светлин Наков Българска асоциация на разработчиците на софтуер

CLR SecurityCLR Security

New cryptography supportNew cryptography supportPKCS7 supportPKCS7 support

XML encryption supportXML encryption support

Enhanced support for X509 certificatesEnhanced support for X509 certificates

Enhanced Application SecurityEnhanced Application SecurityPermission CalculatorPermission Calculator

Integration with ClickOnceIntegration with ClickOnce

Debug-In-ZoneDebug-In-Zone

Managed ACL SupportManaged ACL Support

Page 13: Новости в.NET CLR 2.0 Светлин Наков Българска асоциация на разработчиците на софтуер

public class Listpublic class List{{ private object[] elements;private object[] elements; private int count;private int count;

public void Add(object element) {public void Add(object element) { if (count == elements.Length) Resize(count * 2);if (count == elements.Length) Resize(count * 2); elements[count++] = element;elements[count++] = element; }}

public object this[int index] {public object this[int index] { get { return elements[index]; }get { return elements[index]; } set { elements[index] = value; }set { elements[index] = value; } }}

public int Count {public int Count { get { return count; }get { return count; } }}}}

GenericsGenerics

public class public class List<T>List<T>{{ private private TT[] elements;[] elements; private int count;private int count;

public void Add(public void Add(TT element) { element) { if (count == elements.Length) Resize(count * 2);if (count == elements.Length) Resize(count * 2); elements[count++] = element;elements[count++] = element; }}

public public TT this[int index] { this[int index] { get { return elements[index]; }get { return elements[index]; } set { elements[index] = value; }set { elements[index] = value; } }}

public int Count {public int Count { get { return count; }get { return count; } }}}}

List intList = new List();List intList = new List();

intList.Add(1);intList.Add(1);intList.Add(2);intList.Add(2);intList.Add(“3");intList.Add(“3");

int i = (int)intList[0];int i = (int)intList[0];

List intList = new List();List intList = new List();

intList.Add(1); intList.Add(1); // Argument is boxed// Argument is boxedintList.Add(2); intList.Add(2); // Argument is boxed// Argument is boxedintList.Add(“3"); intList.Add(“3"); // Should be an error// Should be an error

int i = (int)intList[0]; int i = (int)intList[0]; // Cast required// Cast required

ListList<int><int> intList = new List intList = new List<int><int>();();

intList.Add(1); intList.Add(1); // No boxing// No boxingintList.Add(2); intList.Add(2); // No boxing// No boxingintList.Add(“3"); intList.Add(“3"); // Compile-time error// Compile-time error

int i = intList[0]; int i = intList[0]; // No cast required// No cast required

Page 14: Новости в.NET CLR 2.0 Светлин Наков Българска асоциация на разработчиците на софтуер

GenericsGenerics

Why generics?Why generics?Compile-time type checkingCompile-time type checking

Performance (no boxing, no downcasts)Performance (no boxing, no downcasts)

Reduced code bloat (typed collections)Reduced code bloat (typed collections)

VB, C#, MC++ produce & consume genericsVB, C#, MC++ produce & consume generics

Use generics freely in internal APIsUse generics freely in internal APIs

Consider using generics in public APIsConsider using generics in public APIsGenerics are not yet in CLSGenerics are not yet in CLS

To be CLS compliant, provide a non-generic API To be CLS compliant, provide a non-generic API alternativealternative

Microsoft is actively pursuing standardization of Microsoft is actively pursuing standardization of generics in runtime and languagesgenerics in runtime and languages

Page 15: Новости в.NET CLR 2.0 Светлин Наков Българска асоциация на разработчиците на софтуер

Generics in VBGenerics in VBPublic Class Public Class List(Of ItemTypeList(Of ItemType))          Private elements() As Private elements() As ItemTypeItemType          Private elementcount As IntegerPrivate elementcount As Integer          Public Sub Add(ByVal element As Public Sub Add(ByVal element As ItemTypeItemType))                    If elementcount = elements.Length ThenIf elementcount = elements.Length Then

Resize(elementcount * 2)Resize(elementcount * 2)                    elements(elementcount) = elementelements(elementcount) = element                    count += 1count += 1          End SubEnd Sub          Public Default Property Item(ByVal index As Integer) As Public Default Property Item(ByVal index As Integer) As ItemTypeItemType                    GetGet                            Return elements(index)Return elements(index)                    End GetEnd Get                    Set (ByVal Value As Set (ByVal Value As ItemTypeItemType))              elements(index) = Value              elements(index) = Value                    End SetEnd Set          End PropertyEnd Property          Public ReadOnly Property Count As IntegerPublic ReadOnly Property Count As Integer                    GetGet                            Return elementcountReturn elementcount                    End GetEnd Get          End PropertyEnd PropertyEnd ClassEnd Class

Dim intList As New List(Of Integer) Dim intList As New List(Of Integer) intList.Add(1)           intList.Add(1)           ‘ No boxing ‘ No boxing intList.Add(2)           intList.Add(2)           ‘ No boxing ‘ No boxing intList.Add(“3")     intList.Add(“3")     ‘ Compile-time error ‘ Compile-time error Dim i As Integer = intList(0)  Dim i As Integer = intList(0)  ’ No cast required’ No cast required

Page 16: Новости в.NET CLR 2.0 Светлин Наков Българска асоциация на разработчиците на софтуер

Generics in C++Generics in C++

generic<typename generic<typename TT>>public ref class List {public ref class List {      arrayarray<T><T>^ elements;^ elements;      int count;int count;public:public:      void Add(void Add(TT element) { element) {            if (count == elements->Length) Resize(count * 2);if (count == elements->Length) Resize(count * 2);            elements[count++] = element;elements[count++] = element;      }}      property property TT default [int index] { default [int index] {            TT get() { return elements[index]; } get() { return elements[index]; }            void set(void set(TT value) { elements[index] = value; } value) { elements[index] = value; }      }}      property int Count {property int Count {            int get() { return count; }int get() { return count; }      }}};};

List<int>List<int>^ intList = gcnew^ intList = gcnew List<int> List<int>();();intList->Add(1);      intList->Add(1);           // No boxing     // No boxingintList->Add(2);        intList->Add(2);           // No boxing   // No boxingintList->Add(“3");   intList->Add(“3");     // Compile-time error  // Compile-time error  int i = intList[0];       int i = intList[0];        // No cast required // No cast required

Page 17: Новости в.NET CLR 2.0 Светлин Наков Българска асоциация на разработчиците на софтуер

Enhancing the Base LibraryGeneric CollectionsEnhancing the Base LibraryGeneric Collections

System.Collections.Generic classesSystem.Collections.Generic classesList<T>List<T>Dictionary<K, V>Dictionary<K, V>Stack<T>Stack<T>Queue<T>Queue<T>

System.Collections.Generic interfacesSystem.Collections.Generic interfacesIList<T>IList<T>IDictionary<K, V>IDictionary<K, V>ICollection<T>ICollection<T>IEnumerable<T>IEnumerable<T>IEnumerator<T>IEnumerator<T>IComparable<T>IComparable<T>IComparer<T>IComparer<T>

Page 18: Новости в.NET CLR 2.0 Светлин Наков Българска асоциация на разработчиците на софтуер

Enhancing The Base LibraryOther Generics to look out forEnhancing The Base LibraryOther Generics to look out for

Nullable(Nullable(Of TOf T))Extremely useful for situations where null is a Extremely useful for situations where null is a value, such as database valuetypesvalue, such as database valuetypesT will be constrained to valueTypesT will be constrained to valueTypes

EventHandlerEventHandler<T><T>Saves on making your own EventHandlersSaves on making your own EventHandlers

Dim intVal as Nullable(Dim intVal as Nullable(Of IntegerOf Integer) = 5) = 5IfIf intVal.HasValue intVal.HasValue ThenThen ‘ checks for a value ‘ checks for a value

delegate voiddelegate void EventHandlerEventHandler<T><T>((ObjectObject sender, sender, TT e) e) wherewhere T : T : EventArgsEventArgs;;

Page 19: Новости в.NET CLR 2.0 Светлин Наков Българска асоциация на разработчиците на софтуер

VS 2005 Tracing FeaturesVS 2005 Tracing FeaturesAdditional ListenersAdditional Listeners

Pre - VS 2005Pre - VS 2005 Formatting of Trace information was Formatting of Trace information was predefined, and not controllablepredefined, and not controllableNo Console listener, ASP had their own tracing No Console listener, ASP had their own tracing mechanismmechanism

VS 2005VS 2005Predefined listeners (Console, ETW) and you Predefined listeners (Console, ETW) and you can make your owncan make your ownIntegrated ASP Tracing into our ownIntegrated ASP Tracing into our ownSupport formatting of output, into defined Support formatting of output, into defined formats, such as delimitered, or XMLformats, such as delimitered, or XML

MySource;Error;13;Wrong key;;;;;;318361290184;MySource;Error;13;Wrong key;;;;;;318361290184;

Page 20: Новости в.NET CLR 2.0 Светлин Наков Българска асоциация на разработчиците на софтуер

VS 2005 Tracing FeaturesVS 2005 Tracing Features

Simple Thread IdentificationSimple Thread IdentificationPre - VS 2005Pre - VS 2005 : specific threads were difficult to : specific threads were difficult to identify, and filter onidentify, and filter onVS 2005VS 2005 : Correlation ID has been added, which : Correlation ID has been added, which allows quick and easy identification of a thread, allows quick and easy identification of a thread, and simple subsequent filteringand simple subsequent filtering

Auto-generated DataAuto-generated DataPre - VS 2005Pre - VS 2005 : Standard information such as : Standard information such as timestamp or callstack would have to be explicitly timestamp or callstack would have to be explicitly generatedgeneratedVS 2005VS 2005 : An Admin can easily generate this data : An Admin can easily generate this data automatically, via config settingsautomatically, via config settings<<listenerslisteners>>

<<addadd namename="example.log" ="example.log" TraceOutputOptionsTraceOutputOptions= = "Timestamp, CorrelationId""Timestamp, CorrelationId"

Page 21: Новости в.NET CLR 2.0 Светлин Наков Българска асоциация на разработчиците на софтуер

VS 2005 Tracing FeaturesVS 2005 Tracing Features

Listener FilteringListener FilteringPre - VS 2005Pre - VS 2005 : Filtering of Trace : Filtering of Trace information was predefined, and not information was predefined, and not controllablecontrollableVS 2005VS 2005 : Assign filtering to listeners, so : Assign filtering to listeners, so only certain messages are traced. This only certain messages are traced. This allows filtering on any property of a allows filtering on any property of a message. E.g., ID, TimeStamp, etc.message. E.g., ID, TimeStamp, etc.

SwitchesSwitchesPre - VS 2005Pre - VS 2005 : Couldn’t determine what : Couldn’t determine what tracing a component supportedtracing a component supportedVS 2005VS 2005 : Support the ability to determine : Support the ability to determine what tracing mechanisms a component what tracing mechanisms a component hashas

Page 22: Новости в.NET CLR 2.0 Светлин Наков Българска асоциация на разработчиците на софтуер

SummarySummary

Extending the PlatformExtending the PlatformSQL Server IntegrationSQL Server Integration

Moving to 64 bitMoving to 64 bit

Improving the PlatformImproving the PlatformPerformance workPerformance work

RAD DebuggingRAD Debugging

Security improvementsSecurity improvements

Innovating in the PlatformInnovating in the PlatformGenerics supportGenerics support

BCL EnhancementsBCL Enhancements

Page 23: Новости в.NET CLR 2.0 Светлин Наков Българска асоциация на разработчиците на софтуер

ResourcesResources

BCL BlogBCL Bloghttp://weblogs.asp.net/bclteamhttp://weblogs.asp.net/bclteam

BCL WebsiteBCL Websitehttp://www.gotdotnet.com/team/clr/bcl/default.aspxhttp://www.gotdotnet.com/team/clr/bcl/default.aspx

BCL public mail aliasBCL public mail [email protected]@microsoft.com

Reference (Brad Abrams)Reference (Brad Abrams).NET Framework Standard Library Annotated Reference.NET Framework Standard Library Annotated Reference

Page 24: Новости в.NET CLR 2.0 Светлин Наков Българска асоциация на разработчиците на софтуер

Attend a free chat or web castAttend a free chat or web casthttp://www.microsoft.com/communities/chats/default.mspxhttp://www.microsoft.com/communities/chats/default.mspx http://www.microsoft.com/usa/webcasts/default.asphttp://www.microsoft.com/usa/webcasts/default.asp

List of newsgroupsList of newsgroupshttp://communities2.microsoft.com/http://communities2.microsoft.com/communities/newsgroups/en-us/default.aspxcommunities/newsgroups/en-us/default.aspx

MS Community SitesMS Community Siteshttp://www.microsoft.com/communities/default.mspxhttp://www.microsoft.com/communities/default.mspx

Sofia .NET User GroupSofia .NET User Grouphttp://www.sofiadev.org/http://www.sofiadev.org/

Community sitesCommunity siteshttp://www.microsoft.com/communities/related/default.mspxhttp://www.microsoft.com/communities/related/default.mspx

Page 25: Новости в.NET CLR 2.0 Светлин Наков Българска асоциация на разработчиците на софтуер

Q & A: We want your feedback!Q & A: We want your feedback!

Page 26: Новости в.NET CLR 2.0 Светлин Наков Българска асоциация на разработчиците на софтуер

© 2003 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only.© 2003 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only.MICROSOFT MAKES NO WARRANTIES, EXPRESS OR IMPLIED, IN THIS SUMMARY.MICROSOFT MAKES NO WARRANTIES, EXPRESS OR IMPLIED, IN THIS SUMMARY.