Monday, November 5, 2007

Itunes StreamReader

Preperation to take certifications can be quite boring, and Im about to take the ".NET Framework 2.0 Application Developement Foundation".

So I have made an ItunesStreamReader that I use to count the size of all my media files in a nice litle pie chart.

I have try to performance test it by take two itunes Files (3.9mb + 1+9mb = 5.8mb) merge and exstraced all the tracks and putted them into a DropdownList it took 845.1 milli seconds

A simple example of using the ItunesStreamReader could looks like this.

using(ItunesStreamReader its = new ItunesStreamReader ( new ItunesItem.items[] {, ItunesItem.items.trackNumber } ))
while(!its.EndOfStream()) { string name = its.ReadLine(); string number = its.ReadLine(); Console.WriteLine(string.Format("Name {0} Number {1} ", name, number));

If you want to play with it you can download it here.

Feedback and suggenstions would be great :o)

No comments:

Post a Comment