Merge branch 'Dev' of https://github.com/dotnet/eShopOnContainers.git
This commit is contained in:
		
						commit
						f6e0161245
					
				| @ -42,13 +42,13 @@ dotnet publish $orderingPathToJson -o $orderingPathToPub | |||||||
| 
 | 
 | ||||||
| #*** Basket service image *** | #*** Basket service image *** | ||||||
| $basketPathToJson = $scriptPath + "\src\Services\Basket\Basket.API\project.json" | $basketPathToJson = $scriptPath + "\src\Services\Basket\Basket.API\project.json" | ||||||
| Write-Host "basketPathToJson is $orderingPathToJson" -ForegroundColor Yellow | Write-Host "basketPathToJson is $basketPathToJson" -ForegroundColor Yellow | ||||||
| $basketPathToPub = $scriptPath + "\pub\basket" | $basketPathToPub = $scriptPath + "\pub\basket" | ||||||
| Write-Host "basketPathToPub is $basketPathToPub" -ForegroundColor Yellow | Write-Host "basketPathToPub is $basketPathToPub" -ForegroundColor Yellow | ||||||
| 
 | 
 | ||||||
| Write-Host "Restore Dependencies just in case as it is needed to run dotnet publish" -ForegroundColor Blue | Write-Host "Restore Dependencies just in case as it is needed to run dotnet publish" -ForegroundColor Blue | ||||||
| dotnet restore $basketPathToJson | dotnet restore $basketPathToJson | ||||||
| dotnet build $basketPathToPub | dotnet build $basketPathToJson | ||||||
| dotnet publish $basketPathToJson -o $basketPathToPub | dotnet publish $basketPathToJson -o $basketPathToPub | ||||||
| 
 | 
 | ||||||
| docker build -t eshop/web $webPathToPub | docker build -t eshop/web $webPathToPub | ||||||
|  | |||||||
| @ -14,6 +14,7 @@ services: | |||||||
|     depends_on: |     depends_on: | ||||||
|       - catalog.api |       - catalog.api | ||||||
|       - identity.data |       - identity.data | ||||||
|  |       - basket.api | ||||||
| 
 | 
 | ||||||
|   catalog.api: |   catalog.api: | ||||||
|     image: eshop/catalog.api |     image: eshop/catalog.api | ||||||
| @ -39,7 +40,7 @@ services: | |||||||
|     environment: |     environment: | ||||||
|       - ConnectionString=Server=ordering.data;Database=Microsoft.eShopOnContainers.Services.OrderingDb;User Id=sa;Password=Pass@word |       - ConnectionString=Server=ordering.data;Database=Microsoft.eShopOnContainers.Services.OrderingDb;User Id=sa;Password=Pass@word | ||||||
|     ports: |     ports: | ||||||
|       - "81:80" |       - "5102:80" | ||||||
| # (Go to Production): For secured/final deployment, remove Ports mapping and | # (Go to Production): For secured/final deployment, remove Ports mapping and | ||||||
| # leave just the internal expose section  | # leave just the internal expose section  | ||||||
| #    expose: | #    expose: | ||||||
| @ -61,3 +62,18 @@ services: | |||||||
|       - ACCEPT_EULA=Y |       - ACCEPT_EULA=Y | ||||||
|     ports: |     ports: | ||||||
|       - "5433:1433" |       - "5433:1433" | ||||||
|  | 
 | ||||||
|  |   basket.api: | ||||||
|  |     image: eshop/basket.api | ||||||
|  |     environment: | ||||||
|  |       - ConnectionString=basket.data | ||||||
|  |     build: | ||||||
|  |       context: . | ||||||
|  |       dockerfile: Dockerfile | ||||||
|  |     ports: | ||||||
|  |       - "5103:80" | ||||||
|  |     depends_on: | ||||||
|  |       - basket.data | ||||||
|  | 
 | ||||||
|  |   basket.data: | ||||||
|  |     image: redis | ||||||
| @ -2,7 +2,8 @@ | |||||||
|   "projects": [ |   "projects": [ | ||||||
|     "src", |     "src", | ||||||
|     "test", |     "test", | ||||||
|     "src/Services/Ordering" |     "src/Services/Ordering", | ||||||
|  |     "src/Web" | ||||||
|   ], |   ], | ||||||
| 
 | 
 | ||||||
|   "sdk": { |   "sdk": { | ||||||
|  | |||||||
| @ -17,7 +17,7 @@ | |||||||
|     <GenerateSerializationAssemblies>Off</GenerateSerializationAssemblies> |     <GenerateSerializationAssemblies>Off</GenerateSerializationAssemblies> | ||||||
|     <AndroidManifest>Properties\AndroidManifest.xml</AndroidManifest> |     <AndroidManifest>Properties\AndroidManifest.xml</AndroidManifest> | ||||||
|     <AndroidUseLatestPlatformSdk>true</AndroidUseLatestPlatformSdk> |     <AndroidUseLatestPlatformSdk>true</AndroidUseLatestPlatformSdk> | ||||||
|     <TargetFrameworkVersion>v7.0</TargetFrameworkVersion> |     <TargetFrameworkVersion>v6.0</TargetFrameworkVersion> | ||||||
|     <AndroidSupportedAbis>armeabi,armeabi-v7a,x86</AndroidSupportedAbis> |     <AndroidSupportedAbis>armeabi,armeabi-v7a,x86</AndroidSupportedAbis> | ||||||
|     <AndroidStoreUncompressedFileExtensions /> |     <AndroidStoreUncompressedFileExtensions /> | ||||||
|     <MandroidI18n /> |     <MandroidI18n /> | ||||||
|  | |||||||
| @ -0,0 +1,322 @@ | |||||||
|  | <?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>{62DBB163-9CA9-4818-B48B-13233DF37C24}</ProjectGuid> | ||||||
|  |     <ProjectTypeGuids>{EFBA0AD7-5A72-4C68-AF49-83D382785DCF};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids> | ||||||
|  |     <OutputType>Library</OutputType> | ||||||
|  |     <AppDesignerFolder>Properties</AppDesignerFolder> | ||||||
|  |     <RootNamespace>eShopOnContainers.Droid</RootNamespace> | ||||||
|  |     <AssemblyName>eShopOnContainers.Droid</AssemblyName> | ||||||
|  |     <FileAlignment>512</FileAlignment> | ||||||
|  |     <AndroidApplication>true</AndroidApplication> | ||||||
|  |     <AndroidResgenFile>Resources\Resource.Designer.cs</AndroidResgenFile> | ||||||
|  |     <GenerateSerializationAssemblies>Off</GenerateSerializationAssemblies> | ||||||
|  |     <AndroidManifest>Properties\AndroidManifest.xml</AndroidManifest> | ||||||
|  |     <AndroidUseLatestPlatformSdk>true</AndroidUseLatestPlatformSdk> | ||||||
|  |     <TargetFrameworkVersion>v7.0</TargetFrameworkVersion> | ||||||
|  |     <AndroidSupportedAbis>armeabi,armeabi-v7a,x86</AndroidSupportedAbis> | ||||||
|  |     <AndroidStoreUncompressedFileExtensions /> | ||||||
|  |     <MandroidI18n /> | ||||||
|  |     <JavaMaximumHeapSize /> | ||||||
|  |     <JavaOptions /> | ||||||
|  |     <NuGetPackageImportStamp> | ||||||
|  |     </NuGetPackageImportStamp> | ||||||
|  |   </PropertyGroup> | ||||||
|  |   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> | ||||||
|  |     <DebugSymbols>True</DebugSymbols> | ||||||
|  |     <DebugType>full</DebugType> | ||||||
|  |     <Optimize>false</Optimize> | ||||||
|  |     <OutputPath>bin\Debug\</OutputPath> | ||||||
|  |     <DefineConstants>DEBUG;TRACE</DefineConstants> | ||||||
|  |     <ErrorReport>prompt</ErrorReport> | ||||||
|  |     <WarningLevel>4</WarningLevel> | ||||||
|  |     <AndroidUseSharedRuntime>True</AndroidUseSharedRuntime> | ||||||
|  |     <AndroidLinkMode>None</AndroidLinkMode> | ||||||
|  |     <EmbedAssembliesIntoApk>False</EmbedAssembliesIntoApk> | ||||||
|  |     <BundleAssemblies>False</BundleAssemblies> | ||||||
|  |     <AndroidCreatePackagePerAbi>False</AndroidCreatePackagePerAbi> | ||||||
|  |     <JavaMaximumHeapSize>1G</JavaMaximumHeapSize> | ||||||
|  |     <Debugger>Xamarin</Debugger> | ||||||
|  |     <AotAssemblies>False</AotAssemblies> | ||||||
|  |     <EnableLLVM>False</EnableLLVM> | ||||||
|  |     <AndroidEnableMultiDex>False</AndroidEnableMultiDex> | ||||||
|  |     <EnableProguard>False</EnableProguard> | ||||||
|  |   </PropertyGroup> | ||||||
|  |   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> | ||||||
|  |     <DebugType>pdbonly</DebugType> | ||||||
|  |     <Optimize>true</Optimize> | ||||||
|  |     <OutputPath>bin\Release\</OutputPath> | ||||||
|  |     <DefineConstants>TRACE</DefineConstants> | ||||||
|  |     <ErrorReport>prompt</ErrorReport> | ||||||
|  |     <WarningLevel>4</WarningLevel> | ||||||
|  |     <AndroidUseSharedRuntime>False</AndroidUseSharedRuntime> | ||||||
|  |     <AndroidLinkMode>SdkOnly</AndroidLinkMode> | ||||||
|  |   </PropertyGroup> | ||||||
|  |   <ItemGroup> | ||||||
|  |     <Reference Include="Acr.Support.Android, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL"> | ||||||
|  |       <HintPath>..\..\packages\Acr.Support.2.1.0\lib\MonoAndroid10\Acr.Support.Android.dll</HintPath> | ||||||
|  |       <Private>True</Private> | ||||||
|  |     </Reference> | ||||||
|  |     <Reference Include="Acr.UserDialogs, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL"> | ||||||
|  |       <HintPath>..\..\packages\Acr.UserDialogs.6.3.1\lib\MonoAndroid10\Acr.UserDialogs.dll</HintPath> | ||||||
|  |       <Private>True</Private> | ||||||
|  |     </Reference> | ||||||
|  |     <Reference Include="Acr.UserDialogs.Interface, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL"> | ||||||
|  |       <HintPath>..\..\packages\Acr.UserDialogs.6.3.1\lib\MonoAndroid10\Acr.UserDialogs.Interface.dll</HintPath> | ||||||
|  |       <Private>True</Private> | ||||||
|  |     </Reference> | ||||||
|  |     <Reference Include="AndHUD, Version=1.2.0.0, Culture=neutral, processorArchitecture=MSIL"> | ||||||
|  |       <HintPath>..\..\packages\AndHUD.1.2.0\lib\MonoAndroid\AndHUD.dll</HintPath> | ||||||
|  |       <Private>True</Private> | ||||||
|  |     </Reference> | ||||||
|  |     <Reference Include="FFImageLoading, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL"> | ||||||
|  |       <HintPath>..\..\packages\Xamarin.FFImageLoading.2.2.6-pre-232\lib\MonoAndroid10\FFImageLoading.dll</HintPath> | ||||||
|  |       <Private>True</Private> | ||||||
|  |     </Reference> | ||||||
|  |     <Reference Include="FFImageLoading.Forms, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL"> | ||||||
|  |       <HintPath>..\..\packages\Xamarin.FFImageLoading.Forms.2.2.6-pre-232\lib\MonoAndroid10\FFImageLoading.Forms.dll</HintPath> | ||||||
|  |       <Private>True</Private> | ||||||
|  |     </Reference> | ||||||
|  |     <Reference Include="FFImageLoading.Forms.Droid, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL"> | ||||||
|  |       <HintPath>..\..\packages\Xamarin.FFImageLoading.Forms.2.2.6-pre-232\lib\MonoAndroid10\FFImageLoading.Forms.Droid.dll</HintPath> | ||||||
|  |       <Private>True</Private> | ||||||
|  |     </Reference> | ||||||
|  |     <Reference Include="FFImageLoading.Platform, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL"> | ||||||
|  |       <HintPath>..\..\packages\Xamarin.FFImageLoading.2.2.6-pre-232\lib\MonoAndroid10\FFImageLoading.Platform.dll</HintPath> | ||||||
|  |       <Private>True</Private> | ||||||
|  |     </Reference> | ||||||
|  |     <Reference Include="FormsViewGroup, Version=2.0.0.0, Culture=neutral, processorArchitecture=MSIL"> | ||||||
|  |       <HintPath>..\..\packages\Xamarin.Forms.2.3.2.127\lib\MonoAndroid10\FormsViewGroup.dll</HintPath> | ||||||
|  |       <Private>True</Private> | ||||||
|  |     </Reference> | ||||||
|  |     <Reference Include="Microsoft.Practices.ServiceLocation, Version=1.3.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL"> | ||||||
|  |       <HintPath>..\..\packages\CommonServiceLocator.1.3\lib\portable-net4+sl5+netcore45+wpa81+wp8\Microsoft.Practices.ServiceLocation.dll</HintPath> | ||||||
|  |       <Private>True</Private> | ||||||
|  |     </Reference> | ||||||
|  |     <Reference Include="Microsoft.Practices.Unity, Version=4.0.0.0, Culture=neutral, PublicKeyToken=6d32ff45e0ccc69f, processorArchitecture=MSIL"> | ||||||
|  |       <HintPath>..\..\packages\Unity.4.0.1\lib\portable-net45+wp80+win8+wpa81+MonoAndroid10+MonoTouch10\Microsoft.Practices.Unity.dll</HintPath> | ||||||
|  |       <Private>True</Private> | ||||||
|  |     </Reference> | ||||||
|  |     <Reference Include="ModernHttpClient, Version=2.4.2.0, Culture=neutral, processorArchitecture=MSIL"> | ||||||
|  |       <HintPath>..\..\packages\modernhttpclient.2.4.2\lib\MonoAndroid\ModernHttpClient.dll</HintPath> | ||||||
|  |       <Private>True</Private> | ||||||
|  |     </Reference> | ||||||
|  |     <Reference Include="Mono.Android" /> | ||||||
|  |     <Reference Include="mscorlib" /> | ||||||
|  |     <Reference Include="Newtonsoft.Json, Version=8.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL"> | ||||||
|  |       <HintPath>..\..\packages\Newtonsoft.Json.8.0.3\lib\portable-net40+sl5+wp80+win8+wpa81\Newtonsoft.Json.dll</HintPath> | ||||||
|  |       <Private>True</Private> | ||||||
|  |     </Reference> | ||||||
|  |     <Reference Include="OkHttp, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL"> | ||||||
|  |       <HintPath>..\..\packages\modernhttpclient.2.4.2\lib\MonoAndroid\OkHttp.dll</HintPath> | ||||||
|  |       <Private>True</Private> | ||||||
|  |     </Reference> | ||||||
|  |     <Reference Include="SlideOverKit, Version=1.0.6135.18790, Culture=neutral, processorArchitecture=MSIL"> | ||||||
|  |       <HintPath>..\..\packages\SlideOverKit.2.1.4\lib\MonoAndroid10\SlideOverKit.dll</HintPath> | ||||||
|  |       <Private>True</Private> | ||||||
|  |     </Reference> | ||||||
|  |     <Reference Include="SlideOverKit.Droid, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL"> | ||||||
|  |       <HintPath>..\..\packages\SlideOverKit.2.1.4\lib\MonoAndroid10\SlideOverKit.Droid.dll</HintPath> | ||||||
|  |       <Private>True</Private> | ||||||
|  |     </Reference> | ||||||
|  |     <Reference Include="Splat, Version=1.6.2.0, Culture=neutral, processorArchitecture=MSIL"> | ||||||
|  |       <HintPath>..\..\packages\Splat.1.6.2\lib\monoandroid\Splat.dll</HintPath> | ||||||
|  |       <Private>True</Private> | ||||||
|  |     </Reference> | ||||||
|  |     <Reference Include="System" /> | ||||||
|  |     <Reference Include="System.Core" /> | ||||||
|  |     <Reference Include="System.ObjectModel" /> | ||||||
|  |     <Reference Include="System.Xml.Linq" /> | ||||||
|  |     <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> | ||||||
|  |       <Private>True</Private> | ||||||
|  |     </Reference> | ||||||
|  |     <Reference Include="Xamarin.Android.Support.Design, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL"> | ||||||
|  |       <HintPath>..\..\packages\Xamarin.Android.Support.Design.23.3.0\lib\MonoAndroid43\Xamarin.Android.Support.Design.dll</HintPath> | ||||||
|  |       <Private>True</Private> | ||||||
|  |     </Reference> | ||||||
|  |     <Reference Include="Xamarin.Android.Support.v4, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL"> | ||||||
|  |       <HintPath>..\..\packages\Xamarin.Android.Support.v4.23.3.0\lib\MonoAndroid403\Xamarin.Android.Support.v4.dll</HintPath> | ||||||
|  |       <Private>True</Private> | ||||||
|  |     </Reference> | ||||||
|  |     <Reference Include="Xamarin.Android.Support.v7.AppCompat, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL"> | ||||||
|  |       <HintPath>..\..\packages\Xamarin.Android.Support.v7.AppCompat.23.3.0\lib\MonoAndroid403\Xamarin.Android.Support.v7.AppCompat.dll</HintPath> | ||||||
|  |       <Private>True</Private> | ||||||
|  |     </Reference> | ||||||
|  |     <Reference Include="Xamarin.Android.Support.v7.CardView, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL"> | ||||||
|  |       <HintPath>..\..\packages\Xamarin.Android.Support.v7.CardView.23.3.0\lib\MonoAndroid403\Xamarin.Android.Support.v7.CardView.dll</HintPath> | ||||||
|  |       <Private>True</Private> | ||||||
|  |     </Reference> | ||||||
|  |     <Reference Include="Xamarin.Android.Support.v7.MediaRouter, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL"> | ||||||
|  |       <HintPath>..\..\packages\Xamarin.Android.Support.v7.MediaRouter.23.3.0\lib\MonoAndroid403\Xamarin.Android.Support.v7.MediaRouter.dll</HintPath> | ||||||
|  |       <Private>True</Private> | ||||||
|  |     </Reference> | ||||||
|  |     <Reference Include="Xamarin.Android.Support.v7.RecyclerView, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL"> | ||||||
|  |       <HintPath>..\..\packages\Xamarin.Android.Support.v7.RecyclerView.23.3.0\lib\MonoAndroid403\Xamarin.Android.Support.v7.RecyclerView.dll</HintPath> | ||||||
|  |       <Private>True</Private> | ||||||
|  |     </Reference> | ||||||
|  |     <Reference Include="Xamarin.Android.Support.Vector.Drawable, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL"> | ||||||
|  |       <HintPath>..\..\packages\Xamarin.Android.Support.Vector.Drawable.23.3.0\lib\MonoAndroid403\Xamarin.Android.Support.Vector.Drawable.dll</HintPath> | ||||||
|  |       <Private>True</Private> | ||||||
|  |     </Reference> | ||||||
|  |     <Reference Include="Xamarin.Forms.Core, Version=2.0.0.0, Culture=neutral, processorArchitecture=MSIL"> | ||||||
|  |       <HintPath>..\..\packages\Xamarin.Forms.2.3.2.127\lib\MonoAndroid10\Xamarin.Forms.Core.dll</HintPath> | ||||||
|  |       <Private>True</Private> | ||||||
|  |     </Reference> | ||||||
|  |     <Reference Include="Xamarin.Forms.Pages, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL"> | ||||||
|  |       <HintPath>..\..\packages\Xamarin.Forms.Pages.2.3.2.118-pre1\lib\MonoAndroid10\Xamarin.Forms.Pages.dll</HintPath> | ||||||
|  |       <Private>True</Private> | ||||||
|  |     </Reference> | ||||||
|  |     <Reference Include="Xamarin.Forms.Platform, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL"> | ||||||
|  |       <HintPath>..\..\packages\Xamarin.Forms.2.3.2.127\lib\MonoAndroid10\Xamarin.Forms.Platform.dll</HintPath> | ||||||
|  |       <Private>True</Private> | ||||||
|  |     </Reference> | ||||||
|  |     <Reference Include="Xamarin.Forms.Platform.Android, Version=2.0.0.0, Culture=neutral, processorArchitecture=MSIL"> | ||||||
|  |       <HintPath>..\..\packages\Xamarin.Forms.2.3.2.127\lib\MonoAndroid10\Xamarin.Forms.Platform.Android.dll</HintPath> | ||||||
|  |       <Private>True</Private> | ||||||
|  |     </Reference> | ||||||
|  |     <Reference Include="Xamarin.Forms.Theme.Android, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL"> | ||||||
|  |       <HintPath>..\..\packages\Xamarin.Forms.Theme.Base.1.0.0.43-pre1\lib\MonoAndroid10\Xamarin.Forms.Theme.Android.dll</HintPath> | ||||||
|  |       <Private>True</Private> | ||||||
|  |     </Reference> | ||||||
|  |     <Reference Include="Xamarin.Forms.Theme.Base, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL"> | ||||||
|  |       <HintPath>..\..\packages\Xamarin.Forms.Theme.Base.1.0.0.43-pre1\lib\MonoAndroid10\Xamarin.Forms.Theme.Base.dll</HintPath> | ||||||
|  |       <Private>True</Private> | ||||||
|  |     </Reference> | ||||||
|  |     <Reference Include="Xamarin.Forms.Theme.Light, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL"> | ||||||
|  |       <HintPath>..\..\packages\Xamarin.Forms.Theme.Light.1.0.0.43-pre1\lib\MonoAndroid10\Xamarin.Forms.Theme.Light.dll</HintPath> | ||||||
|  |       <Private>True</Private> | ||||||
|  |     </Reference> | ||||||
|  |     <Reference Include="Xamarin.Forms.Xaml, Version=2.0.0.0, Culture=neutral, processorArchitecture=MSIL"> | ||||||
|  |       <HintPath>..\..\packages\Xamarin.Forms.2.3.2.127\lib\MonoAndroid10\Xamarin.Forms.Xaml.dll</HintPath> | ||||||
|  |       <Private>True</Private> | ||||||
|  |     </Reference> | ||||||
|  |   </ItemGroup> | ||||||
|  |   <ItemGroup> | ||||||
|  |     <Compile Include="Activities\MainActivity.cs" /> | ||||||
|  |     <Compile Include="Activities\SplashActivity.cs" /> | ||||||
|  |     <Compile Include="Effects\EntryLineColorEffect.cs" /> | ||||||
|  |     <Compile Include="Extensions\ViewExtensions.cs" /> | ||||||
|  |     <Compile Include="Renderers\BadgeView.cs" /> | ||||||
|  |     <Compile Include="Renderers\CustomTabbedPageRenderer.cs" /> | ||||||
|  |     <Compile Include="Renderers\SlideDownMenuPageRenderer.cs" /> | ||||||
|  |     <Compile Include="Resources\Resource.Designer.cs" /> | ||||||
|  |     <Compile Include="Properties\AssemblyInfo.cs" /> | ||||||
|  |   </ItemGroup> | ||||||
|  |   <ItemGroup> | ||||||
|  |     <AndroidAsset Include="..\CommonResources\Fonts\Montserrat-Bold.ttf"> | ||||||
|  |       <Link>Assets\Montserrat-Bold.ttf</Link> | ||||||
|  |     </AndroidAsset> | ||||||
|  |     <AndroidAsset Include="..\CommonResources\Fonts\Montserrat-Regular.ttf"> | ||||||
|  |       <Link>Assets\Montserrat-Regular.ttf</Link> | ||||||
|  |     </AndroidAsset> | ||||||
|  |     <AndroidAsset Include="..\CommonResources\Fonts\SourceSansPro-Regular.ttf"> | ||||||
|  |       <Link>Assets\SourceSansPro-Regular.ttf</Link> | ||||||
|  |     </AndroidAsset> | ||||||
|  |     <None Include="app.config" /> | ||||||
|  |     <None Include="packages.config" /> | ||||||
|  |     <None Include="Resources\AboutResources.txt" /> | ||||||
|  |     <None Include="Assets\AboutAssets.txt" /> | ||||||
|  |     <AndroidResource Include="Resources\layout\Tabs.axml"> | ||||||
|  |       <SubType>Designer</SubType> | ||||||
|  |     </AndroidResource> | ||||||
|  |     <AndroidResource Include="Resources\layout\Toolbar.axml"> | ||||||
|  |       <SubType>Designer</SubType> | ||||||
|  |     </AndroidResource> | ||||||
|  |     <AndroidResource Include="Resources\layout\TabLayout.axml"> | ||||||
|  |       <SubType>Designer</SubType> | ||||||
|  |     </AndroidResource> | ||||||
|  |   </ItemGroup> | ||||||
|  |   <ItemGroup> | ||||||
|  |     <AndroidResource Include="Resources\drawable\icon.png" /> | ||||||
|  |     <AndroidResource Include="Resources\drawable-hdpi\icon.png" /> | ||||||
|  |     <AndroidResource Include="Resources\drawable-xhdpi\icon.png" /> | ||||||
|  |     <AndroidResource Include="Resources\drawable-xxhdpi\icon.png" /> | ||||||
|  |   </ItemGroup> | ||||||
|  |   <ItemGroup> | ||||||
|  |     <None Include="Properties\AndroidManifest.xml" /> | ||||||
|  |   </ItemGroup> | ||||||
|  |   <ItemGroup> | ||||||
|  |     <AndroidResource Include="Resources\values\styles.xml" /> | ||||||
|  |   </ItemGroup> | ||||||
|  |   <ItemGroup> | ||||||
|  |     <ProjectReference Include="..\eShopOnContainers.Core\eShopOnContainers.Core.csproj"> | ||||||
|  |       <Project>{65116d1c-145b-4693-abda-f0fb6f425191}</Project> | ||||||
|  |       <Name>eShopOnContainers.Core</Name> | ||||||
|  |     </ProjectReference> | ||||||
|  |   </ItemGroup> | ||||||
|  |   <ItemGroup> | ||||||
|  |     <AndroidResource Include="Resources\drawable\splash_drawable.xml" /> | ||||||
|  |   </ItemGroup> | ||||||
|  |   <ItemGroup> | ||||||
|  |     <AndroidResource Include="Resources\drawable\fake_product_01.png" /> | ||||||
|  |   </ItemGroup> | ||||||
|  |   <ItemGroup> | ||||||
|  |     <AndroidResource Include="Resources\drawable\fake_product_03.png" /> | ||||||
|  |   </ItemGroup> | ||||||
|  |   <ItemGroup> | ||||||
|  |     <AndroidResource Include="Resources\drawable\fake_product_02.png" /> | ||||||
|  |   </ItemGroup> | ||||||
|  |   <ItemGroup> | ||||||
|  |     <AndroidResource Include="Resources\drawable-hdpi\menu_filter.png" /> | ||||||
|  |   </ItemGroup> | ||||||
|  |   <ItemGroup> | ||||||
|  |     <AndroidResource Include="Resources\drawable-xhdpi\menu_filter.png" /> | ||||||
|  |   </ItemGroup> | ||||||
|  |   <ItemGroup> | ||||||
|  |     <AndroidResource Include="Resources\drawable-xxhdpi\menu_filter.png" /> | ||||||
|  |   </ItemGroup> | ||||||
|  |   <ItemGroup> | ||||||
|  |     <AndroidResource Include="Resources\drawable-hdpi\menu_profile.png" /> | ||||||
|  |   </ItemGroup> | ||||||
|  |   <ItemGroup> | ||||||
|  |     <AndroidResource Include="Resources\drawable-xhdpi\menu_profile.png" /> | ||||||
|  |   </ItemGroup> | ||||||
|  |   <ItemGroup> | ||||||
|  |     <AndroidResource Include="Resources\drawable-xxhdpi\menu_profile.png" /> | ||||||
|  |   </ItemGroup> | ||||||
|  |   <ItemGroup> | ||||||
|  |     <AndroidResource Include="Resources\drawable-hdpi\menu_cart.png" /> | ||||||
|  |   </ItemGroup> | ||||||
|  |   <ItemGroup> | ||||||
|  |     <AndroidResource Include="Resources\drawable-xhdpi\menu_cart.png" /> | ||||||
|  |   </ItemGroup> | ||||||
|  |   <ItemGroup> | ||||||
|  |     <AndroidResource Include="Resources\drawable-xxhdpi\menu_cart.png" /> | ||||||
|  |   </ItemGroup> | ||||||
|  |   <ItemGroup> | ||||||
|  |     <AndroidResource Include="Resources\drawable-xxhdpi\product_add.png" /> | ||||||
|  |   </ItemGroup> | ||||||
|  |   <ItemGroup> | ||||||
|  |     <AndroidResource Include="Resources\drawable-xhdpi\product_add.png" /> | ||||||
|  |   </ItemGroup> | ||||||
|  |   <ItemGroup> | ||||||
|  |     <AndroidResource Include="Resources\drawable-hdpi\product_add.png" /> | ||||||
|  |   </ItemGroup> | ||||||
|  |   <ItemGroup> | ||||||
|  |     <AndroidResource Include="Resources\drawable-xxxhdpi\user_profile.png" /> | ||||||
|  |   </ItemGroup> | ||||||
|  |   <ItemGroup> | ||||||
|  |     <AndroidResource Include="Resources\values\colors.xml" /> | ||||||
|  |   </ItemGroup> | ||||||
|  |   <ItemGroup> | ||||||
|  |     <AndroidResource Include="Resources\drawable-xxxhdpi\menu_cart.png" /> | ||||||
|  |   </ItemGroup> | ||||||
|  |   <Import Project="$(MSBuildExtensionsPath)\Xamarin\Android\Xamarin.Android.CSharp.targets" /> | ||||||
|  |   <Import Project="..\..\packages\Xamarin.Android.Support.Vector.Drawable.23.3.0\build\Xamarin.Android.Support.Vector.Drawable.targets" Condition="Exists('..\..\packages\Xamarin.Android.Support.Vector.Drawable.23.3.0\build\Xamarin.Android.Support.Vector.Drawable.targets')" /> | ||||||
|  |   <Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild"> | ||||||
|  |     <PropertyGroup> | ||||||
|  |       <ErrorText>Este proyecto hace referencia a los paquetes NuGet que faltan en este equipo. Use la restauración de paquetes NuGet para descargarlos. Para obtener más información, consulte http://go.microsoft.com/fwlink/?LinkID=322105. El archivo que falta es {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\StyleCop.MSBuild.5.0.0-alpha01\build\StyleCop.MSBuild.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\StyleCop.MSBuild.5.0.0-alpha01\build\StyleCop.MSBuild.targets'))" /> | ||||||
|  |     <Error Condition="!Exists('..\..\packages\Xamarin.Forms.2.3.2.127\build\portable-win+net45+wp80+win81+wpa81+MonoAndroid10+MonoTouch10+Xamarin.iOS10\Xamarin.Forms.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\Xamarin.Forms.2.3.2.127\build\portable-win+net45+wp80+win81+wpa81+MonoAndroid10+MonoTouch10+Xamarin.iOS10\Xamarin.Forms.targets'))" /> | ||||||
|  |   </Target> | ||||||
|  |   <Import Project="..\..\packages\StyleCop.MSBuild.5.0.0-alpha01\build\StyleCop.MSBuild.targets" Condition="Exists('..\..\packages\StyleCop.MSBuild.5.0.0-alpha01\build\StyleCop.MSBuild.targets')" /> | ||||||
|  |   <Import Project="..\..\packages\Xamarin.Forms.2.3.2.127\build\portable-win+net45+wp80+win81+wpa81+MonoAndroid10+MonoTouch10+Xamarin.iOS10\Xamarin.Forms.targets" Condition="Exists('..\..\packages\Xamarin.Forms.2.3.2.127\build\portable-win+net45+wp80+win81+wpa81+MonoAndroid10+MonoTouch10+Xamarin.iOS10\Xamarin.Forms.targets')" /> | ||||||
|  | </Project> | ||||||
| @ -10,7 +10,7 @@ | |||||||
|     <OutputType>Exe</OutputType> |     <OutputType>Exe</OutputType> | ||||||
|     <RootNamespace>eShopOnContainers.iOS</RootNamespace> |     <RootNamespace>eShopOnContainers.iOS</RootNamespace> | ||||||
|     <IPhoneResourcePrefix>Resources</IPhoneResourcePrefix> |     <IPhoneResourcePrefix>Resources</IPhoneResourcePrefix> | ||||||
|     <AssemblyName>eShopOnContainers.iOS</AssemblyName> |     <AssemblyName>eShopOnContainersiOS</AssemblyName> | ||||||
|     <NuGetPackageImportStamp> |     <NuGetPackageImportStamp> | ||||||
|     </NuGetPackageImportStamp> |     </NuGetPackageImportStamp> | ||||||
|   </PropertyGroup> |   </PropertyGroup> | ||||||
|  | |||||||
| @ -0,0 +1,253 @@ | |||||||
|  | <?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)' == '' ">iPhoneSimulator</Platform> | ||||||
|  |     <ProductVersion>8.0.30703</ProductVersion> | ||||||
|  |     <SchemaVersion>2.0</SchemaVersion> | ||||||
|  |     <ProjectGuid>{6EEB23DC-7063-4444-9AF8-90DF24F549C0}</ProjectGuid> | ||||||
|  |     <ProjectTypeGuids>{FEACFBD2-3405-455C-9665-78FE426C6842};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids> | ||||||
|  |     <OutputType>Exe</OutputType> | ||||||
|  |     <RootNamespace>eShopOnContainers.iOS</RootNamespace> | ||||||
|  |     <IPhoneResourcePrefix>Resources</IPhoneResourcePrefix> | ||||||
|  |     <AssemblyName>eShopOnContainers.iOS</AssemblyName> | ||||||
|  |     <NuGetPackageImportStamp> | ||||||
|  |     </NuGetPackageImportStamp> | ||||||
|  |   </PropertyGroup> | ||||||
|  |   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|iPhoneSimulator' "> | ||||||
|  |     <DebugSymbols>true</DebugSymbols> | ||||||
|  |     <DebugType>full</DebugType> | ||||||
|  |     <Optimize>false</Optimize> | ||||||
|  |     <OutputPath>bin\iPhoneSimulator\Debug</OutputPath> | ||||||
|  |     <DefineConstants>DEBUG</DefineConstants> | ||||||
|  |     <ErrorReport>prompt</ErrorReport> | ||||||
|  |     <WarningLevel>4</WarningLevel> | ||||||
|  |     <ConsolePause>false</ConsolePause> | ||||||
|  |     <MtouchArch>i386, x86_64</MtouchArch> | ||||||
|  |     <MtouchLink>None</MtouchLink> | ||||||
|  |     <MtouchDebug>true</MtouchDebug> | ||||||
|  |   </PropertyGroup> | ||||||
|  |   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|iPhoneSimulator' "> | ||||||
|  |     <DebugType>none</DebugType> | ||||||
|  |     <Optimize>true</Optimize> | ||||||
|  |     <OutputPath>bin\iPhoneSimulator\Release</OutputPath> | ||||||
|  |     <ErrorReport>prompt</ErrorReport> | ||||||
|  |     <WarningLevel>4</WarningLevel> | ||||||
|  |     <MtouchLink>None</MtouchLink> | ||||||
|  |     <MtouchArch>i386, x86_64</MtouchArch> | ||||||
|  |     <ConsolePause>false</ConsolePause> | ||||||
|  |   </PropertyGroup> | ||||||
|  |   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|iPhone' "> | ||||||
|  |     <DebugSymbols>true</DebugSymbols> | ||||||
|  |     <DebugType>full</DebugType> | ||||||
|  |     <Optimize>false</Optimize> | ||||||
|  |     <OutputPath>bin\iPhone\Debug</OutputPath> | ||||||
|  |     <DefineConstants>DEBUG</DefineConstants> | ||||||
|  |     <ErrorReport>prompt</ErrorReport> | ||||||
|  |     <WarningLevel>4</WarningLevel> | ||||||
|  |     <ConsolePause>false</ConsolePause> | ||||||
|  |     <MtouchArch>ARMv7, ARM64</MtouchArch> | ||||||
|  |     <CodesignKey>iPhone Developer</CodesignKey> | ||||||
|  |     <MtouchDebug>true</MtouchDebug> | ||||||
|  |     <CodesignEntitlements>Entitlements.plist</CodesignEntitlements> | ||||||
|  |   </PropertyGroup> | ||||||
|  |   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|iPhone' "> | ||||||
|  |     <DebugType>none</DebugType> | ||||||
|  |     <Optimize>true</Optimize> | ||||||
|  |     <OutputPath>bin\iPhone\Release</OutputPath> | ||||||
|  |     <ErrorReport>prompt</ErrorReport> | ||||||
|  |     <WarningLevel>4</WarningLevel> | ||||||
|  |     <MtouchArch>ARMv7, ARM64</MtouchArch> | ||||||
|  |     <ConsolePause>false</ConsolePause> | ||||||
|  |     <CodesignKey>iPhone Developer</CodesignKey> | ||||||
|  |     <CodesignEntitlements>Entitlements.plist</CodesignEntitlements> | ||||||
|  |   </PropertyGroup> | ||||||
|  |   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Ad-Hoc|iPhone' "> | ||||||
|  |     <DebugType>none</DebugType> | ||||||
|  |     <Optimize>True</Optimize> | ||||||
|  |     <OutputPath>bin\iPhone\Ad-Hoc</OutputPath> | ||||||
|  |     <ErrorReport>prompt</ErrorReport> | ||||||
|  |     <WarningLevel>4</WarningLevel> | ||||||
|  |     <ConsolePause>False</ConsolePause> | ||||||
|  |     <MtouchArch>ARMv7, ARM64</MtouchArch> | ||||||
|  |     <BuildIpa>True</BuildIpa> | ||||||
|  |     <CodesignProvision>Automatic:AdHoc</CodesignProvision> | ||||||
|  |     <CodesignKey>iPhone Distribution</CodesignKey> | ||||||
|  |     <CodesignEntitlements>Entitlements.plist</CodesignEntitlements> | ||||||
|  |   </PropertyGroup> | ||||||
|  |   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'AppStore|iPhone' "> | ||||||
|  |     <DebugType>none</DebugType> | ||||||
|  |     <Optimize>True</Optimize> | ||||||
|  |     <OutputPath>bin\iPhone\AppStore</OutputPath> | ||||||
|  |     <ErrorReport>prompt</ErrorReport> | ||||||
|  |     <WarningLevel>4</WarningLevel> | ||||||
|  |     <ConsolePause>False</ConsolePause> | ||||||
|  |     <MtouchArch>ARMv7, ARM64</MtouchArch> | ||||||
|  |     <CodesignProvision>Automatic:AppStore</CodesignProvision> | ||||||
|  |     <CodesignKey>iPhone Distribution</CodesignKey> | ||||||
|  |     <CodesignEntitlements>Entitlements.plist</CodesignEntitlements> | ||||||
|  |   </PropertyGroup> | ||||||
|  |   <ItemGroup> | ||||||
|  |     <Compile Include="Effects\EntryLineColorEffect.cs" /> | ||||||
|  |     <Compile Include="Main.cs" /> | ||||||
|  |     <Compile Include="AppDelegate.cs" /> | ||||||
|  |     <BundleResource Include="..\CommonResources\Fonts\Montserrat-Bold.ttf"> | ||||||
|  |       <Link>Resources\fonts\Montserrat-Bold.ttf</Link> | ||||||
|  |     </BundleResource> | ||||||
|  |     <BundleResource Include="..\CommonResources\Fonts\Montserrat-Regular.ttf"> | ||||||
|  |       <Link>Resources\fonts\Montserrat-Regular.ttf</Link> | ||||||
|  |     </BundleResource> | ||||||
|  |     <BundleResource Include="..\CommonResources\Fonts\SourceSansPro-Regular.ttf"> | ||||||
|  |       <Link>Resources\fonts\SourceSansPro-Regular.ttf</Link> | ||||||
|  |     </BundleResource> | ||||||
|  |     <Compile Include="Renderers\CustomTabbedPageRenderer.cs" /> | ||||||
|  |     <None Include="app.config" /> | ||||||
|  |     <None Include="Entitlements.plist" /> | ||||||
|  |     <None Include="Info.plist" /> | ||||||
|  |     <Compile Include="Properties\AssemblyInfo.cs" /> | ||||||
|  |     <ITunesArtwork Include="iTunesArtwork" /> | ||||||
|  |     <ITunesArtwork Include="iTunesArtwork@2x" /> | ||||||
|  |     <None Include="packages.config" /> | ||||||
|  |   </ItemGroup> | ||||||
|  |   <ItemGroup> | ||||||
|  |     <BundleResource Include="Resources\Default-568h%402x.png" /> | ||||||
|  |     <BundleResource Include="Resources\Default-Portrait.png" /> | ||||||
|  |     <BundleResource Include="Resources\Default-Portrait%402x.png" /> | ||||||
|  |     <BundleResource Include="Resources\Default.png" /> | ||||||
|  |     <BundleResource Include="Resources\Default%402x.png" /> | ||||||
|  |     <BundleResource Include="Resources\Icon-60%402x.png" /> | ||||||
|  |     <BundleResource Include="Resources\Icon-60%403x.png" /> | ||||||
|  |     <BundleResource Include="Resources\Icon-76.png" /> | ||||||
|  |     <BundleResource Include="Resources\Icon-76%402x.png" /> | ||||||
|  |     <BundleResource Include="Resources\Icon-Small-40.png" /> | ||||||
|  |     <BundleResource Include="Resources\Icon-Small-40%402x.png" /> | ||||||
|  |     <BundleResource Include="Resources\Icon-Small-40%403x.png" /> | ||||||
|  |     <BundleResource Include="Resources\Icon-Small.png" /> | ||||||
|  |     <BundleResource Include="Resources\Icon-Small%402x.png" /> | ||||||
|  |     <BundleResource Include="Resources\Icon-Small%403x.png" /> | ||||||
|  |     <InterfaceDefinition Include="Resources\LaunchScreen.storyboard" /> | ||||||
|  |   </ItemGroup> | ||||||
|  |   <ItemGroup> | ||||||
|  |     <Reference Include="Acr.Support.iOS, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL"> | ||||||
|  |       <HintPath>..\..\packages\Acr.Support.2.1.0\lib\Xamarin.iOS10\Acr.Support.iOS.dll</HintPath> | ||||||
|  |       <Private>True</Private> | ||||||
|  |     </Reference> | ||||||
|  |     <Reference Include="Acr.UserDialogs, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL"> | ||||||
|  |       <HintPath>..\..\packages\Acr.UserDialogs.6.3.1\lib\Xamarin.iOS10\Acr.UserDialogs.dll</HintPath> | ||||||
|  |       <Private>True</Private> | ||||||
|  |     </Reference> | ||||||
|  |     <Reference Include="Acr.UserDialogs.Interface, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL"> | ||||||
|  |       <HintPath>..\..\packages\Acr.UserDialogs.6.3.1\lib\Xamarin.iOS10\Acr.UserDialogs.Interface.dll</HintPath> | ||||||
|  |       <Private>True</Private> | ||||||
|  |     </Reference> | ||||||
|  |     <Reference Include="FFImageLoading, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL"> | ||||||
|  |       <HintPath>..\..\packages\Xamarin.FFImageLoading.2.2.6-pre-232\lib\Xamarin.iOS10\FFImageLoading.dll</HintPath> | ||||||
|  |       <Private>True</Private> | ||||||
|  |     </Reference> | ||||||
|  |     <Reference Include="FFImageLoading.Forms, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL"> | ||||||
|  |       <HintPath>..\..\packages\Xamarin.FFImageLoading.Forms.2.2.6-pre-232\lib\Xamarin.iOS10\FFImageLoading.Forms.dll</HintPath> | ||||||
|  |       <Private>True</Private> | ||||||
|  |     </Reference> | ||||||
|  |     <Reference Include="FFImageLoading.Forms.Touch, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL"> | ||||||
|  |       <HintPath>..\..\packages\Xamarin.FFImageLoading.Forms.2.2.6-pre-232\lib\Xamarin.iOS10\FFImageLoading.Forms.Touch.dll</HintPath> | ||||||
|  |       <Private>True</Private> | ||||||
|  |     </Reference> | ||||||
|  |     <Reference Include="FFImageLoading.Platform, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL"> | ||||||
|  |       <HintPath>..\..\packages\Xamarin.FFImageLoading.2.2.6-pre-232\lib\Xamarin.iOS10\FFImageLoading.Platform.dll</HintPath> | ||||||
|  |       <Private>True</Private> | ||||||
|  |     </Reference> | ||||||
|  |     <Reference Include="Microsoft.Practices.ServiceLocation, Version=1.3.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL"> | ||||||
|  |       <HintPath>..\..\packages\CommonServiceLocator.1.3\lib\portable-net4+sl5+netcore45+wpa81+wp8\Microsoft.Practices.ServiceLocation.dll</HintPath> | ||||||
|  |       <Private>True</Private> | ||||||
|  |     </Reference> | ||||||
|  |     <Reference Include="Microsoft.Practices.Unity, Version=4.0.0.0, Culture=neutral, PublicKeyToken=6d32ff45e0ccc69f, processorArchitecture=MSIL"> | ||||||
|  |       <HintPath>..\..\packages\Unity.4.0.1\lib\portable-net45+wp80+win8+wpa81+MonoAndroid10+MonoTouch10\Microsoft.Practices.Unity.dll</HintPath> | ||||||
|  |       <Private>True</Private> | ||||||
|  |     </Reference> | ||||||
|  |     <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="Newtonsoft.Json, Version=8.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL"> | ||||||
|  |       <HintPath>..\..\packages\Newtonsoft.Json.8.0.3\lib\portable-net40+sl5+wp80+win8+wpa81\Newtonsoft.Json.dll</HintPath> | ||||||
|  |       <Private>True</Private> | ||||||
|  |     </Reference> | ||||||
|  |     <Reference Include="SlideOverKit, Version=1.0.6135.18790, Culture=neutral, processorArchitecture=MSIL"> | ||||||
|  |       <HintPath>..\..\packages\SlideOverKit.2.1.4\lib\Xamarin.iOS10\SlideOverKit.dll</HintPath> | ||||||
|  |       <Private>True</Private> | ||||||
|  |     </Reference> | ||||||
|  |     <Reference Include="SlideOverKit.iOS, Version=1.0.6135.18893, Culture=neutral, processorArchitecture=MSIL"> | ||||||
|  |       <HintPath>..\..\packages\SlideOverKit.2.1.4\lib\Xamarin.iOS10\SlideOverKit.iOS.dll</HintPath> | ||||||
|  |       <Private>True</Private> | ||||||
|  |     </Reference> | ||||||
|  |     <Reference Include="Splat, Version=1.6.2.0, Culture=neutral, processorArchitecture=MSIL"> | ||||||
|  |       <HintPath>..\..\packages\Splat.1.6.2\lib\Xamarin.iOS10\Splat.dll</HintPath> | ||||||
|  |       <Private>True</Private> | ||||||
|  |     </Reference> | ||||||
|  |     <Reference Include="System" /> | ||||||
|  |     <Reference Include="System.Xml" /> | ||||||
|  |     <Reference Include="System.Core" /> | ||||||
|  |     <Reference Include="WebP.Touch, Version=1.0.5923.35383, Culture=neutral, processorArchitecture=MSIL"> | ||||||
|  |       <HintPath>..\..\packages\WebP.Touch.1.0.2\lib\Xamarin.iOS10\WebP.Touch.dll</HintPath> | ||||||
|  |       <Private>True</Private> | ||||||
|  |     </Reference> | ||||||
|  |     <Reference Include="Xamarin.Forms.Core, Version=2.0.0.0, Culture=neutral, processorArchitecture=MSIL"> | ||||||
|  |       <HintPath>..\..\packages\Xamarin.Forms.2.3.2.127\lib\Xamarin.iOS10\Xamarin.Forms.Core.dll</HintPath> | ||||||
|  |       <Private>True</Private> | ||||||
|  |     </Reference> | ||||||
|  |     <Reference Include="Xamarin.Forms.Pages, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL"> | ||||||
|  |       <HintPath>..\..\packages\Xamarin.Forms.Pages.2.3.2.118-pre1\lib\Xamarin.iOS10\Xamarin.Forms.Pages.dll</HintPath> | ||||||
|  |       <Private>True</Private> | ||||||
|  |     </Reference> | ||||||
|  |     <Reference Include="Xamarin.Forms.Platform, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL"> | ||||||
|  |       <HintPath>..\..\packages\Xamarin.Forms.2.3.2.127\lib\Xamarin.iOS10\Xamarin.Forms.Platform.dll</HintPath> | ||||||
|  |       <Private>True</Private> | ||||||
|  |     </Reference> | ||||||
|  |     <Reference Include="Xamarin.Forms.Platform.iOS, Version=2.0.0.0, Culture=neutral, processorArchitecture=MSIL"> | ||||||
|  |       <HintPath>..\..\packages\Xamarin.Forms.2.3.2.127\lib\Xamarin.iOS10\Xamarin.Forms.Platform.iOS.dll</HintPath> | ||||||
|  |       <Private>True</Private> | ||||||
|  |     </Reference> | ||||||
|  |     <Reference Include="Xamarin.Forms.Theme.Base, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL"> | ||||||
|  |       <HintPath>..\..\packages\Xamarin.Forms.Theme.Base.1.0.0.43-pre1\lib\Xamarin.iOS10\Xamarin.Forms.Theme.Base.dll</HintPath> | ||||||
|  |       <Private>True</Private> | ||||||
|  |     </Reference> | ||||||
|  |     <Reference Include="Xamarin.Forms.Theme.iOS, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL"> | ||||||
|  |       <HintPath>..\..\packages\Xamarin.Forms.Theme.Base.1.0.0.43-pre1\lib\Xamarin.iOS10\Xamarin.Forms.Theme.iOS.dll</HintPath> | ||||||
|  |       <Private>True</Private> | ||||||
|  |     </Reference> | ||||||
|  |     <Reference Include="Xamarin.Forms.Theme.Light, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL"> | ||||||
|  |       <HintPath>..\..\packages\Xamarin.Forms.Theme.Light.1.0.0.43-pre1\lib\Xamarin.iOS10\Xamarin.Forms.Theme.Light.dll</HintPath> | ||||||
|  |       <Private>True</Private> | ||||||
|  |     </Reference> | ||||||
|  |     <Reference Include="Xamarin.Forms.Xaml, Version=2.0.0.0, Culture=neutral, processorArchitecture=MSIL"> | ||||||
|  |       <HintPath>..\..\packages\Xamarin.Forms.2.3.2.127\lib\Xamarin.iOS10\Xamarin.Forms.Xaml.dll</HintPath> | ||||||
|  |       <Private>True</Private> | ||||||
|  |     </Reference> | ||||||
|  |     <Reference Include="Xamarin.iOS" /> | ||||||
|  |   </ItemGroup> | ||||||
|  |   <ItemGroup> | ||||||
|  |     <ProjectReference Include="..\eShopOnContainers.Core\eShopOnContainers.Core.csproj"> | ||||||
|  |       <Project>{65116D1C-145B-4693-ABDA-F0FB6F425191}</Project> | ||||||
|  |       <Name>eShopOnContainers.Core</Name> | ||||||
|  |     </ProjectReference> | ||||||
|  |   </ItemGroup> | ||||||
|  |   <ItemGroup> | ||||||
|  |     <BundleResource Include="Resources\fake_product_01.png" /> | ||||||
|  |   </ItemGroup> | ||||||
|  |   <ItemGroup> | ||||||
|  |     <BundleResource Include="Resources\fake_product_03.png" /> | ||||||
|  |   </ItemGroup> | ||||||
|  |   <ItemGroup> | ||||||
|  |     <BundleResource Include="Resources\fake_product_02.png" /> | ||||||
|  |   </ItemGroup> | ||||||
|  |   <Import Project="$(MSBuildExtensionsPath)\Xamarin\iOS\Xamarin.iOS.CSharp.targets" /> | ||||||
|  |   <Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild"> | ||||||
|  |     <PropertyGroup> | ||||||
|  |       <ErrorText>Este proyecto hace referencia a los paquetes NuGet que faltan en este equipo. Use la restauración de paquetes NuGet para descargarlos. Para obtener más información, consulte http://go.microsoft.com/fwlink/?LinkID=322105. El archivo que falta es {0}.</ErrorText> | ||||||
|  |     </PropertyGroup> | ||||||
|  |     <Error Condition="!Exists('..\..\packages\StyleCop.MSBuild.5.0.0-alpha01\build\StyleCop.MSBuild.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\StyleCop.MSBuild.5.0.0-alpha01\build\StyleCop.MSBuild.targets'))" /> | ||||||
|  |     <Error Condition="!Exists('..\..\packages\Xamarin.Forms.2.3.2.127\build\portable-win+net45+wp80+win81+wpa81+MonoAndroid10+MonoTouch10+Xamarin.iOS10\Xamarin.Forms.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\Xamarin.Forms.2.3.2.127\build\portable-win+net45+wp80+win81+wpa81+MonoAndroid10+MonoTouch10+Xamarin.iOS10\Xamarin.Forms.targets'))" /> | ||||||
|  |   </Target> | ||||||
|  |   <Import Project="..\..\packages\StyleCop.MSBuild.5.0.0-alpha01\build\StyleCop.MSBuild.targets" Condition="Exists('..\..\packages\StyleCop.MSBuild.5.0.0-alpha01\build\StyleCop.MSBuild.targets')" /> | ||||||
|  |   <Import Project="..\..\packages\Xamarin.Forms.2.3.2.127\build\portable-win+net45+wp80+win81+wpa81+MonoAndroid10+MonoTouch10+Xamarin.iOS10\Xamarin.Forms.targets" Condition="Exists('..\..\packages\Xamarin.Forms.2.3.2.127\build\portable-win+net45+wp80+win81+wpa81+MonoAndroid10+MonoTouch10+Xamarin.iOS10\Xamarin.Forms.targets')" /> | ||||||
|  | </Project> | ||||||
| @ -22,9 +22,11 @@ namespace Microsoft.eShopOnContainers.Services.Basket.API.Controllers | |||||||
|         } |         } | ||||||
|         // GET api/values/5 |         // GET api/values/5 | ||||||
|         [HttpGet("{id}")] |         [HttpGet("{id}")] | ||||||
|         public async Task<CustomerBasket> Get(Guid id) |         public async Task<IActionResult> Get(string id) | ||||||
|         { |         { | ||||||
|             return await _repository.GetBasket(id); |             var basket = await _repository.GetBasket(id); | ||||||
|  | 
 | ||||||
|  |             return Ok(basket); | ||||||
|         } |         } | ||||||
| 
 | 
 | ||||||
|         // POST api/values |         // POST api/values | ||||||
| @ -36,7 +38,7 @@ namespace Microsoft.eShopOnContainers.Services.Basket.API.Controllers | |||||||
| 
 | 
 | ||||||
|         // DELETE api/values/5 |         // DELETE api/values/5 | ||||||
|         [HttpDelete("{id}")] |         [HttpDelete("{id}")] | ||||||
|         public void Delete(Guid id) |         public void Delete(string id) | ||||||
|         { |         { | ||||||
|             _repository.DeleteBasket(id); |             _repository.DeleteBasket(id); | ||||||
|         } |         } | ||||||
|  | |||||||
| @ -7,12 +7,13 @@ namespace Microsoft.eShopOnContainers.Services.Basket.API.Model | |||||||
| { | { | ||||||
|     public class CustomerBasket |     public class CustomerBasket | ||||||
|     { |     { | ||||||
|         public Guid CustomerId { get; private set; } |         public string BuyerId { get;  set; } | ||||||
|         public IList<BasketItem> BasketItems => new List<BasketItem>(); |         public List<BasketItem> Items { get; set; }  | ||||||
| 
 | 
 | ||||||
|         public CustomerBasket(Guid customerId) |         public CustomerBasket(string customerId) | ||||||
|         { |         { | ||||||
|             CustomerId = customerId; |             BuyerId = customerId; | ||||||
|  |             Items = new List<Model.BasketItem>(); | ||||||
|         } |         } | ||||||
|     } |     } | ||||||
| } | } | ||||||
|  | |||||||
| @ -7,8 +7,11 @@ namespace Microsoft.eShopOnContainers.Services.Basket.API.Model | |||||||
| { | { | ||||||
|     public class BasketItem |     public class BasketItem | ||||||
|     { |     { | ||||||
|         public Guid Id { get; set; } |         public string Id { get; set; } | ||||||
|         public decimal Price { get; set; } |         public string ProductId { get; set; } | ||||||
|         public int Count { get; set; } |         public string ProductName { get; set; } | ||||||
|  |         public decimal UnitPrice { get; set; } | ||||||
|  |         public int Quantity { get; set; } | ||||||
|  |         public string PictureUrl { get; set; } | ||||||
|     } |     } | ||||||
| } | } | ||||||
|  | |||||||
| @ -7,8 +7,8 @@ namespace Microsoft.eShopOnContainers.Services.Basket.API.Model | |||||||
| { | { | ||||||
|     public interface IBasketRepository |     public interface IBasketRepository | ||||||
|     { |     { | ||||||
|         Task<CustomerBasket> GetBasket(Guid customerId); |         Task<CustomerBasket> GetBasket(string customerId); | ||||||
|         Task<bool> UpdateBasket(CustomerBasket basket); |         Task<bool> UpdateBasket(CustomerBasket basket); | ||||||
|         Task<bool> DeleteBasket(Guid id); |         Task<bool> DeleteBasket(string id); | ||||||
|     } |     } | ||||||
| } | } | ||||||
|  | |||||||
| @ -25,13 +25,13 @@ namespace Microsoft.eShopOnContainers.Services.Basket.API.Model | |||||||
| 
 | 
 | ||||||
|         } |         } | ||||||
| 
 | 
 | ||||||
|         public async Task<bool> DeleteBasket(Guid id) |         public async Task<bool> DeleteBasket(string id) | ||||||
|         { |         { | ||||||
|             var database = await GetDatabase(); |             var database = await GetDatabase(); | ||||||
|             return await database.KeyDeleteAsync(id.ToString()); |             return await database.KeyDeleteAsync(id.ToString()); | ||||||
|         } |         } | ||||||
| 
 | 
 | ||||||
|         public async Task<CustomerBasket> GetBasket(Guid customerId) |         public async Task<CustomerBasket> GetBasket(string customerId) | ||||||
|         { |         { | ||||||
|             var database = await GetDatabase(); |             var database = await GetDatabase(); | ||||||
| 
 | 
 | ||||||
| @ -47,7 +47,7 @@ namespace Microsoft.eShopOnContainers.Services.Basket.API.Model | |||||||
|         public async Task<bool> UpdateBasket(CustomerBasket basket) |         public async Task<bool> UpdateBasket(CustomerBasket basket) | ||||||
|         { |         { | ||||||
|             var database = await GetDatabase(); |             var database = await GetDatabase(); | ||||||
|             return await database.StringSetAsync(basket.CustomerId.ToString(), JsonConvert.SerializeObject(basket)); |             return await database.StringSetAsync(basket.BuyerId, JsonConvert.SerializeObject(basket)); | ||||||
|         } |         } | ||||||
| 
 | 
 | ||||||
|         private async Task<IDatabase> GetDatabase() |         private async Task<IDatabase> GetDatabase() | ||||||
|  | |||||||
| @ -12,5 +12,6 @@ services: | |||||||
|       - "32783:80" |       - "32783:80" | ||||||
|     depends_on: |     depends_on: | ||||||
|       - basket.data |       - basket.data | ||||||
|  | 
 | ||||||
|   basket.data: |   basket.data: | ||||||
|     image: redis |     image: redis | ||||||
|  | |||||||
| @ -17,7 +17,6 @@ | |||||||
|     "Microsoft.eShopOnContainers.Services.Catalog.API": { |     "Microsoft.eShopOnContainers.Services.Catalog.API": { | ||||||
|       "commandName": "Project", |       "commandName": "Project", | ||||||
|       "launchBrowser": true, |       "launchBrowser": true, | ||||||
|       "launchUrl": "http://localhost:5000/api/values", |  | ||||||
|       "environmentVariables": { |       "environmentVariables": { | ||||||
|         "ASPNETCORE_ENVIRONMENT": "Development" |         "ASPNETCORE_ENVIRONMENT": "Development" | ||||||
|       } |       } | ||||||
|  | |||||||
| @ -10,6 +10,7 @@ namespace Microsoft.eShopOnContainers.WebMVC | |||||||
|         public Connectionstrings ConnectionStrings { get; set; } |         public Connectionstrings ConnectionStrings { get; set; } | ||||||
|         public string CatalogUrl { get; set; } |         public string CatalogUrl { get; set; } | ||||||
|         public string OrderingUrl { get; set; } |         public string OrderingUrl { get; set; } | ||||||
|  |         public string BasketUrl { get; set; } | ||||||
|         public Logging Logging { get; set; } |         public Logging Logging { get; set; } | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|  | |||||||
| @ -27,7 +27,7 @@ namespace Microsoft.eShopOnContainers.WebMVC.Controllers | |||||||
|         public async Task<IActionResult> Index() |         public async Task<IActionResult> Index() | ||||||
|         { |         { | ||||||
|             var user = await _userManager.GetUserAsync(HttpContext.User); |             var user = await _userManager.GetUserAsync(HttpContext.User); | ||||||
|             var vm = _basketSvc.GetBasket(user); |             var vm = await _basketSvc.GetBasket(user); | ||||||
| 
 | 
 | ||||||
|             return View(vm); |             return View(vm); | ||||||
|         } |         } | ||||||
| @ -37,8 +37,8 @@ namespace Microsoft.eShopOnContainers.WebMVC.Controllers | |||||||
|         public async Task<IActionResult> Index(Dictionary<string, int> quantities, string action) |         public async Task<IActionResult> Index(Dictionary<string, int> quantities, string action) | ||||||
|         { |         { | ||||||
|             var user = await _userManager.GetUserAsync(HttpContext.User); |             var user = await _userManager.GetUserAsync(HttpContext.User); | ||||||
|             var basket = _basketSvc.SetQuantities(user, quantities); |             var basket = await _basketSvc.SetQuantities(user, quantities); | ||||||
|             var vm = _basketSvc.UpdateBasket(basket); |             var vm = await _basketSvc.UpdateBasket(basket); | ||||||
| 
 | 
 | ||||||
|             if (action == "[ Checkout ]") |             if (action == "[ Checkout ]") | ||||||
|             { |             { | ||||||
| @ -62,7 +62,7 @@ namespace Microsoft.eShopOnContainers.WebMVC.Controllers | |||||||
|                 UnitPrice = productDetails.Price,  |                 UnitPrice = productDetails.Price,  | ||||||
|                 ProductId = productDetails.Id |                 ProductId = productDetails.Id | ||||||
|             }; |             }; | ||||||
|             _basketSvc.AddItemToBasket(user, product); |             await _basketSvc.AddItemToBasket(user, product); | ||||||
|             return RedirectToAction("Index", "Catalog"); |             return RedirectToAction("Index", "Catalog"); | ||||||
|         } |         } | ||||||
|     } |     } | ||||||
|  | |||||||
| @ -28,7 +28,7 @@ namespace Microsoft.eShopOnContainers.WebMVC.Controllers | |||||||
|         { |         { | ||||||
|             var vm = new CreateOrderViewModel(); |             var vm = new CreateOrderViewModel(); | ||||||
|             var user = await _userManager.GetUserAsync(HttpContext.User); |             var user = await _userManager.GetUserAsync(HttpContext.User); | ||||||
|             var basket = _basketSvc.GetBasket(user); |             var basket = await _basketSvc.GetBasket(user); | ||||||
|             var order = _basketSvc.MapBasketToOrder(basket); |             var order = _basketSvc.MapBasketToOrder(basket); | ||||||
|             vm.Order = _orderSvc.MapUserInfoIntoOrder(user, order); |             vm.Order = _orderSvc.MapUserInfoIntoOrder(user, order); | ||||||
| 
 | 
 | ||||||
| @ -36,23 +36,30 @@ namespace Microsoft.eShopOnContainers.WebMVC.Controllers | |||||||
|         } |         } | ||||||
| 
 | 
 | ||||||
|         [HttpPost] |         [HttpPost] | ||||||
|         public async Task<IActionResult> Create(CreateOrderViewModel model) |         public async Task<IActionResult> Create(CreateOrderViewModel model, Dictionary<string, int> quantities, string action) | ||||||
|         { |         { | ||||||
|             var user = await _userManager.GetUserAsync(HttpContext.User); |             var user = await _userManager.GetUserAsync(HttpContext.User); | ||||||
|             var basket = _basketSvc.GetBasket(user); |             var basket = await _basketSvc.SetQuantities(user, quantities); | ||||||
|  |             basket = await _basketSvc.UpdateBasket(basket); | ||||||
|             var order = _basketSvc.MapBasketToOrder(basket); |             var order = _basketSvc.MapBasketToOrder(basket); | ||||||
| 
 | 
 | ||||||
|             // override if user has changed some shipping address or payment info data. |             // override if user has changed some shipping address or payment info data. | ||||||
|             _orderSvc.OverrideUserInfoIntoOrder(model.Order, order); |             _orderSvc.OverrideUserInfoIntoOrder(model.Order, order); | ||||||
|  | 
 | ||||||
|  |             if (action == "[ Place Order ]") | ||||||
|  |             { | ||||||
|                 _orderSvc.CreateOrder(user, order); |                 _orderSvc.CreateOrder(user, order); | ||||||
| 
 | 
 | ||||||
|                 //Empty basket for current user.  |                 //Empty basket for current user.  | ||||||
|             _basketSvc.CleanBasket(user); |                 await _basketSvc.CleanBasket(user); | ||||||
| 
 | 
 | ||||||
|                 //Redirect to historic list. |                 //Redirect to historic list. | ||||||
|                 return RedirectToAction("Index"); |                 return RedirectToAction("Index"); | ||||||
|             } |             } | ||||||
| 
 | 
 | ||||||
|  |             return View(model); | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|         public async Task<IActionResult> Detail(string orderId) |         public async Task<IActionResult> Detail(string orderId) | ||||||
|         { |         { | ||||||
|             var user = await _userManager.GetUserAsync(HttpContext.User); |             var user = await _userManager.GetUserAsync(HttpContext.User); | ||||||
|  | |||||||
| @ -11,8 +11,6 @@ namespace Microsoft.eShopOnContainers.WebMVC.Models | |||||||
|         { |         { | ||||||
|             Items = new List<BasketItem>(); |             Items = new List<BasketItem>(); | ||||||
|         } |         } | ||||||
| 
 |  | ||||||
|         public string Id; |  | ||||||
|         public List<BasketItem> Items { get; set; } |         public List<BasketItem> Items { get; set; } | ||||||
|         public string BuyerId { get; set; } |         public string BuyerId { get; set; } | ||||||
| 
 | 
 | ||||||
|  | |||||||
| @ -4,39 +4,54 @@ using System.Linq; | |||||||
| using System.Threading.Tasks; | using System.Threading.Tasks; | ||||||
| using Microsoft.eShopOnContainers.WebMVC.Models; | using Microsoft.eShopOnContainers.WebMVC.Models; | ||||||
| using Microsoft.AspNetCore.Http; | using Microsoft.AspNetCore.Http; | ||||||
|  | using System.Net.Http; | ||||||
|  | using Microsoft.Extensions.Options; | ||||||
|  | using Newtonsoft.Json; | ||||||
| 
 | 
 | ||||||
| namespace Microsoft.eShopOnContainers.WebMVC.Services | namespace Microsoft.eShopOnContainers.WebMVC.Services | ||||||
| { | { | ||||||
|     public class BasketService : IBasketService |     public class BasketService : IBasketService | ||||||
|     { |     { | ||||||
|         private int _itemsInCart; |         private readonly IOptions<AppSettings> _settings; | ||||||
|         private readonly IHttpContextAccessor _httpContextAccessor; |         private HttpClient _apiClient; | ||||||
|  |         private readonly string _remoteServiceBaseUrl; | ||||||
| 
 | 
 | ||||||
|         public BasketService(IHttpContextAccessor httpContextAccessor) |         public BasketService(IOptions<AppSettings> settings) | ||||||
|         { |         { | ||||||
|             _httpContextAccessor = httpContextAccessor; |             _settings = settings; | ||||||
|  |             _remoteServiceBaseUrl = _settings.Value.BasketUrl; | ||||||
|         } |         } | ||||||
| 
 | 
 | ||||||
|         public int ItemsInCart { get { return _itemsInCart; }} |         public async Task<Basket> GetBasket(ApplicationUser user) | ||||||
| 
 |  | ||||||
|         public Basket GetBasket(ApplicationUser user) |  | ||||||
|         { |         { | ||||||
|             Basket activeOrder; |             _apiClient = new HttpClient(); | ||||||
|             activeOrder = _httpContextAccessor.HttpContext.Session.GetObject<Basket>("MyActiveOrder"); |             var basketUrl = $"{_remoteServiceBaseUrl}/{user.Id.ToString()}"; | ||||||
|               _itemsInCart = (activeOrder != null) ? activeOrder.Items.Count() : 0; |             var dataString = await _apiClient.GetStringAsync(basketUrl); | ||||||
| 
 |             var response = JsonConvert.DeserializeObject<Basket>(dataString); | ||||||
|             return activeOrder; |             if (response == null) | ||||||
|  |             { | ||||||
|  |                 response = new Basket() | ||||||
|  |                 { | ||||||
|  |                     BuyerId = user.Id | ||||||
|  |                 }; | ||||||
|             } |             } | ||||||
| 
 | 
 | ||||||
|         public Basket UpdateBasket(Basket basket) |             return response; | ||||||
|         { |  | ||||||
|             _httpContextAccessor.HttpContext.Session.SetObject("MyActiveOrder", basket); |  | ||||||
|             return _httpContextAccessor.HttpContext.Session.GetObject<Basket>("MyActiveOrder"); |  | ||||||
|         } |         } | ||||||
| 
 | 
 | ||||||
|         public Basket SetQuantities(ApplicationUser user, Dictionary<string, int> quantities) |         public async Task<Basket> UpdateBasket(Basket basket) | ||||||
|         { |         { | ||||||
|             var basket = GetBasket(user); |             _apiClient = new HttpClient(); | ||||||
|  |             var basketUrl = _remoteServiceBaseUrl; | ||||||
|  |             StringContent content = new StringContent(JsonConvert.SerializeObject(basket), System.Text.Encoding.UTF8, "application/json"); | ||||||
|  |             var response = await _apiClient.PostAsync(basketUrl, content); | ||||||
|  | 
 | ||||||
|  |             return basket; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         public async Task<Basket> SetQuantities(ApplicationUser user, Dictionary<string, int> quantities) | ||||||
|  |         { | ||||||
|  |             var basket = await GetBasket(user); | ||||||
| 
 | 
 | ||||||
|             basket.Items.ForEach(x => |             basket.Items.ForEach(x => | ||||||
|             { |             { | ||||||
| @ -72,27 +87,31 @@ namespace Microsoft.eShopOnContainers.WebMVC.Services | |||||||
|             return order; |             return order; | ||||||
|         } |         } | ||||||
| 
 | 
 | ||||||
|         public void AddItemToBasket(ApplicationUser user, BasketItem product) |         public async Task AddItemToBasket(ApplicationUser user, BasketItem product) | ||||||
|         { |         { | ||||||
|             Basket activeOrder = GetBasket(user); |             Basket basket = await GetBasket(user); | ||||||
|             if (activeOrder == null) |             if (basket == null) | ||||||
|             { |             { | ||||||
|                 activeOrder = new Basket() |                 basket = new Basket() | ||||||
|                 { |                 { | ||||||
|                     BuyerId = user.Id, |                     BuyerId = user.Id, | ||||||
|                     Id = Guid.NewGuid().ToString(), |                     //Id = Guid.NewGuid().ToString(), | ||||||
|                     Items = new List<Models.BasketItem>() |                     Items = new List<Models.BasketItem>() | ||||||
|                 }; |                 }; | ||||||
|             } |             } | ||||||
| 
 | 
 | ||||||
|             activeOrder.Items.Add(product); |             basket.Items.Add(product); | ||||||
|             //CCE: lacks and httpcall to persist in the real back.end service. |             await UpdateBasket(basket); | ||||||
|             _httpContextAccessor.HttpContext.Session.SetObject("MyActiveOrder", activeOrder); |  | ||||||
|         } |         } | ||||||
| 
 | 
 | ||||||
|         public void CleanBasket(ApplicationUser user) |         public async Task CleanBasket(ApplicationUser user) | ||||||
|         { |         { | ||||||
|             _httpContextAccessor.HttpContext.Session.SetObject("MyActiveOrder", new Basket()); |             _apiClient = new HttpClient(); | ||||||
|  |             var basketUrl = $"{_remoteServiceBaseUrl}/{user.Id.ToString()}"; | ||||||
|  |             var response = await _apiClient.DeleteAsync(basketUrl); | ||||||
|  |              | ||||||
|  |             //CCE: response status code... | ||||||
|  | 
 | ||||||
|         } |         } | ||||||
|     } |     } | ||||||
| } | } | ||||||
|  | |||||||
| @ -14,7 +14,6 @@ namespace Microsoft.eShopOnContainers.WebMVC.Services | |||||||
| { | { | ||||||
|     public class CatalogService : ICatalogService |     public class CatalogService : ICatalogService | ||||||
|     { |     { | ||||||
|         private readonly List<CatalogItem> _items;          //Fake data while services are ready.  |  | ||||||
|         private readonly IOptions<AppSettings> _settings; |         private readonly IOptions<AppSettings> _settings; | ||||||
|         private HttpClient _apiClient; |         private HttpClient _apiClient; | ||||||
|         private readonly string _remoteServiceBaseUrl; |         private readonly string _remoteServiceBaseUrl; | ||||||
|  | |||||||
| @ -8,12 +8,11 @@ namespace Microsoft.eShopOnContainers.WebMVC.Services | |||||||
| { | { | ||||||
|     public interface IBasketService |     public interface IBasketService | ||||||
|     { |     { | ||||||
|         Basket GetBasket(ApplicationUser user); |         Task<Basket> GetBasket(ApplicationUser user); | ||||||
|         int ItemsInCart { get; } |         Task AddItemToBasket(ApplicationUser user, BasketItem product); | ||||||
|         void AddItemToBasket(ApplicationUser user, BasketItem product); |         Task<Basket> UpdateBasket(Basket basket); | ||||||
|         Basket UpdateBasket(Basket basket); |         Task<Basket> SetQuantities(ApplicationUser user, Dictionary<string, int> quantities); | ||||||
|         Basket SetQuantities(ApplicationUser user, Dictionary<string, int> quantities); |  | ||||||
|         Order MapBasketToOrder(Basket basket); |         Order MapBasketToOrder(Basket basket); | ||||||
|         void CleanBasket(ApplicationUser user); |         Task CleanBasket(ApplicationUser user); | ||||||
|     } |     } | ||||||
| } | } | ||||||
|  | |||||||
| @ -10,9 +10,7 @@ namespace Microsoft.eShopOnContainers.WebMVC.Services | |||||||
|     public class OrderingService : IOrderingService |     public class OrderingService : IOrderingService | ||||||
|     { |     { | ||||||
|         private List<Order> _orders; |         private List<Order> _orders; | ||||||
|         private int _itemsInCart; |  | ||||||
|          |          | ||||||
|         public int ItemsInCart { get { return _itemsInCart; } } |  | ||||||
|         //var ordersUrl = _settings.OrderingUrl + "/api/ordering/orders"; |         //var ordersUrl = _settings.OrderingUrl + "/api/ordering/orders"; | ||||||
|         //var dataString = await _http.GetStringAsync(ordersUrl); |         //var dataString = await _http.GetStringAsync(ordersUrl); | ||||||
|         //var items = JsonConvert.DeserializeObject<List<Order>>(dataString); |         //var items = JsonConvert.DeserializeObject<List<Order>>(dataString); | ||||||
|  | |||||||
| @ -49,10 +49,6 @@ namespace Microsoft.eShopOnContainers.WebMVC | |||||||
| 
 | 
 | ||||||
|             services.AddMvc(); |             services.AddMvc(); | ||||||
| 
 | 
 | ||||||
|             // CCE : Session not apply in this demo we have a mservice to store in redis. (BasketService) Once it's ready I've to remove this lines  |  | ||||||
|             services.AddDistributedMemoryCache(); // default implementation (in memory), you can move to SQL or custom store that could be Redis..  |  | ||||||
|             services.AddSession(); |  | ||||||
| 
 |  | ||||||
|             // Add application services. |             // Add application services. | ||||||
|             services.AddTransient<ICatalogService, CatalogService>();  |             services.AddTransient<ICatalogService, CatalogService>();  | ||||||
|             services.AddSingleton<IOrderingService, OrderingService>(); //CCE: Once services are integrated, a singleton is not needed we can left transient. |             services.AddSingleton<IOrderingService, OrderingService>(); //CCE: Once services are integrated, a singleton is not needed we can left transient. | ||||||
| @ -82,15 +78,20 @@ namespace Microsoft.eShopOnContainers.WebMVC | |||||||
| 
 | 
 | ||||||
|             app.UseIdentity(); |             app.UseIdentity(); | ||||||
| 
 | 
 | ||||||
|             //CCE: Remember to remove this line once Basket mservice is ready. |  | ||||||
|             app.UseSession(); |  | ||||||
| 
 |  | ||||||
|             app.UseMvc(routes => |             app.UseMvc(routes => | ||||||
|             { |             { | ||||||
|                 routes.MapRoute( |                 routes.MapRoute( | ||||||
|                     name: "default", |                     name: "default", | ||||||
|                     template: "{controller=Catalog}/{action=Index}/{id?}"); |                     template: "{controller=Catalog}/{action=Index}/{id?}"); | ||||||
|             }); |             }); | ||||||
|  | 
 | ||||||
|  |             var context = (ApplicationDbContext)app | ||||||
|  |             .ApplicationServices.GetService(typeof(ApplicationDbContext)); | ||||||
|  | 
 | ||||||
|  |             using (context) | ||||||
|  |             { | ||||||
|  |                 context.Database.Migrate(); | ||||||
|  |             } | ||||||
|         } |         } | ||||||
|     } |     } | ||||||
| } | } | ||||||
|  | |||||||
| @ -27,10 +27,10 @@ namespace Microsoft.eShopOnContainers.WebMVC.ViewComponents | |||||||
|             }; |             }; | ||||||
|             return View(vm); |             return View(vm); | ||||||
|         } |         } | ||||||
|         private Task<int> ItemsInCartAsync(ApplicationUser user) |         private async Task<int> ItemsInCartAsync(ApplicationUser user) | ||||||
|         { |         { | ||||||
|             _cartSvc.GetBasket(user); |             var basket = await _cartSvc.GetBasket(user); | ||||||
|             return Task.Run ( ()=> { return _cartSvc.ItemsInCart; }); |             return basket.Items.Count; | ||||||
|         } |         } | ||||||
|     } |     } | ||||||
| } | } | ||||||
|  | |||||||
| @ -22,9 +22,9 @@ namespace Microsoft.eShopOnContainers.WebMVC.ViewComponents | |||||||
|             var item = await GetItemsAsync(user); |             var item = await GetItemsAsync(user); | ||||||
|             return View(item); |             return View(item); | ||||||
|         } |         } | ||||||
|         private Task<Basket> GetItemsAsync(ApplicationUser user) |         private async Task<Basket> GetItemsAsync(ApplicationUser user) | ||||||
|         { |         { | ||||||
|             return Task.Run(()=> { return _cartSvc.GetBasket(user); }); |             return await _cartSvc.GetBasket(user); | ||||||
|         } |         } | ||||||
|     } |     } | ||||||
| } | } | ||||||
|  | |||||||
| @ -70,7 +70,7 @@ | |||||||
|         </div> |         </div> | ||||||
|         <div class="form-group"> |         <div class="form-group"> | ||||||
|             <div class="col-md-offset-8 col-md-4"> |             <div class="col-md-offset-8 col-md-4"> | ||||||
|                 <input type="submit" value="[ PLACE ORDER ]" class="btn btn-default btn-brand btn-cart" /> |                 <input type="submit" value="[ Place Order ]" name="action" class="btn btn-default btn-brand btn-cart" /> | ||||||
|             </div> |             </div> | ||||||
|         </div> |         </div> | ||||||
|     </form> |     </form> | ||||||
|  | |||||||
| @ -3,8 +3,9 @@ | |||||||
|     //"DefaultConnection": "Server=127.0.0.1,5433;Database=aspnet-Microsoft.eShopOnContainers.WebMVC;User Id=sa;Password=Pass@word" |     //"DefaultConnection": "Server=127.0.0.1,5433;Database=aspnet-Microsoft.eShopOnContainers.WebMVC;User Id=sa;Password=Pass@word" | ||||||
|     "DefaultConnection": "Server=identity.data;Database=aspnet-Microsoft.eShopOnContainers.WebMVC;User Id=sa;Password=Pass@word" |     "DefaultConnection": "Server=identity.data;Database=aspnet-Microsoft.eShopOnContainers.WebMVC;User Id=sa;Password=Pass@word" | ||||||
|   }, |   }, | ||||||
|   "CatalogUrl": "http://localhost:5001", |   "CatalogUrl": "http://localhost:5101", | ||||||
|   "OrderingUrl": "http://localhost:2446/", |   "OrderingUrl": "http://localhost:5102/", | ||||||
|  |   "BasketUrl":  "http://localhost:5103", | ||||||
|   "Logging": { |   "Logging": { | ||||||
|     "IncludeScopes": false, |     "IncludeScopes": false, | ||||||
|     "LogLevel": { |     "LogLevel": { | ||||||
|  | |||||||
| @ -39,7 +39,7 @@ services: | |||||||
|     environment: |     environment: | ||||||
|       - ConnectionString=Server=ordering.data;Database=Microsoft.eShopOnContainers.Services.OrderingDb;User Id=sa;Password=Pass@word |       - ConnectionString=Server=ordering.data;Database=Microsoft.eShopOnContainers.Services.OrderingDb;User Id=sa;Password=Pass@word | ||||||
|     ports: |     ports: | ||||||
|       - "81:80" |       - "5102:80" | ||||||
| # (Go to Production): For secured/final deployment, remove Ports mapping and | # (Go to Production): For secured/final deployment, remove Ports mapping and | ||||||
| # leave just the internal expose section  | # leave just the internal expose section  | ||||||
| #    expose: | #    expose: | ||||||
| @ -61,3 +61,18 @@ services: | |||||||
|       - ACCEPT_EULA=Y |       - ACCEPT_EULA=Y | ||||||
|     ports: |     ports: | ||||||
|       - "5433:1433" |       - "5433:1433" | ||||||
|  | 
 | ||||||
|  |   basket.api: | ||||||
|  |     image: eshop/basket.api | ||||||
|  |     environment: | ||||||
|  |       - ConnectionString=basket.data | ||||||
|  |     build: | ||||||
|  |       context: . | ||||||
|  |       dockerfile: Dockerfile | ||||||
|  |     ports: | ||||||
|  |       - "5103:80" | ||||||
|  |     depends_on: | ||||||
|  |       - basket.data | ||||||
|  | 
 | ||||||
|  |   basket.data: | ||||||
|  |     image: redis | ||||||
							
								
								
									
										2
									
								
								src/Web/WebMVC/wwwroot/css/site.min.css
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										2
									
								
								src/Web/WebMVC/wwwroot/css/site.min.css
									
									
									
									
										vendored
									
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user