Mock Location APIs from my Mix10 Talk

I posted the code from my Mix talk here, which includes the mock location code, but I never used the word "location" in that post so search engines don't find it.

Location location location.

We got that location!

Got location? You know we do!

Note that this mock isn't complete – it really only has enough functionality to complete my demos, but it's not hard to add more. It's very easy to add new methods with the right signatures though:

 

  1. Write code against the System.Device.Location types
  2. Switch namespaces to MixDemoHelpers and build
  3. If you get build errors due to missing methods / properties:
    1. Change back to the System.Device.Location types
    2. Put the cursor on the type in question (eg, GeoCoordinateWatcher) and hit F12; this will bring up a skeleton definition of the type
    3. Copy the missing method's prototype into the MixDemoHelpers code
    4. Write whatever you think makes sense

Hopefully I'll update the mock to be more complete in the near future, but for now it is what it is.

To download the ZIP file with the location code directly, click here.