Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Initial Commit

  • Loading branch information...
commit 593ec88d14449644f674a225cc3827d5dc36b9dc 0 parents
@Redth authored
Showing with 19,304 additions and 0 deletions.
  1. +22 −0 .gitattributes
  2. +29 −0 .gitignore
  3. +192 −0 Azure/Microsoft.Azure.Zumo.Android/Core/IMobileServiceTable.Generic.cs
  4. +77 −0 Azure/Microsoft.Azure.Zumo.Android/Core/MobileServiceApplication.cs
  5. +142 −0 Azure/Microsoft.Azure.Zumo.Android/Core/MobileServiceClient.Android.cs
  6. +91 −0 Azure/Microsoft.Azure.Zumo.Android/Core/MobileServiceClient.Managed.cs
  7. +403 −0 Azure/Microsoft.Azure.Zumo.Android/Core/MobileServiceClient.cs
  8. +478 −0 Azure/Microsoft.Azure.Zumo.Android/Core/MobileServiceTable.Generic.cs
  9. +266 −0 Azure/Microsoft.Azure.Zumo.Android/Core/MobileServiceTable.cs
  10. +208 −0 Azure/Microsoft.Azure.Zumo.Android/Microsoft.Azure.Zumo.Android.csproj
  11. +20 −0 Azure/Microsoft.Azure.Zumo.Android/Microsoft.Azure.Zumo.Android.sln
  12. +29 −0 Azure/Microsoft.Azure.Zumo.Android/Properties/AssemblyInfo.cs
  13. +113 −0 Azure/Microsoft.Azure.Zumo.Android/ServiceFilter/ComposedServiceFilter.cs
  14. +53 −0 Azure/Microsoft.Azure.Zumo.Android/ServiceFilter/IServiceFilter.cs
  15. +29 −0 Azure/Microsoft.Azure.Zumo.Android/ServiceFilter/IServiceFilterContinuation.cs
  16. +73 −0 Azure/Microsoft.Azure.Zumo.Android/ServiceFilter/IServiceFilterRequest.cs
  17. +51 −0 Azure/Microsoft.Azure.Zumo.Android/ServiceFilter/ServiceFilter.cs
  18. +152 −0 Azure/Microsoft.Azure.Zumo.Android/ServiceFilter/ServiceFilterRequest.cs
  19. +313 −0 Azure/Microsoft.Azure.Zumo.Android/Table/Query/MobileServiceTableQuery.cs
  20. +129 −0 Azure/Microsoft.Azure.Zumo.Android/Table/Serialization/SerializableMember.cs
  21. +289 −0 Azure/Microsoft.Azure.Zumo.Android/Table/Serialization/SerializableType.cs
  22. +566 −0 Azure/Microsoft.Azure.Zumo.Android/TypeExtensions.cs
  23. +14 −0 Azure/Microsoft.Azure.Zumo.Android/Windows.Data.Json/IJsonValue.cs
  24. +129 −0 Azure/Microsoft.Azure.Zumo.Android/Windows.Data.Json/JsonArray.cs
  25. +11 −0 Azure/Microsoft.Azure.Zumo.Android/Windows.Data.Json/JsonErrorStatus.cs
  26. +180 −0 Azure/Microsoft.Azure.Zumo.Android/Windows.Data.Json/JsonObject.cs
  27. +111 −0 Azure/Microsoft.Azure.Zumo.Android/Windows.Data.Json/JsonValue.cs
  28. +12 −0 Azure/Microsoft.Azure.Zumo.Android/Windows.Data.Json/JsonValueType.cs
  29. +46 −0 Azure/Microsoft.Azure.Zumo.Android/Windows.Data.Json/WrappedJsonExtensions.cs
  30. +69 −0 Azure/Microsoft.Azure.Zumo.iOS/Core/MobileServiceApplication.cs
  31. +233 −0 Azure/Microsoft.Azure.Zumo.iOS/Core/MobileServiceClient.iOS.cs
  32. +259 −0 Azure/Microsoft.Azure.Zumo.iOS/ExpressionVisitor.cs
  33. +270 −0 Azure/Microsoft.Azure.Zumo.iOS/Microsoft.Azure.Zumo.iOS.csproj
  34. +4 −0 Azure/Microsoft.Azure.Zumo.iOS/Properties/AssemblyInfo.cs
  35. +30 −0 Azure/Xamarin.Auth.Android/ActivityEx.cs
  36. +38 −0 Azure/Xamarin.Auth.Android/ActivityStateRepository.cs
  37. +158 −0 Azure/Xamarin.Auth.Android/AndroidAccountStore.cs
  38. +243 −0 Azure/Xamarin.Auth.Android/FormAuthenticatorActivity.cs
  39. +169 −0 Azure/Xamarin.Auth.Android/WebAuthenticatorActivity.cs
  40. +103 −0 Azure/Xamarin.Auth.Android/Xamarin.Auth.Android.csproj
  41. +20 −0 Azure/Xamarin.Auth.Android/Xamarin.Auth.Android.sln
  42. +57 −0 Azure/Xamarin.Auth.iOS/ACAccountWrapper.cs
  43. +267 −0 Azure/Xamarin.Auth.iOS/FormAuthenticatorController.cs
  44. +98 −0 Azure/Xamarin.Auth.iOS/KeyChainAccountStore.cs
  45. +48 −0 Azure/Xamarin.Auth.iOS/ProgressLabel.cs
  46. +49 −0 Azure/Xamarin.Auth.iOS/UIViewControllerEx.cs
  47. +229 −0 Azure/Xamarin.Auth.iOS/WebAuthenticatorController.cs
  48. +103 −0 Azure/Xamarin.Auth.iOS/Xamarin.Auth.iOS.csproj
  49. +20 −0 Azure/Xamarin.Auth.iOS/Xamarin.Auth.iOS.sln
  50. +203 −0 Azure/Xamarin.Auth/Account.cs
  51. +82 −0 Azure/Xamarin.Auth/AccountStore.cs
  52. +42 −0 Azure/Xamarin.Auth/AssemblyInfo.cs
  53. +64 −0 Azure/Xamarin.Auth/AuthException.cs
  54. +278 −0 Azure/Xamarin.Auth/Authenticator.cs
  55. +32 −0 Azure/Xamarin.Auth/ExceptionEx.cs
  56. +249 −0 Azure/Xamarin.Auth/FormAuthenticator.cs
  57. +229 −0 Azure/Xamarin.Auth/OAuth1.cs
  58. +206 −0 Azure/Xamarin.Auth/OAuth1Authenticator.cs
  59. +110 −0 Azure/Xamarin.Auth/OAuth1Request.cs
  60. +352 −0 Azure/Xamarin.Auth/OAuth2Authenticator.cs
  61. +116 −0 Azure/Xamarin.Auth/OAuth2Request.cs
  62. +352 −0 Azure/Xamarin.Auth/Request.cs
  63. +153 −0 Azure/Xamarin.Auth/Response.cs
  64. +127 −0 Azure/Xamarin.Auth/WebAuthenticator.cs
  65. +146 −0 Azure/Xamarin.Auth/WebEx.cs
  66. +148 −0 Azure/Xamarin.Auth/WebRedirectAuthenticator.cs
  67. +59 −0 Azure/Xamarin.Auth/Xamarin.Auth.csproj
  68. +83 −0 README.md
  69. BIN  References/MonoForAndroid/Cirrious.MvvmCross.Binding.Android.dll
  70. BIN  References/MonoForAndroid/Cirrious.MvvmCross.Binding.Android.pdb
  71. BIN  References/MonoForAndroid/Cirrious.MvvmCross.Binding.dll
  72. BIN  References/MonoForAndroid/Cirrious.MvvmCross.Binding.pdb
  73. BIN  References/MonoForAndroid/Cirrious.MvvmCross.Console.dll
  74. BIN  References/MonoForAndroid/Cirrious.MvvmCross.Console.pdb
  75. BIN  References/MonoForAndroid/Cirrious.MvvmCross.Droid.Maps.dll
  76. BIN  References/MonoForAndroid/Cirrious.MvvmCross.Droid.Maps.dll.mdb
  77. BIN  References/MonoForAndroid/Cirrious.MvvmCross.Droid.Maps.pdb
  78. BIN  References/MonoForAndroid/Cirrious.MvvmCross.Droid.dll
  79. BIN  References/MonoForAndroid/Cirrious.MvvmCross.Droid.pdb
  80. BIN  References/MonoForAndroid/Cirrious.MvvmCross.Localization.dll
  81. BIN  References/MonoForAndroid/Cirrious.MvvmCross.Localization.pdb
  82. BIN  References/MonoForAndroid/Cirrious.MvvmCross.OpenNetCfIoC.dll
  83. BIN  References/MonoForAndroid/Cirrious.MvvmCross.OpenNetCfIoC.pdb
  84. BIN  References/MonoForAndroid/Cirrious.MvvmCross.Plugins.Bookmarks.dll
  85. BIN  References/MonoForAndroid/Cirrious.MvvmCross.Plugins.Bookmarks.pdb
  86. BIN  References/MonoForAndroid/Cirrious.MvvmCross.Plugins.Color.Droid.dll
  87. BIN  References/MonoForAndroid/Cirrious.MvvmCross.Plugins.Color.Droid.dll.mdb
  88. BIN  References/MonoForAndroid/Cirrious.MvvmCross.Plugins.Color.Droid.pdb
  89. BIN  References/MonoForAndroid/Cirrious.MvvmCross.Plugins.Color.dll
  90. BIN  References/MonoForAndroid/Cirrious.MvvmCross.Plugins.Color.pdb
  91. BIN  References/MonoForAndroid/Cirrious.MvvmCross.Plugins.DownloadCache.Droid.dll
  92. BIN  References/MonoForAndroid/Cirrious.MvvmCross.Plugins.DownloadCache.Droid.dll.mdb
  93. BIN  References/MonoForAndroid/Cirrious.MvvmCross.Plugins.DownloadCache.Droid.pdb
  94. BIN  References/MonoForAndroid/Cirrious.MvvmCross.Plugins.DownloadCache.dll
  95. BIN  References/MonoForAndroid/Cirrious.MvvmCross.Plugins.DownloadCache.pdb
  96. BIN  References/MonoForAndroid/Cirrious.MvvmCross.Plugins.Email.Droid.dll
  97. BIN  References/MonoForAndroid/Cirrious.MvvmCross.Plugins.Email.Droid.dll.mdb
  98. BIN  References/MonoForAndroid/Cirrious.MvvmCross.Plugins.Email.Droid.pdb
  99. BIN  References/MonoForAndroid/Cirrious.MvvmCross.Plugins.Email.dll
  100. BIN  References/MonoForAndroid/Cirrious.MvvmCross.Plugins.Email.pdb
  101. BIN  References/MonoForAndroid/Cirrious.MvvmCross.Plugins.File.Droid.dll
  102. BIN  References/MonoForAndroid/Cirrious.MvvmCross.Plugins.File.Droid.dll.mdb
  103. BIN  References/MonoForAndroid/Cirrious.MvvmCross.Plugins.File.Droid.pdb
  104. BIN  References/MonoForAndroid/Cirrious.MvvmCross.Plugins.File.dll
  105. BIN  References/MonoForAndroid/Cirrious.MvvmCross.Plugins.File.pdb
  106. BIN  References/MonoForAndroid/Cirrious.MvvmCross.Plugins.Json.dll
  107. BIN  References/MonoForAndroid/Cirrious.MvvmCross.Plugins.Json.pdb
  108. BIN  References/MonoForAndroid/Cirrious.MvvmCross.Plugins.JsonLocalisation.dll
  109. BIN  References/MonoForAndroid/Cirrious.MvvmCross.Plugins.JsonLocalisation.pdb
  110. BIN  References/MonoForAndroid/Cirrious.MvvmCross.Plugins.Location.Droid.dll
  111. BIN  References/MonoForAndroid/Cirrious.MvvmCross.Plugins.Location.Droid.dll.mdb
  112. BIN  References/MonoForAndroid/Cirrious.MvvmCross.Plugins.Location.Droid.pdb
  113. BIN  References/MonoForAndroid/Cirrious.MvvmCross.Plugins.Location.dll
  114. BIN  References/MonoForAndroid/Cirrious.MvvmCross.Plugins.Location.pdb
  115. BIN  References/MonoForAndroid/Cirrious.MvvmCross.Plugins.PhoneCall.Droid.dll
  116. BIN  References/MonoForAndroid/Cirrious.MvvmCross.Plugins.PhoneCall.Droid.dll.mdb
  117. BIN  References/MonoForAndroid/Cirrious.MvvmCross.Plugins.PhoneCall.Droid.pdb
  118. BIN  References/MonoForAndroid/Cirrious.MvvmCross.Plugins.PhoneCall.dll
  119. BIN  References/MonoForAndroid/Cirrious.MvvmCross.Plugins.PhoneCall.pdb
  120. BIN  References/MonoForAndroid/Cirrious.MvvmCross.Plugins.PictureChooser.Droid.dll
  121. BIN  References/MonoForAndroid/Cirrious.MvvmCross.Plugins.PictureChooser.Droid.dll.mdb
  122. BIN  References/MonoForAndroid/Cirrious.MvvmCross.Plugins.PictureChooser.Droid.pdb
  123. BIN  References/MonoForAndroid/Cirrious.MvvmCross.Plugins.PictureChooser.dll
  124. BIN  References/MonoForAndroid/Cirrious.MvvmCross.Plugins.PictureChooser.pdb
  125. BIN  References/MonoForAndroid/Cirrious.MvvmCross.Plugins.ResourceLoader.Droid.dll
  126. BIN  References/MonoForAndroid/Cirrious.MvvmCross.Plugins.ResourceLoader.Droid.dll.mdb
  127. BIN  References/MonoForAndroid/Cirrious.MvvmCross.Plugins.ResourceLoader.Droid.pdb
  128. BIN  References/MonoForAndroid/Cirrious.MvvmCross.Plugins.ResourceLoader.dll
  129. BIN  References/MonoForAndroid/Cirrious.MvvmCross.Plugins.ResourceLoader.pdb
  130. BIN  References/MonoForAndroid/Cirrious.MvvmCross.Plugins.Share.Droid.dll
  131. BIN  References/MonoForAndroid/Cirrious.MvvmCross.Plugins.Share.Droid.dll.mdb
  132. BIN  References/MonoForAndroid/Cirrious.MvvmCross.Plugins.Share.Droid.pdb
  133. BIN  References/MonoForAndroid/Cirrious.MvvmCross.Plugins.Share.dll
  134. BIN  References/MonoForAndroid/Cirrious.MvvmCross.Plugins.Share.pdb
  135. BIN  References/MonoForAndroid/Cirrious.MvvmCross.Plugins.SoundEffects.dll
  136. BIN  References/MonoForAndroid/Cirrious.MvvmCross.Plugins.SoundEffects.pdb
  137. BIN  References/MonoForAndroid/Cirrious.MvvmCross.Plugins.Sqlite.Droid.dll
  138. BIN  References/MonoForAndroid/Cirrious.MvvmCross.Plugins.Sqlite.Droid.dll.mdb
  139. BIN  References/MonoForAndroid/Cirrious.MvvmCross.Plugins.Sqlite.Droid.pdb
  140. BIN  References/MonoForAndroid/Cirrious.MvvmCross.Plugins.Sqlite.dll
  141. BIN  References/MonoForAndroid/Cirrious.MvvmCross.Plugins.Sqlite.pdb
  142. BIN  References/MonoForAndroid/Cirrious.MvvmCross.Plugins.ThreadUtils.Droid.dll
  143. BIN  References/MonoForAndroid/Cirrious.MvvmCross.Plugins.ThreadUtils.Droid.dll.mdb
  144. BIN  References/MonoForAndroid/Cirrious.MvvmCross.Plugins.ThreadUtils.Droid.pdb
  145. BIN  References/MonoForAndroid/Cirrious.MvvmCross.Plugins.ThreadUtils.dll
  146. BIN  References/MonoForAndroid/Cirrious.MvvmCross.Plugins.ThreadUtils.pdb
  147. BIN  References/MonoForAndroid/Cirrious.MvvmCross.Plugins.Visibility.Console.dll
  148. BIN  References/MonoForAndroid/Cirrious.MvvmCross.Plugins.Visibility.Console.pdb
  149. BIN  References/MonoForAndroid/Cirrious.MvvmCross.Plugins.Visibility.Droid.dll
  150. BIN  References/MonoForAndroid/Cirrious.MvvmCross.Plugins.Visibility.Droid.dll.mdb
  151. BIN  References/MonoForAndroid/Cirrious.MvvmCross.Plugins.Visibility.Droid.pdb
  152. BIN  References/MonoForAndroid/Cirrious.MvvmCross.Plugins.Visibility.dll
  153. BIN  References/MonoForAndroid/Cirrious.MvvmCross.Plugins.Visibility.pdb
  154. BIN  References/MonoForAndroid/Cirrious.MvvmCross.Plugins.WebBrowser.Droid.dll
  155. BIN  References/MonoForAndroid/Cirrious.MvvmCross.Plugins.WebBrowser.Droid.dll.mdb
  156. BIN  References/MonoForAndroid/Cirrious.MvvmCross.Plugins.WebBrowser.Droid.pdb
  157. BIN  References/MonoForAndroid/Cirrious.MvvmCross.Plugins.WebBrowser.dll
  158. BIN  References/MonoForAndroid/Cirrious.MvvmCross.Plugins.WebBrowser.pdb
  159. BIN  References/MonoForAndroid/Cirrious.MvvmCross.dll
  160. BIN  References/MonoForAndroid/Cirrious.MvvmCross.pdb
  161. BIN  References/MonoForAndroid/Microsoft.WindowsAzure.MobileServices.Android.dll
  162. BIN  References/MonoForAndroid/Microsoft.WindowsAzure.MobileServices.Android.dll.mdb
  163. BIN  References/MonoForAndroid/Microsoft.WindowsAzure.MobileServices.Android.pdb
  164. BIN  References/MonoForAndroid/Newtonsoft.Json.dll
  165. BIN  References/MonoForAndroid/Newtonsoft.Json.pdb
  166. +6,668 −0 References/MonoForAndroid/Newtonsoft.Json.xml
  167. BIN  References/MonoForAndroid/System.Net.dll
  168. BIN  References/MonoForAndroid/System.Net.dll.mdb
  169. BIN  References/MonoForAndroid/System.Net.pdb
  170. BIN  References/MonoForAndroid/System.Windows.dll
  171. BIN  References/MonoForAndroid/System.Windows.dll.mdb
  172. BIN  References/MonoForAndroid/System.Windows.pdb
  173. BIN  References/MonoForAndroid/System.Xml.Serialization.dll
  174. BIN  References/MonoForAndroid/System.Xml.Serialization.pdb
  175. BIN  References/MonoForAndroid/Xamarin.Mobile.dll
  176. +1,455 −0 References/MonoForAndroid/Xamarin.Mobile.xml
  177. BIN  References/MonoForAndroid/ZXing.Net.Mobile.MonoForAndroid.dll
  178. BIN  References/MonoForAndroid/ZXing.Net.MonoForAndroid.dll
  179. BIN  References/MonoForAndroid/ZXing.Net.MonoForAndroid.dll.mdb
  180. BIN  References/MonoTouch/Cirrious.MvvmCross.AutoView.Touch.dll
  181. BIN  References/MonoTouch/Cirrious.MvvmCross.AutoView.Touch.dll.mdb
  182. BIN  References/MonoTouch/Cirrious.MvvmCross.AutoView.dll
  183. BIN  References/MonoTouch/Cirrious.MvvmCross.AutoView.dll.mdb
  184. BIN  References/MonoTouch/Cirrious.MvvmCross.Binding.Touch.dll
  185. BIN  References/MonoTouch/Cirrious.MvvmCross.Binding.Touch.dll.mdb
  186. BIN  References/MonoTouch/Cirrious.MvvmCross.Binding.dll
  187. BIN  References/MonoTouch/Cirrious.MvvmCross.Binding.dll.mdb
  188. BIN  References/MonoTouch/Cirrious.MvvmCross.Console.dll
  189. BIN  References/MonoTouch/Cirrious.MvvmCross.Console.dll.mdb
  190. BIN  References/MonoTouch/Cirrious.MvvmCross.Dialog.Touch.dll
  191. BIN  References/MonoTouch/Cirrious.MvvmCross.Dialog.Touch.dll.mdb
  192. BIN  References/MonoTouch/Cirrious.MvvmCross.Localization.dll
  193. BIN  References/MonoTouch/Cirrious.MvvmCross.Localization.dll.mdb
  194. BIN  References/MonoTouch/Cirrious.MvvmCross.OpenNetCfIoC.dll
  195. BIN  References/MonoTouch/Cirrious.MvvmCross.OpenNetCfIoC.dll.mdb
  196. BIN  References/MonoTouch/Cirrious.MvvmCross.Plugin.Visibility.Touch.dll
  197. BIN  References/MonoTouch/Cirrious.MvvmCross.Plugin.Visibility.Touch.dll.mdb
  198. BIN  References/MonoTouch/Cirrious.MvvmCross.Plugins.Bookmarks.dll
  199. BIN  References/MonoTouch/Cirrious.MvvmCross.Plugins.Bookmarks.dll.mdb
  200. BIN  References/MonoTouch/Cirrious.MvvmCross.Plugins.Color.Touch.dll
  201. BIN  References/MonoTouch/Cirrious.MvvmCross.Plugins.Color.Touch.dll.mdb
  202. BIN  References/MonoTouch/Cirrious.MvvmCross.Plugins.Color.dll
  203. BIN  References/MonoTouch/Cirrious.MvvmCross.Plugins.Color.dll.mdb
  204. BIN  References/MonoTouch/Cirrious.MvvmCross.Plugins.DownloadCache.Touch.dll
  205. BIN  References/MonoTouch/Cirrious.MvvmCross.Plugins.DownloadCache.Touch.dll.mdb
  206. BIN  References/MonoTouch/Cirrious.MvvmCross.Plugins.DownloadCache.dll
  207. BIN  References/MonoTouch/Cirrious.MvvmCross.Plugins.DownloadCache.dll.mdb
  208. BIN  References/MonoTouch/Cirrious.MvvmCross.Plugins.Email.Touch.dll
  209. BIN  References/MonoTouch/Cirrious.MvvmCross.Plugins.Email.Touch.dll.mdb
  210. BIN  References/MonoTouch/Cirrious.MvvmCross.Plugins.Email.dll
  211. BIN  References/MonoTouch/Cirrious.MvvmCross.Plugins.Email.dll.mdb
  212. BIN  References/MonoTouch/Cirrious.MvvmCross.Plugins.File.Touch.dll
  213. BIN  References/MonoTouch/Cirrious.MvvmCross.Plugins.File.Touch.dll.mdb
  214. BIN  References/MonoTouch/Cirrious.MvvmCross.Plugins.File.dll
  215. BIN  References/MonoTouch/Cirrious.MvvmCross.Plugins.File.dll.mdb
  216. BIN  References/MonoTouch/Cirrious.MvvmCross.Plugins.Json.dll
  217. BIN  References/MonoTouch/Cirrious.MvvmCross.Plugins.Json.dll.mdb
  218. BIN  References/MonoTouch/Cirrious.MvvmCross.Plugins.JsonLocalisation.dll
  219. BIN  References/MonoTouch/Cirrious.MvvmCross.Plugins.JsonLocalisation.dll.mdb
  220. BIN  References/MonoTouch/Cirrious.MvvmCross.Plugins.Location.Touch.dll
  221. BIN  References/MonoTouch/Cirrious.MvvmCross.Plugins.Location.Touch.dll.mdb
  222. BIN  References/MonoTouch/Cirrious.MvvmCross.Plugins.Location.dll
  223. BIN  References/MonoTouch/Cirrious.MvvmCross.Plugins.Location.dll.mdb
  224. BIN  References/MonoTouch/Cirrious.MvvmCross.Plugins.PhoneCall.Touch.dll
  225. BIN  References/MonoTouch/Cirrious.MvvmCross.Plugins.PhoneCall.Touch.dll.mdb
  226. BIN  References/MonoTouch/Cirrious.MvvmCross.Plugins.PhoneCall.dll
  227. BIN  References/MonoTouch/Cirrious.MvvmCross.Plugins.PhoneCall.dll.mdb
  228. BIN  References/MonoTouch/Cirrious.MvvmCross.Plugins.PictureChooser.Touch.dll
  229. BIN  References/MonoTouch/Cirrious.MvvmCross.Plugins.PictureChooser.Touch.dll.mdb
  230. BIN  References/MonoTouch/Cirrious.MvvmCross.Plugins.PictureChooser.dll
  231. BIN  References/MonoTouch/Cirrious.MvvmCross.Plugins.PictureChooser.dll.mdb
  232. BIN  References/MonoTouch/Cirrious.MvvmCross.Plugins.ResourceLoader.Touch.dll
  233. BIN  References/MonoTouch/Cirrious.MvvmCross.Plugins.ResourceLoader.Touch.dll.mdb
  234. BIN  References/MonoTouch/Cirrious.MvvmCross.Plugins.ResourceLoader.dll
  235. BIN  References/MonoTouch/Cirrious.MvvmCross.Plugins.ResourceLoader.dll.mdb
  236. BIN  References/MonoTouch/Cirrious.MvvmCross.Plugins.Share.Touch.dll
  237. BIN  References/MonoTouch/Cirrious.MvvmCross.Plugins.Share.Touch.dll.mdb
  238. BIN  References/MonoTouch/Cirrious.MvvmCross.Plugins.Share.dll
  239. BIN  References/MonoTouch/Cirrious.MvvmCross.Plugins.Share.dll.mdb
  240. BIN  References/MonoTouch/Cirrious.MvvmCross.Plugins.SoundEffects.dll
  241. BIN  References/MonoTouch/Cirrious.MvvmCross.Plugins.SoundEffects.dll.mdb
  242. BIN  References/MonoTouch/Cirrious.MvvmCross.Plugins.Sqlite.dll
  243. BIN  References/MonoTouch/Cirrious.MvvmCross.Plugins.Sqlite.dll.mdb
  244. BIN  References/MonoTouch/Cirrious.MvvmCross.Plugins.ThreadUtils.Touch.dll
  245. BIN  References/MonoTouch/Cirrious.MvvmCross.Plugins.ThreadUtils.Touch.dll.mdb
  246. BIN  References/MonoTouch/Cirrious.MvvmCross.Plugins.ThreadUtils.dll
  247. BIN  References/MonoTouch/Cirrious.MvvmCross.Plugins.ThreadUtils.dll.mdb
  248. BIN  References/MonoTouch/Cirrious.MvvmCross.Plugins.Visibility.dll
  249. BIN  References/MonoTouch/Cirrious.MvvmCross.Plugins.Visibility.dll.mdb
  250. BIN  References/MonoTouch/Cirrious.MvvmCross.Plugins.WebBrowser.Touch.dll
  251. BIN  References/MonoTouch/Cirrious.MvvmCross.Plugins.WebBrowser.Touch.dll.mdb
  252. BIN  References/MonoTouch/Cirrious.MvvmCross.Plugins.WebBrowser.dll
  253. BIN  References/MonoTouch/Cirrious.MvvmCross.Plugins.WebBrowser.dll.mdb
  254. BIN  References/MonoTouch/Cirrious.MvvmCross.Touch.dll
  255. BIN  References/MonoTouch/Cirrious.MvvmCross.Touch.dll.mdb
  256. BIN  References/MonoTouch/Cirrious.MvvmCross.dll
  257. BIN  References/MonoTouch/Cirrious.MvvmCross.dll.mdb
  258. BIN  References/MonoTouch/CrossUI.Core.dll
  259. BIN  References/MonoTouch/CrossUI.Core.dll.mdb
  260. BIN  References/MonoTouch/CrossUI.Touch.dll
  261. BIN  References/MonoTouch/CrossUI.Touch.dll.mdb
  262. BIN  References/MonoTouch/MicrosoftAzureZumoiOS.dll
  263. BIN  References/MonoTouch/Newtonsoft.Json.dll
  264. BIN  References/MonoTouch/System.Net.Touch.dll.mdb
  265. BIN  References/MonoTouch/System.Net.dll
  266. BIN  References/MonoTouch/System.Windows.dll
  267. BIN  References/MonoTouch/System.Windows.dll.mdb
  268. BIN  References/MonoTouch/Xamarin.Mobile.Patched.dll
  269. BIN  References/MonoTouch/Xamarin.Mobile.dll
  270. +1,455 −0 References/MonoTouch/Xamarin.Mobile.xml
  271. BIN  References/MonoTouch/ZXing.Net.Mobile.MonoTouch.dll
  272. BIN  References/MonoTouch/ZXing.Net.Mobile.MonoTouch.dll.mdb
  273. BIN  References/MonoTouch/ZXing.Net.MonoTouch.dll
  274. BIN  References/MonoTouch/ZXing.Net.MonoTouch.dll.mdb
  275. BIN  References/WindowsPhone8/Cirrious.MvvmCross.Binding.dll
  276. BIN  References/WindowsPhone8/Cirrious.MvvmCross.Binding.pdb
  277. BIN  References/WindowsPhone8/Cirrious.MvvmCross.Console.dll
  278. BIN  References/WindowsPhone8/Cirrious.MvvmCross.Console.pdb
  279. BIN  References/WindowsPhone8/Cirrious.MvvmCross.Localization.dll
  280. BIN  References/WindowsPhone8/Cirrious.MvvmCross.Localization.pdb
  281. BIN  References/WindowsPhone8/Cirrious.MvvmCross.OpenNetCfIoC.dll
  282. BIN  References/WindowsPhone8/Cirrious.MvvmCross.OpenNetCfIoC.pdb
  283. BIN  References/WindowsPhone8/Cirrious.MvvmCross.Plugins.Bookmarks.WindowsPhone.dll
  284. BIN  References/WindowsPhone8/Cirrious.MvvmCross.Plugins.Bookmarks.WindowsPhone.pdb
  285. BIN  References/WindowsPhone8/Cirrious.MvvmCross.Plugins.Bookmarks.dll
  286. BIN  References/WindowsPhone8/Cirrious.MvvmCross.Plugins.Bookmarks.pdb
  287. BIN  References/WindowsPhone8/Cirrious.MvvmCross.Plugins.Color.WindowsPhone.dll
  288. BIN  References/WindowsPhone8/Cirrious.MvvmCross.Plugins.Color.WindowsPhone.pdb
  289. BIN  References/WindowsPhone8/Cirrious.MvvmCross.Plugins.Color.dll
  290. BIN  References/WindowsPhone8/Cirrious.MvvmCross.Plugins.Color.pdb
  291. BIN  References/WindowsPhone8/Cirrious.MvvmCross.Plugins.DownloadCache.dll
  292. BIN  References/WindowsPhone8/Cirrious.MvvmCross.Plugins.DownloadCache.pdb
  293. BIN  References/WindowsPhone8/Cirrious.MvvmCross.Plugins.Email.WindowsPhone.dll
  294. BIN  References/WindowsPhone8/Cirrious.MvvmCross.Plugins.Email.WindowsPhone.pdb
  295. BIN  References/WindowsPhone8/Cirrious.MvvmCross.Plugins.Email.dll
  296. BIN  References/WindowsPhone8/Cirrious.MvvmCross.Plugins.Email.pdb
  297. BIN  References/WindowsPhone8/Cirrious.MvvmCross.Plugins.File.WindowsPhone.dll
  298. BIN  References/WindowsPhone8/Cirrious.MvvmCross.Plugins.File.WindowsPhone.pdb
  299. BIN  References/WindowsPhone8/Cirrious.MvvmCross.Plugins.File.dll
  300. BIN  References/WindowsPhone8/Cirrious.MvvmCross.Plugins.File.pdb
Sorry, we could not display the entire diff because too many files (529) changed.
22 .gitattributes
@@ -0,0 +1,22 @@
+# Auto detect text files and perform LF normalization
+* text=auto
+
+# Custom for Visual Studio
+*.cs diff=csharp
+*.sln merge=union
+*.csproj merge=union
+*.vbproj merge=union
+*.fsproj merge=union
+*.dbproj merge=union
+
+# Standard to msysgit
+*.doc diff=astextplain
+*.DOC diff=astextplain
+*.docx diff=astextplain
+*.DOCX diff=astextplain
+*.dot diff=astextplain
+*.DOT diff=astextplain
+*.pdf diff=astextplain
+*.PDF diff=astextplain
+*.rtf diff=astextplain
+*.RTF diff=astextplain
29 .gitignore
@@ -0,0 +1,29 @@
+# Build Folders (you can keep bin if you'd like, to store dlls and pdbs)
+bin
+[Bb]in
+obj
+[Oo]bj
+[Dd]ebug*/
+[Rr]elease*/
+
+*.unsuccessfulbuild
+*.pidb
+*.userprefs
+*.suo
+*.resharper
+*.svn
+*.csproj.user
+
+# mstest test results
+TestResults
+
+#NuGet
+packages/
+
+binaries/
+
+PublishProfiles/
+
+*.pptx
+
+Art/
192 Azure/Microsoft.Azure.Zumo.Android/Core/IMobileServiceTable.Generic.cs
@@ -0,0 +1,192 @@
+// ----------------------------------------------------------------------------
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// ----------------------------------------------------------------------------
+
+using System;
+using System.Collections.Generic;
+using System.Diagnostics.CodeAnalysis;
+using System.Linq.Expressions;
+using System.Threading.Tasks;
+using Windows.Data.Json;
+
+namespace Microsoft.WindowsAzure.MobileServices
+{
+ /// <summary>
+ /// Provides operations on a table for a Mobile Service.
+ /// </summary>
+ /// <typeparam name="T">
+ /// The type of elements in the table (which implies the table).
+ /// </typeparam>
+ public partial interface IMobileServiceTable<T> : IMobileServiceTable
+ {
+ /// <summary>
+ /// Get the elements of a table based using a query.
+ /// </summary>
+ /// <typeparam name="U">
+ /// The type of element returned by the query.
+ /// </typeparam>
+ /// <param name="query">The query to execute.</param>
+ /// <returns>Elements of the table.</returns>
+ [SuppressMessage("Microsoft.Naming", "CA1715:IdentifiersShouldHaveCorrectPrefix", MessageId = "T", Justification = "Part of the LINQ query pattern")]
+ [SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "U", Justification = "Part of the LINQ query pattern")]
+ [SuppressMessage("Microsoft.Design", "CA1006:DoNotNestGenericTypesInMemberSignatures", Justification = "Generic are not nested when used via async.")]
+ Task<IEnumerable<U>> ReadAsync<U>(MobileServiceTableQuery<U> query);
+
+ /// <summary>
+ /// Get the elements in a table.
+ /// </summary>
+ /// <returns>The elements in the table.</returns>
+ /// <remarks>
+ /// This call will not handle paging, etc., for you.
+ /// </remarks>
+ [SuppressMessage("Microsoft.Design", "CA1006:DoNotNestGenericTypesInMemberSignatures", Justification = "It does not appear nested when used via the async pattern.")]
+ Task<IEnumerable<T>> ReadAsync();
+
+ /// <summary>
+ /// Lookup an element from a table by its ID.
+ /// </summary>
+ /// <param name="id">The ID of the element.</param>
+ /// <returns>The desired element.</returns>
+ Task<T> LookupAsync(object id);
+
+ /// <summary>
+ /// Refresh the current instance with the latest values from the
+ /// table.
+ /// </summary>
+ /// <param name="instance">The instance to refresh.</param>
+ /// <returns>
+ /// A task that will complete when the refresh has finished.
+ /// </returns>
+ Task RefreshAsync(T instance);
+
+ /// <summary>
+ /// Insert a new instance into the table.
+ /// </summary>
+ /// <param name="instance">The instance to insert.</param>
+ /// <returns>
+ /// A task that will complete when the insertion has finished.
+ /// </returns>
+ Task InsertAsync(T instance);
+
+ /// <summary>
+ /// Updates an instance in the table.
+ /// </summary>
+ /// <param name="instance">The instance to update.</param>
+ /// <returns>
+ /// A task that will complete when the update has finished.
+ /// </returns>
+ Task UpdateAsync(T instance);
+
+ /// <summary>
+ /// Delete an instance from the table.
+ /// </summary>
+ /// <param name="instance">The instance to delete.</param>
+ /// <returns>
+ /// A task that will complete when the delete has finished.
+ /// </returns>
+ Task DeleteAsync(T instance);
+
+ /// <summary>
+ /// Creates a query by applying the specified filter predicate.
+ /// </summary>
+ /// <param name="predicate">The filter predicate.</param>
+ /// <returns>A query against the table.</returns>
+ [SuppressMessage("Microsoft.Design", "CA1006:DoNotNestGenericTypesInMemberSignatures", Justification = "Part of the LINQ query pattern.")]
+ MobileServiceTableQuery<T> Where(Expression<Func<T, bool>> predicate);
+
+ /// <summary>
+ /// Creates a query by applying the specified selection.
+ /// </summary>
+ /// <typeparam name="U">
+ /// Type representing the projected result of the query.
+ /// </typeparam>
+ /// <param name="selector">The selector function.</param>
+ /// <returns>A query against the table.</returns>
+ [SuppressMessage("Microsoft.Naming", "CA1715:IdentifiersShouldHaveCorrectPrefix", MessageId = "T", Justification = "Standard for LINQ")]
+ [SuppressMessage("Microsoft.Naming", "CA1716:IdentifiersShouldNotMatchKeywords", MessageId = "Select", Justification = "Part of the LINQ query pattern.")]
+ [SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "U", Justification = "Standard for LINQ")]
+ [SuppressMessage("Microsoft.Design", "CA1006:DoNotNestGenericTypesInMemberSignatures", Justification = "Part of the LINQ query pattern.")]
+ MobileServiceTableQuery<U> Select<U>(Expression<Func<T, U>> selector);
+
+ /// <summary>
+ /// Creates a query by applying the specified ascending order clause.
+ /// </summary>
+ /// <typeparam name="TKey">
+ /// The type of the member being ordered by.
+ /// </typeparam>
+ /// <param name="keySelector">
+ /// The expression selecting the member to order by.
+ /// </param>
+ /// <returns>A query against the table.</returns>
+ [SuppressMessage("Microsoft.Design", "CA1006:DoNotNestGenericTypesInMemberSignatures", Justification = "Part of the LINQ query pattern.")]
+ MobileServiceTableQuery<T> OrderBy<TKey>(Expression<Func<T, TKey>> keySelector);
+
+ /// <summary>
+ /// Creates a query by applying the specified descending order clause.
+ /// </summary>
+ /// <typeparam name="TKey">
+ /// The type of the member being ordered by.
+ /// </typeparam>
+ /// <param name="keySelector">
+ /// The expression selecting the member to order by.
+ /// </param>
+ /// <returns>A query against the table.</returns>
+ [SuppressMessage("Microsoft.Design", "CA1006:DoNotNestGenericTypesInMemberSignatures", Justification = "Part of the LINQ query pattern.")]
+ MobileServiceTableQuery<T> OrderByDescending<TKey>(Expression<Func<T, TKey>> keySelector);
+
+ /// <summary>
+ /// Creates a query by applying the specified ascending order clause.
+ /// </summary>
+ /// <typeparam name="TKey">
+ /// The type of the member being ordered by.
+ /// </typeparam>
+ /// <param name="keySelector">
+ /// The expression selecting the member to order by.
+ /// </param>
+ /// <returns>A query against the table.</returns>
+ [SuppressMessage("Microsoft.Design", "CA1006:DoNotNestGenericTypesInMemberSignatures", Justification = "Part of the LINQ query pattern.")]
+ MobileServiceTableQuery<T> ThenBy<TKey>(Expression<Func<T, TKey>> keySelector);
+
+ /// <summary>
+ /// Creates a query by applying the specified descending order clause.
+ /// </summary>
+ /// <typeparam name="TKey">
+ /// The type of the member being ordered by.
+ /// </typeparam>
+ /// <param name="keySelector">
+ /// The expression selecting the member to order by.
+ /// </param>
+ /// <returns>A query against the table.</returns>
+ [SuppressMessage("Microsoft.Design", "CA1006:DoNotNestGenericTypesInMemberSignatures", Justification = "Part of the LINQ query pattern.")]
+ MobileServiceTableQuery<T> ThenByDescending<TKey>(Expression<Func<T, TKey>> keySelector);
+
+ /// <summary>
+ /// Creates a query by applying the specified skip clause.
+ /// </summary>
+ /// <param name="count">The number to skip.</param>
+ /// <returns>A query against the table.</returns>
+ MobileServiceTableQuery<T> Skip(int count);
+
+ /// <summary>
+ /// Creates a query by applying the specified take clause.
+ /// </summary>
+ /// <param name="count">The number to take.</param>
+ /// <returns>A query against the table.</returns>
+ MobileServiceTableQuery<T> Take(int count);
+
+ /// <summary>
+ /// Gets the elements of the table asynchronously.
+ /// </summary>
+ /// <returns>The table elements results as a sequence.</returns>
+ [SuppressMessage("Microsoft.Design", "CA1006:DoNotNestGenericTypesInMemberSignatures", Justification = "Not nested when used via async pattern.")]
+ Task<IEnumerable<T>> ToEnumerableAsync();
+
+ /// <summary>
+ /// Gets the elements of the table asynchronously and return the
+ /// results in a new List.
+ /// </summary>
+ /// <returns>The table elements results as a List.</returns>
+ [SuppressMessage("Microsoft.Design", "CA1006:DoNotNestGenericTypesInMemberSignatures", Justification = "Not nested when used via async pattern.")]
+ Task<List<T>> ToListAsync();
+ }
+}
77 Azure/Microsoft.Azure.Zumo.Android/Core/MobileServiceApplication.cs
@@ -0,0 +1,77 @@
+// ----------------------------------------------------------------------------
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// ----------------------------------------------------------------------------
+
+using System;
+using Windows.Data.Json;
+using Android.Content;
+using Android.App;
+
+namespace Microsoft.WindowsAzure.MobileServices
+{
+ /// <summary>
+ /// Provides context regarding the application that is using the Mobile Service.
+ /// </summary>
+ internal static class MobileServiceApplication
+ {
+ /// <summary>
+ /// Name of the config setting that stores the installation ID.
+ /// </summary>
+ private const string ConfigureAsyncInstallationConfigPath = "MobileServices.Installation.config";
+
+ /// <summary>
+ /// Name of the JSON member in the config setting that stores the
+ /// installation ID.
+ /// </summary>
+ private const string ConfigureAsyncApplicationIdKey = "applicationInstallationId";
+
+ /// <summary>
+ /// The ID used to identify this installation of the
+ /// application to provide telemetry data. It will either be retrieved
+ /// from local settings or generated fresh.
+ /// </summary>
+ private static string installationId = null;
+
+ /// <summary>
+ /// Gets the ID used to identify this installation of the
+ /// application to provide telemetry data. It will either be retrieved
+ /// from local settings or generated fresh.
+ /// </summary>
+ public static string InstallationId
+ {
+ get
+ {
+ if (installationId == null)
+ {
+ using (ISharedPreferences preferences = Application.Context.GetSharedPreferences ("zumo", FileCreationMode.Private))
+ {
+ // Try to get the AppInstallationId from settings
+ string setting = preferences.GetString (ConfigureAsyncInstallationConfigPath, null);
+ if (setting != null)
+ {
+ JsonValue config;
+ if (JsonValue.TryParse (setting, out config))
+ installationId = config.Get (ConfigureAsyncApplicationIdKey).AsString();
+ }
+
+ // Generate a new AppInstallationId if we failed to find one
+ if (installationId == null)
+ {
+ installationId = Guid.NewGuid().ToString();
+ string configText =
+ new JsonObject().Set (ConfigureAsyncApplicationIdKey, installationId).Stringify();
+
+ using (ISharedPreferencesEditor editor = preferences.Edit())
+ {
+ editor.PutString (ConfigureAsyncInstallationConfigPath, configText);
+ editor.Commit();
+ }
+ }
+ }
+ }
+
+ return installationId;
+ }
+ }
+ }
+}
142 Azure/Microsoft.Azure.Zumo.Android/Core/MobileServiceClient.Android.cs
@@ -0,0 +1,142 @@
+using System;
+using System.Diagnostics.CodeAnalysis;
+using System.Threading.Tasks;
+using Android.Content;
+using Windows.Data.Json;
+using Xamarin.Auth;
+
+namespace Microsoft.WindowsAzure.MobileServices
+{
+ public sealed partial class MobileServiceClient
+ {
+ /// <summary>
+ /// Log a user into a Mobile Services application given a provider name.
+ /// </summary>
+ /// <param name="context" type="Android.Content.Context">
+ /// Context used to launch login UI.
+ /// </param>
+ /// <param name="provider" type="MobileServiceAuthenticationProvider">
+ /// Authentication provider to use.
+ /// </param>
+ /// <returns>
+ /// Task that will complete when the user has finished authentication.
+ /// </returns>
+ [SuppressMessage("Microsoft.Naming", "CA1726:UsePreferredTerms", MessageId = "Login", Justification = "Login is more appropriate than LogOn for our usage.")]
+ public Task<MobileServiceUser> LoginAsync (Context context, MobileServiceAuthenticationProvider provider)
+ {
+ return this.SendLoginAsync(context, provider, null);
+ }
+
+ /// <summary>
+ /// Log a user into a Mobile Services application given a provider name and optional token object.
+ /// </summary>
+ /// <param name="context" type="Android.Content.Context">
+ /// Context used to launch login UI.
+ /// </param>
+ /// <param name="provider" type="MobileServiceAuthenticationProvider">
+ /// Authentication provider to use.
+ /// </param>
+ /// <param name="token" type="JsonObject">
+ /// Optional, provider specific object with existing OAuth token to log in with.
+ /// </param>
+ /// <returns>
+ /// Task that will complete when the user has finished authentication.
+ /// </returns>
+ [SuppressMessage("Microsoft.Naming", "CA1726:UsePreferredTerms", MessageId = "Login", Justification = "Login is more appropriate than LogOn for our usage.")]
+ public Task<MobileServiceUser> LoginAsync(Context context, MobileServiceAuthenticationProvider provider, JsonObject token)
+ {
+ return this.SendLoginAsync(context, provider, token);
+ }
+
+ /// <summary>
+ /// Log a user into a Mobile Services application given a provider name and optional token object.
+ /// </summary>
+ /// <param name="context" type="Android.Content.Context">
+ /// Context used to launch login UI.
+ /// </param>
+ /// <param name="provider" type="MobileServiceAuthenticationProvider">
+ /// Authentication provider to use.
+ /// </param>
+ /// <param name="token" type="JsonObject">
+ /// Optional, provider specific object with existing OAuth token to log in with.
+ /// </param>
+ /// <returns>
+ /// Task that will complete when the user has finished authentication.
+ /// </returns>
+ internal Task<MobileServiceUser> SendLoginAsync(Context context, MobileServiceAuthenticationProvider provider, JsonObject token = null)
+ {
+ if (this.LoginInProgress)
+ {
+ throw new InvalidOperationException(Resources.MobileServiceClient_Login_In_Progress);
+ }
+
+ if (!Enum.IsDefined(typeof(MobileServiceAuthenticationProvider), provider))
+ {
+ throw new ArgumentOutOfRangeException("provider");
+ }
+
+ string providerName = provider.ToString().ToLower();
+
+ this.LoginInProgress = true;
+
+ TaskCompletionSource<MobileServiceUser> tcs = new TaskCompletionSource<MobileServiceUser> ();
+
+ if (token != null)
+ {
+ // Invoke the POST endpoint to exchange provider-specific token for a Windows Azure Mobile Services token
+
+ this.RequestAsync("POST", LoginAsyncUriFragment + "/" + providerName, token)
+ .ContinueWith (t =>
+ {
+ if (t.IsCanceled)
+ tcs.SetCanceled();
+ else if (t.IsFaulted)
+ tcs.SetException (t.Exception.InnerExceptions);
+ else
+ {
+ SetupCurrentUser (t.Result);
+ tcs.SetResult (this.CurrentUser);
+ }
+ });
+ }
+ else
+ {
+ // Launch server side OAuth flow using the GET endpoint
+
+ Uri startUri = new Uri(this.ApplicationUri, LoginAsyncUriFragment + "/" + providerName);
+ Uri endUri = new Uri(this.ApplicationUri, LoginAsyncDoneUriFragment);
+
+ WebRedirectAuthenticator auth = new WebRedirectAuthenticator (startUri, endUri);
+ auth.Error += (o, e) =>
+ {
+ Exception ex = e.Exception ?? new Exception (e.Message);
+ tcs.TrySetException (ex);
+ };
+
+ auth.Completed += (o, e) =>
+ {
+ if (!e.IsAuthenticated)
+ tcs.TrySetCanceled();
+ else
+ {
+ SetupCurrentUser (JsonValue.Parse (e.Account.Properties["token"]));
+ tcs.TrySetResult (this.CurrentUser);
+ }
+ };
+
+ Intent intent = auth.GetUI (context);
+ context.StartActivity (intent);
+ }
+
+ return tcs.Task;
+ }
+
+ private void SetupCurrentUser (IJsonValue value)
+ {
+ IJsonValue response = value;
+ // Get the Mobile Services auth token and user data
+ this.currentUserAuthenticationToken = response.Get (LoginAsyncAuthenticationTokenKey).AsString();
+ this.CurrentUser = new MobileServiceUser (response.Get ("user").Get ("userId").AsString());
+ }
+ }
+}
91 Azure/Microsoft.Azure.Zumo.Android/Core/MobileServiceClient.Managed.cs
@@ -0,0 +1,91 @@
+// ----------------------------------------------------------------------------
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// ----------------------------------------------------------------------------
+
+using System;
+using System.Diagnostics;
+using System.Diagnostics.CodeAnalysis;
+using System.Threading.Tasks;
+using Windows.Data.Json;
+
+namespace Microsoft.WindowsAzure.MobileServices
+{
+ /// <summary>
+ /// Provides basic access to Mobile Services.
+ /// </summary>
+ public sealed partial class MobileServiceClient
+ {
+ /// <summary>
+ /// Initializes a new instance of the MobileServiceClient class.
+ /// </summary>
+ /// <param name="applicationUrl">
+ /// The Url to the Mobile Services application.
+ /// </param>
+ [SuppressMessage("Microsoft.Design", "CA1054:UriParametersShouldNotBeStrings", MessageId = "0#", Justification = "Enables easier copy/paste getting started workflow")]
+ public MobileServiceClient(string applicationUrl)
+ : this(new Uri(applicationUrl))
+ {
+ }
+
+ /// <summary>
+ /// Initializes a new instance of the MobileServiceClient class.
+ /// </summary>
+ /// <param name="applicationUrl">
+ /// The Url to the Mobile Services application.
+ /// </param>
+ /// <param name="applicationKey">
+ /// The application name for the Mobile Services application.
+ /// </param>
+ [SuppressMessage("Microsoft.Design", "CA1054:UriParametersShouldNotBeStrings", MessageId = "0#", Justification = "Enables easier copy/paste getting started workflow")]
+ public MobileServiceClient(string applicationUrl, string applicationKey)
+ : this(new Uri(applicationUrl), applicationKey)
+ {
+ }
+
+ /// <summary>
+ /// Log a user into a Mobile Services application given an access
+ /// token.
+ /// </summary>
+ /// <param name="authenticationToken">
+ /// OAuth access token that authenticates the user.
+ /// </param>
+ /// <returns>
+ /// Task that will complete when the user has finished authentication.
+ /// </returns>
+ [SuppressMessage("Microsoft.Naming", "CA1726:UsePreferredTerms", MessageId = "Login", Justification = "Login is preferred by design")]
+ public Task<MobileServiceUser> LoginAsync(string authenticationToken)
+ {
+ return this.SendLoginAsync(authenticationToken);
+ }
+
+ /// <summary>
+ /// Gets a reference to a table and its data operations.
+ /// </summary>
+ /// <typeparam name="T">
+ /// The type of the elements in the table. This implies the name of
+ /// the table will either be the type's name or the value of the
+ /// DataTableAttribute applied to the type.
+ /// </typeparam>
+ /// <returns>A reference to the table.</returns>
+ public IMobileServiceTable<T> GetTable<T>()
+ {
+ SerializableType type = SerializableType.Get(typeof(T));
+ return new MobileServiceTable<T>(type.TableName, this);
+ }
+
+ /// <summary>
+ /// Create an exception for an invalid response to a web request.
+ /// </summary>
+ /// <param name="errorMessage">The error message.</param>
+ /// <param name="request">The request.</param>
+ /// <param name="response">The response.</param>
+ private static Exception CreateMobileServiceException(string errorMessage, IServiceFilterRequest request, IServiceFilterResponse response)
+ {
+ Debug.Assert(!string.IsNullOrEmpty(errorMessage), "errorMessage cannot be null or empty!");
+ Debug.Assert(request != null, "request cannot be null!");
+ Debug.Assert(response != null, "response cannot be null!");
+
+ throw new MobileServiceInvalidOperationException(errorMessage, request, response);
+ }
+ }
+}
403 Azure/Microsoft.Azure.Zumo.Android/Core/MobileServiceClient.cs
@@ -0,0 +1,403 @@
+// ----------------------------------------------------------------------------
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// ----------------------------------------------------------------------------
+
+using System;
+using System.Diagnostics;
+using System.Diagnostics.CodeAnalysis;
+using System.Globalization;
+using System.Threading.Tasks;
+using Windows.Data.Json;
+
+namespace Microsoft.WindowsAzure.MobileServices
+{
+ /// <summary>
+ /// Provides basic access to Mobile Services.
+ /// </summary>
+ public sealed partial class MobileServiceClient
+ {
+ /// <summary>
+ /// Name of the JSON member in the config setting that stores the
+ /// authentication token.
+ /// </summary>
+ private const string LoginAsyncAuthenticationTokenKey = "authenticationToken";
+
+ /// <summary>
+ /// Relative URI fragment of the login endpoint.
+ /// </summary>
+ private const string LoginAsyncUriFragment = "login";
+
+ /// <summary>
+ /// Relative URI fragment of the login/done endpoint.
+ /// </summary>
+ private const string LoginAsyncDoneUriFragment = "login/done";
+
+ /// <summary>
+ /// Name of the Installation ID header included on each request.
+ /// </summary>
+ private const string RequestInstallationIdHeader = "X-ZUMO-INSTALLATION-ID";
+
+ /// <summary>
+ /// Name of the application key header included when there's a key.
+ /// </summary>
+ private const string RequestApplicationKeyHeader = "X-ZUMO-APPLICATION";
+
+ /// <summary>
+ /// Name of the authentication header included when the user's logged
+ /// in.
+ /// </summary>
+ private const string RequestAuthenticationHeader = "X-ZUMO-AUTH";
+
+ /// <summary>
+ /// Content type for request bodies and accepted responses.
+ /// </summary>
+ private const string RequestJsonContentType = "application/json";
+
+ /// <summary>
+ /// The ID used to identify this installation of the application to
+ /// provide telemetry data.
+ /// </summary>
+ private static readonly string applicationInstallationId = MobileServiceApplication.InstallationId;
+
+ /// <summary>
+ /// A JWT token representing the current user's successful OAUTH
+ /// authorization.
+ /// </summary>
+ /// <remarks>
+ /// This is passed on every request (when it exists) as the X-ZUMO-AUTH
+ /// header.
+ /// </remarks>
+ private string currentUserAuthenticationToken = null;
+
+ /// <summary>
+ /// Represents a filter used to process HTTP requests and responses
+ /// made by the Mobile Service. This can only be set by calling
+ /// WithFilter to create a new MobileServiceClient with the filter
+ /// applied.
+ /// </summary>
+ private IServiceFilter filter = null;
+
+ /// <summary>
+ /// Indicates whether a login operation is currently in progress.
+ /// </summary>
+ public bool LoginInProgress
+ {
+ get;
+ private set;
+ }
+
+ /// <summary>
+ /// Initializes a new instance of the MobileServiceClient class.
+ /// </summary>
+ /// <param name="applicationUri">
+ /// The Uri to the Mobile Services application.
+ /// </param>
+ public MobileServiceClient(Uri applicationUri)
+ : this(applicationUri, null)
+ {
+ }
+
+ /// <summary>
+ /// Initializes a new instance of the MobileServiceClient class.
+ /// </summary>
+ /// <param name="applicationUri">
+ /// The Uri to the Mobile Services application.
+ /// </param>
+ /// <param name="applicationKey">
+ /// The application name for the Mobile Services application.
+ /// </param>
+ public MobileServiceClient(Uri applicationUri, string applicationKey)
+ {
+ if (applicationUri == null)
+ {
+ throw new ArgumentNullException("applicationUri");
+ }
+
+ this.ApplicationUri = applicationUri;
+ this.ApplicationKey = applicationKey;
+ }
+
+ /// <summary>
+ /// Initializes a new instance of the MobileServiceClient class based
+ /// on an existing instance.
+ /// </summary>
+ /// <param name="service">
+ /// An existing instance of the MobileServices class to copy.
+ /// </param>
+ private MobileServiceClient(MobileServiceClient service)
+ {
+ Debug.Assert(service != null, "service cannot be null!");
+
+ this.ApplicationUri = service.ApplicationUri;
+ this.ApplicationKey = service.ApplicationKey;
+ this.CurrentUser = service.CurrentUser;
+ this.currentUserAuthenticationToken = service.currentUserAuthenticationToken;
+ this.filter = service.filter;
+ }
+
+ /// <summary>
+ /// Gets the Uri to the Mobile Services application that is provided by
+ /// the call to MobileServiceClient(...).
+ /// </summary>
+ public Uri ApplicationUri { get; private set; }
+
+ /// <summary>
+ /// Gets the Mobile Services application's name that is provided by the
+ /// call to MobileServiceClient(...).
+ /// </summary>
+ public string ApplicationKey { get; private set; }
+
+ /// <summary>
+ /// The current authenticated user provided after a successful call to
+ /// MobileServiceClient.Login().
+ /// </summary>
+ public MobileServiceUser CurrentUser { get; private set; }
+
+ /// <summary>
+ /// Gets a reference to a table and its data operations.
+ /// </summary>
+ /// <param name="tableName">The name of the table.</param>
+ /// <returns>A reference to the table.</returns>
+ public IMobileServiceTable GetTable(string tableName)
+ {
+ if (tableName == null)
+ {
+ throw new ArgumentNullException("tableName");
+ }
+ else if (string.IsNullOrEmpty(tableName))
+ {
+ throw new ArgumentException(
+ string.Format(
+ CultureInfo.InvariantCulture,
+ Resources.EmptyArgumentExceptionMessage,
+ "tableName"));
+ }
+
+ return new MobileServiceTable(tableName, this);
+ }
+
+ /// <summary>
+ /// Create a new MobileServiceClient with a filter used to process all
+ /// of its HTTP requests and responses.
+ /// </summary>
+ /// <param name="filter">The filter to use on the service.</param>
+ /// <returns>
+ /// A new MobileServiceClient whose HTTP requests and responses will be
+ /// filtered as desired.
+ /// </returns>
+ [SuppressMessage("Microsoft.Maintainability", "CA1500:VariableNamesShouldNotMatchFieldNames", MessageId = "filter", Justification = "Consequence of StyleCop enforced naming conventions")]
+ public MobileServiceClient WithFilter(IServiceFilter filter)
+ {
+ if (filter == null)
+ {
+ throw new ArgumentNullException("filter");
+ }
+
+ // "Clone" the current service
+ MobileServiceClient extended = new MobileServiceClient(this);
+
+ // Chain this service's filter with the new filter for the
+ // extended service. Note that we're
+ extended.filter = (this.filter != null) ?
+ new ComposedServiceFilter(this.filter, filter) :
+ filter;
+
+ return extended;
+ }
+
+ /// <summary>
+ /// Log a user into a Mobile Services application given an access
+ /// token.
+ /// </summary>
+ /// <param name="authenticationToken">
+ /// OAuth access token that authenticates the user.
+ /// </param>
+ /// <returns>
+ /// Task that will complete when the user has finished authentication.
+ /// </returns>
+ internal Task<MobileServiceUser> SendLoginAsync(string authenticationToken)
+ {
+ if (authenticationToken == null)
+ {
+ throw new ArgumentNullException("authenticationToken");
+ }
+ else if (string.IsNullOrEmpty(authenticationToken))
+ {
+ throw new ArgumentException(
+ string.Format(
+ CultureInfo.InvariantCulture,
+ Resources.EmptyArgumentExceptionMessage,
+ "authenticationToken"));
+ }
+
+ // TODO: Decide what we should do when CurrentUser isn't null
+ // (i.e., do we just log out the current user or should we throw
+ // an exception?). For now we just overwrite the the current user
+ // and their token on a successful login.
+
+ JsonObject request = new JsonObject()
+ .Set(LoginAsyncAuthenticationTokenKey, authenticationToken);
+
+ return this.RequestAsync("POST", LoginAsyncUriFragment, request)
+ .ContinueWith (t =>
+ {
+ // Get the Mobile Services auth token and user data
+ this.currentUserAuthenticationToken = t.Result.Get(LoginAsyncAuthenticationTokenKey).AsString();
+ this.CurrentUser = new MobileServiceUser(t.Result.Get("user").Get("userId").AsString());
+
+ return this.CurrentUser;
+ });
+ }
+
+ /// <summary>
+ /// Log a user out of a Mobile Services application.
+ /// </summary>
+ [SuppressMessage("Microsoft.Naming", "CA1726:UsePreferredTerms", MessageId = "Logout", Justification = "Logout is preferred by design")]
+ public void Logout()
+ {
+ this.CurrentUser = null;
+ this.currentUserAuthenticationToken = null;
+ }
+
+ /// <summary>
+ /// Perform a web request and include the standard Mobile Services
+ /// headers.
+ /// </summary>
+ /// <param name="method">
+ /// The HTTP method used to request the resource.
+ /// </param>
+ /// <param name="uriFragment">
+ /// URI of the resource to request (relative to the Mobile Services
+ /// runtime).
+ /// </param>
+ /// <param name="content">
+ /// Optional content to send to the resource.
+ /// </param>
+ /// <returns>The JSON value of the response.</returns>
+ internal Task<IJsonValue> RequestAsync(string method, string uriFragment, IJsonValue content)
+ {
+ Debug.Assert(!string.IsNullOrEmpty(method), "method cannot be null or empty!");
+ Debug.Assert(!string.IsNullOrEmpty(uriFragment), "uriFragment cannot be null or empty!");
+
+ // Create the web request
+ IServiceFilterRequest request = new ServiceFilterRequest();
+ request.Uri = new Uri(this.ApplicationUri, uriFragment);
+ request.Method = method.ToUpper();
+ request.Accept = RequestJsonContentType;
+
+ // Set Mobile Services authentication, application, and telemetry
+ // headers
+ request.Headers[RequestInstallationIdHeader] = applicationInstallationId;
+ if (!string.IsNullOrEmpty(this.ApplicationKey))
+ {
+ request.Headers[RequestApplicationKeyHeader] = this.ApplicationKey;
+ }
+ if (!string.IsNullOrEmpty(this.currentUserAuthenticationToken))
+ {
+ request.Headers[RequestAuthenticationHeader] = this.currentUserAuthenticationToken;
+ }
+
+ // Add any request as JSON
+ if (content != null)
+ {
+ request.ContentType = RequestJsonContentType;
+ request.Content = content.Stringify();
+ }
+
+ // Send the request and get the response back as JSON
+ return ServiceFilter.ApplyAsync (request, this.filter)
+ .ContinueWith (t =>
+ {
+ var response = t.Result;
+ IJsonValue body = GetResponseJsonAsync (response);
+
+ // Throw errors for any failing responses
+ if (response.ResponseStatus != ServiceFilterResponseStatus.Success || response.StatusCode >= 400)
+ {
+ ThrowInvalidResponse(request, response, body);
+ }
+
+ return body;
+ });
+ }
+
+ /// <summary>
+ /// Get the response text from an IServiceFilterResponse.
+ /// </summary>
+ /// <param name="response">The response.</param>
+ /// <returns>
+ /// Task that will complete when the response text has been obtained.
+ /// </returns>
+ [SuppressMessage("Microsoft.Usage", "CA1806:DoNotIgnoreMethodResults", MessageId = "Windows.Data.Json.JsonValue.TryParse(System.String,Windows.Data.Json.JsonValue@)", Justification = "We don't want to do anything if the Parse fails - just return null")]
+ private static IJsonValue GetResponseJsonAsync(IServiceFilterResponse response)
+ {
+ Debug.Assert(response != null, "response cannot be null.");
+
+ // Try to parse the response as JSON
+ JsonValue result = null;
+ if (response.Content != null)
+ {
+ JsonValue.TryParse(response.Content, out result);
+ }
+ return result;
+ }
+
+ /// <summary>
+ /// Throw an exception for an invalid response to a web request.
+ /// </summary>
+ /// <param name="request">The request.</param>
+ /// <param name="response">The response.</param>
+ /// <param name="body">The body of the response as JSON.</param>
+ private static void ThrowInvalidResponse(IServiceFilterRequest request, IServiceFilterResponse response, IJsonValue body)
+ {
+ Debug.Assert(request != null, "request cannot be null!");
+ Debug.Assert(response != null, "response cannot be null!");
+ Debug.Assert(
+ response.ResponseStatus != ServiceFilterResponseStatus.Success ||
+ response.StatusCode >= 400,
+ "response should be failing!");
+
+ // Create either an invalid response or connection failed message
+ // (check the status code first because some status codes will
+ // set a protocol ErrorStatus).
+ string message = null;
+ if (response.StatusCode >= 400)
+ {
+ if (body != null)
+ {
+ if (body.ValueType == JsonValueType.String)
+ {
+ // User scripts might return errors with just a plain string message as the
+ // body content, so use it as the exception message
+ message = body.GetString();
+ }
+ else if (body.ValueType == JsonValueType.Object)
+ {
+ // Get the error message, but default to the status description
+ // below if there's no error message present.
+ message = body.Get("error").AsString() ??
+ body.Get("description").AsString();
+ }
+ }
+
+ if (string.IsNullOrWhiteSpace(message))
+ {
+ message = string.Format(
+ CultureInfo.InvariantCulture,
+ Resources.MobileServiceClient_ErrorMessage,
+ response.StatusDescription);
+ }
+ }
+ else
+ {
+ message = string.Format(
+ CultureInfo.InvariantCulture,
+ Resources.MobileServiceClient_ErrorMessage,
+ response.ResponseStatus);
+ }
+
+ // Combine the pieces and throw the exception
+ throw CreateMobileServiceException(message, request, response);
+ }
+ }
+}
478 Azure/Microsoft.Azure.Zumo.Android/Core/MobileServiceTable.Generic.cs
@@ -0,0 +1,478 @@
+// ----------------------------------------------------------------------------
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// ----------------------------------------------------------------------------
+
+using System;
+using System.Collections.Generic;
+using System.Diagnostics;
+using System.Diagnostics.CodeAnalysis;
+using System.Globalization;
+using System.Linq;
+using System.Linq.Expressions;
+using System.Threading.Tasks;
+using Windows.Data.Json;
+
+namespace Microsoft.WindowsAzure.MobileServices
+{
+ /// <summary>
+ /// Provides operations on tables for a Mobile Service.
+ /// </summary>
+ /// <typeparam name="T">
+ /// The type of elements in the table (which implies the table).
+ /// </typeparam>
+ internal partial class MobileServiceTable<T> : MobileServiceTable, IMobileServiceTable<T>
+ {
+ /// <summary>
+ /// Initializes a new instance of the MobileServiceTables class.
+ /// </summary>
+ /// <param name="tableName">The name of the table.</param>
+ /// <param name="client">
+ /// Reference to the MobileServiceClient associated with this table.
+ /// </param>
+ public MobileServiceTable(string tableName, MobileServiceClient client)
+ : base(tableName, client)
+ {
+ }
+
+ /// <summary>
+ /// Get the elements of a table based using a query.
+ /// </summary>
+ /// <typeparam name="U">
+ /// The type of element returned by the query.
+ /// </typeparam>
+ /// <param name="query">The query to execute.</param>
+ /// <returns>Elements of the table.</returns>
+ [SuppressMessage("Microsoft.Design", "CA1006:DoNotNestGenericTypesInMemberSignatures", Justification = "Generic are not nested when used via async.")]
+ public Task<IEnumerable<U>> ReadAsync<U>(MobileServiceTableQuery<U> query)
+ {
+ if (query == null)
+ {
+ throw new ArgumentNullException("query");
+ }
+
+ return EvaluateQueryAsync<U>(this, query.Compile());
+ }
+
+ /// <summary>
+ /// Evaluate a query and return its results.
+ /// </summary>
+ /// <typeparam name="U">
+ /// The type of element returned by the query.
+ /// </typeparam>
+ /// <param name="table">
+ /// Access to MobileServices table operations.
+ /// </param>
+ /// <param name="query">
+ /// The description of the query to evaluate and get the results for.
+ /// </param>
+ /// <returns>Results of the query.</returns>
+ internal static Task<IEnumerable<U>> EvaluateQueryAsync<U>(IMobileServiceTable<T> table, MobileServiceTableQueryDescription query)
+ {
+ Debug.Assert(query != null, "query cannot be null!");
+ Debug.Assert(table != null, "table cannot be null!");
+
+ // Send the query
+ string odata = query.ToString();
+
+ return table.ReadAsync (odata).ContinueWith (t =>
+ {
+ // Parse the results
+ long totalCount;
+ JsonArray values = MobileServiceTable<T>.GetResponseSequence(t.Result, out totalCount);
+ return (IEnumerable<U>)new TotalCountEnumerable<U>(
+ totalCount,
+ values.Select(
+ item =>
+ {
+ // Create and fill a new instance of the type we should
+ // deserialize (which is either T or the input param
+ // to the projection that will modify T).
+ object obj = Activator.CreateInstance(query.ProjectionArgumentType ?? typeof(U));
+ MobileServiceTableSerializer.Deserialize(item, obj);
+
+ // Apply the projection to the instance transforming it
+ // as desired
+ if (query.Projection != null)
+ {
+ obj = query.Projection.DynamicInvoke(obj);
+ }
+
+ return (U)obj;
+ }));
+ });
+ }
+
+ /// <summary>
+ /// Get the elements in a table.
+ /// </summary>
+ /// <returns>The elements in the table.</returns>
+ /// <remarks>
+ /// This call will not handle paging, etc., for you.
+ /// </remarks>
+ [SuppressMessage("Microsoft.Design", "CA1006:DoNotNestGenericTypesInMemberSignatures", Justification = "It does not appear nested when used via the async pattern.")]
+ public Task<IEnumerable<T>> ReadAsync()
+ {
+ // Need to declare an empty string so the compiler can distinguish
+ // between a null query and a null string
+ string odata = null;
+
+ return ReadAsync (odata).ContinueWith (t =>
+ {
+ // Get the response as an array
+ long totalCount;
+ JsonArray values = GetResponseSequence(t.Result, out totalCount);
+
+ // Deserialize the values and associate the query context
+ return (IEnumerable<T>)new TotalCountEnumerable<T>(
+ totalCount,
+ values.Select(MobileServiceTableSerializer.Deserialize<T>));
+ });
+ }
+
+ /// <summary>
+ /// Parse a JSON response into a sequence of elements and also return
+ /// the count of objects. This method abstracts out the differences
+ /// between a raw array response and an inline count response.
+ /// </summary>
+ /// <param name="response">The JSON response.</param>
+ /// <param name="totalCount">
+ /// The total count as requested via the IncludeTotalCount method.
+ /// </param>
+ /// <returns>The response as a JSON array.</returns>
+ internal static JsonArray GetResponseSequence(IJsonValue response, out long totalCount)
+ {
+ double? inlineCount = null;
+
+ // Try and get the values as an array
+ JsonArray values = response.AsArray();
+ if (values == null)
+ {
+ // Otherwise try and get the values from the results property
+ // (which is the case when we retrieve the count inline)
+ values = response.Get(InlineCountResultsKey).AsArray();
+ inlineCount = response.Get(InlineCountCountKey).AsNumber();
+ if (values == null)
+ {
+ throw new InvalidOperationException(
+ string.Format(
+ CultureInfo.InvariantCulture,
+ Resources.MobileServiceTables_GetResponseSequence_ExpectedArray,
+ (response ?? JsonExtensions.Null()).Stringify()));
+ }
+ }
+
+ // Get the count via the inline count or default an unspecified
+ // count to -1
+ totalCount = inlineCount != null ?
+ (long)inlineCount.Value :
+ -1L;
+
+ return values;
+ }
+
+ /// <summary>
+ /// Get an element from a table by its ID.
+ /// </summary>
+ /// <param name="id">The ID of the element.</param>
+ /// <returns>The desired element.</returns>
+ public Task<T> LookupAsync(object id)
+ {
+ // TODO: At some point in the future this will be involved in our
+ // caching story and relationships across tables via foreign
+ // keys.
+
+ return SendLookupAsync (id).ContinueWith (t => MobileServiceTableSerializer.Deserialize<T> (t.Result.AsObject()));
+ }
+
+ /// <summary>
+ /// Refresh the current instance with the latest values from the
+ /// table.
+ /// </summary>
+ /// <param name="instance">The instance to refresh.</param>
+ /// <returns>
+ /// A task that will complete when the refresh has finished.
+ /// </returns>
+ public Task RefreshAsync(T instance)
+ {
+ if (instance == null)
+ {
+ throw new ArgumentNullException("instance");
+ }
+
+ // Only refresh if it's already on the server
+ SerializableType type = SerializableType.Get(typeof(T));
+ object id = type.IdMember.GetValue(instance);
+
+ TaskCompletionSource<bool> tcs = new TaskCompletionSource<bool>();
+
+ if (!SerializableType.IsDefaultIdValue(id))
+ {
+ // Get the latest version of this element
+ GetSingleValueAsync (id).ContinueWith (t =>
+ {
+ // Deserialize that value back into the current instance
+ MobileServiceTableSerializer.Deserialize (t.Result, instance);
+ tcs.SetResult (true);
+ });
+ }
+ else
+ tcs.SetResult (true);
+
+ return tcs.Task;
+ }
+
+ /// <summary>
+ /// Get an element from a table by its ID.
+ /// </summary>
+ /// <param name="id">The ID of the element.</param>
+ /// <returns>The desired element as JSON object.</returns>
+ private Task<JsonObject> GetSingleValueAsync(object id)
+ {
+ // Create a query for just this item
+ string query = string.Format(
+ CultureInfo.InvariantCulture,
+ "$filter={0} eq {1}",
+ IdPropertyName,
+ TypeExtensions.ToODataConstant(id));
+
+ return ReadAsync (query).ContinueWith (t =>
+ {
+ // Get the first element in the response
+ JsonObject obj = t.Result.AsObject();
+ if (obj == null)
+ {
+ JsonArray array = t.Result.AsArray();
+ if (array != null && array.Count > 0)
+ {
+ obj = array.FirstOrDefault().AsObject();
+ }
+ }
+
+ if (obj == null)
+ {
+ throw new InvalidOperationException(
+ string.Format(
+ CultureInfo.InvariantCulture,
+ Resources.MobileServiceTables_GetSingleValueAsync_NotSingleObject,
+ (t.Result ?? JsonExtensions.Null()).Stringify()));
+ }
+
+ return obj;
+ });
+ }
+
+ /// <summary>
+ /// Insert a new instance into the table.
+ /// </summary>
+ /// <param name="instance">The instance to insert.</param>
+ /// <returns>
+ /// A task that will complete when the insertion has finished.
+ /// </returns>
+ public Task InsertAsync(T instance)
+ {
+ if (instance == null)
+ {
+ throw new ArgumentNullException("instance");
+ }
+
+ // Serialize the instance
+ JsonObject value = MobileServiceTableSerializer.Serialize(instance).AsObject();
+
+ return InsertAsync (value)
+ .ContinueWith (t => MobileServiceTableSerializer.Deserialize (t.Result, instance));
+ }
+
+ /// <summary>
+ /// Updates an instance in the table.
+ /// </summary>
+ /// <param name="instance">The instance to update.</param>
+ /// <returns>
+ /// A task that will complete when the update has finished.
+ /// </returns>
+ public Task UpdateAsync(T instance)
+ {
+ if (instance == null)
+ {
+ throw new ArgumentNullException("instance");
+ }
+
+ // Serialize the instance
+ JsonObject value = MobileServiceTableSerializer.Serialize(instance).AsObject();
+
+ // Send the request
+ return UpdateAsync (value)
+ .ContinueWith (t => MobileServiceTableSerializer.Deserialize (t.Result, instance));
+ }
+
+ /// <summary>
+ /// Delete an instance from the table.
+ /// </summary>
+ /// <param name="instance">The instance to delete.</param>
+ /// <returns>
+ /// A task that will complete when the delete has finished.
+ /// </returns>
+ public Task DeleteAsync(T instance)
+ {
+ if (instance == null)
+ {
+ throw new ArgumentNullException("instance");
+ }
+
+ // Serialize the instance
+ JsonObject value = MobileServiceTableSerializer.Serialize(instance).AsObject();
+
+ // Send the request
+ return DeleteAsync (value)
+ .ContinueWith (t =>
+ {
+ // Clear the instance ID since it's no longer associated with that
+ // ID on the server (note that reflection is goodly enough to turn
+ // null into the correct value for us).
+ SerializableType type = SerializableType.Get (typeof (T));
+ type.IdMember.SetValue (instance, null);
+ });
+ }
+
+ /// <summary>
+ /// Creates a query by applying the specified filter predicate.
+ /// </summary>
+ /// <param name="predicate">The filter predicate.</param>
+ /// <returns>A query against the table.</returns>
+ [SuppressMessage("Microsoft.Design", "CA1006:DoNotNestGenericTypesInMemberSignatures", Justification = "Part of the LINQ query pattern.")]
+ public MobileServiceTableQuery<T> Where(Expression<Func<T, bool>> predicate)
+ {
+ return new MobileServiceTableQuery<T>(this).Where(predicate);
+ }
+
+ /// <summary>
+ /// Creates a query by applying the specified selection.
+ /// </summary>
+ /// <typeparam name="U">
+ /// Type representing the projected result of the query.
+ /// </typeparam>
+ /// <param name="selector">The selector function.</param>
+ /// <returns>A query against the table.</returns>
+ [SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "U", Justification = "Standard for LINQ")]
+ [SuppressMessage("Microsoft.Design", "CA1006:DoNotNestGenericTypesInMemberSignatures", Justification = "Part of the LINQ query pattern.")]
+ public MobileServiceTableQuery<U> Select<U>(Expression<Func<T, U>> selector)
+ {
+ return new MobileServiceTableQuery<T>(this).Select(selector);
+ }
+
+ /// <summary>
+ /// Creates a query by applying the specified ascending order clause.
+ /// </summary>
+ /// <typeparam name="TKey">
+ /// The type of the member being ordered by.
+ /// </typeparam>
+ /// <param name="keySelector">
+ /// The expression selecting the member to order by.
+ /// </param>
+ /// <returns>A query against the table.</returns>
+ [SuppressMessage("Microsoft.Design", "CA1006:DoNotNestGenericTypesInMemberSignatures", Justification = "Part of the LINQ query pattern.")]
+ public MobileServiceTableQuery<T> OrderBy<TKey>(Expression<Func<T, TKey>> keySelector)
+ {
+ return new MobileServiceTableQuery<T>(this).OrderBy(keySelector);
+ }
+
+ /// <summary>
+ /// Creates a query by applying the specified descending order clause.
+ /// </summary>
+ /// <typeparam name="TKey">
+ /// The type of the member being ordered by.
+ /// </typeparam>
+ /// <param name="keySelector">
+ /// The expression selecting the member to order by.
+ /// </param>
+ /// <returns>A query against the table.</returns>
+ [SuppressMessage("Microsoft.Design", "CA1006:DoNotNestGenericTypesInMemberSignatures", Justification = "Part of the LINQ query pattern.")]
+ public MobileServiceTableQuery<T> OrderByDescending<TKey>(Expression<Func<T, TKey>> keySelector)
+ {
+ return new MobileServiceTableQuery<T>(this).OrderByDescending(keySelector);
+ }
+
+ /// <summary>
+ /// Creates a query by applying the specified ascending order clause.
+ /// </summary>
+ /// <typeparam name="TKey">
+ /// The type of the member being ordered by.
+ /// </typeparam>
+ /// <param name="keySelector">
+ /// The expression selecting the member to order by.
+ /// </param>
+ /// <returns>A query against the table.</returns>
+ [SuppressMessage("Microsoft.Design", "CA1006:DoNotNestGenericTypesInMemberSignatures", Justification = "Part of the LINQ query pattern.")]
+ public MobileServiceTableQuery<T> ThenBy<TKey>(Expression<Func<T, TKey>> keySelector)
+ {
+ return new MobileServiceTableQuery<T>(this).ThenBy(keySelector);
+ }
+
+ /// <summary>
+ /// Creates a query by applying the specified descending order clause.
+ /// </summary>
+ /// <typeparam name="TKey">
+ /// The type of the member being ordered by.
+ /// </typeparam>
+ /// <param name="keySelector">
+ /// The expression selecting the member to order by.
+ /// </param>
+ /// <returns>A query against the table.</returns>
+ [SuppressMessage("Microsoft.Design", "CA1006:DoNotNestGenericTypesInMemberSignatures", Justification = "Part of the LINQ query pattern.")]
+ public MobileServiceTableQuery<T> ThenByDescending<TKey>(Expression<Func<T, TKey>> keySelector)
+ {
+ return new MobileServiceTableQuery<T>(this).ThenByDescending(keySelector);
+ }
+
+ /// <summary>
+ /// Creates a query by applying the specified skip clause.
+ /// </summary>
+ /// <param name="count">The number to skip.</param>
+ /// <returns>A query against the table.</returns>
+ public MobileServiceTableQuery<T> Skip(int count)
+ {
+ return new MobileServiceTableQuery<T>(this).Skip(count);
+ }
+
+ /// <summary>
+ /// Creates a query by applying the specified take clause.
+ /// </summary>
+ /// <param name="count">The number to take.</param>
+ /// <returns>A query against the table.</returns>
+ public MobileServiceTableQuery<T> Take(int count)
+ {
+ return new MobileServiceTableQuery<T>(this).Take(count);
+ }
+
+ /// <summary>
+ /// Creates a query that will ensure it gets the total count for all
+ /// the records that would have been returned ignoring any take paging/
+ /// limit clause specified by client or server.
+ /// </summary>
+ /// <returns>A query against the table.</returns>
+ public MobileServiceTableQuery<T> IncludeTotalCount()
+ {
+ return new MobileServiceTableQuery<T>(this, true);
+ }
+
+ /// <summary>
+ /// Gets the elements of the table asynchronously.
+ /// </summary>
+ /// <returns>The table element results.</returns>
+ [SuppressMessage("Microsoft.Design", "CA1006:DoNotNestGenericTypesInMemberSignatures", Justification = "Not nested when used via async pattern.")]
+ public Task<IEnumerable<T>> ToEnumerableAsync()
+ {
+ return this.ReadAsync();
+ }
+
+ /// <summary>
+ /// Gets the elements of the table asynchronously and return the
+ /// results in a new List.
+ /// </summary>
+ /// <returns>The table elements results as a List.</returns>
+ [SuppressMessage("Microsoft.Design", "CA1006:DoNotNestGenericTypesInMemberSignatures", Justification = "Not nested when used via async pattern.")]
+ public Task<List<T>> ToListAsync()
+ {
+ return ReadAsync().ContinueWith (t => (List<T>)new TotalCountList<T> (t.Result));
+ }
+ }
+}
266 Azure/Microsoft.Azure.Zumo.Android/Core/MobileServiceTable.cs
@@ -0,0 +1,266 @@
+// ----------------------------------------------------------------------------
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// ----------------------------------------------------------------------------
+
+using System;
+using System.Collections.Generic;
+using System.Diagnostics;
+using System.Diagnostics.CodeAnalysis;
+using System.Globalization;
+using System.IO;
+using System.Threading.Tasks;
+using Windows.Data.Json;
+
+namespace Microsoft.WindowsAzure.MobileServices
+{
+ /// <summary>
+ /// Provides operations on tables for a Mobile Service.
+ /// </summary>
+ internal partial class MobileServiceTable : IMobileServiceTable
+ {
+ /// <summary>
+ /// Name of the reserved Mobile Services ID member.
+ /// </summary>
+ /// <remarks>
+ /// Note: This value is used by other areas like serialiation to find
+ /// the name of the reserved ID member.
+ /// </remarks>
+ internal const string IdPropertyName = "id";
+
+ /// <summary>
+ /// The route separator used to denote the table in a uri like
+ /// .../{app}/tables/{coll}.
+ /// </summary>
+ internal const string TableRouteSeperatorName = "tables";
+
+ /// <summary>
+ /// Initializes a new instance of the MobileServiceTables class.
+ /// </summary>
+ /// <param name="tableName">The name of the table.</param>
+ /// <param name="client">
+ /// Reference to the MobileServiceClient associated with this table.
+ /// </param>
+ public MobileServiceTable(string tableName, MobileServiceClient client)
+ {
+ Debug.Assert(tableName != null, "tableName cannot be null!");
+ Debug.Assert(client != null, "client cannot be null!");
+ this.TableName = tableName;
+ this.MobileServiceClient = client;
+ }
+
+ /// <summary>
+ /// Gets a reference to the MobileServiceClient associated with this
+ /// table.
+ /// </summary>
+ public MobileServiceClient MobileServiceClient { get; private set; }
+
+ /// <summary>
+ /// Gets the name of the table.
+ /// </summary>
+ public string TableName { get; private set; }
+
+ /// <summary>
+ /// Get a uri fragment representing the resource corresponding to the
+ /// table.
+ /// </summary>
+ /// <param name="tableName">The name of the table.</param>
+ /// <returns>A URI fragment representing the resource.</returns>
+ private static string GetUriFragment(string tableName)
+ {
+ Debug.Assert(!string.IsNullOrEmpty(tableName),
+ "tableName should not be null or empty!");
+ return Path.Combine(TableRouteSeperatorName, tableName);
+ }
+
+ /// <summary>
+ /// Get a uri fragment representing the resource corresponding to the
+ /// given instance in the table.
+ /// </summary>
+ /// <param name="tableName">The name of the table.</param>
+ /// <param name="instance">The instance.</param>
+ /// <returns>A URI fragment representing the resource.</returns>
+ private static string GetUriFragment(string tableName, JsonObject instance)
+ {
+ Debug.Assert(!string.IsNullOrEmpty(tableName),
+ "tableName should not be null or empty!");
+
+ // Get the value of the object (as a primitive JSON type)
+ object id = null;
+ if (!instance.Get(IdPropertyName).TryConvert(out id) || id == null)
+ {
+ throw new ArgumentException(
+ string.Format(
+ CultureInfo.InvariantCulture,
+ Resources.IdNotFoundExceptionMessage,
+ IdPropertyName),
+ "instance");
+ }
+
+ return GetUriFragment(tableName, id);
+ }
+
+ /// <summary>
+ /// Get a uri fragment representing the resource corresponding to the
+ /// given id in the table.
+ /// </summary>
+ /// <param name="tableName">The name of the table.</param>
+ /// <param name="id">The id of the instance.</param>
+ /// <returns>A URI fragment representing the resource.</returns>
+ private static string GetUriFragment(string tableName, object id)
+ {
+ Debug.Assert(!string.IsNullOrEmpty(tableName),
+ "tableName should not be null or empty!");
+ Debug.Assert(id != null, "id should not be null!");
+
+ string uriFragment = GetUriFragment(tableName);
+ return Path.Combine(uriFragment, TypeExtensions.ToUriConstant(id));
+ }
+
+ /// <summary>
+ /// Execute a query against a table.
+ /// </summary>
+ /// <param name="query">
+ /// An object defining the query to execute.
+ /// </param>
+ /// <returns>
+ /// A task that will return with results when the query finishes.
+ /// </returns>
+ internal Task<IJsonValue> SendReadAsync(string query)
+ {
+ string uriFragment = GetUriFragment(this.TableName);
+ if (!string.IsNullOrEmpty(query))
+ {
+ uriFragment += '?' + query.TrimStart('?');
+ }
+
+ return this.MobileServiceClient.RequestAsync("GET", uriFragment, null);
+ }
+
+ /// <summary>
+ /// Execute a lookup against a table.
+ /// </summary>
+ /// <param name="id">
+ /// The id of the object to lookup.
+ /// </param>
+ /// <returns>
+ /// A task that will return with results when the query finishes.
+ /// </returns>
+ [SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode", Justification = "Called via the strongly typed MobileServiceTable in the C# library only.")]
+ internal Task<IJsonValue> SendLookupAsync(object id)
+ {
+ if (id == null)
+ {
+ throw new ArgumentNullException("id");
+ }
+ string uriFragment = GetUriFragment(this.TableName, id);
+ return this.MobileServiceClient.RequestAsync("GET", uriFragment, null);
+ }
+
+ /// <summary>
+ /// Insert a new object into a table.
+ /// </summary>
+ /// <param name="instance">
+ /// The instance to insert into the table.
+ /// </param>
+ /// <returns>
+ /// A task that will complete when the insert finishes.
+ /// </returns>
+ internal Task<IJsonValue> SendInsertAsync(JsonObject instance)
+ {
+ if (instance == null)
+ {
+ throw new ArgumentNullException("instance");
+ }
+
+ // Make sure the instance doesn't have its ID set for an insertion
+ if (instance.Get(IdPropertyName) != null)
+ {
+ throw new ArgumentException(
+ string.Format(
+ CultureInfo.InvariantCulture,
+ Resources.CannotInsertWithExistingIdMessage,
+ IdPropertyName),
+ "instance");
+ }
+
+ string url = GetUriFragment(this.TableName);
+
+ return this.MobileServiceClient.RequestAsync ("POST", url, instance)
+ .ContinueWith (t => Patch (instance, t.Result));
+ }
+
+ /// <summary>
+ /// Update an object in a given table.
+ /// </summary>
+ /// <param name="instance">
+ /// The instance to update in the table.
+ /// </param>
+ /// <returns>
+ /// A task that will complete when the update finishes.
+ /// </returns>
+ internal Task<IJsonValue> SendUpdateAsync(JsonObject instance)
+ {
+ if (instance == null)
+ {
+ throw new ArgumentNullException("instance");
+ }
+ string url = GetUriFragment(this.TableName, instance);
+
+ return this.MobileServiceClient.RequestAsync ("PATCH", url, instance)
+ .ContinueWith (t => Patch (instance, t.Result));
+ }
+
+ /// <summary>
+ /// Delete an object from a given table.
+ /// </summary>
+ /// <param name="instance">
+ /// The instance to delete from the table.
+ /// </param>
+ /// <returns>
+ /// A task that will complete when the delete finishes.
+ /// </returns>
+ internal Task SendDeleteAsync(JsonObject instance)
+ {
+ if (instance == null)
+ {
+ throw new ArgumentNullException("instance");
+ }
+ string url = GetUriFragment(this.TableName, instance);
+ return this.MobileServiceClient.RequestAsync("DELETE", url, instance);
+ }
+
+ /// <summary>
+ /// Patch an object with the values returned by from the server. Given
+ /// that it's possible for the server to change values on an insert or
+ /// update, we want to make sure the client object reflects those
+ /// changes.
+ /// </summary>
+ /// <param name="original">The first instance.</param>
+ /// <param name="updated">The second instance.</param>
+ /// <returns>
+ /// The first instance patched with values from the second.
+ /// </returns>
+ private static IJsonValue Patch(IJsonValue original, IJsonValue updated)
+ {
+ JsonObject originalObj = original.AsObject();
+ JsonObject updatedObj = updated.AsObject();
+ if (originalObj != null && updatedObj != null)
+ {
+ foreach (KeyValuePair<string, JsonValue> property in updatedObj.GetPropertyValues())
+ {
+ originalObj.SetNamedValue(property.Key, property.Value);
+ }
+
+ // TODO: Should we also delete any fields on the first object
+ // that aren't also on the second object? Is that a scenario
+ // for scripts?
+ }
+ else
+ {
+ Debug.Assert(false, "Patch expects two JSON objects.");
+ }
+
+ return original;
+ }
+ }
+}
208 Azure/Microsoft.Azure.Zumo.Android/Microsoft.Azure.Zumo.Android.csproj
@@ -0,0 +1,208 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <ProductVersion>8.0.30703</ProductVersion>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{7B774D3A-9136-4ED8-B2D6-09E577F9EC63}</ProjectGuid>
+ <ProjectTypeGuids>{EFBA0AD7-5A72-4C68-AF49-83D382785DCF};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <OutputType>Library</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <RootNamespace>Microsoft.WindowsAzure.MobileServices</RootNamespace>
+ <AssemblyName>Microsoft.WindowsAzure.MobileServices.Android</AssemblyName>
+ <FileAlignment>512</FileAlignment>
+ <GenerateSerializationAssemblies>Off</GenerateSerializationAssemblies>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ <DebugSymbols>true</DebugSymbols>
+ <DebugType>full</DebugType>
+ <Optimize>false</Optimize>
+ <OutputPath>bin\Debug\</OutputPath>
+ <DefineConstants>TRACE;DEBUG;XAMARIN_AUTH_INTERNAL;PLATFORM_ANDROID</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ <DebugType>pdbonly</DebugType>
+ <Optimize>true</Optimize>
+ <OutputPath>bin\Release\</OutputPath>
+ <DefineConstants>TRACE;XAMARIN_AUTH_INTERNAL;PLATFORM_ANDROID</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <ItemGroup>
+ <Reference Include="Mono.Android" />
+ <Reference Include="mscorlib" />
+ <Reference Include="System" />
+ <Reference Include="System.Core" />
+ <Reference Include="System.Json" />
+ <Reference Include="System.Runtime.Serialization" />
+ <Reference Include="System.Xml.Linq" />
+ <Reference Include="System.Xml" />
+ </ItemGroup>
+ <ItemGroup>
+ <Compile Include="..\..\..\..\windows\src\Microsoft.Azure.Zumo.Windows.Managed\Core\IMobileServiceTable.Managed.cs">
+ <Link>Core\IMobileServiceTable.Managed.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\..\windows\src\Microsoft.Azure.Zumo.Windows.Managed\Core\MobileServiceInvalidOperationException.cs">
+ <Link>Core\MobileServiceInvalidOperationException.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\..\windows\src\Microsoft.Azure.Zumo.Windows.Managed\Core\MobileServiceTable.Managed.cs">
+ <Link>Core\MobileServiceTable.Managed.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\..\windows\src\Microsoft.Azure.Zumo.Windows.Managed\Resources.cs">
+ <Link>Resources.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\..\windows\src\Microsoft.Azure.Zumo.Windows.Managed\Table\Query\FilterBuildingExpressionVisitor.cs">
+ <Link>Table\Query\FilterBuildingExpressionVisitor.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\..\windows\src\Microsoft.Azure.Zumo.Windows.Managed\Table\Query\ITotalCountProvider.cs">
+ <Link>Table\Query\ITotalCountProvider.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\..\windows\src\Microsoft.Azure.Zumo.Windows.Managed\Table\Query\MobileServiceTableQueryDescription.cs">
+ <Link>Table\Query\MobileServiceTableQueryDescription.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\..\windows\src\Microsoft.Azure.Zumo.Windows.Managed\Table\Query\MobileServiceTableQueryTranslator.cs">
+ <Link>Table\Query\MobileServiceTableQueryTranslator.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\..\windows\src\Microsoft.Azure.Zumo.Windows.Managed\Table\Query\PartialEvaulator.cs">
+ <Link>Table\Query\PartialEvaulator.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\..\windows\src\Microsoft.Azure.Zumo.Windows.Managed\Table\Query\TotalCountEnumerable.cs">
+ <Link>Table\Query\TotalCountEnumerable.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\..\windows\src\Microsoft.Azure.Zumo.Windows.Managed\Table\Query\TotalCountList.cs">
+ <Link>Table\Query\TotalCountList.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\..\windows\src\Microsoft.Azure.Zumo.Windows.Managed\Table\Query\VisitorHelper.cs">
+ <Link>Table\Query\VisitorHelper.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\..\windows\src\Microsoft.Azure.Zumo.Windows.Managed\Table\Serialization\DataMemberJsonConverterAttribute.cs">
+ <Link>Table\Serialization\DataMemberJsonConverterAttribute.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\..\windows\src\Microsoft.Azure.Zumo.Windows.Managed\Table\Serialization\DataTableAttribute.cs">
+ <Link>Table\Serialization\DataTableAttribute.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\..\windows\src\Microsoft.Azure.Zumo.Windows.Managed\Table\Serialization\ICustomMobileServiceTableSerialization.cs">
+ <Link>Table\Serialization\ICustomMobileServiceTableSerialization.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\..\windows\src\Microsoft.Azure.Zumo.Windows.Managed\Table\Serialization\IDataMemberJsonConverter.cs">
+ <Link>Table\Serialization\IDataMemberJsonConverter.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\..\windows\src\Microsoft.Azure.Zumo.Windows.Managed\Table\Serialization\MobileServiceTableSerializer.cs">
+ <Link>Table\Serialization\MobileServiceTableSerializer.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\..\windows\src\Microsoft.Azure.Zumo.Windows.WinMD\Core\IMobileServiceTable.cs">
+ <Link>Core\IMobileServiceTable.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\..\windows\src\Microsoft.Azure.Zumo.Windows.WinMD\Core\JsonExtensions.cs">
+ <Link>Core\JsonExtensions.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\..\windows\src\Microsoft.Azure.Zumo.Windows.WinMD\Core\MobileServiceAuthenticationProvider.cs">
+ <Link>Core\MobileServiceAuthenticationProvider.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\..\windows\src\Microsoft.Azure.Zumo.Windows.WinMD\Core\MobileServiceUser.cs">
+ <Link>Core\MobileServiceUser.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\..\windows\src\Microsoft.Azure.Zumo.Windows.WinMD\Core\Resources.cs">
+ <Link>Core\Resources.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\..\windows\src\Microsoft.Azure.Zumo.Windows.WinMD\Core\TypeExtensions.cs">
+ <Link>Core\TypeExtensions.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\..\windows\src\Microsoft.Azure.Zumo.Windows.WinMD\ServiceFilter\IServiceFilterResponse.cs">
+ <Link>ServiceFilter\IServiceFilterResponse.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\..\windows\src\Microsoft.Azure.Zumo.Windows.WinMD\ServiceFilter\ServiceFilterResponse.cs">
+ <Link>ServiceFilter\ServiceFilterResponse.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\..\windows\src\Microsoft.Azure.Zumo.Windows.WinMD\ServiceFilter\ServiceFilterResponseStatus.cs">
+ <Link>ServiceFilter\ServiceFilterResponseStatus.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\libs\Xamarin.Auth\src\Xamarin.Auth.Android\ActivityEx.cs">
+ <Link>Xamarin.Auth\Android\ActivityEx.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\libs\Xamarin.Auth\src\Xamarin.Auth.Android\ActivityStateRepository.cs">
+ <Link>Xamarin.Auth\Android\ActivityStateRepository.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\libs\Xamarin.Auth\src\Xamarin.Auth.Android\AndroidAccountStore.cs">
+ <Link>Xamarin.Auth\Android\AndroidAccountStore.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\libs\Xamarin.Auth\src\Xamarin.Auth.Android\FormAuthenticatorActivity.cs">
+ <Link>Xamarin.Auth\Android\FormAuthenticatorActivity.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\libs\Xamarin.Auth\src\Xamarin.Auth.Android\WebAuthenticatorActivity.cs">
+ <Link>Xamarin.Auth\Android\WebAuthenticatorActivity.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\libs\Xamarin.Auth\src\Xamarin.Auth\Account.cs">
+ <Link>Xamarin.Auth\Account.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\libs\Xamarin.Auth\src\Xamarin.Auth\AccountStore.cs">
+ <Link>Xamarin.Auth\AccountStore.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\libs\Xamarin.Auth\src\Xamarin.Auth\Authenticator.cs">
+ <Link>Xamarin.Auth\Authenticator.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\libs\Xamarin.Auth\src\Xamarin.Auth\AuthException.cs">
+ <Link>Xamarin.Auth\AuthException.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\libs\Xamarin.Auth\src\Xamarin.Auth\ExceptionEx.cs">
+ <Link>Xamarin.Auth\ExceptionEx.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\libs\Xamarin.Auth\src\Xamarin.Auth\FormAuthenticator.cs">
+ <Link>Xamarin.Auth\FormAuthenticator.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\libs\Xamarin.Auth\src\Xamarin.Auth\OAuth1.cs">
+ <Link>Xamarin.Auth\OAuth1.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\libs\Xamarin.Auth\src\Xamarin.Auth\OAuth1Authenticator.cs">
+ <Link>Xamarin.Auth\OAuth1Authenticator.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\libs\Xamarin.Auth\src\Xamarin.Auth\OAuth2Authenticator.cs">
+ <Link>Xamarin.Auth\OAuth2Authenticator.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\libs\Xamarin.Auth\src\Xamarin.Auth\WebAuthenticator.cs">
+ <Link>Xamarin.Auth\WebAuthenticator.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\libs\Xamarin.Auth\src\Xamarin.Auth\WebEx.cs">
+ <Link>Xamarin.Auth\WebEx.cs</Link>
+ </Compile>
+ <Compile Include="..\..\..\libs\Xamarin.Auth\src\Xamarin.Auth\WebRedirectAuthenticator.cs">
+ <Link>Xamarin.Auth\WebRedirectAuthenticator.cs</Link>
+ </Compile>
+ <Compile Include="Core\IMobileServiceTable.Generic.cs" />
+ <Compile Include="Core\MobileServiceClient.Android.cs" />
+ <Compile Include="Core\MobileServiceClient.cs" />
+ <Compile Include="Core\MobileServiceClient.Managed.cs" />
+ <Compile Include="Core\MobileServiceTable.cs" />
+ <Compile Include="Core\MobileServiceTable.Generic.cs" />
+ <Compile Include="Properties\AssemblyInfo.cs" />
+ <Compile Include="ServiceFilter\ComposedServiceFilter.cs" />
+ <Compile Include="ServiceFilter\IServiceFilter.cs" />
+ <Compile Include="ServiceFilter\IServiceFilterContinuation.cs" />
+ <Compile Include="ServiceFilter\IServiceFilterRequest.cs" />
+ <Compile Include="ServiceFilter\ServiceFilter.cs" />
+ <Compile Include="ServiceFilter\ServiceFilterRequest.cs" />
+ <Compile Include="Table\Query\MobileServiceTableQuery.cs" />
+ <Compile Include="Table\Serialization\SerializableMember.cs" />
+ <Compile Include="Table\Serialization\SerializableType.cs" />
+ <Compile Include="TypeExtensions.cs" />
+ <Compile Include="Windows.Data.Json\JsonArray.cs" />
+ <Compile Include="Windows.Data.Json\JsonErrorStatus.cs" />
+ <Compile Include="Windows.Data.Json\WrappedJsonExtensions.cs" />
+ <Compile Include="Windows.Data.Json\JsonValue.cs" />
+ <Compile Include="Windows.Data.Json\IJsonValue.cs" />
+ <Compile Include="Windows.Data.Json\JsonObject.cs" />
+ <Compile Include="Windows.Data.Json\JsonValueType.cs" />
+ <Compile Include="Core\MobileServiceApplication.cs" />
+ </ItemGroup>
+ <Import Project="$(MSBuildExtensionsPath)\Novell\Novell.MonoDroid.CSharp.targets" />
+ <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
+ Other similar extension points exist, see Microsoft.Common.targets.
+ <Target Name="BeforeBuild">
+ </Target>
+ <Target Name="AfterBuild">
+ </Target>
+ -->
+</Project>
20 Azure/Microsoft.Azure.Zumo.Android/Microsoft.Azure.Zumo.Android.sln
@@ -0,0 +1,20 @@
+
+Microsoft Visual Studio Solution File, Format Version 11.00
+# Visual Studio 2010
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.Azure.Zumo.Android", "Microsoft.Azure.Zumo.Android.csproj", "{7B774D3A-9136-4ED8-B2D6-09E577F9EC63}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Any CPU = Debug|Any CPU
+ Release|Any CPU = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {7B774D3A-9136-4ED8-B2D6-09E577F9EC63}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {7B774D3A-9136-4ED8-B2D6-09E577F9EC63}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {7B774D3A-9136-4ED8-B2D6-09E577F9EC63}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {7B774D3A-9136-4ED8-B2D6-09E577F9EC63}.Release|Any CPU.Build.0 = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(MonoDevelopProperties) = preSolution
+ StartupItem = Microsoft.Azure.Zumo.Android.csproj
+ EndGlobalSection
+EndGlobal
29 Azure/Microsoft.Azure.Zumo.Android/Properties/AssemblyInfo.cs
@@ -0,0 +1,29 @@
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// General Information about an assembly is controlled through the following
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyTitle("Microsoft.Azure.Zumo.Android")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("Microsoft.Azure.Zumo.Android")]
+[assembly: AssemblyCopyright("Copyright © 2012")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+[assembly: ComVisible(false)]
+
+// Version information for an assembly consists of the following four values:
+//
+// Major Version
+// Minor Version
+// Build Number
+// Revision
+//
+// You can specify all the values or you can default the Build and Revision Numbers
+// by using the '*' as shown below:
+// [assembly: AssemblyVersion("1.0.*")]
+[assembly: AssemblyVersion("1.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]
113 Azure/Microsoft.Azure.Zumo.Android/ServiceFilter/ComposedServiceFilter.cs
@@ -0,0 +1,113 @@
+// ----------------------------------------------------------------------------
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// ----------------------------------------------------------------------------