œ¾´µ»¸ €¾³€°¼¼¸€¾²°½¸ ¸ »°‚„¾€¼° Microsoft .NET 4.0

  • View
    30

  • Download
    0

Embed Size (px)

DESCRIPTION

Модели программирования и платформа Microsoft .NET 4.0. Дмитрий Васюра. Microsoft Corporation. Руководитель разработки среды Visual Basic. Содержание. Зачем все это нужно ? Новое в CLR и Base Class Libraries (BCL) Parallel Task Library Динамическое программирование Code Contracts - PowerPoint PPT Presentation

Text of œ¾´µ»¸...

Microsoft .NET 4.0Microsoft Corporation

Visual Basichttp://msplatforma.ruMicrosoft 2010 ? CLR Base Class Libraries (BCL)Parallel Task Library Code ContractsManaged Extensibility Frameworkhttp://msplatforma.ruMicrosoft 2010 http://msplatforma.ruMicrosoft 2010 http://msplatforma.ruMicrosoft 2010 Visual BasicMicrosoft Corporation Development Lead-http://msplatforma.ruMicrosoft 2010 : Tuple Lazy System.NumericsBigInteger Complex Co Contra variance IEnumerable

http://msplatforma.ruMicrosoft 2010 : System.IOIEnumerable Directory DirectoryInfo MemoryMappedFiles Windows API-sCompression , > 4GBhttp://msplatforma.ruMicrosoft 2010 : System.Collections.Concurrent lock free, thread-safeIProducerConsumerCollection - ConcurrentQueueConcurrentSetConcurrentDictionary

System.Collections.GenericISet - SortedSet - HashSet - HashCode

http://msplatforma.ruMicrosoft 2010 Parallel Task Library multi-threaded http://msplatforma.ruMicrosoft 2010 ( Parallel)Parallel.ForParallel.ForEachLINQ/queryAsParallel

http://msplatforma.ruMicrosoft 2010 System.Threading.Tasks.Task Parallel.Invoke CancellationToken(Source) Barrier http://msplatforma.ruMicrosoft 2010 Calculator calc = GetCalculator();int sum = calc.Add(10, 20);object calc = GetCalculator();Type calcType = calc.GetType();object res = calcType.InvokeMember("Add", BindingFlags.InvokeMethod, null, new object[] { 10, 20 });int sum = Convert.ToInt32(res);ScriptObject calc = GetCalculator();object res = calc.Invoke("Add", 10, 20);int sum = Convert.ToInt32(res);dynamic calc = GetCalculator();int sum = calc.Add(10, 20); dymanic http://msplatforma.ruMicrosoft 2010 PythonBinderRubyBinderCOMBinderJavaScriptBinderObjectBinder

Dynamic Language RuntimeExpression TreesDynamic DispatchCall Site CachingIronPythonIronRubyC#VB.NET ..http://msplatforma.ruMicrosoft 2010 DLR .NET ( IronRuby, IronPython) ( VB, C#) http://msplatforma.ruMicrosoft 2010 CRASH !!!CRASH !!!CRASH !!!CRASH !!!CRASH !!!CRASH !!!http://msplatforma.ruMicrosoft 2010Code Contracts .NET 4.0 - - : ( ) http://msplatforma.ruMicrosoft 2010

Visual Basic

Microsoft Corporation

Code Contractshttp://msplatforma.ruMicrosoft 2010Code Contracts .NET Visual Studio 2010

http://msplatforma.ruMicrosoft 2010 ... ...http://msplatforma.ruMicrosoft 2010Managed Extensibility Framework .NET Framework http://msplatforma.ruMicrosoft 2010 ,

http://msplatforma.ruMicrosoft 2010 MEF MEF (Parts)... - (Export) - (Import) MEF (Compose)http://msplatforma.ruMicrosoft 2010 !Apublic class SimpleMortgageCalculator : IMortgageCalculator{public ILogger Logger { get; set; }

public float Calculate(){Logger.Log("Calculating Mortgage");

return ...;}}http://msplatforma.ruMicrosoft 2010A[Export(typeof(IMortgageCalculator))]public class SimpleMortgageCalculator : IMortgageCalculator{public ILogger Logger { get; set; }

public float Calculate(){Logger.Log("Calculating Mortgage");

return ...;}}http://msplatforma.ruMicrosoft 2010A[Export(typeof(IMortgageCalculator))]public class SimpleMortgageCalculator : IMortgageCalculator{[Import(typeof(ILogger))]public ILogger Logger { get; set; }

public float Calculate(){Logger.Log("Calculating Mortgage");

return ...;}}http://msplatforma.ruMicrosoft 2010 (Catalog) http://msplatforma.ruMicrosoft 2010 (Container) http://msplatforma.ruMicrosoft 2010

TypeCatalogAssemblyCatalogDirectoryCatalogAggregatingCataloghttp://msplatforma.ruMicrosoft 2010 Visual BasicMicrosoft Corporation Managed Extensibility Frameworkhttp://msplatforma.ruMicrosoft 2010A[Export(typeof(IMortgageCalculator))][ExportMetadata(Calculation, Simple)][ExportMetadata(Tax Aware, null)]public class SimpleMortgageCalculator : IMortgageCalculator{public ILogger Logger { get; set; }

public float Calculate(){Logger.Log("Calculating Mortgage");

return ...;}}http://msplatforma.ruMicrosoft 2010 A[Import(typeof(ILogger))]public ILogger Logger { get; set; }Bhttp://msplatforma.ruMicrosoft 2010 ALazy[Import(typeof(ILogger))]public ILogger Lazy Logger { get; set; }http://msplatforma.ruMicrosoft 2010 Visual BasicMicrosoft Corporation Managed Extensibility Frameworkhttp://msplatforma.ruMicrosoft 2010 ...A[Export(typeof(IMortgageCalculator))][ExportMetadata(Calculation, Simple)][ExportMetadata(Tax Aware, null)][ExportMetadata(This, foo)][ExportMetadata(That, bar)]http://msplatforma.ruMicrosoft 2010 ...Part A[Export(typeof(IMortgageCalculator))][ExportMetadata(Calculation, Simple)][ExportMetadata(Tax Aware, null)][ExportMetadata(This, foo)][ExportMetadata(That, bar)][Export(typeof(IMortgageCalculator))][CalcCapabilities(Mode=Complexity.Simple,TaxAware=true,This=foo,That=bar)]http://msplatforma.ruMicrosoft 2010 Visual BasicMicrosoft Corporation Managed Extensibility Frameworkhttp://msplatforma.ruMicrosoft 2010 A B B BSharedNon-Sharedhttp://msplatforma.ruMicrosoft 2010 Visual BasicMicrosoft Corporation Managed Extensibility Frameworkhttp://msplatforma.ruMicrosoft 2010 http://msplatforma.ruMicrosoft 2010 http://msplatforma.ruMicrosoft 2010 .NET Framework 4.0 Visual Studio 2010 ! Beta2 http://msplatforma.ruMicrosoft 2010 .NET Framework MSDN http://msdn.com/netframework Parallel Computing Developer Center http://msdn.com/concurrencyCode Contracts http://msdn.microsoft.com/en-us/devlabs/dd491992.aspxManaged Extensibility Framework http://www.codeplex.com/MEF http://msplatforma.ruMicrosoft 2010 Visual BasicDmitriy.Vasyura@microsoft.com http://msdn.com/netframework http://msplatforma.ruMicrosoft 2010