Browse by Tags
All Tags »
extension »
Composition (
RSS)
Immutable Collections Immutability is a pattern which is suit well parallel programming , but you have to be aware of a potential memory pressure risk when it's not implemented right or used wisely. this post will cover a new BCL library (still in its preview stage) which is targeting immutable collections . .NET is already having Concurrent implementation for Queue, Stack, Bug and Dictionary, which is thread-safe , but other type of collection like List is missing. another type of collection...
MEF 2.0 - mini series: Part 7 (Catalog filter and Deep hierarchic scoping) this is the 7th post in the MEF 2.0 mini series. you can see the following TOC for other posts in this series. in the previous post I was talking about composition scoping and lifetime management. on this one, I will extend the composition scoping topic toward hierarchic along with catalog filtering capability. hierarchic scoping is not trivial, you must understand the hierarchic behavior and what it was design for. MEF hierarchic...
MEF 2.0 - mini series: part 6 (Composition scoping and lifetime management) this is the 6th post in the MEF 2.0 mini series. you can see the following TOC for other posts in this series. in this post I will cover a new concept of scoping and part lifetime management , which is a great improvement over MEF 1. MEF 1 was coming with a fairly naïve lifetime management . part's lifetime could be either shared or non-shared ( you could also apply 'any' but eventually 'any' will be created...
MEF 2.0 - mini series: part 5 (Fluent export properties) this is the 5th post in the MEF 2.0 mini series. you can see the following TOC for other posts in this series. in this post I will cover the fluent property's export . Exporting properties is a less known feature of MEF . MEF 1 was supporting this feature by using the attribute model. you could decorate a property with a [Export] attribute and then it become available for imports. the following code demonstrate property exporting in MEF...
MEF 2.0 TOC MEF 2.0 is a reflection of a community requests. features like Open Generics , fluent and conventional discovery , lifetime handling of the part , better exception handling and more, was all requested by the community. part 1: Open Generics Part 2: Fluent and Conventional Export Part 3: Fluent import constructor Part 4: Fluent import Part 5: Fluent export properties. Part 6: Composition scoping and lifetime management Part 7: Catalog filter and Deep hierarchic scoping. Part 8: Composition...
SDP - MEF (Real-Life patterns) On the last day of the SDP at Crown Plaza Hotel, Tel Aviv. I was lecturing about Real-Life scenario of MEF failures . the lecture was focusing on diagnostic , solutions and testing . I want to thanks all attendant's, It was the after lunch session and you were bravely kept your eyes open. the presentation pdf can be found here . you can use the following check-list as recommended diagnostic process . Diagnostic Check-List Is the instance included...
Exporting non Exportable types this post extend Glenn Block 's post about " Poco, Mef, and custom type systems. Are you ready to take the red pill?" the post is adding a compile time attribute export model , Directory catalog and migrate Glenn code to VS 2010 . It is very recommended to read Glenn Block 's post before reading this one. the code sample for this post can be download from here . Summarizing Glenn's post in general Glenn show how to add attributes...
MEF for Beginner (Deployment Catalog) - part 12 this is the 12th post of the MEF for Beginner series, the series TOC is available here . this post will focus on Deployment Catalog . the code sample for this post can be found here . What is MEF Deployment Catalogs? the deployment catalog is actually a redesign of the older package catalog . it enable to load parts from xap packages a-synchronically. Code sample the following code sample depend on 2 assembly that...
MEF for Beginner (Import from Xaml) - part 11 this is the 11th post of the MEF for Beginner series, the series TOC is available here . this post will focus on Importing mef parts directly from the Xaml . the code sample for this post is available here . assuming that we have the following exports : Code Snippet class DemoStrings { [ Export ( "MyTag" )] public string Text1 { get { return "Hello world" ; } } ...
MEF Preview 9 was released MEF preview 9 changes will be reflected the in the release of .NET 4.0 and Silverlight 4.0 . except from bug fixing, there was some changes to the API , most of the changes is related to System.ComponentModel.Composition.Initilization.dll , which is not yet available only for none Silverlight application :-( here is a short list of API changes: PackageCatalog were brought back, and changed it name to DeploymentCatalog . PartCreator was...
MEF for Beginner (repeatable metadata) - part 9 this is the 9th post of the MEF for Beginner series, the series TOC is available here . this post will focus on having repeatable metadata definition (cases like definition of multiple categories). if you not familiar with the MEF metadata concept you may want to read part 8 . Bad practice for repeatable metadata In order to explain repeatable metadata , we will start by decorating export with untyped metadata declaration ( which consider as...
MEF for beginner is a blog series for developers that want to learn How To use the MEF (Manage Extensibility Framework) technology. the following post is currently available for this series: Concept How To build your first MEF application Hello Silverlight A-sync Silverlight loading Import Part Creation policy Recomposition policy Metadata (part 1) Metadata (part 2 – repeatable) Catalogs Import from Xaml Deployment Catalog תגים של Technorati: MEF...
This post is the first of short series which will cover the task of creating simple Rule Engine using MEF technology. from technical perspective the series will talk about the following techniques: Filtering MEF results using custom catalog Exporting both classes and methods Using metadata the post code is available for download here Prerequisite this post assume basic understanding of the MEF technology (for MEF introduction read this post) Part 1 part 1 will focus on filtering MEF results...