diff --git a/.env b/.env
index d9482516b..e2358c823 100644
--- a/.env
+++ b/.env
@@ -5,4 +5,20 @@
# The IP below should be swapped to your real IP or DNS name, like 192.168.88.248, etc. if testing from remote browsers or mobile devices
ESHOP_EXTERNAL_DNS_NAME_OR_IP=localhost
-ESHOP_PROD_EXTERNAL_DNS_NAME_OR_IP=10.121.122.92
\ No newline at end of file
+ESHOP_PROD_EXTERNAL_DNS_NAME_OR_IP=10.121.122.92
+
+#ESHOP_AZURE_REDIS_BASKET_DB=
+#ESHOP_AZURE_STORAGE_CATALOG=
+#ESHOP_AZURE_STORAGE_MARKETING=
+#ESHOP_AZURE_SERVICE_BUS=
+#ESHOP_AZURE_COSMOSDB=
+#ESHOP_AZURE_CATALOG_DB=
+#ESHOP_AZURE_IDENTITY_DB=
+#ESHOP_AZURE_ORDERING_DB=
+#ESHOP_AZURE_MARKETING_DB=
+#ESHOP_AZUREFUNC_CAMPAIGN_DETAILS_URI=
+#ESHOP_AZURE_STORAGE_CATALOG_NAME=
+#ESHOP_AZURE_STORAGE_CATALOG_KEY=
+#ESHOP_AZURE_STORAGE_MARKETING_NAME=
+#ESHOP_AZURE_STORAGE_MARKETING_KEY=
+
diff --git a/.gitignore b/.gitignore
index 0fb1c0ab0..548ad2340 100644
--- a/.gitignore
+++ b/.gitignore
@@ -189,7 +189,6 @@ ClientBin/
*~
*.dbmdl
*.dbproj.schemaview
-*.pfx
*.publishsettings
node_modules/
orleans.codegen.cs
diff --git a/Components/GeolocatorPlugin-1.0.3.info b/Components/GeolocatorPlugin-1.0.3.info
new file mode 100644
index 000000000..759500537
--- /dev/null
+++ b/Components/GeolocatorPlugin-1.0.3.info
@@ -0,0 +1 @@
+{"Name":"Geolocator Plugin","Id":2035,"Alias":"GeolocatorPlugin","Description":"# Geolocator Plugin details\r\n\r\nSimple cross platform plugin to get GPS location including heading, speed, and more.\r\n\r\n#### Features\r\n* Async GPS Location Detection\r\n* Heading\r\n* Speed\r\n* Listen for Changes\r\n\r\n\r\nWorks from any shared code or PCL project.\r\n\r\nFind more plugins at: http://www.github.com/xamarin/plugins","Version":"1.0.3","Summary":"Simple cross platform plugin to get GPS location including heading, speed, and more.","QuickStart":"# Getting Started with Geolocator Plugin\r\n\r\n### API Usage\r\n\r\nCall **CrossGeolocator.Current** from any project or PCL to gain access to APIs.\r\n\r\n```\r\nvar locator = CrossGeolocator.Current;\r\nlocator.DesiredAccuracy = 50;\r\n\r\nvar position = await locator.GetPositionAsync (timeoutMilliseconds: 10000);\r\n\r\nConsole.WriteLine (\"Position Status: {0}\", position.Timestamp);\r\nConsole.WriteLine (\"Position Latitude: {0}\", position.Latitude);\r\nConsole.WriteLine (\"Position Longitude: {0}\", position.Longitude);\r\n```\r\n\r\n### **IMPORTANT**\r\nAndroid:\r\n\r\nYou must request ACCESS_COARSE_LOCATION \u0026 ACCESS_FINE_LOCATION permission\r\n\r\niOS:\r\n\r\nIn iOS 8 you now have to call either RequestWhenInUseAuthorization or RequestAlwaysAuthorization on the location manager. Additionally you need to add either the concisely named NSLocationWhenInUseUsageDescription or NSLocationAlwaysUsageDescription to your Info.plist. \r\nSee: http://motzcod.es/post/97662738237/scanning-for-ibeacons-in-ios-8\r\n\r\nWindows Phone:\r\n\r\nYou must set the ID_CAP_LOCATION permission.","Hash":"94480115a3947ef812df48cae11dbd94","TargetPlatforms":["ios","ios-unified","android"],"TrialHash":null}
\ No newline at end of file
diff --git a/Components/GeolocatorPlugin-1.0.3.png b/Components/GeolocatorPlugin-1.0.3.png
new file mode 100644
index 000000000..3ab2b3095
--- /dev/null
+++ b/Components/GeolocatorPlugin-1.0.3.png
@@ -0,0 +1,314 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Error
+
Oops, something unexpected happened.
+
Check out the links above and below. Maybe they can help.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Components/GeolocatorPlugin-1.0.3/component/Details.md b/Components/GeolocatorPlugin-1.0.3/component/Details.md
new file mode 100644
index 000000000..1968cacaf
--- /dev/null
+++ b/Components/GeolocatorPlugin-1.0.3/component/Details.md
@@ -0,0 +1,14 @@
+# Geolocator Plugin details
+
+Simple cross platform plugin to get GPS location including heading, speed, and more.
+
+#### Features
+* Async GPS Location Detection
+* Heading
+* Speed
+* Listen for Changes
+
+
+Works from any shared code or PCL project.
+
+Find more plugins at: http://www.github.com/xamarin/plugins
\ No newline at end of file
diff --git a/Components/GeolocatorPlugin-1.0.3/component/GettingStarted.md b/Components/GeolocatorPlugin-1.0.3/component/GettingStarted.md
new file mode 100644
index 000000000..41d19fb93
--- /dev/null
+++ b/Components/GeolocatorPlugin-1.0.3/component/GettingStarted.md
@@ -0,0 +1,30 @@
+# Getting Started with Geolocator Plugin
+
+### API Usage
+
+Call **CrossGeolocator.Current** from any project or PCL to gain access to APIs.
+
+```
+var locator = CrossGeolocator.Current;
+locator.DesiredAccuracy = 50;
+
+var position = await locator.GetPositionAsync (timeoutMilliseconds: 10000);
+
+Console.WriteLine ("Position Status: {0}", position.Timestamp);
+Console.WriteLine ("Position Latitude: {0}", position.Latitude);
+Console.WriteLine ("Position Longitude: {0}", position.Longitude);
+```
+
+### **IMPORTANT**
+Android:
+
+You must request ACCESS_COARSE_LOCATION & ACCESS_FINE_LOCATION permission
+
+iOS:
+
+In iOS 8 you now have to call either RequestWhenInUseAuthorization or RequestAlwaysAuthorization on the location manager. Additionally you need to add either the concisely named NSLocationWhenInUseUsageDescription or NSLocationAlwaysUsageDescription to your Info.plist.
+See: http://motzcod.es/post/97662738237/scanning-for-ibeacons-in-ios-8
+
+Windows Phone:
+
+You must set the ID_CAP_LOCATION permission.
\ No newline at end of file
diff --git a/Components/GeolocatorPlugin-1.0.3/component/License.md b/Components/GeolocatorPlugin-1.0.3/component/License.md
new file mode 100644
index 000000000..38df422ff
--- /dev/null
+++ b/Components/GeolocatorPlugin-1.0.3/component/License.md
@@ -0,0 +1,23 @@
+# Geolocator Plugin license
+
+
+The MIT License (MIT)
+
+Copyright (c) 2014 James Montemagno / Refractored LLC
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of
+this software and associated documentation files (the "Software"), to deal in
+the Software without restriction, including without limitation the rights to
+use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
+the Software, and to permit persons to whom the Software is furnished to do so,
+subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
+FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
+COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
\ No newline at end of file
diff --git a/Components/GeolocatorPlugin-1.0.3/component/Manifest.xml b/Components/GeolocatorPlugin-1.0.3/component/Manifest.xml
new file mode 100644
index 000000000..ba7ed5a60
--- /dev/null
+++ b/Components/GeolocatorPlugin-1.0.3/component/Manifest.xml
@@ -0,0 +1,29 @@
+
+
+ Geolocator Plugin
+ James Montemagno
+ http://www.github.com/jamesmontemagno/Xamarin.Plugins
+ 1.0.3
+ Simple cross platform plugin to get GPS location including heading, speed, and more.
+
+
+
+
+
+
+
+
+
+ Android Sample
+ Android Sample
+
+
+ WindowsPhone Sample
+ WindowsPhone Sample
+
+
+ iOS Sample
+ iOS Sample
+
+
+
\ No newline at end of file
diff --git a/Components/GeolocatorPlugin-1.0.3/component/icons/GeolocatorPlugin_128x128.png b/Components/GeolocatorPlugin-1.0.3/component/icons/GeolocatorPlugin_128x128.png
new file mode 100644
index 000000000..1abe3c4bc
Binary files /dev/null and b/Components/GeolocatorPlugin-1.0.3/component/icons/GeolocatorPlugin_128x128.png differ
diff --git a/Components/GeolocatorPlugin-1.0.3/component/icons/GeolocatorPlugin_512x512.png b/Components/GeolocatorPlugin-1.0.3/component/icons/GeolocatorPlugin_512x512.png
new file mode 100644
index 000000000..2d0eb95e0
Binary files /dev/null and b/Components/GeolocatorPlugin-1.0.3/component/icons/GeolocatorPlugin_512x512.png differ
diff --git a/Components/GeolocatorPlugin-1.0.3/samples/GeolocatorSample/GeolocatorSample.sln b/Components/GeolocatorPlugin-1.0.3/samples/GeolocatorSample/GeolocatorSample.sln
new file mode 100644
index 000000000..af17e4c37
--- /dev/null
+++ b/Components/GeolocatorPlugin-1.0.3/samples/GeolocatorSample/GeolocatorSample.sln
@@ -0,0 +1,210 @@
+
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio 2013
+VisualStudioVersion = 12.0.30723.0
+MinimumVisualStudioVersion = 10.0.40219.1
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GeolocatorSample", "GeolocatorSample\GeolocatorSample\GeolocatorSample.csproj", "{02BB8331-934C-424B-A0ED-438E6F1C39D4}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GeolocatorSample.iOS", "GeolocatorSample\GeolocatorSample.iOS\GeolocatorSample.iOS.csproj", "{CF64F284-8850-4DC0-ADD4-E066A0744AF3}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GeolocatorSample.Droid", "GeolocatorSample\GeolocatorSample.Droid\GeolocatorSample.Droid.csproj", "{FD7768FC-ECB7-4E9C-AFBB-ADEB949B2748}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GeolocatorSample.WinPhone", "GeolocatorSample\GeolocatorSample.WinPhone\GeolocatorSample.WinPhone.csproj", "{82A2958E-AB5B-40B8-A556-DA41952F870F}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Ad-Hoc|Any CPU = Ad-Hoc|Any CPU
+ Ad-Hoc|ARM = Ad-Hoc|ARM
+ Ad-Hoc|iPhone = Ad-Hoc|iPhone
+ Ad-Hoc|iPhoneSimulator = Ad-Hoc|iPhoneSimulator
+ Ad-Hoc|Mixed Platforms = Ad-Hoc|Mixed Platforms
+ Ad-Hoc|x86 = Ad-Hoc|x86
+ AppStore|Any CPU = AppStore|Any CPU
+ AppStore|ARM = AppStore|ARM
+ AppStore|iPhone = AppStore|iPhone
+ AppStore|iPhoneSimulator = AppStore|iPhoneSimulator
+ AppStore|Mixed Platforms = AppStore|Mixed Platforms
+ AppStore|x86 = AppStore|x86
+ Debug|Any CPU = Debug|Any CPU
+ Debug|ARM = Debug|ARM
+ Debug|iPhone = Debug|iPhone
+ Debug|iPhoneSimulator = Debug|iPhoneSimulator
+ Debug|Mixed Platforms = Debug|Mixed Platforms
+ Debug|x86 = Debug|x86
+ Release|Any CPU = Release|Any CPU
+ Release|ARM = Release|ARM
+ Release|iPhone = Release|iPhone
+ Release|iPhoneSimulator = Release|iPhoneSimulator
+ Release|Mixed Platforms = Release|Mixed Platforms
+ Release|x86 = Release|x86
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {02BB8331-934C-424B-A0ED-438E6F1C39D4}.Ad-Hoc|Any CPU.ActiveCfg = Release|Any CPU
+ {02BB8331-934C-424B-A0ED-438E6F1C39D4}.Ad-Hoc|Any CPU.Build.0 = Release|Any CPU
+ {02BB8331-934C-424B-A0ED-438E6F1C39D4}.Ad-Hoc|ARM.ActiveCfg = Release|Any CPU
+ {02BB8331-934C-424B-A0ED-438E6F1C39D4}.Ad-Hoc|iPhone.ActiveCfg = Release|Any CPU
+ {02BB8331-934C-424B-A0ED-438E6F1C39D4}.Ad-Hoc|iPhoneSimulator.ActiveCfg = Release|Any CPU
+ {02BB8331-934C-424B-A0ED-438E6F1C39D4}.Ad-Hoc|Mixed Platforms.ActiveCfg = Release|Any CPU
+ {02BB8331-934C-424B-A0ED-438E6F1C39D4}.Ad-Hoc|Mixed Platforms.Build.0 = Release|Any CPU
+ {02BB8331-934C-424B-A0ED-438E6F1C39D4}.Ad-Hoc|x86.ActiveCfg = Release|Any CPU
+ {02BB8331-934C-424B-A0ED-438E6F1C39D4}.AppStore|Any CPU.ActiveCfg = Release|Any CPU
+ {02BB8331-934C-424B-A0ED-438E6F1C39D4}.AppStore|Any CPU.Build.0 = Release|Any CPU
+ {02BB8331-934C-424B-A0ED-438E6F1C39D4}.AppStore|ARM.ActiveCfg = Release|Any CPU
+ {02BB8331-934C-424B-A0ED-438E6F1C39D4}.AppStore|iPhone.ActiveCfg = Release|Any CPU
+ {02BB8331-934C-424B-A0ED-438E6F1C39D4}.AppStore|iPhoneSimulator.ActiveCfg = Release|Any CPU
+ {02BB8331-934C-424B-A0ED-438E6F1C39D4}.AppStore|Mixed Platforms.ActiveCfg = Release|Any CPU
+ {02BB8331-934C-424B-A0ED-438E6F1C39D4}.AppStore|Mixed Platforms.Build.0 = Release|Any CPU
+ {02BB8331-934C-424B-A0ED-438E6F1C39D4}.AppStore|x86.ActiveCfg = Release|Any CPU
+ {02BB8331-934C-424B-A0ED-438E6F1C39D4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {02BB8331-934C-424B-A0ED-438E6F1C39D4}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {02BB8331-934C-424B-A0ED-438E6F1C39D4}.Debug|ARM.ActiveCfg = Debug|Any CPU
+ {02BB8331-934C-424B-A0ED-438E6F1C39D4}.Debug|iPhone.ActiveCfg = Debug|Any CPU
+ {02BB8331-934C-424B-A0ED-438E6F1C39D4}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU
+ {02BB8331-934C-424B-A0ED-438E6F1C39D4}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
+ {02BB8331-934C-424B-A0ED-438E6F1C39D4}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
+ {02BB8331-934C-424B-A0ED-438E6F1C39D4}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {02BB8331-934C-424B-A0ED-438E6F1C39D4}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {02BB8331-934C-424B-A0ED-438E6F1C39D4}.Release|Any CPU.Build.0 = Release|Any CPU
+ {02BB8331-934C-424B-A0ED-438E6F1C39D4}.Release|ARM.ActiveCfg = Release|Any CPU
+ {02BB8331-934C-424B-A0ED-438E6F1C39D4}.Release|iPhone.ActiveCfg = Release|Any CPU
+ {02BB8331-934C-424B-A0ED-438E6F1C39D4}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
+ {02BB8331-934C-424B-A0ED-438E6F1C39D4}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
+ {02BB8331-934C-424B-A0ED-438E6F1C39D4}.Release|Mixed Platforms.Build.0 = Release|Any CPU
+ {02BB8331-934C-424B-A0ED-438E6F1C39D4}.Release|x86.ActiveCfg = Release|Any CPU
+ {CF64F284-8850-4DC0-ADD4-E066A0744AF3}.Ad-Hoc|Any CPU.ActiveCfg = Ad-Hoc|iPhone
+ {CF64F284-8850-4DC0-ADD4-E066A0744AF3}.Ad-Hoc|ARM.ActiveCfg = Ad-Hoc|iPhone
+ {CF64F284-8850-4DC0-ADD4-E066A0744AF3}.Ad-Hoc|iPhone.ActiveCfg = Ad-Hoc|iPhone
+ {CF64F284-8850-4DC0-ADD4-E066A0744AF3}.Ad-Hoc|iPhone.Build.0 = Ad-Hoc|iPhone
+ {CF64F284-8850-4DC0-ADD4-E066A0744AF3}.Ad-Hoc|iPhoneSimulator.ActiveCfg = Ad-Hoc|iPhoneSimulator
+ {CF64F284-8850-4DC0-ADD4-E066A0744AF3}.Ad-Hoc|iPhoneSimulator.Build.0 = Ad-Hoc|iPhoneSimulator
+ {CF64F284-8850-4DC0-ADD4-E066A0744AF3}.Ad-Hoc|Mixed Platforms.ActiveCfg = Ad-Hoc|iPhone
+ {CF64F284-8850-4DC0-ADD4-E066A0744AF3}.Ad-Hoc|Mixed Platforms.Build.0 = Ad-Hoc|iPhone
+ {CF64F284-8850-4DC0-ADD4-E066A0744AF3}.Ad-Hoc|x86.ActiveCfg = Ad-Hoc|iPhone
+ {CF64F284-8850-4DC0-ADD4-E066A0744AF3}.AppStore|Any CPU.ActiveCfg = AppStore|iPhone
+ {CF64F284-8850-4DC0-ADD4-E066A0744AF3}.AppStore|ARM.ActiveCfg = AppStore|iPhone
+ {CF64F284-8850-4DC0-ADD4-E066A0744AF3}.AppStore|iPhone.ActiveCfg = AppStore|iPhone
+ {CF64F284-8850-4DC0-ADD4-E066A0744AF3}.AppStore|iPhone.Build.0 = AppStore|iPhone
+ {CF64F284-8850-4DC0-ADD4-E066A0744AF3}.AppStore|iPhoneSimulator.ActiveCfg = AppStore|iPhoneSimulator
+ {CF64F284-8850-4DC0-ADD4-E066A0744AF3}.AppStore|iPhoneSimulator.Build.0 = AppStore|iPhoneSimulator
+ {CF64F284-8850-4DC0-ADD4-E066A0744AF3}.AppStore|Mixed Platforms.ActiveCfg = AppStore|iPhone
+ {CF64F284-8850-4DC0-ADD4-E066A0744AF3}.AppStore|Mixed Platforms.Build.0 = AppStore|iPhone
+ {CF64F284-8850-4DC0-ADD4-E066A0744AF3}.AppStore|x86.ActiveCfg = AppStore|iPhone
+ {CF64F284-8850-4DC0-ADD4-E066A0744AF3}.Debug|Any CPU.ActiveCfg = Debug|iPhone
+ {CF64F284-8850-4DC0-ADD4-E066A0744AF3}.Debug|ARM.ActiveCfg = Debug|iPhone
+ {CF64F284-8850-4DC0-ADD4-E066A0744AF3}.Debug|iPhone.ActiveCfg = Debug|iPhone
+ {CF64F284-8850-4DC0-ADD4-E066A0744AF3}.Debug|iPhone.Build.0 = Debug|iPhone
+ {CF64F284-8850-4DC0-ADD4-E066A0744AF3}.Debug|iPhoneSimulator.ActiveCfg = Debug|iPhoneSimulator
+ {CF64F284-8850-4DC0-ADD4-E066A0744AF3}.Debug|iPhoneSimulator.Build.0 = Debug|iPhoneSimulator
+ {CF64F284-8850-4DC0-ADD4-E066A0744AF3}.Debug|Mixed Platforms.ActiveCfg = Debug|iPhone
+ {CF64F284-8850-4DC0-ADD4-E066A0744AF3}.Debug|Mixed Platforms.Build.0 = Debug|iPhone
+ {CF64F284-8850-4DC0-ADD4-E066A0744AF3}.Debug|x86.ActiveCfg = Debug|iPhone
+ {CF64F284-8850-4DC0-ADD4-E066A0744AF3}.Release|Any CPU.ActiveCfg = Release|iPhone
+ {CF64F284-8850-4DC0-ADD4-E066A0744AF3}.Release|ARM.ActiveCfg = Release|iPhone
+ {CF64F284-8850-4DC0-ADD4-E066A0744AF3}.Release|iPhone.ActiveCfg = Release|iPhone
+ {CF64F284-8850-4DC0-ADD4-E066A0744AF3}.Release|iPhone.Build.0 = Release|iPhone
+ {CF64F284-8850-4DC0-ADD4-E066A0744AF3}.Release|iPhoneSimulator.ActiveCfg = Release|iPhoneSimulator
+ {CF64F284-8850-4DC0-ADD4-E066A0744AF3}.Release|iPhoneSimulator.Build.0 = Release|iPhoneSimulator
+ {CF64F284-8850-4DC0-ADD4-E066A0744AF3}.Release|Mixed Platforms.ActiveCfg = Release|iPhone
+ {CF64F284-8850-4DC0-ADD4-E066A0744AF3}.Release|Mixed Platforms.Build.0 = Release|iPhone
+ {CF64F284-8850-4DC0-ADD4-E066A0744AF3}.Release|x86.ActiveCfg = Release|iPhone
+ {FD7768FC-ECB7-4E9C-AFBB-ADEB949B2748}.Ad-Hoc|Any CPU.ActiveCfg = Release|Any CPU
+ {FD7768FC-ECB7-4E9C-AFBB-ADEB949B2748}.Ad-Hoc|Any CPU.Build.0 = Release|Any CPU
+ {FD7768FC-ECB7-4E9C-AFBB-ADEB949B2748}.Ad-Hoc|Any CPU.Deploy.0 = Release|Any CPU
+ {FD7768FC-ECB7-4E9C-AFBB-ADEB949B2748}.Ad-Hoc|ARM.ActiveCfg = Release|Any CPU
+ {FD7768FC-ECB7-4E9C-AFBB-ADEB949B2748}.Ad-Hoc|iPhone.ActiveCfg = Release|Any CPU
+ {FD7768FC-ECB7-4E9C-AFBB-ADEB949B2748}.Ad-Hoc|iPhoneSimulator.ActiveCfg = Release|Any CPU
+ {FD7768FC-ECB7-4E9C-AFBB-ADEB949B2748}.Ad-Hoc|Mixed Platforms.ActiveCfg = Release|Any CPU
+ {FD7768FC-ECB7-4E9C-AFBB-ADEB949B2748}.Ad-Hoc|Mixed Platforms.Build.0 = Release|Any CPU
+ {FD7768FC-ECB7-4E9C-AFBB-ADEB949B2748}.Ad-Hoc|Mixed Platforms.Deploy.0 = Release|Any CPU
+ {FD7768FC-ECB7-4E9C-AFBB-ADEB949B2748}.Ad-Hoc|x86.ActiveCfg = Release|Any CPU
+ {FD7768FC-ECB7-4E9C-AFBB-ADEB949B2748}.AppStore|Any CPU.ActiveCfg = Release|Any CPU
+ {FD7768FC-ECB7-4E9C-AFBB-ADEB949B2748}.AppStore|Any CPU.Build.0 = Release|Any CPU
+ {FD7768FC-ECB7-4E9C-AFBB-ADEB949B2748}.AppStore|Any CPU.Deploy.0 = Release|Any CPU
+ {FD7768FC-ECB7-4E9C-AFBB-ADEB949B2748}.AppStore|ARM.ActiveCfg = Release|Any CPU
+ {FD7768FC-ECB7-4E9C-AFBB-ADEB949B2748}.AppStore|iPhone.ActiveCfg = Release|Any CPU
+ {FD7768FC-ECB7-4E9C-AFBB-ADEB949B2748}.AppStore|iPhoneSimulator.ActiveCfg = Release|Any CPU
+ {FD7768FC-ECB7-4E9C-AFBB-ADEB949B2748}.AppStore|Mixed Platforms.ActiveCfg = Release|Any CPU
+ {FD7768FC-ECB7-4E9C-AFBB-ADEB949B2748}.AppStore|Mixed Platforms.Build.0 = Release|Any CPU
+ {FD7768FC-ECB7-4E9C-AFBB-ADEB949B2748}.AppStore|Mixed Platforms.Deploy.0 = Release|Any CPU
+ {FD7768FC-ECB7-4E9C-AFBB-ADEB949B2748}.AppStore|x86.ActiveCfg = Release|Any CPU
+ {FD7768FC-ECB7-4E9C-AFBB-ADEB949B2748}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {FD7768FC-ECB7-4E9C-AFBB-ADEB949B2748}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {FD7768FC-ECB7-4E9C-AFBB-ADEB949B2748}.Debug|Any CPU.Deploy.0 = Debug|Any CPU
+ {FD7768FC-ECB7-4E9C-AFBB-ADEB949B2748}.Debug|ARM.ActiveCfg = Debug|Any CPU
+ {FD7768FC-ECB7-4E9C-AFBB-ADEB949B2748}.Debug|iPhone.ActiveCfg = Debug|Any CPU
+ {FD7768FC-ECB7-4E9C-AFBB-ADEB949B2748}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU
+ {FD7768FC-ECB7-4E9C-AFBB-ADEB949B2748}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
+ {FD7768FC-ECB7-4E9C-AFBB-ADEB949B2748}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
+ {FD7768FC-ECB7-4E9C-AFBB-ADEB949B2748}.Debug|Mixed Platforms.Deploy.0 = Debug|Any CPU
+ {FD7768FC-ECB7-4E9C-AFBB-ADEB949B2748}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {FD7768FC-ECB7-4E9C-AFBB-ADEB949B2748}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {FD7768FC-ECB7-4E9C-AFBB-ADEB949B2748}.Release|Any CPU.Build.0 = Release|Any CPU
+ {FD7768FC-ECB7-4E9C-AFBB-ADEB949B2748}.Release|Any CPU.Deploy.0 = Release|Any CPU
+ {FD7768FC-ECB7-4E9C-AFBB-ADEB949B2748}.Release|ARM.ActiveCfg = Release|Any CPU
+ {FD7768FC-ECB7-4E9C-AFBB-ADEB949B2748}.Release|iPhone.ActiveCfg = Release|Any CPU
+ {FD7768FC-ECB7-4E9C-AFBB-ADEB949B2748}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
+ {FD7768FC-ECB7-4E9C-AFBB-ADEB949B2748}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
+ {FD7768FC-ECB7-4E9C-AFBB-ADEB949B2748}.Release|Mixed Platforms.Build.0 = Release|Any CPU
+ {FD7768FC-ECB7-4E9C-AFBB-ADEB949B2748}.Release|Mixed Platforms.Deploy.0 = Release|Any CPU
+ {FD7768FC-ECB7-4E9C-AFBB-ADEB949B2748}.Release|x86.ActiveCfg = Release|Any CPU
+ {82A2958E-AB5B-40B8-A556-DA41952F870F}.Ad-Hoc|Any CPU.ActiveCfg = Release|Any CPU
+ {82A2958E-AB5B-40B8-A556-DA41952F870F}.Ad-Hoc|Any CPU.Build.0 = Release|Any CPU
+ {82A2958E-AB5B-40B8-A556-DA41952F870F}.Ad-Hoc|Any CPU.Deploy.0 = Release|Any CPU
+ {82A2958E-AB5B-40B8-A556-DA41952F870F}.Ad-Hoc|ARM.ActiveCfg = Release|ARM
+ {82A2958E-AB5B-40B8-A556-DA41952F870F}.Ad-Hoc|ARM.Build.0 = Release|ARM
+ {82A2958E-AB5B-40B8-A556-DA41952F870F}.Ad-Hoc|ARM.Deploy.0 = Release|ARM
+ {82A2958E-AB5B-40B8-A556-DA41952F870F}.Ad-Hoc|iPhone.ActiveCfg = Release|Any CPU
+ {82A2958E-AB5B-40B8-A556-DA41952F870F}.Ad-Hoc|iPhoneSimulator.ActiveCfg = Release|Any CPU
+ {82A2958E-AB5B-40B8-A556-DA41952F870F}.Ad-Hoc|Mixed Platforms.ActiveCfg = Release|x86
+ {82A2958E-AB5B-40B8-A556-DA41952F870F}.Ad-Hoc|Mixed Platforms.Build.0 = Release|x86
+ {82A2958E-AB5B-40B8-A556-DA41952F870F}.Ad-Hoc|Mixed Platforms.Deploy.0 = Release|x86
+ {82A2958E-AB5B-40B8-A556-DA41952F870F}.Ad-Hoc|x86.ActiveCfg = Release|x86
+ {82A2958E-AB5B-40B8-A556-DA41952F870F}.Ad-Hoc|x86.Build.0 = Release|x86
+ {82A2958E-AB5B-40B8-A556-DA41952F870F}.Ad-Hoc|x86.Deploy.0 = Release|x86
+ {82A2958E-AB5B-40B8-A556-DA41952F870F}.AppStore|Any CPU.ActiveCfg = Release|Any CPU
+ {82A2958E-AB5B-40B8-A556-DA41952F870F}.AppStore|Any CPU.Build.0 = Release|Any CPU
+ {82A2958E-AB5B-40B8-A556-DA41952F870F}.AppStore|Any CPU.Deploy.0 = Release|Any CPU
+ {82A2958E-AB5B-40B8-A556-DA41952F870F}.AppStore|ARM.ActiveCfg = Release|ARM
+ {82A2958E-AB5B-40B8-A556-DA41952F870F}.AppStore|ARM.Build.0 = Release|ARM
+ {82A2958E-AB5B-40B8-A556-DA41952F870F}.AppStore|ARM.Deploy.0 = Release|ARM
+ {82A2958E-AB5B-40B8-A556-DA41952F870F}.AppStore|iPhone.ActiveCfg = Release|Any CPU
+ {82A2958E-AB5B-40B8-A556-DA41952F870F}.AppStore|iPhoneSimulator.ActiveCfg = Release|Any CPU
+ {82A2958E-AB5B-40B8-A556-DA41952F870F}.AppStore|Mixed Platforms.ActiveCfg = Release|x86
+ {82A2958E-AB5B-40B8-A556-DA41952F870F}.AppStore|Mixed Platforms.Build.0 = Release|x86
+ {82A2958E-AB5B-40B8-A556-DA41952F870F}.AppStore|Mixed Platforms.Deploy.0 = Release|x86
+ {82A2958E-AB5B-40B8-A556-DA41952F870F}.AppStore|x86.ActiveCfg = Release|x86
+ {82A2958E-AB5B-40B8-A556-DA41952F870F}.AppStore|x86.Build.0 = Release|x86
+ {82A2958E-AB5B-40B8-A556-DA41952F870F}.AppStore|x86.Deploy.0 = Release|x86
+ {82A2958E-AB5B-40B8-A556-DA41952F870F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {82A2958E-AB5B-40B8-A556-DA41952F870F}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {82A2958E-AB5B-40B8-A556-DA41952F870F}.Debug|Any CPU.Deploy.0 = Debug|Any CPU
+ {82A2958E-AB5B-40B8-A556-DA41952F870F}.Debug|ARM.ActiveCfg = Debug|ARM
+ {82A2958E-AB5B-40B8-A556-DA41952F870F}.Debug|ARM.Build.0 = Debug|ARM
+ {82A2958E-AB5B-40B8-A556-DA41952F870F}.Debug|ARM.Deploy.0 = Debug|ARM
+ {82A2958E-AB5B-40B8-A556-DA41952F870F}.Debug|iPhone.ActiveCfg = Debug|Any CPU
+ {82A2958E-AB5B-40B8-A556-DA41952F870F}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU
+ {82A2958E-AB5B-40B8-A556-DA41952F870F}.Debug|Mixed Platforms.ActiveCfg = Debug|x86
+ {82A2958E-AB5B-40B8-A556-DA41952F870F}.Debug|Mixed Platforms.Build.0 = Debug|x86
+ {82A2958E-AB5B-40B8-A556-DA41952F870F}.Debug|Mixed Platforms.Deploy.0 = Debug|x86
+ {82A2958E-AB5B-40B8-A556-DA41952F870F}.Debug|x86.ActiveCfg = Debug|x86
+ {82A2958E-AB5B-40B8-A556-DA41952F870F}.Debug|x86.Build.0 = Debug|x86
+ {82A2958E-AB5B-40B8-A556-DA41952F870F}.Debug|x86.Deploy.0 = Debug|x86
+ {82A2958E-AB5B-40B8-A556-DA41952F870F}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {82A2958E-AB5B-40B8-A556-DA41952F870F}.Release|Any CPU.Build.0 = Release|Any CPU
+ {82A2958E-AB5B-40B8-A556-DA41952F870F}.Release|Any CPU.Deploy.0 = Release|Any CPU
+ {82A2958E-AB5B-40B8-A556-DA41952F870F}.Release|ARM.ActiveCfg = Release|ARM
+ {82A2958E-AB5B-40B8-A556-DA41952F870F}.Release|ARM.Build.0 = Release|ARM
+ {82A2958E-AB5B-40B8-A556-DA41952F870F}.Release|ARM.Deploy.0 = Release|ARM
+ {82A2958E-AB5B-40B8-A556-DA41952F870F}.Release|iPhone.ActiveCfg = Release|Any CPU
+ {82A2958E-AB5B-40B8-A556-DA41952F870F}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
+ {82A2958E-AB5B-40B8-A556-DA41952F870F}.Release|Mixed Platforms.ActiveCfg = Release|x86
+ {82A2958E-AB5B-40B8-A556-DA41952F870F}.Release|Mixed Platforms.Build.0 = Release|x86
+ {82A2958E-AB5B-40B8-A556-DA41952F870F}.Release|Mixed Platforms.Deploy.0 = Release|x86
+ {82A2958E-AB5B-40B8-A556-DA41952F870F}.Release|x86.ActiveCfg = Release|x86
+ {82A2958E-AB5B-40B8-A556-DA41952F870F}.Release|x86.Build.0 = Release|x86
+ {82A2958E-AB5B-40B8-A556-DA41952F870F}.Release|x86.Deploy.0 = Release|x86
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+EndGlobal
diff --git a/Components/GeolocatorPlugin-1.0.3/samples/GeolocatorSample/GeolocatorSample/GeolocatorSample.Droid/Assets/AboutAssets.txt b/Components/GeolocatorPlugin-1.0.3/samples/GeolocatorSample/GeolocatorSample/GeolocatorSample.Droid/Assets/AboutAssets.txt
new file mode 100644
index 000000000..5ddf08729
--- /dev/null
+++ b/Components/GeolocatorPlugin-1.0.3/samples/GeolocatorSample/GeolocatorSample/GeolocatorSample.Droid/Assets/AboutAssets.txt
@@ -0,0 +1,19 @@
+Any raw assets you want to be deployed with your application can be placed in
+this directory (and child directories) and given a Build Action of "AndroidAsset".
+
+These files will be deployed with you package and will be accessible using Android's
+AssetManager, like this:
+
+public class ReadAsset : Activity
+{
+ protected override void OnCreate (Bundle bundle)
+ {
+ base.OnCreate (bundle);
+
+ InputStream input = Assets.Open ("my_asset.txt");
+ }
+}
+
+Additionally, some Android functions will automatically load asset files:
+
+Typeface tf = Typeface.CreateFromAsset (Context.Assets, "fonts/samplefont.ttf");
diff --git a/Components/GeolocatorPlugin-1.0.3/samples/GeolocatorSample/GeolocatorSample/GeolocatorSample.Droid/GeolocatorSample.Droid.csproj b/Components/GeolocatorPlugin-1.0.3/samples/GeolocatorSample/GeolocatorSample/GeolocatorSample.Droid/GeolocatorSample.Droid.csproj
new file mode 100644
index 000000000..6d04baf16
--- /dev/null
+++ b/Components/GeolocatorPlugin-1.0.3/samples/GeolocatorSample/GeolocatorSample/GeolocatorSample.Droid/GeolocatorSample.Droid.csproj
@@ -0,0 +1,125 @@
+
+
+
+ Debug
+ AnyCPU
+ 8.0.30703
+ 2.0
+ {FD7768FC-ECB7-4E9C-AFBB-ADEB949B2748}
+ {EFBA0AD7-5A72-4C68-AF49-83D382785DCF};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
+ Library
+ Properties
+ GeolocatorSample.Droid
+ GeolocatorSample.Droid
+ 512
+ true
+ Resources\Resource.Designer.cs
+ Off
+ Properties\AndroidManifest.xml
+ true
+ armeabi,armeabi-v7a,x86
+
+
+
+
+ cd56d9b5
+ v5.1
+
+
+ true
+ full
+ false
+ bin\Debug\
+ DEBUG;TRACE
+ prompt
+ 4
+ True
+ None
+
+
+ pdbonly
+ true
+ bin\Release\
+ TRACE
+ prompt
+ 4
+ False
+ SdkOnly
+
+
+
+ False
+ ..\..\packages\Xamarin.Forms.1.3.4.6332\lib\MonoAndroid10\FormsViewGroup.dll
+
+
+ ..\..\packages\Xam.Plugin.Geolocator.1.0.3\lib\MonoAndroid10\Geolocator.Plugin.dll
+ True
+
+
+ ..\..\packages\Xam.Plugin.Geolocator.1.0.3\lib\MonoAndroid10\Geolocator.Plugin.Abstractions.dll
+ True
+
+
+
+
+
+
+
+
+ False
+ ..\..\packages\Xamarin.Android.Support.v4.21.0.3.0\lib\MonoAndroid10\Xamarin.Android.Support.v4.dll
+
+
+ False
+ ..\..\packages\Xamarin.Forms.1.3.4.6332\lib\MonoAndroid10\Xamarin.Forms.Core.dll
+
+
+ False
+ ..\..\packages\Xamarin.Forms.1.3.4.6332\lib\MonoAndroid10\Xamarin.Forms.Platform.Android.dll
+
+
+ False
+ ..\..\packages\Xamarin.Forms.1.3.4.6332\lib\MonoAndroid10\Xamarin.Forms.Xaml.dll
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ GeolocatorSample
+
+
+
+
+
+
+ This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.
+
+
+
+
+
\ No newline at end of file
diff --git a/Components/GeolocatorPlugin-1.0.3/samples/GeolocatorSample/GeolocatorSample/GeolocatorSample.Droid/MainActivity.cs b/Components/GeolocatorPlugin-1.0.3/samples/GeolocatorSample/GeolocatorSample/GeolocatorSample.Droid/MainActivity.cs
new file mode 100644
index 000000000..3fcc1151d
--- /dev/null
+++ b/Components/GeolocatorPlugin-1.0.3/samples/GeolocatorSample/GeolocatorSample/GeolocatorSample.Droid/MainActivity.cs
@@ -0,0 +1,24 @@
+using System;
+
+using Android.App;
+using Android.Content.PM;
+using Android.Runtime;
+using Android.Views;
+using Android.Widget;
+using Android.OS;
+
+namespace GeolocatorSample.Droid
+{
+ [Activity(Label = "GeolocatorSample", Icon = "@drawable/icon", MainLauncher = true, ConfigurationChanges = ConfigChanges.ScreenSize | ConfigChanges.Orientation)]
+ public class MainActivity : global::Xamarin.Forms.Platform.Android.FormsApplicationActivity
+ {
+ protected override void OnCreate(Bundle bundle)
+ {
+ base.OnCreate(bundle);
+
+ global::Xamarin.Forms.Forms.Init(this, bundle);
+ LoadApplication(new App());
+ }
+ }
+}
+
diff --git a/Components/GeolocatorPlugin-1.0.3/samples/GeolocatorSample/GeolocatorSample/GeolocatorSample.Droid/PluginsHelp/GeolocatorReadme.txt b/Components/GeolocatorPlugin-1.0.3/samples/GeolocatorSample/GeolocatorSample/GeolocatorSample.Droid/PluginsHelp/GeolocatorReadme.txt
new file mode 100644
index 000000000..8a88b0862
--- /dev/null
+++ b/Components/GeolocatorPlugin-1.0.3/samples/GeolocatorSample/GeolocatorSample/GeolocatorSample.Droid/PluginsHelp/GeolocatorReadme.txt
@@ -0,0 +1,24 @@
+Connectivity Readme
+Find the most up to date information at: https://github.com/jamesmontemagno/Xamarin.Plugins
+
+**IMPORTANT**
+Android:
+You must request ACCESS_COARSE_LOCATION & ACCESS_FINE_LOCATION permission
+
+iOS:
+In iOS 8 you now have to call either RequestWhenInUseAuthorization or RequestAlwaysAuthorization on the location manager. Additionally you need to add either the concisely named NSLocationWhenInUseUsageDescription or NSLocationAlwaysUsageDescription to your Info.plist.
+See: http://motzcod.es/post/97662738237/scanning-for-ibeacons-in-ios-8
+
+Windows Phone:
+You must set the ID_CAP_LOCATION permission.
+
+Getting Started:
+
+var locator = CrossGeolocator.Current;
+locator.DesiredAccuracy = 50;
+
+var position = await locator.GetPositionAsync (timeoutMilliseconds: 10000);
+
+Console.WriteLine ("Position Status: {0}", position.Timestamp);
+Console.WriteLine ("Position Latitude: {0}", position.Latitude);
+Console.WriteLine ("Position Longitude: {0}", position.Longitude);
\ No newline at end of file
diff --git a/Components/GeolocatorPlugin-1.0.3/samples/GeolocatorSample/GeolocatorSample/GeolocatorSample.Droid/Properties/AndroidManifest.xml b/Components/GeolocatorPlugin-1.0.3/samples/GeolocatorSample/GeolocatorSample/GeolocatorSample.Droid/Properties/AndroidManifest.xml
new file mode 100644
index 000000000..b3531db7e
--- /dev/null
+++ b/Components/GeolocatorPlugin-1.0.3/samples/GeolocatorSample/GeolocatorSample/GeolocatorSample.Droid/Properties/AndroidManifest.xml
@@ -0,0 +1,7 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Components/GeolocatorPlugin-1.0.3/samples/GeolocatorSample/GeolocatorSample/GeolocatorSample.Droid/Properties/AssemblyInfo.cs b/Components/GeolocatorPlugin-1.0.3/samples/GeolocatorSample/GeolocatorSample/GeolocatorSample.Droid/Properties/AssemblyInfo.cs
new file mode 100644
index 000000000..f729021a8
--- /dev/null
+++ b/Components/GeolocatorPlugin-1.0.3/samples/GeolocatorSample/GeolocatorSample/GeolocatorSample.Droid/Properties/AssemblyInfo.cs
@@ -0,0 +1,34 @@
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+using Android.App;
+
+// General Information about an assembly is controlled through the following
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyTitle("GeolocatorSample.Droid")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("GeolocatorSample.Droid")]
+[assembly: AssemblyCopyright("Copyright © 2014")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+[assembly: ComVisible(false)]
+
+// Version information for an assembly consists of the following four values:
+//
+// Major Version
+// Minor Version
+// Build Number
+// Revision
+//
+// You can specify all the values or you can default the Build and Revision Numbers
+// by using the '*' as shown below:
+// [assembly: AssemblyVersion("1.0.*")]
+[assembly: AssemblyVersion("1.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]
+
+// Add some common permissions, these can be removed if not needed
+[assembly: UsesPermission(Android.Manifest.Permission.Internet)]
+[assembly: UsesPermission(Android.Manifest.Permission.WriteExternalStorage)]
diff --git a/Components/GeolocatorPlugin-1.0.3/samples/GeolocatorSample/GeolocatorSample/GeolocatorSample.Droid/Resources/AboutResources.txt b/Components/GeolocatorPlugin-1.0.3/samples/GeolocatorSample/GeolocatorSample/GeolocatorSample.Droid/Resources/AboutResources.txt
new file mode 100644
index 000000000..cb30f20b1
--- /dev/null
+++ b/Components/GeolocatorPlugin-1.0.3/samples/GeolocatorSample/GeolocatorSample/GeolocatorSample.Droid/Resources/AboutResources.txt
@@ -0,0 +1,50 @@
+Images, layout descriptions, binary blobs and string dictionaries can be included
+in your application as resource files. Various Android APIs are designed to
+operate on the resource IDs instead of dealing with images, strings or binary blobs
+directly.
+
+For example, a sample Android app that contains a user interface layout (main.xml),
+an internationalization string table (strings.xml) and some icons (drawable-XXX/icon.png)
+would keep its resources in the "Resources" directory of the application:
+
+Resources/
+ drawable-hdpi/
+ icon.png
+
+ drawable-ldpi/
+ icon.png
+
+ drawable-mdpi/
+ icon.png
+
+ layout/
+ main.xml
+
+ values/
+ strings.xml
+
+In order to get the build system to recognize Android resources, set the build action to
+"AndroidResource". The native Android APIs do not operate directly with filenames, but
+instead operate on resource IDs. When you compile an Android application that uses resources,
+the build system will package the resources for distribution and generate a class called
+"Resource" that contains the tokens for each one of the resources included. For example,
+for the above Resources layout, this is what the Resource class would expose:
+
+public class Resource {
+ public class drawable {
+ public const int icon = 0x123;
+ }
+
+ public class layout {
+ public const int main = 0x456;
+ }
+
+ public class strings {
+ public const int first_string = 0xabc;
+ public const int second_string = 0xbcd;
+ }
+}
+
+You would then use R.drawable.icon to reference the drawable/icon.png file, or Resource.layout.main
+to reference the layout/main.xml file, or Resource.strings.first_string to reference the first
+string in the dictionary file values/strings.xml.
diff --git a/Components/GeolocatorPlugin-1.0.3/samples/GeolocatorSample/GeolocatorSample/GeolocatorSample.Droid/Resources/Resource.Designer.cs b/Components/GeolocatorPlugin-1.0.3/samples/GeolocatorSample/GeolocatorSample/GeolocatorSample.Droid/Resources/Resource.Designer.cs
new file mode 100644
index 000000000..3f6dad185
--- /dev/null
+++ b/Components/GeolocatorPlugin-1.0.3/samples/GeolocatorSample/GeolocatorSample/GeolocatorSample.Droid/Resources/Resource.Designer.cs
@@ -0,0 +1,61 @@
+#pragma warning disable 1591
+//------------------------------------------------------------------------------
+//
+// This code was generated by a tool.
+// Runtime Version:4.0.30319.34014
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+//
+//------------------------------------------------------------------------------
+
+[assembly: global::Android.Runtime.ResourceDesignerAttribute("GeolocatorSample.Droid.Resource", IsApplication=true)]
+
+namespace GeolocatorSample.Droid
+{
+
+
+ [System.CodeDom.Compiler.GeneratedCodeAttribute("Xamarin.Android.Build.Tasks", "1.0.0.0")]
+ public partial class Resource
+ {
+
+ static Resource()
+ {
+ global::Android.Runtime.ResourceIdManager.UpdateIdValues();
+ }
+
+ public static void UpdateIdValues()
+ {
+ }
+
+ public partial class Attribute
+ {
+
+ static Attribute()
+ {
+ global::Android.Runtime.ResourceIdManager.UpdateIdValues();
+ }
+
+ private Attribute()
+ {
+ }
+ }
+
+ public partial class Drawable
+ {
+
+ // aapt resource value: 0x7f020000
+ public const int icon = 2130837504;
+
+ static Drawable()
+ {
+ global::Android.Runtime.ResourceIdManager.UpdateIdValues();
+ }
+
+ private Drawable()
+ {
+ }
+ }
+ }
+}
+#pragma warning restore 1591
diff --git a/Components/GeolocatorPlugin-1.0.3/samples/GeolocatorSample/GeolocatorSample/GeolocatorSample.Droid/Resources/drawable-hdpi/icon.png b/Components/GeolocatorPlugin-1.0.3/samples/GeolocatorSample/GeolocatorSample/GeolocatorSample.Droid/Resources/drawable-hdpi/icon.png
new file mode 100644
index 000000000..964f110ab
Binary files /dev/null and b/Components/GeolocatorPlugin-1.0.3/samples/GeolocatorSample/GeolocatorSample/GeolocatorSample.Droid/Resources/drawable-hdpi/icon.png differ
diff --git a/Components/GeolocatorPlugin-1.0.3/samples/GeolocatorSample/GeolocatorSample/GeolocatorSample.Droid/Resources/drawable-xhdpi/icon.png b/Components/GeolocatorPlugin-1.0.3/samples/GeolocatorSample/GeolocatorSample/GeolocatorSample.Droid/Resources/drawable-xhdpi/icon.png
new file mode 100644
index 000000000..3c01e60ce
Binary files /dev/null and b/Components/GeolocatorPlugin-1.0.3/samples/GeolocatorSample/GeolocatorSample/GeolocatorSample.Droid/Resources/drawable-xhdpi/icon.png differ
diff --git a/Components/GeolocatorPlugin-1.0.3/samples/GeolocatorSample/GeolocatorSample/GeolocatorSample.Droid/Resources/drawable-xxhdpi/icon.png b/Components/GeolocatorPlugin-1.0.3/samples/GeolocatorSample/GeolocatorSample/GeolocatorSample.Droid/Resources/drawable-xxhdpi/icon.png
new file mode 100644
index 000000000..0d8c1c57d
Binary files /dev/null and b/Components/GeolocatorPlugin-1.0.3/samples/GeolocatorSample/GeolocatorSample/GeolocatorSample.Droid/Resources/drawable-xxhdpi/icon.png differ
diff --git a/Components/GeolocatorPlugin-1.0.3/samples/GeolocatorSample/GeolocatorSample/GeolocatorSample.Droid/Resources/drawable/icon.png b/Components/GeolocatorPlugin-1.0.3/samples/GeolocatorSample/GeolocatorSample/GeolocatorSample.Droid/Resources/drawable/icon.png
new file mode 100644
index 000000000..b0ba7150f
Binary files /dev/null and b/Components/GeolocatorPlugin-1.0.3/samples/GeolocatorSample/GeolocatorSample/GeolocatorSample.Droid/Resources/drawable/icon.png differ
diff --git a/Components/GeolocatorPlugin-1.0.3/samples/GeolocatorSample/GeolocatorSample/GeolocatorSample.Droid/packages.config b/Components/GeolocatorPlugin-1.0.3/samples/GeolocatorSample/GeolocatorSample/GeolocatorSample.Droid/packages.config
new file mode 100644
index 000000000..bc20bfd5a
--- /dev/null
+++ b/Components/GeolocatorPlugin-1.0.3/samples/GeolocatorSample/GeolocatorSample/GeolocatorSample.Droid/packages.config
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Components/GeolocatorPlugin-1.0.3/samples/GeolocatorSample/GeolocatorSample/GeolocatorSample.WinPhone/App.xaml b/Components/GeolocatorPlugin-1.0.3/samples/GeolocatorSample/GeolocatorSample/GeolocatorSample.WinPhone/App.xaml
new file mode 100644
index 000000000..0ed159e9e
--- /dev/null
+++ b/Components/GeolocatorPlugin-1.0.3/samples/GeolocatorSample/GeolocatorSample/GeolocatorSample.WinPhone/App.xaml
@@ -0,0 +1,20 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Components/GeolocatorPlugin-1.0.3/samples/GeolocatorSample/GeolocatorSample/GeolocatorSample.WinPhone/App.xaml.cs b/Components/GeolocatorPlugin-1.0.3/samples/GeolocatorSample/GeolocatorSample/GeolocatorSample.WinPhone/App.xaml.cs
new file mode 100644
index 000000000..8707142a9
--- /dev/null
+++ b/Components/GeolocatorPlugin-1.0.3/samples/GeolocatorSample/GeolocatorSample/GeolocatorSample.WinPhone/App.xaml.cs
@@ -0,0 +1,223 @@
+using System;
+using System.Diagnostics;
+using System.Resources;
+using System.Windows;
+using System.Windows.Markup;
+using System.Windows.Navigation;
+using Microsoft.Phone.Controls;
+using Microsoft.Phone.Shell;
+using GeolocatorSample.WinPhone.Resources;
+
+namespace GeolocatorSample.WinPhone
+{
+ public partial class App : Application
+ {
+ ///
+ /// Provides easy access to the root frame of the Phone Application.
+ ///
+ /// The root frame of the Phone Application.
+ public static PhoneApplicationFrame RootFrame { get; private set; }
+
+ ///
+ /// Constructor for the Application object.
+ ///
+ public App()
+ {
+ // Global handler for uncaught exceptions.
+ UnhandledException += Application_UnhandledException;
+
+ // Standard XAML initialization
+ InitializeComponent();
+
+ // Phone-specific initialization
+ InitializePhoneApplication();
+
+ // Language display initialization
+ InitializeLanguage();
+
+ // Show graphics profiling information while debugging.
+ if (Debugger.IsAttached)
+ {
+ // Display the current frame rate counters.
+ Application.Current.Host.Settings.EnableFrameRateCounter = true;
+
+ // Show the areas of the app that are being redrawn in each frame.
+ //Application.Current.Host.Settings.EnableRedrawRegions = true;
+
+ // Enable non-production analysis visualization mode,
+ // which shows areas of a page that are handed off to GPU with a colored overlay.
+ //Application.Current.Host.Settings.EnableCacheVisualization = true;
+
+ // Prevent the screen from turning off while under the debugger by disabling
+ // the application's idle detection.
+ // Caution:- Use this under debug mode only. Application that disables user idle detection will continue to run
+ // and consume battery power when the user is not using the phone.
+ PhoneApplicationService.Current.UserIdleDetectionMode = IdleDetectionMode.Disabled;
+ }
+
+ }
+
+ // Code to execute when the application is launching (eg, from Start)
+ // This code will not execute when the application is reactivated
+ private void Application_Launching(object sender, LaunchingEventArgs e)
+ {
+ }
+
+ // Code to execute when the application is activated (brought to foreground)
+ // This code will not execute when the application is first launched
+ private void Application_Activated(object sender, ActivatedEventArgs e)
+ {
+ }
+
+ // Code to execute when the application is deactivated (sent to background)
+ // This code will not execute when the application is closing
+ private void Application_Deactivated(object sender, DeactivatedEventArgs e)
+ {
+ }
+
+ // Code to execute when the application is closing (eg, user hit Back)
+ // This code will not execute when the application is deactivated
+ private void Application_Closing(object sender, ClosingEventArgs e)
+ {
+ }
+
+ // Code to execute if a navigation fails
+ private void RootFrame_NavigationFailed(object sender, NavigationFailedEventArgs e)
+ {
+ if (Debugger.IsAttached)
+ {
+ // A navigation has failed; break into the debugger
+ Debugger.Break();
+ }
+ }
+
+ // Code to execute on Unhandled Exceptions
+ private void Application_UnhandledException(object sender, ApplicationUnhandledExceptionEventArgs e)
+ {
+ if (Debugger.IsAttached)
+ {
+ // An unhandled exception has occurred; break into the debugger
+ Debugger.Break();
+ }
+ }
+
+ #region Phone application initialization
+
+ // Avoid double-initialization
+ private bool phoneApplicationInitialized = false;
+
+ // Do not add any additional code to this method
+ private void InitializePhoneApplication()
+ {
+ if (phoneApplicationInitialized)
+ return;
+
+ // Create the frame but don't set it as RootVisual yet; this allows the splash
+ // screen to remain active until the application is ready to render.
+ RootFrame = new PhoneApplicationFrame();
+ RootFrame.Navigated += CompleteInitializePhoneApplication;
+
+ // Handle navigation failures
+ RootFrame.NavigationFailed += RootFrame_NavigationFailed;
+
+ // Handle reset requests for clearing the backstack
+ RootFrame.Navigated += CheckForResetNavigation;
+
+ // Ensure we don't initialize again
+ phoneApplicationInitialized = true;
+ }
+
+ // Do not add any additional code to this method
+ private void CompleteInitializePhoneApplication(object sender, NavigationEventArgs e)
+ {
+ // Set the root visual to allow the application to render
+ if (RootVisual != RootFrame)
+ RootVisual = RootFrame;
+
+ // Remove this handler since it is no longer needed
+ RootFrame.Navigated -= CompleteInitializePhoneApplication;
+ }
+
+ private void CheckForResetNavigation(object sender, NavigationEventArgs e)
+ {
+ // If the app has received a 'reset' navigation, then we need to check
+ // on the next navigation to see if the page stack should be reset
+ if (e.NavigationMode == NavigationMode.Reset)
+ RootFrame.Navigated += ClearBackStackAfterReset;
+ }
+
+ private void ClearBackStackAfterReset(object sender, NavigationEventArgs e)
+ {
+ // Unregister the event so it doesn't get called again
+ RootFrame.Navigated -= ClearBackStackAfterReset;
+
+ // Only clear the stack for 'new' (forward) and 'refresh' navigations
+ if (e.NavigationMode != NavigationMode.New && e.NavigationMode != NavigationMode.Refresh)
+ return;
+
+ // For UI consistency, clear the entire page stack
+ while (RootFrame.RemoveBackEntry() != null)
+ {
+ ; // do nothing
+ }
+ }
+
+ #endregion
+
+ // Initialize the app's font and flow direction as defined in its localized resource strings.
+ //
+ // To ensure that the font of your application is aligned with its supported languages and that the
+ // FlowDirection for each of those languages follows its traditional direction, ResourceLanguage
+ // and ResourceFlowDirection should be initialized in each resx file to match these values with that
+ // file's culture. For example:
+ //
+ // AppResources.es-ES.resx
+ // ResourceLanguage's value should be "es-ES"
+ // ResourceFlowDirection's value should be "LeftToRight"
+ //
+ // AppResources.ar-SA.resx
+ // ResourceLanguage's value should be "ar-SA"
+ // ResourceFlowDirection's value should be "RightToLeft"
+ //
+ // For more info on localizing Windows Phone apps see http://go.microsoft.com/fwlink/?LinkId=262072.
+ //
+ private void InitializeLanguage()
+ {
+ try
+ {
+ // Set the font to match the display language defined by the
+ // ResourceLanguage resource string for each supported language.
+ //
+ // Fall back to the font of the neutral language if the Display
+ // language of the phone is not supported.
+ //
+ // If a compiler error is hit then ResourceLanguage is missing from
+ // the resource file.
+ RootFrame.Language = XmlLanguage.GetLanguage(AppResources.ResourceLanguage);
+
+ // Set the FlowDirection of all elements under the root frame based
+ // on the ResourceFlowDirection resource string for each
+ // supported language.
+ //
+ // If a compiler error is hit then ResourceFlowDirection is missing from
+ // the resource file.
+ FlowDirection flow = (FlowDirection)Enum.Parse(typeof(FlowDirection), AppResources.ResourceFlowDirection);
+ RootFrame.FlowDirection = flow;
+ }
+ catch
+ {
+ // If an exception is caught here it is most likely due to either
+ // ResourceLangauge not being correctly set to a supported language
+ // code or ResourceFlowDirection is set to a value other than LeftToRight
+ // or RightToLeft.
+
+ if (Debugger.IsAttached)
+ {
+ Debugger.Break();
+ }
+
+ throw;
+ }
+ }
+ }
+}
diff --git a/Components/GeolocatorPlugin-1.0.3/samples/GeolocatorSample/GeolocatorSample/GeolocatorSample.WinPhone/Assets/AlignmentGrid.png b/Components/GeolocatorPlugin-1.0.3/samples/GeolocatorSample/GeolocatorSample/GeolocatorSample.WinPhone/Assets/AlignmentGrid.png
new file mode 100644
index 000000000..f7d2e9780
Binary files /dev/null and b/Components/GeolocatorPlugin-1.0.3/samples/GeolocatorSample/GeolocatorSample/GeolocatorSample.WinPhone/Assets/AlignmentGrid.png differ
diff --git a/Components/GeolocatorPlugin-1.0.3/samples/GeolocatorSample/GeolocatorSample/GeolocatorSample.WinPhone/Assets/ApplicationIcon.png b/Components/GeolocatorPlugin-1.0.3/samples/GeolocatorSample/GeolocatorSample/GeolocatorSample.WinPhone/Assets/ApplicationIcon.png
new file mode 100644
index 000000000..d2b5c9524
Binary files /dev/null and b/Components/GeolocatorPlugin-1.0.3/samples/GeolocatorSample/GeolocatorSample/GeolocatorSample.WinPhone/Assets/ApplicationIcon.png differ
diff --git a/Components/GeolocatorPlugin-1.0.3/samples/GeolocatorSample/GeolocatorSample/GeolocatorSample.WinPhone/Assets/Tiles/FlipCycleTileLarge.png b/Components/GeolocatorPlugin-1.0.3/samples/GeolocatorSample/GeolocatorSample/GeolocatorSample.WinPhone/Assets/Tiles/FlipCycleTileLarge.png
new file mode 100644
index 000000000..8856d9a99
Binary files /dev/null and b/Components/GeolocatorPlugin-1.0.3/samples/GeolocatorSample/GeolocatorSample/GeolocatorSample.WinPhone/Assets/Tiles/FlipCycleTileLarge.png differ
diff --git a/Components/GeolocatorPlugin-1.0.3/samples/GeolocatorSample/GeolocatorSample/GeolocatorSample.WinPhone/Assets/Tiles/FlipCycleTileMedium.png b/Components/GeolocatorPlugin-1.0.3/samples/GeolocatorSample/GeolocatorSample/GeolocatorSample.WinPhone/Assets/Tiles/FlipCycleTileMedium.png
new file mode 100644
index 000000000..baab0030a
Binary files /dev/null and b/Components/GeolocatorPlugin-1.0.3/samples/GeolocatorSample/GeolocatorSample/GeolocatorSample.WinPhone/Assets/Tiles/FlipCycleTileMedium.png differ
diff --git a/Components/GeolocatorPlugin-1.0.3/samples/GeolocatorSample/GeolocatorSample/GeolocatorSample.WinPhone/Assets/Tiles/FlipCycleTileSmall.png b/Components/GeolocatorPlugin-1.0.3/samples/GeolocatorSample/GeolocatorSample/GeolocatorSample.WinPhone/Assets/Tiles/FlipCycleTileSmall.png
new file mode 100644
index 000000000..d44d803a5
Binary files /dev/null and b/Components/GeolocatorPlugin-1.0.3/samples/GeolocatorSample/GeolocatorSample/GeolocatorSample.WinPhone/Assets/Tiles/FlipCycleTileSmall.png differ
diff --git a/Components/GeolocatorPlugin-1.0.3/samples/GeolocatorSample/GeolocatorSample/GeolocatorSample.WinPhone/Assets/Tiles/IconicTileMediumLarge.png b/Components/GeolocatorPlugin-1.0.3/samples/GeolocatorSample/GeolocatorSample/GeolocatorSample.WinPhone/Assets/Tiles/IconicTileMediumLarge.png
new file mode 100644
index 000000000..2c904389a
Binary files /dev/null and b/Components/GeolocatorPlugin-1.0.3/samples/GeolocatorSample/GeolocatorSample/GeolocatorSample.WinPhone/Assets/Tiles/IconicTileMediumLarge.png differ
diff --git a/Components/GeolocatorPlugin-1.0.3/samples/GeolocatorSample/GeolocatorSample/GeolocatorSample.WinPhone/Assets/Tiles/IconicTileSmall.png b/Components/GeolocatorPlugin-1.0.3/samples/GeolocatorSample/GeolocatorSample/GeolocatorSample.WinPhone/Assets/Tiles/IconicTileSmall.png
new file mode 100644
index 000000000..76d82e0f0
Binary files /dev/null and b/Components/GeolocatorPlugin-1.0.3/samples/GeolocatorSample/GeolocatorSample/GeolocatorSample.WinPhone/Assets/Tiles/IconicTileSmall.png differ
diff --git a/Components/GeolocatorPlugin-1.0.3/samples/GeolocatorSample/GeolocatorSample/GeolocatorSample.WinPhone/GeolocatorSample.WinPhone.csproj b/Components/GeolocatorPlugin-1.0.3/samples/GeolocatorSample/GeolocatorSample/GeolocatorSample.WinPhone/GeolocatorSample.WinPhone.csproj
new file mode 100644
index 000000000..a0fdac0d9
--- /dev/null
+++ b/Components/GeolocatorPlugin-1.0.3/samples/GeolocatorSample/GeolocatorSample/GeolocatorSample.WinPhone/GeolocatorSample.WinPhone.csproj
@@ -0,0 +1,208 @@
+
+
+
+ Debug
+ AnyCPU
+ 10.0.20506
+ 2.0
+ {82A2958E-AB5B-40B8-A556-DA41952F870F}
+ {C089C8C0-30E0-4E22-80C0-CE093F111A43};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}
+ Library
+ Properties
+ GeolocatorSample.WinPhone
+ GeolocatorSample.WinPhone
+ WindowsPhone
+ v8.0
+ $(TargetFrameworkVersion)
+ true
+
+ true
+ true
+ PhoneApp1_$(Configuration)_$(Platform).xap
+ Properties\AppManifest.xml
+ GeolocatorSample.WinPhone.App
+ true
+ 11.0
+ true
+ dd928278
+
+
+ true
+ full
+ false
+ Bin\Debug
+ DEBUG;TRACE;SILVERLIGHT;WINDOWS_PHONE
+ true
+ true
+ prompt
+ 4
+
+
+ pdbonly
+ true
+ Bin\Release
+ TRACE;SILVERLIGHT;WINDOWS_PHONE
+ true
+ true
+ prompt
+ 4
+
+
+ true
+ full
+ false
+ Bin\x86\Debug
+ DEBUG;TRACE;SILVERLIGHT;WINDOWS_PHONE
+ true
+ true
+ prompt
+ 4
+
+
+ pdbonly
+ true
+ Bin\x86\Release
+ TRACE;SILVERLIGHT;WINDOWS_PHONE
+ true
+ true
+ prompt
+ 4
+
+
+ true
+ full
+ false
+ Bin\ARM\Debug
+ DEBUG;TRACE;SILVERLIGHT;WINDOWS_PHONE
+ true
+ true
+ prompt
+ 4
+
+
+ pdbonly
+ true
+ Bin\ARM\Release
+ TRACE;SILVERLIGHT;WINDOWS_PHONE
+ true
+ true
+ prompt
+ 4
+
+
+
+ App.xaml
+
+
+
+ MainPage.xaml
+
+
+
+ True
+ True
+ AppResources.resx
+
+
+
+
+ Designer
+ MSBuild:Compile
+
+
+ Designer
+ MSBuild:Compile
+
+
+
+
+
+
+ Designer
+
+
+
+
+
+
+ PreserveNewest
+
+
+
+ PreserveNewest
+
+
+ PreserveNewest
+
+
+ PreserveNewest
+
+
+ PreserveNewest
+
+
+ PreserveNewest
+
+
+ PreserveNewest
+
+
+
+
+
+
+
+
+
+ PublicResXFileCodeGenerator
+ AppResources.Designer.cs
+
+
+
+
+ GeolocatorSample
+
+
+
+
+ ..\..\packages\Xam.Plugin.Geolocator.1.0.3\lib\wp8\Geolocator.Plugin.dll
+ True
+
+
+ ..\..\packages\Xam.Plugin.Geolocator.1.0.3\lib\wp8\Geolocator.Plugin.Abstractions.dll
+ True
+
+
+ ..\..\packages\WPtoolkit.4.2013.08.16\lib\wp8\Microsoft.Phone.Controls.Toolkit.dll
+
+
+ False
+ ..\..\packages\Xamarin.Forms.1.3.4.6332\lib\WP80\Xamarin.Forms.Core.dll
+
+
+ False
+ ..\..\packages\Xamarin.Forms.1.3.4.6332\lib\WP80\Xamarin.Forms.Platform.WP8.dll
+
+
+ False
+ ..\..\packages\Xamarin.Forms.1.3.4.6332\lib\WP80\Xamarin.Forms.Xaml.dll
+
+
+
+
+
+
+
+
+
+ This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.
+
+
+
+
\ No newline at end of file
diff --git a/Components/GeolocatorPlugin-1.0.3/samples/GeolocatorSample/GeolocatorSample/GeolocatorSample.WinPhone/LocalizedStrings.cs b/Components/GeolocatorPlugin-1.0.3/samples/GeolocatorSample/GeolocatorSample/GeolocatorSample.WinPhone/LocalizedStrings.cs
new file mode 100644
index 000000000..009f4d496
--- /dev/null
+++ b/Components/GeolocatorPlugin-1.0.3/samples/GeolocatorSample/GeolocatorSample/GeolocatorSample.WinPhone/LocalizedStrings.cs
@@ -0,0 +1,14 @@
+using GeolocatorSample.WinPhone.Resources;
+
+namespace GeolocatorSample.WinPhone
+{
+ ///
+ /// Provides access to string resources.
+ ///
+ public class LocalizedStrings
+ {
+ private static AppResources _localizedResources = new AppResources();
+
+ public AppResources LocalizedResources { get { return _localizedResources; } }
+ }
+}
diff --git a/Components/GeolocatorPlugin-1.0.3/samples/GeolocatorSample/GeolocatorSample/GeolocatorSample.WinPhone/MainPage.xaml b/Components/GeolocatorPlugin-1.0.3/samples/GeolocatorSample/GeolocatorSample/GeolocatorSample.WinPhone/MainPage.xaml
new file mode 100644
index 000000000..9d80f4be8
--- /dev/null
+++ b/Components/GeolocatorPlugin-1.0.3/samples/GeolocatorSample/GeolocatorSample/GeolocatorSample.WinPhone/MainPage.xaml
@@ -0,0 +1,16 @@
+
+
diff --git a/Components/GeolocatorPlugin-1.0.3/samples/GeolocatorSample/GeolocatorSample/GeolocatorSample.WinPhone/MainPage.xaml.cs b/Components/GeolocatorPlugin-1.0.3/samples/GeolocatorSample/GeolocatorSample/GeolocatorSample.WinPhone/MainPage.xaml.cs
new file mode 100644
index 000000000..0c139dfad
--- /dev/null
+++ b/Components/GeolocatorPlugin-1.0.3/samples/GeolocatorSample/GeolocatorSample/GeolocatorSample.WinPhone/MainPage.xaml.cs
@@ -0,0 +1,24 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Net;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Navigation;
+using Microsoft.Phone.Controls;
+using Microsoft.Phone.Shell;
+
+namespace GeolocatorSample.WinPhone
+{
+ public partial class MainPage : global::Xamarin.Forms.Platform.WinPhone.FormsApplicationPage
+ {
+ public MainPage()
+ {
+ InitializeComponent();
+ SupportedOrientations = SupportedPageOrientation.PortraitOrLandscape;
+
+ global::Xamarin.Forms.Forms.Init();
+ LoadApplication(new GeolocatorSample.App());
+ }
+ }
+}
diff --git a/Components/GeolocatorPlugin-1.0.3/samples/GeolocatorSample/GeolocatorSample/GeolocatorSample.WinPhone/PluginsHelp/GeolocatorReadme.txt b/Components/GeolocatorPlugin-1.0.3/samples/GeolocatorSample/GeolocatorSample/GeolocatorSample.WinPhone/PluginsHelp/GeolocatorReadme.txt
new file mode 100644
index 000000000..8a88b0862
--- /dev/null
+++ b/Components/GeolocatorPlugin-1.0.3/samples/GeolocatorSample/GeolocatorSample/GeolocatorSample.WinPhone/PluginsHelp/GeolocatorReadme.txt
@@ -0,0 +1,24 @@
+Connectivity Readme
+Find the most up to date information at: https://github.com/jamesmontemagno/Xamarin.Plugins
+
+**IMPORTANT**
+Android:
+You must request ACCESS_COARSE_LOCATION & ACCESS_FINE_LOCATION permission
+
+iOS:
+In iOS 8 you now have to call either RequestWhenInUseAuthorization or RequestAlwaysAuthorization on the location manager. Additionally you need to add either the concisely named NSLocationWhenInUseUsageDescription or NSLocationAlwaysUsageDescription to your Info.plist.
+See: http://motzcod.es/post/97662738237/scanning-for-ibeacons-in-ios-8
+
+Windows Phone:
+You must set the ID_CAP_LOCATION permission.
+
+Getting Started:
+
+var locator = CrossGeolocator.Current;
+locator.DesiredAccuracy = 50;
+
+var position = await locator.GetPositionAsync (timeoutMilliseconds: 10000);
+
+Console.WriteLine ("Position Status: {0}", position.Timestamp);
+Console.WriteLine ("Position Latitude: {0}", position.Latitude);
+Console.WriteLine ("Position Longitude: {0}", position.Longitude);
\ No newline at end of file
diff --git a/Components/GeolocatorPlugin-1.0.3/samples/GeolocatorSample/GeolocatorSample/GeolocatorSample.WinPhone/Properties/AppManifest.xml b/Components/GeolocatorPlugin-1.0.3/samples/GeolocatorSample/GeolocatorSample/GeolocatorSample.WinPhone/Properties/AppManifest.xml
new file mode 100644
index 000000000..6712a1178
--- /dev/null
+++ b/Components/GeolocatorPlugin-1.0.3/samples/GeolocatorSample/GeolocatorSample/GeolocatorSample.WinPhone/Properties/AppManifest.xml
@@ -0,0 +1,6 @@
+
+
+
+
diff --git a/Components/GeolocatorPlugin-1.0.3/samples/GeolocatorSample/GeolocatorSample/GeolocatorSample.WinPhone/Properties/AssemblyInfo.cs b/Components/GeolocatorPlugin-1.0.3/samples/GeolocatorSample/GeolocatorSample/GeolocatorSample.WinPhone/Properties/AssemblyInfo.cs
new file mode 100644
index 000000000..a8c737b7e
--- /dev/null
+++ b/Components/GeolocatorPlugin-1.0.3/samples/GeolocatorSample/GeolocatorSample/GeolocatorSample.WinPhone/Properties/AssemblyInfo.cs
@@ -0,0 +1,37 @@
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+using System.Resources;
+
+// General Information about an assembly is controlled through the following
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyTitle("GeolocatorSample.WinPhone")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("GeolocatorSample.WinPhone")]
+[assembly: AssemblyCopyright("Copyright © 2014")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// Setting ComVisible to false makes the types in this assembly not visible
+// to COM components. If you need to access a type in this assembly from
+// COM, set the ComVisible attribute to true on that type.
+[assembly: ComVisible(false)]
+
+// The following GUID is for the ID of the typelib if this project is exposed to COM
+[assembly: Guid("65077432-0c92-466b-b68d-911a8ec84f1d")]
+
+// Version information for an assembly consists of the following four values:
+//
+// Major Version
+// Minor Version
+// Build Number
+// Revision
+//
+// You can specify all the values or you can default the Revision and Build Numbers
+// by using the '*' as shown below:
+[assembly: AssemblyVersion("1.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]
+[assembly: NeutralResourcesLanguageAttribute("en-US")]
diff --git a/Components/GeolocatorPlugin-1.0.3/samples/GeolocatorSample/GeolocatorSample/GeolocatorSample.WinPhone/Properties/WMAppManifest.xml b/Components/GeolocatorPlugin-1.0.3/samples/GeolocatorSample/GeolocatorSample/GeolocatorSample.WinPhone/Properties/WMAppManifest.xml
new file mode 100644
index 000000000..8a595ebb6
--- /dev/null
+++ b/Components/GeolocatorPlugin-1.0.3/samples/GeolocatorSample/GeolocatorSample/GeolocatorSample.WinPhone/Properties/WMAppManifest.xml
@@ -0,0 +1,43 @@
+
+
+
+
+ Assets\ApplicationIcon.png
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Assets\Tiles\FlipCycleTileSmall.png
+ 0
+ Assets\Tiles\FlipCycleTileMedium.png
+ GeolocatorSample.WinPhone
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Components/GeolocatorPlugin-1.0.3/samples/GeolocatorSample/GeolocatorSample/GeolocatorSample.WinPhone/README_FIRST.txt b/Components/GeolocatorPlugin-1.0.3/samples/GeolocatorSample/GeolocatorSample/GeolocatorSample.WinPhone/README_FIRST.txt
new file mode 100644
index 000000000..ce40c013b
--- /dev/null
+++ b/Components/GeolocatorPlugin-1.0.3/samples/GeolocatorSample/GeolocatorSample/GeolocatorSample.WinPhone/README_FIRST.txt
@@ -0,0 +1,3 @@
+For the Windows Phone toolkit make sure that you have
+marked the icons in the "Toolkit.Content" folder as content. That way they
+can be used as the icons for the ApplicationBar control.
\ No newline at end of file
diff --git a/Components/GeolocatorPlugin-1.0.3/samples/GeolocatorSample/GeolocatorSample/GeolocatorSample.WinPhone/Resources/AppResources.Designer.cs b/Components/GeolocatorPlugin-1.0.3/samples/GeolocatorSample/GeolocatorSample/GeolocatorSample.WinPhone/Resources/AppResources.Designer.cs
new file mode 100644
index 000000000..dc920da46
--- /dev/null
+++ b/Components/GeolocatorPlugin-1.0.3/samples/GeolocatorSample/GeolocatorSample/GeolocatorSample.WinPhone/Resources/AppResources.Designer.cs
@@ -0,0 +1,127 @@
+//------------------------------------------------------------------------------
+//
+// This code was generated by a tool.
+// Runtime Version:4.0.30319.17626
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+//
+//------------------------------------------------------------------------------
+
+namespace GeolocatorSample.WinPhone.Resources
+{
+ using System;
+
+
+ ///
+ /// A strongly-typed resource class, for looking up localized strings, etc.
+ ///
+ // This class was auto-generated by the StronglyTypedResourceBuilder
+ // class via a tool like ResGen or Visual Studio.
+ // To add or remove a member, edit your .ResX file then rerun ResGen
+ // with the /str option, or rebuild your VS project.
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
+ public class AppResources
+ {
+
+ private static global::System.Resources.ResourceManager resourceMan;
+
+ private static global::System.Globalization.CultureInfo resourceCulture;
+
+ [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
+ internal AppResources()
+ {
+ }
+
+ ///
+ /// Returns the cached ResourceManager instance used by this class.
+ ///
+ [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+ public static global::System.Resources.ResourceManager ResourceManager
+ {
+ get
+ {
+ if (object.ReferenceEquals(resourceMan, null))
+ {
+ global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("GeolocatorSample.WinPhone.Resources.AppResources", typeof(AppResources).Assembly);
+ resourceMan = temp;
+ }
+ return resourceMan;
+ }
+ }
+
+ ///
+ /// Overrides the current thread's CurrentUICulture property for all
+ /// resource lookups using this strongly typed resource class.
+ ///
+ [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+ public static global::System.Globalization.CultureInfo Culture
+ {
+ get
+ {
+ return resourceCulture;
+ }
+ set
+ {
+ resourceCulture = value;
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to LeftToRight.
+ ///
+ public static string ResourceFlowDirection
+ {
+ get
+ {
+ return ResourceManager.GetString("ResourceFlowDirection", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to us-EN.
+ ///
+ public static string ResourceLanguage
+ {
+ get
+ {
+ return ResourceManager.GetString("ResourceLanguage", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to MY APPLICATION.
+ ///
+ public static string ApplicationTitle
+ {
+ get
+ {
+ return ResourceManager.GetString("ApplicationTitle", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to button.
+ ///
+ public static string AppBarButtonText
+ {
+ get
+ {
+ return ResourceManager.GetString("AppBarButtonText", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to menu item.
+ ///
+ public static string AppBarMenuItemText
+ {
+ get
+ {
+ return ResourceManager.GetString("AppBarMenuItemText", resourceCulture);
+ }
+ }
+ }
+}
diff --git a/Components/GeolocatorPlugin-1.0.3/samples/GeolocatorSample/GeolocatorSample/GeolocatorSample.WinPhone/Resources/AppResources.resx b/Components/GeolocatorPlugin-1.0.3/samples/GeolocatorSample/GeolocatorSample/GeolocatorSample.WinPhone/Resources/AppResources.resx
new file mode 100644
index 000000000..569bf520d
--- /dev/null
+++ b/Components/GeolocatorPlugin-1.0.3/samples/GeolocatorSample/GeolocatorSample/GeolocatorSample.WinPhone/Resources/AppResources.resx
@@ -0,0 +1,137 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ LeftToRight
+ Controls the FlowDirection for all elements in the RootFrame. Set to the traditional direction of this resource file's language
+
+
+ en-US
+ Controls the Language and ensures that the font for all elements in the RootFrame aligns with the app's language. Set to the language code of this resource file's language.
+
+
+ MY APPLICATION
+
+
+ add
+
+
+ Menu Item
+
+
diff --git a/Components/GeolocatorPlugin-1.0.3/samples/GeolocatorSample/GeolocatorSample/GeolocatorSample.WinPhone/SplashScreenImage.jpg b/Components/GeolocatorPlugin-1.0.3/samples/GeolocatorSample/GeolocatorSample/GeolocatorSample.WinPhone/SplashScreenImage.jpg
new file mode 100644
index 000000000..666f7c537
Binary files /dev/null and b/Components/GeolocatorPlugin-1.0.3/samples/GeolocatorSample/GeolocatorSample/GeolocatorSample.WinPhone/SplashScreenImage.jpg differ
diff --git a/Components/GeolocatorPlugin-1.0.3/samples/GeolocatorSample/GeolocatorSample/GeolocatorSample.WinPhone/Toolkit.Content/ApplicationBar.Add.png b/Components/GeolocatorPlugin-1.0.3/samples/GeolocatorSample/GeolocatorSample/GeolocatorSample.WinPhone/Toolkit.Content/ApplicationBar.Add.png
new file mode 100644
index 000000000..4b524d6f1
Binary files /dev/null and b/Components/GeolocatorPlugin-1.0.3/samples/GeolocatorSample/GeolocatorSample/GeolocatorSample.WinPhone/Toolkit.Content/ApplicationBar.Add.png differ
diff --git a/Components/GeolocatorPlugin-1.0.3/samples/GeolocatorSample/GeolocatorSample/GeolocatorSample.WinPhone/Toolkit.Content/ApplicationBar.Cancel.png b/Components/GeolocatorPlugin-1.0.3/samples/GeolocatorSample/GeolocatorSample/GeolocatorSample.WinPhone/Toolkit.Content/ApplicationBar.Cancel.png
new file mode 100644
index 000000000..4dd724f08
Binary files /dev/null and b/Components/GeolocatorPlugin-1.0.3/samples/GeolocatorSample/GeolocatorSample/GeolocatorSample.WinPhone/Toolkit.Content/ApplicationBar.Cancel.png differ
diff --git a/Components/GeolocatorPlugin-1.0.3/samples/GeolocatorSample/GeolocatorSample/GeolocatorSample.WinPhone/Toolkit.Content/ApplicationBar.Check.png b/Components/GeolocatorPlugin-1.0.3/samples/GeolocatorSample/GeolocatorSample/GeolocatorSample.WinPhone/Toolkit.Content/ApplicationBar.Check.png
new file mode 100644
index 000000000..7a0746668
Binary files /dev/null and b/Components/GeolocatorPlugin-1.0.3/samples/GeolocatorSample/GeolocatorSample/GeolocatorSample.WinPhone/Toolkit.Content/ApplicationBar.Check.png differ
diff --git a/Components/GeolocatorPlugin-1.0.3/samples/GeolocatorSample/GeolocatorSample/GeolocatorSample.WinPhone/Toolkit.Content/ApplicationBar.Delete.png b/Components/GeolocatorPlugin-1.0.3/samples/GeolocatorSample/GeolocatorSample/GeolocatorSample.WinPhone/Toolkit.Content/ApplicationBar.Delete.png
new file mode 100644
index 000000000..95bb16dab
Binary files /dev/null and b/Components/GeolocatorPlugin-1.0.3/samples/GeolocatorSample/GeolocatorSample/GeolocatorSample.WinPhone/Toolkit.Content/ApplicationBar.Delete.png differ
diff --git a/Components/GeolocatorPlugin-1.0.3/samples/GeolocatorSample/GeolocatorSample/GeolocatorSample.WinPhone/Toolkit.Content/ApplicationBar.Select.png b/Components/GeolocatorPlugin-1.0.3/samples/GeolocatorSample/GeolocatorSample/GeolocatorSample.WinPhone/Toolkit.Content/ApplicationBar.Select.png
new file mode 100644
index 000000000..995deaaaf
Binary files /dev/null and b/Components/GeolocatorPlugin-1.0.3/samples/GeolocatorSample/GeolocatorSample/GeolocatorSample.WinPhone/Toolkit.Content/ApplicationBar.Select.png differ
diff --git a/Components/GeolocatorPlugin-1.0.3/samples/GeolocatorSample/GeolocatorSample/GeolocatorSample.WinPhone/packages.config b/Components/GeolocatorPlugin-1.0.3/samples/GeolocatorSample/GeolocatorSample/GeolocatorSample.WinPhone/packages.config
new file mode 100644
index 000000000..f6db49c97
--- /dev/null
+++ b/Components/GeolocatorPlugin-1.0.3/samples/GeolocatorSample/GeolocatorSample/GeolocatorSample.WinPhone/packages.config
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Components/GeolocatorPlugin-1.0.3/samples/GeolocatorSample/GeolocatorSample/GeolocatorSample.iOS/AppDelegate.cs b/Components/GeolocatorPlugin-1.0.3/samples/GeolocatorSample/GeolocatorSample/GeolocatorSample.iOS/AppDelegate.cs
new file mode 100644
index 000000000..52ecfd46e
--- /dev/null
+++ b/Components/GeolocatorPlugin-1.0.3/samples/GeolocatorSample/GeolocatorSample/GeolocatorSample.iOS/AppDelegate.cs
@@ -0,0 +1,31 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+
+using Foundation;
+using UIKit;
+
+namespace GeolocatorSample.iOS
+{
+ // The UIApplicationDelegate for the application. This class is responsible for launching the
+ // User Interface of the application, as well as listening (and optionally responding) to
+ // application events from iOS.
+ [Register("AppDelegate")]
+ public partial class AppDelegate : global::Xamarin.Forms.Platform.iOS.FormsApplicationDelegate
+ {
+ //
+ // This method is invoked when the application has loaded and is ready to run. In this
+ // method you should instantiate the window, load the UI into it and then make the window
+ // visible.
+ //
+ // You have 17 seconds to return from this method, or iOS will terminate your application.
+ //
+ public override bool FinishedLaunching(UIApplication app, NSDictionary options)
+ {
+ global::Xamarin.Forms.Forms.Init();
+ LoadApplication(new App());
+
+ return base.FinishedLaunching(app, options);
+ }
+ }
+}
diff --git a/Components/GeolocatorPlugin-1.0.3/samples/GeolocatorSample/GeolocatorSample/GeolocatorSample.iOS/Entitlements.plist b/Components/GeolocatorPlugin-1.0.3/samples/GeolocatorSample/GeolocatorSample/GeolocatorSample.iOS/Entitlements.plist
new file mode 100644
index 000000000..e9a3005f7
--- /dev/null
+++ b/Components/GeolocatorPlugin-1.0.3/samples/GeolocatorSample/GeolocatorSample/GeolocatorSample.iOS/Entitlements.plist
@@ -0,0 +1,7 @@
+
+
+
+
+
+
+
diff --git a/Components/GeolocatorPlugin-1.0.3/samples/GeolocatorSample/GeolocatorSample/GeolocatorSample.iOS/GeolocatorSample.iOS.csproj b/Components/GeolocatorPlugin-1.0.3/samples/GeolocatorSample/GeolocatorSample/GeolocatorSample.iOS/GeolocatorSample.iOS.csproj
new file mode 100644
index 000000000..7768846b0
--- /dev/null
+++ b/Components/GeolocatorPlugin-1.0.3/samples/GeolocatorSample/GeolocatorSample/GeolocatorSample.iOS/GeolocatorSample.iOS.csproj
@@ -0,0 +1,160 @@
+
+
+
+ Debug
+ iPhoneSimulator
+ 8.0.30703
+ 2.0
+ {CF64F284-8850-4DC0-ADD4-E066A0744AF3}
+ {FEACFBD2-3405-455C-9665-78FE426C6842};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
+ Exe
+ GeolocatorSample.iOS
+ Resources
+ GeolocatorSampleiOS
+ edc5ef5c
+
+
+ true
+ full
+ false
+ bin\iPhoneSimulator\Debug
+ DEBUG
+ prompt
+ 4
+ false
+ i386, x86_64
+ None
+ true
+ Entitlements.plist
+
+
+ none
+ true
+ bin\iPhoneSimulator\Release
+ prompt
+ 4
+ None
+ i386, x86_64
+ false
+ Entitlements.plist
+
+
+ true
+ full
+ false
+ bin\iPhone\Debug
+ DEBUG
+ prompt
+ 4
+ false
+ ARMv7, ARM64
+ iPhone Developer
+ true
+ Entitlements.plist
+
+
+ none
+ true
+ bin\iPhone\Release
+ prompt
+ 4
+ ARMv7, ARM64
+ false
+ iPhone Developer
+ Entitlements.plist
+
+
+ none
+ True
+ bin\iPhone\Ad-Hoc
+ prompt
+ 4
+ False
+ ARMv7, ARM64
+ True
+ Automatic:AdHoc
+ iPhone Distribution
+ Entitlements.plist
+
+
+ none
+ True
+ bin\iPhone\AppStore
+ prompt
+ 4
+ False
+ ARMv7, ARM64
+ Automatic:AppStore
+ iPhone Distribution
+ Entitlements.plist
+
+
+
+
+
+
+ Designer
+
+
+
+
+
+
+
+
+ GeolocatorSample
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ..\..\packages\Xam.Plugin.Geolocator.1.0.3\lib\Xamarin.iOS10\Geolocator.Plugin.dll
+ True
+
+
+ ..\..\packages\Xam.Plugin.Geolocator.1.0.3\lib\Xamarin.iOS10\Geolocator.Plugin.Abstractions.dll
+ True
+
+
+
+
+
+ ..\..\packages\Xamarin.Forms.1.3.4.6332\lib\Xamarin.iOS10\Xamarin.Forms.Core.dll
+
+
+ ..\..\packages\Xamarin.Forms.1.3.4.6332\lib\Xamarin.iOS10\Xamarin.Forms.Platform.iOS.dll
+
+
+ ..\..\packages\Xamarin.Forms.1.3.4.6332\lib\Xamarin.iOS10\Xamarin.Forms.Xaml.dll
+
+
+
+
+
+
+
+
+
+
+ This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.
+
+
+
+
\ No newline at end of file
diff --git a/Components/GeolocatorPlugin-1.0.3/samples/GeolocatorSample/GeolocatorSample/GeolocatorSample.iOS/Info.plist b/Components/GeolocatorPlugin-1.0.3/samples/GeolocatorSample/GeolocatorSample/GeolocatorSample.iOS/Info.plist
new file mode 100644
index 000000000..974c36b26
--- /dev/null
+++ b/Components/GeolocatorPlugin-1.0.3/samples/GeolocatorSample/GeolocatorSample/GeolocatorSample.iOS/Info.plist
@@ -0,0 +1,54 @@
+
+
+
+
+ UIDeviceFamily
+
+ 1
+ 2
+
+ UISupportedInterfaceOrientations
+
+ UIInterfaceOrientationPortrait
+ UIInterfaceOrientationLandscapeLeft
+ UIInterfaceOrientationLandscapeRight
+
+ UISupportedInterfaceOrientations~ipad
+
+ UIInterfaceOrientationPortrait
+ UIInterfaceOrientationPortraitUpsideDown
+ UIInterfaceOrientationLandscapeLeft
+ UIInterfaceOrientationLandscapeRight
+
+ MinimumOSVersion
+ 6.0
+ CFBundleDisplayName
+ GeolocatorSample
+ CFBundleIdentifier
+ com.yourcompany.GeolocatorSample
+ CFBundleVersion
+ 1.0
+ CFBundleIconFiles
+
+ Icon-60@2x
+ Icon-60@3x
+ Icon-76
+ Icon-76@2x
+ Default
+ Default@2x
+ Default-568h@2x
+ Default-Portrait
+ Default-Portrait@2x
+ Icon-Small-40
+ Icon-Small-40@2x
+ Icon-Small-40@3x
+ Icon-Small
+ Icon-Small@2x
+ Icon-Small@3x
+
+ UILaunchStoryboardName
+ LaunchScreen
+ RequestWhenInUseAuthorization
+ Need location for geolocator plugin.
+
+
diff --git a/Components/GeolocatorPlugin-1.0.3/samples/GeolocatorSample/GeolocatorSample/GeolocatorSample.iOS/Main.cs b/Components/GeolocatorPlugin-1.0.3/samples/GeolocatorSample/GeolocatorSample/GeolocatorSample.iOS/Main.cs
new file mode 100644
index 000000000..2c2ba1a33
--- /dev/null
+++ b/Components/GeolocatorPlugin-1.0.3/samples/GeolocatorSample/GeolocatorSample/GeolocatorSample.iOS/Main.cs
@@ -0,0 +1,20 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+
+using Foundation;
+using UIKit;
+
+namespace GeolocatorSample.iOS
+{
+ public class Application
+ {
+ // This is the main entry point of the application.
+ static void Main(string[] args)
+ {
+ // if you want to use a different Application Delegate class from "AppDelegate"
+ // you can specify it here.
+ UIApplication.Main(args, null, "AppDelegate");
+ }
+ }
+}
diff --git a/Components/GeolocatorPlugin-1.0.3/samples/GeolocatorSample/GeolocatorSample/GeolocatorSample.iOS/PluginsHelp/GeolocatorReadme.txt b/Components/GeolocatorPlugin-1.0.3/samples/GeolocatorSample/GeolocatorSample/GeolocatorSample.iOS/PluginsHelp/GeolocatorReadme.txt
new file mode 100644
index 000000000..8a88b0862
--- /dev/null
+++ b/Components/GeolocatorPlugin-1.0.3/samples/GeolocatorSample/GeolocatorSample/GeolocatorSample.iOS/PluginsHelp/GeolocatorReadme.txt
@@ -0,0 +1,24 @@
+Connectivity Readme
+Find the most up to date information at: https://github.com/jamesmontemagno/Xamarin.Plugins
+
+**IMPORTANT**
+Android:
+You must request ACCESS_COARSE_LOCATION & ACCESS_FINE_LOCATION permission
+
+iOS:
+In iOS 8 you now have to call either RequestWhenInUseAuthorization or RequestAlwaysAuthorization on the location manager. Additionally you need to add either the concisely named NSLocationWhenInUseUsageDescription or NSLocationAlwaysUsageDescription to your Info.plist.
+See: http://motzcod.es/post/97662738237/scanning-for-ibeacons-in-ios-8
+
+Windows Phone:
+You must set the ID_CAP_LOCATION permission.
+
+Getting Started:
+
+var locator = CrossGeolocator.Current;
+locator.DesiredAccuracy = 50;
+
+var position = await locator.GetPositionAsync (timeoutMilliseconds: 10000);
+
+Console.WriteLine ("Position Status: {0}", position.Timestamp);
+Console.WriteLine ("Position Latitude: {0}", position.Latitude);
+Console.WriteLine ("Position Longitude: {0}", position.Longitude);
\ No newline at end of file
diff --git a/Components/GeolocatorPlugin-1.0.3/samples/GeolocatorSample/GeolocatorSample/GeolocatorSample.iOS/Properties/AssemblyInfo.cs b/Components/GeolocatorPlugin-1.0.3/samples/GeolocatorSample/GeolocatorSample/GeolocatorSample.iOS/Properties/AssemblyInfo.cs
new file mode 100644
index 000000000..6e8e46574
--- /dev/null
+++ b/Components/GeolocatorPlugin-1.0.3/samples/GeolocatorSample/GeolocatorSample/GeolocatorSample.iOS/Properties/AssemblyInfo.cs
@@ -0,0 +1,36 @@
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// General Information about an assembly is controlled through the following
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyTitle("GeolocatorSample.iOS")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("GeolocatorSample.iOS")]
+[assembly: AssemblyCopyright("Copyright © 2014")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// Setting ComVisible to false makes the types in this assembly not visible
+// to COM components. If you need to access a type in this assembly from
+// COM, set the ComVisible attribute to true on that type.
+[assembly: ComVisible(false)]
+
+// The following GUID is for the ID of the typelib if this project is exposed to COM
+[assembly: Guid("72bdc44f-c588-44f3-b6df-9aace7daafdd")]
+
+// Version information for an assembly consists of the following four values:
+//
+// Major Version
+// Minor Version
+// Build Number
+// Revision
+//
+// You can specify all the values or you can default the Build and Revision Numbers
+// by using the '*' as shown below:
+// [assembly: AssemblyVersion("1.0.*")]
+[assembly: AssemblyVersion("1.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/Components/GeolocatorPlugin-1.0.3/samples/GeolocatorSample/GeolocatorSample/GeolocatorSample.iOS/Resources/Default-568h@2x.png b/Components/GeolocatorPlugin-1.0.3/samples/GeolocatorSample/GeolocatorSample/GeolocatorSample.iOS/Resources/Default-568h@2x.png
new file mode 100644
index 000000000..26c6461e5
Binary files /dev/null and b/Components/GeolocatorPlugin-1.0.3/samples/GeolocatorSample/GeolocatorSample/GeolocatorSample.iOS/Resources/Default-568h@2x.png differ
diff --git a/Components/GeolocatorPlugin-1.0.3/samples/GeolocatorSample/GeolocatorSample/GeolocatorSample.iOS/Resources/Default-Portrait.png b/Components/GeolocatorPlugin-1.0.3/samples/GeolocatorSample/GeolocatorSample/GeolocatorSample.iOS/Resources/Default-Portrait.png
new file mode 100644
index 000000000..5d0d1ab4c
Binary files /dev/null and b/Components/GeolocatorPlugin-1.0.3/samples/GeolocatorSample/GeolocatorSample/GeolocatorSample.iOS/Resources/Default-Portrait.png differ
diff --git a/Components/GeolocatorPlugin-1.0.3/samples/GeolocatorSample/GeolocatorSample/GeolocatorSample.iOS/Resources/Default-Portrait@2x.png b/Components/GeolocatorPlugin-1.0.3/samples/GeolocatorSample/GeolocatorSample/GeolocatorSample.iOS/Resources/Default-Portrait@2x.png
new file mode 100644
index 000000000..0ee2688e8
Binary files /dev/null and b/Components/GeolocatorPlugin-1.0.3/samples/GeolocatorSample/GeolocatorSample/GeolocatorSample.iOS/Resources/Default-Portrait@2x.png differ
diff --git a/Components/GeolocatorPlugin-1.0.3/samples/GeolocatorSample/GeolocatorSample/GeolocatorSample.iOS/Resources/Default.png b/Components/GeolocatorPlugin-1.0.3/samples/GeolocatorSample/GeolocatorSample/GeolocatorSample.iOS/Resources/Default.png
new file mode 100644
index 000000000..b74643c0a
Binary files /dev/null and b/Components/GeolocatorPlugin-1.0.3/samples/GeolocatorSample/GeolocatorSample/GeolocatorSample.iOS/Resources/Default.png differ
diff --git a/Components/GeolocatorPlugin-1.0.3/samples/GeolocatorSample/GeolocatorSample/GeolocatorSample.iOS/Resources/Default@2x.png b/Components/GeolocatorPlugin-1.0.3/samples/GeolocatorSample/GeolocatorSample/GeolocatorSample.iOS/Resources/Default@2x.png
new file mode 100644
index 000000000..dbd6bd3e8
Binary files /dev/null and b/Components/GeolocatorPlugin-1.0.3/samples/GeolocatorSample/GeolocatorSample/GeolocatorSample.iOS/Resources/Default@2x.png differ
diff --git a/Components/GeolocatorPlugin-1.0.3/samples/GeolocatorSample/GeolocatorSample/GeolocatorSample.iOS/Resources/Icon-60@2x.png b/Components/GeolocatorPlugin-1.0.3/samples/GeolocatorSample/GeolocatorSample/GeolocatorSample.iOS/Resources/Icon-60@2x.png
new file mode 100644
index 000000000..4b03c4270
Binary files /dev/null and b/Components/GeolocatorPlugin-1.0.3/samples/GeolocatorSample/GeolocatorSample/GeolocatorSample.iOS/Resources/Icon-60@2x.png differ
diff --git a/Components/GeolocatorPlugin-1.0.3/samples/GeolocatorSample/GeolocatorSample/GeolocatorSample.iOS/Resources/Icon-60@3x.png b/Components/GeolocatorPlugin-1.0.3/samples/GeolocatorSample/GeolocatorSample/GeolocatorSample.iOS/Resources/Icon-60@3x.png
new file mode 100644
index 000000000..b03ca1bbc
Binary files /dev/null and b/Components/GeolocatorPlugin-1.0.3/samples/GeolocatorSample/GeolocatorSample/GeolocatorSample.iOS/Resources/Icon-60@3x.png differ
diff --git a/Components/GeolocatorPlugin-1.0.3/samples/GeolocatorSample/GeolocatorSample/GeolocatorSample.iOS/Resources/Icon-76.png b/Components/GeolocatorPlugin-1.0.3/samples/GeolocatorSample/GeolocatorSample/GeolocatorSample.iOS/Resources/Icon-76.png
new file mode 100644
index 000000000..587982e2a
Binary files /dev/null and b/Components/GeolocatorPlugin-1.0.3/samples/GeolocatorSample/GeolocatorSample/GeolocatorSample.iOS/Resources/Icon-76.png differ
diff --git a/Components/GeolocatorPlugin-1.0.3/samples/GeolocatorSample/GeolocatorSample/GeolocatorSample.iOS/Resources/Icon-76@2x.png b/Components/GeolocatorPlugin-1.0.3/samples/GeolocatorSample/GeolocatorSample/GeolocatorSample.iOS/Resources/Icon-76@2x.png
new file mode 100644
index 000000000..cd4e2c8fe
Binary files /dev/null and b/Components/GeolocatorPlugin-1.0.3/samples/GeolocatorSample/GeolocatorSample/GeolocatorSample.iOS/Resources/Icon-76@2x.png differ
diff --git a/Components/GeolocatorPlugin-1.0.3/samples/GeolocatorSample/GeolocatorSample/GeolocatorSample.iOS/Resources/Icon-Small-40.png b/Components/GeolocatorPlugin-1.0.3/samples/GeolocatorSample/GeolocatorSample/GeolocatorSample.iOS/Resources/Icon-Small-40.png
new file mode 100644
index 000000000..6acff9441
Binary files /dev/null and b/Components/GeolocatorPlugin-1.0.3/samples/GeolocatorSample/GeolocatorSample/GeolocatorSample.iOS/Resources/Icon-Small-40.png differ
diff --git a/Components/GeolocatorPlugin-1.0.3/samples/GeolocatorSample/GeolocatorSample/GeolocatorSample.iOS/Resources/Icon-Small-40@2x.png b/Components/GeolocatorPlugin-1.0.3/samples/GeolocatorSample/GeolocatorSample/GeolocatorSample.iOS/Resources/Icon-Small-40@2x.png
new file mode 100644
index 000000000..b833aac26
Binary files /dev/null and b/Components/GeolocatorPlugin-1.0.3/samples/GeolocatorSample/GeolocatorSample/GeolocatorSample.iOS/Resources/Icon-Small-40@2x.png differ
diff --git a/Components/GeolocatorPlugin-1.0.3/samples/GeolocatorSample/GeolocatorSample/GeolocatorSample.iOS/Resources/Icon-Small-40@3x.png b/Components/GeolocatorPlugin-1.0.3/samples/GeolocatorSample/GeolocatorSample/GeolocatorSample.iOS/Resources/Icon-Small-40@3x.png
new file mode 100644
index 000000000..ab8654e49
Binary files /dev/null and b/Components/GeolocatorPlugin-1.0.3/samples/GeolocatorSample/GeolocatorSample/GeolocatorSample.iOS/Resources/Icon-Small-40@3x.png differ
diff --git a/Components/GeolocatorPlugin-1.0.3/samples/GeolocatorSample/GeolocatorSample/GeolocatorSample.iOS/Resources/Icon-Small.png b/Components/GeolocatorPlugin-1.0.3/samples/GeolocatorSample/GeolocatorSample/GeolocatorSample.iOS/Resources/Icon-Small.png
new file mode 100644
index 000000000..33db7e714
Binary files /dev/null and b/Components/GeolocatorPlugin-1.0.3/samples/GeolocatorSample/GeolocatorSample/GeolocatorSample.iOS/Resources/Icon-Small.png differ
diff --git a/Components/GeolocatorPlugin-1.0.3/samples/GeolocatorSample/GeolocatorSample/GeolocatorSample.iOS/Resources/Icon-Small@2x.png b/Components/GeolocatorPlugin-1.0.3/samples/GeolocatorSample/GeolocatorSample/GeolocatorSample.iOS/Resources/Icon-Small@2x.png
new file mode 100644
index 000000000..bf45e2592
Binary files /dev/null and b/Components/GeolocatorPlugin-1.0.3/samples/GeolocatorSample/GeolocatorSample/GeolocatorSample.iOS/Resources/Icon-Small@2x.png differ
diff --git a/Components/GeolocatorPlugin-1.0.3/samples/GeolocatorSample/GeolocatorSample/GeolocatorSample.iOS/Resources/Icon-Small@3x.png b/Components/GeolocatorPlugin-1.0.3/samples/GeolocatorSample/GeolocatorSample/GeolocatorSample.iOS/Resources/Icon-Small@3x.png
new file mode 100644
index 000000000..7ad3891b9
Binary files /dev/null and b/Components/GeolocatorPlugin-1.0.3/samples/GeolocatorSample/GeolocatorSample/GeolocatorSample.iOS/Resources/Icon-Small@3x.png differ
diff --git a/Components/GeolocatorPlugin-1.0.3/samples/GeolocatorSample/GeolocatorSample/GeolocatorSample.iOS/Resources/LaunchScreen.storyboard b/Components/GeolocatorPlugin-1.0.3/samples/GeolocatorSample/GeolocatorSample/GeolocatorSample.iOS/Resources/LaunchScreen.storyboard
new file mode 100644
index 000000000..a639c2f1a
--- /dev/null
+++ b/Components/GeolocatorPlugin-1.0.3/samples/GeolocatorSample/GeolocatorSample/GeolocatorSample.iOS/Resources/LaunchScreen.storyboard
@@ -0,0 +1,39 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Components/GeolocatorPlugin-1.0.3/samples/GeolocatorSample/GeolocatorSample/GeolocatorSample.iOS/iTunesArtwork b/Components/GeolocatorPlugin-1.0.3/samples/GeolocatorSample/GeolocatorSample/GeolocatorSample.iOS/iTunesArtwork
new file mode 100644
index 000000000..94c8ebd6b
Binary files /dev/null and b/Components/GeolocatorPlugin-1.0.3/samples/GeolocatorSample/GeolocatorSample/GeolocatorSample.iOS/iTunesArtwork differ
diff --git a/Components/GeolocatorPlugin-1.0.3/samples/GeolocatorSample/GeolocatorSample/GeolocatorSample.iOS/iTunesArtwork@2x b/Components/GeolocatorPlugin-1.0.3/samples/GeolocatorSample/GeolocatorSample/GeolocatorSample.iOS/iTunesArtwork@2x
new file mode 100644
index 000000000..fa2ebf72d
Binary files /dev/null and b/Components/GeolocatorPlugin-1.0.3/samples/GeolocatorSample/GeolocatorSample/GeolocatorSample.iOS/iTunesArtwork@2x differ
diff --git a/Components/GeolocatorPlugin-1.0.3/samples/GeolocatorSample/GeolocatorSample/GeolocatorSample.iOS/packages.config b/Components/GeolocatorPlugin-1.0.3/samples/GeolocatorSample/GeolocatorSample/GeolocatorSample.iOS/packages.config
new file mode 100644
index 000000000..8c09ba999
--- /dev/null
+++ b/Components/GeolocatorPlugin-1.0.3/samples/GeolocatorSample/GeolocatorSample/GeolocatorSample.iOS/packages.config
@@ -0,0 +1,5 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/Components/GeolocatorPlugin-1.0.3/samples/GeolocatorSample/GeolocatorSample/GeolocatorSample/App.cs b/Components/GeolocatorPlugin-1.0.3/samples/GeolocatorSample/GeolocatorSample/GeolocatorSample/App.cs
new file mode 100644
index 000000000..72a43ef3d
--- /dev/null
+++ b/Components/GeolocatorPlugin-1.0.3/samples/GeolocatorSample/GeolocatorSample/GeolocatorSample/App.cs
@@ -0,0 +1,72 @@
+using Geolocator.Plugin;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using Xamarin.Forms;
+
+namespace GeolocatorSample
+{
+ public class App : Application
+ {
+ public App()
+ {
+
+ var buttonGetGPS = new Button
+ {
+ Text = "GetGPS"
+ };
+
+ var labelGPS = new Label
+ {
+ Text = "GPS goes here"
+ };
+
+ buttonGetGPS.Clicked += async (sender, args) =>
+ {
+ var locator = CrossGeolocator.Current;
+ locator.DesiredAccuracy = 50;
+ labelGPS.Text = "Getting gps";
+
+ var position = await locator.GetPositionAsync(timeoutMilliseconds: 10000);
+
+ if (position == null)
+ {
+ labelGPS.Text = "null gps :(";
+ return;
+ }
+ labelGPS.Text = string.Format("Time: {0} \nLat: {1} \nLong: {2} \n Altitude: {3} \nAltitude Accuracy: {4} \nAccuracy: {5} \n Heading: {6} \n Speed: {7}",
+ position.Timestamp, position.Latitude, position.Longitude,
+ position.Altitude, position.AltitudeAccuracy, position.Accuracy, position.Heading, position.Speed);
+ };
+
+ // The root page of your application
+ MainPage = new ContentPage
+ {
+ Content = new StackLayout
+ {
+ VerticalOptions = LayoutOptions.Center,
+ Children = {
+ buttonGetGPS,
+ labelGPS
+ }
+ }
+ };
+ }
+
+ protected override void OnStart()
+ {
+ // Handle when your app starts
+ }
+
+ protected override void OnSleep()
+ {
+ // Handle when your app sleeps
+ }
+
+ protected override void OnResume()
+ {
+ // Handle when your app resumes
+ }
+ }
+}
diff --git a/Components/GeolocatorPlugin-1.0.3/samples/GeolocatorSample/GeolocatorSample/GeolocatorSample/GeolocatorSample.csproj b/Components/GeolocatorPlugin-1.0.3/samples/GeolocatorSample/GeolocatorSample/GeolocatorSample/GeolocatorSample.csproj
new file mode 100644
index 000000000..23e7d0eec
--- /dev/null
+++ b/Components/GeolocatorPlugin-1.0.3/samples/GeolocatorSample/GeolocatorSample/GeolocatorSample/GeolocatorSample.csproj
@@ -0,0 +1,77 @@
+
+
+
+
+ 10.0
+ Debug
+ AnyCPU
+ {02BB8331-934C-424B-A0ED-438E6F1C39D4}
+ Library
+ Properties
+ GeolocatorSample
+ GeolocatorSample
+ v4.5
+ Profile78
+ 512
+ {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
+ 4b7ae233
+
+
+ true
+ full
+ false
+ bin\Debug\
+ DEBUG;TRACE
+ prompt
+ 4
+
+
+ pdbonly
+ true
+ bin\Release\
+ TRACE
+ prompt
+ 4
+
+
+
+
+
+
+
+ ..\..\packages\Xam.Plugin.Geolocator.1.0.3\lib\portable-net45+wp8+wpa81+win8+MonoAndroid10+MonoTouch10+Xamarin.iOS10\Geolocator.Plugin.dll
+ True
+
+
+ ..\..\packages\Xam.Plugin.Geolocator.1.0.3\lib\portable-net45+wp8+wpa81+win8+MonoAndroid10+MonoTouch10+Xamarin.iOS10\Geolocator.Plugin.Abstractions.dll
+ True
+
+
+ ..\..\packages\Xamarin.Forms.1.3.4.6332\lib\portable-win+net45+wp80+MonoAndroid10+MonoTouch10+Xamarin.iOS10\Xamarin.Forms.Core.dll
+
+
+ ..\..\packages\Xamarin.Forms.1.3.4.6332\lib\portable-win+net45+wp80+MonoAndroid10+MonoTouch10+Xamarin.iOS10\Xamarin.Forms.Xaml.dll
+
+
+
+
+
+
+
+
+
+
+
+
+ This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.
+
+
+
+
+
\ No newline at end of file
diff --git a/Components/GeolocatorPlugin-1.0.3/samples/GeolocatorSample/GeolocatorSample/GeolocatorSample/PluginsHelp/GeolocatorReadme.txt b/Components/GeolocatorPlugin-1.0.3/samples/GeolocatorSample/GeolocatorSample/GeolocatorSample/PluginsHelp/GeolocatorReadme.txt
new file mode 100644
index 000000000..8a88b0862
--- /dev/null
+++ b/Components/GeolocatorPlugin-1.0.3/samples/GeolocatorSample/GeolocatorSample/GeolocatorSample/PluginsHelp/GeolocatorReadme.txt
@@ -0,0 +1,24 @@
+Connectivity Readme
+Find the most up to date information at: https://github.com/jamesmontemagno/Xamarin.Plugins
+
+**IMPORTANT**
+Android:
+You must request ACCESS_COARSE_LOCATION & ACCESS_FINE_LOCATION permission
+
+iOS:
+In iOS 8 you now have to call either RequestWhenInUseAuthorization or RequestAlwaysAuthorization on the location manager. Additionally you need to add either the concisely named NSLocationWhenInUseUsageDescription or NSLocationAlwaysUsageDescription to your Info.plist.
+See: http://motzcod.es/post/97662738237/scanning-for-ibeacons-in-ios-8
+
+Windows Phone:
+You must set the ID_CAP_LOCATION permission.
+
+Getting Started:
+
+var locator = CrossGeolocator.Current;
+locator.DesiredAccuracy = 50;
+
+var position = await locator.GetPositionAsync (timeoutMilliseconds: 10000);
+
+Console.WriteLine ("Position Status: {0}", position.Timestamp);
+Console.WriteLine ("Position Latitude: {0}", position.Latitude);
+Console.WriteLine ("Position Longitude: {0}", position.Longitude);
\ No newline at end of file
diff --git a/Components/GeolocatorPlugin-1.0.3/samples/GeolocatorSample/GeolocatorSample/GeolocatorSample/Properties/AssemblyInfo.cs b/Components/GeolocatorPlugin-1.0.3/samples/GeolocatorSample/GeolocatorSample/GeolocatorSample/Properties/AssemblyInfo.cs
new file mode 100644
index 000000000..3836608f8
--- /dev/null
+++ b/Components/GeolocatorPlugin-1.0.3/samples/GeolocatorSample/GeolocatorSample/GeolocatorSample/Properties/AssemblyInfo.cs
@@ -0,0 +1,30 @@
+using System.Resources;
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// General Information about an assembly is controlled through the following
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyTitle("GeolocatorSample")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("GeolocatorSample")]
+[assembly: AssemblyCopyright("Copyright © 2014")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+[assembly: NeutralResourcesLanguage("en")]
+
+// Version information for an assembly consists of the following four values:
+//
+// Major Version
+// Minor Version
+// Build Number
+// Revision
+//
+// You can specify all the values or you can default the Build and Revision Numbers
+// by using the '*' as shown below:
+// [assembly: AssemblyVersion("1.0.*")]
+[assembly: AssemblyVersion("1.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/Components/GeolocatorPlugin-1.0.3/samples/GeolocatorSample/GeolocatorSample/GeolocatorSample/packages.config b/Components/GeolocatorPlugin-1.0.3/samples/GeolocatorSample/GeolocatorSample/GeolocatorSample/packages.config
new file mode 100644
index 000000000..21206a88c
--- /dev/null
+++ b/Components/GeolocatorPlugin-1.0.3/samples/GeolocatorSample/GeolocatorSample/GeolocatorSample/packages.config
@@ -0,0 +1,5 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/Local.testsettings b/Local.testsettings
new file mode 100644
index 000000000..4e1e6ab7f
--- /dev/null
+++ b/Local.testsettings
@@ -0,0 +1,13 @@
+
+
+ These are default test settings for a local test run.
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/README.ENV.md b/README.ENV.md
new file mode 100644
index 000000000..bdb436a1a
--- /dev/null
+++ b/README.ENV.md
@@ -0,0 +1,67 @@
+**Note**: It is very important to disable any ESHOP_AZURE variables from .env file when the local storage or container services is set. Remember you can disable any variable from .env file putting '#' character before the variable declaration and you can run and test separately any Azure services.
+
+With the steps explained in the next section, you will be able to run the application with Azure Redis Cache instead of the container of Redis service.
+
+# Azure Redis Cache service
+To enable the Redis Cache of Azure in eShop it is necessary to have previously configured the Azure Redis service through ARM file or manually through Azure portal. You can use the [ARM files](deploy/az/redis/readme.md) already created in eShop. Once the Redis Cache service is created, it is necessary to get the Primary connection string from information service in the Azure portal and modify the port value from 6380 to 6379 and the ssl value from True to False to establish a without ssl connection with the cache server. This Primary connection must be declared on .env file located in the solution root folder with `ESHOP_AZURE_REDIS_BASKET_DB` variable name.
+
+For example:
+>ESHOP_AZURE_REDIS_BASKET_DB=yourredisservice.redis.cache.windows.net:6379,password=yourredisservicepassword,ssl=False,abortConnect=False
+
+With the steps explained in the next section, you will be able to run the application with Azure Service Bus instead of the container of RabbitMQ service.
+
+# Azure Service Bus service
+To enable the service bus of Azure in eShop solution it is necessary having created previously the service bus service through ARM file or manually through Azure portal. You can use the [ARM files](deploy/az/servicebus/readme.md) already created in eShop. Finally, it is necessary to get the Shared access policy named "Root" (if you generated the service through ARM file) from eshop_event_bus topic. This policy must be declared on .env file located in the solution root folder with `ESHOP_AZURE_SERVICE_BUS` name.
+
+For example:
+>ESHOP_AZURE_SERVICE_BUS=Endpoint=sb://yourservicebusservice.servicebus.windows.net/;SharedAccessKeyName=Root;SharedAccessKey=yourtopicpolicykey=;EntityPath=eshop_event_bus
+
+Once the service bus service is created, it is necessary to set to true the "AzureServiceBusEnabled" environment variable from `settings.json` file on Catalog.API, Ordering.API, Basket.API, Payment.API, GracePeriodManager, Marketing.API and Locations.API.
+
+With the steps explained in the next section, you will be able to run the application with Azure Storage Account instead of the local container storage.
+
+# Azure Storage Account service
+To enable Azure storage of Azure in eShopOnAzure solution it is necessary having created previously the storage service through ARM file or manually through Azure portal. You can use the ARM files find under **deploy/az/storage** folder already created in eShop. Once the storage account is created, it is very important to create a new container(blob kind) and upload the solution catalog pics files before to continue.Later, it is necessary to set to true the "AzureStorageEnabled" environment variable from `settings.json` in Catalog.API and Marketing.API.Finally, it is necessary to get the container endpoint url from information service in the Azure portal, This url must be declared on .env file located in the solution root folder with `ESHOP_AZURE_STORAGE_CATALOG` for the Catalog.API content and `ESHOP_AZURE_STORAGE_MARKETING` for the Marketing.API content.
+
+Do not forget to put a slash character '/' in the end of the url.
+
+For example:
+>ESHOP_AZURE_STORAGE_CATALOG=https://yourcatalogstorageaccountservice.blob.core.windows.net/yourcontainername/
+>ESHOP_AZURE_STORAGE_MARKETING=https://yourmarketingstorageaccountservice.blob.core.windows.net/yourcontainername/
+
+
+## Check status of Azure Storage Account with Health Checks
+It is possible to add status check for the Azure Storage Account inside the Catalog Web Status. In case that the status check is enabled, for the Catalog and/or Marketing section in the WebStatus page, Azure Storage will be checked as one of the dependencies for theses APIs. To enable this check add the account name and key to the .env file for your account.
+
+For example:
+>ESHOP_AZURE_STORAGE_CATALOG_NAME=storageaccountname
+>ESHOP_AZURE_STORAGE_CATALOG_KEY=storageaccountkey
+>ESHOP_AZURE_STORAGE_MARKETING_NAME=storageaccountname
+>ESHOP_AZURE_STORAGE_MARKETING_KEY=storageaccountkey
+
+With the steps explained in the next section, you will be able to run the application with Azure SQL Database instead of local storage.
+
+# Azure SQL Database
+To enable Azure SQL Database in eShop is required to have a Azure SQL with the databases for Ordering.API, Identity.API, Catalaog.API and Marketing.API. You can use the [ARM files](deploy/az/sql/readme.md) already created in this project or do it manually. Once the databases are created, it is necessary to get the connection string for each service and set the corresponding variable in the .env file.
+
+For example:
+>ESHOP_AZURE_CATALOG_DB=catalogazureconnectionstring
+>ESHOP_AZURE_IDENTITY_DB=identityazureconnectionstring
+>ESHOP_AZURE_ORDERING_DB=orderingazureconnectionstring
+>ESHOP_AZURE_MARKETING_DB=marketingazureconnectionstring
+
+With the steps explained in the next section, you will be able to run the application with Azure Cosmos DB Database instead of local storage.
+
+# Azure Cosmos DB
+To enable Azure Cosmos DB in eShop is required to have the connection string. If you do not have an Azure Cosmos DB created you can use the ARM files under **deploy/az/cosmos** folder available in eShop or do it manually. Once the connection string is availabe it is necessary to add it in the .env file in the `ESHOP_AZURE_COSMOSDB`variable.
+
+For example:
+>ESHOP_AZURE_COSMOSDB=cosmosconnectionstring
+
+# Azure Functions
+To enable the Azure Functions in eShop you can add the URI where the functions have been deployed. You can use the ARM files under **deploy/az/azurefunctions** to create the resources in Azure. Once created and available, it is necessary to add to the .env file the `ESHOP_AZUREFUNC_CAMPAIGN_DETAILS_URI` variable.
+
+For example:
+ >ESHOP_AZUREFUNC_CAMPAIGN_DETAILS_URI=https://marketing-functions.azurewebsites.net/api/MarketingDetailsHttpTrigger?code=AzureFunctioncode
+
+See Azure Functions deployment Files and Readme for more details [ARM files](deploy/az/azurefunctions/readme.md)
\ No newline at end of file
diff --git a/README.k8s.md b/README.k8s.md
index 28ebd49e8..37592ce2c 100644
--- a/README.k8s.md
+++ b/README.k8s.md
@@ -23,6 +23,53 @@ The k8s directory contains Kubernetes configuration for the eShopOnContainers ap
Once the user and password are retrieved, run the following script for deployment. For example:
>```
->./deploy.ps1 -registry myregistry.azurecr.io -dockerUser User -dockerPassword SecretPassword
+>./deploy.ps1 -registry myregistry.azurecr.io -dockerUser User -dockerPassword SecretPassword -configFile file_with_config.json
>```
-The script will build the code and corresponding Docker images, push the latter to your registry, and deploy the application to your cluster. You can watch the deployment unfold from the Kubernetes web interface: run `kubectl proxy` and open a browser to [http://localhost:8001/ui](http://localhost:8001/ui)
+
+The parameter `configFile` is important (and mandatory) because it contains the configuration used for the Pods in Kubernetes. This allow deploying Pods that use your own resources in Azure or any other cloud provider. A configuration file `local.json` is provided which configures Pods to use the infrastructure containers (that is sql server, rabbitmq, redis and mongodb must be deployed also in the k8s).
+
+The script will build the code and corresponding Docker images, push the later to your registry, and deploy the application to your cluster. You can watch the deployment unfold from the Kubernetes web interface: run `kubectl proxy` and open a browser to [http://localhost:8001/ui](http://localhost:8001/ui)
+
+### Pods configuration file
+
+When deploying to k8s the script needs the `configFile` with the location of a JSON configuration file. This file contains the configuration of the pods. The file is a JSON file. For reference another configuration file (cloud.json) is provided but without valid values.
+
+If you deploy the infrastructure containers use `local.json` as a value for `configFile` parameter. If you don't deploy the infrastructure containers use your own configuration file with the correct values.
+
+### Parameters of the deploy.ps1 script
+
+The script accepts following parameters:
+
++ `registry`: Name of the Docker registry to use. If not passed DockerHub is assumed
++ `dockerUser`: Login to use for the Docker registry (if needed)
++ `dockerPassword`: Password to use for the Docker registry (if needed)
++ `execPath`: Location of `kubectl` (if not in the path). If passed must finish with the path character.
++ `kubeconfigPath`: Location of the `kubectl` configuration file. **This parameter is used only in the CI pipeline**, so you don't need to pass it when invoking the script using the CLI.
++ `configFile`: Location of the Yaml file with the `externalcfg` configmap to be deployed. This configmap is used to configure the Pod's environment **This parameter is mandatory**
++ `imageTag`: Tag of the images to deploy to k8s. If not passed the name of the current branch is used.
++ `externalDns`: External DNS name of the k8s. This is only needed if you have configured a DNS that points to your k8s external IP. If you don't have any DNS configured do not pass this parameter.
++ `deployCI`: If `true` means that script is running under the context of a VSTS Hosted Build Agent. **You should never use this parameter from CLI**
++ `buildBits`: means that the source code of eShopOnContainers will be built. If you have built your code (and have all projects published in `obj/Docker/publish`) do not pass this parameter. Default value is `false`
++ `buildImages`: If `true` (default value) Docker images are built and pushed in the Docker registry. If you set this parameter to `false`, Docker images won't be built nor pushed in the Docker registry (but k8s' deployments and services will be redeployed).
++ `deployInfrastructure`: If `true` infrastructure containers (rabbitmq, mongo, redis, sql) will be deployed in k8s. If `false` those containers (and its related deployments and services in k8s) won't be deployed.
++ `dockerOrg`: Name of the organization in the registry where the images are (or will be pushed). Default value is `eshop` (which has images provided by Microsoft)
+
+### Typical usages of the script:
+
+Build all projects, and deploy all them in k8s including infrastructure containers in a organization called `foo` in Docker Hub. Images will be tagged with my current git branch and containers will use the configuration set in `conf_local.yml` file:
+
+```
+./deploy.ps1 -buildBits $true -dockerOrg foo -dockerUser MY_USER -dockerPassword MY_PASSWORD -configFile conf_local.yml
+```
+
+Do not build any project and don't rebuild docker images. Create k8s deployments that will pull images from my private repository, in the `foo` organization, using the tag `latest`. Containers will use the configuration set in `conf_cloud` file.
+
+```
+./deploy.ps1 -buildImages $false -dockerOrg foo -registry MY_REGISTRY_FQDN -dockerUser MY_USER -dockerPassword MY_PASSWORD -configFile conf_cloud.yml -imageTag master
+```
+
+Deploy k8s using public images that Microsoft provides:
+
+```
+./deploy.ps1 -buildImages $false -configFile conf_local.yml -imageTag master
+```
\ No newline at end of file
diff --git a/azure-docs/builds/images/android-build-step1.png b/azure-docs/builds/images/android-build-step1.png
new file mode 100644
index 000000000..b43243b73
Binary files /dev/null and b/azure-docs/builds/images/android-build-step1.png differ
diff --git a/azure-docs/builds/images/android-build-step2.png b/azure-docs/builds/images/android-build-step2.png
new file mode 100644
index 000000000..67419b3ba
Binary files /dev/null and b/azure-docs/builds/images/android-build-step2.png differ
diff --git a/azure-docs/builds/images/android-build-step3.png b/azure-docs/builds/images/android-build-step3.png
new file mode 100644
index 000000000..ae703c16d
Binary files /dev/null and b/azure-docs/builds/images/android-build-step3.png differ
diff --git a/azure-docs/builds/images/android-build-step4.png b/azure-docs/builds/images/android-build-step4.png
new file mode 100644
index 000000000..8311e5647
Binary files /dev/null and b/azure-docs/builds/images/android-build-step4.png differ
diff --git a/azure-docs/builds/images/android-build-step5.png b/azure-docs/builds/images/android-build-step5.png
new file mode 100644
index 000000000..b6789e97f
Binary files /dev/null and b/azure-docs/builds/images/android-build-step5.png differ
diff --git a/azure-docs/builds/images/android-build.png b/azure-docs/builds/images/android-build.png
new file mode 100644
index 000000000..d21233571
Binary files /dev/null and b/azure-docs/builds/images/android-build.png differ
diff --git a/azure-docs/builds/images/ios-build-step1.png b/azure-docs/builds/images/ios-build-step1.png
new file mode 100644
index 000000000..e19a7e803
Binary files /dev/null and b/azure-docs/builds/images/ios-build-step1.png differ
diff --git a/azure-docs/builds/images/ios-build-step2.png b/azure-docs/builds/images/ios-build-step2.png
new file mode 100644
index 000000000..04b747911
Binary files /dev/null and b/azure-docs/builds/images/ios-build-step2.png differ
diff --git a/azure-docs/builds/images/ios-build-step3.png b/azure-docs/builds/images/ios-build-step3.png
new file mode 100644
index 000000000..0744be5e7
Binary files /dev/null and b/azure-docs/builds/images/ios-build-step3.png differ
diff --git a/azure-docs/builds/images/ios-build.png b/azure-docs/builds/images/ios-build.png
new file mode 100644
index 000000000..35f25c29f
Binary files /dev/null and b/azure-docs/builds/images/ios-build.png differ
diff --git a/azure-docs/builds/xamarin-android.md b/azure-docs/builds/xamarin-android.md
new file mode 100644
index 000000000..1459f151e
--- /dev/null
+++ b/azure-docs/builds/xamarin-android.md
@@ -0,0 +1,95 @@
+# Xamarin Android Build
+
+Follow these steps to create a VSTS build for your eShopOnContainers app (android).
+
+**Note**: This document assumes basic knowledge about creating builds and configuring external VSTS connections
+
+## Creating the build
+
+Despite the _"Get Sources"_ task there are five tasks more in the build:
+
+1. Restore NuGet Packages
+2. Build Xamarin Android Project
+3. Download the certstore to sign the APK
+4. Sign the APK
+5. Publish the build artifact.
+
+![Android Build Steps](images/android-build.png)
+
+Let's discuss each of them.
+
+### Restore NuGet Packages
+
+Add a "NuGet restore" task and enter the following configuration:
+
+1. Enter `eShopOnContainers-Android.sln` in "Path to solution, packages.config, or project.json". This sln is created ex professo for the build and contains only the Xamarin Android project plus the Xamarin Forms one.
+
+![Android Build Step 1](images/android-build-step1.png)
+
+### Build the project
+
+Add a "Xamarin Android" task with following configuration:
+
+1. `**/*Droid*.csproj` in "Project"
+2. `$(build.binariesdirectory)/$(BuildConfiguration)` in "Output Directory"
+3. `$(BuildConfiguration)` in "Configuration"
+4. Ensure that the "Create App Package" checkbox is enabled
+5. In "JDK Options" be sure to select "JDK 8" in the "JDK Version" dropdown.
+
+![Android Build Step 2](images/android-build-step2.png)
+
+### Download the keystore to sign the build
+
+** Note** This require you have a valid keystore. Refer to [this Xamarin article](https://developer.xamarin.com/guides/android/deployment,_testing,_and_metrics/publishing_an_application/part_2_-_signing_the_android_application_package/) for instructions on how create one, using Visual Studio and Xamarin. Or if you prefer, you can read [how use the Android SDK tools to create a keystore](https://developer.android.com/studio/publish/app-signing.html).
+
+This build assumes the keystore is stored somewhere in internet. Beware on where you store your keystores! Keem them safe and privately. Always consider other possible alternatives on where store the keycert:
+
+1. Store in the source control repository, **assuming it's private**. For public repositories this option is discarded
+2. Store in the build agent. If you use a custom VSTS build agent, store the keycert files locally in the agent. This is simple and secure.
+3. Store in internet. If this is the case, **protect the resource**. You can be forced to use this option if your repository is public *and* you use the VSTS hosted agent.
+
+Add a task "Download file" (**Note:** this task is installed [through a VSTS extension](https://marketplace.visualstudio.com/items?itemName=automagically.DownloadFile)) with following configuration:
+
+1. `$(keystore.url)$(keystore.name)` in "File URL"
+2. `$(Build.SourcesDirectory)` in "Destination Folder"
+
+Fill the "Credentials" section accordly.
+
+![Android Build Step 3](images/android-build-step3.png)
+
+**Note:** You can, of course, use any other way to download the file (like a Powershell task).
+
+### Signing the APK
+
+Add a "Android Signing" task with following configuation:
+
+1. `$(build.binariesdirectory)/$(BuildConfiguration)/*.apk` in "APK Files"
+2. Ensure the checkbox "Sign the APK" is checked
+3. `$(Build.SourcesDirectory)\$(keystore.name)` in "Keystore file". This location has to be where the keystore is. If you downloaded it using a previous task (as our example), use the same value. If keystore is physically in the VSTS agent you can use the filepath.
+4. `$(keystore.pwd)` in "Keystore Password"
+5. `$(keystore.alias)` in "Keystore Alias"
+6. `$(key.pwd)` in "Key password".
+7. `-verbose` in "Jarsigner Arguments"
+7. Ensure the checkbox "Zipalign" is checked.
+
+![Android Build Step 4](images/android-build-step4.png)
+
+### Publishing build artifact
+
+Add a "Publish Build Artifacts" task, with following configuration:
+
+1. `$(build.binariesdirectory)/$(BuildConfiguration)` in "Path to publish"
+2. `drop` in "Artifact Name"
+3. `Server` in "Artifact Type"
+
+![Android Build Step 5](images/android-build-step5.png)
+
+## Variables
+
+You need to setup the following variables:
+
+1. `keystore.pwd` -> Password of the keystore
+2. `keystore.alias` -> Alias of the keystore
+3. `keystore.url` -> Full URL of the keystore
+4. `key.pwd` -> Password of the key
+
diff --git a/azure-docs/builds/xamarin-iOS.md b/azure-docs/builds/xamarin-iOS.md
new file mode 100644
index 000000000..a47a880f3
--- /dev/null
+++ b/azure-docs/builds/xamarin-iOS.md
@@ -0,0 +1,63 @@
+# Xamarin iOS Build
+
+Follow these steps to create a VSTS build for your eShopOnContainers app (iOS)
+
+**Note**: This document assumes basic knowledge about creating builds and configuring external VSTS connections
+
+## Creating the build
+
+Despite the _"Get Sources"_ task there are three tasks more in the build:
+
+1. Build Xamarin iOS Project
+2. Copy generated packages
+3. Publish the build artifact.
+
+![iOS Build Steps](images/ios-build.png)
+
+Let's discuss each of them.
+
+### Build the project
+
+Add a "Xamarin iOS" task with following configuration:
+
+1. `eShopOnContainers-iOS.sln` in "Solution". This solution has been created ex professo for the build.
+2. Ensure that the "Create App Package" checkbox is enabled
+
+**About signing & Provisioning section**
+
+In order to deploy your app to a physical device you must sign it using a certificate with a provisioning profile. Refer to [this blog
+post of the Xamarin team](https://blog.xamarin.com/continuous-integration-for-ios-apps-with-visual-studio-team-services/) for more info.
+
+Basically you have three options for setting the certificate (p12 file) and the provisioning profile:
+
+1. Use MacInCloud VSTS agent and setup the p12 file and provisioning profile in the setup [https://blogs.msdn.microsoft.com/visualstudioalm/2015/11/18/macincloud-visual-studio-team-services-build-and-improvements-to-ios-build-support/](https://blogs.msdn.microsoft.com/visualstudioalm/2015/11/18/macincloud-visual-studio-team-services-build-and-improvements-to-ios-build-support/)
+2. Use a custom mac machine with the certificate and provisioning profile installed. In this case you don't have to do anything else.
+3. Have the p12 file and the provisioning profile reachable on somewhere
+
+If you choose option 3, you need to download the certificate and the provisioning profile into the build agent (using a previous build task).
+Once downloaded two files, you have to specify the location of both in the "Signing & Provisioning Section".
+
+![iOS Build Step 1](images/ios-build-step1.png)
+
+### Copy generated files to output folder
+
+Add a "Copy files" task with following configuration:
+
+1. `src/Mobile/eShopOnContainers/eShopOnContainers.iOS/bin/iPhone/$(BuildConfiguration)` in "Source Folder"
+2. `**/*.ipa` in "Contents"
+3. `$(Build.ArtifactStagingDirectory)` in "Target Folder"
+4. Ensure that "Clean Target folder" (under "Advanced" section) is checked
+
+This way we copy the generated IPA in the _Build.ArtifactStagingDirectory_ folder (and remove any previous IPA generated by a previous build).
+
+![iOS Build Step 2](images/ios-build-step2.png)
+
+### Publishing build artifact
+
+Add a "Publish Build Artifacts" task, with following configuration:
+
+1. `$(Build.ArtifactStagingDirectory)` in "Path to publish"
+2. `drop` in "Artifact Name"
+3. `Server` in "Artifact Type"
+
+![Android Build Step 3](images/ios-build-step3.png)
diff --git a/azure-docs/readme.md b/azure-docs/readme.md
new file mode 100644
index 000000000..f7a60b5b3
--- /dev/null
+++ b/azure-docs/readme.md
@@ -0,0 +1,6 @@
+# Azure Related Documentation
+
+## Builds and releases
+
+1. [VSTS build for Xamarin App (Android)](builds/xamarin-android.md)
+2. [VSTS build for Xamarin App (iOS)](builds/xamarin-iOS.md)
diff --git a/cli-linux/build-bits-linux.sh b/cli-linux/build-bits-linux.sh
index 4421c58bd..cd8c7cc2e 100755
--- a/cli-linux/build-bits-linux.sh
+++ b/cli-linux/build-bits-linux.sh
@@ -3,7 +3,8 @@
declare -x path=$1
if [ -z "$path" ]; then
- $path="$(pwd)/../src";
+ $path="$(pwd)/../src";
+ echo -e "\e[33mNo path passed. Will use $path"
fi
declare -a projectList=(
@@ -30,9 +31,9 @@ do
echo -e "\e[33m\tRemoving old publish output"
pushd $path/$project
rm -rf obj/Docker/publish
- echo -e "\e[33m\tRestoring project"
+ echo -e "\e[33m\tRestoring project $project"
dotnet restore
- echo -e "\e[33m\tBuilding and publishing projects"
+ echo -e "\e[33m\tBuilding and publishing $project"
dotnet publish -o obj/Docker/publish
popd
done
diff --git a/cli-linux/run.sh b/cli-linux/run.sh
new file mode 100644
index 000000000..aaeb164fa
--- /dev/null
+++ b/cli-linux/run.sh
@@ -0,0 +1,7 @@
+#!/bin/bash
+docker stop $(docker ps -a -q)
+docker rm $(docker ps -a -q)
+docker images |grep -v REPOSITORY|awk '{print $1}'|xargs -L1 docker pull
+export ESHOP_PROD_EXTERNAL_DNS_NAME_OR_IP=$(curl ipinfo.io/ip)
+docker-compose -f docker-compose.images.yml -f docker-compose.prod.yml up -d --force-recreate
+
diff --git a/deploy/az/azurefunctions/azurefunctionsdeploy.json b/deploy/az/azurefunctions/azurefunctionsdeploy.json
new file mode 100644
index 000000000..4143d73e5
--- /dev/null
+++ b/deploy/az/azurefunctions/azurefunctionsdeploy.json
@@ -0,0 +1,228 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "SitesEshopfunctionsName": {
+ "type": "string",
+ "metadata": {
+ "description": "Name of the Azure Functions namespace"
+ }
+ }
+ },
+ "variables": {
+ "SitesEshopfunctionsName": "[parameters('SitesEshopfunctionsName')]",
+ "WebConfigName": "[concat(variables('SitesEshopfunctionsName'), '/web')]",
+ "Location": "[resourceGroup().location]",
+ "EshopAccountsDatabase": "[concat(variables('SitesEshopfunctionsName'), 'db')]",
+ "ServerFarmPlan": "[concat(trim(variables('location')), 'Plan')]",
+ "StorageAccounts": "[concat(variables('SitesEshopfunctionsName'), 'st')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.DocumentDB/databaseAccounts",
+ "kind": "GlobalDocumentDB",
+ "name": "[variables('EshopAccountsDatabase')]",
+ "apiVersion": "2015-04-08",
+ "location": "[variables('Location')]",
+ "tags": {},
+ "scale": null,
+ "properties": {
+ "databaseAccountOfferType": "Standard",
+ "consistencyPolicy": {
+ "defaultConsistencyLevel": "Session",
+ "maxIntervalInSeconds": 5,
+ "maxStalenessPrefix": 100
+ },
+ "name": null
+ },
+ "dependsOn": []
+ },
+ {
+ "type": "Microsoft.Storage/storageAccounts",
+ "sku": {
+ "name": "Standard_LRS",
+ "tier": "Standard"
+ },
+ "kind": "Storage",
+ "name": "[variables('StorageAccounts')]",
+ "apiVersion": "2016-01-01",
+ "location": "[variables('Location')]",
+ "tags": {},
+ "scale": null,
+ "properties": {},
+ "dependsOn": []
+ },
+ {
+ "type": "Microsoft.Web/serverfarms",
+ "sku": {
+ "name": "Y1",
+ "tier": "Dynamic",
+ "size": "Y1",
+ "family": "Y",
+ "capacity": 0
+ },
+ "kind": "functionapp",
+ "name": "[variables('ServerFarmPlan')]",
+ "apiVersion": "2015-08-01",
+ "location": "[variables('Location')]",
+ "scale": null,
+ "properties": {
+ "name": "[variables('ServerFarmPlan')]",
+ "numberOfWorkers": 0
+ },
+ "dependsOn": []
+ },
+ {
+ "type": "Microsoft.Web/sites",
+ "kind": "functionapp",
+ "name": "[variables('SitesEshopfunctionsName')]",
+ "apiVersion": "2015-08-01",
+ "location": "[variables('Location')]",
+ "scale": null,
+ "properties": {
+ "name": "[variables('SitesEshopfunctionsName')]",
+ "hostNames": [
+ "[concat(variables('SitesEshopfunctionsName'),'.azurewebsites.net')]"
+ ],
+ "enabledHostNames": [
+ "[concat(variables('SitesEshopfunctionsName'),'.azurewebsites.net')]",
+ "[concat(variables('SitesEshopfunctionsName'),'.scm.azurewebsites.net')]"
+ ],
+ "hostNameSslStates": [
+ {
+ "name": "[concat(variables('SitesEshopfunctionsName'),'.azurewebsites.net')]",
+ "sslState": 0,
+ "thumbprint": null,
+ "ipBasedSslState": 0
+ },
+ {
+ "name": "[concat(variables('SitesEshopfunctionsName'),'.scm.azurewebsites.net')]",
+ "sslState": 0,
+ "thumbprint": null,
+ "ipBasedSslState": 0
+ }
+ ],
+ "serverFarmId": "[resourceId('Microsoft.Web/serverfarms', variables('ServerFarmPlan'))]"
+ },
+ "dependsOn": [
+ "[resourceId('Microsoft.Web/serverfarms', variables('ServerFarmPlan'))]"
+ ]
+ },
+ {
+ "type": "Microsoft.Web/sites/config",
+ "name": "[variables('WebConfigName')]",
+ "apiVersion": "2015-08-01",
+ "location": "[variables('Location')]",
+ "scale": null,
+ "properties": {
+ "numberOfWorkers": 1,
+ "defaultDocuments": [
+ "Default.htm",
+ "Default.html",
+ "Default.asp",
+ "index.htm",
+ "index.html",
+ "iisstart.htm",
+ "default.aspx",
+ "index.php",
+ "hostingstart.html"
+ ],
+ "netFrameworkVersion": "v4.0",
+ "phpVersion": "5.6",
+ "pythonVersion": "",
+ "nodeVersion": "",
+ "linuxFxVersion": "",
+ "requestTracingEnabled": false,
+ "remoteDebuggingEnabled": false,
+ "remoteDebuggingVersion": null,
+ "httpLoggingEnabled": false,
+ "logsDirectorySizeLimit": 35,
+ "detailedErrorLoggingEnabled": false,
+ "publishingUsername": "$eshopfunctions",
+ "publishingPassword": null,
+ "appSettings": null,
+ "metadata": null,
+ "connectionStrings": null,
+ "machineKey": null,
+ "handlerMappings": null,
+ "documentRoot": null,
+ "scmType": "None",
+ "use32BitWorkerProcess": true,
+ "webSocketsEnabled": false,
+ "alwaysOn": false,
+ "javaVersion": null,
+ "javaContainer": null,
+ "javaContainerVersion": null,
+ "appCommandLine": "",
+ "managedPipelineMode": 0,
+ "virtualApplications": [
+ {
+ "virtualPath": "/",
+ "physicalPath": "site\\wwwroot",
+ "preloadEnabled": false,
+ "virtualDirectories": null
+ }
+ ],
+ "winAuthAdminState": 0,
+ "winAuthTenantState": 0,
+ "customAppPoolIdentityAdminState": false,
+ "customAppPoolIdentityTenantState": false,
+ "runtimeADUser": null,
+ "runtimeADUserPassword": null,
+ "loadBalancing": 1,
+ "routingRules": [],
+ "experiments": {
+ "rampUpRules": []
+ },
+ "limits": null,
+ "autoHealEnabled": false,
+ "autoHealRules": {
+ "triggers": null,
+ "actions": null
+ },
+ "tracingOptions": null,
+ "vnetName": "",
+ "siteAuthEnabled": false,
+ "siteAuthSettings": {
+ "enabled": null,
+ "unauthenticatedClientAction": null,
+ "tokenStoreEnabled": null,
+ "allowedExternalRedirectUrls": null,
+ "defaultProvider": null,
+ "clientId": null,
+ "clientSecret": null,
+ "issuer": null,
+ "allowedAudiences": null,
+ "additionalLoginParams": null,
+ "isAadAutoProvisioned": false,
+ "googleClientId": null,
+ "googleClientSecret": null,
+ "googleOAuthScopes": null,
+ "facebookAppId": null,
+ "facebookAppSecret": null,
+ "facebookOAuthScopes": null,
+ "twitterConsumerKey": null,
+ "twitterConsumerSecret": null,
+ "microsoftAccountClientId": null,
+ "microsoftAccountClientSecret": null,
+ "microsoftAccountOAuthScopes": null
+ },
+ "cors": {
+ "allowedOrigins": [
+ "https://functions.azure.com",
+ "https://functions-staging.azure.com",
+ "https://functions-next.azure.com"
+ ]
+ },
+ "push": null,
+ "apiDefinition": null,
+ "autoSwapSlotName": null,
+ "localMySqlEnabled": false,
+ "ipSecurityRestrictions": null
+ },
+ "dependsOn": [
+ "[resourceId('Microsoft.Web/sites', variables('SitesEshopfunctionsName'))]"
+ ]
+ }
+ ]
+}
\ No newline at end of file
diff --git a/deploy/az/azurefunctions/azurefunctionsdeploy.parameters.json b/deploy/az/azurefunctions/azurefunctionsdeploy.parameters.json
new file mode 100644
index 000000000..8472e9998
--- /dev/null
+++ b/deploy/az/azurefunctions/azurefunctionsdeploy.parameters.json
@@ -0,0 +1,5 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentParameters.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {}
+}
\ No newline at end of file
diff --git a/deploy/az/azurefunctions/readme.md b/deploy/az/azurefunctions/readme.md
new file mode 100644
index 000000000..5716bf615
--- /dev/null
+++ b/deploy/az/azurefunctions/readme.md
@@ -0,0 +1,37 @@
+# Deploying Azure Functions
+
+The ARM template `azurefunctionsdeploy.json` and its parameter file (`azurefunctionsdeploy.parameters.json`) are used to deploy Marketing azure functions.
+
+## Editing azurefunctionsdeploy.parameters.json file
+
+You can edit the `azurefunctionsdeploy.parameters.parameters.json` file to set your values, but is not needed.
+
+## Deploy the template
+
+Once parameter file is edited you can deploy it using [create-resources script](../readme.md).
+
+i. e. if you are in windows, to deploy sql databases in a new resourcegroup located in westus, go to `deploy\az` folder and type:
+
+```
+create-resources.cmd azurefunctions\azurefunctionsdeploy newResourceGroup -c westus
+```
+## Deploy Marketing azure function with Visual Studio.
+
+Alternatively, instead of using ARM templates, you can deploy Marketing azure function directly by publishing the project Marketing-functions in eShopOnContainers-AzureFunctions.sln with Visual Studio publish tool.
+
+## Setting Azure function configurations
+
+Once deployed, go to azure portal and set the connection string for the azure function under the name "SqlConnection". The value must be the connection string which points to MarketingDB.
+
+Example:
+
+"SqlConnection": "Server=tcp:eshopsql.database.windows.net,1433;Initial Catalog=marketingdb;"
+
+In appsettings section, add a new entry named "MarketingStorageUri". The value must be the uri of the blob storage where the campaign images are stored.
+
+Example:
+
+"MarketingStorageUri": "https://marketingcampaign.blob.core.windows.net/pics/"
+
+
+
diff --git a/deploy/az/cosmos/deploycosmos.json b/deploy/az/cosmos/deploycosmos.json
new file mode 100644
index 000000000..8c03983a2
--- /dev/null
+++ b/deploy/az/cosmos/deploycosmos.json
@@ -0,0 +1,32 @@
+{
+ "$schema": "http://schema.management.azure.com/schemas/2014-04-01-preview/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "name": {
+ "type": "String"
+ }
+ },
+ "variables": {
+ "name": "[concat(parameters('name'), uniqueString(resourceGroup().id))]",
+ "location":"[resourceGroup().location]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.DocumentDb/databaseAccounts",
+ "kind": "MongoDB",
+ "name": "[variables('name')]",
+ "apiVersion": "2015-04-08",
+ "location": "[variables('location')]",
+ "properties": {
+ "databaseAccountOfferType": "Standard",
+ "locations": [
+ {
+ "id": "[concat(variables('name'), '-', variables('location'))]",
+ "failoverPriority": 0,
+ "locationName": "[variables('location')]"
+ }
+ ]
+ }
+ }
+ ]
+}
\ No newline at end of file
diff --git a/deploy/az/cosmos/deploycosmos.parameters.json b/deploy/az/cosmos/deploycosmos.parameters.json
new file mode 100644
index 000000000..725bb7cf9
--- /dev/null
+++ b/deploy/az/cosmos/deploycosmos.parameters.json
@@ -0,0 +1,9 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentParameters.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "name": {
+ "value": "eshop-nosql"
+ }
+ }
+}
\ No newline at end of file
diff --git a/deploy/az/create-resources.cmd b/deploy/az/create-resources.cmd
new file mode 100644
index 000000000..bd27efe3e
--- /dev/null
+++ b/deploy/az/create-resources.cmd
@@ -0,0 +1,23 @@
+@echo off
+if %1.==. GOTO error
+if %2.==. GOTO error
+if NOT %3.==-c. GOTO deployresources
+if %4.==. GOTO error
+echo Creating resource group %2 in '%4'
+call az group create --name %2 --location %4
+:deployresources
+echo Deploying ARM template '%1.json' in resource group %2
+call az group deployment create --resource-group %2 --parameters @%1.parameters.json --template-file %1.json
+GOTO end
+:error
+echo.
+echo Usage:
+echo create-resources arm-file resource-group-name [-c location]
+echo arm-file: Path to ARM template WITHOUT .json extension. An parameter file with same name plus '.parameters' MUST exist in same folde
+echo resource-grop-name: Name of the resource group to use or create
+echo -c: If appears means that resource group must be created. If -c is specified, must use enter location
+echo.
+echo Examples:
+echo create-resources path_and_filename testgroup (Deploys path_and_filename.json with parameters specified in path_and_filename.parameters.json file).
+echo create-resources path_and_filename newgroup -c westus (Deploys path_and_filename.json (with parameters specified in path_and_filename.parameters.json file) in a NEW resource group named newgroup in the westus location)
+:end
diff --git a/deploy/az/readme.md b/deploy/az/readme.md
new file mode 100644
index 000000000..cee4581cb
--- /dev/null
+++ b/deploy/az/readme.md
@@ -0,0 +1,20 @@
+# Deploying resources using create-resources script
+
+The `create-resources` script is a basic script to allow easy deployment of one ARM template in one resource group. You can deploy to an existing resource group or to create one.
+
+## Deploying to a existing resource group
+
+Just type `create-resources path-to-arm-template resourcegroup`. Called this way the script will:
+
+1. Search for `path-to-arm-template.json` and `path-to-arm-template.parameters.json` files
+2. If they exist, will deploy them in the `resourcegroup` specified (that has to exist).
+
+## Deploying to a new resource group
+
+Just type `create-resources path-to-arm-template resourcegroup -c location`. Called this way the script will:
+
+1. Search for `path-to-arm-template.json` and `path-to-arm-template.parameters.json` files
+2. If they exist, will create the `resourcegroup` specified in the `location` specified.
+3. Finally will deploy `path-to-arm-template.json` and `path-to-arm-template.parameters.json` files in the `resourcegroup`
+
+
diff --git a/deploy/az/redis/readme.md b/deploy/az/redis/readme.md
new file mode 100644
index 000000000..093a9af14
--- /dev/null
+++ b/deploy/az/redis/readme.md
@@ -0,0 +1,31 @@
+# Deploying Redis Cache
+
+The ARM template `redisdeploy.json` and its parameter file (`redisdeploy.parameters.json`) are used to deploy following resources:
+
+1. One Redis Cache
+
+## Editing sbusdeploy.parameters.json file
+
+You can edit the `redisdeploy.parameters.parameters.json` file to set your values, but is not needed. The only parameter than can
+be set is:
+
+1. `namespaceprefix` is a string that is used to create the Redis namespace. ARM script creates unique values by appending a unique string to this parameter value, so you can leave the default value.
+
+## Deploy the template
+
+Once parameter file is edited you can deploy it using [create-resources script](../readme.md).
+
+i. e. if you are in windows, to deploy sql databases in a new resourcegroup located in westus, go to `deploy\az` folder and type:
+
+```
+create-resources.cmd redis\redisdeploy newResourceGroup -c westus
+```
+
+
+
+
+
+
+
+
+
diff --git a/deploy/az/redis/redisdeploy.json b/deploy/az/redis/redisdeploy.json
new file mode 100644
index 000000000..04b53a3b6
--- /dev/null
+++ b/deploy/az/redis/redisdeploy.json
@@ -0,0 +1,42 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "namespaceprefix": {
+ "type": "string",
+ "metadata": {
+ "description": "Name of the Redis namespace"
+ }
+ }
+ },
+ "variables": {
+ "location": "[resourceGroup().location]",
+ "namespaceprefix": "[concat(parameters('namespaceprefix'), uniqueString(resourceGroup().id))]",
+ "sbVersion": "2016-04-01"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Cache/Redis",
+ "name": "[variables('namespaceprefix')]",
+ "apiVersion": "[variables('sbVersion')]",
+ "location": "[variables('location')]",
+ "scale": null,
+ "properties": {
+ "redisVersion": "3.2.7",
+ "sku": {
+ "name": "Standard",
+ "family": "C",
+ "capacity": 1
+ },
+ "enableNonSslPort": true,
+ "redisConfiguration": {
+ "maxclients": "1000",
+ "maxmemory-reserved": "50",
+ "maxfragmentationmemory-reserved": "50",
+ "maxmemory-policy": "volatile-lru",
+ "maxmemory-delta": "50"
+ }
+ }
+ }
+ ]
+}
\ No newline at end of file
diff --git a/deploy/az/redis/redisdeploy.parameters.json b/deploy/az/redis/redisdeploy.parameters.json
new file mode 100644
index 000000000..42d2e470e
--- /dev/null
+++ b/deploy/az/redis/redisdeploy.parameters.json
@@ -0,0 +1,9 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentParameters.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "namespaceprefix": {
+ "value": "eshopredis"
+ }
+ }
+}
\ No newline at end of file
diff --git a/deploy/az/servicebus/readme.md b/deploy/az/servicebus/readme.md
new file mode 100644
index 000000000..3ed8e8a0e
--- /dev/null
+++ b/deploy/az/servicebus/readme.md
@@ -0,0 +1,33 @@
+# Deploying Azure Service Bus
+
+The ARM template `sbusdeploy.json` and its parameter file (`sbusdeploy.parameters.json`) are used to deploy following resources:
+
+1. One Service Bus namespace
+2. One Service Bus
+3. Subscriptions used by application
+
+## Editing sbusdeploy.parameters.json file
+
+You can edit the `sbusdeploy.parameters.parameters.json` file to set your values, but is not needed. The only parameter than can
+be set is:
+
+1. `namespaceprefix` is a string that is used to create the namespace. ARM script creates unique values by appending a unique string to this parameter value, so you can leave the default value.
+
+## Deploy the template
+
+Once parameter file is edited you can deploy it using [create-resources script](../readme.md).
+
+i. e. if you are in windows, to deploy sql databases in a new resourcegroup located in westus, go to `deploy\az` folder and type:
+
+```
+create-resources.cmd servicebus\sbusdeploy newResourceGroup -c westus
+```
+
+
+
+
+
+
+
+
+
diff --git a/deploy/az/servicebus/sbusdeploy.json b/deploy/az/servicebus/sbusdeploy.json
new file mode 100644
index 000000000..50c1c6c54
--- /dev/null
+++ b/deploy/az/servicebus/sbusdeploy.json
@@ -0,0 +1,229 @@
+{
+ "$schema": "http://schema.management.azure.com/schemas/2014-04-01-preview/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "namespaceprefix": {
+ "type": "string",
+ "metadata": {
+ "description": "Name of the Service Bus namespace"
+ }
+ }
+ },
+ "variables": {
+ "serviceBusTopicName": "eshop_event_bus",
+ "BasketSubscriptionName": "Basket",
+ "CatalogSubscriptionName": "Catalog",
+ "OrderingSubscriptionName": "Ordering",
+ "LocationsSubscriptionName": "Locations",
+ "MarketingSubscriptionName": "Marketing",
+ "GracePeriodSubscriptionName": "GracePeriod",
+ "PaymentSubscriptionName": "Payment",
+ "location": "[resourceGroup().location]",
+ "sbVersion": "2015-08-01",
+ "defaultSASKeyName": "Root",
+ "namespace":"[concat(parameters('namespaceprefix'), uniqueString(resourceGroup().id))]",
+ "authRuleResourceId": "[resourceId('Microsoft.ServiceBus/namespaces/topics/authorizationRules', variables('namespace'), variables('serviceBusTopicName'), variables('defaultSASKeyName'))]"
+ },
+ "resources": [
+ {
+ "apiVersion": "[variables('sbVersion')]",
+ "name": "[variables('namespace')]",
+ "type": "Microsoft.ServiceBus/Namespaces",
+ "location": "[variables('location')]",
+ "sku": {
+ "name": "Standard",
+ "tier": "Standard"
+ },
+ "resources": [
+ {
+ "apiVersion": "[variables('sbVersion')]",
+ "name": "[variables('serviceBusTopicName')]",
+ "type": "Topics",
+ "dependsOn": [
+ "[concat('Microsoft.ServiceBus/namespaces/', variables('namespace'))]"
+ ],
+ "properties": {
+ "path": "[variables('serviceBusTopicName')]",
+ "defaultMessageTimeToLive": "14.00:00:00",
+ "maxSizeInMegabytes": 1024,
+ "requiresDuplicateDetection": false,
+ "enableBatchedOperations": true,
+ "sizeInBytes": 0,
+ "filteringMessagesBeforePublishing": false,
+ "isAnonymousAccessible": false,
+ "status": "Active",
+ "supportOrdering": false,
+ "autoDeleteOnIdle": "10675199.02:48:05.4775807",
+ "enablePartitioning": true,
+ "isExpress": false,
+ "enableSubscriptionPartitioning": false,
+ "enableExpress": false
+ },
+ "resources": [
+ {
+ "type": "AuthorizationRules",
+ "name": "[variables('defaultSASKeyName')]",
+ "apiVersion": "[variables('sbVersion')]",
+ "properties": {
+ "rights": [
+ "Manage",
+ "Send",
+ "Listen"
+ ]
+ },
+ "dependsOn": [
+ "[variables('serviceBusTopicName')]"
+ ]
+ },
+ {
+ "apiVersion": "[variables('sbVersion')]",
+ "name": "[variables('BasketSubscriptionName')]",
+ "type": "Subscriptions",
+ "dependsOn": [
+ "[variables('serviceBusTopicName')]"
+ ],
+ "properties": {
+ "lockDuration": "00:00:30",
+ "requiresSession": false,
+ "defaultMessageTimeToLive": "14.00:00:00",
+ "deadLetteringOnMessageExpiration": true,
+ "deadLetteringOnFilterEvaluationExceptions": true,
+ "maxDeliveryCount": 10,
+ "enableBatchedOperations": false,
+ "status": "Active",
+ "autoDeleteOnIdle": "10675199.02:48:05.4775807",
+ "entityAvailabilityStatus": "Available"
+ }
+ },
+ {
+ "apiVersion": "[variables('sbVersion')]",
+ "name": "[variables('OrderingSubscriptionName')]",
+ "type": "Subscriptions",
+ "dependsOn": [
+ "[variables('serviceBusTopicName')]"
+ ],
+ "properties": {
+ "lockDuration": "00:00:30",
+ "requiresSession": false,
+ "defaultMessageTimeToLive": "14.00:00:00",
+ "deadLetteringOnMessageExpiration": true,
+ "deadLetteringOnFilterEvaluationExceptions": true,
+ "maxDeliveryCount": 10,
+ "enableBatchedOperations": false,
+ "status": "Active",
+ "autoDeleteOnIdle": "10675199.02:48:05.4775807",
+ "entityAvailabilityStatus": "Available"
+ }
+ },
+ {
+ "apiVersion": "[variables('sbVersion')]",
+ "name": "[variables('CatalogSubscriptionName')]",
+ "type": "Subscriptions",
+ "dependsOn": [
+ "[variables('serviceBusTopicName')]"
+ ],
+ "properties": {
+ "lockDuration": "00:00:30",
+ "requiresSession": false,
+ "defaultMessageTimeToLive": "14.00:00:00",
+ "deadLetteringOnMessageExpiration": true,
+ "deadLetteringOnFilterEvaluationExceptions": true,
+ "maxDeliveryCount": 10,
+ "enableBatchedOperations": false,
+ "status": "Active",
+ "autoDeleteOnIdle": "10675199.02:48:05.4775807",
+ "entityAvailabilityStatus": "Available"
+ }
+ },
+ {
+ "apiVersion": "[variables('sbVersion')]",
+ "name": "[variables('LocationsSubscriptionName')]",
+ "type": "Subscriptions",
+ "dependsOn": [
+ "[variables('serviceBusTopicName')]"
+ ],
+ "properties": {
+ "lockDuration": "00:00:30",
+ "requiresSession": false,
+ "defaultMessageTimeToLive": "14.00:00:00",
+ "deadLetteringOnMessageExpiration": true,
+ "deadLetteringOnFilterEvaluationExceptions": true,
+ "maxDeliveryCount": 10,
+ "enableBatchedOperations": false,
+ "status": "Active",
+ "autoDeleteOnIdle": "10675199.02:48:05.4775807",
+ "entityAvailabilityStatus": "Available"
+ }
+ },
+ {
+ "apiVersion": "[variables('sbVersion')]",
+ "name": "[variables('MarketingSubscriptionName')]",
+ "type": "Subscriptions",
+ "dependsOn": [
+ "[variables('serviceBusTopicName')]"
+ ],
+ "properties": {
+ "lockDuration": "00:00:30",
+ "requiresSession": false,
+ "defaultMessageTimeToLive": "14.00:00:00",
+ "deadLetteringOnMessageExpiration": true,
+ "deadLetteringOnFilterEvaluationExceptions": true,
+ "maxDeliveryCount": 10,
+ "enableBatchedOperations": false,
+ "status": "Active",
+ "autoDeleteOnIdle": "10675199.02:48:05.4775807",
+ "entityAvailabilityStatus": "Available"
+ }
+ },
+ {
+ "apiVersion": "[variables('sbVersion')]",
+ "name": "[variables('GracePeriodSubscriptionName')]",
+ "type": "Subscriptions",
+ "dependsOn": [
+ "[variables('serviceBusTopicName')]"
+ ],
+ "properties": {
+ "lockDuration": "00:00:30",
+ "requiresSession": false,
+ "defaultMessageTimeToLive": "14.00:00:00",
+ "deadLetteringOnMessageExpiration": true,
+ "deadLetteringOnFilterEvaluationExceptions": true,
+ "maxDeliveryCount": 10,
+ "enableBatchedOperations": false,
+ "status": "Active",
+ "autoDeleteOnIdle": "10675199.02:48:05.4775807",
+ "entityAvailabilityStatus": "Available"
+ }
+ },
+ {
+ "apiVersion": "[variables('sbVersion')]",
+ "name": "[variables('PaymentSubscriptionName')]",
+ "type": "Subscriptions",
+ "dependsOn": [
+ "[variables('serviceBusTopicName')]"
+ ],
+ "properties": {
+ "lockDuration": "00:00:30",
+ "requiresSession": false,
+ "defaultMessageTimeToLive": "14.00:00:00",
+ "deadLetteringOnMessageExpiration": true,
+ "deadLetteringOnFilterEvaluationExceptions": true,
+ "maxDeliveryCount": 10,
+ "enableBatchedOperations": false,
+ "status": "Active",
+ "autoDeleteOnIdle": "10675199.02:48:05.4775807",
+ "entityAvailabilityStatus": "Available"
+ }
+ }
+ ]
+ }
+ ]
+ }
+ ],
+ "outputs": {
+ "NamespaceConnectionString": {
+ "type": "string",
+ "value": "[listkeys(variables('authRuleResourceId'), variables('sbVersion')).primaryConnectionString]"
+ }
+ }
+}
\ No newline at end of file
diff --git a/deploy/az/servicebus/sbusdeploy.parameters.json b/deploy/az/servicebus/sbusdeploy.parameters.json
new file mode 100644
index 000000000..f14b5329d
--- /dev/null
+++ b/deploy/az/servicebus/sbusdeploy.parameters.json
@@ -0,0 +1,9 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentParameters.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "namespaceprefix": {
+ "value": "eshopsb"
+ }
+ }
+}
diff --git a/deploy/az/sql/readme.md b/deploy/az/sql/readme.md
new file mode 100644
index 000000000..0359fb727
--- /dev/null
+++ b/deploy/az/sql/readme.md
@@ -0,0 +1,36 @@
+# Deploying SQL Server & SQL Databases
+
+The ARM template `sqldeploy.json` and its parameter file (`sqldeploy.parameters.json`) are used to deploy following resources:
+
+1. One SQL Server
+2. Three SQL databases (for ordering, catalog and identity) services.
+3. Firewall rules to **allow access from any IP to SQL Server**. This allows easy management, but is not desired in production environments.
+
+## Editing sqldeploy.parameters.json file
+
+You **must** edit the `sqldeploy.parameters.json` file to set login and password of the admin user.
+
+1. `sql_server` is a object parameter that contains the sql server name and the database names. You can leave default values if you want.
+2. `admin` is a string with the admin logon. You MUST provide a valid value
+3. `adminpwd` is a string with the admin password. You MUST provide a valid value
+
+ARM script ensures uniqueness of the SQL server created by appending one unique string in its name (defined in the `sql_server.name` parameter).
+
+## Deploy the template
+
+Once parameter file is edited you can deploy it using [create-resources script](../readme.md).
+i. e. if you are in windows, to deploy sql databases in a new resourcegroup located in westus, go to `deploy\az` folder and type:
+
+```
+create-resources.cmd sql\sqldeploy newResourceGroup -c westus
+```
+
+
+
+
+
+
+
+
+
+
diff --git a/deploy/az/sql/sqldeploy.json b/deploy/az/sql/sqldeploy.json
new file mode 100644
index 000000000..397c94ad6
--- /dev/null
+++ b/deploy/az/sql/sqldeploy.json
@@ -0,0 +1,123 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "sql_server": {
+ "type": "object"
+ },
+ "admin": {
+ "type": "string"
+ },
+ "adminpwd": {
+ "type": "string"
+ }
+ },
+ "variables": {
+ "sql_server_name": "[concat(parameters('sql_server').name, '-', uniqueString(resourceGroup().id))]",
+ "admin": "[parameters('admin')]",
+ "adminpwd": "[parameters('adminpwd')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Sql/servers",
+ "name": "[variables('sql_server_name')]",
+ "apiVersion": "2014-04-01-preview",
+ "location": "[resourceGroup().location]",
+ "properties": {
+ "administratorLogin": "[variables('admin')]",
+ "administratorLoginPassword": "[variables('adminpwd')]",
+ "version": "12.0"
+ },
+ "resources": [
+ {
+ "type": "databases",
+ "name": "[parameters('sql_server').dbs.ordering]",
+ "apiVersion": "2014-04-01-preview",
+ "location": "[resourceGroup().location]",
+ "properties": {
+ "edition": "Standard",
+ "collation": "SQL_Latin1_General_CP1_CI_AS",
+ "maxSizeBytes": "1073741824",
+ "requestedServiceObjectiveName": "S1"
+ },
+ "dependsOn": [
+ "[concat('Microsoft.Sql/servers/', variables('sql_server_name'))]"
+ ]
+ },
+ {
+ "type": "databases",
+ "name": "[parameters('sql_server').dbs.identity]",
+ "apiVersion": "2014-04-01-preview",
+ "location": "[resourceGroup().location]",
+ "properties": {
+ "edition": "Standard",
+ "collation": "SQL_Latin1_General_CP1_CI_AS",
+ "maxSizeBytes": "1073741824",
+ "requestedServiceObjectiveName": "S1"
+ },
+ "dependsOn": [
+ "[concat('Microsoft.Sql/servers/', variables('sql_server_name'))]"
+ ]
+ },
+ {
+ "type": "databases",
+ "name": "[parameters('sql_server').dbs.catalog]",
+ "apiVersion": "2014-04-01-preview",
+ "location": "[resourceGroup().location]",
+ "properties": {
+ "edition": "Standard",
+ "collation": "SQL_Latin1_General_CP1_CI_AS",
+ "maxSizeBytes": "1073741824",
+ "requestedServiceObjectiveName": "S1"
+ },
+ "dependsOn": [
+ "[concat('Microsoft.Sql/servers/', variables('sql_server_name'))]"
+ ]
+ },
+ {
+ "type": "databases",
+ "name": "[parameters('sql_server').dbs.marketing]",
+ "apiVersion": "2014-04-01-preview",
+ "location": "[resourceGroup().location]",
+ "properties": {
+ "edition": "Standard",
+ "collation": "SQL_Latin1_General_CP1_CI_AS",
+ "maxSizeBytes": "1073741824",
+ "requestedServiceObjectiveName": "S1"
+ },
+ "dependsOn": [
+ "[concat('Microsoft.Sql/servers/', variables('sql_server_name'))]"
+ ]
+ },
+ {
+ "type": "firewallrules",
+ "name": "AllowAllWindowsAzureIps",
+ "apiVersion": "2014-04-01-preview",
+ "location": "[resourceGroup().location]",
+ "properties": {
+ "startIpAddress": "0.0.0.0",
+ "endIpAddress": "0.0.0.0"
+ },
+ "dependsOn": [
+ "[concat('Microsoft.Sql/servers/', variables('sql_server_name'))]"
+ ]
+ },
+ {
+ "type": "firewallrules",
+ "name": "AllConnectionsAllowed",
+ "apiVersion": "2014-04-01-preview",
+ "location": "[resourceGroup().location]",
+ "properties": {
+ "startIpAddress": "0.0.0.0",
+ "endIpAddress": "255.255.255.255"
+ },
+ "dependsOn": [
+ "[concat('Microsoft.Sql/servers/', variables('sql_server_name'))]"
+ ]
+ }
+ ]
+ }
+ ],
+ "outputs": {
+ }
+}
diff --git a/deploy/az/sql/sqldeploy.parameters.json b/deploy/az/sql/sqldeploy.parameters.json
new file mode 100644
index 000000000..982e78f4c
--- /dev/null
+++ b/deploy/az/sql/sqldeploy.parameters.json
@@ -0,0 +1,23 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentParameters.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "sql_server": {
+ "value": {
+ "name": "eshopsql",
+ "dbs": {
+ "ordering": "orderingdb",
+ "identity": "identitydb",
+ "catalog": "catalogdb",
+ "marketing": "marketingdb"
+ }
+ }
+ },
+ "admin": {
+ "value": null
+ },
+ "adminpwd": {
+ "value": null
+ }
+ }
+}
\ No newline at end of file
diff --git a/deploy/az/storage/catalog/deploystorage.json b/deploy/az/storage/catalog/deploystorage.json
new file mode 100644
index 000000000..e3fced6b2
--- /dev/null
+++ b/deploy/az/storage/catalog/deploystorage.json
@@ -0,0 +1,91 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "catalogstorage": {
+ "type": "string"
+ },
+ "profileName" : {
+ "type": "string"
+ }
+ },
+ "variables": {
+ "catalogstorage": "[concat(parameters('catalogstorage'), uniqueString(resourceGroup().id))]",
+ "endpointName": "[concat('endpoint-', uniqueString(resourceGroup().id))]",
+ "profileName": "[parameters('profileName')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Storage/storageAccounts",
+ "name": "[variables('catalogstorage')]",
+ "apiVersion": "2016-01-01",
+ "location": "[resourceGroup().location]",
+ "tags": {
+ "displayName": "[variables('catalogstorage')]"
+ },
+ "sku": {
+ "name": "Standard_LRS"
+ },
+ "kind": "Storage"
+ },
+ {
+ "name": "[variables('profileName')]",
+ "type": "Microsoft.Cdn/profiles",
+ "location": "[resourceGroup().location]",
+ "apiVersion": "2016-04-02",
+ "tags": {
+ "displayName": "[variables('profileName')]"
+ },
+ "sku": {
+ "name": "Standard_Verizon"
+ },
+ "resources": [
+ {
+ "apiVersion": "2016-04-02",
+ "name": "[variables('endpointName')]",
+ "type": "endpoints",
+ "dependsOn": [
+ "[variables('profileName')]",
+ "[variables('catalogstorage')]"
+ ],
+ "location": "[resourceGroup().location]",
+ "tags": {
+ "displayName": "[variables('endpointName')]"
+ },
+ "properties": {
+ "originHostHeader": "[replace(replace(reference(resourceId('Microsoft.Storage/storageAccounts', variables('catalogstorage')),'2015-06-15' ).primaryEndpoints.blob,'https://',''),'/','')]",
+ "isHttpAllowed": true,
+ "isHttpsAllowed": true,
+ "queryStringCachingBehavior": "IgnoreQueryString",
+ "contentTypesToCompress": [
+ "text/plain",
+ "text/html",
+ "text/css",
+ "application/x-javascript",
+ "text/javascript"
+ ],
+ "isCompressionEnabled": "True",
+ "origins": [
+ {
+ "name": "origin1",
+ "properties": {
+ "hostName": "[replace(replace(reference(resourceId('Microsoft.Storage/storageAccounts', variables('catalogstorage')),'2015-06-15' ).primaryEndpoints.blob,'https://',''),'/','')]"
+ }
+ }
+ ]
+ }
+ }
+ ]
+ }
+ ],
+ "outputs": {
+ "hostName": {
+ "type": "string",
+ "value": "[reference(resourceId('Microsoft.cdn/profiles/endpoints', variables('profileName'), variables('endpointName'))).hostName]"
+ },
+ "originHostHeader": {
+ "type": "string",
+ "value": "[reference(resourceId('Microsoft.cdn/profiles/endpoints', variables('profileName'), variables('endpointName'))).originHostHeader]"
+ }
+ }
+}
\ No newline at end of file
diff --git a/deploy/az/storage/catalog/deploystorage.parameters.json b/deploy/az/storage/catalog/deploystorage.parameters.json
new file mode 100644
index 000000000..2c5256a09
--- /dev/null
+++ b/deploy/az/storage/catalog/deploystorage.parameters.json
@@ -0,0 +1,12 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentParameters.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "catalogstorage": {
+ "value": "catalog"
+ },
+ "profileName":{
+ "value": "eshopcatalog"
+ }
+ }
+}
\ No newline at end of file
diff --git a/deploy/az/storage/marketing/deploystorage.json b/deploy/az/storage/marketing/deploystorage.json
new file mode 100644
index 000000000..cceb524d0
--- /dev/null
+++ b/deploy/az/storage/marketing/deploystorage.json
@@ -0,0 +1,91 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "marketingstorage": {
+ "type": "string"
+ },
+ "profileName" : {
+ "type": "string"
+ }
+ },
+ "variables": {
+ "marketingstorage": "[concat(parameters('marketingstorage'), uniqueString(resourceGroup().id))]",
+ "endpointName": "[concat('endpoint-', uniqueString(resourceGroup().id))]",
+ "profileName": "[parameters('profileName')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Storage/storageAccounts",
+ "name": "[variables('marketingstorage')]",
+ "apiVersion": "2016-01-01",
+ "location": "[resourceGroup().location]",
+ "tags": {
+ "displayName": "[variables('marketingstorage')]"
+ },
+ "sku": {
+ "name": "Standard_LRS"
+ },
+ "kind": "Storage"
+ },
+ {
+ "name": "[variables('profileName')]",
+ "type": "Microsoft.Cdn/profiles",
+ "location": "[resourceGroup().location]",
+ "apiVersion": "2016-04-02",
+ "tags": {
+ "displayName": "[variables('profileName')]"
+ },
+ "sku": {
+ "name": "Standard_Verizon"
+ },
+ "resources": [
+ {
+ "apiVersion": "2016-04-02",
+ "name": "[variables('endpointName')]",
+ "type": "endpoints",
+ "dependsOn": [
+ "[variables('profileName')]",
+ "[variables('marketingstorage')]"
+ ],
+ "location": "[resourceGroup().location]",
+ "tags": {
+ "displayName": "[variables('endpointName')]"
+ },
+ "properties": {
+ "originHostHeader": "[replace(replace(reference(resourceId('Microsoft.Storage/storageAccounts', variables('marketingstorage')),'2015-06-15' ).primaryEndpoints.blob,'https://',''),'/','')]",
+ "isHttpAllowed": true,
+ "isHttpsAllowed": true,
+ "queryStringCachingBehavior": "IgnoreQueryString",
+ "contentTypesToCompress": [
+ "text/plain",
+ "text/html",
+ "text/css",
+ "application/x-javascript",
+ "text/javascript"
+ ],
+ "isCompressionEnabled": "True",
+ "origins": [
+ {
+ "name": "origin1",
+ "properties": {
+ "hostName": "[replace(replace(reference(resourceId('Microsoft.Storage/storageAccounts', variables('marketingstorage')),'2015-06-15' ).primaryEndpoints.blob,'https://',''),'/','')]"
+ }
+ }
+ ]
+ }
+ }
+ ]
+ }
+ ],
+ "outputs": {
+ "hostName": {
+ "type": "string",
+ "value": "[reference(resourceId('Microsoft.cdn/profiles/endpoints', variables('profileName'), variables('endpointName'))).hostName]"
+ },
+ "originHostHeader": {
+ "type": "string",
+ "value": "[reference(resourceId('Microsoft.cdn/profiles/endpoints', variables('profileName'), variables('endpointName'))).originHostHeader]"
+ }
+ }
+}
\ No newline at end of file
diff --git a/deploy/az/storage/marketing/deploystorage.parameters.json b/deploy/az/storage/marketing/deploystorage.parameters.json
new file mode 100644
index 000000000..1608fd34a
--- /dev/null
+++ b/deploy/az/storage/marketing/deploystorage.parameters.json
@@ -0,0 +1,12 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentParameters.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "marketingstorage": {
+ "value": "marketing"
+ },
+ "profileName":{
+ "value": "eshopmarketing"
+ }
+ }
+}
\ No newline at end of file
diff --git a/deploy/az/vms/docker-machine.md b/deploy/az/vms/docker-machine.md
new file mode 100644
index 000000000..71cbbd4a7
--- /dev/null
+++ b/deploy/az/vms/docker-machine.md
@@ -0,0 +1,48 @@
+# Create a VM using docker-machine
+
+Ensure you are logged in the desired subscription Refer to [this article](https://docs.microsoft.com/en-us/cli/azure/authenticate-azure-cli) for more details.
+
+1. Use `az account show` to find your subscription id.
+2. Use `docker-machine create --driver azure --azure-subscription-id --azure-resource-group --azure-ssh-user `
+
+After use `docker-machine create` you'll need to authenticate in Azure (even thought if you are logged using `az`, because this is not an Azure CLI 2.0 command). This command will fully create the VM with all the needed settings to run Docker.
+
+**Note** Refer to this article with all the [parameters that docker-machine accepts when creating Azure VMs](https://docs.docker.com/machine/drivers/azure/#options) for finding more parameters.
+
+## Connecting your local environment with docker host running on the VM
+
+Using docker-machine you control the remote VM from your local development environment (you don't need to use ssh to login to remote VM).
+
+Connecting your local environment to a remote host is using by setting some environment variables, but the easiest way is to use again the docker-machine command. Just type `docker-machine env machine_name` (where machine_name is the name you gave when you created the VM). That command **do not change anything**, so do'nt do really nothing, but **outputs the environment variables you have to set**. This is the output of the command (running on a windows workstation):
+
+```
+SET DOCKER_TLS_VERIFY=1
+SET DOCKER_HOST=tcp://104.42.236.237:2376
+SET DOCKER_CERT_PATH=C:\Users\etoma\.docker\machine\machines\ufohost
+SET DOCKER_MACHINE_NAME=ufohost
+SET COMPOSE_CONVERT_WINDOWS_PATHS=true
+REM Run this command to configure your shell:
+REM @FOR /f "tokens=*" %i IN ('docker-machine env ufohost') DO @%i
+```
+
+You have to set all these environment variables, or (as the command suggest) just copy and paste the last line in your terminal.
+
+Once you did this, your local development machine is connected to VM running Docker on Azure: all docker and docker-compose commands will run in the VM instead of your local Docker machine!
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/deploy/az/vms/linux-vm/linuxvm.json b/deploy/az/vms/linux-vm/linuxvm.json
new file mode 100644
index 000000000..5b4778ebe
--- /dev/null
+++ b/deploy/az/vms/linux-vm/linuxvm.json
@@ -0,0 +1,199 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "newStorageAccountName": {
+ "type": "string",
+ "metadata": {
+ "description": "Unique DNS Name for the Storage Account where the Virtual Machine's disks will be placed."
+ }
+ },
+ "adminUsername": {
+ "type": "string",
+ "metadata": {
+ "description": "Username for the Virtual Machine."
+ }
+ },
+ "adminPassword": {
+ "type": "securestring",
+ "metadata": {
+ "description": "Password for the Virtual Machine."
+ }
+ },
+ "dnsNameForPublicIP": {
+ "type": "string",
+ "metadata": {
+ "description": "Unique DNS Name for the Public IP used to access the Virtual Machine."
+ }
+ },
+ "ubuntuOSVersion": {
+ "type": "string",
+ "defaultValue": "14.04.4-LTS",
+ "metadata": {
+ "description": "The Ubuntu version for deploying the Docker containers. This will pick a fully patched image of this given Ubuntu version. Allowed values: 14.04.4-LTS, 15.10, 16.04.0-LTS"
+ },
+ "allowedValues": [
+ "14.04.4-LTS",
+ "15.10",
+ "16.04.0-LTS"
+ ]
+ },
+ "VMName": {
+ "type": "string",
+ "metadata": {
+ "description": "Name of VM in Azure"
+ }
+ }
+ },
+ "variables": {
+ "newStorageAccountName": "[take(concat(parameters('newStorageAccountName'), uniqueString(resourceGroup().id)), 23)]",
+ "dnsNameForPublicIP": "[concat(parameters('dnsNameForPublicIP'), uniqueString(resourceGroup().id))]",
+ "imagePublisher": "Canonical",
+ "imageOffer": "UbuntuServer",
+ "OSDiskName": "osdiskfordockersimple",
+ "nicName": "myVMNicD",
+ "extensionName": "DockerExtension",
+ "addressPrefix": "10.0.0.0/16",
+ "subnetName": "Subnet",
+ "subnetPrefix": "10.0.0.0/24",
+ "storageAccountType": "Standard_LRS",
+ "publicIPAddressName": "myPublicIPD",
+ "publicIPAddressType": "Dynamic",
+ "vmStorageAccountContainerName": "vhds",
+ "vmName": "[parameters('VMName')]",
+ "vmSize": "Standard_F1",
+ "virtualNetworkName": "MyVNETD",
+ "vnetID": "[resourceId('Microsoft.Network/virtualNetworks',variables('virtualNetworkName'))]",
+ "subnetRef": "[concat(variables('vnetID'),'/subnets/',variables('subnetName'))]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Storage/storageAccounts",
+ "name": "[variables('newStorageAccountName')]",
+ "apiVersion": "2015-05-01-preview",
+ "location": "[resourceGroup().location]",
+ "properties": {
+ "accountType": "[variables('storageAccountType')]"
+ }
+ },
+ {
+ "apiVersion": "2015-05-01-preview",
+ "type": "Microsoft.Network/publicIPAddresses",
+ "name": "[variables('publicIPAddressName')]",
+ "location": "[resourceGroup().location]",
+ "properties": {
+ "publicIPAllocationMethod": "[variables('publicIPAddressType')]",
+ "dnsSettings": {
+ "domainNameLabel": "[variables('dnsNameForPublicIP')]"
+ }
+ }
+ },
+ {
+ "apiVersion": "2015-05-01-preview",
+ "type": "Microsoft.Network/virtualNetworks",
+ "name": "[variables('virtualNetworkName')]",
+ "location": "[resourceGroup().location]",
+ "properties": {
+ "addressSpace": {
+ "addressPrefixes": [
+ "[variables('addressPrefix')]"
+ ]
+ },
+ "subnets": [
+ {
+ "name": "[variables('subnetName')]",
+ "properties": {
+ "addressPrefix": "[variables('subnetPrefix')]"
+ }
+ }
+ ]
+ }
+ },
+ {
+ "apiVersion": "2015-05-01-preview",
+ "type": "Microsoft.Network/networkInterfaces",
+ "name": "[variables('nicName')]",
+ "location": "[resourceGroup().location]",
+ "dependsOn": [
+ "[concat('Microsoft.Network/publicIPAddresses/', variables('publicIPAddressName'))]",
+ "[concat('Microsoft.Network/virtualNetworks/', variables('virtualNetworkName'))]"
+ ],
+ "properties": {
+ "ipConfigurations": [
+ {
+ "name": "ipconfig1",
+ "properties": {
+ "privateIPAllocationMethod": "Dynamic",
+ "publicIPAddress": {
+ "id": "[resourceId('Microsoft.Network/publicIPAddresses',variables('publicIPAddressName'))]"
+ },
+ "subnet": {
+ "id": "[variables('subnetRef')]"
+ }
+ }
+ }
+ ]
+ }
+ },
+ {
+ "apiVersion": "2015-05-01-preview",
+ "type": "Microsoft.Compute/virtualMachines",
+ "name": "[variables('vmName')]",
+ "location": "[resourceGroup().location]",
+ "dependsOn": [
+ "[concat('Microsoft.Storage/storageAccounts/', variables('newStorageAccountName'))]",
+ "[concat('Microsoft.Network/networkInterfaces/', variables('nicName'))]"
+ ],
+ "properties": {
+ "hardwareProfile": {
+ "vmSize": "[variables('vmSize')]"
+ },
+ "osProfile": {
+ "computerName": "[variables('vmName')]",
+ "adminUsername": "[parameters('adminUsername')]",
+ "adminPassword": "[parameters('adminPassword')]"
+ },
+ "storageProfile": {
+ "imageReference": {
+ "publisher": "[variables('imagePublisher')]",
+ "offer": "[variables('imageOffer')]",
+ "sku": "[parameters('ubuntuOSVersion')]",
+ "version": "latest"
+ },
+ "osDisk": {
+ "name": "osdisk1",
+ "vhd": {
+ "uri": "[concat('http://',variables('newStorageAccountName'),'.blob.core.windows.net/',variables('vmStorageAccountContainerName'),'/',variables('OSDiskName'),'.vhd')]"
+ },
+ "caching": "ReadWrite",
+ "createOption": "FromImage"
+ }
+ },
+ "networkProfile": {
+ "networkInterfaces": [
+ {
+ "id": "[resourceId('Microsoft.Network/networkInterfaces',variables('nicName'))]"
+ }
+ ]
+ }
+ }
+ },
+ {
+ "type": "Microsoft.Compute/virtualMachines/extensions",
+ "name": "[concat(variables('vmName'),'/', variables('extensionName'))]",
+ "apiVersion": "2015-05-01-preview",
+ "location": "[resourceGroup().location]",
+ "dependsOn": [
+ "[concat('Microsoft.Compute/virtualMachines/', variables('vmName'))]"
+ ],
+ "properties": {
+ "publisher": "Microsoft.Azure.Extensions",
+ "type": "DockerExtension",
+ "typeHandlerVersion": "1.0",
+ "autoUpgradeMinorVersion": true,
+ "settings": { }
+ }
+ }
+ ]
+}
+
diff --git a/deploy/az/vms/linux-vm/linuxvm.parameters.json b/deploy/az/vms/linux-vm/linuxvm.parameters.json
new file mode 100644
index 000000000..d34dfd1d9
--- /dev/null
+++ b/deploy/az/vms/linux-vm/linuxvm.parameters.json
@@ -0,0 +1,7 @@
+{
+ "newStorageAccountName": { "value": "eshopsrvmvstorage" },
+ "adminUsername": { "value": "eshop" },
+ "adminPassword": { "value": "Pass@word" },
+ "dnsNameForPublicIP": { "value": "eshop-srv" },
+ "VMName": {"value": "MyDockerVM2"}
+}
diff --git a/deploy/az/vms/plain-vm.md b/deploy/az/vms/plain-vm.md
new file mode 100644
index 000000000..4e06ed0d3
--- /dev/null
+++ b/deploy/az/vms/plain-vm.md
@@ -0,0 +1,77 @@
+# Deploy a VM to run the services
+
+Follow these instructions to deploy a Linux-based VM with the Docker Host installed, or a VM with Windows Server 2016 plus
+windows containers and Docker Daemon.
+
+**Note**: Use this option, only if you want to provide an environment using images pulled from DockerHub (for example, to create a test environment). If you want to
+be able to deploy images built by yourself (but not pushed to DockerHub) follow the [instructions about using docker-machine](./docker-machine.md).
+
+You can use this machine to install the microservices and having a "development" environment (useful to develop and test the client apps).
+
+Please note that this deployment is not a production deployment. In a production-based scenario, you should deploy all containers in ACS.
+
+## Create the VM
+
+Ensure you are logged in the desired subscription (use `az login` and `az account set` if needed. Refer to [this article](https://docs.microsoft.com/en-us/cli/azure/authenticate-azure-cli) for more details.
+
+Go to `linux-vm` or `win-vm` folder (based on if you want a Linux or Windows VM). Then:
+
+1. Edit the file `linuxvm.parameters.json` or `windowsvm.parameters.json` (based on what VM do you want to create) with your desired values
+2. Run the [create-resources script](../readme.md) to deploy the desired template (`linux-vm/linuxvm.json` or `win-vm/windowsvm.json`).
+
+I. e. if you are in Windows and want to deploy a linux based VM, in a new resourcegroup located in westus, go to `deploy\az` folder and type:
+
+```
+create-resources.cmd vms\linux-vm\linuxvm newResourceGroup -c westus
+```
+
+**Note:** To avoid errors, ARM template used generates unique names for:
+
+1. VM used storage
+2. Public DNS
+
+Those public names are based on the parameters set in the parameters file.
+
+### The parameters file (linuxvm.parameters.json or winsowsvm.parameters.json)
+
+Both files are identical and contains the minimum set of parameters needed by the ARM template to deploy the VM. ARM template accepts some other parameters (set with default values). Look the template for more info.
+
+The parameters defined are:
+
+1. `newStorageAccountName`: Name of the storage created for the VM. To ensure uniqueness a unique suffix will be added to this value.
+2. `adminUsername`: Admin login
+3. `adminPassword`: Admin password
+4. `dnsNameForPublicIP`: DNS of the VM. To ensure uniqueness a unique suffix will be added to this value.
+5. `VMName`: Name of the VM inside Azure
+
+## Finding the IP and DNS of the VM
+
+To find the IP and FQDN of the VM you can type `az vm list --resource-group --output table --show-details` (where resourcegroup is the
+name of the resourcegroup where you created the VM). This command will generate output like:
+
+```
+Name ResourceGroup PowerState PublicIps Fqdns Location
+---------- --------------- ------------ ------------- ------------------------------------------------ ----------
+MyDockerVM MyResourceGroup VM running xx.xx.xxx.xxx eshop-srvxxxxxxxxxxxxx.westus.cloudapp.azure.com westus
+```
+
+You can use this information to connect your new VM.
+
+## Deploy services in the VM
+
+We are providing public images of the services in DockerHub (https://hub.docker.com/u/eshop/). To use these images, just create a folder in the VM and copy
+following files to it (those files are in the root of the repo):
+
+1. `docker-compose.nobuild.yml`
+2. `docker-compose.prod.yml`
+
+**Note:** The `docker-compose.nobuild.yml` is just a version of the `docker-compose.yml` without the `build` section. Is neede due [docker-compose bug](https://github.com/docker/compose/issues/2945).
+
+Then log into the VM and run the command `docker-compose -f docker-compose.nobuild.yml -f docker-compose.prod.yml up --no-build -d` to start all the microservices.
+
+
+
+
+
+
+
diff --git a/deploy/az/vms/readme.md b/deploy/az/vms/readme.md
new file mode 100644
index 000000000..25085f75c
--- /dev/null
+++ b/deploy/az/vms/readme.md
@@ -0,0 +1,10 @@
+## Create VM with Docker installed
+
+There are two options for creating VM machines with Docker installed:
+
+1. [Deploying a Linux VM to run single-server development environment using docker-machine (**Recommended for development environments**)](./docker-machine.md)
+2. [Deploying a Linux VM or Windows Server 2016 to run a single-server development environment using ARM template (**Recommended for creating testing environments**)](./plain-vm.md)
+
+If you want to create a VM for deploying images you build locally, then use the first option.
+
+If you want to create a VM to run images deployed to DockerHub (to provide some test environment) then use the second option.
\ No newline at end of file
diff --git a/deploy/az/vms/win-vm/windowsvm.json b/deploy/az/vms/win-vm/windowsvm.json
new file mode 100644
index 000000000..78bebdfef
--- /dev/null
+++ b/deploy/az/vms/win-vm/windowsvm.json
@@ -0,0 +1,290 @@
+{
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+
+ "VMName": {
+ "type": "string",
+ "metadata": {
+ "description": "This name will also be used to prefix the network security group, storage, virtual network, network card, subnet and public IP address name."
+ }
+ },
+
+ "adminUsername": {
+ "type": "string",
+ "metadata": {
+ "description": "Username for the Virtual Machine."
+ }
+ },
+
+ "adminPassword": {
+ "type": "securestring",
+ "metadata": {
+ "description": "Password for the Virtual Machine."
+ }
+ },
+
+ "dnsNameForPublicIP": {
+ "type": "string",
+ "metadata": {
+ "description": "Unique DNS Name for the Public IP used to access the Virtual Machine."
+ }
+ },
+
+ "newStorageAccountName": {
+ "type": "string",
+ "metadata": {
+ "description": "Storage name for the Virtual Machine."
+ }
+ },
+ "vmSize": {
+ "type": "string",
+ "defaultValue": "Standard_D1",
+ "metadata": {
+ "description": "VM Size"
+ }
+ }
+ },
+
+ "variables": {
+ "newStorageAccountName": "[take(concat(parameters('newStorageAccountName'), uniqueString(resourceGroup().id)), 23)]",
+ "dnsNameForPublicIP": "[concat(parameters('dnsNameForPublicIP'), uniqueString(resourceGroup().id))]",
+ "windowsOSVersion": "2016-Datacenter",
+ "imagePublisher": "MicrosoftWindowsServer",
+ "imageOffer": "WindowsServer",
+ "OSDiskName": "[concat(parameters('VMName'),'_osdisk')]",
+ "nicName": "[concat(parameters('VMName'),'_nic')]",
+ "addressPrefix": "10.0.0.0/16",
+ "subnetName": "[concat(parameters('VMName'),'_subnet')]",
+ "subnetPrefix": "10.0.0.0/24",
+ "networkSecurityGroupName": "[concat(parameters('VMName'),'_nsg')]",
+ "storageAccountType": "Standard_LRS",
+ "publicIPAddressName": "[concat(parameters('VMName'),'_pubip')]",
+ "publicIPAddressType": "Dynamic",
+ "vmStorageAccountContainerName": "vhds",
+ "apiVersion": "2015-05-01-preview",
+ "virtualNetworkName": "[concat(parameters('VMName'),'_vnet')]",
+ "vnetID": "[resourceId('Microsoft.Network/virtualNetworks',variables('virtualNetworkName'))]",
+ "subnetRef": "[concat(variables('vnetID'),'/subnets/',variables('subnetName'))]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Network/networkSecurityGroups",
+ "name": "[variables('networkSecurityGroupName')]",
+ "apiVersion": "[variables('apiVersion')]",
+ "location": "[resourceGroup().location]",
+ "properties": {
+ "securityRules": [
+ {
+ "name": "HTTP",
+ "properties": {
+ "description": "HTTP",
+ "protocol": "Tcp",
+ "sourcePortRange": "*",
+ "destinationPortRange": "80",
+ "sourceAddressPrefix": "*",
+ "destinationAddressPrefix": "*",
+ "access": "Allow",
+ "priority": 100,
+ "direction": "Inbound"
+ }
+ },
+
+ {
+ "name": "RDP",
+ "properties": {
+ "description": "RDP",
+ "protocol": "Tcp",
+ "sourcePortRange": "*",
+ "destinationPortRange": "3389",
+ "sourceAddressPrefix": "*",
+ "destinationAddressPrefix": "*",
+ "access": "Allow",
+ "priority": 200,
+ "direction": "Inbound"
+ }
+ },
+
+ {
+ "name": "Docker",
+ "properties": {
+ "description": "Docker",
+ "protocol": "Tcp",
+ "sourcePortRange": "*",
+ "destinationPortRange": "2375",
+ "sourceAddressPrefix": "*",
+ "destinationAddressPrefix": "*",
+ "access": "Allow",
+ "priority": 300,
+ "direction": "Inbound"
+ }
+ }
+
+ ]
+ }
+ },
+
+ {
+ "type": "Microsoft.Storage/storageAccounts",
+ "name": "[variables('newStorageAccountName')]",
+ "apiVersion": "[variables('apiVersion')]",
+ "location": "[resourceGroup().location]",
+ "tags": {
+ "displayName": "StorageAccount"
+ },
+ "properties": {
+ "accountType": "[variables('storageAccountType')]"
+ }
+ },
+
+ {
+ "apiVersion": "[variables('apiVersion')]",
+ "type": "Microsoft.Network/publicIPAddresses",
+ "name": "[variables('publicIPAddressName')]",
+ "location": "[resourceGroup().location]",
+ "tags": {
+ "displayName": "PublicIPAddress"
+ },
+ "properties": {
+ "publicIPAllocationMethod": "[variables('publicIPAddressType')]",
+ "dnsSettings": {
+ "domainNameLabel": "[tolower(variables('dnsNameForPublicIP'))]"
+ }
+ }
+ },
+
+ {
+ "apiVersion": "[variables('apiVersion')]",
+ "type": "Microsoft.Network/virtualNetworks",
+ "name": "[variables('virtualNetworkName')]",
+ "location": "[resourceGroup().location]",
+ "dependsOn": [
+ "[concat('Microsoft.Network/networkSecurityGroups/', variables('networkSecurityGroupName'))]"
+ ],
+ "tags": {
+ "displayName": "VirtualNetwork"
+ },
+ "properties": {
+ "addressSpace": {
+ "addressPrefixes": [
+ "[variables('addressPrefix')]"
+ ]
+ },
+ "subnets": [
+ {
+ "name": "[variables('subnetName')]",
+ "properties": {
+ "addressPrefix": "[variables('subnetPrefix')]",
+ "networkSecurityGroup": {
+ "id": "[resourceId('Microsoft.Network/networkSecurityGroups', variables('networkSecurityGroupName'))]"
+ }
+ }
+ }
+ ]
+ }
+ },
+
+ {
+ "apiVersion": "[variables('apiVersion')]",
+ "type": "Microsoft.Network/networkInterfaces",
+ "name": "[variables('nicName')]",
+ "location": "[resourceGroup().location]",
+ "tags": {
+ "displayName": "NetworkInterface"
+ },
+ "dependsOn": [
+ "[concat('Microsoft.Network/publicIPAddresses/', variables('publicIPAddressName'))]",
+ "[concat('Microsoft.Network/virtualNetworks/', variables('virtualNetworkName'))]"
+ ],
+ "properties": {
+ "ipConfigurations": [
+ {
+ "name": "ipconfig1",
+ "properties": {
+ "privateIPAllocationMethod": "Dynamic",
+ "publicIPAddress": {
+ "id": "[resourceId('Microsoft.Network/publicIPAddresses',variables('publicIPAddressName'))]"
+ },
+ "subnet": {
+ "id": "[variables('subnetRef')]"
+ }
+ }
+ }
+ ]
+ }
+ },
+
+ {
+ "apiVersion": "[variables('apiVersion')]",
+ "type": "Microsoft.Compute/virtualMachines",
+ "name": "[parameters('VMName')]",
+ "location": "[resourceGroup().location]",
+ "tags": {
+ "displayName": "VirtualMachine"
+ },
+ "dependsOn": [
+ "[concat('Microsoft.Storage/storageAccounts/', variables('newStorageAccountName'))]",
+ "[concat('Microsoft.Network/networkInterfaces/', variables('nicName'))]"
+ ],
+ "properties": {
+ "hardwareProfile": {
+ "vmSize": "[parameters('vmSize')]"
+ },
+ "osProfile": {
+ "computername": "[parameters('VMName')]",
+ "adminUsername": "[parameters('adminUsername')]",
+ "adminPassword": "[parameters('adminPassword')]"
+ },
+ "storageProfile": {
+ "imageReference": {
+ "publisher": "[variables('imagePublisher')]",
+ "offer": "[variables('imageOffer')]",
+ "sku": "[variables('windowsOSVersion')]",
+ "version": "latest"
+ },
+ "osDisk": {
+ "name": "osdisk",
+ "vhd": {
+ "uri": "[concat(reference(concat('Microsoft.Storage/storageAccounts/', variables('newStorageAccountName')), variables('apiVersion')).primaryEndpoints.blob, variables('vmStorageAccountContainerName'),'/',variables('OSDiskName'),'.vhd')]"
+ },
+ "caching": "ReadWrite",
+ "createOption": "FromImage"
+ }
+ },
+ "networkProfile": {
+ "networkInterfaces": [
+ {
+ "id": "[resourceId('Microsoft.Network/networkInterfaces',variables('nicName'))]"
+ }
+ ]
+ }
+ },
+ "resources": [
+ {
+ "name": "containerConfiguration",
+ "type": "extensions",
+ "location": "[resourceGroup().location]",
+ "apiVersion": "2015-06-15",
+ "dependsOn": [
+ "[concat('Microsoft.Compute/virtualMachines/', parameters('VMName'))]"
+ ],
+ "tags": {
+ "displayName": "containerConfiguration"
+ },
+ "properties": {
+ "publisher": "Microsoft.Compute",
+ "type": "CustomScriptExtension",
+ "typeHandlerVersion": "1.2",
+ "autoUpgradeMinorVersion": true,
+ "settings": {
+ "fileUris": [
+ "https://raw.githubusercontent.com/Azure/azure-quickstart-templates/master/windows-server-containers-preview/azure-containers.ps1"
+ ],
+ "commandToExecute": "[concat('powershell.exe -ExecutionPolicy Unrestricted -File azure-containers.ps1 -adminuser ',parameters('adminUsername'))]"
+ }
+ }
+ }
+ ]
+ }
+ ]
+}
\ No newline at end of file
diff --git a/deploy/az/vms/win-vm/windowsvm.parameters.json b/deploy/az/vms/win-vm/windowsvm.parameters.json
new file mode 100644
index 000000000..7a2773a54
--- /dev/null
+++ b/deploy/az/vms/win-vm/windowsvm.parameters.json
@@ -0,0 +1,7 @@
+{
+ "newStorageAccountName": { "value": "eshopsrvmvstoragewin" },
+ "adminUsername": { "value": "eshop" },
+ "adminPassword": { "value": "Pass@word" },
+ "dnsNameForPublicIP": { "value": "eshop-srv-win" },
+ "VMName": {"value": "eshop-srv-win"}
+}
diff --git a/deploy/readme.md b/deploy/readme.md
new file mode 100644
index 000000000..7d760c6bd
--- /dev/null
+++ b/deploy/readme.md
@@ -0,0 +1,27 @@
+# Deploying Resources On Azure
+
+## Pre-requisites
+1. [Azure CLI 2.0 Installed](https://docs.microsoft.com/en-us/cli/azure/install-azure-cli)
+2. Azure subscription created
+
+Login into your azure subscription by typing `az login` (note that you maybe need to use `az account set` to set the subscription to use). Refer to [this article](https://docs.microsoft.com/en-us/cli/azure/authenticate-azure-cli) for more details
+
+## Deploying using CLI
+
+## Deploying Virtual machines to host the services
+
+1. [Deploying a Linux VM to run single-server development environment using docker-machine (**Recommended for development environments**)](az/vms/docker-machine.md)
+2. [Deploying a Linux VM or Windows Server 2016 to run a single-server development environment using ARM template (**Recommended for creating testing environments**)](az/vms/plain-vm.md)
+
+Using `docker-machine` is the recommended way to create a VM with docker installed. But it is limited to Linux based VMs.
+
+## Deploying Azure resources used by the services
+
+1. [Deploying SQL Server and databases](az/sql/readme.md)
+2. [Deploying Azure Service Bus](az/servicebus/readme.md)
+3. [Deploying Redis Cache](az/redis/readme.md)
+
+
+
+
+
diff --git a/docker-compose-external.yml b/docker-compose-external.yml
index ff1641cdd..8d8d61add 100644
--- a/docker-compose-external.yml
+++ b/docker-compose-external.yml
@@ -1,4 +1,4 @@
-version: '2'
+version: '2.1'
services:
sql.data:
diff --git a/docker-compose.ci.build.yml b/docker-compose.ci.build.yml
index f32f3b239..db2ef5390 100644
--- a/docker-compose.ci.build.yml
+++ b/docker-compose.ci.build.yml
@@ -1,4 +1,4 @@
-version: '3'
+version: '2.1'
services:
ci-build:
diff --git a/docker-compose.nobuild.yml b/docker-compose.nobuild.yml
index f74aa9c14..0905f9799 100644
--- a/docker-compose.nobuild.yml
+++ b/docker-compose.nobuild.yml
@@ -1,4 +1,4 @@
-version: '2'
+version: '2.1'
services:
basket.api:
diff --git a/docker-compose.override.yml b/docker-compose.override.yml
index b840bda61..41dfcdfef 100644
--- a/docker-compose.override.yml
+++ b/docker-compose.override.yml
@@ -1,4 +1,4 @@
-version: '3'
+version: '2.1'
# The default docker-compose.override file can use the "localhost" as the external name for testing web apps within the same dev machine.
# The ESHOP_EXTERNAL_DNS_NAME_OR_IP environment variable is taken, by default, from the ".env" file defined like:
@@ -9,16 +9,20 @@ version: '3'
services:
graceperiodmanager:
environment:
+ - ASPNETCORE_ENVIRONMENT=Development
+ - ASPNETCORE_URLS=http://0.0.0.0:80
- ConnectionString=Server=sql.data;Database=Microsoft.eShopOnContainers.Services.OrderingDb;User Id=sa;Password=Pass@word
- - EventBusConnection=rabbitmq
+ - EventBusConnection=${ESHOP_AZURE_SERVICE_BUS:-rabbitmq}
+ - CheckUpdateTime=30000
+ - GracePeriodTime=1
basket.api:
environment:
- ASPNETCORE_ENVIRONMENT=Development
- ASPNETCORE_URLS=http://0.0.0.0:80
- - ConnectionString=basket.data
- - identityUrl=http://identity.api #Local: You need to open your local dev-machine firewall at range 5100-5105. at range 5100-5105.
- - EventBusConnection=rabbitmq
+ - ConnectionString=${ESHOP_AZURE_REDIS_BASKET_DB:-basket.data}
+ - identityUrl=http://identity.api #Local: You need to open your local dev-machine firewall at range 5100-5110.
+ - EventBusConnection=${ESHOP_AZURE_SERVICE_BUS:-rabbitmq}
ports:
- "5103:80"
@@ -26,9 +30,12 @@ services:
environment:
- ASPNETCORE_ENVIRONMENT=Development
- ASPNETCORE_URLS=http://0.0.0.0:80
- - ConnectionString=Server=sql.data;Database=Microsoft.eShopOnContainers.Services.CatalogDb;User Id=sa;Password=Pass@word
- - ExternalCatalogBaseUrl=http://${ESHOP_EXTERNAL_DNS_NAME_OR_IP}:5101 #Local: You need to open your local dev-machine firewall at range 5100-5105. at range 5100-5105.
- - EventBusConnection=rabbitmq
+ - ConnectionString=${ESHOP_AZURE_CATALOG_DB:-Server=sql.data;Database=Microsoft.eShopOnContainers.Services.CatalogDb;User Id=sa;Password=Pass@word}
+ - PicBaseUrl=${ESHOP_AZURE_STORAGE_CATALOG:-http://localhost:5101/api/v1/pic/} #Local: You need to open your local dev-machine firewall at range 5100-5110.
+ - EventBusConnection=${ESHOP_AZURE_SERVICE_BUS:-rabbitmq}
+ - AzureStorageAccountName=${ESHOP_AZURE_STORAGE_CATALOG_NAME}
+ - AzureStorageAccountKey=${ESHOP_AZURE_STORAGE_CATALOG_KEY}
+ - UseCustomizationData=True
ports:
- "5101:80"
@@ -38,8 +45,9 @@ services:
- ASPNETCORE_URLS=http://0.0.0.0:80
- SpaClient=http://${ESHOP_EXTERNAL_DNS_NAME_OR_IP}:5104
- XamarinCallback=http://${ESHOP_PROD_EXTERNAL_DNS_NAME_OR_IP}:5105/xamarincallback #localhost do not work for UWP login, so we have to use "external" IP always
- - ConnectionStrings__DefaultConnection=Server=sql.data;Database=Microsoft.eShopOnContainers.Service.IdentityDb;User Id=sa;Password=Pass@word
- - MvcClient=http://${ESHOP_EXTERNAL_DNS_NAME_OR_IP}:5100 #Local: You need to open your local dev-machine firewall at range 5100-5105.
+ - ConnectionStrings__DefaultConnection=${ESHOP_AZURE_IDENTITY_DB:-Server=sql.data;Database=Microsoft.eShopOnContainers.Service.IdentityDb;User Id=sa;Password=Pass@word}
+ - MvcClient=http://${ESHOP_EXTERNAL_DNS_NAME_OR_IP}:5100 #Local: You need to open your local dev-machine firewall at range 5100-5110.
+ - UseCustomizationData=True
ports:
- "5105:80"
@@ -47,9 +55,10 @@ services:
environment:
- ASPNETCORE_ENVIRONMENT=Development
- ASPNETCORE_URLS=http://0.0.0.0:80
- - ConnectionString=Server=sql.data;Database=Microsoft.eShopOnContainers.Services.OrderingDb;User Id=sa;Password=Pass@word
- - identityUrl=http://identity.api #Local: You need to open your local dev-machine firewall at range 5100-5105. at range 5100-5105.
- - EventBusConnection=rabbitmq
+ - ConnectionString=${ESHOP_AZURE_ORDERING_DB:-Server=sql.data;Database=Microsoft.eShopOnContainers.Services.OrderingDb;User Id=sa;Password=Pass@word}
+ - identityUrl=http://identity.api #Local: You need to open your local dev-machine firewall at range 5100-5110.
+ - EventBusConnection=${ESHOP_AZURE_SERVICE_BUS:-rabbitmq}
+ - UseCustomizationData=True
ports:
- "5102:80"
@@ -57,15 +66,18 @@ services:
environment:
- ASPNETCORE_ENVIRONMENT=Development
- ASPNETCORE_URLS=http://0.0.0.0:80
- - ConnectionString=Server=sql.data;Database=Microsoft.eShopOnContainers.Services.MarketingDb;User Id=sa;Password=Pass@word
- - MongoConnectionString=mongodb://nosql.data
+ - ConnectionString=${ESHOP_AZURE_MARKETING_DB:-Server=sql.data;Database=Microsoft.eShopOnContainers.Services.MarketingDb;User Id=sa;Password=Pass@word}
+ - MongoConnectionString=${ESHOP_AZURE_COSMOSDB:-mongodb://nosql.data}
- MongoDatabase=MarketingDb
- - EventBusConnection=rabbitmq
- - ExternalCatalogBaseUrl=http://${ESHOP_EXTERNAL_DNS_NAME_OR_IP}:5110 #Local: You need to open your local dev-machine firewall at range 5100-5105. at range 5100-5105.
- - identityUrl=http://identity.api #Local: You need to open your local dev-machine firewall at range 5100-5105. at range 5100-5105.
+ - EventBusConnection=${ESHOP_AZURE_SERVICE_BUS:-rabbitmq}
+ - identityUrl=http://identity.api #Local: You need to open your local dev-machine firewall at range 5100-5110.
+ - CampaignDetailFunctionUri=${ESHOP_AZUREFUNC_CAMPAIGN_DETAILS_URI}
+ - PicBaseUrl=${ESHOP_AZURE_STORAGE_MARKETING:-http://localhost:5110/api/v1/pic/}
+ - AzureStorageAccountName=${ESHOP_AZURE_STORAGE_MARKETING_NAME}
+ - AzureStorageAccountKey=${ESHOP_AZURE_STORAGE_MARKETING_KEY}
ports:
- "5110:80"
-
+
webspa:
environment:
- ASPNETCORE_ENVIRONMENT=Development
@@ -79,6 +91,8 @@ services:
- OrderingUrlHC=http://ordering.api/hc
- IdentityUrlHC=http://identity.api/hc #Local: Use ${ESHOP_PROD_EXTERNAL_DNS_NAME_OR_IP}, if using external IP or DNS name from browser.
- BasketUrlHC=http://basket.api/hc
+ - MarketingUrlHC=http://marketing.api/hc
+ - UseCustomizationData=True
ports:
- "5104:80"
@@ -92,6 +106,7 @@ services:
- IdentityUrl=http://10.0.75.1:5105
- MarketingUrl=http://marketing.api #Local: Use 10.0.75.1 in a "Docker for Windows" environment, if using "localhost" from browser.
#Remote: Use ${ESHOP_EXTERNAL_DNS_NAME_OR_IP} if using external IP or DNS name from browser.
+ - UseCustomizationData=True
ports:
- "5100:80"
@@ -114,6 +129,8 @@ services:
- OrderingUrl=http://ordering.api/hc
- BasketUrl=http://basket.api/hc
- IdentityUrl=http://identity.api/hc
+ - LocationsUrl=http://locations.api/hc
+ - MarketingUrl=http://marketing.api/hc
- mvc=http://webmvc/hc
- spa=http://webspa/hc
ports:
@@ -123,7 +140,7 @@ services:
environment:
- ASPNETCORE_ENVIRONMENT=Development
- ASPNETCORE_URLS=http://0.0.0.0:5108
- - EventBusConnection=rabbitmq
+ - EventBusConnection=${ESHOP_AZURE_SERVICE_BUS:-rabbitmq}
ports:
- "5108:80"
@@ -131,9 +148,9 @@ services:
environment:
- ASPNETCORE_ENVIRONMENT=Development
- ASPNETCORE_URLS=http://0.0.0.0:80
- - ConnectionString=mongodb://nosql.data
+ - ConnectionString=${ESHOP_AZURE_COSMOSDB:-mongodb://nosql.data}
- Database=LocationsDb
- - identityUrl=http://identity.api #Local: You need to open your local dev-machine firewall at range 5100-5105. at range 5100-5105.
- - EventBusConnection=rabbitmq
+ - identityUrl=http://identity.api #Local: You need to open your local dev-machine firewall at range 5100-5110.
+ - EventBusConnection=${ESHOP_AZURE_SERVICE_BUS:-rabbitmq}
ports:
- "5109:80"
diff --git a/docker-compose.prod.yml b/docker-compose.prod.yml
index 8b9762cf5..8c1628ffb 100644
--- a/docker-compose.prod.yml
+++ b/docker-compose.prod.yml
@@ -1,4 +1,4 @@
-version: '3'
+version: '2.1'
# The Production docker-compose file has to have the external/real IPs or DNS names for the services
# The ESHOP_PROD_EXTERNAL_DNS_NAME_OR_IP environment variable is taken, by default, from the ".env" file defined like:
@@ -12,24 +12,33 @@ version: '3'
# docker-compose -f docker-compose.yml -f docker-compose.prod.yml up -d
services:
+ graceperiodmanager:
+ environment:
+ - ASPNETCORE_ENVIRONMENT=Production
+ - ASPNETCORE_URLS=http://0.0.0.0:80
+ - ConnectionString=Server=sql.data;Database=Microsoft.eShopOnContainers.Services.OrderingDb;User Id=sa;Password=Pass@word
+ - EventBusConnection=${ESHOP_AZURE_SERVICE_BUS:-rabbitmq}
basket.api:
environment:
- ASPNETCORE_ENVIRONMENT=Production
- ASPNETCORE_URLS=http://0.0.0.0:80
- - ConnectionString=basket.data
- - identityUrl=http://identity.api #Local: You need to open your host's firewall at range 5100-5105. at range 5100-5105.
- - EventBusConnection=rabbitmq
+ - ConnectionString=${ESHOP_AZURE_REDIS_BASKET_DB:-basket.data}
+ - identityUrl=http://identity.api #Local: You need to open your local dev-machine firewall at range 5100-5110.
+ - EventBusConnection=${ESHOP_AZURE_SERVICE_BUS:-rabbitmq}
ports:
- "5103:80"
catalog.api:
environment:
- ASPNETCORE_ENVIRONMENT=Production
- - ASPNETCORE_URLS=http://0.0.0.0:80
- - ConnectionString=Server=sql.data;Database=Microsoft.eShopOnContainers.Services.CatalogDb;User Id=sa;Password=Pass@word
- - ExternalCatalogBaseUrl=http://${ESHOP_PROD_EXTERNAL_DNS_NAME_OR_IP}:5101 #Local: You need to open your host's firewall at range 5100-5105. at range 5100-5105.
- - EventBusConnection=rabbitmq
+ ASPNETCORE_URLS=http://0.0.0.0:80
+ - ConnectionString=${ESHOP_AZURE_CATALOG_DB:-Server=sql.data;Database=Microsoft.eShopOnContainers.Services.CatalogDb;User Id=sa;Password=Pass@word}
+ - PicBaseUrl=${ESHOP_AZURE_STORAGE_CATALOG:-http://localhost:5101/api/v1/pic/} #Local: You need to open your local dev-machine firewall at range 5100-5110.
+ - EventBusConnection=${ESHOP_AZURE_SERVICE_BUS:-rabbitmq}
+ - AzureStorageAccountName=${ESHOP_AZURE_STORAGE_CATALOG_NAME}
+ - AzureStorageAccountKey=${ESHOP_AZURE_STORAGE_CATALOG_KEY}
+ - UseCustomizationData=True
ports:
- "5101:80"
@@ -38,9 +47,10 @@ services:
- ASPNETCORE_ENVIRONMENT=Production
- ASPNETCORE_URLS=http://0.0.0.0:80
- SpaClient=http://${ESHOP_PROD_EXTERNAL_DNS_NAME_OR_IP}:5104
- - ConnectionStrings__DefaultConnection=Server=sql.data;Database=Microsoft.eShopOnContainers.Service.IdentityDb;User Id=sa;Password=Pass@word
- - MvcClient=http://${ESHOP_PROD_EXTERNAL_DNS_NAME_OR_IP}:5100 #Local: You need to open your host's firewall at range 5100-5105.
+ - ConnectionStrings__DefaultConnection=${ESHOP_AZURE_IDENTITY_DB:-Server=sql.data;Database=Microsoft.eShopOnContainers.Service.IdentityDb;User Id=sa;Password=Pass@word}
+ - MvcClient=http://${ESHOP_PROD_EXTERNAL_DNS_NAME_OR_IP}:5100 #Local: You need to open your host's firewall at range 5100-5110.
- XamarinCallback=http://${ESHOP_PROD_EXTERNAL_DNS_NAME_OR_IP}:5105/xamarincallback
+ - UseCustomizationData=True
ports:
- "5105:80"
@@ -48,9 +58,10 @@ services:
environment:
- ASPNETCORE_ENVIRONMENT=Production
- ASPNETCORE_URLS=http://0.0.0.0:80
- - ConnectionString=Server=sql.data;Database=Microsoft.eShopOnContainers.Services.OrderingDb;User Id=sa;Password=Pass@word
- - identityUrl=http://identity.api #Local: You need to open your host's firewall at range 5100-5105. at range 5100-5105.
- - EventBusConnection=rabbitmq
+ - ConnectionString=${ESHOP_AZURE_ORDERING_DB:-Server=sql.data;Database=Microsoft.eShopOnContainers.Services.OrderingDb;User Id=sa;Password=Pass@word}
+ - identityUrl=http://identity.api #Local: You need to open your local dev-machine firewall at range 5100-5110.
+ - EventBusConnection=${ESHOP_AZURE_SERVICE_BUS:-rabbitmq}
+ - UseCustomizationData=True
ports:
- "5102:80"
@@ -58,11 +69,15 @@ services:
environment:
- ASPNETCORE_ENVIRONMENT=Production
- ASPNETCORE_URLS=http://0.0.0.0:80
- - ConnectionString=Server=sql.data;Database=Microsoft.eShopOnContainers.Services.MarketingDb;User Id=sa;Password=Pass@word
- - MongoConnectionString=mongodb://nosql.data
+ - ConnectionString=${ESHOP_AZURE_MARKETING_DB:-Server=sql.data;Database=Microsoft.eShopOnContainers.Services.MarketingDb;User Id=sa;Password=Pass@word}
+ - MongoConnectionString=${ESHOP_AZURE_COSMOSDB:-mongodb://nosql.data}
- MongoDatabase=MarketingDb
- - EventBusConnection=rabbitmq
- - identityUrl=http://identity.api #Local: You need to open your local dev-machine firewall at range 5100-5105. at range 5100-5105.
+ - EventBusConnection=${ESHOP_AZURE_SERVICE_BUS:-rabbitmq}
+ - identityUrl=http://identity.api #Local: You need to open your local dev-machine firewall at range 5100-5110.
+ - CampaignDetailFunctionUri=${ESHOP_AZUREFUNC_CAMPAIGN_DETAILS_URI}
+ - PicBaseUrl=${ESHOP_AZURE_STORAGE_MARKETING:-http://localhost:5110/api/v1/pic/}
+ - AzureStorageAccountName=${ESHOP_AZURE_STORAGE_MARKETING_NAME}
+ - AzureStorageAccountKey=${ESHOP_AZURE_STORAGE_MARKETING_KEY}
ports:
- "5110:80"
@@ -72,12 +87,14 @@ services:
- ASPNETCORE_URLS=http://0.0.0.0:80
- CatalogUrl=http://${ESHOP_PROD_EXTERNAL_DNS_NAME_OR_IP}:5101
- OrderingUrl=http://${ESHOP_PROD_EXTERNAL_DNS_NAME_OR_IP}:5102
- - IdentityUrl=http://${ESHOP_PROD_EXTERNAL_DNS_NAME_OR_IP}:5105 #Local: You need to open your host's firewall at range 5100-5105. at range 5100-5105.
+ - IdentityUrl=http://${ESHOP_PROD_EXTERNAL_DNS_NAME_OR_IP}:5105 #Local: You need to open your host's firewall at range 5100-5110.
- BasketUrl=http://${ESHOP_PROD_EXTERNAL_DNS_NAME_OR_IP}:5103
- CatalogUrlHC=http://catalog.api/hc
- OrderingUrlHC=http://ordering.api/hc
- IdentityUrlHC=http://identity.api/hc #Local: Use ${ESHOP_PROD_EXTERNAL_DNS_NAME_OR_IP}, if using external IP or DNS name from browser.
- BasketUrlHC=http://basket.api/hc
+ - MarketingUrlHC=http://marketing.api/hc
+ - UseCustomizationData=True
ports:
- "5104:80"
@@ -89,6 +106,7 @@ services:
- OrderingUrl=http://ordering.api
- IdentityUrl=http://${ESHOP_PROD_EXTERNAL_DNS_NAME_OR_IP}:5105 #Local: Use ${ESHOP_PROD_EXTERNAL_DNS_NAME_OR_IP}, if using external IP or DNS name from browser.
- BasketUrl=http://basket.api
+ - MarketingUrl=http://marketing.api
ports:
- "5100:80"
@@ -99,6 +117,10 @@ services:
ports:
- "5433:1433"
+ nosql.data:
+ ports:
+ - "27017:27017"
+
webstatus:
environment:
- ASPNETCORE_ENVIRONMENT=Production
@@ -106,9 +128,30 @@ services:
- CatalogUrl=http://catalog.api/hc
- OrderingUrl=http://ordering.api/hc
- BasketUrl=http://basket.api/hc
- - IdentityUrl=http://identity.api/hc
+ - IdentityUrl=http://identity.api/hc
+ - LocationsUrl=http://locations.api/hc
+ - MarketingUrl=http://marketing.api/hc
- mvc=http://webmvc/hc
- spa=http://webspa/hc
ports:
- - "5107:80"
\ No newline at end of file
+ - "5107:80"
+
+ payment.api:
+ environment:
+ - ASPNETCORE_ENVIRONMENT=Production
+ - ASPNETCORE_URLS=http://0.0.0.0:5108
+ - EventBusConnection=${ESHOP_AZURE_SERVICE_BUS:-rabbitmq}
+ ports:
+ - "5108:80"
+
+ locations.api:
+ environment:
+ - ASPNETCORE_ENVIRONMENT=Production
+ - ASPNETCORE_URLS=http://0.0.0.0:80
+ - ConnectionString=${ESHOP_AZURE_COSMOSDB:-mongodb://nosql.data}
+ - Database=LocationsDb
+ - identityUrl=http://identity.api #Local: You need to open your local dev-machine firewall at range 5100-5110.
+ - EventBusConnection=${ESHOP_AZURE_SERVICE_BUS:-rabbitmq}
+ ports:
+ - "5109:80"
\ No newline at end of file
diff --git a/docker-compose.yml b/docker-compose.yml
index 66b8ba49e..699415dff 100644
--- a/docker-compose.yml
+++ b/docker-compose.yml
@@ -1,4 +1,4 @@
-version: '3'
+version: '2.1'
services:
graceperiodmanager:
diff --git a/eShopOnContainers-AzureFunctions.sln b/eShopOnContainers-AzureFunctions.sln
new file mode 100644
index 000000000..7e14fc19d
--- /dev/null
+++ b/eShopOnContainers-AzureFunctions.sln
@@ -0,0 +1,96 @@
+
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio 15
+VisualStudioVersion = 15.0.26608.5
+MinimumVisualStudioVersion = 10.0.40219.1
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Infrastructure", "Infrastructure", "{5B1011EC-CEE5-47AA-B336-99381D573679}"
+EndProject
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "AzureFunctions", "AzureFunctions", "{106B787C-2CFF-4484-8C07-D14589859E94}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "marketing-functions", "src\Services\Marketing\Infrastructure\AzureFunctions\marketing-functions.csproj", "{B363EF31-DD1A-46C8-ADDF-CD30A756E97B}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Ad-Hoc|Any CPU = Ad-Hoc|Any CPU
+ Ad-Hoc|ARM = Ad-Hoc|ARM
+ Ad-Hoc|iPhone = Ad-Hoc|iPhone
+ Ad-Hoc|iPhoneSimulator = Ad-Hoc|iPhoneSimulator
+ Ad-Hoc|x64 = Ad-Hoc|x64
+ Ad-Hoc|x86 = Ad-Hoc|x86
+ AppStore|Any CPU = AppStore|Any CPU
+ AppStore|ARM = AppStore|ARM
+ AppStore|iPhone = AppStore|iPhone
+ AppStore|iPhoneSimulator = AppStore|iPhoneSimulator
+ AppStore|x64 = AppStore|x64
+ AppStore|x86 = AppStore|x86
+ Debug|Any CPU = Debug|Any CPU
+ Debug|ARM = Debug|ARM
+ Debug|iPhone = Debug|iPhone
+ Debug|iPhoneSimulator = Debug|iPhoneSimulator
+ Debug|x64 = Debug|x64
+ Debug|x86 = Debug|x86
+ Release|Any CPU = Release|Any CPU
+ Release|ARM = Release|ARM
+ Release|iPhone = Release|iPhone
+ Release|iPhoneSimulator = Release|iPhoneSimulator
+ Release|x64 = Release|x64
+ Release|x86 = Release|x86
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {B363EF31-DD1A-46C8-ADDF-CD30A756E97B}.Ad-Hoc|Any CPU.ActiveCfg = Debug|Any CPU
+ {B363EF31-DD1A-46C8-ADDF-CD30A756E97B}.Ad-Hoc|Any CPU.Build.0 = Debug|Any CPU
+ {B363EF31-DD1A-46C8-ADDF-CD30A756E97B}.Ad-Hoc|ARM.ActiveCfg = Debug|Any CPU
+ {B363EF31-DD1A-46C8-ADDF-CD30A756E97B}.Ad-Hoc|ARM.Build.0 = Debug|Any CPU
+ {B363EF31-DD1A-46C8-ADDF-CD30A756E97B}.Ad-Hoc|iPhone.ActiveCfg = Debug|Any CPU
+ {B363EF31-DD1A-46C8-ADDF-CD30A756E97B}.Ad-Hoc|iPhone.Build.0 = Debug|Any CPU
+ {B363EF31-DD1A-46C8-ADDF-CD30A756E97B}.Ad-Hoc|iPhoneSimulator.ActiveCfg = Debug|Any CPU
+ {B363EF31-DD1A-46C8-ADDF-CD30A756E97B}.Ad-Hoc|iPhoneSimulator.Build.0 = Debug|Any CPU
+ {B363EF31-DD1A-46C8-ADDF-CD30A756E97B}.Ad-Hoc|x64.ActiveCfg = Debug|Any CPU
+ {B363EF31-DD1A-46C8-ADDF-CD30A756E97B}.Ad-Hoc|x64.Build.0 = Debug|Any CPU
+ {B363EF31-DD1A-46C8-ADDF-CD30A756E97B}.Ad-Hoc|x86.ActiveCfg = Debug|Any CPU
+ {B363EF31-DD1A-46C8-ADDF-CD30A756E97B}.Ad-Hoc|x86.Build.0 = Debug|Any CPU
+ {B363EF31-DD1A-46C8-ADDF-CD30A756E97B}.AppStore|Any CPU.ActiveCfg = Debug|Any CPU
+ {B363EF31-DD1A-46C8-ADDF-CD30A756E97B}.AppStore|Any CPU.Build.0 = Debug|Any CPU
+ {B363EF31-DD1A-46C8-ADDF-CD30A756E97B}.AppStore|ARM.ActiveCfg = Debug|Any CPU
+ {B363EF31-DD1A-46C8-ADDF-CD30A756E97B}.AppStore|ARM.Build.0 = Debug|Any CPU
+ {B363EF31-DD1A-46C8-ADDF-CD30A756E97B}.AppStore|iPhone.ActiveCfg = Debug|Any CPU
+ {B363EF31-DD1A-46C8-ADDF-CD30A756E97B}.AppStore|iPhone.Build.0 = Debug|Any CPU
+ {B363EF31-DD1A-46C8-ADDF-CD30A756E97B}.AppStore|iPhoneSimulator.ActiveCfg = Debug|Any CPU
+ {B363EF31-DD1A-46C8-ADDF-CD30A756E97B}.AppStore|iPhoneSimulator.Build.0 = Debug|Any CPU
+ {B363EF31-DD1A-46C8-ADDF-CD30A756E97B}.AppStore|x64.ActiveCfg = Debug|Any CPU
+ {B363EF31-DD1A-46C8-ADDF-CD30A756E97B}.AppStore|x64.Build.0 = Debug|Any CPU
+ {B363EF31-DD1A-46C8-ADDF-CD30A756E97B}.AppStore|x86.ActiveCfg = Debug|Any CPU
+ {B363EF31-DD1A-46C8-ADDF-CD30A756E97B}.AppStore|x86.Build.0 = Debug|Any CPU
+ {B363EF31-DD1A-46C8-ADDF-CD30A756E97B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {B363EF31-DD1A-46C8-ADDF-CD30A756E97B}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {B363EF31-DD1A-46C8-ADDF-CD30A756E97B}.Debug|ARM.ActiveCfg = Debug|Any CPU
+ {B363EF31-DD1A-46C8-ADDF-CD30A756E97B}.Debug|ARM.Build.0 = Debug|Any CPU
+ {B363EF31-DD1A-46C8-ADDF-CD30A756E97B}.Debug|iPhone.ActiveCfg = Debug|Any CPU
+ {B363EF31-DD1A-46C8-ADDF-CD30A756E97B}.Debug|iPhone.Build.0 = Debug|Any CPU
+ {B363EF31-DD1A-46C8-ADDF-CD30A756E97B}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU
+ {B363EF31-DD1A-46C8-ADDF-CD30A756E97B}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU
+ {B363EF31-DD1A-46C8-ADDF-CD30A756E97B}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {B363EF31-DD1A-46C8-ADDF-CD30A756E97B}.Debug|x64.Build.0 = Debug|Any CPU
+ {B363EF31-DD1A-46C8-ADDF-CD30A756E97B}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {B363EF31-DD1A-46C8-ADDF-CD30A756E97B}.Debug|x86.Build.0 = Debug|Any CPU
+ {B363EF31-DD1A-46C8-ADDF-CD30A756E97B}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {B363EF31-DD1A-46C8-ADDF-CD30A756E97B}.Release|Any CPU.Build.0 = Release|Any CPU
+ {B363EF31-DD1A-46C8-ADDF-CD30A756E97B}.Release|ARM.ActiveCfg = Release|Any CPU
+ {B363EF31-DD1A-46C8-ADDF-CD30A756E97B}.Release|ARM.Build.0 = Release|Any CPU
+ {B363EF31-DD1A-46C8-ADDF-CD30A756E97B}.Release|iPhone.ActiveCfg = Release|Any CPU
+ {B363EF31-DD1A-46C8-ADDF-CD30A756E97B}.Release|iPhone.Build.0 = Release|Any CPU
+ {B363EF31-DD1A-46C8-ADDF-CD30A756E97B}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
+ {B363EF31-DD1A-46C8-ADDF-CD30A756E97B}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
+ {B363EF31-DD1A-46C8-ADDF-CD30A756E97B}.Release|x64.ActiveCfg = Release|Any CPU
+ {B363EF31-DD1A-46C8-ADDF-CD30A756E97B}.Release|x64.Build.0 = Release|Any CPU
+ {B363EF31-DD1A-46C8-ADDF-CD30A756E97B}.Release|x86.ActiveCfg = Release|Any CPU
+ {B363EF31-DD1A-46C8-ADDF-CD30A756E97B}.Release|x86.Build.0 = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+ GlobalSection(NestedProjects) = preSolution
+ {106B787C-2CFF-4484-8C07-D14589859E94} = {5B1011EC-CEE5-47AA-B336-99381D573679}
+ {B363EF31-DD1A-46C8-ADDF-CD30A756E97B} = {106B787C-2CFF-4484-8C07-D14589859E94}
+ EndGlobalSection
+EndGlobal
diff --git a/eShopOnContainers-ServicesAndWebApps.sln b/eShopOnContainers-ServicesAndWebApps.sln
index 0a36c0c57..9dd6308a4 100644
--- a/eShopOnContainers-ServicesAndWebApps.sln
+++ b/eShopOnContainers-ServicesAndWebApps.sln
@@ -1,12 +1,15 @@
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
-VisualStudioVersion = 15.0.26430.12
+VisualStudioVersion = 15.0.26430.6
MinimumVisualStudioVersion = 10.0.40219.1
+Project("{E53339B2-1760-4266-BCC7-CA923CBCF16C}") = "docker-compose", "docker-compose.dcproj", "{FEA0C318-FFED-4D39-8781-265718CA43DD}"
+EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{932D8224-11F6-4D07-B109-DA28AD288A63}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{3AF739CD-81D8-428D-A08A-0A58372DEBF6}"
ProjectSection(SolutionItems) = preProject
+ Local.testsettings = Local.testsettings
NuGet.config = NuGet.config
EndProjectSection
EndProject
@@ -42,8 +45,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "UnitTest", "test\Services\U
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Identity.API", "src\Services\Identity\Identity.API\Identity.API.csproj", "{A579E108-5445-403D-A407-339AC4D1611B}"
EndProject
-Project("{E53339B2-1760-4266-BCC7-CA923CBCF16C}") = "docker-compose", "docker-compose.dcproj", "{FEA0C318-FFED-4D39-8781-265718CA43DD}"
-EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WebSPA", "src\Web\WebSPA\WebSPA.csproj", "{F16E3C6A-1C94-4EAB-BE91-099618060B68}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "IntegrationTests", "test\Services\IntegrationTests\IntegrationTests.csproj", "{5B810E3D-112E-4857-B197-F09D2FD41E27}"
@@ -58,21 +59,21 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EventBus", "src\BuildingBlo
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EventBusRabbitMQ", "src\BuildingBlocks\EventBus\EventBusRabbitMQ\EventBusRabbitMQ.csproj", "{8088F3FC-6787-45FA-A924-816EC81CBFAC}"
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "IntegrationEventLogEF", "src\BuildingBlocks\EventBus\IntegrationEventLogEF\IntegrationEventLogEF.csproj", "{9EE28E45-1533-472B-8267-56C48855BA0E}"
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "IntegrationEventLogEF", "src\BuildingBlocks\EventBus\IntegrationEventLogEF\IntegrationEventLogEF.csproj", "{9EE28E45-1533-472B-8267-56C48855BA0E}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "HealthChecks", "HealthChecks", "{A81ECBC2-6B00-4DCD-8388-469174033379}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.HealthChecks", "src\BuildingBlocks\HealthChecks\src\Microsoft.Extensions.HealthChecks\Microsoft.Extensions.HealthChecks.csproj", "{942ED6E8-0050-495F-A0EA-01E97F63760C}"
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WebStatus", "src\Web\WebStatus\WebStatus.csproj", "{C0A7918D-B4F2-4E7F-8DE2-1E5279EF079F}"
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WebStatus", "src\Web\WebStatus\WebStatus.csproj", "{C0A7918D-B4F2-4E7F-8DE2-1E5279EF079F}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Resilience", "Resilience", "{FBF43D93-F2E7-4FF8-B4AB-186895949B88}"
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Resilience.Http", "src\BuildingBlocks\Resilience\Resilience.Http\Resilience.Http.csproj", "{D1C47FF1-91F1-4CAF-9ABB-AD642B821502}"
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Resilience.Http", "src\BuildingBlocks\Resilience\Resilience.Http\Resilience.Http.csproj", "{D1C47FF1-91F1-4CAF-9ABB-AD642B821502}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Payment", "Payment", "{022E145D-1593-47EE-9608-8E323D3C63F5}"
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Payment.API", "src\Services\Payment\Payment.API\Payment.API.csproj", "{1A01AF82-6FCB-464C-B39C-F127AEBD315D}"
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Payment.API", "src\Services\Payment\Payment.API\Payment.API.csproj", "{1A01AF82-6FCB-464C-B39C-F127AEBD315D}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AspNetCore.HealthChecks", "src\BuildingBlocks\HealthChecks\src\Microsoft.AspNetCore.HealthChecks\Microsoft.AspNetCore.HealthChecks.csproj", "{22A0F9C1-2D4A-4107-95B7-8459E6688BC5}"
EndProject
@@ -80,22 +81,26 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Health
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EventBus.Tests", "src\BuildingBlocks\EventBus\EventBus.Tests\EventBus.Tests.csproj", "{4A980AC4-7205-46BF-8CCB-09E44D700FD4}"
EndProject
-Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "GracePeriod", "GracePeriod", "{F38B4FF0-0B49-405A-B1B4-F7A5E3BC4C4E}"
-EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GracePeriodManager", "src\Services\GracePeriod\GracePeriodManager\GracePeriodManager.csproj", "{F6E0F0DD-1400-43C3-B5E0-7CC325728C47}"
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "GracePeriodManager", "src\Services\GracePeriod\GracePeriodManager\GracePeriodManager.csproj", "{F6E0F0DD-1400-43C3-B5E0-7CC325728C47}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Location", "Location", "{41139F64-4046-4F16-96B7-D941D96FA9C6}"
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Locations.API", "src\Services\Location\Locations.API\Locations.API.csproj", "{E7581357-FC34-474C-B8F5-307EE3CE05EF}"
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Locations.API", "src\Services\Location\Locations.API\Locations.API.csproj", "{E7581357-FC34-474C-B8F5-307EE3CE05EF}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "DataProtection", "DataProtection", "{88B22DBB-AA8F-4290-A454-2C109352C345}"
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DataProtection", "src\BuildingBlocks\DataProtection\DataProtection\DataProtection.csproj", "{23A33F9B-7672-426D-ACF9-FF8436ADC81A}"
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DataProtection", "src\BuildingBlocks\DataProtection\DataProtection\DataProtection.csproj", "{23A33F9B-7672-426D-ACF9-FF8436ADC81A}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Marketing", "Marketing", "{A5260DE0-1FDD-467E-9CC1-A028AB081CEE}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Marketing.API", "src\Services\Marketing\Marketing.API\Marketing.API.csproj", "{DF395F85-B010-465D-857A-7EBCC512C0C2}"
EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EventBusServiceBus", "src\BuildingBlocks\EventBus\EventBusServiceBus\EventBusServiceBus.csproj", "{69AF10D3-AA76-4FF7-B187-EC7E8CC5F5B8}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.HealthChecks.AzureStorage", "src\BuildingBlocks\HealthChecks\src\Microsoft.Extensions.HealthChecks.AzureStorage\Microsoft.Extensions.HealthChecks.AzureStorage.csproj", "{768C887F-C229-4B94-ACD8-0C7F65686524}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LoadTest", "test\Services\LoadTest\LoadTest.csproj", "{969E793C-C413-490E-9C9D-B2B46DA5AF32}"
+EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Ad-Hoc|Any CPU = Ad-Hoc|Any CPU
@@ -124,6 +129,54 @@ Global
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {FEA0C318-FFED-4D39-8781-265718CA43DD}.Ad-Hoc|Any CPU.ActiveCfg = Debug|Any CPU
+ {FEA0C318-FFED-4D39-8781-265718CA43DD}.Ad-Hoc|Any CPU.Build.0 = Debug|Any CPU
+ {FEA0C318-FFED-4D39-8781-265718CA43DD}.Ad-Hoc|ARM.ActiveCfg = Debug|Any CPU
+ {FEA0C318-FFED-4D39-8781-265718CA43DD}.Ad-Hoc|ARM.Build.0 = Debug|Any CPU
+ {FEA0C318-FFED-4D39-8781-265718CA43DD}.Ad-Hoc|iPhone.ActiveCfg = Debug|Any CPU
+ {FEA0C318-FFED-4D39-8781-265718CA43DD}.Ad-Hoc|iPhone.Build.0 = Debug|Any CPU
+ {FEA0C318-FFED-4D39-8781-265718CA43DD}.Ad-Hoc|iPhoneSimulator.ActiveCfg = Debug|Any CPU
+ {FEA0C318-FFED-4D39-8781-265718CA43DD}.Ad-Hoc|iPhoneSimulator.Build.0 = Debug|Any CPU
+ {FEA0C318-FFED-4D39-8781-265718CA43DD}.Ad-Hoc|x64.ActiveCfg = Debug|Any CPU
+ {FEA0C318-FFED-4D39-8781-265718CA43DD}.Ad-Hoc|x64.Build.0 = Debug|Any CPU
+ {FEA0C318-FFED-4D39-8781-265718CA43DD}.Ad-Hoc|x86.ActiveCfg = Debug|Any CPU
+ {FEA0C318-FFED-4D39-8781-265718CA43DD}.Ad-Hoc|x86.Build.0 = Debug|Any CPU
+ {FEA0C318-FFED-4D39-8781-265718CA43DD}.AppStore|Any CPU.ActiveCfg = Debug|Any CPU
+ {FEA0C318-FFED-4D39-8781-265718CA43DD}.AppStore|Any CPU.Build.0 = Debug|Any CPU
+ {FEA0C318-FFED-4D39-8781-265718CA43DD}.AppStore|ARM.ActiveCfg = Debug|Any CPU
+ {FEA0C318-FFED-4D39-8781-265718CA43DD}.AppStore|ARM.Build.0 = Debug|Any CPU
+ {FEA0C318-FFED-4D39-8781-265718CA43DD}.AppStore|iPhone.ActiveCfg = Debug|Any CPU
+ {FEA0C318-FFED-4D39-8781-265718CA43DD}.AppStore|iPhone.Build.0 = Debug|Any CPU
+ {FEA0C318-FFED-4D39-8781-265718CA43DD}.AppStore|iPhoneSimulator.ActiveCfg = Debug|Any CPU
+ {FEA0C318-FFED-4D39-8781-265718CA43DD}.AppStore|iPhoneSimulator.Build.0 = Debug|Any CPU
+ {FEA0C318-FFED-4D39-8781-265718CA43DD}.AppStore|x64.ActiveCfg = Debug|Any CPU
+ {FEA0C318-FFED-4D39-8781-265718CA43DD}.AppStore|x64.Build.0 = Debug|Any CPU
+ {FEA0C318-FFED-4D39-8781-265718CA43DD}.AppStore|x86.ActiveCfg = Debug|Any CPU
+ {FEA0C318-FFED-4D39-8781-265718CA43DD}.AppStore|x86.Build.0 = Debug|Any CPU
+ {FEA0C318-FFED-4D39-8781-265718CA43DD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {FEA0C318-FFED-4D39-8781-265718CA43DD}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {FEA0C318-FFED-4D39-8781-265718CA43DD}.Debug|ARM.ActiveCfg = Debug|Any CPU
+ {FEA0C318-FFED-4D39-8781-265718CA43DD}.Debug|ARM.Build.0 = Debug|Any CPU
+ {FEA0C318-FFED-4D39-8781-265718CA43DD}.Debug|iPhone.ActiveCfg = Debug|Any CPU
+ {FEA0C318-FFED-4D39-8781-265718CA43DD}.Debug|iPhone.Build.0 = Debug|Any CPU
+ {FEA0C318-FFED-4D39-8781-265718CA43DD}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU
+ {FEA0C318-FFED-4D39-8781-265718CA43DD}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU
+ {FEA0C318-FFED-4D39-8781-265718CA43DD}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {FEA0C318-FFED-4D39-8781-265718CA43DD}.Debug|x64.Build.0 = Debug|Any CPU
+ {FEA0C318-FFED-4D39-8781-265718CA43DD}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {FEA0C318-FFED-4D39-8781-265718CA43DD}.Debug|x86.Build.0 = Debug|Any CPU
+ {FEA0C318-FFED-4D39-8781-265718CA43DD}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {FEA0C318-FFED-4D39-8781-265718CA43DD}.Release|Any CPU.Build.0 = Release|Any CPU
+ {FEA0C318-FFED-4D39-8781-265718CA43DD}.Release|ARM.ActiveCfg = Release|Any CPU
+ {FEA0C318-FFED-4D39-8781-265718CA43DD}.Release|ARM.Build.0 = Release|Any CPU
+ {FEA0C318-FFED-4D39-8781-265718CA43DD}.Release|iPhone.ActiveCfg = Release|Any CPU
+ {FEA0C318-FFED-4D39-8781-265718CA43DD}.Release|iPhone.Build.0 = Release|Any CPU
+ {FEA0C318-FFED-4D39-8781-265718CA43DD}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
+ {FEA0C318-FFED-4D39-8781-265718CA43DD}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
+ {FEA0C318-FFED-4D39-8781-265718CA43DD}.Release|x64.ActiveCfg = Release|Any CPU
+ {FEA0C318-FFED-4D39-8781-265718CA43DD}.Release|x64.Build.0 = Release|Any CPU
+ {FEA0C318-FFED-4D39-8781-265718CA43DD}.Release|x86.ActiveCfg = Release|Any CPU
+ {FEA0C318-FFED-4D39-8781-265718CA43DD}.Release|x86.Build.0 = Release|Any CPU
{2110CBB0-3B38-4EE4-A743-DF6968D80D90}.Ad-Hoc|Any CPU.ActiveCfg = Release|Any CPU
{2110CBB0-3B38-4EE4-A743-DF6968D80D90}.Ad-Hoc|ARM.ActiveCfg = Release|Any CPU
{2110CBB0-3B38-4EE4-A743-DF6968D80D90}.Ad-Hoc|iPhone.ActiveCfg = Release|Any CPU
@@ -398,54 +451,6 @@ Global
{A579E108-5445-403D-A407-339AC4D1611B}.Release|x64.Build.0 = Release|Any CPU
{A579E108-5445-403D-A407-339AC4D1611B}.Release|x86.ActiveCfg = Release|Any CPU
{A579E108-5445-403D-A407-339AC4D1611B}.Release|x86.Build.0 = Release|Any CPU
- {FEA0C318-FFED-4D39-8781-265718CA43DD}.Ad-Hoc|Any CPU.ActiveCfg = Debug|Any CPU
- {FEA0C318-FFED-4D39-8781-265718CA43DD}.Ad-Hoc|Any CPU.Build.0 = Debug|Any CPU
- {FEA0C318-FFED-4D39-8781-265718CA43DD}.Ad-Hoc|ARM.ActiveCfg = Debug|Any CPU
- {FEA0C318-FFED-4D39-8781-265718CA43DD}.Ad-Hoc|ARM.Build.0 = Debug|Any CPU
- {FEA0C318-FFED-4D39-8781-265718CA43DD}.Ad-Hoc|iPhone.ActiveCfg = Debug|Any CPU
- {FEA0C318-FFED-4D39-8781-265718CA43DD}.Ad-Hoc|iPhone.Build.0 = Debug|Any CPU
- {FEA0C318-FFED-4D39-8781-265718CA43DD}.Ad-Hoc|iPhoneSimulator.ActiveCfg = Debug|Any CPU
- {FEA0C318-FFED-4D39-8781-265718CA43DD}.Ad-Hoc|iPhoneSimulator.Build.0 = Debug|Any CPU
- {FEA0C318-FFED-4D39-8781-265718CA43DD}.Ad-Hoc|x64.ActiveCfg = Debug|Any CPU
- {FEA0C318-FFED-4D39-8781-265718CA43DD}.Ad-Hoc|x64.Build.0 = Debug|Any CPU
- {FEA0C318-FFED-4D39-8781-265718CA43DD}.Ad-Hoc|x86.ActiveCfg = Debug|Any CPU
- {FEA0C318-FFED-4D39-8781-265718CA43DD}.Ad-Hoc|x86.Build.0 = Debug|Any CPU
- {FEA0C318-FFED-4D39-8781-265718CA43DD}.AppStore|Any CPU.ActiveCfg = Debug|Any CPU
- {FEA0C318-FFED-4D39-8781-265718CA43DD}.AppStore|Any CPU.Build.0 = Debug|Any CPU
- {FEA0C318-FFED-4D39-8781-265718CA43DD}.AppStore|ARM.ActiveCfg = Debug|Any CPU
- {FEA0C318-FFED-4D39-8781-265718CA43DD}.AppStore|ARM.Build.0 = Debug|Any CPU
- {FEA0C318-FFED-4D39-8781-265718CA43DD}.AppStore|iPhone.ActiveCfg = Debug|Any CPU
- {FEA0C318-FFED-4D39-8781-265718CA43DD}.AppStore|iPhone.Build.0 = Debug|Any CPU
- {FEA0C318-FFED-4D39-8781-265718CA43DD}.AppStore|iPhoneSimulator.ActiveCfg = Debug|Any CPU
- {FEA0C318-FFED-4D39-8781-265718CA43DD}.AppStore|iPhoneSimulator.Build.0 = Debug|Any CPU
- {FEA0C318-FFED-4D39-8781-265718CA43DD}.AppStore|x64.ActiveCfg = Debug|Any CPU
- {FEA0C318-FFED-4D39-8781-265718CA43DD}.AppStore|x64.Build.0 = Debug|Any CPU
- {FEA0C318-FFED-4D39-8781-265718CA43DD}.AppStore|x86.ActiveCfg = Debug|Any CPU
- {FEA0C318-FFED-4D39-8781-265718CA43DD}.AppStore|x86.Build.0 = Debug|Any CPU
- {FEA0C318-FFED-4D39-8781-265718CA43DD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {FEA0C318-FFED-4D39-8781-265718CA43DD}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {FEA0C318-FFED-4D39-8781-265718CA43DD}.Debug|ARM.ActiveCfg = Debug|Any CPU
- {FEA0C318-FFED-4D39-8781-265718CA43DD}.Debug|ARM.Build.0 = Debug|Any CPU
- {FEA0C318-FFED-4D39-8781-265718CA43DD}.Debug|iPhone.ActiveCfg = Debug|Any CPU
- {FEA0C318-FFED-4D39-8781-265718CA43DD}.Debug|iPhone.Build.0 = Debug|Any CPU
- {FEA0C318-FFED-4D39-8781-265718CA43DD}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU
- {FEA0C318-FFED-4D39-8781-265718CA43DD}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU
- {FEA0C318-FFED-4D39-8781-265718CA43DD}.Debug|x64.ActiveCfg = Debug|Any CPU
- {FEA0C318-FFED-4D39-8781-265718CA43DD}.Debug|x64.Build.0 = Debug|Any CPU
- {FEA0C318-FFED-4D39-8781-265718CA43DD}.Debug|x86.ActiveCfg = Debug|Any CPU
- {FEA0C318-FFED-4D39-8781-265718CA43DD}.Debug|x86.Build.0 = Debug|Any CPU
- {FEA0C318-FFED-4D39-8781-265718CA43DD}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {FEA0C318-FFED-4D39-8781-265718CA43DD}.Release|Any CPU.Build.0 = Release|Any CPU
- {FEA0C318-FFED-4D39-8781-265718CA43DD}.Release|ARM.ActiveCfg = Release|Any CPU
- {FEA0C318-FFED-4D39-8781-265718CA43DD}.Release|ARM.Build.0 = Release|Any CPU
- {FEA0C318-FFED-4D39-8781-265718CA43DD}.Release|iPhone.ActiveCfg = Release|Any CPU
- {FEA0C318-FFED-4D39-8781-265718CA43DD}.Release|iPhone.Build.0 = Release|Any CPU
- {FEA0C318-FFED-4D39-8781-265718CA43DD}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
- {FEA0C318-FFED-4D39-8781-265718CA43DD}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
- {FEA0C318-FFED-4D39-8781-265718CA43DD}.Release|x64.ActiveCfg = Release|Any CPU
- {FEA0C318-FFED-4D39-8781-265718CA43DD}.Release|x64.Build.0 = Release|Any CPU
- {FEA0C318-FFED-4D39-8781-265718CA43DD}.Release|x86.ActiveCfg = Release|Any CPU
- {FEA0C318-FFED-4D39-8781-265718CA43DD}.Release|x86.Build.0 = Release|Any CPU
{F16E3C6A-1C94-4EAB-BE91-099618060B68}.Ad-Hoc|Any CPU.ActiveCfg = Debug|Any CPU
{F16E3C6A-1C94-4EAB-BE91-099618060B68}.Ad-Hoc|Any CPU.Build.0 = Debug|Any CPU
{F16E3C6A-1C94-4EAB-BE91-099618060B68}.Ad-Hoc|ARM.ActiveCfg = Debug|Any CPU
@@ -1262,6 +1267,150 @@ Global
{DF395F85-B010-465D-857A-7EBCC512C0C2}.Release|x64.Build.0 = Release|Any CPU
{DF395F85-B010-465D-857A-7EBCC512C0C2}.Release|x86.ActiveCfg = Release|Any CPU
{DF395F85-B010-465D-857A-7EBCC512C0C2}.Release|x86.Build.0 = Release|Any CPU
+ {69AF10D3-AA76-4FF7-B187-EC7E8CC5F5B8}.Ad-Hoc|Any CPU.ActiveCfg = Debug|Any CPU
+ {69AF10D3-AA76-4FF7-B187-EC7E8CC5F5B8}.Ad-Hoc|Any CPU.Build.0 = Debug|Any CPU
+ {69AF10D3-AA76-4FF7-B187-EC7E8CC5F5B8}.Ad-Hoc|ARM.ActiveCfg = Debug|Any CPU
+ {69AF10D3-AA76-4FF7-B187-EC7E8CC5F5B8}.Ad-Hoc|ARM.Build.0 = Debug|Any CPU
+ {69AF10D3-AA76-4FF7-B187-EC7E8CC5F5B8}.Ad-Hoc|iPhone.ActiveCfg = Debug|Any CPU
+ {69AF10D3-AA76-4FF7-B187-EC7E8CC5F5B8}.Ad-Hoc|iPhone.Build.0 = Debug|Any CPU
+ {69AF10D3-AA76-4FF7-B187-EC7E8CC5F5B8}.Ad-Hoc|iPhoneSimulator.ActiveCfg = Debug|Any CPU
+ {69AF10D3-AA76-4FF7-B187-EC7E8CC5F5B8}.Ad-Hoc|iPhoneSimulator.Build.0 = Debug|Any CPU
+ {69AF10D3-AA76-4FF7-B187-EC7E8CC5F5B8}.Ad-Hoc|x64.ActiveCfg = Debug|Any CPU
+ {69AF10D3-AA76-4FF7-B187-EC7E8CC5F5B8}.Ad-Hoc|x64.Build.0 = Debug|Any CPU
+ {69AF10D3-AA76-4FF7-B187-EC7E8CC5F5B8}.Ad-Hoc|x86.ActiveCfg = Debug|Any CPU
+ {69AF10D3-AA76-4FF7-B187-EC7E8CC5F5B8}.Ad-Hoc|x86.Build.0 = Debug|Any CPU
+ {69AF10D3-AA76-4FF7-B187-EC7E8CC5F5B8}.AppStore|Any CPU.ActiveCfg = Debug|Any CPU
+ {69AF10D3-AA76-4FF7-B187-EC7E8CC5F5B8}.AppStore|Any CPU.Build.0 = Debug|Any CPU
+ {69AF10D3-AA76-4FF7-B187-EC7E8CC5F5B8}.AppStore|ARM.ActiveCfg = Debug|Any CPU
+ {69AF10D3-AA76-4FF7-B187-EC7E8CC5F5B8}.AppStore|ARM.Build.0 = Debug|Any CPU
+ {69AF10D3-AA76-4FF7-B187-EC7E8CC5F5B8}.AppStore|iPhone.ActiveCfg = Debug|Any CPU
+ {69AF10D3-AA76-4FF7-B187-EC7E8CC5F5B8}.AppStore|iPhone.Build.0 = Debug|Any CPU
+ {69AF10D3-AA76-4FF7-B187-EC7E8CC5F5B8}.AppStore|iPhoneSimulator.ActiveCfg = Debug|Any CPU
+ {69AF10D3-AA76-4FF7-B187-EC7E8CC5F5B8}.AppStore|iPhoneSimulator.Build.0 = Debug|Any CPU
+ {69AF10D3-AA76-4FF7-B187-EC7E8CC5F5B8}.AppStore|x64.ActiveCfg = Debug|Any CPU
+ {69AF10D3-AA76-4FF7-B187-EC7E8CC5F5B8}.AppStore|x64.Build.0 = Debug|Any CPU
+ {69AF10D3-AA76-4FF7-B187-EC7E8CC5F5B8}.AppStore|x86.ActiveCfg = Debug|Any CPU
+ {69AF10D3-AA76-4FF7-B187-EC7E8CC5F5B8}.AppStore|x86.Build.0 = Debug|Any CPU
+ {69AF10D3-AA76-4FF7-B187-EC7E8CC5F5B8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {69AF10D3-AA76-4FF7-B187-EC7E8CC5F5B8}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {69AF10D3-AA76-4FF7-B187-EC7E8CC5F5B8}.Debug|ARM.ActiveCfg = Debug|Any CPU
+ {69AF10D3-AA76-4FF7-B187-EC7E8CC5F5B8}.Debug|ARM.Build.0 = Debug|Any CPU
+ {69AF10D3-AA76-4FF7-B187-EC7E8CC5F5B8}.Debug|iPhone.ActiveCfg = Debug|Any CPU
+ {69AF10D3-AA76-4FF7-B187-EC7E8CC5F5B8}.Debug|iPhone.Build.0 = Debug|Any CPU
+ {69AF10D3-AA76-4FF7-B187-EC7E8CC5F5B8}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU
+ {69AF10D3-AA76-4FF7-B187-EC7E8CC5F5B8}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU
+ {69AF10D3-AA76-4FF7-B187-EC7E8CC5F5B8}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {69AF10D3-AA76-4FF7-B187-EC7E8CC5F5B8}.Debug|x64.Build.0 = Debug|Any CPU
+ {69AF10D3-AA76-4FF7-B187-EC7E8CC5F5B8}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {69AF10D3-AA76-4FF7-B187-EC7E8CC5F5B8}.Debug|x86.Build.0 = Debug|Any CPU
+ {69AF10D3-AA76-4FF7-B187-EC7E8CC5F5B8}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {69AF10D3-AA76-4FF7-B187-EC7E8CC5F5B8}.Release|Any CPU.Build.0 = Release|Any CPU
+ {69AF10D3-AA76-4FF7-B187-EC7E8CC5F5B8}.Release|ARM.ActiveCfg = Release|Any CPU
+ {69AF10D3-AA76-4FF7-B187-EC7E8CC5F5B8}.Release|ARM.Build.0 = Release|Any CPU
+ {69AF10D3-AA76-4FF7-B187-EC7E8CC5F5B8}.Release|iPhone.ActiveCfg = Release|Any CPU
+ {69AF10D3-AA76-4FF7-B187-EC7E8CC5F5B8}.Release|iPhone.Build.0 = Release|Any CPU
+ {69AF10D3-AA76-4FF7-B187-EC7E8CC5F5B8}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
+ {69AF10D3-AA76-4FF7-B187-EC7E8CC5F5B8}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
+ {69AF10D3-AA76-4FF7-B187-EC7E8CC5F5B8}.Release|x64.ActiveCfg = Release|Any CPU
+ {69AF10D3-AA76-4FF7-B187-EC7E8CC5F5B8}.Release|x64.Build.0 = Release|Any CPU
+ {69AF10D3-AA76-4FF7-B187-EC7E8CC5F5B8}.Release|x86.ActiveCfg = Release|Any CPU
+ {69AF10D3-AA76-4FF7-B187-EC7E8CC5F5B8}.Release|x86.Build.0 = Release|Any CPU
+ {768C887F-C229-4B94-ACD8-0C7F65686524}.Ad-Hoc|Any CPU.ActiveCfg = Debug|Any CPU
+ {768C887F-C229-4B94-ACD8-0C7F65686524}.Ad-Hoc|Any CPU.Build.0 = Debug|Any CPU
+ {768C887F-C229-4B94-ACD8-0C7F65686524}.Ad-Hoc|ARM.ActiveCfg = Debug|Any CPU
+ {768C887F-C229-4B94-ACD8-0C7F65686524}.Ad-Hoc|ARM.Build.0 = Debug|Any CPU
+ {768C887F-C229-4B94-ACD8-0C7F65686524}.Ad-Hoc|iPhone.ActiveCfg = Debug|Any CPU
+ {768C887F-C229-4B94-ACD8-0C7F65686524}.Ad-Hoc|iPhone.Build.0 = Debug|Any CPU
+ {768C887F-C229-4B94-ACD8-0C7F65686524}.Ad-Hoc|iPhoneSimulator.ActiveCfg = Debug|Any CPU
+ {768C887F-C229-4B94-ACD8-0C7F65686524}.Ad-Hoc|iPhoneSimulator.Build.0 = Debug|Any CPU
+ {768C887F-C229-4B94-ACD8-0C7F65686524}.Ad-Hoc|x64.ActiveCfg = Debug|Any CPU
+ {768C887F-C229-4B94-ACD8-0C7F65686524}.Ad-Hoc|x64.Build.0 = Debug|Any CPU
+ {768C887F-C229-4B94-ACD8-0C7F65686524}.Ad-Hoc|x86.ActiveCfg = Debug|Any CPU
+ {768C887F-C229-4B94-ACD8-0C7F65686524}.Ad-Hoc|x86.Build.0 = Debug|Any CPU
+ {768C887F-C229-4B94-ACD8-0C7F65686524}.AppStore|Any CPU.ActiveCfg = Debug|Any CPU
+ {768C887F-C229-4B94-ACD8-0C7F65686524}.AppStore|Any CPU.Build.0 = Debug|Any CPU
+ {768C887F-C229-4B94-ACD8-0C7F65686524}.AppStore|ARM.ActiveCfg = Debug|Any CPU
+ {768C887F-C229-4B94-ACD8-0C7F65686524}.AppStore|ARM.Build.0 = Debug|Any CPU
+ {768C887F-C229-4B94-ACD8-0C7F65686524}.AppStore|iPhone.ActiveCfg = Debug|Any CPU
+ {768C887F-C229-4B94-ACD8-0C7F65686524}.AppStore|iPhone.Build.0 = Debug|Any CPU
+ {768C887F-C229-4B94-ACD8-0C7F65686524}.AppStore|iPhoneSimulator.ActiveCfg = Debug|Any CPU
+ {768C887F-C229-4B94-ACD8-0C7F65686524}.AppStore|iPhoneSimulator.Build.0 = Debug|Any CPU
+ {768C887F-C229-4B94-ACD8-0C7F65686524}.AppStore|x64.ActiveCfg = Debug|Any CPU
+ {768C887F-C229-4B94-ACD8-0C7F65686524}.AppStore|x64.Build.0 = Debug|Any CPU
+ {768C887F-C229-4B94-ACD8-0C7F65686524}.AppStore|x86.ActiveCfg = Debug|Any CPU
+ {768C887F-C229-4B94-ACD8-0C7F65686524}.AppStore|x86.Build.0 = Debug|Any CPU
+ {768C887F-C229-4B94-ACD8-0C7F65686524}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {768C887F-C229-4B94-ACD8-0C7F65686524}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {768C887F-C229-4B94-ACD8-0C7F65686524}.Debug|ARM.ActiveCfg = Debug|Any CPU
+ {768C887F-C229-4B94-ACD8-0C7F65686524}.Debug|ARM.Build.0 = Debug|Any CPU
+ {768C887F-C229-4B94-ACD8-0C7F65686524}.Debug|iPhone.ActiveCfg = Debug|Any CPU
+ {768C887F-C229-4B94-ACD8-0C7F65686524}.Debug|iPhone.Build.0 = Debug|Any CPU
+ {768C887F-C229-4B94-ACD8-0C7F65686524}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU
+ {768C887F-C229-4B94-ACD8-0C7F65686524}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU
+ {768C887F-C229-4B94-ACD8-0C7F65686524}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {768C887F-C229-4B94-ACD8-0C7F65686524}.Debug|x64.Build.0 = Debug|Any CPU
+ {768C887F-C229-4B94-ACD8-0C7F65686524}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {768C887F-C229-4B94-ACD8-0C7F65686524}.Debug|x86.Build.0 = Debug|Any CPU
+ {768C887F-C229-4B94-ACD8-0C7F65686524}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {768C887F-C229-4B94-ACD8-0C7F65686524}.Release|Any CPU.Build.0 = Release|Any CPU
+ {768C887F-C229-4B94-ACD8-0C7F65686524}.Release|ARM.ActiveCfg = Release|Any CPU
+ {768C887F-C229-4B94-ACD8-0C7F65686524}.Release|ARM.Build.0 = Release|Any CPU
+ {768C887F-C229-4B94-ACD8-0C7F65686524}.Release|iPhone.ActiveCfg = Release|Any CPU
+ {768C887F-C229-4B94-ACD8-0C7F65686524}.Release|iPhone.Build.0 = Release|Any CPU
+ {768C887F-C229-4B94-ACD8-0C7F65686524}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
+ {768C887F-C229-4B94-ACD8-0C7F65686524}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
+ {768C887F-C229-4B94-ACD8-0C7F65686524}.Release|x64.ActiveCfg = Release|Any CPU
+ {768C887F-C229-4B94-ACD8-0C7F65686524}.Release|x64.Build.0 = Release|Any CPU
+ {768C887F-C229-4B94-ACD8-0C7F65686524}.Release|x86.ActiveCfg = Release|Any CPU
+ {768C887F-C229-4B94-ACD8-0C7F65686524}.Release|x86.Build.0 = Release|Any CPU
+ {969E793C-C413-490E-9C9D-B2B46DA5AF32}.Ad-Hoc|Any CPU.ActiveCfg = Release|Any CPU
+ {969E793C-C413-490E-9C9D-B2B46DA5AF32}.Ad-Hoc|Any CPU.Build.0 = Release|Any CPU
+ {969E793C-C413-490E-9C9D-B2B46DA5AF32}.Ad-Hoc|ARM.ActiveCfg = Release|Any CPU
+ {969E793C-C413-490E-9C9D-B2B46DA5AF32}.Ad-Hoc|ARM.Build.0 = Release|Any CPU
+ {969E793C-C413-490E-9C9D-B2B46DA5AF32}.Ad-Hoc|iPhone.ActiveCfg = Release|Any CPU
+ {969E793C-C413-490E-9C9D-B2B46DA5AF32}.Ad-Hoc|iPhone.Build.0 = Release|Any CPU
+ {969E793C-C413-490E-9C9D-B2B46DA5AF32}.Ad-Hoc|iPhoneSimulator.ActiveCfg = Release|Any CPU
+ {969E793C-C413-490E-9C9D-B2B46DA5AF32}.Ad-Hoc|iPhoneSimulator.Build.0 = Release|Any CPU
+ {969E793C-C413-490E-9C9D-B2B46DA5AF32}.Ad-Hoc|x64.ActiveCfg = Release|Any CPU
+ {969E793C-C413-490E-9C9D-B2B46DA5AF32}.Ad-Hoc|x64.Build.0 = Release|Any CPU
+ {969E793C-C413-490E-9C9D-B2B46DA5AF32}.Ad-Hoc|x86.ActiveCfg = Release|Any CPU
+ {969E793C-C413-490E-9C9D-B2B46DA5AF32}.Ad-Hoc|x86.Build.0 = Release|Any CPU
+ {969E793C-C413-490E-9C9D-B2B46DA5AF32}.AppStore|Any CPU.ActiveCfg = Release|Any CPU
+ {969E793C-C413-490E-9C9D-B2B46DA5AF32}.AppStore|Any CPU.Build.0 = Release|Any CPU
+ {969E793C-C413-490E-9C9D-B2B46DA5AF32}.AppStore|ARM.ActiveCfg = Release|Any CPU
+ {969E793C-C413-490E-9C9D-B2B46DA5AF32}.AppStore|ARM.Build.0 = Release|Any CPU
+ {969E793C-C413-490E-9C9D-B2B46DA5AF32}.AppStore|iPhone.ActiveCfg = Release|Any CPU
+ {969E793C-C413-490E-9C9D-B2B46DA5AF32}.AppStore|iPhone.Build.0 = Release|Any CPU
+ {969E793C-C413-490E-9C9D-B2B46DA5AF32}.AppStore|iPhoneSimulator.ActiveCfg = Release|Any CPU
+ {969E793C-C413-490E-9C9D-B2B46DA5AF32}.AppStore|iPhoneSimulator.Build.0 = Release|Any CPU
+ {969E793C-C413-490E-9C9D-B2B46DA5AF32}.AppStore|x64.ActiveCfg = Release|Any CPU
+ {969E793C-C413-490E-9C9D-B2B46DA5AF32}.AppStore|x64.Build.0 = Release|Any CPU
+ {969E793C-C413-490E-9C9D-B2B46DA5AF32}.AppStore|x86.ActiveCfg = Release|Any CPU
+ {969E793C-C413-490E-9C9D-B2B46DA5AF32}.AppStore|x86.Build.0 = Release|Any CPU
+ {969E793C-C413-490E-9C9D-B2B46DA5AF32}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {969E793C-C413-490E-9C9D-B2B46DA5AF32}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {969E793C-C413-490E-9C9D-B2B46DA5AF32}.Debug|ARM.ActiveCfg = Debug|Any CPU
+ {969E793C-C413-490E-9C9D-B2B46DA5AF32}.Debug|ARM.Build.0 = Debug|Any CPU
+ {969E793C-C413-490E-9C9D-B2B46DA5AF32}.Debug|iPhone.ActiveCfg = Debug|Any CPU
+ {969E793C-C413-490E-9C9D-B2B46DA5AF32}.Debug|iPhone.Build.0 = Debug|Any CPU
+ {969E793C-C413-490E-9C9D-B2B46DA5AF32}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU
+ {969E793C-C413-490E-9C9D-B2B46DA5AF32}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU
+ {969E793C-C413-490E-9C9D-B2B46DA5AF32}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {969E793C-C413-490E-9C9D-B2B46DA5AF32}.Debug|x64.Build.0 = Debug|Any CPU
+ {969E793C-C413-490E-9C9D-B2B46DA5AF32}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {969E793C-C413-490E-9C9D-B2B46DA5AF32}.Debug|x86.Build.0 = Debug|Any CPU
+ {969E793C-C413-490E-9C9D-B2B46DA5AF32}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {969E793C-C413-490E-9C9D-B2B46DA5AF32}.Release|Any CPU.Build.0 = Release|Any CPU
+ {969E793C-C413-490E-9C9D-B2B46DA5AF32}.Release|ARM.ActiveCfg = Release|Any CPU
+ {969E793C-C413-490E-9C9D-B2B46DA5AF32}.Release|ARM.Build.0 = Release|Any CPU
+ {969E793C-C413-490E-9C9D-B2B46DA5AF32}.Release|iPhone.ActiveCfg = Release|Any CPU
+ {969E793C-C413-490E-9C9D-B2B46DA5AF32}.Release|iPhone.Build.0 = Release|Any CPU
+ {969E793C-C413-490E-9C9D-B2B46DA5AF32}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
+ {969E793C-C413-490E-9C9D-B2B46DA5AF32}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
+ {969E793C-C413-490E-9C9D-B2B46DA5AF32}.Release|x64.ActiveCfg = Release|Any CPU
+ {969E793C-C413-490E-9C9D-B2B46DA5AF32}.Release|x64.Build.0 = Release|Any CPU
+ {969E793C-C413-490E-9C9D-B2B46DA5AF32}.Release|x86.ActiveCfg = Release|Any CPU
+ {969E793C-C413-490E-9C9D-B2B46DA5AF32}.Release|x86.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
@@ -1300,13 +1449,15 @@ Global
{22A0F9C1-2D4A-4107-95B7-8459E6688BC5} = {A81ECBC2-6B00-4DCD-8388-469174033379}
{4BD76717-3102-4969-8C2C-BAAA3F0263B6} = {A81ECBC2-6B00-4DCD-8388-469174033379}
{4A980AC4-7205-46BF-8CCB-09E44D700FD4} = {807BB76E-B2BB-47A2-A57B-3D1B20FF5E7F}
- {F38B4FF0-0B49-405A-B1B4-F7A5E3BC4C4E} = {91CF7717-08AB-4E65-B10E-0B426F01E2E8}
- {F6E0F0DD-1400-43C3-B5E0-7CC325728C47} = {F38B4FF0-0B49-405A-B1B4-F7A5E3BC4C4E}
+ {F6E0F0DD-1400-43C3-B5E0-7CC325728C47} = {0BD0DB92-2D98-44D9-9AC0-C59186D59B0B}
{41139F64-4046-4F16-96B7-D941D96FA9C6} = {91CF7717-08AB-4E65-B10E-0B426F01E2E8}
{E7581357-FC34-474C-B8F5-307EE3CE05EF} = {41139F64-4046-4F16-96B7-D941D96FA9C6}
{88B22DBB-AA8F-4290-A454-2C109352C345} = {DB0EFB20-B024-4E5E-A75C-52143C131D25}
{23A33F9B-7672-426D-ACF9-FF8436ADC81A} = {88B22DBB-AA8F-4290-A454-2C109352C345}
{A5260DE0-1FDD-467E-9CC1-A028AB081CEE} = {91CF7717-08AB-4E65-B10E-0B426F01E2E8}
{DF395F85-B010-465D-857A-7EBCC512C0C2} = {A5260DE0-1FDD-467E-9CC1-A028AB081CEE}
+ {69AF10D3-AA76-4FF7-B187-EC7E8CC5F5B8} = {807BB76E-B2BB-47A2-A57B-3D1B20FF5E7F}
+ {768C887F-C229-4B94-ACD8-0C7F65686524} = {A81ECBC2-6B00-4DCD-8388-469174033379}
+ {969E793C-C413-490E-9C9D-B2B46DA5AF32} = {EF0337F2-ED00-4643-89FD-EE10863F1870}
EndGlobalSection
EndGlobal
diff --git a/eShopOnContainers.sln b/eShopOnContainers.sln
index 0650b6465..67c8993d6 100644
--- a/eShopOnContainers.sln
+++ b/eShopOnContainers.sln
@@ -1,8 +1,20 @@
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
-VisualStudioVersion = 15.0.26430.6
+VisualStudioVersion = 15.0.26430.13
MinimumVisualStudioVersion = 10.0.40219.1
+Project("{E53339B2-1760-4266-BCC7-CA923CBCF16C}") = "docker-compose", "docker-compose.dcproj", "{FEA0C318-FFED-4D39-8781-265718CA43DD}"
+ ProjectSection(ProjectDependencies) = postProject
+ {A579E108-5445-403D-A407-339AC4D1611B} = {A579E108-5445-403D-A407-339AC4D1611B}
+ {9842DB3A-1391-48C7-A49C-2FABD0A18AC2} = {9842DB3A-1391-48C7-A49C-2FABD0A18AC2}
+ {23FB706A-2701-41E9-8BF9-28936001CA41} = {23FB706A-2701-41E9-8BF9-28936001CA41}
+ {F0333D8E-0B27-42B7-B2C6-78F3657624E2} = {F0333D8E-0B27-42B7-B2C6-78F3657624E2}
+ {42681D9D-750A-4DF7-BD9F-9292CFD5C253} = {42681D9D-750A-4DF7-BD9F-9292CFD5C253}
+ {2110CBB0-3B38-4EE4-A743-DF6968D80D90} = {2110CBB0-3B38-4EE4-A743-DF6968D80D90}
+ {231226CE-690B-4979-8870-9A79D80928E2} = {231226CE-690B-4979-8870-9A79D80928E2}
+ {2DA840CE-FCEA-4CF7-B1A1-ADD7775E7357} = {2DA840CE-FCEA-4CF7-B1A1-ADD7775E7357}
+ EndProjectSection
+EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{932D8224-11F6-4D07-B109-DA28AD288A63}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Services", "Services", "{91CF7717-08AB-4E65-B10E-0B426F01E2E8}"
@@ -49,7 +61,7 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "eShopOnContainers.UnitTests
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "eShopOnContainers.TestRunner.Droid", "src\Mobile\eShopOnContainers\eShopOnContainers.TestRunner.Droid\eShopOnContainers.TestRunner.Droid.csproj", "{A289A7F0-ACD8-42AE-87B6-AB1AFD310BF1}"
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "eShopOnContainers.TestRunner.Windows", "src\Mobile\eShopOnContainers\eShopOnContainers.TestRunner.Windows\eShopOnContainers.TestRunner.Windows.csproj", "{02680C26-CA1D-4D9D-A7E3-D66AF5BE6F2F}"
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "eShopOnContainers.TestRunner.Windows", "src\Mobile\eShopOnContainers\eShopOnContainers.TestRunner.Windows\eShopOnContainers.TestRunner.Windows.csproj", "{A7337243-33B8-463A-87AD-944B75EFD820}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "eShopOnContainers.TestRunner.iOS", "src\Mobile\eShopOnContainers\eShopOnContainers.TestRunner.iOS\eShopOnContainers.TestRunner.iOS.csproj", "{B68C2B56-7581-46AE-B55D-D25DDFD3BFE3}"
EndProject
@@ -67,18 +79,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "UnitTest", "test\Services\U
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Identity.API", "src\Services\Identity\Identity.API\Identity.API.csproj", "{A579E108-5445-403D-A407-339AC4D1611B}"
EndProject
-Project("{E53339B2-1760-4266-BCC7-CA923CBCF16C}") = "docker-compose", "docker-compose.dcproj", "{FEA0C318-FFED-4D39-8781-265718CA43DD}"
- ProjectSection(ProjectDependencies) = postProject
- {A579E108-5445-403D-A407-339AC4D1611B} = {A579E108-5445-403D-A407-339AC4D1611B}
- {9842DB3A-1391-48C7-A49C-2FABD0A18AC2} = {9842DB3A-1391-48C7-A49C-2FABD0A18AC2}
- {23FB706A-2701-41E9-8BF9-28936001CA41} = {23FB706A-2701-41E9-8BF9-28936001CA41}
- {F0333D8E-0B27-42B7-B2C6-78F3657624E2} = {F0333D8E-0B27-42B7-B2C6-78F3657624E2}
- {42681D9D-750A-4DF7-BD9F-9292CFD5C253} = {42681D9D-750A-4DF7-BD9F-9292CFD5C253}
- {2110CBB0-3B38-4EE4-A743-DF6968D80D90} = {2110CBB0-3B38-4EE4-A743-DF6968D80D90}
- {231226CE-690B-4979-8870-9A79D80928E2} = {231226CE-690B-4979-8870-9A79D80928E2}
- {2DA840CE-FCEA-4CF7-B1A1-ADD7775E7357} = {2DA840CE-FCEA-4CF7-B1A1-ADD7775E7357}
- EndProjectSection
-EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "BuildingBlocks", "BuildingBlocks", "{1EF3AC0F-F27C-46DD-AC53-D762D2C11C45}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "EventBus", "EventBus", "{B473B70F-0796-4862-B1AD-BB742D93B868}"
@@ -133,6 +133,54 @@ Global
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {FEA0C318-FFED-4D39-8781-265718CA43DD}.Ad-Hoc|Any CPU.ActiveCfg = Debug|Any CPU
+ {FEA0C318-FFED-4D39-8781-265718CA43DD}.Ad-Hoc|Any CPU.Build.0 = Debug|Any CPU
+ {FEA0C318-FFED-4D39-8781-265718CA43DD}.Ad-Hoc|ARM.ActiveCfg = Debug|Any CPU
+ {FEA0C318-FFED-4D39-8781-265718CA43DD}.Ad-Hoc|ARM.Build.0 = Debug|Any CPU
+ {FEA0C318-FFED-4D39-8781-265718CA43DD}.Ad-Hoc|iPhone.ActiveCfg = Debug|Any CPU
+ {FEA0C318-FFED-4D39-8781-265718CA43DD}.Ad-Hoc|iPhone.Build.0 = Debug|Any CPU
+ {FEA0C318-FFED-4D39-8781-265718CA43DD}.Ad-Hoc|iPhoneSimulator.ActiveCfg = Debug|Any CPU
+ {FEA0C318-FFED-4D39-8781-265718CA43DD}.Ad-Hoc|iPhoneSimulator.Build.0 = Debug|Any CPU
+ {FEA0C318-FFED-4D39-8781-265718CA43DD}.Ad-Hoc|x64.ActiveCfg = Debug|Any CPU
+ {FEA0C318-FFED-4D39-8781-265718CA43DD}.Ad-Hoc|x64.Build.0 = Debug|Any CPU
+ {FEA0C318-FFED-4D39-8781-265718CA43DD}.Ad-Hoc|x86.ActiveCfg = Debug|Any CPU
+ {FEA0C318-FFED-4D39-8781-265718CA43DD}.Ad-Hoc|x86.Build.0 = Debug|Any CPU
+ {FEA0C318-FFED-4D39-8781-265718CA43DD}.AppStore|Any CPU.ActiveCfg = Debug|Any CPU
+ {FEA0C318-FFED-4D39-8781-265718CA43DD}.AppStore|Any CPU.Build.0 = Debug|Any CPU
+ {FEA0C318-FFED-4D39-8781-265718CA43DD}.AppStore|ARM.ActiveCfg = Debug|Any CPU
+ {FEA0C318-FFED-4D39-8781-265718CA43DD}.AppStore|ARM.Build.0 = Debug|Any CPU
+ {FEA0C318-FFED-4D39-8781-265718CA43DD}.AppStore|iPhone.ActiveCfg = Debug|Any CPU
+ {FEA0C318-FFED-4D39-8781-265718CA43DD}.AppStore|iPhone.Build.0 = Debug|Any CPU
+ {FEA0C318-FFED-4D39-8781-265718CA43DD}.AppStore|iPhoneSimulator.ActiveCfg = Debug|Any CPU
+ {FEA0C318-FFED-4D39-8781-265718CA43DD}.AppStore|iPhoneSimulator.Build.0 = Debug|Any CPU
+ {FEA0C318-FFED-4D39-8781-265718CA43DD}.AppStore|x64.ActiveCfg = Debug|Any CPU
+ {FEA0C318-FFED-4D39-8781-265718CA43DD}.AppStore|x64.Build.0 = Debug|Any CPU
+ {FEA0C318-FFED-4D39-8781-265718CA43DD}.AppStore|x86.ActiveCfg = Debug|Any CPU
+ {FEA0C318-FFED-4D39-8781-265718CA43DD}.AppStore|x86.Build.0 = Debug|Any CPU
+ {FEA0C318-FFED-4D39-8781-265718CA43DD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {FEA0C318-FFED-4D39-8781-265718CA43DD}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {FEA0C318-FFED-4D39-8781-265718CA43DD}.Debug|ARM.ActiveCfg = Debug|Any CPU
+ {FEA0C318-FFED-4D39-8781-265718CA43DD}.Debug|ARM.Build.0 = Debug|Any CPU
+ {FEA0C318-FFED-4D39-8781-265718CA43DD}.Debug|iPhone.ActiveCfg = Debug|Any CPU
+ {FEA0C318-FFED-4D39-8781-265718CA43DD}.Debug|iPhone.Build.0 = Debug|Any CPU
+ {FEA0C318-FFED-4D39-8781-265718CA43DD}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU
+ {FEA0C318-FFED-4D39-8781-265718CA43DD}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU
+ {FEA0C318-FFED-4D39-8781-265718CA43DD}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {FEA0C318-FFED-4D39-8781-265718CA43DD}.Debug|x64.Build.0 = Debug|Any CPU
+ {FEA0C318-FFED-4D39-8781-265718CA43DD}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {FEA0C318-FFED-4D39-8781-265718CA43DD}.Debug|x86.Build.0 = Debug|Any CPU
+ {FEA0C318-FFED-4D39-8781-265718CA43DD}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {FEA0C318-FFED-4D39-8781-265718CA43DD}.Release|Any CPU.Build.0 = Release|Any CPU
+ {FEA0C318-FFED-4D39-8781-265718CA43DD}.Release|ARM.ActiveCfg = Release|Any CPU
+ {FEA0C318-FFED-4D39-8781-265718CA43DD}.Release|ARM.Build.0 = Release|Any CPU
+ {FEA0C318-FFED-4D39-8781-265718CA43DD}.Release|iPhone.ActiveCfg = Release|Any CPU
+ {FEA0C318-FFED-4D39-8781-265718CA43DD}.Release|iPhone.Build.0 = Release|Any CPU
+ {FEA0C318-FFED-4D39-8781-265718CA43DD}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
+ {FEA0C318-FFED-4D39-8781-265718CA43DD}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
+ {FEA0C318-FFED-4D39-8781-265718CA43DD}.Release|x64.ActiveCfg = Release|Any CPU
+ {FEA0C318-FFED-4D39-8781-265718CA43DD}.Release|x64.Build.0 = Release|Any CPU
+ {FEA0C318-FFED-4D39-8781-265718CA43DD}.Release|x86.ActiveCfg = Release|Any CPU
+ {FEA0C318-FFED-4D39-8781-265718CA43DD}.Release|x86.Build.0 = Release|Any CPU
{2110CBB0-3B38-4EE4-A743-DF6968D80D90}.Ad-Hoc|Any CPU.ActiveCfg = Release|Any CPU
{2110CBB0-3B38-4EE4-A743-DF6968D80D90}.Ad-Hoc|ARM.ActiveCfg = Release|Any CPU
{2110CBB0-3B38-4EE4-A743-DF6968D80D90}.Ad-Hoc|iPhone.ActiveCfg = Release|Any CPU
@@ -599,72 +647,72 @@ Global
{A289A7F0-ACD8-42AE-87B6-AB1AFD310BF1}.Release|x86.ActiveCfg = Release|Any CPU
{A289A7F0-ACD8-42AE-87B6-AB1AFD310BF1}.Release|x86.Build.0 = Release|Any CPU
{A289A7F0-ACD8-42AE-87B6-AB1AFD310BF1}.Release|x86.Deploy.0 = Release|Any CPU
- {02680C26-CA1D-4D9D-A7E3-D66AF5BE6F2F}.Ad-Hoc|Any CPU.ActiveCfg = Release|x64
- {02680C26-CA1D-4D9D-A7E3-D66AF5BE6F2F}.Ad-Hoc|Any CPU.Build.0 = Release|x64
- {02680C26-CA1D-4D9D-A7E3-D66AF5BE6F2F}.Ad-Hoc|Any CPU.Deploy.0 = Release|x64
- {02680C26-CA1D-4D9D-A7E3-D66AF5BE6F2F}.Ad-Hoc|ARM.ActiveCfg = Release|ARM
- {02680C26-CA1D-4D9D-A7E3-D66AF5BE6F2F}.Ad-Hoc|ARM.Build.0 = Release|ARM
- {02680C26-CA1D-4D9D-A7E3-D66AF5BE6F2F}.Ad-Hoc|ARM.Deploy.0 = Release|ARM
- {02680C26-CA1D-4D9D-A7E3-D66AF5BE6F2F}.Ad-Hoc|iPhone.ActiveCfg = Release|x64
- {02680C26-CA1D-4D9D-A7E3-D66AF5BE6F2F}.Ad-Hoc|iPhone.Build.0 = Release|x64
- {02680C26-CA1D-4D9D-A7E3-D66AF5BE6F2F}.Ad-Hoc|iPhone.Deploy.0 = Release|x64
- {02680C26-CA1D-4D9D-A7E3-D66AF5BE6F2F}.Ad-Hoc|iPhoneSimulator.ActiveCfg = Release|x64
- {02680C26-CA1D-4D9D-A7E3-D66AF5BE6F2F}.Ad-Hoc|iPhoneSimulator.Build.0 = Release|x64
- {02680C26-CA1D-4D9D-A7E3-D66AF5BE6F2F}.Ad-Hoc|iPhoneSimulator.Deploy.0 = Release|x64
- {02680C26-CA1D-4D9D-A7E3-D66AF5BE6F2F}.Ad-Hoc|x64.ActiveCfg = Release|x64
- {02680C26-CA1D-4D9D-A7E3-D66AF5BE6F2F}.Ad-Hoc|x64.Build.0 = Release|x64
- {02680C26-CA1D-4D9D-A7E3-D66AF5BE6F2F}.Ad-Hoc|x64.Deploy.0 = Release|x64
- {02680C26-CA1D-4D9D-A7E3-D66AF5BE6F2F}.Ad-Hoc|x86.ActiveCfg = Release|x86
- {02680C26-CA1D-4D9D-A7E3-D66AF5BE6F2F}.Ad-Hoc|x86.Build.0 = Release|x86
- {02680C26-CA1D-4D9D-A7E3-D66AF5BE6F2F}.Ad-Hoc|x86.Deploy.0 = Release|x86
- {02680C26-CA1D-4D9D-A7E3-D66AF5BE6F2F}.AppStore|Any CPU.ActiveCfg = Release|x64
- {02680C26-CA1D-4D9D-A7E3-D66AF5BE6F2F}.AppStore|Any CPU.Build.0 = Release|x64
- {02680C26-CA1D-4D9D-A7E3-D66AF5BE6F2F}.AppStore|Any CPU.Deploy.0 = Release|x64
- {02680C26-CA1D-4D9D-A7E3-D66AF5BE6F2F}.AppStore|ARM.ActiveCfg = Release|ARM
- {02680C26-CA1D-4D9D-A7E3-D66AF5BE6F2F}.AppStore|ARM.Build.0 = Release|ARM
- {02680C26-CA1D-4D9D-A7E3-D66AF5BE6F2F}.AppStore|ARM.Deploy.0 = Release|ARM
- {02680C26-CA1D-4D9D-A7E3-D66AF5BE6F2F}.AppStore|iPhone.ActiveCfg = Release|x64
- {02680C26-CA1D-4D9D-A7E3-D66AF5BE6F2F}.AppStore|iPhone.Build.0 = Release|x64
- {02680C26-CA1D-4D9D-A7E3-D66AF5BE6F2F}.AppStore|iPhone.Deploy.0 = Release|x64
- {02680C26-CA1D-4D9D-A7E3-D66AF5BE6F2F}.AppStore|iPhoneSimulator.ActiveCfg = Release|x64
- {02680C26-CA1D-4D9D-A7E3-D66AF5BE6F2F}.AppStore|iPhoneSimulator.Build.0 = Release|x64
- {02680C26-CA1D-4D9D-A7E3-D66AF5BE6F2F}.AppStore|iPhoneSimulator.Deploy.0 = Release|x64
- {02680C26-CA1D-4D9D-A7E3-D66AF5BE6F2F}.AppStore|x64.ActiveCfg = Release|x64
- {02680C26-CA1D-4D9D-A7E3-D66AF5BE6F2F}.AppStore|x64.Build.0 = Release|x64
- {02680C26-CA1D-4D9D-A7E3-D66AF5BE6F2F}.AppStore|x64.Deploy.0 = Release|x64
- {02680C26-CA1D-4D9D-A7E3-D66AF5BE6F2F}.AppStore|x86.ActiveCfg = Release|x86
- {02680C26-CA1D-4D9D-A7E3-D66AF5BE6F2F}.AppStore|x86.Build.0 = Release|x86
- {02680C26-CA1D-4D9D-A7E3-D66AF5BE6F2F}.AppStore|x86.Deploy.0 = Release|x86
- {02680C26-CA1D-4D9D-A7E3-D66AF5BE6F2F}.Debug|Any CPU.ActiveCfg = Debug|x86
- {02680C26-CA1D-4D9D-A7E3-D66AF5BE6F2F}.Debug|Any CPU.Build.0 = Debug|x86
- {02680C26-CA1D-4D9D-A7E3-D66AF5BE6F2F}.Debug|Any CPU.Deploy.0 = Debug|x86
- {02680C26-CA1D-4D9D-A7E3-D66AF5BE6F2F}.Debug|ARM.ActiveCfg = Debug|ARM
- {02680C26-CA1D-4D9D-A7E3-D66AF5BE6F2F}.Debug|ARM.Build.0 = Debug|ARM
- {02680C26-CA1D-4D9D-A7E3-D66AF5BE6F2F}.Debug|ARM.Deploy.0 = Debug|ARM
- {02680C26-CA1D-4D9D-A7E3-D66AF5BE6F2F}.Debug|iPhone.ActiveCfg = Debug|x86
- {02680C26-CA1D-4D9D-A7E3-D66AF5BE6F2F}.Debug|iPhone.Build.0 = Debug|x86
- {02680C26-CA1D-4D9D-A7E3-D66AF5BE6F2F}.Debug|iPhone.Deploy.0 = Debug|x86
- {02680C26-CA1D-4D9D-A7E3-D66AF5BE6F2F}.Debug|iPhoneSimulator.ActiveCfg = Debug|x86
- {02680C26-CA1D-4D9D-A7E3-D66AF5BE6F2F}.Debug|iPhoneSimulator.Build.0 = Debug|x86
- {02680C26-CA1D-4D9D-A7E3-D66AF5BE6F2F}.Debug|iPhoneSimulator.Deploy.0 = Debug|x86
- {02680C26-CA1D-4D9D-A7E3-D66AF5BE6F2F}.Debug|x64.ActiveCfg = Debug|x64
- {02680C26-CA1D-4D9D-A7E3-D66AF5BE6F2F}.Debug|x64.Build.0 = Debug|x64
- {02680C26-CA1D-4D9D-A7E3-D66AF5BE6F2F}.Debug|x64.Deploy.0 = Debug|x64
- {02680C26-CA1D-4D9D-A7E3-D66AF5BE6F2F}.Debug|x86.ActiveCfg = Debug|x86
- {02680C26-CA1D-4D9D-A7E3-D66AF5BE6F2F}.Debug|x86.Build.0 = Debug|x86
- {02680C26-CA1D-4D9D-A7E3-D66AF5BE6F2F}.Debug|x86.Deploy.0 = Debug|x86
- {02680C26-CA1D-4D9D-A7E3-D66AF5BE6F2F}.Release|Any CPU.ActiveCfg = Release|x86
- {02680C26-CA1D-4D9D-A7E3-D66AF5BE6F2F}.Release|ARM.ActiveCfg = Release|ARM
- {02680C26-CA1D-4D9D-A7E3-D66AF5BE6F2F}.Release|ARM.Build.0 = Release|ARM
- {02680C26-CA1D-4D9D-A7E3-D66AF5BE6F2F}.Release|ARM.Deploy.0 = Release|ARM
- {02680C26-CA1D-4D9D-A7E3-D66AF5BE6F2F}.Release|iPhone.ActiveCfg = Release|x86
- {02680C26-CA1D-4D9D-A7E3-D66AF5BE6F2F}.Release|iPhoneSimulator.ActiveCfg = Release|x86
- {02680C26-CA1D-4D9D-A7E3-D66AF5BE6F2F}.Release|x64.ActiveCfg = Release|x64
- {02680C26-CA1D-4D9D-A7E3-D66AF5BE6F2F}.Release|x64.Build.0 = Release|x64
- {02680C26-CA1D-4D9D-A7E3-D66AF5BE6F2F}.Release|x64.Deploy.0 = Release|x64
- {02680C26-CA1D-4D9D-A7E3-D66AF5BE6F2F}.Release|x86.ActiveCfg = Release|x86
- {02680C26-CA1D-4D9D-A7E3-D66AF5BE6F2F}.Release|x86.Build.0 = Release|x86
- {02680C26-CA1D-4D9D-A7E3-D66AF5BE6F2F}.Release|x86.Deploy.0 = Release|x86
+ {A7337243-33B8-463A-87AD-944B75EFD820}.Ad-Hoc|Any CPU.ActiveCfg = Release|x64
+ {A7337243-33B8-463A-87AD-944B75EFD820}.Ad-Hoc|Any CPU.Build.0 = Release|x64
+ {A7337243-33B8-463A-87AD-944B75EFD820}.Ad-Hoc|Any CPU.Deploy.0 = Release|x64
+ {A7337243-33B8-463A-87AD-944B75EFD820}.Ad-Hoc|ARM.ActiveCfg = Release|ARM
+ {A7337243-33B8-463A-87AD-944B75EFD820}.Ad-Hoc|ARM.Build.0 = Release|ARM
+ {A7337243-33B8-463A-87AD-944B75EFD820}.Ad-Hoc|ARM.Deploy.0 = Release|ARM
+ {A7337243-33B8-463A-87AD-944B75EFD820}.Ad-Hoc|iPhone.ActiveCfg = Release|x64
+ {A7337243-33B8-463A-87AD-944B75EFD820}.Ad-Hoc|iPhone.Build.0 = Release|x64
+ {A7337243-33B8-463A-87AD-944B75EFD820}.Ad-Hoc|iPhone.Deploy.0 = Release|x64
+ {A7337243-33B8-463A-87AD-944B75EFD820}.Ad-Hoc|iPhoneSimulator.ActiveCfg = Release|x64
+ {A7337243-33B8-463A-87AD-944B75EFD820}.Ad-Hoc|iPhoneSimulator.Build.0 = Release|x64
+ {A7337243-33B8-463A-87AD-944B75EFD820}.Ad-Hoc|iPhoneSimulator.Deploy.0 = Release|x64
+ {A7337243-33B8-463A-87AD-944B75EFD820}.Ad-Hoc|x64.ActiveCfg = Release|x64
+ {A7337243-33B8-463A-87AD-944B75EFD820}.Ad-Hoc|x64.Build.0 = Release|x64
+ {A7337243-33B8-463A-87AD-944B75EFD820}.Ad-Hoc|x64.Deploy.0 = Release|x64
+ {A7337243-33B8-463A-87AD-944B75EFD820}.Ad-Hoc|x86.ActiveCfg = Release|x86
+ {A7337243-33B8-463A-87AD-944B75EFD820}.Ad-Hoc|x86.Build.0 = Release|x86
+ {A7337243-33B8-463A-87AD-944B75EFD820}.Ad-Hoc|x86.Deploy.0 = Release|x86
+ {A7337243-33B8-463A-87AD-944B75EFD820}.AppStore|Any CPU.ActiveCfg = Release|x64
+ {A7337243-33B8-463A-87AD-944B75EFD820}.AppStore|Any CPU.Build.0 = Release|x64
+ {A7337243-33B8-463A-87AD-944B75EFD820}.AppStore|Any CPU.Deploy.0 = Release|x64
+ {A7337243-33B8-463A-87AD-944B75EFD820}.AppStore|ARM.ActiveCfg = Release|ARM
+ {A7337243-33B8-463A-87AD-944B75EFD820}.AppStore|ARM.Build.0 = Release|ARM
+ {A7337243-33B8-463A-87AD-944B75EFD820}.AppStore|ARM.Deploy.0 = Release|ARM
+ {A7337243-33B8-463A-87AD-944B75EFD820}.AppStore|iPhone.ActiveCfg = Release|x64
+ {A7337243-33B8-463A-87AD-944B75EFD820}.AppStore|iPhone.Build.0 = Release|x64
+ {A7337243-33B8-463A-87AD-944B75EFD820}.AppStore|iPhone.Deploy.0 = Release|x64
+ {A7337243-33B8-463A-87AD-944B75EFD820}.AppStore|iPhoneSimulator.ActiveCfg = Release|x64
+ {A7337243-33B8-463A-87AD-944B75EFD820}.AppStore|iPhoneSimulator.Build.0 = Release|x64
+ {A7337243-33B8-463A-87AD-944B75EFD820}.AppStore|iPhoneSimulator.Deploy.0 = Release|x64
+ {A7337243-33B8-463A-87AD-944B75EFD820}.AppStore|x64.ActiveCfg = Release|x64
+ {A7337243-33B8-463A-87AD-944B75EFD820}.AppStore|x64.Build.0 = Release|x64
+ {A7337243-33B8-463A-87AD-944B75EFD820}.AppStore|x64.Deploy.0 = Release|x64
+ {A7337243-33B8-463A-87AD-944B75EFD820}.AppStore|x86.ActiveCfg = Release|x86
+ {A7337243-33B8-463A-87AD-944B75EFD820}.AppStore|x86.Build.0 = Release|x86
+ {A7337243-33B8-463A-87AD-944B75EFD820}.AppStore|x86.Deploy.0 = Release|x86
+ {A7337243-33B8-463A-87AD-944B75EFD820}.Debug|Any CPU.ActiveCfg = Debug|x86
+ {A7337243-33B8-463A-87AD-944B75EFD820}.Debug|Any CPU.Build.0 = Debug|x86
+ {A7337243-33B8-463A-87AD-944B75EFD820}.Debug|Any CPU.Deploy.0 = Debug|x86
+ {A7337243-33B8-463A-87AD-944B75EFD820}.Debug|ARM.ActiveCfg = Debug|ARM
+ {A7337243-33B8-463A-87AD-944B75EFD820}.Debug|ARM.Build.0 = Debug|ARM
+ {A7337243-33B8-463A-87AD-944B75EFD820}.Debug|ARM.Deploy.0 = Debug|ARM
+ {A7337243-33B8-463A-87AD-944B75EFD820}.Debug|iPhone.ActiveCfg = Debug|x86
+ {A7337243-33B8-463A-87AD-944B75EFD820}.Debug|iPhone.Build.0 = Debug|x86
+ {A7337243-33B8-463A-87AD-944B75EFD820}.Debug|iPhone.Deploy.0 = Debug|x86
+ {A7337243-33B8-463A-87AD-944B75EFD820}.Debug|iPhoneSimulator.ActiveCfg = Debug|x86
+ {A7337243-33B8-463A-87AD-944B75EFD820}.Debug|iPhoneSimulator.Build.0 = Debug|x86
+ {A7337243-33B8-463A-87AD-944B75EFD820}.Debug|iPhoneSimulator.Deploy.0 = Debug|x86
+ {A7337243-33B8-463A-87AD-944B75EFD820}.Debug|x64.ActiveCfg = Debug|x64
+ {A7337243-33B8-463A-87AD-944B75EFD820}.Debug|x64.Build.0 = Debug|x64
+ {A7337243-33B8-463A-87AD-944B75EFD820}.Debug|x64.Deploy.0 = Debug|x64
+ {A7337243-33B8-463A-87AD-944B75EFD820}.Debug|x86.ActiveCfg = Debug|x86
+ {A7337243-33B8-463A-87AD-944B75EFD820}.Debug|x86.Build.0 = Debug|x86
+ {A7337243-33B8-463A-87AD-944B75EFD820}.Debug|x86.Deploy.0 = Debug|x86
+ {A7337243-33B8-463A-87AD-944B75EFD820}.Release|Any CPU.ActiveCfg = Release|x86
+ {A7337243-33B8-463A-87AD-944B75EFD820}.Release|ARM.ActiveCfg = Release|ARM
+ {A7337243-33B8-463A-87AD-944B75EFD820}.Release|ARM.Build.0 = Release|ARM
+ {A7337243-33B8-463A-87AD-944B75EFD820}.Release|ARM.Deploy.0 = Release|ARM
+ {A7337243-33B8-463A-87AD-944B75EFD820}.Release|iPhone.ActiveCfg = Release|x86
+ {A7337243-33B8-463A-87AD-944B75EFD820}.Release|iPhoneSimulator.ActiveCfg = Release|x86
+ {A7337243-33B8-463A-87AD-944B75EFD820}.Release|x64.ActiveCfg = Release|x64
+ {A7337243-33B8-463A-87AD-944B75EFD820}.Release|x64.Build.0 = Release|x64
+ {A7337243-33B8-463A-87AD-944B75EFD820}.Release|x64.Deploy.0 = Release|x64
+ {A7337243-33B8-463A-87AD-944B75EFD820}.Release|x86.ActiveCfg = Release|x86
+ {A7337243-33B8-463A-87AD-944B75EFD820}.Release|x86.Build.0 = Release|x86
+ {A7337243-33B8-463A-87AD-944B75EFD820}.Release|x86.Deploy.0 = Release|x86
{B68C2B56-7581-46AE-B55D-D25DDFD3BFE3}.Ad-Hoc|Any CPU.ActiveCfg = Ad-Hoc|iPhone
{B68C2B56-7581-46AE-B55D-D25DDFD3BFE3}.Ad-Hoc|ARM.ActiveCfg = Ad-Hoc|iPhone
{B68C2B56-7581-46AE-B55D-D25DDFD3BFE3}.Ad-Hoc|iPhone.ActiveCfg = Ad-Hoc|iPhone
@@ -986,54 +1034,6 @@ Global
{A579E108-5445-403D-A407-339AC4D1611B}.Release|x64.Build.0 = Release|Any CPU
{A579E108-5445-403D-A407-339AC4D1611B}.Release|x86.ActiveCfg = Release|Any CPU
{A579E108-5445-403D-A407-339AC4D1611B}.Release|x86.Build.0 = Release|Any CPU
- {FEA0C318-FFED-4D39-8781-265718CA43DD}.Ad-Hoc|Any CPU.ActiveCfg = Debug|Any CPU
- {FEA0C318-FFED-4D39-8781-265718CA43DD}.Ad-Hoc|Any CPU.Build.0 = Debug|Any CPU
- {FEA0C318-FFED-4D39-8781-265718CA43DD}.Ad-Hoc|ARM.ActiveCfg = Debug|Any CPU
- {FEA0C318-FFED-4D39-8781-265718CA43DD}.Ad-Hoc|ARM.Build.0 = Debug|Any CPU
- {FEA0C318-FFED-4D39-8781-265718CA43DD}.Ad-Hoc|iPhone.ActiveCfg = Debug|Any CPU
- {FEA0C318-FFED-4D39-8781-265718CA43DD}.Ad-Hoc|iPhone.Build.0 = Debug|Any CPU
- {FEA0C318-FFED-4D39-8781-265718CA43DD}.Ad-Hoc|iPhoneSimulator.ActiveCfg = Debug|Any CPU
- {FEA0C318-FFED-4D39-8781-265718CA43DD}.Ad-Hoc|iPhoneSimulator.Build.0 = Debug|Any CPU
- {FEA0C318-FFED-4D39-8781-265718CA43DD}.Ad-Hoc|x64.ActiveCfg = Debug|Any CPU
- {FEA0C318-FFED-4D39-8781-265718CA43DD}.Ad-Hoc|x64.Build.0 = Debug|Any CPU
- {FEA0C318-FFED-4D39-8781-265718CA43DD}.Ad-Hoc|x86.ActiveCfg = Debug|Any CPU
- {FEA0C318-FFED-4D39-8781-265718CA43DD}.Ad-Hoc|x86.Build.0 = Debug|Any CPU
- {FEA0C318-FFED-4D39-8781-265718CA43DD}.AppStore|Any CPU.ActiveCfg = Debug|Any CPU
- {FEA0C318-FFED-4D39-8781-265718CA43DD}.AppStore|Any CPU.Build.0 = Debug|Any CPU
- {FEA0C318-FFED-4D39-8781-265718CA43DD}.AppStore|ARM.ActiveCfg = Debug|Any CPU
- {FEA0C318-FFED-4D39-8781-265718CA43DD}.AppStore|ARM.Build.0 = Debug|Any CPU
- {FEA0C318-FFED-4D39-8781-265718CA43DD}.AppStore|iPhone.ActiveCfg = Debug|Any CPU
- {FEA0C318-FFED-4D39-8781-265718CA43DD}.AppStore|iPhone.Build.0 = Debug|Any CPU
- {FEA0C318-FFED-4D39-8781-265718CA43DD}.AppStore|iPhoneSimulator.ActiveCfg = Debug|Any CPU
- {FEA0C318-FFED-4D39-8781-265718CA43DD}.AppStore|iPhoneSimulator.Build.0 = Debug|Any CPU
- {FEA0C318-FFED-4D39-8781-265718CA43DD}.AppStore|x64.ActiveCfg = Debug|Any CPU
- {FEA0C318-FFED-4D39-8781-265718CA43DD}.AppStore|x64.Build.0 = Debug|Any CPU
- {FEA0C318-FFED-4D39-8781-265718CA43DD}.AppStore|x86.ActiveCfg = Debug|Any CPU
- {FEA0C318-FFED-4D39-8781-265718CA43DD}.AppStore|x86.Build.0 = Debug|Any CPU
- {FEA0C318-FFED-4D39-8781-265718CA43DD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {FEA0C318-FFED-4D39-8781-265718CA43DD}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {FEA0C318-FFED-4D39-8781-265718CA43DD}.Debug|ARM.ActiveCfg = Debug|Any CPU
- {FEA0C318-FFED-4D39-8781-265718CA43DD}.Debug|ARM.Build.0 = Debug|Any CPU
- {FEA0C318-FFED-4D39-8781-265718CA43DD}.Debug|iPhone.ActiveCfg = Debug|Any CPU
- {FEA0C318-FFED-4D39-8781-265718CA43DD}.Debug|iPhone.Build.0 = Debug|Any CPU
- {FEA0C318-FFED-4D39-8781-265718CA43DD}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU
- {FEA0C318-FFED-4D39-8781-265718CA43DD}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU
- {FEA0C318-FFED-4D39-8781-265718CA43DD}.Debug|x64.ActiveCfg = Debug|Any CPU
- {FEA0C318-FFED-4D39-8781-265718CA43DD}.Debug|x64.Build.0 = Debug|Any CPU
- {FEA0C318-FFED-4D39-8781-265718CA43DD}.Debug|x86.ActiveCfg = Debug|Any CPU
- {FEA0C318-FFED-4D39-8781-265718CA43DD}.Debug|x86.Build.0 = Debug|Any CPU
- {FEA0C318-FFED-4D39-8781-265718CA43DD}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {FEA0C318-FFED-4D39-8781-265718CA43DD}.Release|Any CPU.Build.0 = Release|Any CPU
- {FEA0C318-FFED-4D39-8781-265718CA43DD}.Release|ARM.ActiveCfg = Release|Any CPU
- {FEA0C318-FFED-4D39-8781-265718CA43DD}.Release|ARM.Build.0 = Release|Any CPU
- {FEA0C318-FFED-4D39-8781-265718CA43DD}.Release|iPhone.ActiveCfg = Release|Any CPU
- {FEA0C318-FFED-4D39-8781-265718CA43DD}.Release|iPhone.Build.0 = Release|Any CPU
- {FEA0C318-FFED-4D39-8781-265718CA43DD}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
- {FEA0C318-FFED-4D39-8781-265718CA43DD}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
- {FEA0C318-FFED-4D39-8781-265718CA43DD}.Release|x64.ActiveCfg = Release|Any CPU
- {FEA0C318-FFED-4D39-8781-265718CA43DD}.Release|x64.Build.0 = Release|Any CPU
- {FEA0C318-FFED-4D39-8781-265718CA43DD}.Release|x86.ActiveCfg = Release|Any CPU
- {FEA0C318-FFED-4D39-8781-265718CA43DD}.Release|x86.Build.0 = Release|Any CPU
{3D6B7A87-162E-4479-B256-1291BEB503B6}.Ad-Hoc|Any CPU.ActiveCfg = Debug|Any CPU
{3D6B7A87-162E-4479-B256-1291BEB503B6}.Ad-Hoc|Any CPU.Build.0 = Debug|Any CPU
{3D6B7A87-162E-4479-B256-1291BEB503B6}.Ad-Hoc|ARM.ActiveCfg = Debug|Any CPU
@@ -1492,7 +1492,7 @@ Global
{B7B1D395-4E06-4036-BE86-C216756B9367} = {A857AD10-40FF-4303-BEC2-FF1C58D5735E}
{F7B6A162-BC4D-4924-B16A-713F9B0344E7} = {B7B1D395-4E06-4036-BE86-C216756B9367}
{A289A7F0-ACD8-42AE-87B6-AB1AFD310BF1} = {B7B1D395-4E06-4036-BE86-C216756B9367}
- {02680C26-CA1D-4D9D-A7E3-D66AF5BE6F2F} = {B7B1D395-4E06-4036-BE86-C216756B9367}
+ {A7337243-33B8-463A-87AD-944B75EFD820} = {B7B1D395-4E06-4036-BE86-C216756B9367}
{B68C2B56-7581-46AE-B55D-D25DDFD3BFE3} = {B7B1D395-4E06-4036-BE86-C216756B9367}
{95F1F07C-4D92-4742-BD07-E5B805AAB651} = {0BD0DB92-2D98-44D9-9AC0-C59186D59B0B}
{02DF7FEE-C302-433D-A6CD-237A2569F236} = {91CF7717-08AB-4E65-B10E-0B426F01E2E8}
diff --git a/k8s/conf_cloud.yml b/k8s/conf_cloud.yml
new file mode 100644
index 000000000..a7f855095
--- /dev/null
+++ b/k8s/conf_cloud.yml
@@ -0,0 +1,35 @@
+apiVersion: v1
+kind: ConfigMap
+metadata:
+ name: externalcfg
+ labels:
+ app: eshop
+data:
+# Basket.API entries
+ BasketBus: CONNECTION_STRING (NAME OF RABBITMQ CONTAINER OR Endpoint=sb://XXXX in case of using Azure)
+ BasketRedisConStr: REDIS CONNECTION STRING FOR BASKET
+# Catalog.API entries
+ CatalogBus: CONNECTION_STRING (NAME OF RABBITMQ CONTAINER OR Endpoint=sb://XXXX in case of using Azure)
+ CatalogSqlDb: Catalog SQL SERVER CONNECTION STRING (Server=xxxx;Intial Catalog=yyy;....)
+# Identity.API entries
+ IdentitySqlDb: Identity SQL SERVER CONNECTION STRING (Server=xxxx;Intial Catalog=yyy;....)
+# Locations.API entries
+ LocationsBus: CONNECTION_STRING (NAME OF RABBITMQ CONTAINER OR Endpoint=sb://XXXX in case of using Azure)
+ LocationsNoSqlDb: Locations MongoDb ConnectionString
+ LocationsNoSqlDbName: Locations MongoDb database (LocationsDb)
+# Marketing.API entries
+ MarketingBus: CONNECTION_STRING (NAME OF RABBITMQ CONTAINER OR Endpoint=sb://XXXX in case of using Azure)
+ MarketingNoSqlDb: Marketing MongoDb ConnectionString
+ MarketingNoSqlDbName: Marketing MongoDb database (MarketingDb)
+ MarketingSqlDb: Marketing SQL SERVER CONNECTION STRING (Server=xxxx;Intial Catalog=yyy;....)
+# Ordering.API entries
+ OrderingBus: CONNECTION_STRING (NAME OF RABBITMQ CONTAINER OR Endpoint=sb://XXXX in case of using Azure)
+ OrderingSqlDb: Ordering SQL SERVER CONNECTION STRING (Server=xxxx;Intial Catalog=yyy;....)
+# Payment.API entries
+ PaymentBus: CONNECTION_STRING (NAME OF RABBITMQ CONTAINER OR Endpoint=sb://XXXX in case of using Azure)
+# GracePeriodManager entries
+ GracePeriodTime: "5" # Grace period duration (time when you can cancel order) in minutes
+ GracePeriodCheckUpdateTime: "60000" # Interval time to check new Order status (in milliseconds)
+# Global entries
+ UseAzureServiceBus: "TRUE" IF USE AZURE SB ("FALSE" FOR USING RABBITMQ)
+ keystore: REDIS CONNECTION STRING FOR KEYSTORE
\ No newline at end of file
diff --git a/k8s/conf_local.yml b/k8s/conf_local.yml
new file mode 100644
index 000000000..1193fc36d
--- /dev/null
+++ b/k8s/conf_local.yml
@@ -0,0 +1,27 @@
+apiVersion: v1
+kind: ConfigMap
+metadata:
+ name: externalcfg
+ labels:
+ app: eshop
+data:
+ BasketBus: rabbitmq
+ BasketRedisConStr: basket-data
+ CatalogBus: rabbitmq
+ CatalogSqlDb: Server=sql-data;Initial Catalog=Microsoft.eShopOnContainers.Services.CatalogDb;User Id=sa;Password=Pass@word;
+ CatalogAzureStorageEnabled: "False"
+ IdentitySqlDb: Server=sql-data;Initial Catalog=Microsoft.eShopOnContainers.Services.IdentityDb;User Id=sa;Password=Pass@word;
+ LocationsBus: rabbitmq
+ LocationsNoSqlDb: mongodb://nosql-data
+ LocationsNoSqlDbName: LocationsDb
+ MarketingBus: rabbitmq
+ MarketingNoSqlDb: mongodb://nosql-data
+ MarketingNoSqlDbName: MarketingDb
+ MarketingSqlDb: Server=sql-data;Initial Catalog=Microsoft.eShopOnContainers.Services.MarketingDb;User Id=sa;Password=Pass@word;
+ OrderingBus: rabbitmq
+ OrderingSqlDb: Server=sql-data;Initial Catalog=Microsoft.eShopOnContainers.Services.OrderingDb;User Id=sa;Password=Pass@word;
+ PaymentBus: rabbitmq
+ GracePeriodTime: "1"
+ GracePeriodCheckUpdateTime: "60000"
+ UseAzureServiceBus: "False"
+ keystore: keystore-data
diff --git a/k8s/deploy.ps1 b/k8s/deploy.ps1
index 5b6c5732f..70a8ad817 100644
--- a/k8s/deploy.ps1
+++ b/k8s/deploy.ps1
@@ -8,8 +8,10 @@ Param(
[parameter(Mandatory=$false)][string]$imageTag,
[parameter(Mandatory=$false)][string]$externalDns,
[parameter(Mandatory=$false)][bool]$deployCI=$false,
- [parameter(Mandatory=$false)][bool]$buildImages=$false,
- [parameter(Mandatory=$false)][bool]$deployInfrastructure=$true
+ [parameter(Mandatory=$false)][bool]$buildImages=$true,
+ [parameter(Mandatory=$false)][bool]$buildBits=$false,
+ [parameter(Mandatory=$false)][bool]$deployInfrastructure=$true,
+ [parameter(Mandatory=$false)][string]$dockerOrg="eshop"
)
function ExecKube($cmd) {
@@ -39,6 +41,7 @@ if(-not $deployCI) {
}
}
else {
+ $buildBits = false;
$buildImages = false; # Never build images through CI, as they previously built
}
@@ -48,40 +51,39 @@ if ([string]::IsNullOrEmpty($imageTag)) {
}
Write-Host "Docker image Tag: $imageTag" -ForegroundColor Yellow
-# Read config to use
-$config = Get-Content -Raw -Path $configFile | ConvertFrom-Json
-if ($debugMode) {
- Write-Host "[DEBUG]: Using following JSON config: " -ForegroundColor Yellow
- $json = ConvertTo-Json $config -Depth 5
- Write-Host $json
- if (-not $deployCI) {
- Write-Host "[DEBUG]: Press a key " -ForegroundColor Yellow
- [System.Console]::Read()
- }
-}
-
# building and publishing docker images if needed
-if($buildImages) {
+if($buildBits) {
Write-Host "Building and publishing eShopOnContainers..." -ForegroundColor Yellow
dotnet restore ../eShopOnContainers-ServicesAndWebApps.sln
dotnet publish -c Release -o obj/Docker/publish ../eShopOnContainers-ServicesAndWebApps.sln
-
+}
+if ($buildImages) {
Write-Host "Building Docker images tagged with '$imageTag'" -ForegroundColor Yellow
$env:TAG=$imageTag
docker-compose -p .. -f ../docker-compose.yml build
- Write-Host "Pushing images to $registry..." -ForegroundColor Yellow
+ Write-Host "Pushing images to $registry/$dockerOrg..." -ForegroundColor Yellow
$services = ("basket.api", "catalog.api", "identity.api", "ordering.api", "marketing.api","payment.api","locations.api", "webmvc", "webspa", "webstatus")
+
foreach ($service in $services) {
- docker tag eshop/${service}:$imageTag $registry/eshop/${service}:$imageTag
- docker push $registry/eshop/${service}:$imageTag
+ $imageFqdn = if ($useDockerHub) {"$dockerOrg/${service}"} else {"$registry/$dockerOrg/${service}"}
+ docker tag eshop/${service}:$imageTag ${imageFqdn}:$imageTag
+ docker push ${imageFqdn}:$imageTag
}
}
-# Use ACR instead of DockerHub as image repository
-if(-not $useDockerHub) {
- Write-Host "Logging in to $registry" -ForegroundColor Yellow
- docker login -u $dockerUser -p $dockerPassword $registry
+# if we have login/pwd add the secret to k8s
+if (-not [string]::IsNullOrEmpty($dockerUser)) {
+ $registryFDQN = if (-not $useDockerHub) {$registry} else {"index.docker.io/v1/"}
+
+ Write-Host "Logging in to $registryFDQN as user $dockerUser" -ForegroundColor Yellow
+ if ($useDockerHub) {
+ docker login -u $dockerUser -p $dockerPassword
+ }
+ else {
+ docker login -u $dockerUser -p $dockerPassword $registryFDQN
+ }
+
if (-not $LastExitCode -eq 0) {
Write-Host "Login failed" -ForegroundColor Red
exit
@@ -89,7 +91,7 @@ if(-not $useDockerHub) {
# create registry key secret
ExecKube -cmd 'create secret docker-registry registry-key `
- --docker-server=$registry `
+ --docker-server=$registryFDQN `
--docker-username=$dockerUser `
--docker-password=$dockerPassword `
--docker-email=not@used.com'
@@ -132,13 +134,14 @@ Write-Host "Using $externalDns as the external DNS/IP of the k8s cluster"
ExecKube -cmd 'create configmap urls `
--from-literal=BasketUrl=http://basket `
--from-literal=BasketHealthCheckUrl=http://basket/hc `
- --from-literal=CatalogUrl=http://$($frontendUrl)/catalog-api `
+ --from-literal=CatalogUrl=http://$($externalDns)/catalog-api `
--from-literal=CatalogHealthCheckUrl=http://catalog/hc `
- --from-literal=IdentityUrl=http://$($frontendUrl)/identity `
+ --from-literal=PicBaseUrl=http://$($externalDns)/catalog-api/api/v1/pic/ `
+ --from-literal=IdentityUrl=http://$($externalDns)/identity `
--from-literal=IdentityHealthCheckUrl=http://identity/hc `
--from-literal=OrderingUrl=http://ordering `
--from-literal=OrderingHealthCheckUrl=http://ordering/hc `
- --from-literal=MvcClientExternalUrl=http://$($frontendUrl)/webmvc `
+ --from-literal=MvcClientExternalUrl=http://$($externalDns)/webmvc `
--from-literal=WebMvcHealthCheckUrl=http://webmvc/hc `
--from-literal=MvcClientOrderingUrl=http://ordering `
--from-literal=MvcClientCatalogUrl=http://catalog `
@@ -152,48 +155,31 @@ ExecKube -cmd 'create configmap urls `
ExecKube -cmd 'label configmap urls app=eshop'
-Write-Host "Applying external configuration from json" -ForegroundColor Yellow
-
-ExecKube -cmd 'create configmap externalcfg `
- --from-literal=CatalogSqlDb=$($config.sql.catalog) `
- --from-literal=IdentitySqlDb=$($config.sql.identity) `
- --from-literal=OrderingSqlDb=$($config.sql.ordering) `
- --from-literal=MarketingSqlDb=$($config.sql.marketing) `
- --from-literal=LocationsNoSqlDb=$($config.nosql.locations.constr) `
- --from-literal=LocationsNoSqlDbName=$($config.nosql.locations.db) `
- --from-literal=MarketingNoSqlDb=$($config.nosql.marketing.constr) `
- --from-literal=MarketingNoSqlDbName=$($config.nosql.marketing.db) `
- --from-literal=BasketRedisConStr=$($config.redis.basket) `
- --from-literal=LocationsBus=$($config.servicebus.locations) `
- --from-literal=MarketingBus=$($config.servicebus.marketing) `
- --from-literal=BasketBus=$($config.servicebus.basket) `
- --from-literal=OrderingBus=$($config.servicebus.ordering) `
- --from-literal=CatalogBus=$($config.servicebus.catalog) `
- --from-literal=PaymentBus=$($config.servicebus.payment) `
- --from-literal=UseAzureServiceBus=$($config.servicebus.use_azure) `
- --from-literal=keystore=$($config.redis.keystore) '
-ExecKube -cmd 'label configmap externalcfg app=eshop'
+Write-Host "Deploying configuration from $configFile" -ForegroundColor Yellow
+
+ExecKube -cmd "create -f $configFile"
Write-Host "Creating deployments..." -ForegroundColor Yellow
ExecKube -cmd 'create -f deployments.yaml'
# update deployments with the correct image (with tag and/or registry)
-Write-Host "Update Image containers to use prefix '$registry' and tag '$imageTag'" -ForegroundColor Yellow
$registryPath = ""
if (-not [string]::IsNullOrEmpty($registry)) {
$registryPath = "$registry/"
}
-ExecKube -cmd 'set image deployments/basket basket=${registryPath}eshop/basket.api:$imageTag'
-ExecKube -cmd 'set image deployments/catalog catalog=${registryPath}eshop/catalog.api:$imageTag'
-ExecKube -cmd 'set image deployments/identity identity=${registryPath}eshop/identity.api:$imageTag'
-ExecKube -cmd 'set image deployments/ordering ordering=${registryPath}eshop/ordering.api:$imageTag'
-ExecKube -cmd 'set image deployments/marketing marketing=${registryPath}eshop/marketing.api:$imageTag'
-ExecKube -cmd 'set image deployments/locations locations=${registryPath}eshop/locations.api:$imageTag'
-ExecKube -cmd 'set image deployments/payment payment=${registryPath}eshop/payment.api:$imageTag'
-ExecKube -cmd 'set image deployments/webmvc webmvc=${registryPath}eshop/webmvc:$imageTag'
-ExecKube -cmd 'set image deployments/webstatus webstatus=${registryPath}eshop/webstatus:$imageTag'
-ExecKube -cmd 'set image deployments/webspa webspa=${registryPath}eshop/webspa:$imageTag'
+Write-Host "Update Image containers to use prefix '$registry$dockerOrg' and tag '$imageTag'" -ForegroundColor Yellow
+
+ExecKube -cmd 'set image deployments/basket basket=${registryPath}${dockerOrg}/basket.api:$imageTag'
+ExecKube -cmd 'set image deployments/catalog catalog=${registryPath}${dockerOrg}/catalog.api:$imageTag'
+ExecKube -cmd 'set image deployments/identity identity=${registryPath}${dockerOrg}/identity.api:$imageTag'
+ExecKube -cmd 'set image deployments/ordering ordering=${registryPath}${dockerOrg}/ordering.api:$imageTag'
+ExecKube -cmd 'set image deployments/marketing marketing=${registryPath}${dockerOrg}/marketing.api:$imageTag'
+ExecKube -cmd 'set image deployments/locations locations=${registryPath}${dockerOrg}/locations.api:$imageTag'
+ExecKube -cmd 'set image deployments/payment payment=${registryPath}${dockerOrg}/payment.api:$imageTag'
+ExecKube -cmd 'set image deployments/webmvc webmvc=${registryPath}${dockerOrg}/webmvc:$imageTag'
+ExecKube -cmd 'set image deployments/webstatus webstatus=${registryPath}${dockerOrg}/webstatus:$imageTag'
+ExecKube -cmd 'set image deployments/webspa webspa=${registryPath}${dockerOrg}/webspa:$imageTag'
Write-Host "Execute rollout..." -ForegroundColor Yellow
ExecKube -cmd 'rollout resume deployments/basket'
@@ -207,5 +193,5 @@ ExecKube -cmd 'rollout resume deployments/webmvc'
ExecKube -cmd 'rollout resume deployments/webstatus'
ExecKube -cmd 'rollout resume deployments/webspa'
-Write-Host "WebSPA is exposed at http://$frontendUrl, WebMVC at http://$frontendUrl/webmvc, WebStatus at http://$frontendUrl/webstatus" -ForegroundColor Yellow
+Write-Host "WebSPA is exposed at http://$externalDns, WebMVC at http://$externalDns/webmvc, WebStatus at http://$externalDns/webstatus" -ForegroundColor Yellow
diff --git a/k8s/deployments.yaml b/k8s/deployments.yaml
index 0a42f573d..6eec27278 100644
--- a/k8s/deployments.yaml
+++ b/k8s/deployments.yaml
@@ -66,11 +66,16 @@ spec:
configMapKeyRef:
name: externalcfg
key: CatalogSqlDb
- - name: ExternalCatalogBaseUrl
+ - name: PicBaseUrl
valueFrom:
configMapKeyRef:
name: urls
- key: CatalogUrl
+ key: PicBaseUrl
+ - name: AzureStorageEnabled
+ valueFrom:
+ configMapKeyRef:
+ name: urls
+ key: CatalogAzureStorageEnabled
- name: EventBusConnection
valueFrom:
configMapKeyRef:
@@ -173,6 +178,53 @@ spec:
---
apiVersion: extensions/v1beta1
kind: Deployment
+metadata:
+ name: graceperiodmanager
+spec:
+ paused: true
+ template:
+ metadata:
+ labels:
+ app: graceperiodmanager
+ component: ordering
+ spec:
+ containers:
+ - name: graceperiodmanager
+ image: eshop/graceperiodmanager
+ imagePullPolicy: Always
+ env:
+ - name: ConnectionString
+ valueFrom:
+ configMapKeyRef:
+ name: externalcfg
+ key: OrderingSqlDb
+ - name: EventBusConnection
+ valueFrom:
+ configMapKeyRef:
+ name: externalcfg
+ key: GracePeriodManagerBus
+ - name: GracePeriodTime
+ valueFrom:
+ configMapKeyRef:
+ name: externalcfg
+ key: GracePeriodTime
+ - name: CheckUpdateTime
+ valueFrom:
+ configMapKeyRef:
+ name: externalcfg
+ key: GracePeriodCheckUpdateTime
+ - name: AzureServiceBusEnabled
+ valueFrom:
+ configMapKeyRef:
+ name: externalcfg
+ key: UseAzureServiceBus
+ ports:
+ - containerPort: 80
+ imagePullSecrets:
+ - name: registry-key
+---
+apiVersion: extensions/v1beta1
+kind: Deployment
metadata:
name: locations
spec:
diff --git a/k8s/local.json b/k8s/local.json
deleted file mode 100644
index 9f3fef102..000000000
--- a/k8s/local.json
+++ /dev/null
@@ -1,31 +0,0 @@
-{
- "sql": {
- "catalog": "Server=sql-data;Initial Catalog=Microsoft.eShopOnContainers.Services.CatalogDb;User Id=sa;Password=Pass@word;",
- "identity":"Server=sql-data;Initial Catalog=Microsoft.eShopOnContainers.Services.IdentityDb;User Id=sa;Password=Pass@word;",
- "ordering":"Server=sql-data;Initial Catalog=Microsoft.eShopOnContainers.Services.OrderingDb;User Id=sa;Password=Pass@word;",
- "marketing":"Server=sql-data;Initial Catalog=Microsoft.eShopOnContainers.Services.MarketingDb;User Id=sa;Password=Pass@word;"
- },
- "nosql": {
- "locations": {
- "constr": "mongodb://nosql-data",
- "db": "LocationsDb"
- },
- "marketing": {
- "constr": "mongodb://nosql-data",
- "db": "MarketingDb"
- }
- },
- "redis": {
- "basket" : "basket-data",
- "keystore": "keystore-data"
- },
- "servicebus": {
- "use_azure": false,
- "ordering": "rabbitmq",
- "marketing": "rabbitmq",
- "locations": "rabbitmq",
- "payment": "rabbitmq",
- "basket": "rabbitmq",
- "catalog": "rabbitmq"
- }
-}
\ No newline at end of file
diff --git a/k8s/services.yaml b/k8s/services.yaml
index 02b73448a..d88604e88 100644
--- a/k8s/services.yaml
+++ b/k8s/services.yaml
@@ -56,6 +56,20 @@ spec:
---
apiVersion: v1
kind: Service
+metadata:
+ labels:
+ app: eshop
+ component: graceperiodmanager
+ name: graceperiodmanager
+spec:
+ ports:
+ - port: 80
+ selector:
+ app: eshop
+ component: graceperiodmanager
+---
+apiVersion: v1
+kind: Service
metadata:
labels:
app: eshop
diff --git a/src/BuildingBlocks/EventBus/EventBusServiceBus/DefaultServiceBusPersisterConnection.cs b/src/BuildingBlocks/EventBus/EventBusServiceBus/DefaultServiceBusPersisterConnection.cs
new file mode 100644
index 000000000..db1b6b390
--- /dev/null
+++ b/src/BuildingBlocks/EventBus/EventBusServiceBus/DefaultServiceBusPersisterConnection.cs
@@ -0,0 +1,45 @@
+using Microsoft.Azure.ServiceBus;
+using Microsoft.Extensions.Logging;
+using System;
+using System.IO;
+
+namespace Microsoft.eShopOnContainers.BuildingBlocks.EventBusServiceBus
+{
+ public class DefaultServiceBusPersisterConnection :IServiceBusPersisterConnection
+ {
+ private readonly ILogger _logger;
+ private readonly ServiceBusConnectionStringBuilder _serviceBusConnectionStringBuilder;
+ private ITopicClient _topicClient;
+
+ bool _disposed;
+
+ public DefaultServiceBusPersisterConnection(ServiceBusConnectionStringBuilder serviceBusConnectionStringBuilder,
+ ILogger logger)
+ {
+ _logger = logger ?? throw new ArgumentNullException(nameof(logger));
+
+ _serviceBusConnectionStringBuilder = serviceBusConnectionStringBuilder ??
+ throw new ArgumentNullException(nameof(serviceBusConnectionStringBuilder));
+ _topicClient = new TopicClient(_serviceBusConnectionStringBuilder, RetryPolicy.Default);
+ }
+
+ public ServiceBusConnectionStringBuilder ServiceBusConnectionStringBuilder => _serviceBusConnectionStringBuilder;
+
+ public ITopicClient CreateModel()
+ {
+ if(_topicClient.IsClosedOrClosing)
+ {
+ _topicClient = new TopicClient(_serviceBusConnectionStringBuilder, RetryPolicy.Default);
+ }
+
+ return _topicClient;
+ }
+
+ public void Dispose()
+ {
+ if (_disposed) return;
+
+ _disposed = true;
+ }
+ }
+}
diff --git a/src/BuildingBlocks/EventBus/EventBusServiceBus/EventBusServiceBus.cs b/src/BuildingBlocks/EventBus/EventBusServiceBus/EventBusServiceBus.cs
new file mode 100644
index 000000000..24c5fba39
--- /dev/null
+++ b/src/BuildingBlocks/EventBus/EventBusServiceBus/EventBusServiceBus.cs
@@ -0,0 +1,180 @@
+namespace Microsoft.eShopOnContainers.BuildingBlocks.EventBusServiceBus
+{
+ using System;
+ using Microsoft.eShopOnContainers.BuildingBlocks.EventBus.Abstractions;
+ using Microsoft.eShopOnContainers.BuildingBlocks.EventBus.Events;
+ using Microsoft.Extensions.Logging;
+ using Microsoft.Azure.ServiceBus;
+ using Newtonsoft.Json;
+ using System.Text;
+ using System.Threading.Tasks;
+ using Microsoft.eShopOnContainers.BuildingBlocks.EventBus;
+ using System.Reflection;
+ using Microsoft.Azure.ServiceBus.Filters;
+ using Autofac;
+ using Newtonsoft.Json.Linq;
+
+ public class EventBusServiceBus : IEventBus
+ {
+ private readonly IServiceBusPersisterConnection _serviceBusPersisterConnection;
+ private readonly ILogger _logger;
+ private readonly IEventBusSubscriptionsManager _subsManager;
+ private readonly SubscriptionClient _subscriptionClient;
+ private readonly ILifetimeScope _autofac;
+ private readonly string AUTOFAC_SCOPE_NAME = "eshop_event_bus";
+
+ public EventBusServiceBus(IServiceBusPersisterConnection serviceBusPersisterConnection,
+ ILogger logger, IEventBusSubscriptionsManager subsManager, string subscriptionClientName,
+ ILifetimeScope autofac)
+ {
+ _serviceBusPersisterConnection = serviceBusPersisterConnection;
+ _logger = logger;
+ _subsManager = subsManager ?? new InMemoryEventBusSubscriptionsManager();
+
+ _subscriptionClient = new SubscriptionClient(serviceBusPersisterConnection.ServiceBusConnectionStringBuilder,
+ subscriptionClientName);
+ _autofac = autofac;
+
+ RemoveDefaultRule();
+ RegisterSubscriptionClientMessageHandler();
+ }
+
+ public void Publish(IntegrationEvent @event)
+ {
+ var eventName = @event.GetType().Name;
+ var jsonMessage = JsonConvert.SerializeObject(@event);
+ var body = Encoding.UTF8.GetBytes(jsonMessage);
+
+ var message = new Message
+ {
+ MessageId = new Guid().ToString(),
+ Body = Encoding.UTF8.GetBytes(jsonMessage),
+ Label = eventName,
+ };
+
+ var topicClient = _serviceBusPersisterConnection.CreateModel();
+
+ topicClient.SendAsync(message)
+ .GetAwaiter()
+ .GetResult();
+ }
+
+ public void SubscribeDynamic(string eventName)
+ where TH : IDynamicIntegrationEventHandler
+ {
+ _subsManager.AddDynamicSubscription (eventName);
+ }
+
+ public void Subscribe()
+ where T : IntegrationEvent
+ where TH : IIntegrationEventHandler
+ {
+ var eventName = typeof(T).Name;
+ var containsKey = _subsManager.HasSubscriptionsForEvent();
+ if (!containsKey)
+ {
+ try
+ {
+ _subscriptionClient.AddRuleAsync(new RuleDescription
+ {
+ Filter = new CorrelationFilter { Label = eventName },
+ Name = eventName
+ }).GetAwaiter().GetResult();
+ }
+ catch(ServiceBusException)
+ {
+ _logger.LogInformation($"The messaging entity {eventName} already exists.");
+ }
+ }
+
+ _subsManager.AddSubscription();
+ }
+
+ public void Unsubscribe()
+ where T : IntegrationEvent
+ where TH : IIntegrationEventHandler
+ {
+ var eventName = typeof(T).Name;
+
+ try
+ {
+ _subscriptionClient
+ .RemoveRuleAsync(eventName)
+ .GetAwaiter()
+ .GetResult();
+ }
+ catch (MessagingEntityNotFoundException)
+ {
+ _logger.LogInformation($"The messaging entity {eventName} Could not be found.");
+ }
+
+ _subsManager.RemoveSubscription();
+ }
+
+ public void UnsubscribeDynamic(string eventName)
+ where TH : IDynamicIntegrationEventHandler
+ {
+ _subsManager.RemoveDynamicSubscription (eventName);
+ }
+
+ public void Dispose()
+ {
+ _subsManager.Clear();
+ }
+
+ private void RegisterSubscriptionClientMessageHandler()
+ {
+ _subscriptionClient.RegisterMessageHandler(
+ async (message, token) =>
+ {
+ var eventName = message.Label;
+ var messageData = Encoding.UTF8.GetString(message.Body);
+ await ProcessEvent(eventName, messageData);
+ },
+ new MessageHandlerOptions() { MaxConcurrentCalls = 10, AutoComplete = true });
+ }
+
+ private async Task ProcessEvent(string eventName, string message)
+ {
+ if (_subsManager.HasSubscriptionsForEvent(eventName))
+ {
+ using (var scope = _autofac.BeginLifetimeScope(AUTOFAC_SCOPE_NAME))
+ {
+ var subscriptions = _subsManager.GetHandlersForEvent(eventName);
+ foreach (var subscription in subscriptions)
+ {
+ if (subscription.IsDynamic)
+ {
+ var handler = scope.ResolveOptional(subscription.HandlerType) as IDynamicIntegrationEventHandler;
+ dynamic eventData = JObject.Parse(message);
+ await handler.Handle(eventData);
+ }
+ else
+ {
+ var eventType = _subsManager.GetEventTypeByName(eventName);
+ var integrationEvent = JsonConvert.DeserializeObject(message, eventType);
+ var handler = scope.ResolveOptional(subscription.HandlerType);
+ var concreteType = typeof(IIntegrationEventHandler<>).MakeGenericType(eventType);
+ await (Task)concreteType.GetMethod("Handle").Invoke(handler, new object[] { integrationEvent });
+ }
+ }
+ }
+ }
+ }
+
+ private void RemoveDefaultRule()
+ {
+ try
+ {
+ _subscriptionClient
+ .RemoveRuleAsync(SubscriptionClient.DefaultRule)
+ .GetAwaiter()
+ .GetResult();
+ }
+ catch (MessagingEntityNotFoundException)
+ {
+ _logger.LogInformation($"The messaging entity {SubscriptionClient.DefaultRule} Could not be found.");
+ }
+ }
+ }
+}
diff --git a/src/BuildingBlocks/EventBus/EventBusServiceBus/EventBusServiceBus.csproj b/src/BuildingBlocks/EventBus/EventBusServiceBus/EventBusServiceBus.csproj
new file mode 100644
index 000000000..8d640ca1e
--- /dev/null
+++ b/src/BuildingBlocks/EventBus/EventBusServiceBus/EventBusServiceBus.csproj
@@ -0,0 +1,18 @@
+
+
+
+ netcoreapp1.1
+ Microsoft.eShopOnContainers.BuildingBlocks.EventBusServiceBus
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/BuildingBlocks/EventBus/EventBusServiceBus/IServiceBusPersisterConnection.cs b/src/BuildingBlocks/EventBus/EventBusServiceBus/IServiceBusPersisterConnection.cs
new file mode 100644
index 000000000..283031247
--- /dev/null
+++ b/src/BuildingBlocks/EventBus/EventBusServiceBus/IServiceBusPersisterConnection.cs
@@ -0,0 +1,12 @@
+namespace Microsoft.eShopOnContainers.BuildingBlocks.EventBusServiceBus
+{
+ using System;
+ using Microsoft.Azure.ServiceBus;
+
+ public interface IServiceBusPersisterConnection : IDisposable
+ {
+ ServiceBusConnectionStringBuilder ServiceBusConnectionStringBuilder { get; }
+
+ ITopicClient CreateModel();
+ }
+}
\ No newline at end of file
diff --git a/src/BuildingBlocks/HealthChecks/src/Microsoft.Extensions.HealthChecks.AzureStorage/AzureHealthCheckBuilderExtensions.cs b/src/BuildingBlocks/HealthChecks/src/Microsoft.Extensions.HealthChecks.AzureStorage/AzureHealthCheckBuilderExtensions.cs
new file mode 100644
index 000000000..4c917f223
--- /dev/null
+++ b/src/BuildingBlocks/HealthChecks/src/Microsoft.Extensions.HealthChecks.AzureStorage/AzureHealthCheckBuilderExtensions.cs
@@ -0,0 +1,175 @@
+// Copyright (c) .NET Foundation. All rights reserved.
+// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
+
+using System;
+using Microsoft.WindowsAzure.Storage;
+using Microsoft.WindowsAzure.Storage.Auth;
+
+namespace Microsoft.Extensions.HealthChecks
+{
+ // REVIEW: Do we want these to continue to use default parameters?
+ // REVIEW: What are the appropriate guards for these functions?
+
+ public static class AzureHealthCheckBuilderExtensions
+ {
+ public static HealthCheckBuilder AddAzureBlobStorageCheck(this HealthCheckBuilder builder, string accountName, string accountKey, string containerName = null, TimeSpan? cacheDuration = null)
+ {
+ var credentials = new StorageCredentials(accountName, accountKey);
+ var storageAccount = new CloudStorageAccount(credentials, true);
+ return AddAzureBlobStorageCheck(builder, storageAccount, containerName, cacheDuration);
+ }
+
+ public static HealthCheckBuilder AddAzureBlobStorageCheck(HealthCheckBuilder builder, CloudStorageAccount storageAccount, string containerName = null, TimeSpan? cacheDuration = null)
+ {
+ builder.AddCheck($"AzureBlobStorageCheck {storageAccount.BlobStorageUri} {containerName}", async () =>
+ {
+ bool result;
+ try
+ {
+ var blobClient = storageAccount.CreateCloudBlobClient();
+
+ var properties = await blobClient.GetServicePropertiesAsync().ConfigureAwait(false);
+
+ if (!String.IsNullOrWhiteSpace(containerName))
+ {
+ var container = blobClient.GetContainerReference(containerName);
+
+ result = await container.ExistsAsync();
+ }
+
+ result = true;
+ }
+ catch (Exception)
+ {
+ result = false;
+ }
+
+ return result
+ ? HealthCheckResult.Healthy($"AzureBlobStorage {storageAccount.BlobStorageUri} is available")
+ : HealthCheckResult.Unhealthy($"AzureBlobStorage {storageAccount.BlobStorageUri} is unavailable");
+ }, cacheDuration ?? builder.DefaultCacheDuration);
+
+ return builder;
+ }
+
+ public static HealthCheckBuilder AddAzureTableStorageCheck(this HealthCheckBuilder builder, string accountName, string accountKey, string tableName = null, TimeSpan? cacheDuration = null)
+ {
+ var credentials = new StorageCredentials(accountName, accountKey);
+ var storageAccount = new CloudStorageAccount(credentials, true);
+ return AddAzureTableStorageCheck(builder, storageAccount, tableName, cacheDuration);
+ }
+
+ public static HealthCheckBuilder AddAzureTableStorageCheck(HealthCheckBuilder builder, CloudStorageAccount storageAccount, string tableName = null, TimeSpan? cacheDuration = null)
+ {
+ builder.AddCheck($"AzureTableStorageCheck {storageAccount.TableStorageUri} {tableName}", async () =>
+ {
+ bool result;
+ try
+ {
+ var tableClient = storageAccount.CreateCloudTableClient();
+
+ var properties = await tableClient.GetServicePropertiesAsync().ConfigureAwait(false);
+
+ if (String.IsNullOrWhiteSpace(tableName))
+ {
+ var table = tableClient.GetTableReference(tableName);
+
+ result = await table.ExistsAsync();
+ }
+ result = true;
+ }
+ catch (Exception)
+ {
+ result = false;
+ }
+
+ return result
+ ? HealthCheckResult.Healthy($"AzureTableStorage {storageAccount.BlobStorageUri} is available")
+ : HealthCheckResult.Unhealthy($"AzureTableStorage {storageAccount.BlobStorageUri} is unavailable");
+
+ }, cacheDuration ?? builder.DefaultCacheDuration);
+
+ return builder;
+ }
+
+ public static HealthCheckBuilder AddAzureFileStorageCheck(this HealthCheckBuilder builder, string accountName, string accountKey, string shareName = null, TimeSpan? cacheDuration = null)
+ {
+ var credentials = new StorageCredentials(accountName, accountKey);
+ var storageAccount = new CloudStorageAccount(credentials, true);
+ return AddAzureFileStorageCheck(builder, storageAccount, shareName, cacheDuration);
+ }
+
+ public static HealthCheckBuilder AddAzureFileStorageCheck(HealthCheckBuilder builder, CloudStorageAccount storageAccount, string shareName = null, TimeSpan? cacheDuration = null)
+ {
+ builder.AddCheck($"AzureFileStorageCheck {storageAccount.FileStorageUri} {shareName}", async () =>
+ {
+ bool result;
+ try
+ {
+ var fileClient = storageAccount.CreateCloudFileClient();
+
+ var properties = await fileClient.GetServicePropertiesAsync().ConfigureAwait(false);
+
+ if (!String.IsNullOrWhiteSpace(shareName))
+ {
+ var share = fileClient.GetShareReference(shareName);
+
+ result = await share.ExistsAsync();
+ }
+
+ result = true;
+ }
+ catch (Exception)
+ {
+ result = false;
+ }
+
+ return result
+ ? HealthCheckResult.Healthy($"AzureFileStorage {storageAccount.BlobStorageUri} is available")
+ : HealthCheckResult.Unhealthy($"AzureFileStorage {storageAccount.BlobStorageUri} is unavailable");
+ }, cacheDuration ?? builder.DefaultCacheDuration);
+
+ return builder;
+ }
+
+ public static HealthCheckBuilder AddAzureQueueStorageCheck(this HealthCheckBuilder builder, string accountName, string accountKey, string queueName = null, TimeSpan? cacheDuration = null)
+ {
+ var credentials = new StorageCredentials(accountName, accountKey);
+ var storageAccount = new CloudStorageAccount(credentials, true);
+ return AddAzureQueueStorageCheck(builder, storageAccount, queueName, cacheDuration);
+ }
+
+ public static HealthCheckBuilder AddAzureQueueStorageCheck(HealthCheckBuilder builder, CloudStorageAccount storageAccount, string queueName = null, TimeSpan? cacheDuration = null)
+ {
+ builder.AddCheck($"AzureQueueStorageCheck {storageAccount.QueueStorageUri} {queueName}", async () =>
+ {
+ bool result;
+ try
+ {
+ var queueClient = storageAccount.CreateCloudQueueClient();
+
+ var properties = await queueClient.GetServicePropertiesAsync().ConfigureAwait(false);
+
+ if (String.IsNullOrWhiteSpace(queueName))
+ {
+ var queue = queueClient.GetQueueReference(queueName);
+
+ result = await queue.ExistsAsync();
+ }
+ result = true;
+ }
+ catch (Exception)
+ {
+ result = false;
+ }
+
+ return result
+ ? HealthCheckResult.Healthy($"AzureFileStorage {storageAccount.BlobStorageUri} is available")
+ : HealthCheckResult.Unhealthy($"AzureFileStorage {storageAccount.BlobStorageUri} is unavailable");
+
+ }, cacheDuration ?? builder.DefaultCacheDuration);
+
+ return builder;
+ }
+ }
+}
diff --git a/src/BuildingBlocks/HealthChecks/src/Microsoft.Extensions.HealthChecks.AzureStorage/Microsoft.Extensions.HealthChecks.AzureStorage.csproj b/src/BuildingBlocks/HealthChecks/src/Microsoft.Extensions.HealthChecks.AzureStorage/Microsoft.Extensions.HealthChecks.AzureStorage.csproj
new file mode 100644
index 000000000..24d5ce92b
--- /dev/null
+++ b/src/BuildingBlocks/HealthChecks/src/Microsoft.Extensions.HealthChecks.AzureStorage/Microsoft.Extensions.HealthChecks.AzureStorage.csproj
@@ -0,0 +1,27 @@
+
+
+
+ netstandard1.3
+ $(PackageTargetFallback);net46
+ false
+ false
+ false
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/BuildingBlocks/HealthChecks/src/Microsoft.Extensions.HealthChecks.AzureStorage/Properties/AssemblyInfo.cs b/src/BuildingBlocks/HealthChecks/src/Microsoft.Extensions.HealthChecks.AzureStorage/Properties/AssemblyInfo.cs
new file mode 100644
index 000000000..ef88235f5
--- /dev/null
+++ b/src/BuildingBlocks/HealthChecks/src/Microsoft.Extensions.HealthChecks.AzureStorage/Properties/AssemblyInfo.cs
@@ -0,0 +1,22 @@
+// Copyright (c) .NET Foundation. All rights reserved.
+// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
+
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// General Information about an assembly is controlled through the following
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("HealthChecks.Azure")]
+[assembly: AssemblyTrademark("")]
+
+// Setting ComVisible to false makes the types in this assembly not visible
+// to COM components. If you need to access a type in this assembly from
+// COM, set the ComVisible attribute to true on that type.
+[assembly: ComVisible(false)]
+
+// The following GUID is for the ID of the typelib if this project is exposed to COM
+[assembly: Guid("0c4158b7-7153-4d2e-abfa-4ce07d44f75f")]
diff --git a/src/Mobile/eShopOnContainers/eShopOnContainers.Core/App.xaml b/src/Mobile/eShopOnContainers/eShopOnContainers.Core/App.xaml
index 150b01c90..b8acbf952 100644
--- a/src/Mobile/eShopOnContainers/eShopOnContainers.Core/App.xaml
+++ b/src/Mobile/eShopOnContainers/eShopOnContainers.Core/App.xaml
@@ -110,6 +110,7 @@
+
+
+
+
+
+
+
+
+
-
+
-
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Grid.Row="0"
+ Source="{Binding Campaign.PictureUri, Converter={StaticResource ImageConverter}}"
+ Style="{StaticResource CampaignImageStyle}"/>
+ Grid.Row="1"
+ Text="{Binding Campaign.Name}"
+ Style="{StaticResource CampaignTitleStyle}"/>
-
-
-
-
-
-
-
-
+ Grid.Row="2"
+ Text="{Binding Campaign.Description}"
+ Style="{StaticResource CampaignDescriptionStyle}"/>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
+
+
@@ -96,72 +105,88 @@
Animation="{StaticResource OrderItemsAnimation}" />
-
-
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
-
-
-
-
+
-
-
-
-
+
-
-
-
-
+
-
-
-
-
-
+
+
+
+
\ No newline at end of file
diff --git a/src/Mobile/eShopOnContainers/eShopOnContainers.Core/Views/SettingsView.xaml b/src/Mobile/eShopOnContainers/eShopOnContainers.Core/Views/SettingsView.xaml
index e5c5ccdd3..4b8aa62a0 100644
--- a/src/Mobile/eShopOnContainers/eShopOnContainers.Core/Views/SettingsView.xaml
+++ b/src/Mobile/eShopOnContainers/eShopOnContainers.Core/Views/SettingsView.xaml
@@ -6,12 +6,16 @@
xmlns:controls="clr-namespace:eShopOnContainers.Core.Controls;assembly=eShopOnContainers.Core"
xmlns:animations="clr-namespace:eShopOnContainers.Core.Animations;assembly=eShopOnContainers.Core"
xmlns:triggers="clr-namespace:eShopOnContainers.Core.Triggers;assembly=eShopOnContainers.Core"
- xmlns:behaviors="clr-namespace:eShopOnContainers.Core.Behaviors;assembly=eShopOnContainers.Core"
viewModelBase:ViewModelLocator.AutoWireViewModel="true"
Title="Settings">
+
+
+
+
+
+ Value="12,0" />
+
+
-
@@ -97,21 +116,17 @@
-
+
-
+
+ Grid.Row="1"
+ Style="{StaticResource SettingsStackLayoutStyle}">
@@ -143,7 +157,7 @@
Grid.Row="2"
Grid.Column="0"
Grid.ColumnSpan="2"
- Margin="12, 0, 12, 12"
+ Style="{StaticResource SettingsStackLayoutStyle}"
IsVisible="{Binding UseAzureServices}">
-
+
+
+ Grid.Row="3"
+ IsVisible="{Binding UserIsLogged}"
+ Style="{StaticResource SettingsStackLayoutStyle}">
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/Mobile/eShopOnContainers/eShopOnContainers.Core/Views/Templates/OrderItemTemplate.xaml b/src/Mobile/eShopOnContainers/eShopOnContainers.Core/Views/Templates/OrderItemTemplate.xaml
index 36e42267f..75d43f2d1 100644
--- a/src/Mobile/eShopOnContainers/eShopOnContainers.Core/Views/Templates/OrderItemTemplate.xaml
+++ b/src/Mobile/eShopOnContainers/eShopOnContainers.Core/Views/Templates/OrderItemTemplate.xaml
@@ -59,8 +59,7 @@
+ HeightRequest="120">
diff --git a/src/Mobile/eShopOnContainers/eShopOnContainers.Core/Views/Templates/OrderTemplate.xaml b/src/Mobile/eShopOnContainers/eShopOnContainers.Core/Views/Templates/OrderTemplate.xaml
index 522930213..a36fd9eef 100644
--- a/src/Mobile/eShopOnContainers/eShopOnContainers.Core/Views/Templates/OrderTemplate.xaml
+++ b/src/Mobile/eShopOnContainers/eShopOnContainers.Core/Views/Templates/OrderTemplate.xaml
@@ -78,7 +78,7 @@
Text="STATUS"
Style="{StaticResource OrderTitleStyle}"/>
+
@@ -75,10 +76,11 @@
+
-
+
@@ -107,6 +109,7 @@
+
diff --git a/src/Mobile/eShopOnContainers/eShopOnContainers.UnitTests/Services/MarketingServiceTests.cs b/src/Mobile/eShopOnContainers/eShopOnContainers.UnitTests/Services/MarketingServiceTests.cs
index 105ad2946..14f3bf4cc 100644
--- a/src/Mobile/eShopOnContainers/eShopOnContainers.UnitTests/Services/MarketingServiceTests.cs
+++ b/src/Mobile/eShopOnContainers/eShopOnContainers.UnitTests/Services/MarketingServiceTests.cs
@@ -21,7 +21,7 @@
public async Task GetFakeCampaignsTest()
{
var campaignMockService = new CampaignMockService();
- var result = await campaignMockService.GetAllCampaignsAsync(Settings.UserId, GlobalSetting.Instance.AuthToken);
+ var result = await campaignMockService.GetAllCampaignsAsync(GlobalSetting.Instance.AuthToken);
Assert.NotEqual(0, result.Count);
}
diff --git a/src/Mobile/eShopOnContainers/eShopOnContainers.Windows/project.json b/src/Mobile/eShopOnContainers/eShopOnContainers.Windows/project.json
old mode 100755
new mode 100644
index 7c0df1e01..6acfea559
--- a/src/Mobile/eShopOnContainers/eShopOnContainers.Windows/project.json
+++ b/src/Mobile/eShopOnContainers/eShopOnContainers.Windows/project.json
@@ -5,6 +5,7 @@
"Microsoft.NETCore.UniversalWindowsPlatform": "5.3.3",
"Newtonsoft.Json": "9.0.1",
"SlideOverKit": "2.1.4",
+ "Xam.Plugin.Geolocator": "3.0.4",
"Xam.Plugins.Settings": "2.6.0.12-beta",
"Xamarin.FFImageLoading": "2.2.9",
"Xamarin.FFImageLoading.Forms": "2.2.9",
diff --git a/src/Mobile/eShopOnContainers/eShopOnContainers.iOS/Info.plist b/src/Mobile/eShopOnContainers/eShopOnContainers.iOS/Info.plist
index 527eb00fd..fb995405e 100644
--- a/src/Mobile/eShopOnContainers/eShopOnContainers.iOS/Info.plist
+++ b/src/Mobile/eShopOnContainers/eShopOnContainers.iOS/Info.plist
@@ -37,5 +37,7 @@
Assets.xcassets/AppIcon.appiconset
XSLaunchImageAssets
Assets.xcassets/LaunchImage.launchimage
+ NSLocationWhenInUseUsageDescription
+
diff --git a/src/Mobile/eShopOnContainers/eShopOnContainers.iOS/PluginsHelp/GeolocatorReadme.txt b/src/Mobile/eShopOnContainers/eShopOnContainers.iOS/PluginsHelp/GeolocatorReadme.txt
new file mode 100644
index 000000000..8a88b0862
--- /dev/null
+++ b/src/Mobile/eShopOnContainers/eShopOnContainers.iOS/PluginsHelp/GeolocatorReadme.txt
@@ -0,0 +1,24 @@
+Connectivity Readme
+Find the most up to date information at: https://github.com/jamesmontemagno/Xamarin.Plugins
+
+**IMPORTANT**
+Android:
+You must request ACCESS_COARSE_LOCATION & ACCESS_FINE_LOCATION permission
+
+iOS:
+In iOS 8 you now have to call either RequestWhenInUseAuthorization or RequestAlwaysAuthorization on the location manager. Additionally you need to add either the concisely named NSLocationWhenInUseUsageDescription or NSLocationAlwaysUsageDescription to your Info.plist.
+See: http://motzcod.es/post/97662738237/scanning-for-ibeacons-in-ios-8
+
+Windows Phone:
+You must set the ID_CAP_LOCATION permission.
+
+Getting Started:
+
+var locator = CrossGeolocator.Current;
+locator.DesiredAccuracy = 50;
+
+var position = await locator.GetPositionAsync (timeoutMilliseconds: 10000);
+
+Console.WriteLine ("Position Status: {0}", position.Timestamp);
+Console.WriteLine ("Position Latitude: {0}", position.Latitude);
+Console.WriteLine ("Position Longitude: {0}", position.Longitude);
\ No newline at end of file
diff --git a/src/Mobile/eShopOnContainers/eShopOnContainers.iOS/eShopOnContainers.iOS.csproj b/src/Mobile/eShopOnContainers/eShopOnContainers.iOS/eShopOnContainers.iOS.csproj
index 78dfd9952..ea52a9426 100755
--- a/src/Mobile/eShopOnContainers/eShopOnContainers.iOS/eShopOnContainers.iOS.csproj
+++ b/src/Mobile/eShopOnContainers/eShopOnContainers.iOS/eShopOnContainers.iOS.csproj
@@ -155,6 +155,12 @@
..\..\..\..\packages\Xamarin.FFImageLoading.2.2.9\lib\Xamarin.iOS10\FFImageLoading.Platform.dll
+
+ ..\..\..\..\packages\Xam.Plugin.Geolocator.1.0.3\lib\Xamarin.iOS10\Geolocator.Plugin.dll
+
+
+ ..\..\..\..\packages\Xam.Plugin.Geolocator.1.0.3\lib\Xamarin.iOS10\Geolocator.Plugin.Abstractions.dll
+
..\..\..\..\packages\IdentityModel.1.3.1\lib\portable-net45+wp80+win8+wpa81\IdentityModel.Portable.dll
True
@@ -426,6 +432,9 @@
+
+
+
diff --git a/src/Mobile/eShopOnContainers/eShopOnContainers.iOS/packages.config b/src/Mobile/eShopOnContainers/eShopOnContainers.iOS/packages.config
index 835c2555e..5240be164 100755
--- a/src/Mobile/eShopOnContainers/eShopOnContainers.iOS/packages.config
+++ b/src/Mobile/eShopOnContainers/eShopOnContainers.iOS/packages.config
@@ -58,6 +58,7 @@
+
diff --git a/src/Services/Basket/Basket.API/Basket.API.csproj b/src/Services/Basket/Basket.API/Basket.API.csproj
index 13f2830db..82618d195 100644
--- a/src/Services/Basket/Basket.API/Basket.API.csproj
+++ b/src/Services/Basket/Basket.API/Basket.API.csproj
@@ -18,6 +18,7 @@
+
@@ -36,6 +37,7 @@
+
diff --git a/src/Services/Basket/Basket.API/Model/RedisBasketRepository.cs b/src/Services/Basket/Basket.API/Model/RedisBasketRepository.cs
index 4ca90f383..e896c0773 100644
--- a/src/Services/Basket/Basket.API/Model/RedisBasketRepository.cs
+++ b/src/Services/Basket/Basket.API/Model/RedisBasketRepository.cs
@@ -4,7 +4,6 @@ using Newtonsoft.Json;
using StackExchange.Redis;
using System.Collections.Generic;
using System.Linq;
-using System.Net;
using System.Threading.Tasks;
namespace Microsoft.eShopOnContainers.Services.Basket.API.Model
@@ -16,12 +15,10 @@ namespace Microsoft.eShopOnContainers.Services.Basket.API.Model
private ConnectionMultiplexer _redis;
-
public RedisBasketRepository(IOptionsSnapshot options, ILoggerFactory loggerFactory)
{
_settings = options.Value;
_logger = loggerFactory.CreateLogger();
-
}
public async Task DeleteBasketAsync(string id)
@@ -93,21 +90,12 @@ namespace Microsoft.eShopOnContainers.Services.Basket.API.Model
}
private async Task ConnectToRedisAsync()
- {
- // TODO: Need to make this more robust. ConnectionMultiplexer.ConnectAsync doesn't like domain names or IPv6 addresses.
- if (IPAddress.TryParse(_settings.ConnectionString, out var ip))
- {
- _redis = await ConnectionMultiplexer.ConnectAsync(ip.ToString());
- _logger.LogInformation($"Connecting to database at {_settings.ConnectionString}");
- }
- else
- {
- // workaround for https://github.com/StackExchange/StackExchange.Redis/issues/410
- var ips = await Dns.GetHostAddressesAsync(_settings.ConnectionString);
- _logger.LogInformation($"Connecting to database {_settings.ConnectionString} at IP {ips.First().ToString()}");
- _redis = await ConnectionMultiplexer.ConnectAsync(ips.First().ToString());
- }
+ {
+ var configuration = ConfigurationOptions.Parse(_settings.ConnectionString, true);
+ configuration.ResolveDns = true;
+
+ _logger.LogInformation($"Connecting to database {configuration.SslHost}.");
+ _redis = await ConnectionMultiplexer.ConnectAsync(configuration);
}
-
}
}
diff --git a/src/Services/Basket/Basket.API/Startup.cs b/src/Services/Basket/Basket.API/Startup.cs
index 83b259d5b..771ed212d 100644
--- a/src/Services/Basket/Basket.API/Startup.cs
+++ b/src/Services/Basket/Basket.API/Startup.cs
@@ -26,6 +26,9 @@ using System.Linq;
using System.Net;
using System.Threading.Tasks;
+using Microsoft.eShopOnContainers.BuildingBlocks.EventBusServiceBus;
+using Microsoft.Azure.ServiceBus;
+
namespace Microsoft.eShopOnContainers.Services.Basket.API
{
public class Startup
@@ -68,23 +71,42 @@ namespace Microsoft.eShopOnContainers.Services.Basket.API
services.AddSingleton(sp =>
{
var settings = sp.GetRequiredService>().Value;
- var ips = Dns.GetHostAddressesAsync(settings.ConnectionString).Result;
+ ConfigurationOptions configuration = ConfigurationOptions.Parse(settings.ConnectionString, true);
+ configuration.ResolveDns = true;
- return ConnectionMultiplexer.Connect(ips.First().ToString());
+ return ConnectionMultiplexer.Connect(configuration);
});
- services.AddSingleton(sp =>
+ if (Configuration.GetValue("AzureServiceBusEnabled"))
{
- var settings = sp.GetRequiredService>().Value;
- var logger = sp.GetRequiredService>();
- var factory = new ConnectionFactory()
+ services.AddSingleton(sp =>
{
- HostName = settings.EventBusConnection
- };
+ var logger = sp.GetRequiredService>();
+
+ var serviceBusConnectionString = Configuration["EventBusConnection"];
+ var serviceBusConnection = new ServiceBusConnectionStringBuilder(serviceBusConnectionString);
+
+ return new DefaultServiceBusPersisterConnection(serviceBusConnection, logger);
+ });
+ }
+ else
+ {
+ services.AddSingleton(sp =>
+ {
+ var logger = sp.GetRequiredService>();
+
+ var factory = new ConnectionFactory()
+ {
+ HostName = Configuration["EventBusConnection"]
+ };
+
+ return new DefaultRabbitMQPersistentConnection(factory, logger);
+ });
+ }
+
+ RegisterEventBus(services);
- return new DefaultRabbitMQPersistentConnection(factory, logger);
- });
services.AddSwaggerGen(options =>
{
@@ -109,7 +131,7 @@ namespace Microsoft.eShopOnContainers.Services.Basket.API
services.AddSingleton();
services.AddTransient();
services.AddTransient();
- RegisterServiceBus(services);
+
services.AddOptions();
var container = new ContainerBuilder();
@@ -117,9 +139,27 @@ namespace Microsoft.eShopOnContainers.Services.Basket.API
return new AutofacServiceProvider(container.Build());
}
- private void RegisterServiceBus(IServiceCollection services)
+ private void RegisterEventBus(IServiceCollection services)
{
- services.AddSingleton();
+ if (Configuration.GetValue("AzureServiceBusEnabled"))
+ {
+ services.AddSingleton(sp =>
+ {
+ var serviceBusPersisterConnection = sp.GetRequiredService();
+ var iLifetimeScope = sp.GetRequiredService();
+ var logger = sp.GetRequiredService>();
+ var eventBusSubcriptionsManager = sp.GetRequiredService();
+ var subscriptionClientName = Configuration["SubscriptionClientName"];
+
+ return new EventBusServiceBus(serviceBusPersisterConnection, logger,
+ eventBusSubcriptionsManager, subscriptionClientName, iLifetimeScope);
+ });
+ }
+ else
+ {
+ services.AddSingleton();
+ }
+
services.AddSingleton();
services.AddTransient();
diff --git a/src/Services/Basket/Basket.API/appsettings.json b/src/Services/Basket/Basket.API/appsettings.json
index 31f76d0d0..f062f76d7 100644
--- a/src/Services/Basket/Basket.API/appsettings.json
+++ b/src/Services/Basket/Basket.API/appsettings.json
@@ -8,5 +8,7 @@
}
},
"IdentityUrl": "http://localhost:5105",
- "ConnectionString": "127.0.0.1"
-}
+ "ConnectionString": "127.0.0.1",
+ "AzureServiceBusEnabled": false,
+ "SubscriptionClientName": "Basket"
+}
\ No newline at end of file
diff --git a/src/Services/Catalog/Catalog.API/Catalog.API.csproj b/src/Services/Catalog/Catalog.API/Catalog.API.csproj
index 31b600c02..62816baf3 100644
--- a/src/Services/Catalog/Catalog.API/Catalog.API.csproj
+++ b/src/Services/Catalog/Catalog.API/Catalog.API.csproj
@@ -19,6 +19,11 @@
PreserveNewest
+
+ PreserveNewest
+
+
+
PreserveNewest
@@ -48,6 +53,7 @@
+
@@ -56,8 +62,10 @@
+
+
@@ -70,6 +78,9 @@
PreserveNewest
+
+ PreserveNewest
+
diff --git a/src/Services/Catalog/Catalog.API/CatalogSettings.cs b/src/Services/Catalog/Catalog.API/CatalogSettings.cs
index af6e0ab13..a8c47991e 100644
--- a/src/Services/Catalog/Catalog.API/CatalogSettings.cs
+++ b/src/Services/Catalog/Catalog.API/CatalogSettings.cs
@@ -2,8 +2,11 @@
{
public class CatalogSettings
{
- public string ExternalCatalogBaseUrl {get;set;}
+ public string PicBaseUrl { get;set;}
public string EventBusConnection { get; set; }
+
+ public bool UseCustomizationData { get; set; }
+ public bool AzureStorageEnabled { get; set; }
}
}
diff --git a/src/Services/Catalog/Catalog.API/Controllers/CatalogController.cs b/src/Services/Catalog/Catalog.API/Controllers/CatalogController.cs
index 374d8ec7c..ca1ef9e3b 100644
--- a/src/Services/Catalog/Catalog.API/Controllers/CatalogController.cs
+++ b/src/Services/Catalog/Catalog.API/Controllers/CatalogController.cs
@@ -200,7 +200,7 @@ namespace Microsoft.eShopOnContainers.Services.Catalog.API.Controllers
CatalogTypeId = product.CatalogTypeId,
Description = product.Description,
Name = product.Name,
- PictureUri = product.PictureUri,
+ PictureFileName = product.PictureFileName,
Price = product.Price
};
_catalogContext.CatalogItems.Add(item);
@@ -231,11 +231,14 @@ namespace Microsoft.eShopOnContainers.Services.Catalog.API.Controllers
private List ChangeUriPlaceholder(List items)
{
- var baseUri = _settings.ExternalCatalogBaseUrl;
-
- items.ForEach(x =>
+ var baseUri = _settings.PicBaseUrl;
+
+ items.ForEach(catalogItem =>
{
- x.PictureUri = x.PictureUri.Replace("http://externalcatalogbaseurltobereplaced", baseUri);
+ catalogItem.PictureUri = _settings.AzureStorageEnabled
+ ? baseUri + catalogItem.PictureFileName
+ : baseUri + catalogItem.Id;
+
});
return items;
diff --git a/src/Services/Catalog/Catalog.API/Controllers/PicController.cs b/src/Services/Catalog/Catalog.API/Controllers/PicController.cs
index 8d8aaf9f2..75029dc95 100644
--- a/src/Services/Catalog/Catalog.API/Controllers/PicController.cs
+++ b/src/Services/Catalog/Catalog.API/Controllers/PicController.cs
@@ -1,6 +1,9 @@
using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.Mvc;
+using Microsoft.EntityFrameworkCore;
+using Microsoft.eShopOnContainers.Services.Catalog.API.Infrastructure;
using System.IO;
+using System.Threading.Tasks;
// For more information on enabling MVC for empty projects, visit http://go.microsoft.com/fwlink/?LinkID=397860
@@ -10,21 +13,80 @@ namespace Microsoft.eShopOnContainers.Services.Catalog.API.Controllers
public class PicController : Controller
{
private readonly IHostingEnvironment _env;
- public PicController(IHostingEnvironment env)
+ private readonly CatalogContext _catalogContext;
+
+ public PicController(IHostingEnvironment env,
+ CatalogContext catalogContext)
{
_env = env;
+ _catalogContext = catalogContext;
}
[HttpGet("{id}")]
// GET: //
- public IActionResult GetImage(int id)
+ public async Task GetImage(int id)
{
- var webRoot = _env.WebRootPath;
- var path = Path.Combine(webRoot, id + ".png");
+ if (id <= 0)
+ {
+ return BadRequest();
+ }
+
+ var item = await _catalogContext.CatalogItems
+ .SingleOrDefaultAsync(ci => ci.Id == id);
+
+ if (item != null)
+ {
+ var webRoot = _env.WebRootPath;
+ var path = Path.Combine(webRoot, item.PictureFileName);
+
+ string imageFileExtension = Path.GetExtension(item.PictureFileName);
+ string mimetype = GetImageMimeTypeFromImageFileExtension(imageFileExtension);
+
+ var buffer = System.IO.File.ReadAllBytes(path);
+
+ return File(buffer, mimetype);
+ }
+
+ return NotFound();
+ }
+
+ private string GetImageMimeTypeFromImageFileExtension(string extension)
+ {
+ string mimetype;
+
+ switch (extension)
+ {
+ case ".png":
+ mimetype = "image/png";
+ break;
+ case ".gif":
+ mimetype = "image/gif";
+ break;
+ case ".jpg":
+ case ".jpeg":
+ mimetype = "image/jpeg";
+ break;
+ case ".bmp":
+ mimetype = "image/bmp";
+ break;
+ case ".tiff":
+ mimetype = "image/tiff";
+ break;
+ case ".wmf":
+ mimetype = "image/wmf";
+ break;
+ case ".jp2":
+ mimetype = "image/jp2";
+ break;
+ case ".svg":
+ mimetype = "image/svg+xml";
+ break;
+ default:
+ mimetype = "application/octet-stream";
+ break;
+ }
- var buffer = System.IO.File.ReadAllBytes(path);
-
- return File(buffer, "image/png");
+ return mimetype;
}
}
}
diff --git a/src/Services/Catalog/Catalog.API/Extensions/LinqSelectExtensions.cs b/src/Services/Catalog/Catalog.API/Extensions/LinqSelectExtensions.cs
new file mode 100644
index 000000000..1e5fbf789
--- /dev/null
+++ b/src/Services/Catalog/Catalog.API/Extensions/LinqSelectExtensions.cs
@@ -0,0 +1,50 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+
+namespace Catalog.API.Extensions
+{
+ public static class LinqSelectExtensions
+ {
+ public static IEnumerable> SelectTry(this IEnumerable enumerable, Func selector)
+ {
+ foreach (TSource element in enumerable)
+ {
+ SelectTryResult returnedValue;
+ try
+ {
+ returnedValue = new SelectTryResult(element, selector(element), null);
+ }
+ catch (Exception ex)
+ {
+ returnedValue = new SelectTryResult(element, default(TResult), ex);
+ }
+ yield return returnedValue;
+ }
+ }
+
+ public static IEnumerable OnCaughtException(this IEnumerable> enumerable, Func exceptionHandler)
+ {
+ return enumerable.Select(x => x.CaughtException == null ? x.Result : exceptionHandler(x.CaughtException));
+ }
+
+ public static IEnumerable OnCaughtException(this IEnumerable> enumerable, Func exceptionHandler)
+ {
+ return enumerable.Select(x => x.CaughtException == null ? x.Result : exceptionHandler(x.Source, x.CaughtException));
+ }
+
+ public class SelectTryResult
+ {
+ internal SelectTryResult(TSource source, TResult result, Exception exception)
+ {
+ Source = source;
+ Result = result;
+ CaughtException = exception;
+ }
+
+ public TSource Source { get; private set; }
+ public TResult Result { get; private set; }
+ public Exception CaughtException { get; private set; }
+ }
+ }
+}
diff --git a/src/Services/Catalog/Catalog.API/Infrastructure/CatalogContext.cs b/src/Services/Catalog/Catalog.API/Infrastructure/CatalogContext.cs
index cd26632e0..f58541b62 100644
--- a/src/Services/Catalog/Catalog.API/Infrastructure/CatalogContext.cs
+++ b/src/Services/Catalog/Catalog.API/Infrastructure/CatalogContext.cs
@@ -36,9 +36,11 @@
builder.Property(ci => ci.Price)
.IsRequired(true);
- builder.Property(ci => ci.PictureUri)
+ builder.Property(ci => ci.PictureFileName)
.IsRequired(false);
+ builder.Ignore(ci => ci.PictureUri);
+
builder.HasOne(ci => ci.CatalogBrand)
.WithMany()
.HasForeignKey(ci => ci.CatalogBrandId);
diff --git a/src/Services/Catalog/Catalog.API/Infrastructure/CatalogContextSeed.cs b/src/Services/Catalog/Catalog.API/Infrastructure/CatalogContextSeed.cs
index 669768abd..6f71bd6cf 100644
--- a/src/Services/Catalog/Catalog.API/Infrastructure/CatalogContextSeed.cs
+++ b/src/Services/Catalog/Catalog.API/Infrastructure/CatalogContextSeed.cs
@@ -2,45 +2,113 @@
{
using EntityFrameworkCore;
using Extensions.Logging;
+ using global::Catalog.API.Extensions;
using Microsoft.AspNetCore.Builder;
+ using Microsoft.AspNetCore.Hosting;
+ using Microsoft.Extensions.DependencyInjection;
+ using Microsoft.Extensions.Options;
using Model;
using System;
using System.Collections.Generic;
+ using System.Globalization;
+ using System.IO;
+ using System.IO.Compression;
using System.Linq;
+ using System.Text.RegularExpressions;
using System.Threading.Tasks;
public class CatalogContextSeed
{
- public static async Task SeedAsync(IApplicationBuilder applicationBuilder, ILoggerFactory loggerFactory, int? retry = 0)
+ public static async Task SeedAsync(IApplicationBuilder applicationBuilder, IHostingEnvironment env, ILoggerFactory loggerFactory, int? retry = 0)
{
+ var log = loggerFactory.CreateLogger("catalog seed");
+
var context = (CatalogContext)applicationBuilder
.ApplicationServices.GetService(typeof(CatalogContext));
context.Database.Migrate();
+ var settings = (CatalogSettings)applicationBuilder
+ .ApplicationServices.GetRequiredService>().Value;
+
+ var useCustomizationData = settings.UseCustomizationData;
+ var contentRootPath = env.ContentRootPath;
+ var picturePath = env.WebRootPath;
+
if (!context.CatalogBrands.Any())
{
- context.CatalogBrands.AddRange(
- GetPreconfiguredCatalogBrands());
+ context.CatalogBrands.AddRange(useCustomizationData
+ ? GetCatalogBrandsFromFile(contentRootPath, log)
+ : GetPreconfiguredCatalogBrands()
+ );
await context.SaveChangesAsync();
}
if (!context.CatalogTypes.Any())
{
- context.CatalogTypes.AddRange(
- GetPreconfiguredCatalogTypes());
+ context.CatalogTypes.AddRange(useCustomizationData
+ ? GetCatalogTypesFromFile(contentRootPath, log)
+ : GetPreconfiguredCatalogTypes()
+ );
await context.SaveChangesAsync();
}
if (!context.CatalogItems.Any())
{
- context.CatalogItems.AddRange(
- GetPreconfiguredItems());
+ context.CatalogItems.AddRange(useCustomizationData
+ ? GetCatalogItemsFromFile(contentRootPath, context, log)
+ : GetPreconfiguredItems()
+ );
await context.SaveChangesAsync();
+
+ GetCatalogItemPictures(contentRootPath, picturePath);
+ }
+ }
+
+ static IEnumerable GetCatalogBrandsFromFile(string contentRootPath, ILogger log)
+ {
+ string csvFileCatalogBrands = Path.Combine(contentRootPath, "Setup", "CatalogBrands.csv");
+
+ if (!File.Exists(csvFileCatalogBrands))
+ {
+ return GetPreconfiguredCatalogBrands();
+ }
+
+ string[] csvheaders;
+ try
+ {
+ string[] requiredHeaders = { "catalogbrand" };
+ csvheaders = GetHeaders( csvFileCatalogBrands, requiredHeaders );
+ }
+ catch (Exception ex)
+ {
+ log.LogError(ex.Message);
+ return GetPreconfiguredCatalogBrands();
+ }
+
+ return File.ReadAllLines(csvFileCatalogBrands)
+ .Skip(1) // skip header row
+ .SelectTry(x => CreateCatalogBrand(x))
+ .OnCaughtException(ex => { log.LogError(ex.Message); return null; })
+ .Where(x => x != null);
+ }
+
+ static CatalogBrand CreateCatalogBrand(string brand)
+ {
+ brand = brand.Trim('"').Trim();
+
+ if (String.IsNullOrEmpty(brand))
+ {
+ throw new Exception("catalog Brand Name is empty");
}
+
+ return new CatalogBrand
+ {
+ Brand = brand,
+ };
}
static IEnumerable GetPreconfiguredCatalogBrands()
@@ -50,11 +118,54 @@
new CatalogBrand() { Brand = "Azure"},
new CatalogBrand() { Brand = ".NET" },
new CatalogBrand() { Brand = "Visual Studio" },
- new CatalogBrand() { Brand = "SQL Server" },
+ new CatalogBrand() { Brand = "SQL Server" },
new CatalogBrand() { Brand = "Other" }
};
}
+ static IEnumerable GetCatalogTypesFromFile(string contentRootPath, ILogger log)
+ {
+ string csvFileCatalogTypes = Path.Combine(contentRootPath, "Setup", "CatalogTypes.csv");
+
+ if (!File.Exists(csvFileCatalogTypes))
+ {
+ return GetPreconfiguredCatalogTypes();
+ }
+
+ string[] csvheaders;
+ try
+ {
+ string[] requiredHeaders = { "catalogtype" };
+ csvheaders = GetHeaders( csvFileCatalogTypes, requiredHeaders );
+ }
+ catch (Exception ex)
+ {
+ log.LogError(ex.Message);
+ return GetPreconfiguredCatalogTypes();
+ }
+
+ return File.ReadAllLines(csvFileCatalogTypes)
+ .Skip(1) // skip header row
+ .SelectTry(x => CreateCatalogType(x))
+ .OnCaughtException(ex => { log.LogError(ex.Message); return null; })
+ .Where(x => x != null);
+ }
+
+ static CatalogType CreateCatalogType(string type)
+ {
+ type = type.Trim('"').Trim();
+
+ if (String.IsNullOrEmpty(type))
+ {
+ throw new Exception("catalog Type Name is empty");
+ }
+
+ return new CatalogType
+ {
+ Type = type,
+ };
+ }
+
static IEnumerable GetPreconfiguredCatalogTypes()
{
return new List()
@@ -66,23 +177,204 @@
};
}
+ static IEnumerable GetCatalogItemsFromFile(string contentRootPath, CatalogContext context, ILogger log)
+ {
+ string csvFileCatalogItems = Path.Combine(contentRootPath, "Setup", "CatalogItems.csv");
+
+ if (!File.Exists(csvFileCatalogItems))
+ {
+ return GetPreconfiguredItems();
+ }
+
+ string[] csvheaders;
+ try
+ {
+ string[] requiredHeaders = { "catalogtypename", "catalogbrandname", "description", "name", "price", "pictureFileName" };
+ string[] optionalheaders = { "availablestock", "restockthreshold", "maxstockthreshold", "onreorder" };
+ csvheaders = GetHeaders(csvFileCatalogItems, requiredHeaders, optionalheaders );
+ }
+ catch (Exception ex)
+ {
+ log.LogError(ex.Message);
+ return GetPreconfiguredItems();
+ }
+
+ var catalogTypeIdLookup = context.CatalogTypes.ToDictionary(ct => ct.Type, ct => ct.Id);
+ var catalogBrandIdLookup = context.CatalogBrands.ToDictionary(ct => ct.Brand, ct => ct.Id);
+
+ return File.ReadAllLines(csvFileCatalogItems)
+ .Skip(1) // skip header row
+ .Select(row => Regex.Split(row, ",(?=(?:[^\"]*\"[^\"]*\")*[^\"]*$)") )
+ .SelectTry(column => CreateCatalogItem(column, csvheaders, catalogTypeIdLookup, catalogBrandIdLookup))
+ .OnCaughtException(ex => { log.LogError(ex.Message); return null; })
+ .Where(x => x != null);
+ }
+
+ static CatalogItem CreateCatalogItem(string[] column, string[] headers, Dictionary catalogTypeIdLookup, Dictionary catalogBrandIdLookup)
+ {
+ if (column.Count() != headers.Count())
+ {
+ throw new Exception($"column count '{column.Count()}' not the same as headers count'{headers.Count()}'");
+ }
+
+ string catalogTypeName = column[Array.IndexOf(headers, "catalogtypename")].Trim('"').Trim();
+ if (!catalogTypeIdLookup.ContainsKey(catalogTypeName))
+ {
+ throw new Exception($"type={catalogTypeName} does not exist in catalogTypes");
+ }
+
+ string catalogBrandName = column[Array.IndexOf(headers, "catalogbrandname")].Trim('"').Trim();
+ if (!catalogBrandIdLookup.ContainsKey(catalogBrandName))
+ {
+ throw new Exception($"type={catalogTypeName} does not exist in catalogTypes");
+ }
+
+ string priceString = column[Array.IndexOf(headers, "price")].Trim('"').Trim();
+ if (!Decimal.TryParse(priceString, NumberStyles.AllowDecimalPoint, CultureInfo.InvariantCulture, out Decimal price))
+ {
+ throw new Exception($"price={priceString}is not a valid decimal number");
+ }
+
+ var catalogItem = new CatalogItem()
+ {
+ CatalogTypeId = catalogTypeIdLookup[catalogTypeName],
+ CatalogBrandId = catalogBrandIdLookup[catalogBrandName],
+ Description = column[Array.IndexOf(headers, "description")].Trim('"').Trim(),
+ Name = column[Array.IndexOf(headers, "name")].Trim('"').Trim(),
+ Price = price,
+ PictureUri = column[Array.IndexOf(headers, "pictureuri")].Trim('"').Trim(),
+ };
+
+ int availableStockIndex = Array.IndexOf(headers, "availablestock");
+ if (availableStockIndex != -1)
+ {
+ string availableStockString = column[availableStockIndex].Trim('"').Trim();
+ if (!String.IsNullOrEmpty(availableStockString))
+ {
+ if ( int.TryParse(availableStockString, out int availableStock))
+ {
+ catalogItem.AvailableStock = availableStock;
+ }
+ else
+ {
+ throw new Exception($"availableStock={availableStockString} is not a valid integer");
+ }
+ }
+ }
+
+ int restockThresholdIndex = Array.IndexOf(headers, "restockthreshold");
+ if (restockThresholdIndex != -1)
+ {
+ string restockThresholdString = column[restockThresholdIndex].Trim('"').Trim();
+ if (!String.IsNullOrEmpty(restockThresholdString))
+ {
+ if (int.TryParse(restockThresholdString, out int restockThreshold))
+ {
+ catalogItem.RestockThreshold = restockThreshold;
+ }
+ else
+ {
+ throw new Exception($"restockThreshold={restockThreshold} is not a valid integer");
+ }
+ }
+ }
+
+ int maxStockThresholdIndex = Array.IndexOf(headers, "maxstockthreshold");
+ if (maxStockThresholdIndex != -1)
+ {
+ string maxStockThresholdString = column[maxStockThresholdIndex].Trim('"').Trim();
+ if (!String.IsNullOrEmpty(maxStockThresholdString))
+ {
+ if (int.TryParse(maxStockThresholdString, out int maxStockThreshold))
+ {
+ catalogItem.MaxStockThreshold = maxStockThreshold;
+ }
+ else
+ {
+ throw new Exception($"maxStockThreshold={maxStockThreshold} is not a valid integer");
+ }
+ }
+ }
+
+ int onReorderIndex = Array.IndexOf(headers, "onreorder");
+ if (onReorderIndex != -1)
+ {
+ string onReorderString = column[onReorderIndex].Trim('"').Trim();
+ if (!String.IsNullOrEmpty(onReorderString))
+ {
+ if (bool.TryParse(onReorderString, out bool onReorder))
+ {
+ catalogItem.OnReorder = onReorder;
+ }
+ else
+ {
+ throw new Exception($"onReorder={onReorderString} is not a valid boolean");
+ }
+ }
+ }
+
+ return catalogItem;
+ }
+
static IEnumerable GetPreconfiguredItems()
{
return new List()
{
- new CatalogItem() { CatalogTypeId=2,CatalogBrandId=2, Description = ".NET Bot Black Hoodie", Name = ".NET Bot Black Hoodie", Price = 19.5M, PictureUri = "http://externalcatalogbaseurltobereplaced/api/v1/pic/1", AvailableStock = 100},
- new CatalogItem() { CatalogTypeId=1,CatalogBrandId=2, Description = ".NET Black & White Mug", Name = ".NET Black & White Mug", Price= 8.50M, PictureUri = "http://externalcatalogbaseurltobereplaced/api/v1/pic/2", AvailableStock = 100 },
- new CatalogItem() { CatalogTypeId=2,CatalogBrandId=5, Description = "Prism White T-Shirt", Name = "Prism White T-Shirt", Price = 12, PictureUri = "http://externalcatalogbaseurltobereplaced/api/v1/pic/3", AvailableStock = 100 },
- new CatalogItem() { CatalogTypeId=2,CatalogBrandId=2, Description = ".NET Foundation T-shirt", Name = ".NET Foundation T-shirt", Price = 12, PictureUri = "http://externalcatalogbaseurltobereplaced/api/v1/pic/4", AvailableStock = 100 },
- new CatalogItem() { CatalogTypeId=3,CatalogBrandId=5, Description = "Roslyn Red Sheet", Name = "Roslyn Red Sheet", Price = 8.5M, PictureUri = "http://externalcatalogbaseurltobereplaced/api/v1/pic/5", AvailableStock = 100 },
- new CatalogItem() { CatalogTypeId=2,CatalogBrandId=2, Description = ".NET Blue Hoodie", Name = ".NET Blue Hoodie", Price = 12, PictureUri = "http://externalcatalogbaseurltobereplaced/api/v1/pic/6", AvailableStock = 100 },
- new CatalogItem() { CatalogTypeId=2,CatalogBrandId=5, Description = "Roslyn Red T-Shirt", Name = "Roslyn Red T-Shirt", Price = 12, PictureUri = "http://externalcatalogbaseurltobereplaced/api/v1/pic/7", AvailableStock = 100 },
- new CatalogItem() { CatalogTypeId=2,CatalogBrandId=5, Description = "Kudu Purple Hoodie", Name = "Kudu Purple Hoodie", Price = 8.5M, PictureUri = "http://externalcatalogbaseurltobereplaced/api/v1/pic/8", AvailableStock = 100 },
- new CatalogItem() { CatalogTypeId=1,CatalogBrandId=5, Description = "Cup White Mug", Name = "Cup White Mug", Price = 12, PictureUri = "http://externalcatalogbaseurltobereplaced/api/v1/pic/9", AvailableStock = 100 },
- new CatalogItem() { CatalogTypeId=3,CatalogBrandId=2, Description = ".NET Foundation Sheet", Name = ".NET Foundation Sheet", Price = 12, PictureUri = "http://externalcatalogbaseurltobereplaced/api/v1/pic/10", AvailableStock = 100 },
- new CatalogItem() { CatalogTypeId=3,CatalogBrandId=2, Description = "Cup Sheet", Name = "Cup Sheet", Price = 8.5M, PictureUri = "http://externalcatalogbaseurltobereplaced/api/v1/pic/11", AvailableStock = 100 },
- new CatalogItem() { CatalogTypeId=2,CatalogBrandId=5, Description = "Prism White TShirt", Name = "Prism White TShirt", Price = 12, PictureUri = "http://externalcatalogbaseurltobereplaced/api/v1/pic/12", AvailableStock = 100 }
+ new CatalogItem { CatalogTypeId = 2, CatalogBrandId = 2, AvailableStock = 100, Description = ".NET Bot Black Hoodie", Name = ".NET Bot Black Hoodie", Price = 19.5M, PictureFileName = "1.png" },
+ new CatalogItem { CatalogTypeId = 1, CatalogBrandId = 2, AvailableStock = 100, Description = ".NET Black & White Mug", Name = ".NET Black & White Mug", Price= 8.50M, PictureFileName = "2.png" },
+ new CatalogItem { CatalogTypeId = 2, CatalogBrandId = 5, AvailableStock = 100, Description = "Prism White T-Shirt", Name = "Prism White T-Shirt", Price = 12, PictureFileName = "3.png" },
+ new CatalogItem { CatalogTypeId = 2, CatalogBrandId = 2, AvailableStock = 100, Description = ".NET Foundation T-shirt", Name = ".NET Foundation T-shirt", Price = 12, PictureFileName = "4.png" },
+ new CatalogItem { CatalogTypeId = 3, CatalogBrandId = 5, AvailableStock = 100, Description = "Roslyn Red Sheet", Name = "Roslyn Red Sheet", Price = 8.5M, PictureFileName = "5.png" },
+ new CatalogItem { CatalogTypeId = 2, CatalogBrandId = 2, AvailableStock = 100, Description = ".NET Blue Hoodie", Name = ".NET Blue Hoodie", Price = 12, PictureFileName = "6.png" },
+ new CatalogItem { CatalogTypeId = 2, CatalogBrandId = 5, AvailableStock = 100, Description = "Roslyn Red T-Shirt", Name = "Roslyn Red T-Shirt", Price = 12, PictureFileName = "7.png" },
+ new CatalogItem { CatalogTypeId = 2, CatalogBrandId = 5, AvailableStock = 100, Description = "Kudu Purple Hoodie", Name = "Kudu Purple Hoodie", Price = 8.5M, PictureFileName = "8.png" },
+ new CatalogItem { CatalogTypeId = 1, CatalogBrandId = 5, AvailableStock = 100, Description = "Cup White Mug", Name = "Cup White Mug", Price = 12, PictureFileName = "9.png" },
+ new CatalogItem { CatalogTypeId = 3, CatalogBrandId = 2, AvailableStock = 100, Description = ".NET Foundation Sheet", Name = ".NET Foundation Sheet", Price = 12, PictureFileName = "10.png" },
+ new CatalogItem { CatalogTypeId = 3, CatalogBrandId = 2, AvailableStock = 100, Description = "Cup Sheet", Name = "Cup Sheet", Price = 8.5M, PictureFileName = "11.png" },
+ new CatalogItem { CatalogTypeId = 2, CatalogBrandId = 5, AvailableStock = 100, Description = "Prism White TShirt", Name = "Prism White TShirt", Price = 12, PictureFileName = "12.png" },
};
}
+
+ static string[] GetHeaders(string csvfile, string[] requiredHeaders, string[] optionalHeaders = null)
+ {
+ string[] csvheaders = File.ReadLines(csvfile).First().ToLowerInvariant().Split(',');
+
+ if (csvheaders.Count() < requiredHeaders.Count())
+ {
+ throw new Exception($"requiredHeader count '{ requiredHeaders.Count()}' is bigger then csv header count '{csvheaders.Count()}' ");
+ }
+
+ if (optionalHeaders != null)
+ {
+ if (csvheaders.Count() > (requiredHeaders.Count() + optionalHeaders.Count()))
+ {
+ throw new Exception($"csv header count '{csvheaders.Count()}' is larger then required '{requiredHeaders.Count()}' and optional '{optionalHeaders.Count()}' headers count");
+ }
+ }
+
+ foreach (var requiredHeader in requiredHeaders)
+ {
+ if (!csvheaders.Contains(requiredHeader))
+ {
+ throw new Exception($"does not contain required header '{requiredHeader}'");
+ }
+ }
+
+ return csvheaders;
+ }
+
+ static void GetCatalogItemPictures(string contentRootPath, string picturePath)
+ {
+ DirectoryInfo directory = new DirectoryInfo(picturePath);
+ foreach (FileInfo file in directory.GetFiles())
+ {
+ file.Delete();
+ }
+
+ string zipFileCatalogItemPictures = Path.Combine(contentRootPath, "Setup", "CatalogItems.zip");
+ ZipFile.ExtractToDirectory(zipFileCatalogItemPictures, picturePath);
+ }
}
+
+
}
diff --git a/src/Services/Catalog/Catalog.API/Infrastructure/CatalogMigrations/20170530133114_AddPictureFileName.Designer.cs b/src/Services/Catalog/Catalog.API/Infrastructure/CatalogMigrations/20170530133114_AddPictureFileName.Designer.cs
new file mode 100644
index 000000000..23c0e5344
--- /dev/null
+++ b/src/Services/Catalog/Catalog.API/Infrastructure/CatalogMigrations/20170530133114_AddPictureFileName.Designer.cs
@@ -0,0 +1,99 @@
+using System;
+using Microsoft.EntityFrameworkCore;
+using Microsoft.EntityFrameworkCore.Infrastructure;
+using Microsoft.EntityFrameworkCore.Metadata;
+using Microsoft.EntityFrameworkCore.Migrations;
+using Microsoft.eShopOnContainers.Services.Catalog.API.Infrastructure;
+
+namespace Catalog.API.Infrastructure.Migrations
+{
+ [DbContext(typeof(CatalogContext))]
+ [Migration("20170530133114_AddPictureFile")]
+ partial class AddPictureFile
+ {
+ protected override void BuildTargetModel(ModelBuilder modelBuilder)
+ {
+ modelBuilder
+ .HasAnnotation("ProductVersion", "1.1.1")
+ .HasAnnotation("SqlServer:Sequence:.catalog_brand_hilo", "'catalog_brand_hilo', '', '1', '10', '', '', 'Int64', 'False'")
+ .HasAnnotation("SqlServer:Sequence:.catalog_hilo", "'catalog_hilo', '', '1', '10', '', '', 'Int64', 'False'")
+ .HasAnnotation("SqlServer:Sequence:.catalog_type_hilo", "'catalog_type_hilo', '', '1', '10', '', '', 'Int64', 'False'")
+ .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
+
+ modelBuilder.Entity("Microsoft.eShopOnContainers.Services.Catalog.API.Model.CatalogBrand", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasAnnotation("SqlServer:HiLoSequenceName", "catalog_brand_hilo")
+ .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.SequenceHiLo);
+
+ b.Property("Brand")
+ .IsRequired()
+ .HasMaxLength(100);
+
+ b.HasKey("Id");
+
+ b.ToTable("CatalogBrand");
+ });
+
+ modelBuilder.Entity("Microsoft.eShopOnContainers.Services.Catalog.API.Model.CatalogItem", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasAnnotation("SqlServer:HiLoSequenceName", "catalog_hilo")
+ .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.SequenceHiLo);
+
+ b.Property("CatalogBrandId");
+
+ b.Property("CatalogTypeId");
+
+ b.Property("Description");
+
+ b.Property("Name")
+ .IsRequired()
+ .HasMaxLength(50);
+
+ b.Property("PictureFileName");
+
+ b.Property("Price");
+
+ b.HasKey("Id");
+
+ b.HasIndex("CatalogBrandId");
+
+ b.HasIndex("CatalogTypeId");
+
+ b.ToTable("Catalog");
+ });
+
+ modelBuilder.Entity("Microsoft.eShopOnContainers.Services.Catalog.API.Model.CatalogType", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasAnnotation("SqlServer:HiLoSequenceName", "catalog_type_hilo")
+ .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.SequenceHiLo);
+
+ b.Property("Type")
+ .IsRequired()
+ .HasMaxLength(100);
+
+ b.HasKey("Id");
+
+ b.ToTable("CatalogType");
+ });
+
+ modelBuilder.Entity("Microsoft.eShopOnContainers.Services.Catalog.API.Model.CatalogItem", b =>
+ {
+ b.HasOne("Microsoft.eShopOnContainers.Services.Catalog.API.Model.CatalogBrand", "CatalogBrand")
+ .WithMany()
+ .HasForeignKey("CatalogBrandId")
+ .OnDelete(DeleteBehavior.Cascade);
+
+ b.HasOne("Microsoft.eShopOnContainers.Services.Catalog.API.Model.CatalogType", "CatalogType")
+ .WithMany()
+ .HasForeignKey("CatalogTypeId")
+ .OnDelete(DeleteBehavior.Cascade);
+ });
+ }
+ }
+}
diff --git a/src/Services/Catalog/Catalog.API/Infrastructure/CatalogMigrations/20170530133114_AddPictureFileName.cs b/src/Services/Catalog/Catalog.API/Infrastructure/CatalogMigrations/20170530133114_AddPictureFileName.cs
new file mode 100644
index 000000000..fc7f4dc8d
--- /dev/null
+++ b/src/Services/Catalog/Catalog.API/Infrastructure/CatalogMigrations/20170530133114_AddPictureFileName.cs
@@ -0,0 +1,25 @@
+using System;
+using System.Collections.Generic;
+using Microsoft.EntityFrameworkCore.Migrations;
+
+namespace Catalog.API.Infrastructure.Migrations
+{
+ public partial class AddPictureFile : Migration
+ {
+ protected override void Up(MigrationBuilder migrationBuilder)
+ {
+ migrationBuilder.RenameColumn(
+ name: "PictureUri",
+ table: "Catalog",
+ newName: "PictureFileName");
+ }
+
+ protected override void Down(MigrationBuilder migrationBuilder)
+ {
+ migrationBuilder.RenameColumn(
+ name: "PictureFileName",
+ table: "Catalog",
+ newName: "PictureUri");
+ }
+ }
+}
diff --git a/src/Services/Catalog/Catalog.API/Model/CatalogItem.cs b/src/Services/Catalog/Catalog.API/Model/CatalogItem.cs
index f3c04f595..459c60098 100644
--- a/src/Services/Catalog/Catalog.API/Model/CatalogItem.cs
+++ b/src/Services/Catalog/Catalog.API/Model/CatalogItem.cs
@@ -13,6 +13,8 @@ namespace Microsoft.eShopOnContainers.Services.Catalog.API.Model
public decimal Price { get; set; }
+ public string PictureFileName { get; set; }
+
public string PictureUri { get; set; }
public int CatalogTypeId { get; set; }
diff --git a/src/Services/Catalog/Catalog.API/Setup/CatalogBrands.csv b/src/Services/Catalog/Catalog.API/Setup/CatalogBrands.csv
new file mode 100644
index 000000000..95c9ee64c
--- /dev/null
+++ b/src/Services/Catalog/Catalog.API/Setup/CatalogBrands.csv
@@ -0,0 +1,8 @@
+CatalogBrand
+Azure
+.NET
+Visual Studio
+SQL Server
+Other
+CatalogBrandTestOne
+CatalogBrandTestTwo
\ No newline at end of file
diff --git a/src/Services/Catalog/Catalog.API/Setup/CatalogItems.csv b/src/Services/Catalog/Catalog.API/Setup/CatalogItems.csv
new file mode 100644
index 000000000..0257216d4
--- /dev/null
+++ b/src/Services/Catalog/Catalog.API/Setup/CatalogItems.csv
@@ -0,0 +1,14 @@
+CatalogTypeName,CatalogBrandName,Description,Name,Price,PictureFileName,availablestock,onreorder
+T-Shirt,.NET,".NET Bot Black Hoodie, and more",.NET Bot Black Hoodie,19.5,1.png,100,false
+Mug,.NET,.NET Black & White Mug,.NET Black & White Mug,8.50,2.png,89,true
+T-Shirt,Other,Prism White T-Shirt,Prism White T-Shirt,12,3.png,56,false
+T-Shirt,.NET,.NET Foundation T-shirt,.NET Foundation T-shirt,12,4.png,120,false
+Sheet,Other,Roslyn Red Sheet,Roslyn Red Sheet,8.5,5.png,55,false
+T-Shirt,.NET,.NET Blue Hoodie,.NET Blue Hoodie,12,6.png,17,false
+T-Shirt,Other,Roslyn Red T-Shirt,Roslyn Red T-Shirt",12,7.png,8,false
+T-Shirt,Other,Kudu Purple Hoodie,Kudu Purple Hoodie,8.5,8.png,34,false
+Mug,Other,Cup White Mug,Cup White Mug,12,9.png,76,false
+Sheet,.NET,.NET Foundation Sheet,.NET Foundation Sheet,12,10.png,11,false
+Sheet,.NET,Cup Sheet,Cup Sheet,8.5,11.png,3,false
+T-Shirt,Other,Prism White TShirt,Prism White TShirt,12,12.png,0,false
+Mug, Other, De los Palotes, pepito, 12, 12.png, 0, false
\ No newline at end of file
diff --git a/src/Services/Catalog/Catalog.API/Setup/CatalogTypes.csv b/src/Services/Catalog/Catalog.API/Setup/CatalogTypes.csv
new file mode 100644
index 000000000..ae636c265
--- /dev/null
+++ b/src/Services/Catalog/Catalog.API/Setup/CatalogTypes.csv
@@ -0,0 +1,7 @@
+CatalogType
+Mug
+T-Shirt
+Sheet
+USB Memory Stick
+CatalogTypeTestOne
+CatalogTypeTestTwo
\ No newline at end of file
diff --git a/src/Services/Catalog/Catalog.API/Setup/Catalogitems.zip b/src/Services/Catalog/Catalog.API/Setup/Catalogitems.zip
new file mode 100644
index 000000000..6d3edfb3c
Binary files /dev/null and b/src/Services/Catalog/Catalog.API/Setup/Catalogitems.zip differ
diff --git a/src/Services/Catalog/Catalog.API/Startup.cs b/src/Services/Catalog/Catalog.API/Startup.cs
index 39ebf519d..7f64e9a88 100644
--- a/src/Services/Catalog/Catalog.API/Startup.cs
+++ b/src/Services/Catalog/Catalog.API/Startup.cs
@@ -6,12 +6,14 @@
using global::Catalog.API.IntegrationEvents;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
+ using Microsoft.Azure.ServiceBus;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Diagnostics;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.eShopOnContainers.BuildingBlocks.EventBus;
using Microsoft.eShopOnContainers.BuildingBlocks.EventBus.Abstractions;
using Microsoft.eShopOnContainers.BuildingBlocks.EventBusRabbitMQ;
+ using Microsoft.eShopOnContainers.BuildingBlocks.EventBusServiceBus;
using Microsoft.eShopOnContainers.BuildingBlocks.IntegrationEventLogEF;
using Microsoft.eShopOnContainers.BuildingBlocks.IntegrationEventLogEF.Services;
using Microsoft.eShopOnContainers.Services.Catalog.API.Infrastructure;
@@ -22,6 +24,8 @@
using Microsoft.Extensions.HealthChecks;
using Microsoft.Extensions.Logging;
using Microsoft.Extensions.Options;
+ using Microsoft.WindowsAzure.Storage;
+ using Microsoft.WindowsAzure.Storage.Auth;
using Polly;
using RabbitMQ.Client;
using System;
@@ -63,6 +67,13 @@
minutes = minutesParsed;
}
checks.AddSqlCheck("CatalogDb", Configuration["ConnectionString"], TimeSpan.FromMinutes(minutes));
+
+ var accountName = Configuration.GetValue("AzureStorageAccountName");
+ var accountKey = Configuration.GetValue("AzureStorageAccountKey");
+ if (!string.IsNullOrEmpty(accountName) && !string.IsNullOrEmpty(accountKey))
+ {
+ checks.AddAzureBlobStorageCheck(accountName, accountKey);
+ }
});
services.AddMvc(options =>
@@ -115,23 +126,39 @@
services.AddTransient();
- services.AddSingleton(sp =>
+ if (Configuration.GetValue("AzureServiceBusEnabled"))
{
- var settings = sp.GetRequiredService>().Value;
- var logger = sp.GetRequiredService>();
- var factory = new ConnectionFactory()
+ services.AddSingleton(sp =>
{
- HostName = settings.EventBusConnection
- };
+ var settings = sp.GetRequiredService>().Value;
+ var logger = sp.GetRequiredService>();
- return new DefaultRabbitMQPersistentConnection(factory, logger);
- });
+ var serviceBusConnection = new ServiceBusConnectionStringBuilder(settings.EventBusConnection);
+
+ return new DefaultServiceBusPersisterConnection(serviceBusConnection, logger);
+ });
+ }
+ else
+ {
+ services.AddSingleton(sp =>
+ {
+ var settings = sp.GetRequiredService>().Value;
+ var logger = sp.GetRequiredService>();
+ var factory = new ConnectionFactory()
+ {
+ HostName = settings.EventBusConnection
+ };
+
+ return new DefaultRabbitMQPersistentConnection(factory, logger);
+ });
+ }
- RegisterServiceBus(services);
+ RegisterEventBus(services);
var container = new ContainerBuilder();
container.Populate(services);
return new AutofacServiceProvider(container.Build());
+
}
public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory)
@@ -154,7 +181,7 @@
var context = (CatalogContext)app
.ApplicationServices.GetService(typeof(CatalogContext));
- WaitForSqlAvailabilityAsync(context, loggerFactory, app).Wait();
+ WaitForSqlAvailabilityAsync(context, loggerFactory, app, env).Wait();
ConfigureEventBus(app);
@@ -166,13 +193,13 @@
integrationEventLogContext.Database.Migrate();
}
- private async Task WaitForSqlAvailabilityAsync(CatalogContext ctx, ILoggerFactory loggerFactory, IApplicationBuilder app, int retries = 0)
+ private async Task WaitForSqlAvailabilityAsync(CatalogContext ctx, ILoggerFactory loggerFactory, IApplicationBuilder app, IHostingEnvironment env, int retries = 0)
{
var logger = loggerFactory.CreateLogger(nameof(Startup));
- var policy = CreatePolicy(retries, logger, nameof (WaitForSqlAvailabilityAsync));
+ var policy = CreatePolicy(retries, logger, nameof(WaitForSqlAvailabilityAsync));
await policy.ExecuteAsync(async () =>
{
- await CatalogContextSeed.SeedAsync(app, loggerFactory);
+ await CatalogContextSeed.SeedAsync(app, env, loggerFactory);
});
}
@@ -190,25 +217,37 @@
);
}
- private void RegisterServiceBus(IServiceCollection services)
+ private void RegisterEventBus(IServiceCollection services)
{
- services.AddSingleton();
- services.AddSingleton();
+ if (Configuration.GetValue("AzureServiceBusEnabled"))
+ {
+ services.AddSingleton(sp =>
+ {
+ var serviceBusPersisterConnection = sp.GetRequiredService();
+ var iLifetimeScope = sp.GetRequiredService();
+ var logger = sp.GetRequiredService>();
+ var eventBusSubcriptionsManager = sp.GetRequiredService();
+ var subscriptionClientName = Configuration["SubscriptionClientName"];
+
+ return new EventBusServiceBus(serviceBusPersisterConnection, logger,
+ eventBusSubcriptionsManager, subscriptionClientName, iLifetimeScope);
+ });
- services.AddTransient,
- OrderStatusChangedToAwaitingValidationIntegrationEventHandler>();
- services.AddTransient,
- OrderStatusChangedToPaidIntegrationEventHandler>();
- }
+ }
+ else
+ {
+ services.AddSingleton();
+ }
- private void ConfigureEventBus(IApplicationBuilder app)
+ services.AddSingleton();
+ services.AddTransient();
+ services.AddTransient();
+ }
+ protected virtual void ConfigureEventBus(IApplicationBuilder app)
{
var eventBus = app.ApplicationServices.GetRequiredService();
-
- eventBus.Subscribe>();
- eventBus.Subscribe>();
+ eventBus.Subscribe();
+ eventBus.Subscribe();
}
}
}
diff --git a/src/Services/Catalog/Catalog.API/settings.json b/src/Services/Catalog/Catalog.API/settings.json
index e67fec713..b6dc3b5f7 100644
--- a/src/Services/Catalog/Catalog.API/settings.json
+++ b/src/Services/Catalog/Catalog.API/settings.json
@@ -1,6 +1,7 @@
{
"ConnectionString": "Server=tcp:127.0.0.1,5433;Initial Catalog=Microsoft.eShopOnContainers.Services.CatalogDb;User Id=sa;Password=Pass@word",
- "ExternalCatalogBaseUrl": "http://localhost:5101",
+ "PicBaseUrl": "http://localhost:5101",
+ "UseCustomizationData": false,
"Logging": {
"IncludeScopes": false,
"LogLevel": {
@@ -8,5 +9,8 @@
"System": "Information",
"Microsoft": "Information"
}
- }
+ },
+ "AzureServiceBusEnabled": false,
+ "AzureStorageEnabled": false,
+ "SubscriptionClientName": "Catalog"
}
diff --git a/src/Services/GracePeriod/GracePeriodManager/GracePeriodManager.csproj b/src/Services/GracePeriod/GracePeriodManager/GracePeriodManager.csproj
index c37a06663..567b61662 100644
--- a/src/Services/GracePeriod/GracePeriodManager/GracePeriodManager.csproj
+++ b/src/Services/GracePeriod/GracePeriodManager/GracePeriodManager.csproj
@@ -21,6 +21,7 @@
+
diff --git a/src/Services/GracePeriod/GracePeriodManager/Program.cs b/src/Services/GracePeriod/GracePeriodManager/Program.cs
index eecdd80ea..88fb1547e 100644
--- a/src/Services/GracePeriod/GracePeriodManager/Program.cs
+++ b/src/Services/GracePeriod/GracePeriodManager/Program.cs
@@ -14,6 +14,8 @@
using Microsoft.Extensions.Options;
using RabbitMQ.Client;
using Services;
+ using Microsoft.eShopOnContainers.BuildingBlocks.EventBusServiceBus;
+ using Microsoft.Azure.ServiceBus;
public class Program
{
@@ -58,20 +60,36 @@
services.AddLogging()
.AddOptions()
.Configure(Configuration)
- .AddSingleton()
- .AddSingleton(sp =>
+ .AddSingleton();
+
+ if (Configuration.GetValue("AzureServiceBusEnabled"))
+ {
+ services.AddSingleton(sp =>
+ {
+ var logger = sp.GetRequiredService>();
+
+ var serviceBusConnectionString = Configuration["EventBusConnection"];
+ var serviceBusConnection = new ServiceBusConnectionStringBuilder(serviceBusConnectionString);
+
+ return new DefaultServiceBusPersisterConnection(serviceBusConnection, logger);
+ });
+ }
+ else
+ {
+ services.AddSingleton(sp =>
{
- var settings = sp.GetRequiredService>().Value;
var logger = sp.GetRequiredService>();
+
var factory = new ConnectionFactory()
{
- HostName = settings.EventBusConnection
+ HostName = Configuration["EventBusConnection"]
};
return new DefaultRabbitMQPersistentConnection(factory, logger);
});
+ }
- RegisterEventBus(services);
+ RegisterEventBus(services);
var container = new ContainerBuilder();
container.Populate(services);
@@ -87,7 +105,25 @@
private static void RegisterEventBus(IServiceCollection services)
{
- services.AddSingleton();
+ if (Configuration.GetValue("AzureServiceBusEnabled"))
+ {
+ services.AddSingleton(sp =>
+ {
+ var serviceBusPersisterConnection = sp.GetRequiredService();
+ var iLifetimeScope = sp.GetRequiredService();
+ var logger = sp.GetRequiredService>();
+ var eventBusSubcriptionsManager = sp.GetRequiredService();
+ var subscriptionClientName = Configuration["SubscriptionClientName"];
+
+ return new EventBusServiceBus(serviceBusPersisterConnection, logger,
+ eventBusSubcriptionsManager, subscriptionClientName, iLifetimeScope);
+ });
+ }
+ else
+ {
+ services.AddSingleton();
+ }
+
services.AddSingleton();
}
}
diff --git a/src/Services/GracePeriod/GracePeriodManager/Services/ManagerService.cs b/src/Services/GracePeriod/GracePeriodManager/Services/ManagerService.cs
index 24207ea2b..973fda158 100644
--- a/src/Services/GracePeriod/GracePeriodManager/Services/ManagerService.cs
+++ b/src/Services/GracePeriod/GracePeriodManager/Services/ManagerService.cs
@@ -41,7 +41,6 @@
{
try
{
- _logger.LogInformation("Grace Period Manager Client is trying to connect to database server");
conn.Open();
orderIds = conn.Query(
@"SELECT Id FROM [Microsoft.eShopOnContainers.Services.OrderingDb].[ordering].[orders]
diff --git a/src/Services/GracePeriod/GracePeriodManager/appsettings.json b/src/Services/GracePeriod/GracePeriodManager/appsettings.json
index 273437a8e..76703a77e 100644
--- a/src/Services/GracePeriod/GracePeriodManager/appsettings.json
+++ b/src/Services/GracePeriod/GracePeriodManager/appsettings.json
@@ -9,5 +9,7 @@
},
"ConnectionString": "Server=tcp:127.0.0.1,5433;Database=Microsoft.eShopOnContainers.Services.OrderingDb;User Id=sa;Password=Pass@word;",
"GracePeriodTime": "1",
- "CheckUpdateTime": "30000"
+ "CheckUpdateTime": "30000",
+ "AzureServiceBusEnabled": false,
+ "SubscriptionClientName": "GracePeriod"
}
diff --git a/src/Services/Identity/Identity.API/AppSettings.cs b/src/Services/Identity/Identity.API/AppSettings.cs
index bc81ecf36..78d848d41 100644
--- a/src/Services/Identity/Identity.API/AppSettings.cs
+++ b/src/Services/Identity/Identity.API/AppSettings.cs
@@ -8,5 +8,6 @@ namespace eShopOnContainers.Identity
public class AppSettings
{
public string MvcClient { get; set; }
+ public bool UseCustomizationData { get; set; }
}
}
diff --git a/src/Services/Identity/Identity.API/Configuration/Config.cs b/src/Services/Identity/Identity.API/Configuration/Config.cs
index 4aa12d4ce..bce62b039 100644
--- a/src/Services/Identity/Identity.API/Configuration/Config.cs
+++ b/src/Services/Identity/Identity.API/Configuration/Config.cs
@@ -114,6 +114,38 @@ namespace Identity.API.Configuration
"locations",
"marketing"
},
+ },
+ new Client
+ {
+ ClientId = "mvctest",
+ ClientName = "MVC Client Test",
+ ClientSecrets = new List
+ {
+ new Secret("secret".Sha256())
+ },
+ ClientUri = $"{clientsUrl["Mvc"]}", // public uri of the client
+ AllowedGrantTypes = GrantTypes.Hybrid,
+ AllowAccessTokensViaBrowser = true,
+ RequireConsent = false,
+ AllowOfflineAccess = true,
+ RedirectUris = new List
+ {
+ $"{clientsUrl["Mvc"]}/signin-oidc"
+ },
+ PostLogoutRedirectUris = new List
+ {
+ $"{clientsUrl["Mvc"]}/signout-callback-oidc"
+ },
+ AllowedScopes = new List
+ {
+ IdentityServerConstants.StandardScopes.OpenId,
+ IdentityServerConstants.StandardScopes.Profile,
+ IdentityServerConstants.StandardScopes.OfflineAccess,
+ "orders",
+ "basket",
+ "locations",
+ "marketing"
+ },
}
};
}
diff --git a/src/Services/Identity/Identity.API/Data/ApplicationContextSeed.cs b/src/Services/Identity/Identity.API/Data/ApplicationContextSeed.cs
index cf8ae612f..0f81bcf66 100644
--- a/src/Services/Identity/Identity.API/Data/ApplicationContextSeed.cs
+++ b/src/Services/Identity/Identity.API/Data/ApplicationContextSeed.cs
@@ -3,13 +3,21 @@
using AspNetCore.Identity;
using EntityFrameworkCore;
using Extensions.Logging;
+ using global::eShopOnContainers.Identity;
using global::Identity.API.Data;
using global::Identity.API.Models;
+ using Identity.API.Extensions;
using Microsoft.AspNetCore.Builder;
+ using Microsoft.AspNetCore.Hosting;
+ using Microsoft.Extensions.DependencyInjection;
+ using Microsoft.Extensions.Options;
using System;
using System.Collections.Generic;
+ using System.IO;
+ using System.IO.Compression;
using System.Linq;
using System.Security.Cryptography;
+ using System.Text.RegularExpressions;
using System.Threading.Tasks;
public class ApplicationContextSeed
@@ -21,23 +29,38 @@
_passwordHasher = passwordHasher;
}
- public async Task SeedAsync(IApplicationBuilder applicationBuilder, ILoggerFactory loggerFactory, int? retry = 0)
+ public async Task SeedAsync(IApplicationBuilder applicationBuilder, IHostingEnvironment env, ILoggerFactory loggerFactory, int? retry = 0)
{
int retryForAvaiability = retry.Value;
try
{
+ var log = loggerFactory.CreateLogger("application seed");
+
var context = (ApplicationDbContext)applicationBuilder
.ApplicationServices.GetService(typeof(ApplicationDbContext));
context.Database.Migrate();
+ var settings = (AppSettings)applicationBuilder
+ .ApplicationServices.GetRequiredService>().Value;
+
+ var useCustomizationData = settings.UseCustomizationData;
+ var contentRootPath = env.ContentRootPath;
+ var webroot = env.WebRootPath;
+
if (!context.Users.Any())
{
- context.Users.AddRange(
- GetDefaultUser());
+ context.Users.AddRange(useCustomizationData
+ ? GetUsersFromFile(contentRootPath, log)
+ : GetDefaultUser());
await context.SaveChangesAsync();
}
+
+ if (useCustomizationData)
+ {
+ GetPreconfiguredImages(contentRootPath, webroot, log);
+ }
}
catch (Exception ex)
{
@@ -46,14 +69,93 @@
retryForAvaiability++;
var log = loggerFactory.CreateLogger("catalog seed");
log.LogError(ex.Message);
- await SeedAsync(applicationBuilder, loggerFactory, retryForAvaiability);
+ await SeedAsync(applicationBuilder, env, loggerFactory, retryForAvaiability);
}
}
}
- private ApplicationUser GetDefaultUser()
+ private IEnumerable GetUsersFromFile(string contentRootPath, ILogger log)
{
- var user =
+ string csvFileUsers = Path.Combine(contentRootPath, "Setup", "Users.csv");
+
+ if (!File.Exists(csvFileUsers))
+ {
+ return GetDefaultUser();
+ }
+
+ string[] csvheaders;
+ try
+ {
+ string[] requiredHeaders = {
+ "cardholdername", "cardnumber", "cardtype", "city", "country",
+ "email", "expiration", "lastname", "name", "phonenumber",
+ "username", "zipcode", "state", "street", "securitynumber",
+ "normalizedemail", "normalizedusername", "password"
+ };
+ csvheaders = GetHeaders(requiredHeaders, csvFileUsers);
+ }
+ catch (Exception ex)
+ {
+ log.LogError(ex.Message);
+ return GetDefaultUser();
+ }
+
+ List users = File.ReadAllLines(csvFileUsers)
+ .Skip(1) // skip header column
+ .Select(row => Regex.Split(row, ",(?=(?:[^\"]*\"[^\"]*\")*[^\"]*$)") )
+ .SelectTry(column => CreateApplicationUser(column, csvheaders))
+ .OnCaughtException(ex => { log.LogError(ex.Message); return null; })
+ .Where(x => x != null)
+ .ToList();
+
+ return users;
+ }
+
+ private ApplicationUser CreateApplicationUser(string[] column, string[] headers)
+ {
+ if (column.Count() != headers.Count())
+ {
+ throw new Exception($"column count '{column.Count()}' not the same as headers count'{headers.Count()}'");
+ }
+
+ string cardtypeString = column[Array.IndexOf(headers, "cardtype")].Trim('"').Trim();
+ if (!int.TryParse(cardtypeString, out int cardtype))
+ {
+ throw new Exception($"cardtype='{cardtypeString}' is not a number");
+ }
+
+ var user = new ApplicationUser
+ {
+ CardHolderName = column[Array.IndexOf(headers, "cardholdername")].Trim('"').Trim(),
+ CardNumber = column[Array.IndexOf(headers, "cardnumber")].Trim('"').Trim(),
+ CardType = cardtype,
+ City = column[Array.IndexOf(headers, "city")].Trim('"').Trim(),
+ Country = column[Array.IndexOf(headers, "country")].Trim('"').Trim(),
+ Email = column[Array.IndexOf(headers, "email")].Trim('"').Trim(),
+ Expiration = column[Array.IndexOf(headers, "expiration")].Trim('"').Trim(),
+ Id = Guid.NewGuid().ToString(),
+ LastName = column[Array.IndexOf(headers, "lastname")].Trim('"').Trim(),
+ Name = column[Array.IndexOf(headers, "name")].Trim('"').Trim(),
+ PhoneNumber = column[Array.IndexOf(headers, "phonenumber")].Trim('"').Trim(),
+ UserName = column[Array.IndexOf(headers, "username")].Trim('"').Trim(),
+ ZipCode = column[Array.IndexOf(headers, "zipcode")].Trim('"').Trim(),
+ State = column[Array.IndexOf(headers, "state")].Trim('"').Trim(),
+ Street = column[Array.IndexOf(headers, "street")].Trim('"').Trim(),
+ SecurityNumber = column[Array.IndexOf(headers, "securitynumber")].Trim('"').Trim(),
+ NormalizedEmail = column[Array.IndexOf(headers, "normalizedemail")].Trim('"').Trim(),
+ NormalizedUserName = column[Array.IndexOf(headers, "normalizedusername")].Trim('"').Trim(),
+ SecurityStamp = Guid.NewGuid().ToString("D"),
+ PasswordHash = column[Array.IndexOf(headers, "password")].Trim('"').Trim(), // Note: This is the password
+ };
+
+ user.PasswordHash = _passwordHasher.HashPassword(user, user.PasswordHash);
+
+ return user;
+ }
+
+ private IEnumerable GetDefaultUser()
+ {
+ var user =
new ApplicationUser()
{
CardHolderName = "DemoUser",
@@ -63,23 +165,86 @@
Country = "U.S.",
Email = "demouser@microsoft.com",
Expiration = "12/20",
- Id = Guid.NewGuid().ToString(),
- LastName = "DemoLastName",
- Name = "DemoUser",
- PhoneNumber = "1234567890",
- UserName = "demouser@microsoft.com",
- ZipCode = "98052",
- State = "WA",
- Street = "15703 NE 61st Ct",
- SecurityNumber = "535",
- NormalizedEmail = "DEMOUSER@MICROSOFT.COM",
- NormalizedUserName = "DEMOUSER@MICROSOFT.COM",
- SecurityStamp = Guid.NewGuid().ToString("D")
+ Id = Guid.NewGuid().ToString(),
+ LastName = "DemoLastName",
+ Name = "DemoUser",
+ PhoneNumber = "1234567890",
+ UserName = "demouser@microsoft.com",
+ ZipCode = "98052",
+ State = "WA",
+ Street = "15703 NE 61st Ct",
+ SecurityNumber = "535",
+ NormalizedEmail = "DEMOUSER@MICROSOFT.COM",
+ NormalizedUserName = "DEMOUSER@MICROSOFT.COM",
+ SecurityStamp = Guid.NewGuid().ToString("D"),
};
user.PasswordHash = _passwordHasher.HashPassword(user, "Pass@word1");
- return user;
+ return new List()
+ {
+ user
+ };
+ }
+
+ static string[] GetHeaders(string[] requiredHeaders, string csvfile)
+ {
+ string[] csvheaders = File.ReadLines(csvfile).First().ToLowerInvariant().Split(',');
+
+ if (csvheaders.Count() != requiredHeaders.Count())
+ {
+ throw new Exception($"requiredHeader count '{ requiredHeaders.Count()}' is different then read header '{csvheaders.Count()}'");
+ }
+
+ foreach (var requiredHeader in requiredHeaders)
+ {
+ if (!csvheaders.Contains(requiredHeader))
+ {
+ throw new Exception($"does not contain required header '{requiredHeader}'");
+ }
+ }
+
+ return csvheaders;
+ }
+
+ static void GetPreconfiguredImages(string contentRootPath, string webroot, ILogger log)
+ {
+ try
+ {
+ string imagesZipFile = Path.Combine(contentRootPath, "Setup", "images.zip");
+ if (!File.Exists(imagesZipFile))
+ {
+ log.LogError($" zip file '{imagesZipFile}' does not exists.");
+ return;
+ }
+
+ string imagePath = Path.Combine(webroot, "images");
+ string[] imageFiles = Directory.GetFiles(imagePath).Select(file => Path.GetFileName(file)).ToArray();
+
+ using (ZipArchive zip = ZipFile.Open(imagesZipFile, ZipArchiveMode.Read))
+ {
+ foreach (ZipArchiveEntry entry in zip.Entries)
+ {
+ if (imageFiles.Contains(entry.Name))
+ {
+ string destinationFilename = Path.Combine(imagePath, entry.Name);
+ if (File.Exists(destinationFilename))
+ {
+ File.Delete(destinationFilename);
+ }
+ entry.ExtractToFile(destinationFilename);
+ }
+ else
+ {
+ log.LogWarning($"Skip file '{entry.Name}' in zipfile '{imagesZipFile}'");
+ }
+ }
+ }
+ }
+ catch (Exception ex)
+ {
+ log.LogError($"Exception in method GetPreconfiguredImages WebMVC. Exception Message={ex.Message}");
+ }
}
}
}
diff --git a/src/Services/Identity/Identity.API/Extensions/LinqSelectExtensions.cs b/src/Services/Identity/Identity.API/Extensions/LinqSelectExtensions.cs
new file mode 100644
index 000000000..e3ff0a3c0
--- /dev/null
+++ b/src/Services/Identity/Identity.API/Extensions/LinqSelectExtensions.cs
@@ -0,0 +1,50 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+
+namespace Identity.API.Extensions
+{
+ public static class LinqSelectExtensions
+ {
+ public static IEnumerable> SelectTry(this IEnumerable enumerable, Func selector)
+ {
+ foreach (TSource element in enumerable)
+ {
+ SelectTryResult returnedValue;
+ try
+ {
+ returnedValue = new SelectTryResult(element, selector(element), null);
+ }
+ catch (Exception ex)
+ {
+ returnedValue = new SelectTryResult(element, default(TResult), ex);
+ }
+ yield return returnedValue;
+ }
+ }
+
+ public static IEnumerable OnCaughtException(this IEnumerable> enumerable, Func exceptionHandler)
+ {
+ return enumerable.Select(x => x.CaughtException == null ? x.Result : exceptionHandler(x.CaughtException));
+ }
+
+ public static IEnumerable OnCaughtException(this IEnumerable> enumerable, Func exceptionHandler)
+ {
+ return enumerable.Select(x => x.CaughtException == null ? x.Result : exceptionHandler(x.Source, x.CaughtException));
+ }
+
+ public class SelectTryResult
+ {
+ internal SelectTryResult(TSource source, TResult result, Exception exception)
+ {
+ Source = source;
+ Result = result;
+ CaughtException = exception;
+ }
+
+ public TSource Source { get; private set; }
+ public TResult Result { get; private set; }
+ public Exception CaughtException { get; private set; }
+ }
+ }
+}
diff --git a/src/Services/Identity/Identity.API/Identity.API.csproj b/src/Services/Identity/Identity.API/Identity.API.csproj
index 373e47a33..7c221e858 100644
--- a/src/Services/Identity/Identity.API/Identity.API.csproj
+++ b/src/Services/Identity/Identity.API/Identity.API.csproj
@@ -7,7 +7,13 @@
$(AssetTargetFallback);portable-net45+win8+wp8+wpa81;
..\..\..\..\docker-compose.dcproj
-
+
+
+
+ PreserveNewest
+
+
+
@@ -66,6 +72,9 @@
Always
+
+ PreserveNewest
+
diff --git a/src/Services/Identity/Identity.API/Setup/Users.csv b/src/Services/Identity/Identity.API/Setup/Users.csv
new file mode 100644
index 000000000..3e5081078
--- /dev/null
+++ b/src/Services/Identity/Identity.API/Setup/Users.csv
@@ -0,0 +1,2 @@
+CardHolderName,CardNumber,CardType,City,Country,Email,Expiration,LastName,Name,PhoneNumber,UserName,ZipCode,State,Street,SecurityNumber,NormalizedEmail,NormalizedUserName,Password
+DemoUser,4012888888881881,1,Redmond,U.S.,demouser@microsoft.com,12/20,DemoLastName,DemoUser,1234567890,demouser@microsoft.com,98052,WA,15703 NE 61st Ct,535,DEMOUSER@MICROSOFT.COM,DEMOUSER@MICROSOFT.COM,Pass@word1
\ No newline at end of file
diff --git a/src/Services/Identity/Identity.API/Setup/images.zip b/src/Services/Identity/Identity.API/Setup/images.zip
new file mode 100644
index 000000000..1b901d3af
Binary files /dev/null and b/src/Services/Identity/Identity.API/Setup/images.zip differ
diff --git a/src/Services/Identity/Identity.API/Startup.cs b/src/Services/Identity/Identity.API/Startup.cs
index 584aefb35..bc8ca3cac 100644
--- a/src/Services/Identity/Identity.API/Startup.cs
+++ b/src/Services/Identity/Identity.API/Startup.cs
@@ -153,7 +153,7 @@ namespace eShopOnContainers.Identity
//Seed Data
var hasher = new PasswordHasher();
- new ApplicationContextSeed(hasher).SeedAsync(app, loggerFactory).Wait();
+ new ApplicationContextSeed(hasher).SeedAsync(app, env, loggerFactory).Wait();
}
private async Task InitializeGrantStoreAndConfiguration(IApplicationBuilder app)
diff --git a/src/Services/Identity/Identity.API/Views/Shared/_Layout.cshtml b/src/Services/Identity/Identity.API/Views/Shared/_Layout.cshtml
index 9d0a5ce8a..163d2606a 100644
--- a/src/Services/Identity/Identity.API/Views/Shared/_Layout.cshtml
+++ b/src/Services/Identity/Identity.API/Views/Shared/_Layout.cshtml
@@ -40,10 +40,7 @@
-
-
-
-
© e-ShoponContainers. All right reserved
+
diff --git a/src/Services/Identity/Identity.API/appsettings.json b/src/Services/Identity/Identity.API/appsettings.json
index 557bac0c3..09142603a 100644
--- a/src/Services/Identity/Identity.API/appsettings.json
+++ b/src/Services/Identity/Identity.API/appsettings.json
@@ -6,6 +6,7 @@
"MvcClient": "http://localhost:5100",
"SpaClient": "http://localhost:5104",
"XamarinCallback": "http://localhost:5105/xamarincallback",
+ "UseCustomizationData": false,
"Logging": {
"IncludeScopes": false,
"LogLevel": {
diff --git a/src/Services/Identity/Identity.API/wwwroot/css/site.css b/src/Services/Identity/Identity.API/wwwroot/css/site.css
index c8dcea80a..c29d2090d 100644
--- a/src/Services/Identity/Identity.API/wwwroot/css/site.css
+++ b/src/Services/Identity/Identity.API/wwwroot/css/site.css
@@ -476,11 +476,7 @@ footer {
}
footer .text {
- text-align: right;
- width: 100%;
- height: 100%;
- color: #83D01B;
- margin-top: 10px;
+ margin-top: 55px;
}
.text {
diff --git a/src/Services/Identity/Identity.API/wwwroot/css/site.min.css b/src/Services/Identity/Identity.API/wwwroot/css/site.min.css
index f11b8614b..228970b59 100644
--- a/src/Services/Identity/Identity.API/wwwroot/css/site.min.css
+++ b/src/Services/Identity/Identity.API/wwwroot/css/site.min.css
@@ -1 +1 @@
-body{margin-top:65px}.navbar-header{position:relative;top:-4px}.navbar-brand>.icon-banner{position:relative;top:-2px;display:inline}.icon{position:relative;top:-10px}.page-consent .client-logo{float:left}.page-consent .client-logo img{width:80px;height:80px}.page-consent .consent-buttons{margin-top:25px}.page-consent .consent-form .consent-scopecheck{display:inline-block;margin-right:5px}.page-consent .consent-form .consent-description{margin-left:25px}.page-consent .consent-form .consent-description label{font-weight:normal}.page-consent .consent-form .consent-remember{padding-left:16px}@font-face{font-family:Montserrat;font-weight:400;src:url("../fonts/Montserrat-Regular.eot?") format("eot"),url("../fonts/Montserrat-Regular.woff") format("woff"),url("../fonts/Montserrat-Regular.ttf") format("truetype"),url("../fonts/Montserrat-Regular.svg#Montserrat") format("svg")}@font-face{font-family:Montserrat;font-weight:700;src:url("../fonts/Montserrat-Bold.eot?") format("eot"),url("../fonts/Montserrat-Bold.woff") format("woff"),url("../fonts/Montserrat-Bold.ttf") format("truetype"),url("../fonts/Montserrat-Bold.svg#Montserrat") format("svg")}body{font-family:Montserrat,sans-serif;min-width:480px}.mt-15{margin-top:15px}.body-content{padding-left:15px;padding-right:15px}input,select,textarea{max-width:280px}.select-filter{background-color:transparent;padding:10px;margin:10px;margin-right:20px;color:#fff;padding-top:20px;padding-bottom:3px;min-width:140px;border-color:#37c7ca;max-height:43px;-webkit-appearance:none}.select-filter option{background-color:#00a69c}select::-ms-expand{display:none}.select-filter-wrapper{z-index:0;display:inline-block;margin-left:-10px}.select-filter-wrapper::before{content:attr(data-name);opacity:.5;z-index:1;text-transform:uppercase;position:absolute;font-size:10px;margin-top:15px;margin-left:21px;color:#fff}.select-filter-arrow{position:absolute;margin-left:130px;margin-top:40px}.btn-brand-small-filter{margin-top:10px;position:absolute;margin-left:15px}.carousel-caption p{font-size:20px;line-height:1.4}.layout-cart-image{height:36px;margin-top:5px}.layout-cart-badge{position:absolute;margin-top:2px;margin-left:14px;background-color:#83d01b;padding:1px;color:#fff;border-radius:50%;width:18px;height:18px;font-size:12px;cursor:pointer}.btn-bracketed:hover:before{display:inline-block;content:"[";padding-right:.5em;color:#7fff00}.btn-bracketed:hover:after{display:inline-block;content:"]";padding-left:.5em;color:#7fff00}.btn-brand{background-color:#83d01b;color:#fff;padding:10px 20px 10px 20px;border-radius:0;border:none;width:255px;display:inline-block;text-align:center;text-transform:uppercase;height:45px;font-size:16px;font-weight:normal}.btn-brand::before{content:'['}.btn-brand::after{content:']'}.btn-brand:hover:before{padding-right:5px}.btn-brand:hover:after{padding-left:5px}.btn-brand-big{width:360px;margin-top:20px}.btn-brand-small{width:45px}.btn-brand-small::before{content:''}.btn-brand-small::after{content:''}.btn-brand-small:hover:before{content:'';padding:0}.btn-brand-small:hover:after{content:'';padding:0}.btn-brand-dark{background-color:#00a69c}.btn-brand:hover{color:#fff;background-color:#83d01b;text-decoration:none}.btn-brand-dark:hover{background-color:#00a69c}.btn-cart{float:right;margin-top:40px;margin-bottom:40px}.btn-catalog-apply{padding:0}.form-label{text-transform:uppercase;font-weight:normal!important;text-align:left;margin-bottom:10px !important;color:#404040}.form-input{border-radius:0;padding:10px;height:45px}.form-input-small{max-width:100px!important}.form-select{border-radius:0;padding:10px;height:45px;width:150px}.carousel-inner .item img[src$=".svg"]{width:100%}.navbar-inverse{background-color:#fff;border-color:#fff}.btn-login{border:1px solid #00a69c;height:36px!important;margin-right:10px;margin-top:10px;background-color:#fff;color:#00a69c;text-transform:uppercase;max-width:140px;width:140px;padding-top:8px!important}.btn-login{font-weight:normal!important}.btn-login::before{content:'['}.btn-login::after{content:']'}.btn-login:hover:before{content:'[ '}.btn-login:hover:after{content:' ]'}.navbar-inverse li a{height:30px;padding:5px 20px;color:#00a69c !important}.navbar-brand{margin-top:20px;background-image:url(../images/brand.PNG);width:201px;height:44px;margin-left:0 !important}.nav>li>a{color:#fff}.nav>li>a:hover,.nav>li>a:focus{background-color:#00a69c;font-weight:bolder}.container-fluid{padding-left:0;padding-right:0}.home-banner{width:100%;margin-right:0;margin-left:0;background-image:url(../images/main_banner.png);background-size:cover;height:258px;background-position:center}.home-banner-text{margin-top:70px}.home-catalog-container{min-height:400px;margin-bottom:20px}.home-catalog-filter-container{background-color:#00a69c;height:63px;line-height:76px}.home-catalog-filter-container li a{padding-top:5px !important}.home-catalog-filter-brands::before{content:'BRAND';color:#fff;font-size:x-small;opacity:.5;margin:10px 0 0 15px}.home-catalog-filter-types::before{content:'TYPES';color:#fff;font-size:x-small;opacity:.5;margin:10px 0 0 15px}.home-catalog-item{margin-top:10px;margin-bottom:10px}.home-catalog-item-image{width:100%;object-fit:cover;text-align:center}.home-catalog-item-image-addCart{background-color:#83d01b;color:#fff;display:inline-block;height:43px;padding:10px 20px 10px 20px;font-weight:bold;text-align:center;margin-top:10px;margin-left:60px;margin-right:60px;font-size:16px;font-weight:normal}.home-catalog-item-image-addCart:hover{color:#fff;text-decoration:none}.home-catalog-item-image:hover:after{cursor:pointer}.home-catalog-item-title{text-align:center;text-transform:uppercase;font-weight:300;font-size:16px;margin-top:20px}.home-catalog-item-price{text-align:center;font-weight:900;font-size:28px}.home-catalog-item-price::before{content:'$'}.home-catalog-noResults{text-align:center;margin-top:100px}.container .nav .navbar-nav .col-sm-6 ::before{content:'BRAND'}.validation-summary-errors li{list-style:none}footer{background-color:#000;height:150px;vertical-align:middle}footer .brand{margin-top:25px;background-image:url(../images/brand_dark.PNG);max-width:231px;height:52px;margin-left:0 !important}footer .text{text-align:right;width:100%;height:100%;color:#83d01b;margin-top:10px}.text{color:#83d01b}.text:hover{color:#83d01b}form .col-md-4{text-align:right}.brand-header-block{background-color:#00a69c;height:63px}.brand-header-block li{list-style:none;display:inline;opacity:.5;margin-top:25px;margin-left:10px;cursor:pointer;color:#fff}.brand-header-block li a{color:#fff}.brand-header-block li a:hover{text-decoration:none}.brand-header-block .active{opacity:1}.brand-header-block .active::before{content:'[ ';color:#adff2f}.brand-header-block .active::after{content:' ]';color:#adff2f}.brand-header-back{float:left!important;margin-top:20px!important;text-transform:uppercase}.account-login-container{min-height:70vh;text-align:center;padding-top:40px}.account-register-container{min-height:70vh;text-align:center !important;align-content:center}.cart-index-container{min-height:70vh;padding-top:40px;margin-bottom:30px;min-width:992px}.register-container{min-height:70vh;padding-top:40px;margin-bottom:30px;padding-left:30px}.order-create-container{min-height:70vh;padding-top:40px;margin-bottom:30px;padding-left:30px;min-width:995px}.cart-product-column{max-width:120px;text-transform:uppercase;vertical-align:middle!important}.order-create-container .cart-product-column{max-width:130px}.cart-product-column-name{width:220px}.cart-subtotal-label{font-size:12px;color:#404040;margin-top:10px}.cart-subtotal-value{font-size:20px;color:#00a69c}.cart-total-label{font-size:14px;color:#404040;margin-top:10px}.cart-total-value{font-size:28px;color:#00a69c;text-align:left}.cart-product-image{max-width:210px}.cart-section-total{margin-bottom:5px;margin-left:175px;text-align:left}.cart-product-column input{width:70px;text-align:center}.cart-refresh-button{margin-top:0;background-image:url('../images/refresh.svg');color:#fff;font-size:8px;width:40px;height:40px;background-color:transparent;border:none;margin-top:25px;margin-left:15px}.cart-refresh-button:hover{background-color:transparent}.cart-totals{border-bottom:none!important}.input-validation-error{border:1px solid #fb0d0d}.text-danger{color:#fb0d0d;font-size:12px}.cart{border:none !important}.form-horizontal h4{margin-top:30px}.form-horizontal .form-group{margin-right:0!important}.form-control:focus{border-color:#83d01b}.form-input-center{margin:auto}.order-index-container{min-height:70vh;padding-top:40px;margin-bottom:30px}.order-index-container .table tbody tr{border-bottom:none}.order-index-container .table tbody tr td{border-top:none;padding-top:10px;padding-bottom:10px}.order-index-container .table tbody tr:nth-child(even){background-color:#f5f5f5}.order-create-section-title{margin-left:-15px;text-transform:uppercase}.order-create-section-items{margin-left:-45px;width:102%}.order-detail-button a{color:#83d01b}.order-detail-container{min-height:70vh;padding-top:40px;margin-bottom:30px}.order-detail-container .table tbody tr:first-child td{border-top:none}.order-detail-container .table tr{border-bottom:none}.order-detail-section{margin-top:50px}.order-detail-container .table{margin-left:-7px}.order-section-total{margin-bottom:5px;margin-left:40px;text-align:left}.fr{float:right!important}.down-arrow{background-image:url('../images/arrow-down.png');height:7px;width:10px;display:inline-block;margin-left:20px}.logout-icon{background-image:url('../images/logout.PNG');display:inline-block;height:19px;width:19px;margin-left:15px}.myorders-icon{background-image:url('../images/my_orders.PNG');display:inline-block;height:20px;width:20px;margin-left:15px}.login-user{position:absolute!important;top:30px;right:65px;cursor:pointer}.login-user-dropdown{position:relative;display:inline-block}.login-user-dropdown-content{display:none;position:absolute;background-color:#fff;min-width:160px;box-shadow:0 8px 16px 0 rgba(0,0,0,.2);right:0}.login-user-dropdown-content a{color:#000;padding:12px 16px;text-decoration:none;display:block;text-align:right;text-transform:uppercase}.login-user:hover .login-user-dropdown-content{display:block}.down-arrow:hover>.login-user-dropdown-content{display:block}.login-user-dropdown-content a:hover{color:#83d01b}.es-header{min-height:80px!important}.es-pager-bottom{margin-top:40px}.es-pager-top{margin-bottom:20px;margin-top:20px}.es-pager-top ul{list-style:none}.es-pager-bottom ul{list-style:none}.page-item{cursor:pointer}.next{position:absolute;right:15px;top:0}.previous{position:absolute;left:0;top:0}.is-disabled{cursor:not-allowed;opacity:.5;pointer-events:none}.table tr{border-bottom:1px solid #ddd}.table th{text-transform:uppercase}.navbar-nav{margin-top:10px;margin-bottom:7.5px;margin-right:-10px;float:right}@media screen and (max-width:1195px){.cart-product-column-name{display:none}}@media screen and (max-width:767px){.carousel-caption{display:none}footer .text{text-align:left;margin-top:-15px}.cart-product-column-brand{display:none}}@media screen and (min-width:992px){.form-input{width:360px;max-width:360px}}@media screen and (max-width:415px){.account-login-container{margin-left:-50px}.page-consent{margin-left:10px;margin-right:80px;padding-right:0;padding-left:0}}
\ No newline at end of file
+body{margin-top:65px}.navbar-header{position:relative;top:-4px}.navbar-brand>.icon-banner{position:relative;top:-2px;display:inline}.icon{position:relative;top:-10px}.page-consent .client-logo{float:left}.page-consent .client-logo img{width:80px;height:80px}.page-consent .consent-buttons{margin-top:25px}.page-consent .consent-form .consent-scopecheck{display:inline-block;margin-right:5px}.page-consent .consent-form .consent-description{margin-left:25px}.page-consent .consent-form .consent-description label{font-weight:normal}.page-consent .consent-form .consent-remember{padding-left:16px}@font-face{font-family:Montserrat;font-weight:400;src:url("../fonts/Montserrat-Regular.eot?") format("eot"),url("../fonts/Montserrat-Regular.woff") format("woff"),url("../fonts/Montserrat-Regular.ttf") format("truetype"),url("../fonts/Montserrat-Regular.svg#Montserrat") format("svg")}@font-face{font-family:Montserrat;font-weight:700;src:url("../fonts/Montserrat-Bold.eot?") format("eot"),url("../fonts/Montserrat-Bold.woff") format("woff"),url("../fonts/Montserrat-Bold.ttf") format("truetype"),url("../fonts/Montserrat-Bold.svg#Montserrat") format("svg")}body{font-family:Montserrat,sans-serif;min-width:480px}.mt-15{margin-top:15px}.body-content{padding-left:15px;padding-right:15px}input,select,textarea{max-width:280px}.select-filter{background-color:transparent;padding:10px;margin:10px;margin-right:20px;color:#fff;padding-top:20px;padding-bottom:3px;min-width:140px;border-color:#37c7ca;max-height:43px;-webkit-appearance:none}.select-filter option{background-color:#00a69c}select::-ms-expand{display:none}.select-filter-wrapper{z-index:0;display:inline-block;margin-left:-10px}.select-filter-wrapper::before{content:attr(data-name);opacity:.5;z-index:1;text-transform:uppercase;position:absolute;font-size:10px;margin-top:15px;margin-left:21px;color:#fff}.select-filter-arrow{position:absolute;margin-left:130px;margin-top:40px}.btn-brand-small-filter{margin-top:10px;position:absolute;margin-left:15px}.carousel-caption p{font-size:20px;line-height:1.4}.layout-cart-image{height:36px;margin-top:5px}.layout-cart-badge{position:absolute;margin-top:2px;margin-left:14px;background-color:#83d01b;padding:1px;color:#fff;border-radius:50%;width:18px;height:18px;font-size:12px;cursor:pointer}.btn-bracketed:hover:before{display:inline-block;content:"[";padding-right:.5em;color:#7fff00}.btn-bracketed:hover:after{display:inline-block;content:"]";padding-left:.5em;color:#7fff00}.btn-brand{background-color:#83d01b;color:#fff;padding:10px 20px 10px 20px;border-radius:0;border:none;width:255px;display:inline-block;text-align:center;text-transform:uppercase;height:45px;font-size:16px;font-weight:normal}.btn-brand::before{content:'['}.btn-brand::after{content:']'}.btn-brand:hover:before{padding-right:5px}.btn-brand:hover:after{padding-left:5px}.btn-brand-big{width:360px;margin-top:20px}.btn-brand-small{width:45px}.btn-brand-small::before{content:''}.btn-brand-small::after{content:''}.btn-brand-small:hover:before{content:'';padding:0}.btn-brand-small:hover:after{content:'';padding:0}.btn-brand-dark{background-color:#00a69c}.btn-brand:hover{color:#fff;background-color:#83d01b;text-decoration:none}.btn-brand-dark:hover{background-color:#00a69c}.btn-cart{float:right;margin-top:40px;margin-bottom:40px}.btn-catalog-apply{padding:0}.form-label{text-transform:uppercase;font-weight:normal!important;text-align:left;margin-bottom:10px !important;color:#404040}.form-input{border-radius:0;padding:10px;height:45px}.form-input-small{max-width:100px!important}.form-select{border-radius:0;padding:10px;height:45px;width:150px}.carousel-inner .item img[src$=".svg"]{width:100%}.navbar-inverse{background-color:#fff;border-color:#fff}.btn-login{border:1px solid #00a69c;height:36px!important;margin-right:10px;margin-top:10px;background-color:#fff;color:#00a69c;text-transform:uppercase;max-width:140px;width:140px;padding-top:8px!important}.btn-login{font-weight:normal!important}.btn-login::before{content:'['}.btn-login::after{content:']'}.btn-login:hover:before{content:'[ '}.btn-login:hover:after{content:' ]'}.navbar-inverse li a{height:30px;padding:5px 20px;color:#00a69c !important}.navbar-brand{margin-top:20px;background-image:url(../images/brand.PNG);width:201px;height:44px;margin-left:0 !important}.nav>li>a{color:#fff}.nav>li>a:hover,.nav>li>a:focus{background-color:#00a69c;font-weight:bolder}.container-fluid{padding-left:0;padding-right:0}.home-banner{width:100%;margin-right:0;margin-left:0;background-image:url(../images/main_banner.png);background-size:cover;height:258px;background-position:center}.home-banner-text{margin-top:70px}.home-catalog-container{min-height:400px;margin-bottom:20px}.home-catalog-filter-container{background-color:#00a69c;height:63px;line-height:76px}.home-catalog-filter-container li a{padding-top:5px !important}.home-catalog-filter-brands::before{content:'BRAND';color:#fff;font-size:x-small;opacity:.5;margin:10px 0 0 15px}.home-catalog-filter-types::before{content:'TYPES';color:#fff;font-size:x-small;opacity:.5;margin:10px 0 0 15px}.home-catalog-item{margin-top:10px;margin-bottom:10px}.home-catalog-item-image{width:100%;object-fit:cover;text-align:center}.home-catalog-item-image-addCart{background-color:#83d01b;color:#fff;display:inline-block;height:43px;padding:10px 20px 10px 20px;font-weight:bold;text-align:center;margin-top:10px;margin-left:60px;margin-right:60px;font-size:16px;font-weight:normal}.home-catalog-item-image-addCart:hover{color:#fff;text-decoration:none}.home-catalog-item-image:hover:after{cursor:pointer}.home-catalog-item-title{text-align:center;text-transform:uppercase;font-weight:300;font-size:16px;margin-top:20px}.home-catalog-item-price{text-align:center;font-weight:900;font-size:28px}.home-catalog-item-price::before{content:'$'}.home-catalog-noResults{text-align:center;margin-top:100px}.container .nav .navbar-nav .col-sm-6 ::before{content:'BRAND'}.validation-summary-errors li{list-style:none}footer{background-color:#000;height:150px;vertical-align:middle}footer .brand{margin-top:25px;background-image:url(../images/brand_dark.PNG);max-width:231px;height:52px;margin-left:0 !important}footer .text{margin-top:55px}.text{color:#83d01b}.text:hover{color:#83d01b}form .col-md-4{text-align:right}.brand-header-block{background-color:#00a69c;height:63px}.brand-header-block li{list-style:none;display:inline;opacity:.5;margin-top:25px;margin-left:10px;cursor:pointer;color:#fff}.brand-header-block li a{color:#fff}.brand-header-block li a:hover{text-decoration:none}.brand-header-block .active{opacity:1}.brand-header-block .active::before{content:'[ ';color:#adff2f}.brand-header-block .active::after{content:' ]';color:#adff2f}.brand-header-back{float:left!important;margin-top:20px!important;text-transform:uppercase}.account-login-container{min-height:70vh;text-align:center;padding-top:40px}.account-register-container{min-height:70vh;text-align:center !important;align-content:center}.cart-index-container{min-height:70vh;padding-top:40px;margin-bottom:30px;min-width:992px}.register-container{min-height:70vh;padding-top:40px;margin-bottom:30px;padding-left:30px}.order-create-container{min-height:70vh;padding-top:40px;margin-bottom:30px;padding-left:30px;min-width:995px}.cart-product-column{max-width:120px;text-transform:uppercase;vertical-align:middle!important}.order-create-container .cart-product-column{max-width:130px}.cart-product-column-name{width:220px}.cart-subtotal-label{font-size:12px;color:#404040;margin-top:10px}.cart-subtotal-value{font-size:20px;color:#00a69c}.cart-total-label{font-size:14px;color:#404040;margin-top:10px}.cart-total-value{font-size:28px;color:#00a69c;text-align:left}.cart-product-image{max-width:210px}.cart-section-total{margin-bottom:5px;margin-left:175px;text-align:left}.cart-product-column input{width:70px;text-align:center}.cart-refresh-button{margin-top:0;background-image:url('../images/refresh.svg');color:#fff;font-size:8px;width:40px;height:40px;background-color:transparent;border:none;margin-top:25px;margin-left:15px}.cart-refresh-button:hover{background-color:transparent}.cart-totals{border-bottom:none!important}.input-validation-error{border:1px solid #fb0d0d}.text-danger{color:#fb0d0d;font-size:12px}.cart{border:none !important}.form-horizontal h4{margin-top:30px}.form-horizontal .form-group{margin-right:0!important}.form-control:focus{border-color:#83d01b}.form-input-center{margin:auto}.order-index-container{min-height:70vh;padding-top:40px;margin-bottom:30px}.order-index-container .table tbody tr{border-bottom:none}.order-index-container .table tbody tr td{border-top:none;padding-top:10px;padding-bottom:10px}.order-index-container .table tbody tr:nth-child(even){background-color:#f5f5f5}.order-create-section-title{margin-left:-15px;text-transform:uppercase}.order-create-section-items{margin-left:-45px;width:102%}.order-detail-button a{color:#83d01b}.order-detail-container{min-height:70vh;padding-top:40px;margin-bottom:30px}.order-detail-container .table tbody tr:first-child td{border-top:none}.order-detail-container .table tr{border-bottom:none}.order-detail-section{margin-top:50px}.order-detail-container .table{margin-left:-7px}.order-section-total{margin-bottom:5px;margin-left:40px;text-align:left}.fr{float:right!important}.down-arrow{background-image:url('../images/arrow-down.png');height:7px;width:10px;display:inline-block;margin-left:20px}.logout-icon{background-image:url('../images/logout.PNG');display:inline-block;height:19px;width:19px;margin-left:15px}.myorders-icon{background-image:url('../images/my_orders.PNG');display:inline-block;height:20px;width:20px;margin-left:15px}.login-user{position:absolute!important;top:30px;right:65px;cursor:pointer}.login-user-dropdown{position:relative;display:inline-block}.login-user-dropdown-content{display:none;position:absolute;background-color:#fff;min-width:160px;box-shadow:0 8px 16px 0 rgba(0,0,0,.2);right:0}.login-user-dropdown-content a{color:#000;padding:12px 16px;text-decoration:none;display:block;text-align:right;text-transform:uppercase}.login-user:hover .login-user-dropdown-content{display:block}.down-arrow:hover>.login-user-dropdown-content{display:block}.login-user-dropdown-content a:hover{color:#83d01b}.es-header{min-height:80px!important}.es-pager-bottom{margin-top:40px}.es-pager-top{margin-bottom:20px;margin-top:20px}.es-pager-top ul{list-style:none}.es-pager-bottom ul{list-style:none}.page-item{cursor:pointer}.next{position:absolute;right:15px;top:0}.previous{position:absolute;left:0;top:0}.is-disabled{cursor:not-allowed;opacity:.5;pointer-events:none}.table tr{border-bottom:1px solid #ddd}.table th{text-transform:uppercase}.navbar-nav{margin-top:10px;margin-bottom:7.5px;margin-right:-10px;float:right}@media screen and (max-width:1195px){.cart-product-column-name{display:none}}@media screen and (max-width:767px){.carousel-caption{display:none}footer .text{text-align:left;margin-top:-15px}.cart-product-column-brand{display:none}}@media screen and (min-width:992px){.form-input{width:360px;max-width:360px}}@media screen and (max-width:415px){.account-login-container{margin-left:-50px}.page-consent{margin-left:10px;margin-right:80px;padding-right:0;padding-left:0}}
\ No newline at end of file
diff --git a/src/Services/Identity/Identity.API/wwwroot/images/brand.PNG b/src/Services/Identity/Identity.API/wwwroot/images/brand.PNG
index 2afd3dccf..4f7b8a84b 100644
Binary files a/src/Services/Identity/Identity.API/wwwroot/images/brand.PNG and b/src/Services/Identity/Identity.API/wwwroot/images/brand.PNG differ
diff --git a/src/Services/Identity/Identity.API/wwwroot/images/brand_dark.PNG b/src/Services/Identity/Identity.API/wwwroot/images/brand_dark.PNG
index 44a65364f..04626dcf4 100644
Binary files a/src/Services/Identity/Identity.API/wwwroot/images/brand_dark.PNG and b/src/Services/Identity/Identity.API/wwwroot/images/brand_dark.PNG differ
diff --git a/src/Services/Identity/Identity.API/wwwroot/images/logout.PNG b/src/Services/Identity/Identity.API/wwwroot/images/logout.PNG
index 9915b9862..d7c4ef140 100644
Binary files a/src/Services/Identity/Identity.API/wwwroot/images/logout.PNG and b/src/Services/Identity/Identity.API/wwwroot/images/logout.PNG differ
diff --git a/src/Services/Identity/Identity.API/wwwroot/images/main_footer_text.PNG b/src/Services/Identity/Identity.API/wwwroot/images/main_footer_text.PNG
new file mode 100644
index 000000000..d8f90a201
Binary files /dev/null and b/src/Services/Identity/Identity.API/wwwroot/images/main_footer_text.PNG differ
diff --git a/src/Services/Identity/Identity.API/wwwroot/images/my_orders.PNG b/src/Services/Identity/Identity.API/wwwroot/images/my_orders.PNG
index 145be925b..9ee5f60e7 100644
Binary files a/src/Services/Identity/Identity.API/wwwroot/images/my_orders.PNG and b/src/Services/Identity/Identity.API/wwwroot/images/my_orders.PNG differ
diff --git a/src/Services/Location/Locations.API/Controllers/LocationsController.cs b/src/Services/Location/Locations.API/Controllers/LocationsController.cs
index a6cb8bdad..a61c7f2d0 100644
--- a/src/Services/Location/Locations.API/Controllers/LocationsController.cs
+++ b/src/Services/Location/Locations.API/Controllers/LocationsController.cs
@@ -46,7 +46,7 @@ namespace Locations.API.Controllers
var location = await _locationsService.GetLocation(locationId);
return Ok(location);
}
-
+
//POST api/v1/[controller]/
[Route("")]
[HttpPost]
diff --git a/src/Services/Location/Locations.API/Infrastructure/Filters/AuthorizeCheckOperationFilter.cs b/src/Services/Location/Locations.API/Infrastructure/Filters/AuthorizeCheckOperationFilter.cs
new file mode 100644
index 000000000..5a9d9e12a
--- /dev/null
+++ b/src/Services/Location/Locations.API/Infrastructure/Filters/AuthorizeCheckOperationFilter.cs
@@ -0,0 +1,31 @@
+
+using Microsoft.AspNetCore.Authorization;
+using Swashbuckle.AspNetCore.Swagger;
+using Swashbuckle.AspNetCore.SwaggerGen;
+using System.Collections.Generic;
+using System.Linq;
+
+namespace Microsoft.eShopOnContainers.Services.Locations.API.Infrastructure.Filters
+{
+ internal class AuthorizeCheckOperationFilter : IOperationFilter
+ {
+ public void Apply(Operation operation, OperationFilterContext context)
+ {
+ // Check for authorize attribute
+ var hasAuthorize = context.ApiDescription.ControllerAttributes().OfType().Any() ||
+ context.ApiDescription.ActionAttributes().OfType().Any();
+
+ if (hasAuthorize)
+ {
+ operation.Responses.Add("401", new Response { Description = "Unauthorized" });
+ operation.Responses.Add("403", new Response { Description = "Forbidden" });
+
+ operation.Security = new List>>();
+ operation.Security.Add(new Dictionary>
+ {
+ { "oauth2", new [] { "api1" } }
+ });
+ }
+ }
+ }
+}
diff --git a/src/Services/Location/Locations.API/Infrastructure/Repositories/LocationsRepository.cs b/src/Services/Location/Locations.API/Infrastructure/Repositories/LocationsRepository.cs
index 47d443718..9f8d42ad4 100644
--- a/src/Services/Location/Locations.API/Infrastructure/Repositories/LocationsRepository.cs
+++ b/src/Services/Location/Locations.API/Infrastructure/Repositories/LocationsRepository.cs
@@ -1,6 +1,5 @@
namespace Microsoft.eShopOnContainers.Services.Locations.API.Infrastructure.Repositories
{
- using Microsoft.EntityFrameworkCore;
using Microsoft.eShopOnContainers.Services.Locations.API.Model;
using Microsoft.Extensions.Options;
using MongoDB.Bson;
diff --git a/src/Services/Location/Locations.API/Infrastructure/Services/IIdentityService.cs b/src/Services/Location/Locations.API/Infrastructure/Services/IIdentityService.cs
index d49abe111..a2b79d8d1 100644
--- a/src/Services/Location/Locations.API/Infrastructure/Services/IIdentityService.cs
+++ b/src/Services/Location/Locations.API/Infrastructure/Services/IIdentityService.cs
@@ -1,9 +1,4 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Threading.Tasks;
-
-namespace Microsoft.eShopOnContainers.Services.Locations.API.Infrastructure.Services
+namespace Microsoft.eShopOnContainers.Services.Locations.API.Infrastructure.Services
{
public interface IIdentityService
{
diff --git a/src/Services/Location/Locations.API/Infrastructure/Services/IdentityService.cs b/src/Services/Location/Locations.API/Infrastructure/Services/IdentityService.cs
index bcb7a84f8..d06b44a4f 100644
--- a/src/Services/Location/Locations.API/Infrastructure/Services/IdentityService.cs
+++ b/src/Services/Location/Locations.API/Infrastructure/Services/IdentityService.cs
@@ -1,14 +1,11 @@
using Microsoft.AspNetCore.Http;
using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Threading.Tasks;
namespace Microsoft.eShopOnContainers.Services.Locations.API.Infrastructure.Services
{
public class IdentityService : IIdentityService
{
- private IHttpContextAccessor _context;
+ private readonly IHttpContextAccessor _context;
public IdentityService(IHttpContextAccessor context)
{
diff --git a/src/Services/Location/Locations.API/Infrastructure/Services/LocationsService.cs b/src/Services/Location/Locations.API/Infrastructure/Services/LocationsService.cs
index 4b88e1927..81bc16489 100644
--- a/src/Services/Location/Locations.API/Infrastructure/Services/LocationsService.cs
+++ b/src/Services/Location/Locations.API/Infrastructure/Services/LocationsService.cs
@@ -1,15 +1,14 @@
namespace Microsoft.eShopOnContainers.Services.Locations.API.Infrastructure.Services
{
+ using Microsoft.eShopOnContainers.Services.Locations.API.IntegrationEvents.Events;
+ using Microsoft.eShopOnContainers.BuildingBlocks.EventBus.Abstractions;
+ using Microsoft.eShopOnContainers.Services.Locations.API.Infrastructure.Exceptions;
using Microsoft.eShopOnContainers.Services.Locations.API.Infrastructure.Repositories;
- using Microsoft.eShopOnContainers.Services.Locations.API.ViewModel;
using Microsoft.eShopOnContainers.Services.Locations.API.Model;
+ using Microsoft.eShopOnContainers.Services.Locations.API.ViewModel;
using System;
- using System.Threading.Tasks;
- using System.Linq;
- using Microsoft.eShopOnContainers.Services.Locations.API.Infrastructure.Exceptions;
using System.Collections.Generic;
- using Microsoft.eShopOnContainers.BuildingBlocks.EventBus.Abstractions;
- using Microsoft.eShopOnContainers.Services.Locations.API.IntegrationEvents.Events;
+ using System.Threading.Tasks;
public class LocationsService : ILocationsService
{
diff --git a/src/Services/Location/Locations.API/IntegrationEvents/Events/UserLocationUpdatedIntegrationEvent.cs b/src/Services/Location/Locations.API/IntegrationEvents/Events/UserLocationUpdatedIntegrationEvent.cs
index d4112a54d..7c3e72769 100644
--- a/src/Services/Location/Locations.API/IntegrationEvents/Events/UserLocationUpdatedIntegrationEvent.cs
+++ b/src/Services/Location/Locations.API/IntegrationEvents/Events/UserLocationUpdatedIntegrationEvent.cs
@@ -1,13 +1,13 @@
namespace Microsoft.eShopOnContainers.Services.Locations.API.IntegrationEvents.Events
{
+ using Locations.API.Model;
using Microsoft.eShopOnContainers.BuildingBlocks.EventBus.Events;
- using Microsoft.eShopOnContainers.Services.Locations.API.Model;
using System.Collections.Generic;
public class UserLocationUpdatedIntegrationEvent : IntegrationEvent
{
- public string UserId { get; private set; }
- public List LocationList { get; private set; }
+ public string UserId { get; set; }
+ public List LocationList { get; set; }
public UserLocationUpdatedIntegrationEvent(string userId, List locationList)
{
diff --git a/src/Services/Location/Locations.API/Locations.API.csproj b/src/Services/Location/Locations.API/Locations.API.csproj
index 2ede0db1f..ca1f68f2a 100644
--- a/src/Services/Location/Locations.API/Locations.API.csproj
+++ b/src/Services/Location/Locations.API/Locations.API.csproj
@@ -40,7 +40,10 @@
+
+
+
diff --git a/src/Services/Location/Locations.API/Model/UserLocationDetails.cs b/src/Services/Location/Locations.API/Model/UserLocationDetails.cs
index 6e152fe1b..7983e8e59 100644
--- a/src/Services/Location/Locations.API/Model/UserLocationDetails.cs
+++ b/src/Services/Location/Locations.API/Model/UserLocationDetails.cs
@@ -1,9 +1,4 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Threading.Tasks;
-
-namespace Microsoft.eShopOnContainers.Services.Locations.API.Model
+namespace Microsoft.eShopOnContainers.Services.Locations.API.Model
{
public class UserLocationDetails
{
@@ -11,4 +6,4 @@ namespace Microsoft.eShopOnContainers.Services.Locations.API.Model
public string Code { get; set; }
public string Description { get; set; }
}
-}
+}
\ No newline at end of file
diff --git a/src/Services/Location/Locations.API/Program.cs b/src/Services/Location/Locations.API/Program.cs
index 345956401..db2a5532a 100644
--- a/src/Services/Location/Locations.API/Program.cs
+++ b/src/Services/Location/Locations.API/Program.cs
@@ -14,6 +14,7 @@ namespace Microsoft.eShopOnContainers.Services.Locations.API
{
var host = new WebHostBuilder()
.UseKestrel()
+ .UseHealthChecks("/hc")
.UseContentRoot(Directory.GetCurrentDirectory())
.UseStartup()
.UseApplicationInsights()
diff --git a/src/Services/Location/Locations.API/Startup.cs b/src/Services/Location/Locations.API/Startup.cs
index f767f227b..da95f8b09 100644
--- a/src/Services/Location/Locations.API/Startup.cs
+++ b/src/Services/Location/Locations.API/Startup.cs
@@ -16,6 +16,12 @@ using Microsoft.Extensions.Logging;
using RabbitMQ.Client;
using System.Reflection;
using System;
+using Microsoft.eShopOnContainers.BuildingBlocks.EventBusServiceBus;
+using Microsoft.Azure.ServiceBus;
+using System.Collections.Generic;
+using Swashbuckle.AspNetCore.Swagger;
+using Microsoft.Extensions.HealthChecks;
+using System.Threading.Tasks;
namespace Microsoft.eShopOnContainers.Services.Locations.API
{
@@ -51,19 +57,39 @@ namespace Microsoft.eShopOnContainers.Services.Locations.API
services.Configure(Configuration);
- services.AddSingleton(sp =>
+ if (Configuration.GetValue("AzureServiceBusEnabled"))
{
- var logger = sp.GetRequiredService>();
+ services.AddSingleton(sp =>
+ {
+ var logger = sp.GetRequiredService>();
+
+ var serviceBusConnectionString = Configuration["EventBusConnection"];
+ var serviceBusConnection = new ServiceBusConnectionStringBuilder(serviceBusConnectionString);
- var factory = new ConnectionFactory()
+ return new DefaultServiceBusPersisterConnection(serviceBusConnection, logger);
+ });
+ }
+ else
+ {
+ services.AddSingleton(sp =>
{
- HostName = Configuration["EventBusConnection"]
- };
+ var logger = sp.GetRequiredService>();
+
+ var factory = new ConnectionFactory
+ {
+ HostName = Configuration["EventBusConnection"]
+ };
+
+ return new DefaultRabbitMQPersistentConnection(factory, logger);
+ });
+ }
- return new DefaultRabbitMQPersistentConnection(factory, logger);
+ services.AddHealthChecks(checks =>
+ {
+ checks.AddValueTaskCheck("HTTP Endpoint", () => new ValueTask(HealthCheckResult.Healthy("Ok")));
});
- RegisterServiceBus(services);
+ RegisterEventBus(services);
// Add framework services.
services.AddSwaggerGen(options =>
@@ -76,6 +102,21 @@ namespace Microsoft.eShopOnContainers.Services.Locations.API
Description = "The Location Microservice HTTP API. This is a Data-Driven/CRUD microservice sample",
TermsOfService = "Terms Of Service"
});
+
+ options.AddSecurityDefinition("oauth2", new OAuth2Scheme
+ {
+ Type = "oauth2",
+ Flow = "implicit",
+ AuthorizationUrl = "http://localhost:5105/connect/authorize",
+ TokenUrl = "http://localhost:5105/connect/token",
+ Scopes = new Dictionary()
+ {
+ { "locations", "Locations API" }
+ }
+ });
+
+ options.OperationFilter();
+
});
services.AddCors(options =>
@@ -117,6 +158,7 @@ namespace Microsoft.eShopOnContainers.Services.Locations.API
.UseSwaggerUI(c =>
{
c.SwaggerEndpoint("/swagger/v1/swagger.json", "My API V1");
+ c.ConfigureOAuth2("swaggerui", "", "", "Swagger UI");
});
LocationsContextSeed.SeedAsync(app, loggerFactory)
@@ -134,10 +176,28 @@ namespace Microsoft.eShopOnContainers.Services.Locations.API
});
}
- private void RegisterServiceBus(IServiceCollection services)
+ private void RegisterEventBus(IServiceCollection services)
{
- services.AddSingleton();
+ if (Configuration.GetValue("AzureServiceBusEnabled"))
+ {
+ services.AddSingleton(sp =>
+ {
+ var serviceBusPersisterConnection = sp.GetRequiredService();
+ var iLifetimeScope = sp.GetRequiredService();
+ var logger = sp.GetRequiredService>();
+ var eventBusSubcriptionsManager = sp.GetRequiredService();
+ var subscriptionClientName = Configuration["SubscriptionClientName"];
+
+ return new EventBusServiceBus(serviceBusPersisterConnection, logger,
+ eventBusSubcriptionsManager, subscriptionClientName, iLifetimeScope);
+ });
+ }
+ else
+ {
+ services.AddSingleton();
+ }
+
services.AddSingleton();
- }
+ }
}
}
diff --git a/src/Services/Location/Locations.API/appsettings.json b/src/Services/Location/Locations.API/appsettings.json
index a280150a3..511bb5c6a 100644
--- a/src/Services/Location/Locations.API/appsettings.json
+++ b/src/Services/Location/Locations.API/appsettings.json
@@ -9,5 +9,7 @@
"System": "Information",
"Microsoft": "Information"
}
- }
+ },
+ "AzureServiceBusEnabled": false,
+ "SubscriptionClientName": "Locations"
}
\ No newline at end of file
diff --git a/src/Services/Marketing/Infrastructure/AzureFunctions/MarketingDetailsHttpTrigger/function.json b/src/Services/Marketing/Infrastructure/AzureFunctions/MarketingDetailsHttpTrigger/function.json
new file mode 100644
index 000000000..70b31994a
--- /dev/null
+++ b/src/Services/Marketing/Infrastructure/AzureFunctions/MarketingDetailsHttpTrigger/function.json
@@ -0,0 +1,16 @@
+{
+ "bindings": [
+ {
+ "authLevel": "function",
+ "name": "req",
+ "type": "httpTrigger",
+ "direction": "in"
+ },
+ {
+ "name": "$return",
+ "type": "http",
+ "direction": "out"
+ }
+ ],
+ "disabled": false
+}
\ No newline at end of file
diff --git a/src/Services/Marketing/Infrastructure/AzureFunctions/MarketingDetailsHttpTrigger/project.json b/src/Services/Marketing/Infrastructure/AzureFunctions/MarketingDetailsHttpTrigger/project.json
new file mode 100644
index 000000000..97c3bba09
--- /dev/null
+++ b/src/Services/Marketing/Infrastructure/AzureFunctions/MarketingDetailsHttpTrigger/project.json
@@ -0,0 +1,21 @@
+{
+
+ "frameworks": {
+
+ "net46":{
+
+ "dependencies": {
+
+ "Dapper": "1.50.2",
+
+ "System.Data.SqlClient":"4.1.0",
+
+ "Microsoft.WindowsAzure.ConfigurationManager":"3.2.1"
+
+ }
+
+ }
+
+ }
+
+}
\ No newline at end of file
diff --git a/src/Services/Marketing/Infrastructure/AzureFunctions/MarketingDetailsHttpTrigger/run.csx b/src/Services/Marketing/Infrastructure/AzureFunctions/MarketingDetailsHttpTrigger/run.csx
new file mode 100644
index 000000000..9ca9b5a3b
--- /dev/null
+++ b/src/Services/Marketing/Infrastructure/AzureFunctions/MarketingDetailsHttpTrigger/run.csx
@@ -0,0 +1,91 @@
+using System.Net;
+using System.Net.Http.Headers;
+using System.Configuration;
+using Dapper;
+using System.Data.SqlClient;
+
+public static async Task Run(HttpRequestMessage req, TraceWriter log)
+{
+ log.Info($"Campaign HTTP trigger function processed a request. RequestUri={req.RequestUri}");
+
+ string htmlResponse = string.Empty;
+
+ // parse query parameter
+ string campaignId = req.GetQueryNameValuePairs()
+ .FirstOrDefault(q => string.Compare(q.Key, "campaignId", true) == 0)
+ .Value;
+
+ string userId = req.GetQueryNameValuePairs()
+ .FirstOrDefault(q => string.Compare(q.Key, "userId", true) == 0)
+ .Value;
+
+ var cnnString = ConfigurationManager.ConnectionStrings["SqlConnection"].ConnectionString;
+
+ using (var conn = new SqlConnection(cnnString))
+ {
+ await conn.OpenAsync();
+ var sql = "SELECT * FROM [dbo].[Campaign] WHERE Id = @CampaignId;";
+ var campaign = (await conn.QueryAsync(sql, new { CampaignId = campaignId })).FirstOrDefault();
+ htmlResponse = BuildHtmlResponse(campaign);
+ }
+
+ var response = new HttpResponseMessage(HttpStatusCode.OK);
+ response.Content = new ByteArrayContent(System.Text.Encoding.UTF8.GetBytes(htmlResponse));
+ response.Content.Headers.ContentType = new MediaTypeHeaderValue("text/html");
+
+ return response;
+}
+
+private static string BuildHtmlResponse(Campaign campaign)
+{
+ var marketingStorageUri = ConfigurationManager.AppSettings["MarketingStorageUri"];
+
+ return string.Format(@"
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ",
+ $"{marketingStorageUri}{campaign.PictureName}",
+ campaign.Name,
+ campaign.Description,
+ campaign.From.ToString("MMMM dd, yyyy"),
+ campaign.From.ToString("MMMM dd, yyyy"));
+}
+
+public class Campaign
+{
+ public int Id { get; set; }
+
+ public string Name { get; set; }
+
+ public string Description { get; set; }
+
+ public DateTime From { get; set; }
+
+ public DateTime To { get; set; }
+
+ public string PictureUri { get; set; }
+
+ public string PictureName { get; set; }
+}
diff --git a/src/Services/Marketing/Infrastructure/AzureFunctions/host.json b/src/Services/Marketing/Infrastructure/AzureFunctions/host.json
new file mode 100644
index 000000000..9e26dfeeb
--- /dev/null
+++ b/src/Services/Marketing/Infrastructure/AzureFunctions/host.json
@@ -0,0 +1 @@
+{}
\ No newline at end of file
diff --git a/src/Services/Marketing/Infrastructure/AzureFunctions/local.settings.json b/src/Services/Marketing/Infrastructure/AzureFunctions/local.settings.json
new file mode 100644
index 000000000..92d59f7e2
--- /dev/null
+++ b/src/Services/Marketing/Infrastructure/AzureFunctions/local.settings.json
@@ -0,0 +1,17 @@
+{
+ "IsEncrypted": false,
+ "Value": {
+ "APPSETTING_FUNCTIONS_EXTENSION_VERSION": "~1",
+ "APPSETTING_ScmType": "None",
+ "APPSETTING_WEBSITE_AUTH_ENABLED": "False",
+ "APPSETTING_REMOTEDEBUGGINGVERSION": "11.0.611103.400",
+ "APPSETTING_AzureWebJobsDashboard": "",
+ "APPSETTING_MarketingStorageUri": "",
+ "APPSETTING_WEBSITE_NODE_DEFAULT_VERSION": "6.5.0",
+ "APPSETTING_WEBSITE_CONTENTAZUREFILECONNECTIONSTRING": "",
+ "APPSETTING_WEBSITE_CONTENTSHARE": "",
+ "APPSETTING_WEBSITE_SLOT_NAME": "",
+ "APPSETTING_AzureWebJobsStorage": "",
+ "APPSETTING_WEBSITE_SITE_NAME": ""
+ }
+}
\ No newline at end of file
diff --git a/src/Services/Marketing/Infrastructure/AzureFunctions/marketing-functions.csproj b/src/Services/Marketing/Infrastructure/AzureFunctions/marketing-functions.csproj
new file mode 100644
index 000000000..e159feb69
--- /dev/null
+++ b/src/Services/Marketing/Infrastructure/AzureFunctions/marketing-functions.csproj
@@ -0,0 +1,33 @@
+
+
+ net461
+
+
+
+
+
+
+
+
+
+
+
+ Always
+
+
+ Always
+
+
+ Always
+
+
+ Always
+
+
+ Always
+
+
+ Always
+
+
+
diff --git a/src/Services/Marketing/Marketing.API/Controllers/CampaignsController.cs b/src/Services/Marketing/Marketing.API/Controllers/CampaignsController.cs
index cbcbb382b..ff7abcd45 100644
--- a/src/Services/Marketing/Marketing.API/Controllers/CampaignsController.cs
+++ b/src/Services/Marketing/Marketing.API/Controllers/CampaignsController.cs
@@ -1,4 +1,6 @@
-namespace Microsoft.eShopOnContainers.Services.Marketing.API.Controllers
+using Microsoft.eShopOnContainers.Services.Marketing.API.Infrastructure.Services;
+
+namespace Microsoft.eShopOnContainers.Services.Marketing.API.Controllers
{
using System;
using System.Linq;
@@ -13,6 +15,7 @@
using AspNetCore.Authorization;
using Extensions.Options;
using Microsoft.eShopOnContainers.Services.Marketing.API.ViewModel;
+ using Microsoft.AspNetCore.Http;
[Route("api/v1/[controller]")]
[Authorize]
@@ -21,14 +24,17 @@
private readonly MarketingContext _context;
private readonly MarketingSettings _settings;
private readonly IMarketingDataRepository _marketingDataRepository;
+ private readonly IIdentityService _identityService;
public CampaignsController(MarketingContext context,
IMarketingDataRepository marketingDataRepository,
- IOptionsSnapshot settings)
+ IOptionsSnapshot settings,
+ IIdentityService identityService)
{
_context = context;
_marketingDataRepository = marketingDataRepository;
_settings = settings.Value;
+ _identityService = identityService;
}
[HttpGet]
@@ -124,9 +130,11 @@
return NoContent();
}
- [HttpGet("user/{userId:guid}")]
- public async Task GetCampaignsByUserId(Guid userId, int pageSize = 10, int pageIndex = 0)
+ [HttpGet("user")]
+ public async Task GetCampaignsByUserId( int pageSize = 10, int pageIndex = 0)
{
+ var userId = _identityService.GetUserIdentity();
+
var marketingData = await _marketingDataRepository.GetAsync(userId.ToString());
var campaignDtoList = new List();
@@ -175,15 +183,23 @@
private CampaignDTO MapCampaignModelToDto(Campaign campaign)
{
- return new CampaignDTO
+ var userId = _identityService.GetUserIdentity();
+ var dto = new CampaignDTO
{
Id = campaign.Id,
Name = campaign.Name,
Description = campaign.Description,
From = campaign.From,
To = campaign.To,
- PictureUri = GetUriPlaceholder(campaign.PictureUri)
+ PictureUri = GetUriPlaceholder(campaign),
};
+
+ if (!string.IsNullOrEmpty(_settings.CampaignDetailFunctionUri))
+ {
+ dto.DetailsUri = $"{_settings.CampaignDetailFunctionUri}&campaignId={campaign.Id}&userId={userId}";
+ }
+
+ return dto;
}
private Campaign MapCampaignDtoToModel(CampaignDTO campaignDto)
@@ -199,13 +215,13 @@
};
}
- private string GetUriPlaceholder(string campaignUri)
+ private string GetUriPlaceholder(Campaign campaign)
{
- var baseUri = _settings.ExternalCatalogBaseUrl;
-
- campaignUri = campaignUri.Replace("http://externalcatalogbaseurltobereplaced", baseUri);
+ var baseUri = _settings.PicBaseUrl;
- return campaignUri;
+ return _settings.AzureStorageEnabled
+ ? baseUri + campaign.PictureName
+ : baseUri + campaign.Id;
}
}
}
\ No newline at end of file
diff --git a/src/Services/Marketing/Marketing.API/Dto/CampaignDTO.cs b/src/Services/Marketing/Marketing.API/Dto/CampaignDTO.cs
index 829011ce5..3c409c8a9 100644
--- a/src/Services/Marketing/Marketing.API/Dto/CampaignDTO.cs
+++ b/src/Services/Marketing/Marketing.API/Dto/CampaignDTO.cs
@@ -15,5 +15,6 @@
public DateTime To { get; set; }
public string PictureUri { get; set; }
+ public string DetailsUri { get; set; }
}
}
\ No newline at end of file
diff --git a/src/Services/Marketing/Marketing.API/Infrastructure/MarketingContextSeed.cs b/src/Services/Marketing/Marketing.API/Infrastructure/MarketingContextSeed.cs
index fc8c02b4c..ecb3f3c80 100644
--- a/src/Services/Marketing/Marketing.API/Infrastructure/MarketingContextSeed.cs
+++ b/src/Services/Marketing/Marketing.API/Infrastructure/MarketingContextSeed.cs
@@ -38,6 +38,7 @@
From = DateTime.Now,
To = DateTime.Now.AddDays(7),
PictureUri = "http://externalcatalogbaseurltobereplaced/api/v1/campaigns/1/pic",
+ PictureName = "1.png",
Rules = new List
{
new UserLocationRule
@@ -54,6 +55,7 @@
From = DateTime.Now.AddDays(-7),
To = DateTime.Now.AddDays(14),
PictureUri = "http://externalcatalogbaseurltobereplaced/api/v1/campaigns/2/pic",
+ PictureName = "2.png",
Rules = new List
{
new UserLocationRule
diff --git a/src/Services/Marketing/Marketing.API/Infrastructure/MarketingMigrations/20170629102516_added-campaign-details.Designer.cs b/src/Services/Marketing/Marketing.API/Infrastructure/MarketingMigrations/20170629102516_added-campaign-details.Designer.cs
new file mode 100644
index 000000000..342d1d02f
--- /dev/null
+++ b/src/Services/Marketing/Marketing.API/Infrastructure/MarketingMigrations/20170629102516_added-campaign-details.Designer.cs
@@ -0,0 +1,121 @@
+using System;
+using Microsoft.EntityFrameworkCore;
+using Microsoft.EntityFrameworkCore.Infrastructure;
+using Microsoft.EntityFrameworkCore.Metadata;
+using Microsoft.EntityFrameworkCore.Migrations;
+using Microsoft.eShopOnContainers.Services.Marketing.API.Infrastructure;
+
+namespace Microsoft.eShopOnContainers.Services.Marketing.API.Infrastructure.MarketingMigrations
+{
+ [DbContext(typeof(MarketingContext))]
+ [Migration("20170629102516_added-campaign-details")]
+ partial class addedcampaigndetails
+ {
+ protected override void BuildTargetModel(ModelBuilder modelBuilder)
+ {
+ modelBuilder
+ .HasAnnotation("ProductVersion", "1.1.2")
+ .HasAnnotation("SqlServer:Sequence:.campaign_hilo", "'campaign_hilo', '', '1', '10', '', '', 'Int64', 'False'")
+ .HasAnnotation("SqlServer:Sequence:.rule_hilo", "'rule_hilo', '', '1', '10', '', '', 'Int64', 'False'")
+ .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
+
+ modelBuilder.Entity("Microsoft.eShopOnContainers.Services.Marketing.API.Model.Campaign", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasAnnotation("SqlServer:HiLoSequenceName", "campaign_hilo")
+ .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.SequenceHiLo);
+
+ b.Property("Description")
+ .IsRequired()
+ .HasColumnName("Description");
+
+ b.Property("DetailsUri");
+
+ b.Property("From")
+ .HasColumnName("From");
+
+ b.Property("Name")
+ .IsRequired()
+ .HasColumnName("Name");
+
+ b.Property("PictureName");
+
+ b.Property("PictureUri")
+ .IsRequired()
+ .HasColumnName("PictureUri");
+
+ b.Property("To")
+ .HasColumnName("To");
+
+ b.HasKey("Id");
+
+ b.ToTable("Campaign");
+ });
+
+ modelBuilder.Entity("Microsoft.eShopOnContainers.Services.Marketing.API.Model.Rule", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasAnnotation("SqlServer:HiLoSequenceName", "rule_hilo")
+ .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.SequenceHiLo);
+
+ b.Property("CampaignId");
+
+ b.Property("Description")
+ .IsRequired()
+ .HasColumnName("Description");
+
+ b.Property("RuleTypeId");
+
+ b.HasKey("Id");
+
+ b.HasIndex("CampaignId");
+
+ b.ToTable("Rule");
+
+ b.HasDiscriminator("RuleTypeId");
+ });
+
+ modelBuilder.Entity("Microsoft.eShopOnContainers.Services.Marketing.API.Model.PurchaseHistoryRule", b =>
+ {
+ b.HasBaseType("Microsoft.eShopOnContainers.Services.Marketing.API.Model.Rule");
+
+
+ b.ToTable("PurchaseHistoryRule");
+
+ b.HasDiscriminator().HasValue(2);
+ });
+
+ modelBuilder.Entity("Microsoft.eShopOnContainers.Services.Marketing.API.Model.UserLocationRule", b =>
+ {
+ b.HasBaseType("Microsoft.eShopOnContainers.Services.Marketing.API.Model.Rule");
+
+ b.Property("LocationId")
+ .HasColumnName("LocationId");
+
+ b.ToTable("UserLocationRule");
+
+ b.HasDiscriminator().HasValue(3);
+ });
+
+ modelBuilder.Entity("Microsoft.eShopOnContainers.Services.Marketing.API.Model.UserProfileRule", b =>
+ {
+ b.HasBaseType("Microsoft.eShopOnContainers.Services.Marketing.API.Model.Rule");
+
+
+ b.ToTable("UserProfileRule");
+
+ b.HasDiscriminator().HasValue(1);
+ });
+
+ modelBuilder.Entity("Microsoft.eShopOnContainers.Services.Marketing.API.Model.Rule", b =>
+ {
+ b.HasOne("Microsoft.eShopOnContainers.Services.Marketing.API.Model.Campaign", "Campaign")
+ .WithMany("Rules")
+ .HasForeignKey("CampaignId")
+ .OnDelete(DeleteBehavior.Cascade);
+ });
+ }
+ }
+}
diff --git a/src/Services/Marketing/Marketing.API/Infrastructure/MarketingMigrations/20170629102516_added-campaign-details.cs b/src/Services/Marketing/Marketing.API/Infrastructure/MarketingMigrations/20170629102516_added-campaign-details.cs
new file mode 100644
index 000000000..9d6ddf399
--- /dev/null
+++ b/src/Services/Marketing/Marketing.API/Infrastructure/MarketingMigrations/20170629102516_added-campaign-details.cs
@@ -0,0 +1,33 @@
+using System;
+using System.Collections.Generic;
+using Microsoft.EntityFrameworkCore.Migrations;
+
+namespace Microsoft.eShopOnContainers.Services.Marketing.API.Infrastructure.MarketingMigrations
+{
+ public partial class addedcampaigndetails : Migration
+ {
+ protected override void Up(MigrationBuilder migrationBuilder)
+ {
+ migrationBuilder.AddColumn(
+ name: "DetailsUri",
+ table: "Campaign",
+ nullable: true);
+
+ migrationBuilder.AddColumn(
+ name: "PictureName",
+ table: "Campaign",
+ nullable: true);
+ }
+
+ protected override void Down(MigrationBuilder migrationBuilder)
+ {
+ migrationBuilder.DropColumn(
+ name: "DetailsUri",
+ table: "Campaign");
+
+ migrationBuilder.DropColumn(
+ name: "PictureName",
+ table: "Campaign");
+ }
+ }
+}
diff --git a/src/Services/Marketing/Marketing.API/Infrastructure/MarketingMigrations/MarketingContextModelSnapshot.cs b/src/Services/Marketing/Marketing.API/Infrastructure/MarketingMigrations/MarketingContextModelSnapshot.cs
index bcac40659..3866a63ab 100644
--- a/src/Services/Marketing/Marketing.API/Infrastructure/MarketingMigrations/MarketingContextModelSnapshot.cs
+++ b/src/Services/Marketing/Marketing.API/Infrastructure/MarketingMigrations/MarketingContextModelSnapshot.cs
@@ -29,6 +29,8 @@ namespace Microsoft.eShopOnContainers.Services.Marketing.API.Infrastructure.Mark
.IsRequired()
.HasColumnName("Description");
+ b.Property("DetailsUri");
+
b.Property("From")
.HasColumnName("From");
@@ -36,6 +38,8 @@ namespace Microsoft.eShopOnContainers.Services.Marketing.API.Infrastructure.Mark
.IsRequired()
.HasColumnName("Name");
+ b.Property("PictureName");
+
b.Property("PictureUri")
.IsRequired()
.HasColumnName("PictureUri");
diff --git a/src/Services/Marketing/Marketing.API/Infrastructure/Services/IIdentityService.cs b/src/Services/Marketing/Marketing.API/Infrastructure/Services/IIdentityService.cs
new file mode 100644
index 000000000..42df49ebc
--- /dev/null
+++ b/src/Services/Marketing/Marketing.API/Infrastructure/Services/IIdentityService.cs
@@ -0,0 +1,7 @@
+namespace Microsoft.eShopOnContainers.Services.Marketing.API.Infrastructure.Services
+{
+ public interface IIdentityService
+ {
+ string GetUserIdentity();
+ }
+}
diff --git a/src/Services/Marketing/Marketing.API/Infrastructure/Services/IdentityService.cs b/src/Services/Marketing/Marketing.API/Infrastructure/Services/IdentityService.cs
new file mode 100644
index 000000000..82ce214be
--- /dev/null
+++ b/src/Services/Marketing/Marketing.API/Infrastructure/Services/IdentityService.cs
@@ -0,0 +1,20 @@
+namespace Microsoft.eShopOnContainers.Services.Marketing.API.Infrastructure.Services
+{
+ using AspNetCore.Http;
+ using System;
+
+ public class IdentityService : IIdentityService
+ {
+ private IHttpContextAccessor _context;
+
+ public IdentityService(IHttpContextAccessor context)
+ {
+ _context = context ?? throw new ArgumentNullException(nameof(context));
+ }
+
+ public string GetUserIdentity()
+ {
+ return _context.HttpContext.User.FindFirst("sub").Value;
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/Services/Marketing/Marketing.API/IntegrationEvents/Events/UserLocationUpdatedIntegrationEvent.cs b/src/Services/Marketing/Marketing.API/IntegrationEvents/Events/UserLocationUpdatedIntegrationEvent.cs
index a7ab0cafd..f894d903f 100644
--- a/src/Services/Marketing/Marketing.API/IntegrationEvents/Events/UserLocationUpdatedIntegrationEvent.cs
+++ b/src/Services/Marketing/Marketing.API/IntegrationEvents/Events/UserLocationUpdatedIntegrationEvent.cs
@@ -1,13 +1,13 @@
namespace Microsoft.eShopOnContainers.Services.Marketing.API.IntegrationEvents.Events
{
- using Model;
+ using Marketing.API.Model;
+ using Microsoft.eShopOnContainers.BuildingBlocks.EventBus.Events;
using System.Collections.Generic;
- using BuildingBlocks.EventBus.Events;
public class UserLocationUpdatedIntegrationEvent : IntegrationEvent
{
- public string UserId { get; private set; }
- public List LocationList { get; private set; }
+ public string UserId { get; set; }
+ public List LocationList { get; set; }
public UserLocationUpdatedIntegrationEvent(string userId, List locationList)
{
diff --git a/src/Services/Marketing/Marketing.API/IntegrationEvents/Handlers/UserLocationUpdatedIntegrationEventHandler.cs b/src/Services/Marketing/Marketing.API/IntegrationEvents/Handlers/UserLocationUpdatedIntegrationEventHandler.cs
index 7879c3d96..5393608a0 100644
--- a/src/Services/Marketing/Marketing.API/IntegrationEvents/Handlers/UserLocationUpdatedIntegrationEventHandler.cs
+++ b/src/Services/Marketing/Marketing.API/IntegrationEvents/Handlers/UserLocationUpdatedIntegrationEventHandler.cs
@@ -1,12 +1,13 @@
namespace Microsoft.eShopOnContainers.Services.Marketing.API.IntegrationEvents.Handlers
{
- using BuildingBlocks.EventBus.Abstractions;
- using System.Threading.Tasks;
- using Events;
+ using Marketing.API.IntegrationEvents.Events;
+ using Marketing.API.Model;
+ using Microsoft.eShopOnContainers.BuildingBlocks.EventBus.Abstractions;
+ using Microsoft.eShopOnContainers.Services.Marketing.API.Infrastructure.Repositories;
+ using Microsoft.eShopOnContainers.Services.Marketing.API.Model;
using System;
- using Infrastructure.Repositories;
- using Model;
using System.Collections.Generic;
+ using System.Threading.Tasks;
public class UserLocationUpdatedIntegrationEventHandler
: IIntegrationEventHandler
diff --git a/src/Services/Marketing/Marketing.API/Marketing.API.csproj b/src/Services/Marketing/Marketing.API/Marketing.API.csproj
index 0e886a2ea..703f82bc6 100644
--- a/src/Services/Marketing/Marketing.API/Marketing.API.csproj
+++ b/src/Services/Marketing/Marketing.API/Marketing.API.csproj
@@ -54,6 +54,10 @@
+
+
+
+
diff --git a/src/Services/Marketing/Marketing.API/MarketingSettings.cs b/src/Services/Marketing/Marketing.API/MarketingSettings.cs
index f83200019..20e5d9c44 100644
--- a/src/Services/Marketing/Marketing.API/MarketingSettings.cs
+++ b/src/Services/Marketing/Marketing.API/MarketingSettings.cs
@@ -6,5 +6,8 @@
public string MongoConnectionString { get; set; }
public string MongoDatabase { get; set; }
public string ExternalCatalogBaseUrl { get; set; }
+ public string CampaignDetailFunctionUri { get; set; }
+ public string PicBaseUrl { get; set; }
+ public bool AzureStorageEnabled { get; set; }
}
}
diff --git a/src/Services/Marketing/Marketing.API/Model/Campaign.cs b/src/Services/Marketing/Marketing.API/Model/Campaign.cs
index 51a4c017c..841580427 100644
--- a/src/Services/Marketing/Marketing.API/Model/Campaign.cs
+++ b/src/Services/Marketing/Marketing.API/Model/Campaign.cs
@@ -15,8 +15,12 @@
public DateTime To { get; set; }
+ public string PictureName { get; set; }
+
public string PictureUri { get; set; }
+ public string DetailsUri { get; set; }
+
public List Rules { get; set; }
diff --git a/src/Services/Marketing/Marketing.API/Program.cs b/src/Services/Marketing/Marketing.API/Program.cs
index 2bf3b3d9c..dbde65b27 100644
--- a/src/Services/Marketing/Marketing.API/Program.cs
+++ b/src/Services/Marketing/Marketing.API/Program.cs
@@ -1,8 +1,7 @@
namespace Microsoft.eShopOnContainers.Services.Marketing.API
{
using System.IO;
- using Microsoft.AspNetCore.Builder;
- using Microsoft.AspNetCore.Hosting;
+ using AspNetCore.Hosting;
public class Program
{
@@ -10,6 +9,7 @@
{
var host = new WebHostBuilder()
.UseKestrel()
+ .UseHealthChecks("/hc")
.UseContentRoot(Directory.GetCurrentDirectory())
.UseStartup()
.UseWebRoot("Pics")
diff --git a/src/Services/Marketing/Marketing.API/Startup.cs b/src/Services/Marketing/Marketing.API/Startup.cs
index 909ca1235..dc6575382 100644
--- a/src/Services/Marketing/Marketing.API/Startup.cs
+++ b/src/Services/Marketing/Marketing.API/Startup.cs
@@ -1,30 +1,36 @@
namespace Microsoft.eShopOnContainers.Services.Marketing.API
{
- using Microsoft.AspNetCore.Builder;
- using Microsoft.AspNetCore.Hosting;
- using Microsoft.EntityFrameworkCore.Infrastructure;
- using Microsoft.EntityFrameworkCore;
- using Microsoft.eShopOnContainers.Services.Marketing.API.Infrastructure;
- using Microsoft.Extensions.Configuration;
- using Microsoft.Extensions.DependencyInjection;
- using Microsoft.Extensions.Logging;
- using System.Reflection;
- using System;
- using Microsoft.eShopOnContainers.Services.Marketing.API.Infrastructure.Filters;
- using Microsoft.eShopOnContainers.BuildingBlocks.EventBusRabbitMQ;
- using RabbitMQ.Client;
- using BuildingBlocks.EventBus.Abstractions;
- using BuildingBlocks.EventBus;
- using IntegrationEvents.Events;
- using IntegrationEvents.Handlers;
- using Infrastructure.Repositories;
using Autofac;
using Autofac.Extensions.DependencyInjection;
+ using IntegrationEvents.Events;
+ using AspNetCore.Builder;
+ using AspNetCore.Hosting;
+ using AspNetCore.Http;
+ using Azure.ServiceBus;
+ using EntityFrameworkCore;
+ using EntityFrameworkCore.Infrastructure;
+ using BuildingBlocks.EventBus;
+ using BuildingBlocks.EventBus.Abstractions;
+ using BuildingBlocks.EventBusRabbitMQ;
+ using BuildingBlocks.EventBusServiceBus;
+ using Infrastructure;
+ using Infrastructure.Filters;
+ using Infrastructure.Repositories;
+ using Infrastructure.Services;
+ using Extensions.Configuration;
+ using Extensions.DependencyInjection;
+ using Extensions.Logging;
using Polly;
- using System.Threading.Tasks;
+ using RabbitMQ.Client;
+ using System;
using System.Data.SqlClient;
+ using System.Reflection;
+ using System.Threading.Tasks;
+ using Extensions.HealthChecks;
+ using Marketing.API.IntegrationEvents.Handlers;
using Microsoft.EntityFrameworkCore.Diagnostics;
+
public class Startup
{
public Startup(IHostingEnvironment env)
@@ -58,6 +64,18 @@
services.Configure(Configuration);
+ services.AddHealthChecks(checks =>
+ {
+ checks.AddValueTaskCheck("HTTP Endpoint", () => new ValueTask(HealthCheckResult.Healthy("Ok")));
+
+ var accountName = Configuration.GetValue("AzureStorageAccountName");
+ var accountKey = Configuration.GetValue("AzureStorageAccountKey");
+ if (!string.IsNullOrEmpty(accountName) && !string.IsNullOrEmpty(accountKey))
+ {
+ checks.AddAzureBlobStorageCheck(accountName, accountKey);
+ }
+ });
+
services.AddDbContext(options =>
{
options.UseSqlServer(Configuration["ConnectionString"],
@@ -74,19 +92,32 @@
//Check Client vs. Server evaluation: https://docs.microsoft.com/en-us/ef/core/querying/client-eval
});
- services.AddSingleton(sp =>
+ if (Configuration.GetValue("AzureServiceBusEnabled"))
{
- var logger = sp.GetRequiredService>();
+ services.AddSingleton(sp =>
+ {
+ var logger = sp.GetRequiredService>();
+
+ var serviceBusConnectionString = Configuration["EventBusConnection"];
+ var serviceBusConnection = new ServiceBusConnectionStringBuilder(serviceBusConnectionString);
- var factory = new ConnectionFactory()
+ return new DefaultServiceBusPersisterConnection(serviceBusConnection, logger);
+ });
+ }
+ else
+ {
+ services.AddSingleton(sp =>
{
- HostName = Configuration["EventBusConnection"]
- };
+ var logger = sp.GetRequiredService>();
- return new DefaultRabbitMQPersistentConnection(factory, logger);
- });
+ var factory = new ConnectionFactory()
+ {
+ HostName = Configuration["EventBusConnection"]
+ };
- RegisterServiceBus(services);
+ return new DefaultRabbitMQPersistentConnection(factory, logger);
+ });
+ }
// Add framework services.
services.AddSwaggerGen(options =>
@@ -110,7 +141,13 @@
.AllowCredentials());
});
+ RegisterEventBus(services);
+
services.AddTransient();
+ services.AddSingleton();
+ services.AddTransient();
+
+ services.AddOptions();
//configure autofac
var container = new ContainerBuilder();
@@ -135,7 +172,7 @@
.UseSwaggerUI(c =>
{
c.SwaggerEndpoint("/swagger/v1/swagger.json", "My API V1");
- });
+ });
var context = (MarketingContext)app
.ApplicationServices.GetService(typeof(MarketingContext));
@@ -156,21 +193,35 @@
});
}
- private void RegisterServiceBus(IServiceCollection services)
+ private void RegisterEventBus(IServiceCollection services)
{
- services.AddSingleton();
- services.AddSingleton();
+ if (Configuration.GetValue("AzureServiceBusEnabled"))
+ {
+ services.AddSingleton(sp =>
+ {
+ var serviceBusPersisterConnection = sp.GetRequiredService();
+ var iLifetimeScope = sp.GetRequiredService();
+ var logger = sp.GetRequiredService>();
+ var eventBusSubcriptionsManager = sp.GetRequiredService();
+ var subscriptionClientName = Configuration["SubscriptionClientName"];
+
+ return new EventBusServiceBus(serviceBusPersisterConnection, logger,
+ eventBusSubcriptionsManager, subscriptionClientName, iLifetimeScope);
+ });
+ }
+ else
+ {
+ services.AddSingleton();
+ }
- services.AddTransient,
- UserLocationUpdatedIntegrationEventHandler>();
+ services.AddSingleton();
+ services.AddTransient();
}
private void ConfigureEventBus(IApplicationBuilder app)
{
var eventBus = app.ApplicationServices.GetRequiredService();
- eventBus.Subscribe>();
+ eventBus.Subscribe();
}
private async Task WaitForSqlAvailabilityAsync(MarketingContext ctx, ILoggerFactory loggerFactory, IApplicationBuilder app, int retries = 0)
diff --git a/src/Services/Marketing/Marketing.API/appsettings.json b/src/Services/Marketing/Marketing.API/appsettings.json
index a05a01836..0137a2ae8 100644
--- a/src/Services/Marketing/Marketing.API/appsettings.json
+++ b/src/Services/Marketing/Marketing.API/appsettings.json
@@ -9,5 +9,8 @@
"MongoConnectionString": "mongodb://nosql.data",
"MongoDatabase": "MarketingDb",
"IdentityUrl": "http://localhost:5105",
- "ExternalCatalogBaseUrl": "http://localhost:5110"
+ "ExternalCatalogBaseUrl": "http://localhost:5110",
+ "AzureServiceBusEnabled": false,
+ "SubscriptionClientName": "Marketing",
+ "AzureStorageEnabled": false
}
diff --git a/src/Services/Ordering/Ordering.API/Extensions/LinqSelectExtensions.cs b/src/Services/Ordering/Ordering.API/Extensions/LinqSelectExtensions.cs
new file mode 100644
index 000000000..4efe08c07
--- /dev/null
+++ b/src/Services/Ordering/Ordering.API/Extensions/LinqSelectExtensions.cs
@@ -0,0 +1,50 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+
+namespace Ordering.API.Extensions
+{
+ public static class LinqSelectExtensions
+ {
+ public static IEnumerable> SelectTry(this IEnumerable enumerable, Func selector)
+ {
+ foreach (TSource element in enumerable)
+ {
+ SelectTryResult returnedValue;
+ try
+ {
+ returnedValue = new SelectTryResult(element, selector(element), null);
+ }
+ catch (Exception ex)
+ {
+ returnedValue = new SelectTryResult(element, default(TResult), ex);
+ }
+ yield return returnedValue;
+ }
+ }
+
+ public static IEnumerable OnCaughtException(this IEnumerable> enumerable, Func exceptionHandler)
+ {
+ return enumerable.Select(x => x.CaughtException == null ? x.Result : exceptionHandler(x.CaughtException));
+ }
+
+ public static IEnumerable OnCaughtException(this IEnumerable> enumerable, Func exceptionHandler)
+ {
+ return enumerable.Select(x => x.CaughtException == null ? x.Result : exceptionHandler(x.Source, x.CaughtException));
+ }
+
+ public class SelectTryResult
+ {
+ internal SelectTryResult(TSource source, TResult result, Exception exception)
+ {
+ Source = source;
+ Result = result;
+ CaughtException = exception;
+ }
+
+ public TSource Source { get; private set; }
+ public TResult Result { get; private set; }
+ public Exception CaughtException { get; private set; }
+ }
+ }
+}
diff --git a/src/Services/Ordering/Ordering.API/Infrastructure/OrderingContextSeed.cs b/src/Services/Ordering/Ordering.API/Infrastructure/OrderingContextSeed.cs
index ebc4778d1..7443024ee 100644
--- a/src/Services/Ordering/Ordering.API/Infrastructure/OrderingContextSeed.cs
+++ b/src/Services/Ordering/Ordering.API/Infrastructure/OrderingContextSeed.cs
@@ -8,40 +8,175 @@
using System.Threading.Tasks;
using Microsoft.eShopOnContainers.Services.Ordering.Domain.AggregatesModel.BuyerAggregate;
using Microsoft.eShopOnContainers.Services.Ordering.Domain.AggregatesModel.OrderAggregate;
+ using System.Collections.Generic;
+ using Microsoft.AspNetCore.Hosting;
+ using System.IO;
+ using Microsoft.Extensions.Options;
+ using Microsoft.Extensions.DependencyInjection;
+ using Microsoft.Extensions.Logging;
+ using System;
+ using global::Ordering.API.Extensions;
public class OrderingContextSeed
{
- public static async Task SeedAsync(IApplicationBuilder applicationBuilder)
+ public static async Task SeedAsync(IApplicationBuilder applicationBuilder, IHostingEnvironment env, ILoggerFactory loggerFactory)
{
+ var log = loggerFactory.CreateLogger("ordering seed");
+
var context = (OrderingContext)applicationBuilder
.ApplicationServices.GetService(typeof(OrderingContext));
+ var settings = applicationBuilder
+ .ApplicationServices.GetRequiredService>().Value;
+
+ var useCustomizationData = settings.UseCustomizationData;
+ var contentRootPath = env.ContentRootPath;
+
+
using (context)
{
context.Database.Migrate();
if (!context.CardTypes.Any())
{
- context.CardTypes.Add(CardType.Amex);
- context.CardTypes.Add(CardType.Visa);
- context.CardTypes.Add(CardType.MasterCard);
+ context.CardTypes.AddRange(useCustomizationData
+ ? GetCardTypesFromFile(contentRootPath, log)
+ : GetPredefinedCardTypes());
await context.SaveChangesAsync();
}
if (!context.OrderStatus.Any())
{
- context.OrderStatus.Add(OrderStatus.Submitted);
- context.OrderStatus.Add(OrderStatus.AwaitingValidation);
- context.OrderStatus.Add(OrderStatus.StockConfirmed);
- context.OrderStatus.Add(OrderStatus.Paid);
- context.OrderStatus.Add(OrderStatus.Shipped);
- context.OrderStatus.Add(OrderStatus.Cancelled);
+ context.OrderStatus.AddRange(useCustomizationData
+ ? GetOrderStatusFromFile(contentRootPath, log)
+ : GetPredefinedOrderStatus());
}
await context.SaveChangesAsync();
}
}
+ static IEnumerable GetCardTypesFromFile(string contentRootPath, ILogger log)
+ {
+ string csvFileCardTypes = Path.Combine(contentRootPath, "Setup", "CardTypes.csv");
+
+ if (!File.Exists(csvFileCardTypes))
+ {
+ return GetPredefinedCardTypes();
+ }
+
+ string[] csvheaders;
+ try
+ {
+ string[] requiredHeaders = { "CardType" };
+ csvheaders = GetHeaders(requiredHeaders, csvFileCardTypes);
+ }
+ catch (Exception ex)
+ {
+ log.LogError(ex.Message);
+ return GetPredefinedCardTypes();
+ }
+
+ int id = 1;
+ return File.ReadAllLines(csvFileCardTypes)
+ .Skip(1) // skip header column
+ .SelectTry(x => CreateCardType(x, ref id))
+ .OnCaughtException(ex => { log.LogError(ex.Message); return null; })
+ .Where(x => x != null);
+ }
+
+ static CardType CreateCardType(string value, ref int id)
+ {
+ if (String.IsNullOrEmpty(value))
+ {
+ throw new Exception("Orderstatus is null or empty");
+ }
+
+ return new CardType(id++, value.Trim('"').Trim());
+ }
+
+
+ private static IEnumerable GetPredefinedCardTypes()
+ {
+ return new List()
+ {
+ CardType.Amex,
+ CardType.Visa,
+ CardType.MasterCard
+ };
+ }
+
+ static IEnumerable GetOrderStatusFromFile(string contentRootPath, ILogger log)
+ {
+ string csvFileOrderStatus = Path.Combine(contentRootPath, "Setup", "OrderStatus.csv");
+
+ if (!File.Exists(csvFileOrderStatus))
+ {
+ return GetPredefinedOrderStatus();
+ }
+
+ string[] csvheaders;
+ try
+ {
+ string[] requiredHeaders = { "OrderStatus" };
+ csvheaders = GetHeaders(requiredHeaders, csvFileOrderStatus);
+ }
+ catch (Exception ex)
+ {
+ log.LogError(ex.Message);
+ return GetPredefinedOrderStatus();
+ }
+
+ int id = 1;
+ return File.ReadAllLines(csvFileOrderStatus)
+ .Skip(1) // skip header row
+ .SelectTry(x => CreateOrderStatus(x, ref id))
+ .OnCaughtException(ex => { log.LogError(ex.Message); return null; })
+ .Where(x => x != null);
+ }
+
+ static OrderStatus CreateOrderStatus(string value, ref int id)
+ {
+ if (String.IsNullOrEmpty(value))
+ {
+ throw new Exception("Orderstatus is null or empty");
+ }
+
+ return new OrderStatus(id++, value.Trim('"').Trim().ToLowerInvariant());
+ }
+
+ static IEnumerable GetPredefinedOrderStatus()
+ {
+ return new List()
+ {
+ OrderStatus.Submitted,
+ OrderStatus.AwaitingValidation,
+ OrderStatus.StockConfirmed,
+ OrderStatus.Paid,
+ OrderStatus.Shipped,
+ OrderStatus.Cancelled
+ };
+ }
+
+ static string[] GetHeaders(string[] requiredHeaders, string csvfile)
+ {
+ string[] csvheaders = File.ReadLines(csvfile).First().ToLowerInvariant().Split(',');
+
+ if (csvheaders.Count() != requiredHeaders.Count())
+ {
+ throw new Exception($"requiredHeader count '{ requiredHeaders.Count()}' is different then read header '{csvheaders.Count()}'");
+ }
+
+ foreach (var requiredHeader in requiredHeaders)
+ {
+ if (!csvheaders.Contains(requiredHeader))
+ {
+ throw new Exception($"does not contain required header '{requiredHeader}'");
+ }
+ }
+
+ return csvheaders;
+ }
}
}
diff --git a/src/Services/Ordering/Ordering.API/Ordering.API.csproj b/src/Services/Ordering/Ordering.API/Ordering.API.csproj
index 13cdad1a0..3f6ce21d4 100644
--- a/src/Services/Ordering/Ordering.API/Ordering.API.csproj
+++ b/src/Services/Ordering/Ordering.API/Ordering.API.csproj
@@ -14,10 +14,14 @@
PreserveNewest
+
+ PreserveNewest
+
+
@@ -71,6 +75,9 @@
Always
+
+ PreserveNewest
+
diff --git a/src/Services/Ordering/Ordering.API/OrderingSettings.cs b/src/Services/Ordering/Ordering.API/OrderingSettings.cs
new file mode 100644
index 000000000..8c75ba62d
--- /dev/null
+++ b/src/Services/Ordering/Ordering.API/OrderingSettings.cs
@@ -0,0 +1,7 @@
+namespace Microsoft.eShopOnContainers.Services.Ordering.API
+{
+ public class OrderingSettings
+ {
+ public bool UseCustomizationData { get; set; }
+ }
+}
diff --git a/src/Services/Ordering/Ordering.API/Setup/CardTypes.csv b/src/Services/Ordering/Ordering.API/Setup/CardTypes.csv
new file mode 100644
index 000000000..5a610b3e8
--- /dev/null
+++ b/src/Services/Ordering/Ordering.API/Setup/CardTypes.csv
@@ -0,0 +1,5 @@
+CardType
+Amex
+Visa
+MasterCard
+Capital One
\ No newline at end of file
diff --git a/src/Services/Ordering/Ordering.API/Setup/OrderStatus.csv b/src/Services/Ordering/Ordering.API/Setup/OrderStatus.csv
new file mode 100644
index 000000000..8a3109887
--- /dev/null
+++ b/src/Services/Ordering/Ordering.API/Setup/OrderStatus.csv
@@ -0,0 +1,7 @@
+OrderStatus
+Submitted
+AwaitingValidation
+StockConfirmed
+Paid
+Shipped
+Cancelled
\ No newline at end of file
diff --git a/src/Services/Ordering/Ordering.API/Startup.cs b/src/Services/Ordering/Ordering.API/Startup.cs
index 80b7b2abe..15a966c1a 100644
--- a/src/Services/Ordering/Ordering.API/Startup.cs
+++ b/src/Services/Ordering/Ordering.API/Startup.cs
@@ -4,20 +4,19 @@
using Autofac;
using Autofac.Extensions.DependencyInjection;
using global::Ordering.API.Application.IntegrationEvents;
- using global::Ordering.API.Application.IntegrationEvents.EventHandling;
using global::Ordering.API.Application.IntegrationEvents.Events;
- using global::Ordering.API.Infrastructure.Middlewares;
using Infrastructure;
- using Infrastructure.Auth;
using Infrastructure.AutofacModules;
using Infrastructure.Filters;
using Infrastructure.Services;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
+ using Microsoft.Azure.ServiceBus;
using Microsoft.EntityFrameworkCore;
using Microsoft.eShopOnContainers.BuildingBlocks.EventBus;
using Microsoft.eShopOnContainers.BuildingBlocks.EventBus.Abstractions;
using Microsoft.eShopOnContainers.BuildingBlocks.EventBusRabbitMQ;
+ using Microsoft.eShopOnContainers.BuildingBlocks.EventBusServiceBus;
using Microsoft.eShopOnContainers.BuildingBlocks.IntegrationEventLogEF;
using Microsoft.eShopOnContainers.BuildingBlocks.IntegrationEventLogEF.Services;
using Microsoft.Extensions.Configuration;
@@ -87,6 +86,8 @@
ServiceLifetime.Scoped //Showing explicitly that the DbContext is shared across the HTTP request scope (graph of objects started in the HTTP request)
);
+ services.Configure(Configuration);
+
services.AddSwaggerGen(options =>
{
options.DescribeAllEnumsAsStrings();
@@ -116,19 +117,35 @@
services.AddTransient();
- services.AddSingleton(sp =>
+ if (Configuration.GetValue("AzureServiceBusEnabled"))
{
- var logger = sp.GetRequiredService>();
+ services.AddSingleton(sp =>
+ {
+ var logger = sp.GetRequiredService>();
- var factory = new ConnectionFactory()
+ var serviceBusConnectionString = Configuration["EventBusConnection"];
+ var serviceBusConnection = new ServiceBusConnectionStringBuilder(serviceBusConnectionString);
+
+ return new DefaultServiceBusPersisterConnection(serviceBusConnection, logger);
+ });
+ }
+ else
+ {
+ services.AddSingleton(sp =>
{
- HostName = Configuration["EventBusConnection"]
- };
+ var logger = sp.GetRequiredService>();
- return new DefaultRabbitMQPersistentConnection(factory, logger);
- });
+ var factory = new ConnectionFactory()
+ {
+ HostName = Configuration["EventBusConnection"]
+ };
+
+ return new DefaultRabbitMQPersistentConnection(factory, logger);
+ });
+ }
+
+ RegisterEventBus(services);
- RegisterServiceBus(services);
services.AddOptions();
//configure autofac
@@ -159,8 +176,7 @@
c.SwaggerEndpoint("/swagger/v1/swagger.json", "My API V1");
});
- WaitForSqlAvailabilityAsync(loggerFactory, app).Wait();
- ConfigureEventBus(app);
+ WaitForSqlAvailabilityAsync(loggerFactory, app, env).Wait();
var integrationEventLogContext = new IntegrationEventLogContext(
new DbContextOptionsBuilder()
@@ -168,12 +184,7 @@
.Options);
integrationEventLogContext.Database.Migrate();
- }
-
- private void RegisterServiceBus(IServiceCollection services)
- {
- services.AddSingleton();
- services.AddSingleton();
+ ConfigureEventBus(app);
}
private void ConfigureEventBus(IApplicationBuilder app)
@@ -199,14 +210,37 @@
});
}
+ private void RegisterEventBus(IServiceCollection services)
+ {
+ if (Configuration.GetValue("AzureServiceBusEnabled"))
+ {
+ services.AddSingleton(sp =>
+ {
+ var serviceBusPersisterConnection = sp.GetRequiredService();
+ var iLifetimeScope = sp.GetRequiredService();
+ var logger = sp.GetRequiredService>();
+ var eventBusSubcriptionsManager = sp.GetRequiredService();
+ var subscriptionClientName = Configuration["SubscriptionClientName"];
+
+ return new EventBusServiceBus(serviceBusPersisterConnection, logger,
+ eventBusSubcriptionsManager, subscriptionClientName, iLifetimeScope);
+ });
+ }
+ else
+ {
+ services.AddSingleton();
+ }
+
+ services.AddSingleton();
+ }
- private async Task WaitForSqlAvailabilityAsync(ILoggerFactory loggerFactory, IApplicationBuilder app, int retries = 0)
+ private async Task WaitForSqlAvailabilityAsync(ILoggerFactory loggerFactory, IApplicationBuilder app, IHostingEnvironment env, int retries = 0)
{
var logger = loggerFactory.CreateLogger(nameof(Startup));
var policy = CreatePolicy(retries, logger, nameof(WaitForSqlAvailabilityAsync));
await policy.ExecuteAsync(async () =>
{
- await OrderingContextSeed.SeedAsync(app);
+ await OrderingContextSeed.SeedAsync(app, env, loggerFactory);
});
}
diff --git a/src/Services/Ordering/Ordering.API/settings.json b/src/Services/Ordering/Ordering.API/settings.json
index 09552377a..aa3499295 100644
--- a/src/Services/Ordering/Ordering.API/settings.json
+++ b/src/Services/Ordering/Ordering.API/settings.json
@@ -1,6 +1,7 @@
{
"ConnectionString": "Server=tcp:127.0.0.1,5433;Database=Microsoft.eShopOnContainers.Services.OrderingDb;User Id=sa;Password=Pass@word;",
"IdentityUrl": "http://localhost:5105",
+ "UseCustomizationData": false,
"Logging": {
"IncludeScopes": false,
"LogLevel": {
@@ -8,5 +9,7 @@
"System": "Information",
"Microsoft": "Information"
}
- }
+ },
+ "AzureServiceBusEnabled": false,
+ "SubscriptionClientName": "Ordering"
}
diff --git a/src/Services/Payment/Payment.API/IntegrationEvents/EventHandling/OrderStatusChangedToStockConfirmedIntegrationEventHandler.cs b/src/Services/Payment/Payment.API/IntegrationEvents/EventHandling/OrderStatusChangedToStockConfirmedIntegrationEventHandler.cs
index dfdba0068..bf2e4c1ca 100644
--- a/src/Services/Payment/Payment.API/IntegrationEvents/EventHandling/OrderStatusChangedToStockConfirmedIntegrationEventHandler.cs
+++ b/src/Services/Payment/Payment.API/IntegrationEvents/EventHandling/OrderStatusChangedToStockConfirmedIntegrationEventHandler.cs
@@ -22,7 +22,14 @@
public async Task Handle(OrderStatusChangedToStockConfirmedIntegrationEvent @event)
{
IntegrationEvent orderPaymentIntegrationEvent;
- if(_settings.PaymentSucceded)
+
+ //Business feature comment:
+ // When OrderStatusChangedToStockConfirmed Integration Event is handled.
+ // Here we're simulating that we'd be performing the payment against any payment gateway
+ // Instead of a real payment we just take the env. var to simulate the payment
+ // The payment can be successful or it can fail
+
+ if (_settings.PaymentSucceded)
{
orderPaymentIntegrationEvent = new OrderPaymentSuccededIntegrationEvent(@event.OrderId);
}
diff --git a/src/Services/Payment/Payment.API/Payment.API.csproj b/src/Services/Payment/Payment.API/Payment.API.csproj
index 6152a78fa..9b1442c8e 100644
--- a/src/Services/Payment/Payment.API/Payment.API.csproj
+++ b/src/Services/Payment/Payment.API/Payment.API.csproj
@@ -27,6 +27,7 @@
+
diff --git a/src/Services/Payment/Payment.API/Startup.cs b/src/Services/Payment/Payment.API/Startup.cs
index 32d0fc8c4..9cba1415d 100644
--- a/src/Services/Payment/Payment.API/Startup.cs
+++ b/src/Services/Payment/Payment.API/Startup.cs
@@ -12,6 +12,8 @@ using RabbitMQ.Client;
using Microsoft.eShopOnContainers.BuildingBlocks.EventBus;
using Payment.API.IntegrationEvents.Events;
using Payment.API.IntegrationEvents.EventHandling;
+using Microsoft.eShopOnContainers.BuildingBlocks.EventBusServiceBus;
+using Microsoft.Azure.ServiceBus;
namespace Payment.API
{
@@ -35,19 +37,34 @@ namespace Payment.API
// Add framework services.
services.AddMvc();
services.Configure(Configuration);
- services.AddSingleton(sp =>
+ if (Configuration.GetValue("AzureServiceBusEnabled"))
{
- var logger = sp.GetRequiredService>();
+ services.AddSingleton(sp =>
+ {
+ var logger = sp.GetRequiredService>();
+
+ var serviceBusConnectionString = Configuration["EventBusConnection"];
+ var serviceBusConnection = new ServiceBusConnectionStringBuilder(serviceBusConnectionString);
- var factory = new ConnectionFactory()
+ return new DefaultServiceBusPersisterConnection(serviceBusConnection, logger);
+ });
+ }
+ else
+ {
+ services.AddSingleton(sp =>
{
- HostName = Configuration["EventBusConnection"]
- };
+ var logger = sp.GetRequiredService>();
- return new DefaultRabbitMQPersistentConnection(factory, logger);
- });
+ var factory = new ConnectionFactory()
+ {
+ HostName = Configuration["EventBusConnection"]
+ };
+
+ return new DefaultRabbitMQPersistentConnection(factory, logger);
+ });
+ }
- RegisterServiceBus(services);
+ RegisterEventBus(services);
services.AddSwaggerGen(options =>
{
@@ -84,20 +101,35 @@ namespace Payment.API
ConfigureEventBus(app);
}
- private void RegisterServiceBus(IServiceCollection services)
+ private void RegisterEventBus(IServiceCollection services)
{
- services.AddSingleton();
- services.AddSingleton();
+ if (Configuration.GetValue("AzureServiceBusEnabled"))
+ {
+ services.AddSingleton(sp =>
+ {
+ var serviceBusPersisterConnection = sp.GetRequiredService();
+ var iLifetimeScope = sp.GetRequiredService();
+ var logger = sp.GetRequiredService>();
+ var eventBusSubcriptionsManager = sp.GetRequiredService();
+ var subscriptionClientName = Configuration["SubscriptionClientName"];
+
+ return new EventBusServiceBus(serviceBusPersisterConnection, logger,
+ eventBusSubcriptionsManager, subscriptionClientName, iLifetimeScope);
+ });
+ }
+ else
+ {
+ services.AddSingleton();
+ }
- services.AddTransient,
- OrderStatusChangedToStockConfirmedIntegrationEventHandler>();
+ services.AddTransient();
+ services.AddSingleton();
}
private void ConfigureEventBus(IApplicationBuilder app)
{
var eventBus = app.ApplicationServices.GetRequiredService();
- eventBus.Subscribe>();
+ eventBus.Subscribe();
}
}
}
\ No newline at end of file
diff --git a/src/Services/Payment/Payment.API/appsettings.json b/src/Services/Payment/Payment.API/appsettings.json
index 601eaa246..9aef99a14 100644
--- a/src/Services/Payment/Payment.API/appsettings.json
+++ b/src/Services/Payment/Payment.API/appsettings.json
@@ -5,5 +5,7 @@
"Default": "Warning"
}
},
- "PaymentSucceded": "true"
+ "PaymentSucceded": true,
+ "AzureServiceBusEnabled": false,
+ "SubscriptionClientName": "Payment"
}
diff --git a/src/Web/WebMVC/AppSettings.cs b/src/Web/WebMVC/AppSettings.cs
index b15167647..42946262f 100644
--- a/src/Web/WebMVC/AppSettings.cs
+++ b/src/Web/WebMVC/AppSettings.cs
@@ -12,7 +12,9 @@ namespace Microsoft.eShopOnContainers.WebMVC
public string OrderingUrl { get; set; }
public string BasketUrl { get; set; }
public string MarketingUrl { get; set; }
+ public bool ActivateCampaignDetailFunction { get; set; }
public Logging Logging { get; set; }
+ public bool UseCustomizationData { get; set; }
}
public class Connectionstrings
diff --git a/src/Web/WebMVC/Controllers/CampaignsController.cs b/src/Web/WebMVC/Controllers/CampaignsController.cs
index 8f291bb49..cbb08e051 100644
--- a/src/Web/WebMVC/Controllers/CampaignsController.cs
+++ b/src/Web/WebMVC/Controllers/CampaignsController.cs
@@ -11,19 +11,29 @@ namespace Microsoft.eShopOnContainers.WebMVC.Controllers
using System;
using ViewModels.Pagination;
using global::WebMVC.ViewModels;
+ using Microsoft.Extensions.Options;
[Authorize]
public class CampaignsController : Controller
{
private readonly ICampaignService _campaignService;
+ private readonly AppSettings _settings;
- public CampaignsController(ICampaignService campaignService) =>
+ public CampaignsController(ICampaignService campaignService, IOptionsSnapshot settings)
+ {
_campaignService = campaignService;
+ _settings = settings.Value;
+ }
public async Task Index(int page = 0, int pageSize = 10)
{
var campaignList = await _campaignService.GetCampaigns(pageSize, page);
+ if(campaignList is null)
+ {
+ return View();
+ }
+
var totalPages = (int) Math.Ceiling((decimal) campaignList.Count / pageSize);
var vm = new CampaignViewModel
@@ -40,6 +50,8 @@ namespace Microsoft.eShopOnContainers.WebMVC.Controllers
}
};
+ ViewBag.IsCampaignDetailFunctionActive = _settings.ActivateCampaignDetailFunction;
+
return View(vm);
}
diff --git a/src/Web/WebMVC/Infrastructure/API.cs b/src/Web/WebMVC/Infrastructure/API.cs
index 2dcf555df..b29afefa8 100644
--- a/src/Web/WebMVC/Infrastructure/API.cs
+++ b/src/Web/WebMVC/Infrastructure/API.cs
@@ -84,9 +84,9 @@ namespace WebMVC.Infrastructure
public static class Marketing
{
- public static string GetAllCampaigns(string baseUri, string userId, int take, int page)
+ public static string GetAllCampaigns(string baseUri, int take, int page)
{
- return $"{baseUri}user/{userId}?pageSize={take}&pageIndex={page}";
+ return $"{baseUri}user?pageSize={take}&pageIndex={page}";
}
public static string GetAllCampaignById(string baseUri, int id)
diff --git a/src/Web/WebMVC/Infrastructure/WebContextSeed.cs b/src/Web/WebMVC/Infrastructure/WebContextSeed.cs
new file mode 100644
index 000000000..65063e34f
--- /dev/null
+++ b/src/Web/WebMVC/Infrastructure/WebContextSeed.cs
@@ -0,0 +1,97 @@
+using Microsoft.AspNetCore.Builder;
+using Microsoft.AspNetCore.Hosting;
+using Microsoft.eShopOnContainers.WebMVC;
+using Microsoft.Extensions.DependencyInjection;
+using Microsoft.Extensions.Logging;
+using Microsoft.Extensions.Options;
+using System;
+using System.IO;
+using System.IO.Compression;
+using System.Linq;
+
+namespace WebMVC.Infrastructure
+{
+ public class WebContextSeed
+ {
+ public static void Seed(IApplicationBuilder applicationBuilder, IHostingEnvironment env, ILoggerFactory loggerFactory)
+ {
+ var log = loggerFactory.CreateLogger("WebMVC seed");
+
+ var settings = (AppSettings)applicationBuilder
+ .ApplicationServices.GetRequiredService>().Value;
+
+ var useCustomizationData = settings.UseCustomizationData;
+ var contentRootPath = env.ContentRootPath;
+ var webroot = env.WebRootPath;
+
+ if (useCustomizationData)
+ {
+ GetPreconfiguredImages(contentRootPath, webroot, log);
+
+ GetPreconfiguredCSS(contentRootPath, webroot, log);
+ }
+ }
+
+ static void GetPreconfiguredCSS(string contentRootPath, string webroot, ILogger log)
+ {
+ try
+ {
+ string overrideCssFile = Path.Combine(contentRootPath, "Setup", "override.css");
+ if (!File.Exists(overrideCssFile))
+ {
+ log.LogError($" override css file '{overrideCssFile}' does not exists.");
+ return;
+ }
+
+ string destinationFilename = Path.Combine(webroot, "css", "override.css");
+ File.Copy(overrideCssFile, destinationFilename, true );
+ }
+ catch (Exception ex)
+ {
+ log.LogError($"Exception in method GetPreconfiguredCSS WebMVC. Exception Message={ex.Message}");
+ }
+ }
+
+ static void GetPreconfiguredImages(string contentRootPath, string webroot, ILogger log)
+ {
+ try
+ {
+ string imagesZipFile = Path.Combine(contentRootPath, "Setup", "images.zip");
+ if (!File.Exists(imagesZipFile))
+ {
+ log.LogError($" zip file '{imagesZipFile}' does not exists.");
+ return;
+ }
+
+ string imagePath = Path.Combine(webroot, "images");
+ string[] imageFiles = Directory.GetFiles(imagePath).Select(file => Path.GetFileName(file)).ToArray();
+
+ using (ZipArchive zip = ZipFile.Open(imagesZipFile, ZipArchiveMode.Read))
+ {
+ foreach (ZipArchiveEntry entry in zip.Entries)
+ {
+ if (imageFiles.Contains(entry.Name))
+ {
+ string destinationFilename = Path.Combine(imagePath, entry.Name);
+ if (File.Exists(destinationFilename))
+ {
+ File.Delete(destinationFilename);
+ }
+ entry.ExtractToFile(destinationFilename);
+ }
+ else
+ {
+ log.LogWarning($"Skip file '{entry.Name}' in zipfile '{imagesZipFile}'");
+ }
+ }
+ }
+ }
+ catch ( Exception ex )
+ {
+ log.LogError($"Exception in method GetPreconfiguredImages WebMVC. Exception Message={ex.Message}");
+ }
+ }
+
+ }
+
+}
diff --git a/src/Web/WebMVC/Services/CampaignService.cs b/src/Web/WebMVC/Services/CampaignService.cs
index dd93e3283..6190e74d6 100644
--- a/src/Web/WebMVC/Services/CampaignService.cs
+++ b/src/Web/WebMVC/Services/CampaignService.cs
@@ -32,9 +32,8 @@
public async Task GetCampaigns(int pageSize, int pageIndex)
{
- var userId = GetUserIdentity();
var allCampaignItemsUri = API.Marketing.GetAllCampaigns(_remoteServiceBaseUrl,
- userId, pageSize, pageIndex);
+ pageSize, pageIndex);
var authorizationToken = await GetUserTokenAsync();
var dataString = await _apiClient.GetStringAsync(allCampaignItemsUri, authorizationToken);
diff --git a/src/Web/WebMVC/Setup/images.zip b/src/Web/WebMVC/Setup/images.zip
new file mode 100644
index 000000000..531ed26f2
Binary files /dev/null and b/src/Web/WebMVC/Setup/images.zip differ
diff --git a/src/Web/WebMVC/Setup/override.css b/src/Web/WebMVC/Setup/override.css
new file mode 100644
index 000000000..e8b5bb50f
--- /dev/null
+++ b/src/Web/WebMVC/Setup/override.css
@@ -0,0 +1,3 @@
+.esh-catalog-button {
+ background-color: #83D01B; /* to override the style of this button ie. to make it red, use background-color: #FF001b; */
+}
diff --git a/src/Web/WebMVC/Startup.cs b/src/Web/WebMVC/Startup.cs
index f07fb21c7..3349d9530 100644
--- a/src/Web/WebMVC/Startup.cs
+++ b/src/Web/WebMVC/Startup.cs
@@ -14,6 +14,7 @@ using Microsoft.Extensions.HealthChecks;
using Microsoft.Extensions.Logging;
using System;
using System.IdentityModel.Tokens.Jwt;
+using WebMVC.Infrastructure;
namespace Microsoft.eShopOnContainers.WebMVC
{
@@ -58,6 +59,7 @@ namespace Microsoft.eShopOnContainers.WebMVC
checks.AddUrlCheck(Configuration["OrderingUrl"] + "/hc", TimeSpan.FromMinutes(minutes));
checks.AddUrlCheck(Configuration["BasketUrl"] + "/hc", TimeSpan.FromMinutes(minutes));
checks.AddUrlCheck(Configuration["IdentityUrl"] + "/hc", TimeSpan.FromMinutes(minutes));
+ checks.AddUrlCheck(Configuration["MarketingUrl"] + "/hc", TimeSpan.FromMinutes(minutes));
});
// Add application services.
@@ -77,8 +79,7 @@ namespace Microsoft.eShopOnContainers.WebMVC
{
services.AddSingleton();
}
-
-
+ var useLoadTest = Configuration.GetValue("UseLoadTest");
var identityUrl = Configuration.GetValue("IdentityUrl");
var callBackUrl = Configuration.GetValue("CallBackUrl");
// Add Authentication services
@@ -88,9 +89,9 @@ namespace Microsoft.eShopOnContainers.WebMVC
options.SignInScheme = CookieAuthenticationDefaults.AuthenticationScheme;
options.Authority = identityUrl.ToString();
options.PostLogoutRedirectUri = callBackUrl.ToString();
- options.ClientId = "mvc";
+ options.ClientId = useLoadTest ? "mvctest" : "mvc";
options.ClientSecret = "secret";
- options.ResponseType = "code id_token";
+ options.ResponseType = useLoadTest ? "code id_token token" : "code id_token";
options.SaveTokens = true;
options.GetClaimsFromUserInfoEndpoint = true;
options.RequireHttpsMetadata = false;
@@ -131,6 +132,7 @@ namespace Microsoft.eShopOnContainers.WebMVC
app.UseAuthentication();
var log = loggerFactory.CreateLogger("identity");
+ WebContextSeed.Seed(app, env, loggerFactory);
app.UseMvc(routes =>
{
diff --git a/src/Web/WebMVC/ViewModels/CampaignItem.cs b/src/Web/WebMVC/ViewModels/CampaignItem.cs
index a0bfbaf66..04e220229 100644
--- a/src/Web/WebMVC/ViewModels/CampaignItem.cs
+++ b/src/Web/WebMVC/ViewModels/CampaignItem.cs
@@ -15,5 +15,6 @@
public DateTime To { get; set; }
public string PictureUri { get; set; }
+ public string DetailsUri { get; set; }
}
}
\ No newline at end of file
diff --git a/src/Web/WebMVC/Views/Campaigns/Index.cshtml b/src/Web/WebMVC/Views/Campaigns/Index.cshtml
index d4c8abe48..bca288ed6 100644
--- a/src/Web/WebMVC/Views/Campaigns/Index.cshtml
+++ b/src/Web/WebMVC/Views/Campaigns/Index.cshtml
@@ -13,10 +13,8 @@
new Header() { Controller = "Catalog", Text = "Back to catalog" } })
- @if (Model.CampaignItems != null && Model.CampaignItems.Any())
+ @if(Model != null && Model.CampaignItems.Any())
{
- @Html.Partial("_pagination", Model.PaginationInfo)
-
@foreach (var catalogItem in Model.CampaignItems)
{
diff --git a/src/Web/WebMVC/Views/Campaigns/_campaign.cshtml b/src/Web/WebMVC/Views/Campaigns/_campaign.cshtml
index de3b52657..c0a074b12 100644
--- a/src/Web/WebMVC/Views/Campaigns/_campaign.cshtml
+++ b/src/Web/WebMVC/Views/Campaigns/_campaign.cshtml
@@ -1,17 +1,21 @@
@model CampaignItem
-
-
diff --git a/src/Web/WebMVC/Views/Order/Detail.cshtml b/src/Web/WebMVC/Views/Order/Detail.cshtml
index c17ffb2a9..810a59559 100644
--- a/src/Web/WebMVC/Views/Order/Detail.cshtml
+++ b/src/Web/WebMVC/Views/Order/Detail.cshtml
@@ -68,9 +68,9 @@
-
$ @Math.Round(item.UnitPrice, 2)
+
$ @item.UnitPrice.ToString("N2")
-
$ @Math.Round(item.Units * item.UnitPrice, 2)
+
$ @Math.Round(item.Units * item.UnitPrice, 2).ToString("N2")
}
diff --git a/src/Web/WebMVC/Views/Order/Index.cshtml b/src/Web/WebMVC/Views/Order/Index.cshtml
index 61a871f26..312e81162 100644
--- a/src/Web/WebMVC/Views/Order/Index.cshtml
+++ b/src/Web/WebMVC/Views/Order/Index.cshtml
@@ -9,6 +9,7 @@
@Html.Partial("_Header", new List