6

Obsolete: This library was made for a decommissioned version of the API. Also, the source code is no longer available.

mobileexchange

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 DEAD LINK 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.

1
  • 3
    Awesome logo. Please, Jeff, let him keep it! Commented May 21, 2010 at 0:07

0

You must log in to answer this question.

Browse other questions tagged .