Tag Archives: MicroLinq

MicroLinq NotifyingCollection Published

I’ve been pondering if/how to implement an Observable Collection type class in the MicroLinq project for NETMF. Tonight I finally set about doing it.

I started with the ValueTypeArrayList class, removed the type restriction and switched storage to just plain old object[]. I took a look at the current ObservableCollection in the full framework and set about deciding what was a must-have and what could be tossed away to save memory and footprint.

It was obvious the CollectionChanged event was necessary but I threw away the PropertyChanged event. It just didn’t seem to provide anything useful in this case. So, concentrating just on the CollectionChanged event, I looked at the EventArgs and saw a lot of code which basically provides a read-only copy of the old and/or new collection (before the modification and after) depending on the change type. I cut this first because I just couldn’t justify the memory usage.

That left only the Action type of which there are 5 in the full framework. Only 3 could ever be reported from my implementation so I cut the other two leaving just Add, Remove and Reset. I kept the class and interface names the same as the full framework in case there’s ever a native implementation. It should be trivial to port code that makes use of NotifyingCollection now this way.

Continue reading


New MicroLinq Build! Is it Release Candidate yet?

I just published another release of the MicroLinq project tonight. It contains a number of fixes, enhancements and some new stuff!

No changes in this release.

-Modified some overloads to use less code by relying on the full version classes.
-New OrderBy implementation. Doesn’t modify source and only iterates source once to copy the values. Uses MergeSort now.

-Removed project dependency on MicroLinq which wasn’t needed.
-Fixed bug that could have passed the wrong object to the action delegate while enumerating.
-Removed Countdown and Countup classes and replaced with in-place ManualResetEvent.
-Added optional timeout parameter to specify how long to wait. The success/failure is still not bubbled up though.
-Library is a bit smaller now.

-New project. Provides commonly-used delegates for Aggregate and Compare delegates. Could be expanded if others suggest helpful versions. Inspired by comments from Corey Kosak.
-Builds to its own library to conserve program space if not wanted/used in a project.

First Accolade for MicroLinq




New MicroLinq Build Released Today

I just posted a new MicroLinq build. I’d like to call it a release candidate but I haven’t put in enough testing or gotten enough response on the project yet. I did get a thorough review from Corey Kosak on the Netduino Forums and I’ve implemented most of his recommendations.

This release features significant performance increases in the OrderBy extension by switching from bubble sort to quick sort. In addition there is an extra overload which allows a Comparer delegate to be passed. This will perform much better when the objects to be compared are not marked as IComparable. Objects which have no public way to compare can also be sorted by passing in a Comparer delegate.

The NearlyGenericArrayList and ParallelForEach remain in their own projects in the solution and build to their own libraries. These are more for my own experimentation that I don’t mind others seeing than to be seriously considered. The NGAL might disappear altogether now that the OrderBy extension is implemented and became more versatile than having a specific Sort method.

Overall this build should be the most efficient and stable version released. I use it in its current form tinkering around on my Netduino board.

Please check it out if you’re doing any .NET Micro Framework projects and let me know how it’s performing!


Mine Prosjekter

Jeg får sjelden tid og mulighet til å annonsere mine prosjekter og informasjon på forskjellige språk. Å være en stor fan av Norge med har begrenset forståelse av språket, bestemte jeg meg for å gjøre et forsøk på å rette opp dette starter med Norsk.

Først har jeg to CodePlex prosjekter jeg startet og vedlikeholde. MicroLinq er en implementering av LINQ på .NET Micro Framework. Prosjektet er bare to dager gammel, men jeg har noen dokumentasjon på bruken. Jeg bruker et Netduino microcontroller fra Secret Labs for min utvikling og testing.

Jeg har også Media Streaming MVC. Dette prosjektet bringer Delvis Response og HTTP Byte Range forespørsel håndtering til dynamiske ressurser ved hjelp ASP.NET MVC. Dette prosjektet legger ActionResult typer som vil presentere video som kan streames på Apple iOS baserte enheter.

En av mitt arbeid elementer er å starte pa instruksjonene for bruk i forskjellige språk. Jeg vet de fleste norske høyttalere veldig dyktige i engelsk. Ville det være nyttig å ha (dårlig oversatt) norsk språk dokumentasjon?

Ha det bra,

My Second CodePlex Project: MicroLinq

I decided to bite the bullet and just upload my source code to CodePlex. I created a new project called MicroLinq. Even if it does end up being a shell of a project, if at least 1 other person finds it useful then it was worth the effort.

The project is pretty sparse at the moment. I’ll add to the documentation as time goes on. For now you can browse the code through the web and most of the Linq extensions are commented. There’s also other code which might be interesting to browse.

I’ve created a release of the initial compiled code and put it in the downloads section. The ZIP file contains Debug and Release builds for the three projects in both Big Endian and Little Endian flavors.

The source files build against .NET Micro Framework 4.1 and the project format is Visual Studio 2010.

I would prefer comments, feedback and issues be posted directly to the CodePlex project and not in the blog. This way the information will be consolidated and easily viewable by anyone interested in the project.

I hope it’s useful!