ASP.NET Core & .NET Core 1.0

OAuth2 Authentication


OData client libraries for .NET 4, Silverlight 4 and Windows Phone 7 – contains a Visual Studio 2010 solution with the source code for the OData .NET 4, Silverlight 4 and Windows Phone 7 Client library. To use, unzip the file locally and open the solution in Visual Studio 2010. – contains just the OData client assemblies and code generation tools for use on Windows Phone 7. – contains a sample Windows Phone 7 application which uses the OData client library for Windows Phone 7

Parallel Framework in Action



The #1 reason, IMHO, to look at .NET 4 is the parallelism. I say this not as a Microsoft Shill, but rather as a dude who owns a 6-core (12 with hyper-threading) processor. My most favorite app in the Training Kit is ContosoAutomotive. It’s a little WPF app that loads a few hundred thousand cars into a grid. There’s an interface, ICarQuery, that a bunch of plugins implement, and the app foreach’s over the CarQueries.

This snippet here uses the new System.Threading.Task stuff and makes a background task. That’s all one line there, from StartNew() all the way to the bottom. It says, "do this chunk in the background." and it’s a wonderfully natural and fluent interface. It also keeps your UI thread painting so your app doesn’t freeze up with that "curtain of not responding" that one sees all the time.

This code says "go do this in a background thread, and while you’re there, parallelize this as you like." This loop is "embarrassingly parallel." It’s a big for loop over 2 million cars in memory.


For more goto Scott Hanselman – The Weekly Source Code 56 – Visual Studio 2010 and .NET Framework 4 Training Kit – Code Contracts, Parallel Framework and COM Interop

Asynchronous Cancellation Patterns with .NET 4


For calling methods asynchronously, since .NET 1.0 the async pattern can be used. .NET 2.0 added the event-based async pattern (also known as async component pattern) that makes async calls easier with Windows applications. Before .NET 4 no standard mechanism has been available to cancel asynchronous method calls. That’s new with .NET 4.0.

In this blog series you can read about these async patterns as well as the new unified model for cancellation.

Part 1 of this series introduced the async patterns and introduced cancellation with the BackgroundWorker class as it existed since .NET 2. In part 2 of this series Christian will show how the new .NET 4 cancellation framework can be used.

Previously to .NET 4, cancellation with async method calls was implemented in different ways if it was supported at all. For example, the BackgroundWorker implements cooperative cancellation by invoking the CancelAsync method, the long-running method needs to verify if it should be canceled by checking the CancellationPending property and needs to cancel by setting the Cancel property of the DoWorkEventArgs. More about this in the previous blog entry.

.NET 4 now supports cooperative cancellation of async methods in a standard way. The heart of this new framework is the CancellationToken struct. The CancellationToken is created by a CancellationTokenSource. This token can then be passed to any activity that should be cancelled. In case of a cancellation, the async call can verify cancellation by checking the IsCancellationRequested property of the CancellationToken. This unified model is now available with several classes offering asynchronous requests.

Natural User Interface library


Blake.NUI is a new open-source library for multi-touch NUI (Natural User Interface) development.  It can be found at and is under a MS-PL license.

The library is still in undergoing changes but here are some of the things currently included in Blake.NUI:

  • Controls
    • ZoomCanvas – an infinite canvas control that is the heart of NaturalShow
    • CircleText – layout text along the circumference of a circle
  • Gestures
    • TapGestureTrigger – a configurable Blend Trigger that fires when the user completes a tap gesture
    • DoubleTapGestureTrigger – a configurable Blend Trigger that fires when the user completes a double tap gesture
  • TouchDevices
    • MouseTouchDevice – promotes mouse input to WPF 4 touch events
    • SurfaceTouchDevice – promotes Microsoft Surface vision system input to WPF 4 touch events
  • Common classes and utilities
    • DisplayMatrix
    • AnimateUtility and SurfaceAnimateUtility
    • ScatterMatrixHelper
    • MathUtility
    • VisualUtility
  • NaturalShow
    • Common models, views, factories, and other classes

Patterns for Parallel Programming with the .NET Framework


This document provides a detailed and in-depth tour of support in the Microsoft® .NET Framework 4 for parallel programming. This includes an examination of common parallel patterns and how they’re implemented without and with this new support in the .NET Framework, as well as covering best practices for developing parallel components utilizing parallel patterns.

This document was written by Stephen Toub from the Parallel Computing Platform team at Microsoft. It is based on the .NET Framework 4 and Visual Studio 2010. Two versions of the document are available, one with code samples in C# and one with code samples in Visual Basic.

Via Download details: Patterns for Parallel Programming with the .NET Framework