Sunday, June 10, 2012

LocationServices for Windows Phone updates

Things change fast at times, and today is such a time.

  • Eniro has entered the arena as a datasource
  • ServiceLayers are completely removed
  • Caching is updated
  • Models are now partial classes
  • Reverted to using RestSharp 102.7 (including added JSON.NET again)

More posts on this will follow, but for now the biggest change is the move from ServiceLayers to actually executing the criteria itself by attaching .Execute()

            var rxbing = new Usoniandream.WindowsPhone.LocationServices.SearchCriterias.Bing.Translation(
                "sv", 
                "en", 
                "en-US", 
                "badplatser", 
                "parklek", 
                "samhälle")
                .Execute()
                .Take(20)
                .ObserveOnDispatcher()
                .Finally(() =>
                {
                    PivotItems.Add(bing);
                    IsDataLoading = false;
                })
                .Subscribe(
                // result
                    x =>
                    {
                        bing.Items.Add(x);
                    },
                // exception
                    ex =>
                    {
                        MessageBox.Show(ex.Message);
                    });

full source code, sample app and binaries: http://peterdrougge.github.com/Usoniandream.WIndowsPhone.LocationServices/