What’s new in MEF 2 Preview 5? [Alok, Nick]

Nearly two months since we published MEF 2 Preview 4, we have just posted our fifth preview on the MEF CodePlex site. The new preview has been shaped by your feedback; everyone who took the time to download, evaluate or comment on the last version, thank you! So, what has changed since Preview 4? CompositionException.RootCauses, previously…

8

Sharing with CompositionScopeDefinition in MEF 2 [Alok]

This post discusses features in the preview version of MEF, and some details may change between now and the full release. In the previous post, we introduced ExportFactory<T> and demonstrated how it can be used to control the lifetimes of MEF parts. In this article we will talk about a new type MEF called CompositionScopeDefinition…

3

ExportFactory<T> in MEF 2 [Alok]

This post discusses features in the preview version of MEF, and some details may change between now and the full release. In the first version of MEF there are only two notions of lifetime: A shared global lifetime or a per instance lifetime. In MEF 2 Preview 4 new support has been added to enable…

4

Using MEF 2 with ASP.NET MVC 3 [Nick]

This post discusses features in the preview version of MEF, and some details may change between now and the full release. The latest MEF preview includes a new assembly, System.ComponentModel.Composition.Web.Mvc.CodePlex.dll, that simplifies the task of building flexible, testable and maitainable ASP.NET MVC web applications. To achieve this it: provides dependency injection for Controller classes, defines…

5

Overriding part registration conventions with the MEF attributes [Nick]

This post discusses features in the preview version of MEF, and some details may change between now and the full release. One of the big advances made in the new MEF preview is a convention-driven programming model aimed at eliminating repetitive attribute usage. In this new model, the MEF attributes like Export and Import have…

0

Getting started with convention-based part registration in MEF 2 [Nick]

This post discusses features in the preview version of MEF, and some details may change between now and the full release. MEF ‘version 1’ uses attributes to describe how a type should be handled for composition purposes. [Export, PartCreationPolicy(CreationPolicy.NonShared)] public class HomeController : Controller { [ImportingConstructor] public HomeController(/* Dependencies here */) { … } public…

4

What’s new in MEF 2 Preview 4? [Alok, Nick]

The MEF team has been quietly at work for some time getting the finishing touches on another developer preview. You can download the new source and .NET 4.0-compatible binaries from the Codeplex site. This preview is another step towards the next supported release, which will be made as part of .NET 4.5. Highlights of the…

1

Porting existing .NET code to Metro style apps [Wes]

As many of you know at //build we announced that there will be a new .NET target framework for Metro style apps. To learn more about the goals of this new target framework I encourage you to watch Krzystzof Cwalina’s build talk “A .NET developer’s view of Windows 8 app development“. One of the things…

5

Memory Mapped File Quirks [Greg]

Memory mapped files are segments of virtual memory that are directly mapped to a physical file on disk, byte-by-byte. This technology has a number of benefits over traditional stream based I/O, such as performance during random access to large files, or the ability to share the mapped memory between different threads and processes. The .NET…

2

Aligning Numbers on the Decimal Separator [Ron Petrusha]

The composite formatting feature in the .NET Framework makes it easy to left-align or right-align a value in a fixed-width field. If the alignment component of a format item in a composite format string is negative, its corresponding argument is left-aligned. If the alignment component is positive, its corresponding argument is right-aligned. For instance, the…

3