Take the 2-minute tour ×
Stack Apps is a question and answer site for apps, scripts, and development with the Stack Exchange API. It's 100% free, no registration required.

mobileexchange

(I will change this rip off logo if Jeff wants to)

About

Since the .NET Compact Framework is always lagging behind in terms of what is implemented, and what is not implemented, I made a .NET library for the Stack Exchange API specifically made for the .NET Compact Framework v3.5.

Code Snippet

The API is kept at its simplest form, with a unique static class entry point, returning results containing simple data types matching the JSON responses.

// Sync calls
TagsResult result = StackExchangeHelper.GetPopularTags( page );

foreach( Tag tag in result.Tags )
{
  //...
}

// Async calls
StackExchangeHelper.GetStatsAsync( 
  new ResultCallback<StatsResult>( this.OnGetStatsCompleted ), 
  null );

private void OnGetStatsCompleted( StatsResult result, object state )
{
  foreach( Tag tag in result.Tags )
  {
    //...
  }
}

As you can see, the async pattern does not use IAsyncResult return values. Since mobile devices should avoid many concurrent requests, the abort system is centralized.

ServiceHelper.AbortAll();

License

The license is MS-PL.

Download

The sources are available on CodePlex. There is no official release for the moment.

Platform

Though this library should work on any .NET Framework, it specifically targets .NET Compact Framework 3.5. Let's call this a new library for a legacy framework. :)

Contact

You can reach me on Twitter at @martinplante.

Code

This library is made in C#, using .NET CF 3.5, the excellent JSON.NET library, and a closed-source control library made for slimCODE products.

share|improve this question
3  
Awesome logo. Please, Jeff, let him keep it! –  Nathan Osman May 21 '10 at 0:07

You must log in to answer this question.

Browse other questions tagged .