diff options
author | Jason Smith <jason.smith@xamarin.com> | 2016-04-27 14:48:28 -0400 |
---|---|---|
committer | Rui Marinho <me@ruimarinho.net> | 2016-04-27 14:48:28 -0400 |
commit | 8a00a96ffb34058bfb03f8cc16c28b38a79791a4 (patch) | |
tree | 294842819c3b051e9b4050971475fda48431f109 /PagesGallery | |
parent | 2d9288eee6e6f197364a64308183725e7bd561f9 (diff) | |
download | xamarin-forms-8a00a96ffb34058bfb03f8cc16c28b38a79791a4.tar.gz xamarin-forms-8a00a96ffb34058bfb03f8cc16c28b38a79791a4.tar.bz2 xamarin-forms-8a00a96ffb34058bfb03f8cc16c28b38a79791a4.zip |
Azure support (#143)
* Initial import of azure support for pages
* Add nuspec for azure
* move azure nuspec to correct location
* Update Newtonsoft.Json to 6.0.4
* Add converters
* Fix package
Diffstat (limited to 'PagesGallery')
-rw-r--r-- | PagesGallery/PagesGallery.Droid/MainActivity.cs | 4 | ||||
-rw-r--r-- | PagesGallery/PagesGallery.Droid/PagesGallery.Droid.csproj | 28 | ||||
-rw-r--r-- | PagesGallery/PagesGallery.Droid/Properties/AndroidManifest.xml | 2 | ||||
-rw-r--r-- | PagesGallery/PagesGallery.Droid/app.config | 8 | ||||
-rw-r--r-- | PagesGallery/PagesGallery.Droid/packages.config | 6 | ||||
-rw-r--r-- | PagesGallery/PagesGallery.UWP/PagesGallery.UWP.csproj | 4 | ||||
-rw-r--r-- | PagesGallery/PagesGallery.UWP/project.json | 3 | ||||
-rw-r--r-- | PagesGallery/PagesGallery.iOS/PagesGallery.iOS.csproj | 11 | ||||
-rw-r--r-- | PagesGallery/PagesGallery.iOS/packages.config | 4 | ||||
-rw-r--r-- | PagesGallery/PagesGallery/EventsPage.xaml | 9 | ||||
-rw-r--r-- | PagesGallery/PagesGallery/PagesGallery.csproj | 11 | ||||
-rw-r--r-- | PagesGallery/PagesGallery/packages.config | 4 |
12 files changed, 60 insertions, 34 deletions
diff --git a/PagesGallery/PagesGallery.Droid/MainActivity.cs b/PagesGallery/PagesGallery.Droid/MainActivity.cs index b991250c..37f4a4ff 100644 --- a/PagesGallery/PagesGallery.Droid/MainActivity.cs +++ b/PagesGallery/PagesGallery.Droid/MainActivity.cs @@ -15,8 +15,10 @@ namespace PagesGallery.Droid ToolbarResource = Resource.Layout.Toolbar; TabLayoutResource = Resource.Layout.Tabbar; - base.OnCreate(bundle); + Microsoft.WindowsAzure.MobileServices.CurrentPlatform.Init(); + base.OnCreate(bundle); + Forms.Init(this, bundle); LoadApplication(new App()); } diff --git a/PagesGallery/PagesGallery.Droid/PagesGallery.Droid.csproj b/PagesGallery/PagesGallery.Droid/PagesGallery.Droid.csproj index 02e1434e..6312a948 100644 --- a/PagesGallery/PagesGallery.Droid/PagesGallery.Droid.csproj +++ b/PagesGallery/PagesGallery.Droid/PagesGallery.Droid.csproj @@ -48,19 +48,31 @@ <AndroidLinkMode>SdkOnly</AndroidLinkMode> </PropertyGroup> <ItemGroup> - <Reference Include="ModernHttpClient, Version=2.4.2.0, Culture=neutral, processorArchitecture=MSIL"> - <HintPath>..\..\packages\modernhttpclient.2.4.2\lib\MonoAndroid\ModernHttpClient.dll</HintPath> + <Reference Include="Microsoft.WindowsAzure.Mobile, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL"> + <HintPath>..\..\packages\Microsoft.Azure.Mobile.Client.2.0.1\lib\monoandroid\Microsoft.WindowsAzure.Mobile.dll</HintPath> + <Private>True</Private> + </Reference> + <Reference Include="Microsoft.WindowsAzure.Mobile.Ext, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL"> + <HintPath>..\..\packages\Microsoft.Azure.Mobile.Client.2.0.1\lib\monoandroid\Microsoft.WindowsAzure.Mobile.Ext.dll</HintPath> <Private>True</Private> </Reference> <Reference Include="Mono.Android" /> <Reference Include="mscorlib" /> - <Reference Include="OkHttp, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL"> - <HintPath>..\..\packages\modernhttpclient.2.4.2\lib\MonoAndroid\OkHttp.dll</HintPath> + <Reference Include="Newtonsoft.Json, Version=6.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL"> + <HintPath>..\..\packages\Newtonsoft.Json.6.0.4\lib\portable-net45+wp80+win8+wpa81\Newtonsoft.Json.dll</HintPath> <Private>True</Private> </Reference> <Reference Include="System" /> <Reference Include="System.Core" /> - <Reference Include="System.Xml.Linq" /> + <Reference Include="System.Net.Http" /> + <Reference Include="System.Net.Http.Extensions, Version=2.2.29.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL"> + <HintPath>..\..\packages\Microsoft.Net.Http.2.2.29\lib\monoandroid\System.Net.Http.Extensions.dll</HintPath> + <Private>True</Private> + </Reference> + <Reference Include="System.Net.Http.Primitives, Version=4.2.29.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL"> + <HintPath>..\..\packages\Microsoft.Net.Http.2.2.29\lib\monoandroid\System.Net.Http.Primitives.dll</HintPath> + <Private>True</Private> + </Reference> <Reference Include="System.Xml" /> <Reference Include="Xamarin.Android.Support.Animated.Vector.Drawable, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL"> <HintPath>..\..\packages\Xamarin.Android.Support.Animated.Vector.Drawable.23.3.0\lib\MonoAndroid403\Xamarin.Android.Support.Animated.Vector.Drawable.dll</HintPath> @@ -130,6 +142,10 @@ <Project>{57b8b73d-c3b5-4c42-869e-7b2f17d354ac}</Project> <Name>Xamarin.Forms.Core</Name> </ProjectReference> + <ProjectReference Include="..\..\Xamarin.Forms.Pages.Azure\Xamarin.Forms.Pages.Azure.csproj"> + <Project>{c9696465-7657-4843-872e-3c01891c4a9b}</Project> + <Name>Xamarin.Forms.Pages.Azure</Name> + </ProjectReference> <ProjectReference Include="..\..\Xamarin.Forms.Pages\Xamarin.Forms.Pages.csproj"> <Project>{d6133dbd-6c60-4bd5-bea2-07e0a3927c31}</Project> <Name>Xamarin.Forms.Pages</Name> @@ -161,7 +177,9 @@ <ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText> </PropertyGroup> <Error Condition="!Exists('..\..\packages\Xamarin.Android.Support.Vector.Drawable.23.3.0\build\Xamarin.Android.Support.Vector.Drawable.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\Xamarin.Android.Support.Vector.Drawable.23.3.0\build\Xamarin.Android.Support.Vector.Drawable.targets'))" /> + <Error Condition="!Exists('..\..\packages\Microsoft.Bcl.Build.1.0.21\build\Microsoft.Bcl.Build.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\Microsoft.Bcl.Build.1.0.21\build\Microsoft.Bcl.Build.targets'))" /> </Target> + <Import Project="..\..\packages\Microsoft.Bcl.Build.1.0.21\build\Microsoft.Bcl.Build.targets" Condition="Exists('..\..\packages\Microsoft.Bcl.Build.1.0.21\build\Microsoft.Bcl.Build.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"> diff --git a/PagesGallery/PagesGallery.Droid/Properties/AndroidManifest.xml b/PagesGallery/PagesGallery.Droid/Properties/AndroidManifest.xml index 1b619fc0..342b35e8 100644 --- a/PagesGallery/PagesGallery.Droid/Properties/AndroidManifest.xml +++ b/PagesGallery/PagesGallery.Droid/Properties/AndroidManifest.xml @@ -2,4 +2,4 @@ <manifest xmlns:android="http://schemas.android.com/apk/res/android"> <uses-sdk android:minSdkVersion="15" /> <application></application> -</manifest> +</manifest>
\ No newline at end of file diff --git a/PagesGallery/PagesGallery.Droid/app.config b/PagesGallery/PagesGallery.Droid/app.config index 4dd3b43c..d536bee7 100644 --- a/PagesGallery/PagesGallery.Droid/app.config +++ b/PagesGallery/PagesGallery.Droid/app.config @@ -6,6 +6,14 @@ <assemblyIdentity name="System.Net.Http" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" /> <bindingRedirect oldVersion="0.0.0.0-1.5.0.0" newVersion="1.5.0.0" /> </dependentAssembly> + <dependentAssembly> + <assemblyIdentity name="System.Net.Http.Primitives" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" /> + <bindingRedirect oldVersion="0.0.0.0-4.2.29.0" newVersion="4.2.29.0" /> + </dependentAssembly> + <dependentAssembly> + <assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" /> + <bindingRedirect oldVersion="0.0.0.0-7.0.0.0" newVersion="7.0.0.0" /> + </dependentAssembly> </assemblyBinding> </runtime> </configuration>
\ No newline at end of file diff --git a/PagesGallery/PagesGallery.Droid/packages.config b/PagesGallery/PagesGallery.Droid/packages.config index b11a3746..06afcedb 100644 --- a/PagesGallery/PagesGallery.Droid/packages.config +++ b/PagesGallery/PagesGallery.Droid/packages.config @@ -1,6 +1,10 @@ <?xml version="1.0" encoding="utf-8"?> <packages> - <package id="modernhttpclient" version="2.4.2" targetFramework="monoandroid60" /> + <package id="Microsoft.Azure.Mobile.Client" version="2.0.1" targetFramework="monoandroid60" /> + <package id="Microsoft.Bcl" version="1.1.10" targetFramework="monoandroid60" /> + <package id="Microsoft.Bcl.Build" version="1.0.21" targetFramework="monoandroid60" /> + <package id="Microsoft.Net.Http" version="2.2.29" targetFramework="monoandroid60" /> + <package id="Newtonsoft.Json" version="6.0.4" targetFramework="monoandroid60" /> <package id="Xamarin.Android.Support.Animated.Vector.Drawable" version="23.3.0" targetFramework="monoandroid60" /> <package id="Xamarin.Android.Support.Design" version="23.3.0" targetFramework="monoandroid60" /> <package id="Xamarin.Android.Support.v4" version="23.3.0" targetFramework="monoandroid60" /> diff --git a/PagesGallery/PagesGallery.UWP/PagesGallery.UWP.csproj b/PagesGallery/PagesGallery.UWP/PagesGallery.UWP.csproj index b72b6705..20760ecf 100644 --- a/PagesGallery/PagesGallery.UWP/PagesGallery.UWP.csproj +++ b/PagesGallery/PagesGallery.UWP/PagesGallery.UWP.csproj @@ -132,6 +132,10 @@ <Project>{57b8b73d-c3b5-4c42-869e-7b2f17d354ac}</Project> <Name>Xamarin.Forms.Core</Name> </ProjectReference> + <ProjectReference Include="..\..\Xamarin.Forms.Pages.Azure\Xamarin.Forms.Pages.Azure.csproj"> + <Project>{c9696465-7657-4843-872e-3c01891c4a9b}</Project> + <Name>Xamarin.Forms.Pages.Azure</Name> + </ProjectReference> <ProjectReference Include="..\..\Xamarin.Forms.Pages\Xamarin.Forms.Pages.csproj"> <Project>{d6133dbd-6c60-4bd5-bea2-07e0a3927c31}</Project> <Name>Xamarin.Forms.Pages</Name> diff --git a/PagesGallery/PagesGallery.UWP/project.json b/PagesGallery/PagesGallery.UWP/project.json index 226a07ce..c5949392 100644 --- a/PagesGallery/PagesGallery.UWP/project.json +++ b/PagesGallery/PagesGallery.UWP/project.json @@ -1,7 +1,6 @@ { "dependencies": { - "Microsoft.NETCore.UniversalWindowsPlatform": "5.0.0", - "modernhttpclient": "2.4.2" + "Microsoft.NETCore.UniversalWindowsPlatform": "5.0.0" }, "frameworks": { "uap10.0": {} diff --git a/PagesGallery/PagesGallery.iOS/PagesGallery.iOS.csproj b/PagesGallery/PagesGallery.iOS/PagesGallery.iOS.csproj index 8607831c..685e8084 100644 --- a/PagesGallery/PagesGallery.iOS/PagesGallery.iOS.csproj +++ b/PagesGallery/PagesGallery.iOS/PagesGallery.iOS.csproj @@ -96,9 +96,6 @@ <Compile Include="Properties\AssemblyInfo.cs" /> <ITunesArtwork Include="iTunesArtwork" /> <ITunesArtwork Include="iTunesArtwork@2x" /> - <None Include="packages.config"> - <SubType>Designer</SubType> - </None> </ItemGroup> <ItemGroup> <ProjectReference Include="..\..\Stubs\Xamarin.Forms.Platform.iOS\Xamarin.Forms.Platform.iOS %28Forwarders%29.csproj"> @@ -109,6 +106,10 @@ <Project>{57b8b73d-c3b5-4c42-869e-7b2f17d354ac}</Project> <Name>Xamarin.Forms.Core</Name> </ProjectReference> + <ProjectReference Include="..\..\Xamarin.Forms.Pages.Azure\Xamarin.Forms.Pages.Azure.csproj"> + <Project>{c9696465-7657-4843-872e-3c01891c4a9b}</Project> + <Name>Xamarin.Forms.Pages.Azure</Name> + </ProjectReference> <ProjectReference Include="..\..\Xamarin.Forms.Pages\Xamarin.Forms.Pages.csproj"> <Project>{d6133dbd-6c60-4bd5-bea2-07e0a3927c31}</Project> <Name>Xamarin.Forms.Pages</Name> @@ -146,10 +147,6 @@ <InterfaceDefinition Include="Resources\LaunchScreen.storyboard" /> </ItemGroup> <ItemGroup> - <Reference Include="ModernHttpClient, Version=2.4.2.0, Culture=neutral, processorArchitecture=MSIL"> - <HintPath>..\..\packages\modernhttpclient.2.4.2\lib\Xamarin.iOS10\ModernHttpClient.dll</HintPath> - <Private>True</Private> - </Reference> <Reference Include="System" /> <Reference Include="System.Xml" /> <Reference Include="System.Core" /> diff --git a/PagesGallery/PagesGallery.iOS/packages.config b/PagesGallery/PagesGallery.iOS/packages.config deleted file mode 100644 index f0eba649..00000000 --- a/PagesGallery/PagesGallery.iOS/packages.config +++ /dev/null @@ -1,4 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<packages> - <package id="modernhttpclient" version="2.4.2" targetFramework="xamarinios10" /> -</packages>
\ No newline at end of file diff --git a/PagesGallery/PagesGallery/EventsPage.xaml b/PagesGallery/PagesGallery/EventsPage.xaml index 2d7abafd..ab1c14b9 100644 --- a/PagesGallery/PagesGallery/EventsPage.xaml +++ b/PagesGallery/PagesGallery/EventsPage.xaml @@ -2,16 +2,21 @@ <p:ListDataPage xmlns="http://xamarin.com/schemas/2014/forms" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" xmlns:p="clr-namespace:Xamarin.Forms.Pages;assembly=Xamarin.Forms.Pages" + xmlns:azure="clr-namespace:Xamarin.Forms.Pages.Azure;assembly=Xamarin.Forms.Pages.Azure" x:Class="PagesGallery.EventsPage" Title="Events" DetailTemplate="{StaticResource EventDetailTemplate}" Style="{StaticResource EventPageStyle}"> <p:DataPage.DataSource> - <p:JsonDataSource Source="http://demo7391822.mockable.io/events" /> + <azure:AzureDataSource> + <azure:AzureDataSource.Source> + <azure:AzureEasyTableSource Uri="http://evolvedemo.azurewebsites.net" TableName="Employee" /> + </azure:AzureDataSource.Source> + </azure:AzureDataSource> </p:DataPage.DataSource> <p:DataPage.DefaultItemTemplate> <DataTemplate> - <TextCell Text="{Binding Value[name]}" Detail="{Binding Value[presenter]}" /> + <TextCell Text="{Binding Value[firstName]}" Detail="{Binding Value[companyName]}" /> </DataTemplate> </p:DataPage.DefaultItemTemplate> </p:ListDataPage>
\ No newline at end of file diff --git a/PagesGallery/PagesGallery/PagesGallery.csproj b/PagesGallery/PagesGallery/PagesGallery.csproj index 19fdfbb6..7b30f828 100644 --- a/PagesGallery/PagesGallery/PagesGallery.csproj +++ b/PagesGallery/PagesGallery/PagesGallery.csproj @@ -49,13 +49,16 @@ </ItemGroup> <ItemGroup> <None Include="GettingStarted.Xamarin" /> - <None Include="packages.config" /> </ItemGroup> <ItemGroup> <ProjectReference Include="..\..\Xamarin.Forms.Core\Xamarin.Forms.Core.csproj"> <Project>{57b8b73d-c3b5-4c42-869e-7b2f17d354ac}</Project> <Name>Xamarin.Forms.Core</Name> </ProjectReference> + <ProjectReference Include="..\..\Xamarin.Forms.Pages.Azure\Xamarin.Forms.Pages.Azure.csproj"> + <Project>{c9696465-7657-4843-872e-3c01891c4a9b}</Project> + <Name>Xamarin.Forms.Pages.Azure</Name> + </ProjectReference> <ProjectReference Include="..\..\Xamarin.Forms.Pages\Xamarin.Forms.Pages.csproj"> <Project>{d6133dbd-6c60-4bd5-bea2-07e0a3927c31}</Project> <Name>Xamarin.Forms.Pages</Name> @@ -87,12 +90,6 @@ <SubType>Designer</SubType> </EmbeddedResource> </ItemGroup> - <ItemGroup> - <Reference Include="ModernHttpClient, Version=2.4.2.0, Culture=neutral, processorArchitecture=MSIL"> - <HintPath>..\..\packages\modernhttpclient.2.4.2\lib\Portable-Net45+WinRT45+WP8+WPA81\ModernHttpClient.dll</HintPath> - <Private>True</Private> - </Reference> - </ItemGroup> <Import Project="$(MSBuildExtensionsPath32)\Microsoft\Portable\$(TargetFrameworkVersion)\Microsoft.Portable.CSharp.targets" /> <Import Project="..\..\.nuspec\Xamarin.Forms.targets" /> <!-- To modify your build process, add your task inside one of the targets below and uncomment it. diff --git a/PagesGallery/PagesGallery/packages.config b/PagesGallery/PagesGallery/packages.config deleted file mode 100644 index 8f0534f1..00000000 --- a/PagesGallery/PagesGallery/packages.config +++ /dev/null @@ -1,4 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<packages> - <package id="modernhttpclient" version="2.4.2" targetFramework="portable45-net45+win8+wp8+wpa81" /> -</packages>
\ No newline at end of file |