Browse Source

Merge pull request #2 from dotnet-architecture/dev

upd fork
pull/1934/head
Taras Kovalenko 7 years ago
committed by GitHub
parent
commit
3a73cf22a2
101 changed files with 1145 additions and 10093 deletions
  1. +2
    -2
      .env
  2. +3
    -0
      README.md
  3. +3
    -2
      cli-linux/build-bits-linux.sh
  4. +6
    -2
      deploy/az/azurefunctions/azurefunctionsdeploy.parameters.json
  5. +5
    -3
      deploy/az/azurefunctions/readme.md
  6. +31
    -0
      deploy/az/cosmos/readme.md
  7. +1
    -1
      deploy/az/redis/readme.md
  8. +4
    -1
      deploy/az/storage/catalog/deploystorage.json
  9. +3
    -0
      deploy/az/storage/catalog/deploystorage.parameters.json
  10. +37
    -0
      deploy/az/storage/catalog/readme.md
  11. +4
    -1
      deploy/az/storage/marketing/deploystorage.json
  12. +3
    -0
      deploy/az/storage/marketing/deploystorage.parameters.json
  13. +37
    -0
      deploy/az/storage/marketing/readme.md
  14. +4
    -0
      deploy/readme.md
  15. +3
    -1
      docker-compose-windows.override.yml
  16. +12
    -3
      docker-compose-windows.prod.yml
  17. +1
    -1
      docker-compose.ci.build.yml
  18. +0
    -6
      docker-compose.dcproj
  19. +16
    -14
      docker-compose.override.yml
  20. +17
    -6
      docker-compose.prod.yml
  21. +0
    -166
      docker-compose.vs.debug.yml
  22. +0
    -112
      docker-compose.vs.release.yml
  23. +20
    -16
      docker-compose.yml
  24. +24
    -11
      src/BuildingBlocks/EventBus/EventBusServiceBus/EventBusServiceBus.cs
  25. +1
    -1
      src/BuildingBlocks/EventBus/EventBusServiceBus/EventBusServiceBus.csproj
  26. +2
    -2
      src/BuildingBlocks/HealthChecks/src/Microsoft.Extensions.HealthChecks.AzureStorage/AzureHealthCheckBuilderExtensions.cs
  27. +125
    -5
      src/Mobile/eShopOnContainers/eShopOnContainers.Core/App.xaml
  28. +10
    -1
      src/Mobile/eShopOnContainers/eShopOnContainers.Core/Controls/AddBasketButton.xaml
  29. +54
    -0
      src/Mobile/eShopOnContainers/eShopOnContainers.Core/Effects/ThemeEffects.cs
  30. +0
    -5
      src/Mobile/eShopOnContainers/eShopOnContainers.Core/Views/LoginView.xaml
  31. +1
    -0
      src/Mobile/eShopOnContainers/eShopOnContainers.Core/eShopOnContainers.Core.csproj
  32. +1
    -4
      src/Mobile/eShopOnContainers/eShopOnContainers.Core/project.json
  33. +1
    -4
      src/Mobile/eShopOnContainers/eShopOnContainers.Droid/Activities/MainActivity.cs
  34. +66
    -0
      src/Mobile/eShopOnContainers/eShopOnContainers.Droid/Effects/BaseContainerEffect.cs
  35. +54
    -0
      src/Mobile/eShopOnContainers/eShopOnContainers.Droid/Effects/CircleEffect.cs
  36. +1
    -0
      src/Mobile/eShopOnContainers/eShopOnContainers.Droid/Effects/EntryLineColorEffect.cs
  37. +116
    -65
      src/Mobile/eShopOnContainers/eShopOnContainers.Droid/Resources/Resource.Designer.cs
  38. +2
    -15
      src/Mobile/eShopOnContainers/eShopOnContainers.Droid/eShopOnContainers.Droid.csproj
  39. +0
    -3
      src/Mobile/eShopOnContainers/eShopOnContainers.Droid/packages.config
  40. +114
    -65
      src/Mobile/eShopOnContainers/eShopOnContainers.TestRunner.Droid/Resources/Resource.Designer.cs
  41. +0
    -12
      src/Mobile/eShopOnContainers/eShopOnContainers.TestRunner.Droid/eShopOnContainers.TestRunner.Droid.csproj
  42. +0
    -3
      src/Mobile/eShopOnContainers/eShopOnContainers.TestRunner.Droid/packages.config
  43. +0
    -12
      src/Mobile/eShopOnContainers/eShopOnContainers.TestRunner.iOS/eShopOnContainers.TestRunner.iOS.csproj
  44. +0
    -3
      src/Mobile/eShopOnContainers/eShopOnContainers.TestRunner.iOS/packages.config
  45. +1
    -3
      src/Mobile/eShopOnContainers/eShopOnContainers.Windows/project.json
  46. +1
    -13
      src/Mobile/eShopOnContainers/eShopOnContainers.iOS/AppDelegate.cs
  47. +53
    -0
      src/Mobile/eShopOnContainers/eShopOnContainers.iOS/Effects/CircleEffect.cs
  48. +1
    -15
      src/Mobile/eShopOnContainers/eShopOnContainers.iOS/eShopOnContainers.iOS.csproj
  49. +0
    -3
      src/Mobile/eShopOnContainers/eShopOnContainers.iOS/packages.config
  50. +1
    -8
      src/Services/Basket/Basket.API/Infrastructure/Filters/HttpGlobalExceptionFilter.cs
  51. +9
    -0
      src/Services/Basket/Basket.API/Infrastructure/Filters/JsonErrorResponse.cs
  52. +30
    -0
      src/Services/Basket/Basket.API/Infrastructure/Filters/ValidateModelStateFilter.cs
  53. +16
    -2
      src/Services/Basket/Basket.API/Model/BasketItem.cs
  54. +1
    -0
      src/Services/Basket/Basket.API/Startup.cs
  55. BIN
      src/Services/Catalog/Catalog.API/Setup/CatalogItems.zip
  56. +1
    -1
      src/Services/Identity/Identity.API/Startup.cs
  57. +3
    -3
      src/Services/Identity/Identity.API/Views/Shared/_Layout.cshtml
  58. +1
    -1
      src/Services/Identity/Identity.API/bower.json
  59. +9
    -8
      src/Services/Identity/Identity.API/wwwroot/lib/bootstrap/.bower.json
  60. +1
    -1
      src/Services/Identity/Identity.API/wwwroot/lib/bootstrap/LICENSE
  61. +0
    -6800
      src/Services/Identity/Identity.API/wwwroot/lib/bootstrap/css/bootstrap.css
  62. +0
    -1
      src/Services/Identity/Identity.API/wwwroot/lib/bootstrap/css/bootstrap.css.map
  63. +0
    -5
      src/Services/Identity/Identity.API/wwwroot/lib/bootstrap/css/bootstrap.min.css
  64. +2
    -2
      src/Services/Identity/Identity.API/wwwroot/lib/bootstrap/dist/css/bootstrap-theme.css
  65. +1
    -1
      src/Services/Identity/Identity.API/wwwroot/lib/bootstrap/dist/css/bootstrap-theme.css.map
  66. +2
    -2
      src/Services/Identity/Identity.API/wwwroot/lib/bootstrap/dist/css/bootstrap-theme.min.css
  67. +1
    -1
      src/Services/Identity/Identity.API/wwwroot/lib/bootstrap/dist/css/bootstrap-theme.min.css.map
  68. +2
    -5
      src/Services/Identity/Identity.API/wwwroot/lib/bootstrap/dist/css/bootstrap.css
  69. +1
    -1
      src/Services/Identity/Identity.API/wwwroot/lib/bootstrap/dist/css/bootstrap.css.map
  70. +3
    -3
      src/Services/Identity/Identity.API/wwwroot/lib/bootstrap/dist/css/bootstrap.min.css
  71. +1
    -1
      src/Services/Identity/Identity.API/wwwroot/lib/bootstrap/dist/css/bootstrap.min.css.map
  72. +64
    -50
      src/Services/Identity/Identity.API/wwwroot/lib/bootstrap/dist/js/bootstrap.js
  73. +4
    -4
      src/Services/Identity/Identity.API/wwwroot/lib/bootstrap/dist/js/bootstrap.min.js
  74. +0
    -2363
      src/Services/Identity/Identity.API/wwwroot/lib/bootstrap/js/bootstrap.js
  75. +0
    -7
      src/Services/Identity/Identity.API/wwwroot/lib/bootstrap/js/bootstrap.min.js
  76. +0
    -1
      src/Services/Location/Locations.API/Locations.API.csproj
  77. +1
    -6
      src/Services/Location/Locations.API/Program.cs
  78. +7
    -1
      src/Services/Ordering/Ordering.Domain/AggregatesModel/OrderAggregate/Order.cs
  79. +5
    -0
      src/Services/Ordering/Ordering.Domain/AggregatesModel/OrderAggregate/OrderItem.cs
  80. +0
    -1
      src/Services/Payment/Payment.API/Payment.API.csproj
  81. +1
    -6
      src/Services/Payment/Payment.API/Program.cs
  82. +0
    -8
      src/Web/WebMVC/Controllers/AccountController.cs
  83. +1
    -7
      src/Web/WebMVC/Controllers/CatalogController.cs
  84. +9
    -0
      src/Web/WebMVC/Controllers/ErrorController.cs
  85. +6
    -2
      src/Web/WebMVC/Startup.cs
  86. +0
    -64
      src/Web/WebMVC/Views/Account/Login.cshtml
  87. +0
    -106
      src/Web/WebMVC/Views/Account/Register.cshtml
  88. +2
    -2
      src/Web/WebMVC/Views/Shared/_Layout.cshtml
  89. +1
    -1
      src/Web/WebMVC/bower.json
  90. +11
    -4
      src/Web/WebSPA/Client/modules/basket/basket.component.html
  91. +28
    -9
      src/Web/WebSPA/Client/modules/basket/basket.component.ts
  92. +2
    -2
      src/Web/WebSPA/Client/modules/orders/orders.component.ts
  93. +3
    -2
      src/Web/WebSPA/Client/modules/shared/services/basket.wrapper.service.ts
  94. +1
    -1
      src/Web/WebSPA/Client/modules/shared/services/data.service.ts
  95. +1
    -1
      src/Web/WebSPA/Startup.cs
  96. +1
    -6
      src/Web/WebStatus/Program.cs
  97. +1
    -3
      src/Web/WebStatus/Views/Shared/_Layout.cshtml
  98. +0
    -1
      src/Web/WebStatus/WebStatus.csproj
  99. +10
    -7
      test/Services/UnitTest/Account/AccountControllerTest.cs
  100. +47
    -0
      test/Services/UnitTest/Ordering/Builders.cs

+ 2
- 2
.env View File

@ -8,8 +8,8 @@ ESHOP_EXTERNAL_DNS_NAME_OR_IP=localhost
ESHOP_PROD_EXTERNAL_DNS_NAME_OR_IP=10.121.122.92
#ESHOP_AZURE_REDIS_BASKET_DB=<YourAzureRedisBasketInfo>
#ESHOP_AZURE_STORAGE_CATALOG=<YourAzureStorageCatalog>
#ESHOP_AZURE_STORAGE_MARKETING=<YourAzureStorageMarketing>
#ESHOP_AZURE_STORAGE_CATALOG_URL=<YourAzureStorage_Catalog_BLOB_URL>
#ESHOP_AZURE_STORAGE_MARKETING_URL=<YourAzureStorage_Marketing__BLOB_URL>
#ESHOP_AZURE_SERVICE_BUS=<YourAzureServiceBusInfo>
#ESHOP_AZURE_COSMOSDB=<YourAzureCosmosDBConnData>
#ESHOP_AZURE_CATALOG_DB=<YourAzureSQLDBCatalogDBConnString>


+ 3
- 0
README.md View File

@ -2,6 +2,9 @@
Sample .NET Core reference application, powered by Microsoft, based on a simplified microservices architecture and Docker containers. <p>
**Note for Pull Requests**: We accept pull request from the community. When doing it, please do it onto the DEV branch which is the consolidated work-in-progress branch. Do not request it onto Master, if possible.
## Moving to .NET Core 2.0 "wave"
NOTE: During August/September 2017 we'll be moving the solution to .NET Core "wave". Not just compilation but also new recommended code in EF Core 2.0, ASP.NET Core 2.0, and other new related versions.
>**PLEASE** Read our [branch guide](./branch-guide.md) to know about our branching policy
> ### DISCLAIMER


+ 3
- 2
cli-linux/build-bits-linux.sh View File

@ -32,9 +32,9 @@ do
pushd $path/$project
rm -rf obj/Docker/publish
echo -e "\e[33m\tRestoring project $project"
dotnet restore
dotnet restore --verbosity minimal
echo -e "\e[33m\tBuilding and publishing $project"
dotnet publish -o obj/Docker/publish
dotnet publish -c Release -o obj/Docker/publish --verbosity minimal
popd
done
@ -50,4 +50,5 @@ done
# No need to build the images, docker build or docker compose will
# do that using the images and containers defined in the docker-compose.yml file.
#
#

+ 6
- 2
deploy/az/azurefunctions/azurefunctionsdeploy.parameters.json View File

@ -1,5 +1,9 @@
{
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentParameters.json#",
"contentVersion": "1.0.0.0",
"parameters": {}
"contentVersion": "1.0.0.0",
"parameters": {
"SitesEshopfunctionsName": {
"value": "eshopfunctionsapp"
}
}
}

+ 5
- 3
deploy/az/azurefunctions/readme.md View File

@ -4,20 +4,22 @@ The ARM template `azurefunctionsdeploy.json` and its parameter file (`azurefunct
## Editing azurefunctionsdeploy.parameters.json file
You can edit the `azurefunctionsdeploy.parameters.parameters.json` file to set your values, but is not needed.
You can edit the `azurefunctionsdeploy.parameters.parameters.json` file to set your values, but is not needed. The only parameter that can be set is:
1. `SitesEshopfunctionsName` is a string that is used to create the Azure function app name.
## 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:
i. e. if you are in Windows, to deploy the Azure Functions environment 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.
You need to deploy the Marketing azure function from Visual Studio 2017 15.3 from the the Marketing-functions project in the solution eShopOnContainers-AzureFunctions.sln (Visual Studio publish tool).
## Setting Azure function configurations


+ 31
- 0
deploy/az/cosmos/readme.md View File

@ -0,0 +1,31 @@
# Deploying Azure Cosmosdb
The ARM template `deploycosmos.json` and its parameter file (`deploycosmos.parameters.json`) are used to deploy following resources:
1. One Cosmosdb database
## Editing deploycosmos.parameters.json file
You can edit the `deploycosmos.parameters.json` file to set your values, but is not needed. The only parameter that can
be set is:
1. `name` is a string that is used to create the database name. 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 a Cosmosdb database in a new resourcegroup located in westus, go to `deploy\az` folder and type:
```
create-resources.cmd cosmos\deploycosmos newResourceGroup -c westus
```

+ 1
- 1
deploy/az/redis/readme.md View File

@ -15,7 +15,7 @@ be set is:
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:
i. e. if you are in windows, to deploy a Redis cache in a new Azure Resource Group located in westus, go to `deploy\az` folder and type:
```
create-resources.cmd redis\redisdeploy newResourceGroup -c westus


+ 4
- 1
deploy/az/storage/catalog/deploystorage.json View File

@ -7,11 +7,14 @@
},
"profileName" : {
"type": "string"
},
"endpointName" : {
"type": "string"
}
},
"variables": {
"catalogstorage": "[concat(parameters('catalogstorage'), uniqueString(resourceGroup().id))]",
"endpointName": "[concat('endpoint-', uniqueString(resourceGroup().id))]",
"endpointName": "[concat(parameters('endpointName'), uniqueString(resourceGroup().id))]",
"profileName": "[parameters('profileName')]"
},
"resources": [


+ 3
- 0
deploy/az/storage/catalog/deploystorage.parameters.json View File

@ -7,6 +7,9 @@
},
"profileName":{
"value": "eshopcatalog"
},
"endpointName":{
"value": "catalog-endpoint"
}
}
}

+ 37
- 0
deploy/az/storage/catalog/readme.md View File

@ -0,0 +1,37 @@
# Deploying Catalog Storage
The ARM template `deploystorage.json` and its parameter file (`deploystorage.parameters.json`) are used to deploy following resources:
1. One Storage Account
2. One CDN profile
3. One Endpoint
## Editing deploystorage.parameters.json file
You can edit the `deploystorage.parameters.json` file to set your values, but is not needed. The only parameters that can
be set are:
1. `catalogstorage` is a string that is used to create the storage account name. ARM script creates unique values by appending a unique string to this parameter value, so you can leave the default value.
2. `profileName` is a string that is used to create the CDN profile name.
3. `endpointName` is a string that is used to create the storage endpoint name. 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 a Storage Account in a new resourcegroup located in westus, go to `deploy\az` folder and type:
```
create-resources.cmd catalog\deploystorage newResourceGroup -c westus
```

+ 4
- 1
deploy/az/storage/marketing/deploystorage.json View File

@ -7,11 +7,14 @@
},
"profileName" : {
"type": "string"
},
"endpointName" : {
"type": "string"
}
},
"variables": {
"marketingstorage": "[concat(parameters('marketingstorage'), uniqueString(resourceGroup().id))]",
"endpointName": "[concat('endpoint-', uniqueString(resourceGroup().id))]",
"endpointName": "[concat(parameters('endpointName'), uniqueString(resourceGroup().id))]",
"profileName": "[parameters('profileName')]"
},
"resources": [


+ 3
- 0
deploy/az/storage/marketing/deploystorage.parameters.json View File

@ -7,6 +7,9 @@
},
"profileName":{
"value": "eshopmarketing"
},
"endpointName":{
"value": "marketing-endpoint"
}
}
}

+ 37
- 0
deploy/az/storage/marketing/readme.md View File

@ -0,0 +1,37 @@
# Deploying Marketing Storage
The ARM template `deploystorage.json` and its parameter file (`deploystorage.parameters.json`) are used to deploy following resources:
1. One Storage Account
2. One CDN profile
3. One Endpoint
## Editing deploystorage.parameters.json file
You can edit the `deploystorage.parameters.json` file to set your values, but is not needed. The only parameters that can
be set are:
1. `marketingstorage` is a string that is used to create the storage account name. ARM script creates unique values by appending a unique string to this parameter value, so you can leave the default value.
2. `profileName` is a string that is used to create the CDN profile name.
3. `endpointName` is a string that is used to create the storage endpoint name. 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 a Storage account in a new resourcegroup located in westus, go to `deploy\az` folder and type:
```
create-resources.cmd marketing\deploystorage newResourceGroup -c westus
```

+ 4
- 0
deploy/readme.md View File

@ -20,6 +20,10 @@ Using `docker-machine` is the recommended way to create a VM with docker install
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)
4. [Deploying Cosmosdb](az/cosmos/readme.md)
5. [Deploying Catalog Storage](az/storage/catalog/readme.md)
6. [Deploying Marketing Storage](az/storage/marketing/readme.md)
7. [Deploying Marketing Azure functions](az/azurefunctions/readme.md)


+ 3
- 1
docker-compose-windows.override.yml View File

@ -31,6 +31,7 @@ services:
- AzureStorageAccountKey=${ESHOP_AZURE_STORAGE_CATALOG_KEY}
- UseCustomizationData=True
- AzureServiceBusEnabled=False
- AzureStorageEnabled=False
ports:
- "5101:80"
@ -133,6 +134,7 @@ services:
- AzureStorageAccountName=${ESHOP_AZURE_STORAGE_MARKETING_NAME}
- AzureStorageAccountKey=${ESHOP_AZURE_STORAGE_MARKETING_KEY}
- AzureServiceBusEnabled=False
- AzureStorageEnabled=False
ports:
- "5110:80"
@ -140,7 +142,7 @@ 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
- ConnectionString=${ESHOP_AZURE_ORDERING_DB:-Server=sql.data;Database=Microsoft.eShopOnContainers.Services.OrderingDb;User Id=sa;Password=Pass@word}
- EventBusConnection=${ESHOP_AZURE_SERVICE_BUS:-rabbitmq}
- AzureServiceBusEnabled=False


+ 12
- 3
docker-compose-windows.prod.yml View File

@ -21,6 +21,7 @@ services:
- identityUrl=http://identity.api #Local: You need to open your local dev-machine firewall at range 5100-5110.
- IdentityUrlExternal=http://${ESHOP_PROD_EXTERNAL_DNS_NAME_OR_IP}:5105
- EventBusConnection=${ESHOP_AZURE_SERVICE_BUS:-rabbitmq}
- AzureServiceBusEnabled=False
ports:
- "5103:5103"
@ -29,11 +30,13 @@ services:
- ASPNETCORE_ENVIRONMENT=Production
- 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} #Local: You need to open your local dev-machine firewall at range 5100-5110.
- PicBaseUrl=${ESHOP_AZURE_STORAGE_CATALOG:-http://localhost:5101/api/v1/catalog/items/[0]/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
- AzureServiceBusEnabled=False
- AzureStorageEnabled=False
ports:
- "5101:80"
@ -62,6 +65,7 @@ services:
- IdentityUrlExternal=http://${ESHOP_PROD_EXTERNAL_DNS_NAME_OR_IP}:5105
- EventBusConnection=${ESHOP_AZURE_SERVICE_BUS:-rabbitmq}
- UseCustomizationData=True
- AzureServiceBusEnabled=False
ports:
- "5102:80"
@ -92,6 +96,7 @@ services:
- 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
- UseCustomizationData=True #Remote: Use ${ESHOP_EXTERNAL_DNS_NAME_OR_IP} if using external IP or DNS name from browser.
ports:
- "5100:80"
@ -106,9 +111,11 @@ services:
- identityUrl=http://identity.api #Local: You need to open your local dev-machine firewall at range 5100-5110.
- IdentityUrlExternal=http://${ESHOP_PROD_EXTERNAL_DNS_NAME_OR_IP}:5105
- CampaignDetailFunctionUri=${ESHOP_AZUREFUNC_CAMPAIGN_DETAILS_URI}
- PicBaseUrl=${ESHOP_AZURE_STORAGE_MARKETING}
- PicBaseUrl=${ESHOP_AZURE_STORAGE_MARKETING:-http://localhost:5110/api/v1/campaigns/[0]/pic/}
- AzureStorageAccountName=${ESHOP_AZURE_STORAGE_MARKETING_NAME}
- AzureStorageAccountKey=${ESHOP_AZURE_STORAGE_MARKETING_KEY}
- AzureServiceBusEnabled=False
- AzureStorageEnabled=False
ports:
- "5110:80"
@ -116,7 +123,7 @@ 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
- ConnectionString=${ESHOP_AZURE_ORDERING_DB:-Server=sql.data;Database=Microsoft.eShopOnContainers.Services.OrderingDb;User Id=sa;Password=Pass@word}
- EventBusConnection=${ESHOP_AZURE_SERVICE_BUS:-rabbitmq}
sql.data:
@ -151,6 +158,7 @@ services:
- ASPNETCORE_ENVIRONMENT=Production
- ASPNETCORE_URLS=http://0.0.0.0:5108
- EventBusConnection=${ESHOP_AZURE_SERVICE_BUS:-rabbitmq}
- AzureServiceBusEnabled=False
ports:
- "5108:80"
@ -163,5 +171,6 @@ services:
- identityUrl=http://identity.api #Local: You need to open your local dev-machine firewall at range 5100-5110.
- IdentityUrlExternal=http://${ESHOP_PROD_EXTERNAL_DNS_NAME_OR_IP}:5105
- EventBusConnection=${ESHOP_AZURE_SERVICE_BUS:-rabbitmq}
- AzureServiceBusEnabled=False
ports:
- "5109:80"

+ 1
- 1
docker-compose.ci.build.yml View File

@ -11,7 +11,7 @@ services:
# Next line is using the .sln file to compile all the projects.
# Sometime there is an issue in msbuild exits the process before finishing building the bits: (https://github.com/Microsoft/msbuild/issues/2153)
# Random error: error MSB4017: The build stopped unexpectedly be cause of an unexpected logger failure.
#command: /bin/bash -c "pushd ./src/Web/WebSPA && npm rebuild node-sass && popd && dotnet restore ./eShopOnContainers-ServicesAndWebApps.sln && dotnet publish ./eShopOnContainers-ServicesAndWebApps.sln -c Release -o ./obj/Docker/publish"
#command: /bin/bash -c "pushd ./src/Web/WebSPA && npm rebuild node-sass && popd && dotnet restore ./eShopOnContainers-ServicesAndWebApps.sln --verbosity minimal && dotnet publish ./eShopOnContainers-ServicesAndWebApps.sln -c Release -o ./obj/Docker/publish --verbosity minimal"
# NOTE: Using build-bits-linux.sh from Linux build container exits before ending.
command: /bin/bash -c "pushd ./src/Web/WebSPA && npm rebuild node-sass && popd && pushd /cli-linux && ./build-bits-linux.sh /src"

+ 0
- 6
docker-compose.dcproj View File

@ -15,12 +15,6 @@
</None>
<None Include="docker-compose.prod.yml">
<DependentUpon>docker-compose.yml</DependentUpon>
</None>
<None Include="docker-compose.vs.debug.yml">
<DependentUpon>docker-compose.yml</DependentUpon>
</None>
<None Include="docker-compose.vs.release.yml">
<DependentUpon>docker-compose.yml</DependentUpon>
</None>
<None Include="docker-compose.yml" />
</ItemGroup>

+ 16
- 14
docker-compose.override.yml View File

@ -25,12 +25,13 @@ services:
- ASPNETCORE_ENVIRONMENT=Development
- 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/catalog/items/[0]/pic/} #Local: You need to open your local dev-machine firewall at range 5100-5110.
- PicBaseUrl=${ESHOP_AZURE_STORAGE_CATALOG_URL:-http://localhost:5101/api/v1/catalog/items/[0]/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
- AzureServiceBusEnabled=False
- AzureStorageEnabled=False
ports:
- "5101:80"
@ -74,10 +75,11 @@ services:
- identityUrl=http://identity.api #Local: You need to open your local dev-machine firewall at range 5100-5110.
- IdentityUrlExternal=http://${ESHOP_EXTERNAL_DNS_NAME_OR_IP}:5105
- CampaignDetailFunctionUri=${ESHOP_AZUREFUNC_CAMPAIGN_DETAILS_URI}
- PicBaseUrl=${ESHOP_AZURE_STORAGE_MARKETING:-http://localhost:5110/api/v1/campaigns/[0]/pic/}
- PicBaseUrl=${ESHOP_AZURE_STORAGE_MARKETING_URL:-http://localhost:5110/api/v1/campaigns/[0]/pic/}
- AzureStorageAccountName=${ESHOP_AZURE_STORAGE_MARKETING_NAME}
- AzureStorageAccountKey=${ESHOP_AZURE_STORAGE_MARKETING_KEY}
- AzureServiceBusEnabled=False
- AzureStorageEnabled=False
ports:
- "5110:80"
@ -85,7 +87,7 @@ 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
- ConnectionString=${ESHOP_AZURE_ORDERING_DB:-Server=sql.data;Database=Microsoft.eShopOnContainers.Services.OrderingDb;User Id=sa;Password=Pass@word}
- EventBusConnection=${ESHOP_AZURE_SERVICE_BUS:-rabbitmq}
- AzureServiceBusEnabled=False
@ -121,17 +123,6 @@ services:
ports:
- "5100:80"
sql.data:
environment:
- SA_PASSWORD=Pass@word
- ACCEPT_EULA=Y
ports:
- "5433:1433"
nosql.data:
ports:
- "27017:27017"
webstatus:
environment:
- ASPNETCORE_ENVIRONMENT=Development
@ -168,3 +159,14 @@ services:
- AzureServiceBusEnabled=False
ports:
- "5109:80"
sql.data:
environment:
- SA_PASSWORD=Pass@word
- ACCEPT_EULA=Y
ports:
- "5433:1433"
nosql.data:
ports:
- "27017:27017"

+ 17
- 6
docker-compose.prod.yml View File

@ -21,6 +21,7 @@ services:
- identityUrl=http://identity.api #Local: You need to open your local dev-machine firewall at range 5100-5110.
- IdentityUrlExternal=http://${ESHOP_PROD_EXTERNAL_DNS_NAME_OR_IP}:5105
- EventBusConnection=${ESHOP_AZURE_SERVICE_BUS:-rabbitmq}
- AzureServiceBusEnabled=False
ports:
- "5103:80"
@ -29,11 +30,13 @@ services:
- ASPNETCORE_ENVIRONMENT=Production
- 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} #Local: You need to open your local dev-machine firewall at range 5100-5110.
- PicBaseUrl=${ESHOP_AZURE_STORAGE_CATALOG_URL:-http://localhost:5101/api/v1/catalog/items/[0]/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
- AzureServiceBusEnabled=False
- AzureStorageEnabled=False
ports:
- "5101:80"
@ -62,6 +65,7 @@ services:
- IdentityUrlExternal=http://${ESHOP_PROD_EXTERNAL_DNS_NAME_OR_IP}:5105
- EventBusConnection=${ESHOP_AZURE_SERVICE_BUS:-rabbitmq}
- UseCustomizationData=True
- AzureServiceBusEnabled=False
ports:
- "5102:80"
@ -73,12 +77,14 @@ services:
- MongoConnectionString=${ESHOP_AZURE_COSMOSDB:-mongodb://nosql.data}
- MongoDatabase=MarketingDb
- EventBusConnection=${ESHOP_AZURE_SERVICE_BUS:-rabbitmq}
- identityUrl=http://identity.api #Local: You need to open your local dev-machine firewall at range 5100-5110.
- identityUrl=http://identity.api #Local: You need to open your local dev-machine firewall at range 5100-5110.
- IdentityUrlExternal=http://${ESHOP_PROD_EXTERNAL_DNS_NAME_OR_IP}:5105
- CampaignDetailFunctionUri=${ESHOP_AZUREFUNC_CAMPAIGN_DETAILS_URI}
- PicBaseUrl=${ESHOP_AZURE_STORAGE_MARKETING}
- PicBaseUrl=${ESHOP_AZURE_STORAGE_MARKETING_URL:-http://localhost:5110/api/v1/campaigns/[0]/pic/}
- AzureStorageAccountName=${ESHOP_AZURE_STORAGE_MARKETING_NAME}
- AzureStorageAccountKey=${ESHOP_AZURE_STORAGE_MARKETING_KEY}
- AzureServiceBusEnabled=False
- AzureStorageEnabled=False
ports:
- "5110:80"
@ -86,8 +92,9 @@ 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
- ConnectionString=${ESHOP_AZURE_ORDERING_DB:-Server=sql.data;Database=Microsoft.eShopOnContainers.Services.OrderingDb;User Id=sa;Password=Pass@word}
- EventBusConnection=${ESHOP_AZURE_SERVICE_BUS:-rabbitmq}
- AzureServiceBusEnabled=False
webspa:
environment:
@ -113,9 +120,11 @@ services:
- ASPNETCORE_URLS=http://0.0.0.0:80
- CatalogUrl=http://catalog.api
- 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
- 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.
- 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"
@ -151,6 +160,7 @@ services:
- ASPNETCORE_ENVIRONMENT=Production
- ASPNETCORE_URLS=http://0.0.0.0:5108
- EventBusConnection=${ESHOP_AZURE_SERVICE_BUS:-rabbitmq}
- AzureServiceBusEnabled=False
ports:
- "5108:80"
@ -163,5 +173,6 @@ services:
- identityUrl=http://identity.api #Local: You need to open your local dev-machine firewall at range 5100-5110.
- IdentityUrlExternal=http://${ESHOP_PROD_EXTERNAL_DNS_NAME_OR_IP}:5105
- EventBusConnection=${ESHOP_AZURE_SERVICE_BUS:-rabbitmq}
- AzureServiceBusEnabled=False
ports:
- "5109:80"

+ 0
- 166
docker-compose.vs.debug.yml View File

@ -1,166 +0,0 @@
version: '2.1'
services:
basket.api:
image: eshop/basket.api:dev
build:
args:
source: ${DOCKER_BUILD_SOURCE}
environment:
- DOTNET_USE_POLLING_FILE_WATCHER=1
volumes:
- ./src/Services/Basket/Basket.API:/app
- ~/.nuget/packages:/root/.nuget/packages:ro
- ~/clrdbg:/clrdbg:ro
entrypoint: tail -f /dev/null
labels:
- "com.microsoft.visualstudio.targetoperatingsystem=linux"
catalog.api:
image: eshop/catalog.api:dev
build:
args:
source: ${DOCKER_BUILD_SOURCE}
environment:
- DOTNET_USE_POLLING_FILE_WATCHER=1
volumes:
- ./src/Services/Catalog/Catalog.API:/app
- ~/.nuget/packages:/root/.nuget/packages:ro
- ~/clrdbg:/clrdbg:ro
entrypoint: tail -f /dev/null
labels:
- "com.microsoft.visualstudio.targetoperatingsystem=linux"
identity.api:
image: eshop/identity.api:dev
build:
args:
source: ${DOCKER_BUILD_SOURCE}
environment:
- DOTNET_USE_POLLING_FILE_WATCHER=1
volumes:
- ./src/Services/Identity/Identity.API:/app
- ~/.nuget/packages:/root/.nuget/packages:ro
- ~/clrdbg:/clrdbg:ro
entrypoint: tail -f /dev/null
labels:
- "com.microsoft.visualstudio.targetoperatingsystem=linux"
ordering.api:
image: eshop/ordering.api:dev
build:
args:
source: ${DOCKER_BUILD_SOURCE}
environment:
- DOTNET_USE_POLLING_FILE_WATCHER=1
volumes:
- ./src/Services/Ordering/Ordering.API:/app
- ~/.nuget/packages:/root/.nuget/packages:ro
- ~/clrdbg:/clrdbg:ro
entrypoint: tail -f /dev/null
labels:
- "com.microsoft.visualstudio.targetoperatingsystem=linux"
marketing.api:
image: eshop/marketing.api:dev
build:
args:
source: ${DOCKER_BUILD_SOURCE}
environment:
- DOTNET_USE_POLLING_FILE_WATCHER=1
volumes:
- ./src/Services/Marketing/Marketing.API:/app
- ~/.nuget/packages:/root/.nuget/packages:ro
- ~/clrdbg:/clrdbg:ro
entrypoint: tail -f /dev/null
labels:
- "com.microsoft.visualstudio.targetoperatingsystem=linux"
webspa:
image: eshop/webspa:dev
build:
args:
source: ${DOCKER_BUILD_SOURCE}
environment:
- DOTNET_USE_POLLING_FILE_WATCHER=1
volumes:
- ./src/Web/WebSPA:/app
- ~/.nuget/packages:/root/.nuget/packages:ro
- ~/clrdbg:/clrdbg:ro
entrypoint: tail -f /dev/null
labels:
- "com.microsoft.visualstudio.targetoperatingsystem=linux"
webmvc:
image: eshop/webmvc:dev
build:
args:
source: ${DOCKER_BUILD_SOURCE}
environment:
- DOTNET_USE_POLLING_FILE_WATCHER=1
volumes:
- ./src/Web/WebMVC:/app
- ~/.nuget/packages:/root/.nuget/packages:ro
- ~/clrdbg:/clrdbg:ro
entrypoint: tail -f /dev/null
labels:
- "com.microsoft.visualstudio.targetoperatingsystem=linux"
webstatus:
image: eshop/webstatus:dev
build:
args:
source: ${DOCKER_BUILD_SOURCE}
environment:
- DOTNET_USE_POLLING_FILE_WATCHER=1
volumes:
- ./src/Web/WebStatus:/app
- ~/.nuget/packages:/root/.nuget/packages:ro
- ~/clrdbg:/clrdbg:ro
entrypoint: tail -f /dev/null
labels:
- "com.microsoft.visualstudio.targetoperatingsystem=linux"
payment.api:
image: eshop/payment.api:dev
build:
args:
source: ${DOCKER_BUILD_SOURCE}
environment:
- DOTNET_USE_POLLING_FILE_WATCHER=1
volumes:
- ./src/Services/Payment/Payment.API:/app
- ~/.nuget/packages:/root/.nuget/packages:ro
- ~/clrdbg:/clrdbg:ro
entrypoint: tail -f /dev/null
labels:
- "com.microsoft.visualstudio.targetoperatingsystem=linux"
graceperiodmanager:
image: eshop/graceperiodmanager:dev
build:
args:
source: ${DOCKER_BUILD_SOURCE}
volumes:
- ./src/Services/GracePeriod/GracePeriodManager:/app
- ~/.nuget/packages:/root/.nuget/packages:ro
- ~/clrdbg:/clrdbg:ro
entrypoint: tail -f /dev/null
labels:
- "com.microsoft.visualstudio.targetoperatingsystem=linux"
locations.api:
image: eshop/locations.api:dev
build:
args:
source: ${DOCKER_BUILD_SOURCE}
environment:
- DOTNET_USE_POLLING_FILE_WATCHER=1
volumes:
- ./src/Services/Location/Locations.API:/app
- ~/.nuget/packages:/root/.nuget/packages:ro
- ~/clrdbg:/clrdbg:ro
entrypoint: tail -f /dev/null
labels:
- "com.microsoft.visualstudio.targetoperatingsystem=linux"

+ 0
- 112
docker-compose.vs.release.yml View File

@ -1,112 +0,0 @@
version: '2.1'
services:
basket.api:
build:
args:
source: ${DOCKER_BUILD_SOURCE}
volumes:
- ~/clrdbg:/clrdbg:ro
entrypoint: tail -f /dev/null
labels:
- "com.microsoft.visualstudio.targetoperatingsystem=linux"
catalog.api:
build:
args:
source: ${DOCKER_BUILD_SOURCE}
volumes:
- ~/clrdbg:/clrdbg:ro
entrypoint: tail -f /dev/null
labels:
- "com.microsoft.visualstudio.targetoperatingsystem=linux"
identity.api:
build:
args:
source: ${DOCKER_BUILD_SOURCE}
volumes:
- ~/clrdbg:/clrdbg:ro
entrypoint: tail -f /dev/null
labels:
- "com.microsoft.visualstudio.targetoperatingsystem=linux"
ordering.api:
build:
args:
source: ${DOCKER_BUILD_SOURCE}
volumes:
- ~/clrdbg:/clrdbg:ro
entrypoint: tail -f /dev/null
labels:
- "com.microsoft.visualstudio.targetoperatingsystem=linux"
marketing.api:
build:
args:
source: ${DOCKER_BUILD_SOURCE}
volumes:
- ~/clrdbg:/clrdbg:ro
entrypoint: tail -f /dev/null
labels:
- "com.microsoft.visualstudio.targetoperatingsystem=linux"
webspa:
build:
args:
source: ${DOCKER_BUILD_SOURCE}
volumes:
- ~/clrdbg:/clrdbg:ro
entrypoint: tail -f /dev/null
labels:
- "com.microsoft.visualstudio.targetoperatingsystem=linux"
webmvc:
build:
args:
source: ${DOCKER_BUILD_SOURCE}
volumes:
- ~/clrdbg:/clrdbg:ro
entrypoint: tail -f /dev/null
labels:
- "com.microsoft.visualstudio.targetoperatingsystem=linux"
webstatus:
build:
args:
source: ${DOCKER_BUILD_SOURCE}
volumes:
- ~/clrdbg:/clrdbg:ro
entrypoint: tail -f /dev/null
labels:
- "com.microsoft.visualstudio.targetoperatingsystem=linux"
payment.api:
build:
args:
source: ${DOCKER_BUILD_SOURCE}
volumes:
- ~/clrdbg:/clrdbg:ro
entrypoint: tail -f /dev/null
labels:
- "com.microsoft.visualstudio.targetoperatingsystem=linux"
graceperiodmanager:
build:
args:
source: ${DOCKER_BUILD_SOURCE}
volumes:
- ~/clrdbg:/clrdbg:ro
entrypoint: tail -f /dev/null
labels:
- "com.microsoft.visualstudio.targetoperatingsystem=linux"
locations.api:
build:
args:
source: ${DOCKER_BUILD_SOURCE}
volumes:
- ~/clrdbg:/clrdbg:ro
entrypoint: tail -f /dev/null
labels:
- "com.microsoft.visualstudio.targetoperatingsystem=linux"

+ 20
- 16
docker-compose.yml View File

@ -64,8 +64,11 @@ services:
context: ./src/Web/WebSPA
dockerfile: Dockerfile
depends_on:
- catalog.api
- ordering.api
- identity.api
- basket.api
- marketing.api
webmvc:
image: eshop/webmvc:${TAG:-latest}
@ -79,22 +82,6 @@ services:
- basket.api
- marketing.api
sql.data:
image: microsoft/mssql-server-linux
nosql.data:
image: mongo
basket.data:
image: redis
ports:
- "6379:6379"
rabbitmq:
image: rabbitmq
ports:
- "5672:5672"
webstatus:
image: eshop/webstatus:${TAG:-latest}
build:
@ -117,3 +104,20 @@ services:
depends_on:
- nosql.data
- rabbitmq
sql.data:
image: microsoft/mssql-server-linux
nosql.data:
image: mongo
basket.data:
image: redis
ports:
- "6379:6379"
rabbitmq:
image: rabbitmq:3-management
ports:
- "15672:15672"
- "5672:5672"

+ 24
- 11
src/BuildingBlocks/EventBus/EventBusServiceBus/EventBusServiceBus.cs View File

@ -1,18 +1,17 @@
namespace Microsoft.eShopOnContainers.BuildingBlocks.EventBusServiceBus
{
using System;
using Autofac;
using Microsoft.Azure.ServiceBus;
using Microsoft.eShopOnContainers.BuildingBlocks.EventBus;
using Microsoft.eShopOnContainers.BuildingBlocks.EventBus.Abstractions;
using Microsoft.eShopOnContainers.BuildingBlocks.EventBus.Events;
using Microsoft.Extensions.Logging;
using Microsoft.Azure.ServiceBus;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using System;
using System.Reflection;
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
{
@ -129,11 +128,25 @@
_subscriptionClient.RegisterMessageHandler(
async (message, token) =>
{
var eventName = message.Label;
var eventName = $"{message.Label}{INTEGRATION_EVENT_SUFIX}";
var messageData = Encoding.UTF8.GetString(message.Body);
await ProcessEvent(eventName, messageData);
// Complete the message so that it is not received again.
await _subscriptionClient.CompleteAsync(message.SystemProperties.LockToken);
},
new MessageHandlerOptions() { MaxConcurrentCalls = 10, AutoComplete = true });
new MessageHandlerOptions(ExceptionReceivedHandler) { MaxConcurrentCalls = 10, AutoComplete = false });
}
private Task ExceptionReceivedHandler(ExceptionReceivedEventArgs exceptionReceivedEventArgs)
{
Console.WriteLine($"Message handler encountered an exception {exceptionReceivedEventArgs.Exception}.");
var context = exceptionReceivedEventArgs.ExceptionReceivedContext;
Console.WriteLine("Exception context for troubleshooting:");
Console.WriteLine($"- Endpoint: {context.Endpoint}");
Console.WriteLine($"- Entity Path: {context.EntityPath}");
Console.WriteLine($"- Executing Action: {context.Action}");
return Task.CompletedTask;
}
private async Task ProcessEvent(string eventName, string message)
@ -169,13 +182,13 @@
try
{
_subscriptionClient
.RemoveRuleAsync(SubscriptionClient.DefaultRule)
.RemoveRuleAsync(RuleDescription.DefaultRuleName)
.GetAwaiter()
.GetResult();
}
catch (MessagingEntityNotFoundException)
{
_logger.LogInformation($"The messaging entity {SubscriptionClient.DefaultRule} Could not be found.");
_logger.LogInformation($"The messaging entity { RuleDescription.DefaultRuleName } Could not be found.");
}
}
}


+ 1
- 1
src/BuildingBlocks/EventBus/EventBusServiceBus/EventBusServiceBus.csproj View File

@ -6,7 +6,7 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.Azure.ServiceBus" Version="0.0.5-preview" />
<PackageReference Include="Microsoft.Azure.ServiceBus" Version="1.0.0" />
<PackageReference Include="Microsoft.Extensions.Logging" Version="1.1.1" />
</ItemGroup>


+ 2
- 2
src/BuildingBlocks/HealthChecks/src/Microsoft.Extensions.HealthChecks.AzureStorage/AzureHealthCheckBuilderExtensions.cs View File

@ -70,7 +70,7 @@ namespace Microsoft.Extensions.HealthChecks
var properties = await tableClient.GetServicePropertiesAsync().ConfigureAwait(false);
if (String.IsNullOrWhiteSpace(tableName))
if (!String.IsNullOrWhiteSpace(tableName))
{
var table = tableClient.GetTableReference(tableName);
@ -150,7 +150,7 @@ namespace Microsoft.Extensions.HealthChecks
var properties = await queueClient.GetServicePropertiesAsync().ConfigureAwait(false);
if (String.IsNullOrWhiteSpace(queueName))
if (!String.IsNullOrWhiteSpace(queueName))
{
var queue = queueClient.GetQueueReference(queueName);


+ 125
- 5
src/Mobile/eShopOnContainers/eShopOnContainers.Core/App.xaml View File

@ -1,12 +1,11 @@
<?xml version="1.0" encoding="utf-8" ?>
<Application xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:light="clr-namespace:Xamarin.Forms.Themes;assembly=Xamarin.Forms.Theme.Light"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:converters="clr-namespace:eShopOnContainers.Core.Converters;assembly=eShopOnContainers.Core"
xmlns:behaviors="clr-namespace:eShopOnContainers.Core.Behaviors;assembly=eShopOnContainers.Core"
x:Class="eShopOnContainers.App">
<Application.Resources>
<ResourceDictionary MergedWith="light:LightThemeResources">
<ResourceDictionary>
<!-- COLORS -->
<Color x:Key="WhiteColor">#ffffff</Color>
@ -18,6 +17,69 @@
<Color x:Key="DarkGreenColor">#00857D</Color>
<Color x:Key="GrayColor">#e2e2e2</Color>
<Color x:Key="ErrorColor">#ff5252</Color>
<Color x:Key="TextColor">#757575</Color>
<Color x:Key="InverseTextColor">#FFFFFF</Color>
<Color x:Key="LightTextColor">#979797</Color>
<Color x:Key="iOSDefaultTintColor">#007aff</Color>
<Color x:Key="SeparatorLineColor">#CCCCCC</Color>
<Color x:Key="AndroidDefaultButtonClassBackgroundColor">#C9C9C9</Color>
<Color x:Key="iOSDefaultButtonClassBackgroundColor">Transparent</Color>
<Color x:Key="AndroidDefaultButtonClassBorderColor">Transparent</Color>
<Color x:Key="iOSDefaultButtonClassBorderColor">#007aff</Color>
<Color x:Key="AndroidDefaultButtonClassTextColor">#FFFFFF</Color>
<Color x:Key="iOSDefaultButtonClassTextColor">#007aff</Color>
<Color x:Key="AndroidEntryBackgroundColor">Transparent</Color>
<Color x:Key="iOSEntryBackgroundColor">#FFFFFF</Color>
<Color x:Key="AndroidDefaultAccentColorColor">#1FAECE</Color>
<Color x:Key="AndroidListViewBackgroundColor">Transparent</Color>
<Color x:Key="iOSListViewBackgroundColor">Transparent</Color>
<OnPlatform
x:TypeArguments="Color"
x:Key="ActivityIndicatorColor"
iOS="{ StaticResource iOSDefaultTintColor }" />
<OnPlatform
x:TypeArguments="Color"
x:Key="DefaultButtonClassBackgroundColor"
Android="{ StaticResource AndroidDefaultButtonClassBackgroundColor }"
iOS="{ StaticResource iOSDefaultButtonClassBackgroundColor }" />
<OnPlatform
x:TypeArguments="Color"
x:Key="DefaultButtonClassBorderColor"
Android="{ StaticResource AndroidDefaultButtonClassBorderColor }"
iOS="{ StaticResource iOSDefaultButtonClassBorderColor }" />
<OnPlatform
x:TypeArguments="Color"
x:Key="DefaultButtonClassTextColor"
Android="{ StaticResource AndroidDefaultButtonClassTextColor }"
iOS="{ StaticResource iOSDefaultButtonClassTextColor }" />
<OnPlatform
x:TypeArguments="Color"
x:Key="EntryBackgroundColor"
Android="{ StaticResource AndroidEntryBackgroundColor }"
iOS="{ StaticResource iOSEntryBackgroundColor }" />
<OnPlatform
x:TypeArguments="Color"
x:Key="ThemeListViewBackgroundColor"
Android="{ StaticResource AndroidListViewBackgroundColor }"
iOS="{ StaticResource iOSListViewBackgroundColor }" />
<!-- SIZES -->
<OnPlatform
x:TypeArguments="x:Double"
x:Key="BaseButtonBorderRadius"
iOS="6" />
<OnPlatform
x:TypeArguments="x:Double"
x:Key="BaseButtonBorderWidth"
Android="0"
iOS="0" />
<!-- FONTS -->
<OnPlatform
@ -41,7 +103,18 @@
Android="SourceSansPro-Regular.ttf#Source Sans Pro"
WinPhone="Assets/Fonts/SourceSansPro-Regular.ttf#Source Sans Pro"/>
<!-- FONT SIZES -->
<OnPlatform
x:TypeArguments="x:Double"
x:Key="BaseButtonFontSize"
Android="16"
iOS="18" />
<OnPlatform
x:TypeArguments="x:Double"
x:Key="BaseFontSize"
Android="15"
iOS="16" />
<OnPlatform
x:Key="LittleSize"
x:TypeArguments="x:Double"
@ -97,6 +170,12 @@
iOS="32"
Android="48"
WinPhone="48"/>
<OnPlatform
x:TypeArguments="FontAttributes"
x:Key="BaseButtonFontAttributes"
Android="None"
iOS="Bold" />
<!-- CONVERTERS -->
<converters:CountToBoolConverter x:Key="CountToBoolConverter" />
@ -108,7 +187,7 @@
<converters:ItemsToHeightConverter x:Key="ItemsToHeightConverter" />
<converters:ToUpperConverter x:Key="ToUpperConverter" />
<!-- STYLES -->
<!-- EXPLICIT STYLES -->
<Style x:Key="ValidationErrorLabelStyle"
TargetType="{x:Type Label}">
<Setter Property="TextColor"
@ -180,6 +259,47 @@
</Trigger>
</Style.Triggers>
</Style>
<!-- IMPLICIT STYLES -->
<Style TargetType="Button" ApplyToDerivedTypes="True" CanCascade="True">
<Setter Property="FontSize" Value="{ StaticResource BaseButtonFontSize }" />
<Setter Property="FontAttributes" Value="{ StaticResource BaseButtonFontAttributes }" />
<Setter Property="BorderRadius" Value="{ StaticResource BaseButtonBorderRadius }" />
<Setter Property="BorderWidth" Value="{ StaticResource BaseButtonBorderWidth }" />
<Setter Property="BackgroundColor" Value="{ StaticResource DefaultButtonClassBackgroundColor }" />
<Setter Property="BorderColor" Value="{ StaticResource DefaultButtonClassBorderColor }" />
<Setter Property="TextColor" Value="{ StaticResource DefaultButtonClassTextColor }" />
</Style>
<Style TargetType="Label" ApplyToDerivedTypes="True" CanCascade="True">
<Setter Property="FontSize" Value="{ StaticResource BaseFontSize }" />
</Style>
<Style TargetType="Entry" ApplyToDerivedTypes="True" CanCascade="True">
<Setter Property="TextColor" Value="{ StaticResource TextColor }" />
<Setter Property="PlaceholderColor" Value="{ StaticResource LightTextColor }" />
<Setter Property="BackgroundColor" Value="{ StaticResource EntryBackgroundColor }" />
</Style>
<Style TargetType="ImageCell" ApplyToDerivedTypes="True" CanCascade="True">
<Setter Property="TextColor" Value="{ StaticResource InverseTextColor }" />
<Setter Property="DetailColor" Value="{ StaticResource AccentColor }" />
</Style>
<Style TargetType="TextCell" ApplyToDerivedTypes="True" CanCascade="True">
<Setter Property="TextColor" Value="{ StaticResource InverseTextColor }" />
<Setter Property="DetailColor" Value="{ StaticResource AccentColor }" />
</Style>
<Style TargetType="ListView" ApplyToDerivedTypes="True" CanCascade="True">
<Setter Property="BackgroundColor" Value="{ StaticResource ThemeListViewBackgroundColor }" />
<Setter Property="SeparatorColor" Value="{ StaticResource SeparatorLineColor }" />
<Setter Property="SeparatorVisibility" Value="Default" />
</Style>
<Style TargetType="ActivityIndicator" ApplyToDerivedTypes="True" CanCascade="True">
<Setter Property="Color" Value="{ StaticResource ActivityIndicatorColor }" />
</Style>
<Style TargetType="NavigationPage">
<Setter Property="BarBackgroundColor" Value="{StaticResource GreenColor}"/>


+ 10
- 1
src/Mobile/eShopOnContainers/eShopOnContainers.Core/Controls/AddBasketButton.xaml View File

@ -1,11 +1,20 @@
<?xml version="1.0" encoding="UTF-8"?>
<?xml version="1.0" encoding="UTF-8"?>
<ContentView
xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:effects="clr-namespace:eShopOnContainers.Core.Effects"
x:Class="eShopOnContainers.Core.Controls.AddBasketButton">
<ContentView.Resources>
<ResourceDictionary>
<Style TargetType="BoxView" Class="Circle">
<Setter Property="BackgroundColor" Value="{ StaticResource AccentColor }" />
<Setter Property="WidthRequest" Value="34" />
<Setter Property="HeightRequest" Value="34" />
<Setter Property="HorizontalOptions" Value="Start" />
<Setter Property="effects:ThemeEffects.Circle" Value="True" />
</Style>
<Style x:Key="AddBackgroundImageStyle"
TargetType="{x:Type Image}">
<Setter Property="HorizontalOptions"


+ 54
- 0
src/Mobile/eShopOnContainers/eShopOnContainers.Core/Effects/ThemeEffects.cs View File

@ -0,0 +1,54 @@
using System.Collections.Generic;
using System.Linq;
using Xamarin.Forms;
namespace eShopOnContainers.Core.Effects
{
public static class ThemeEffects
{
public static readonly BindableProperty CircleProperty =
BindableProperty.CreateAttached("Circle", typeof(bool), typeof(ThemeEffects), false, propertyChanged: OnChanged<CircleEffect, bool>);
public static bool GetCircle(BindableObject view)
{
return (bool)view.GetValue(CircleProperty);
}
public static void SetCircle(BindableObject view, bool circle)
{
view.SetValue(CircleProperty, circle);
}
private static void OnChanged<TEffect, TProp>(BindableObject bindable, object oldValue, object newValue)
where TEffect : Effect, new()
{
var view = bindable as View;
if (view == null)
{
return;
}
if (EqualityComparer<TProp>.Equals(newValue, default(TProp)))
{
var toRemove = view.Effects.FirstOrDefault(e => e is TEffect);
if (toRemove != null)
{
view.Effects.Remove(toRemove);
}
}
else
{
view.Effects.Add(new TEffect());
}
}
private class CircleEffect : RoutingEffect
{
public CircleEffect()
: base("eShopOnContainers.CircleEffect")
{
}
}
}
}

+ 0
- 5
src/Mobile/eShopOnContainers/eShopOnContainers.Core/Views/LoginView.xaml View File

@ -151,11 +151,6 @@
<Label
Text="REGISTER"
TextColor="Gray"/>
<Grid.GestureRecognizers>
<TapGestureRecognizer
Command="{Binding RegisterCommand}"
NumberOfTapsRequired="1" />
</Grid.GestureRecognizers>
</Grid>
<StackLayout
Grid.Column="2"


+ 1
- 0
src/Mobile/eShopOnContainers/eShopOnContainers.Core/eShopOnContainers.Core.csproj View File

@ -192,6 +192,7 @@
<Compile Include="Effects\EntryLineColorEffect.cs" />
<Compile Include="Behaviors\LineColorBehavior.cs" />
<Compile Include="Models\Token\UserToken.cs" />
<Compile Include="Effects\ThemeEffects.cs" />
</ItemGroup>
<ItemGroup>
<None Include="app.config" />


+ 1
- 4
src/Mobile/eShopOnContainers/eShopOnContainers.Core/project.json View File

@ -16,10 +16,7 @@
"Xam.Plugins.Settings": "2.6.0.12-beta",
"Xamarin.FFImageLoading": "2.2.9",
"Xamarin.FFImageLoading.Forms": "2.2.9",
"Xamarin.Forms": "2.3.4.231",
"Xamarin.Forms.Pages": "2.3.4.231",
"Xamarin.Forms.Theme.Base": "1.0.0.43-pre1",
"Xamarin.Forms.Theme.Light": "1.0.0.43-pre1"
"Xamarin.Forms": "2.3.4.231"
},
"frameworks": {
".NETPortable,Version=v4.5,Profile=Profile111": {}


+ 1
- 4
src/Mobile/eShopOnContainers/eShopOnContainers.Droid/Activities/MainActivity.cs View File

@ -14,7 +14,7 @@ using Plugin.Permissions;
namespace eShopOnContainers.Droid.Activities
{
[Activity(
Label = "eShopOnContainers",
Label = "eShopOnContainers",
Icon = "@drawable/icon",
Theme = "@style/MainTheme",
MainLauncher = true,
@ -38,9 +38,6 @@ namespace eShopOnContainers.Droid.Activities
CachedImageRenderer.Init();
LoadApplication(new App());
var x = typeof(Xamarin.Forms.Themes.LightThemeResources);
x = typeof(Xamarin.Forms.Themes.Android.UnderlineEffect);
Window window = this.Window;
window.ClearFlags(WindowManagerFlags.TranslucentStatus);
window.AddFlags(WindowManagerFlags.DrawsSystemBarBackgrounds);


+ 66
- 0
src/Mobile/eShopOnContainers/eShopOnContainers.Droid/Effects/BaseContainerEffect.cs View File

@ -0,0 +1,66 @@
using Xamarin.Forms.Platform.Android;
namespace eShopOnContainers.Droid.Effects
{
public abstract class BaseContainerEffect : PlatformEffect
{
private bool _unloaded;
private bool _attached;
protected bool Attached
{
get { return _attached; }
}
protected virtual bool CanBeApplied()
{
return true;
}
protected virtual void OnAttachedInternal()
{
}
protected virtual void OnDetachedInternal()
{
}
protected sealed override void OnAttached()
{
if (CanBeApplied())
{
_attached = true;
Container.ViewDetachedFromWindow -= ContainerViewDetachedFromWindow;
Container.ViewDetachedFromWindow += ContainerViewDetachedFromWindow;
Container.ViewAttachedToWindow -= ContainerViewAttachedToWindow;
Container.ViewAttachedToWindow += ContainerViewAttachedToWindow;
OnAttachedInternal();
}
}
protected sealed override void OnDetached()
{
if (_attached && !_unloaded)
{
_attached = false;
Container.ViewDetachedFromWindow -= ContainerViewDetachedFromWindow;
Container.ViewAttachedToWindow -= ContainerViewAttachedToWindow;
OnDetachedInternal();
}
}
private void ContainerViewDetachedFromWindow(object sender, global::Android.Views.View.ViewDetachedFromWindowEventArgs e)
{
_unloaded = true;
}
private void ContainerViewAttachedToWindow(object sender, global::Android.Views.View.ViewAttachedToWindowEventArgs e)
{
_unloaded = false;
}
}
}

+ 54
- 0
src/Mobile/eShopOnContainers/eShopOnContainers.Droid/Effects/CircleEffect.cs View File

@ -0,0 +1,54 @@
using System;
using Xamarin.Forms;
using eShopOnContainers.Droid.Effects;
using Android.Views;
using Android.Graphics;
[assembly: ExportEffect(typeof(CircleEffect), "CircleEffect")]
namespace eShopOnContainers.Droid.Effects
{
public class CircleEffect : BaseContainerEffect
{
private ViewOutlineProvider _originalProvider;
protected override bool CanBeApplied()
{
return Container != null && (int)global::Android.OS.Build.VERSION.SdkInt >= 21;
}
protected override void OnAttachedInternal()
{
_originalProvider = Container.OutlineProvider;
Container.OutlineProvider = new CircleOutlineProvider();
Container.ClipToOutline = true;
}
protected override void OnDetachedInternal()
{
Container.ClipToOutline = false;
Container.OutlineProvider = _originalProvider;
}
private class CircleOutlineProvider : ViewOutlineProvider
{
public override void GetOutline(Android.Views.View view, Outline outline)
{
double width = view.Width;
double height = view.Height;
if (width <= 0 || height <= 0)
{
return;
}
double min = Math.Min(width, height);
var radius = (float)(min / 2.0);
var layerX = width > min ? (width - min) / 2 : 0;
var layerY = height > min ? (height - min) / 2 : 0;
outline.SetRoundRect(new Rect((int)layerX, (int)layerY, (int)(layerX + min), (int)(layerY + min)), radius);
}
}
}
}

+ 1
- 0
src/Mobile/eShopOnContainers/eShopOnContainers.Droid/Effects/EntryLineColorEffect.cs View File

@ -7,6 +7,7 @@ using eShopOnContainers.Core.Behaviors;
using System.ComponentModel;
using System.Diagnostics;
[assembly: ResolutionGroupName("eShopOnContainers")]
[assembly: ExportEffect(typeof(EntryLineColorEffect), "EntryLineColorEffect")]
namespace eShopOnContainers.Droid.Effects
{


+ 116
- 65
src/Mobile/eShopOnContainers/eShopOnContainers.Droid/Resources/Resource.Designer.cs View File

@ -1,15 +1,15 @@
#pragma warning disable 1591
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
// ------------------------------------------------------------------------------
// <autogenerated>
// This code was generated by a tool.
// Mono Runtime Version: 4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </autogenerated>
// ------------------------------------------------------------------------------
[assembly: global::Android.Runtime.ResourceDesignerAttribute("eShopOnContainers.Droid.Resource", IsApplication=true)]
[assembly: Android.Runtime.ResourceDesignerAttribute("eShopOnContainers.Droid.Resource", IsApplication=true)]
namespace eShopOnContainers.Droid
{
@ -64,6 +64,8 @@ namespace eShopOnContainers.Droid
global::AndroidHUD.Resource.Styleable.ProgressWheel_ahTextColor = global::eShopOnContainers.Droid.Resource.Styleable.ProgressWheel_ahTextColor;
global::AndroidHUD.Resource.Styleable.ProgressWheel_ahTextSize = global::eShopOnContainers.Droid.Resource.Styleable.ProgressWheel_ahTextSize;
global::ModernHttpClient.Resource.String.library_name = global::eShopOnContainers.Droid.Resource.String.library_name;
global::PCLCrypto.Resource.String.ApplicationName = global::eShopOnContainers.Droid.Resource.String.ApplicationName;
global::PCLCrypto.Resource.String.Hello = global::eShopOnContainers.Droid.Resource.String.Hello;
global::Splat.Resource.String.library_name = global::eShopOnContainers.Droid.Resource.String.library_name;
global::Xamarin.Forms.Platform.Android.Resource.Attribute.actionBarSize = global::eShopOnContainers.Droid.Resource.Attribute.actionBarSize;
}
@ -3126,11 +3128,11 @@ namespace eShopOnContainers.Droid
public partial class String
{
// aapt resource value: 0x7f080027
public const int ApplicationName = 2131230759;
// aapt resource value: 0x7f080028
public const int ApplicationName = 2131230760;
// aapt resource value: 0x7f080026
public const int Hello = 2131230758;
// aapt resource value: 0x7f080027
public const int Hello = 2131230759;
// aapt resource value: 0x7f08000f
public const int abc_action_bar_home_description = 2131230735;
@ -3198,8 +3200,8 @@ namespace eShopOnContainers.Droid
// aapt resource value: 0x7f080025
public const int character_counter_pattern = 2131230757;
// aapt resource value: 0x7f080028
public const int library_name = 2131230760;
// aapt resource value: 0x7f080026
public const int library_name = 2131230758;
// aapt resource value: 0x7f080000
public const int mr_button_content_description = 2131230720;
@ -4397,7 +4399,8 @@ namespace eShopOnContainers.Droid
public partial class Styleable
{
public static int[] ActionBar = new int[] {
public static int[] ActionBar = new int[]
{
2130772007,
2130772009,
2130772010,
@ -4507,13 +4510,15 @@ namespace eShopOnContainers.Droid
// aapt resource value: 5
public const int ActionBar_titleTextStyle = 5;
public static int[] ActionBarLayout = new int[] {
public static int[] ActionBarLayout = new int[]
{
16842931};
// aapt resource value: 0
public const int ActionBarLayout_android_layout_gravity = 0;
public static int[] ActionMenuItemView = new int[] {
public static int[] ActionMenuItemView = new int[]
{
16843071};
// aapt resource value: 0
@ -4521,7 +4526,8 @@ namespace eShopOnContainers.Droid
public static int[] ActionMenuView;
public static int[] ActionMode = new int[] {
public static int[] ActionMode = new int[]
{
2130772007,
2130772013,
2130772014,
@ -4547,7 +4553,8 @@ namespace eShopOnContainers.Droid
// aapt resource value: 1
public const int ActionMode_titleTextStyle = 1;
public static int[] ActivityChooserView = new int[] {
public static int[] ActivityChooserView = new int[]
{
2130772035,
2130772036};
@ -4557,7 +4564,8 @@ namespace eShopOnContainers.Droid
// aapt resource value: 0
public const int ActivityChooserView_initialActivityCount = 0;
public static int[] AlertDialog = new int[] {
public static int[] AlertDialog = new int[]
{
16842994,
2130772037,
2130772038,
@ -4583,7 +4591,8 @@ namespace eShopOnContainers.Droid
// aapt resource value: 4
public const int AlertDialog_singleChoiceItemLayout = 4;
public static int[] AppBarLayout = new int[] {
public static int[] AppBarLayout = new int[]
{
16842964,
2130772032,
2130772215};
@ -4597,7 +4606,8 @@ namespace eShopOnContainers.Droid
// aapt resource value: 2
public const int AppBarLayout_expanded = 2;
public static int[] AppBarLayout_LayoutParams = new int[] {
public static int[] AppBarLayout_LayoutParams = new int[]
{
2130772216,
2130772217};
@ -4607,7 +4617,8 @@ namespace eShopOnContainers.Droid
// aapt resource value: 1
public const int AppBarLayout_LayoutParams_layout_scrollInterpolator = 1;
public static int[] AppCompatImageView = new int[] {
public static int[] AppCompatImageView = new int[]
{
16843033,
2130772042};
@ -4617,7 +4628,8 @@ namespace eShopOnContainers.Droid
// aapt resource value: 1
public const int AppCompatImageView_srcCompat = 1;
public static int[] AppCompatTextView = new int[] {
public static int[] AppCompatTextView = new int[]
{
16842804,
2130772043};
@ -4627,7 +4639,8 @@ namespace eShopOnContainers.Droid
// aapt resource value: 1
public const int AppCompatTextView_textAllCaps = 1;
public static int[] AppCompatTheme = new int[] {
public static int[] AppCompatTheme = new int[]
{
16842839,
16842926,
2130772044,
@ -5077,7 +5090,8 @@ namespace eShopOnContainers.Droid
// aapt resource value: 3
public const int AppCompatTheme_windowNoTitle = 3;
public static int[] BottomSheetBehavior_Params = new int[] {
public static int[] BottomSheetBehavior_Params = new int[]
{
2130772218,
2130772219};
@ -5087,13 +5101,15 @@ namespace eShopOnContainers.Droid
// aapt resource value: 0
public const int BottomSheetBehavior_Params_behavior_peekHeight = 0;
public static int[] ButtonBarLayout = new int[] {
public static int[] ButtonBarLayout = new int[]
{
2130772154};
// aapt resource value: 0
public const int ButtonBarLayout_allowStacking = 0;
public static int[] CardView = new int[] {
public static int[] CardView = new int[]
{
16843071,
16843072,
2130771995,
@ -5147,7 +5163,8 @@ namespace eShopOnContainers.Droid
// aapt resource value: 11
public const int CardView_contentPaddingTop = 11;
public static int[] CollapsingAppBarLayout_LayoutParams = new int[] {
public static int[] CollapsingAppBarLayout_LayoutParams = new int[]
{
2130772220,
2130772221};
@ -5157,7 +5174,8 @@ namespace eShopOnContainers.Droid
// aapt resource value: 1
public const int CollapsingAppBarLayout_LayoutParams_layout_collapseParallaxMultiplier = 1;
public static int[] CollapsingToolbarLayout = new int[] {
public static int[] CollapsingToolbarLayout = new int[]
{
2130772009,
2130772222,
2130772223,
@ -5215,7 +5233,8 @@ namespace eShopOnContainers.Droid
// aapt resource value: 10
public const int CollapsingToolbarLayout_toolbarId = 10;
public static int[] CompoundButton = new int[] {
public static int[] CompoundButton = new int[]
{
16843015,
2130772155,
2130772156};
@ -5229,7 +5248,8 @@ namespace eShopOnContainers.Droid
// aapt resource value: 2
public const int CompoundButton_buttonTintMode = 2;
public static int[] CoordinatorLayout = new int[] {
public static int[] CoordinatorLayout = new int[]
{
2130772235,
2130772236};
@ -5239,7 +5259,8 @@ namespace eShopOnContainers.Droid
// aapt resource value: 1
public const int CoordinatorLayout_statusBarBackground = 1;
public static int[] CoordinatorLayout_LayoutParams = new int[] {
public static int[] CoordinatorLayout_LayoutParams = new int[]
{
16842931,
2130772237,
2130772238,
@ -5261,7 +5282,8 @@ namespace eShopOnContainers.Droid
// aapt resource value: 3
public const int CoordinatorLayout_LayoutParams_layout_keyline = 3;
public static int[] DesignTheme = new int[] {
public static int[] DesignTheme = new int[]
{
2130772241,
2130772242,
2130772243};
@ -5275,7 +5297,8 @@ namespace eShopOnContainers.Droid
// aapt resource value: 2
public const int DesignTheme_textColorError = 2;
public static int[] DrawerArrowToggle = new int[] {
public static int[] DrawerArrowToggle = new int[]
{
2130772157,
2130772158,
2130772159,
@ -5309,7 +5332,8 @@ namespace eShopOnContainers.Droid
// aapt resource value: 7
public const int DrawerArrowToggle_thickness = 7;
public static int[] FloatingActionButton = new int[] {
public static int[] FloatingActionButton = new int[]
{
2130772032,
2130772213,
2130772214,
@ -5343,7 +5367,8 @@ namespace eShopOnContainers.Droid
// aapt resource value: 7
public const int FloatingActionButton_useCompatPadding = 7;
public static int[] ForegroundLinearLayout = new int[] {
public static int[] ForegroundLinearLayout = new int[]
{
16843017,
16843264,
2130772249};
@ -5357,7 +5382,8 @@ namespace eShopOnContainers.Droid
// aapt resource value: 2
public const int ForegroundLinearLayout_foregroundInsidePadding = 2;
public static int[] LinearLayoutCompat = new int[] {
public static int[] LinearLayoutCompat = new int[]
{
16842927,
16842948,
16843046,
@ -5395,7 +5421,8 @@ namespace eShopOnContainers.Droid
// aapt resource value: 7
public const int LinearLayoutCompat_showDividers = 7;
public static int[] LinearLayoutCompat_Layout = new int[] {
public static int[] LinearLayoutCompat_Layout = new int[]
{
16842931,
16842996,
16842997,
@ -5413,7 +5440,8 @@ namespace eShopOnContainers.Droid
// aapt resource value: 1
public const int LinearLayoutCompat_Layout_android_layout_width = 1;
public static int[] ListPopupWindow = new int[] {
public static int[] ListPopupWindow = new int[]
{
16843436,
16843437};
@ -5423,7 +5451,8 @@ namespace eShopOnContainers.Droid
// aapt resource value: 1
public const int ListPopupWindow_android_dropDownVerticalOffset = 1;
public static int[] MediaRouteButton = new int[] {
public static int[] MediaRouteButton = new int[]
{
16843071,
16843072,
2130771994};
@ -5437,7 +5466,8 @@ namespace eShopOnContainers.Droid
// aapt resource value: 2
public const int MediaRouteButton_externalRouteEnabledDrawable = 2;
public static int[] MenuGroup = new int[] {
public static int[] MenuGroup = new int[]
{
16842766,
16842960,
16843156,
@ -5463,7 +5493,8 @@ namespace eShopOnContainers.Droid
// aapt resource value: 2
public const int MenuGroup_android_visible = 2;
public static int[] MenuItem = new int[] {
public static int[] MenuItem = new int[]
{
16842754,
16842766,
16842960,
@ -5533,7 +5564,8 @@ namespace eShopOnContainers.Droid
// aapt resource value: 13
public const int MenuItem_showAsAction = 13;
public static int[] MenuView = new int[] {
public static int[] MenuView = new int[]
{
16842926,
16843052,
16843053,
@ -5567,7 +5599,8 @@ namespace eShopOnContainers.Droid
// aapt resource value: 7
public const int MenuView_preserveIconSpacing = 7;
public static int[] NavigationView = new int[] {
public static int[] NavigationView = new int[]
{
16842964,
16842973,
16843039,
@ -5609,7 +5642,8 @@ namespace eShopOnContainers.Droid
// aapt resource value: 4
public const int NavigationView_menu = 4;
public static int[] PopupWindow = new int[] {
public static int[] PopupWindow = new int[]
{
16843126,
2130772173};
@ -5619,13 +5653,15 @@ namespace eShopOnContainers.Droid
// aapt resource value: 1
public const int PopupWindow_overlapAnchor = 1;
public static int[] PopupWindowBackgroundState = new int[] {
public static int[] PopupWindowBackgroundState = new int[]
{
2130772174};
// aapt resource value: 0
public const int PopupWindowBackgroundState_state_above_anchor = 0;
public static int[] ProgressWheel = new int[] {
public static int[] ProgressWheel = new int[]
{
2130772284,
2130772285,
2130772286,
@ -5675,7 +5711,8 @@ namespace eShopOnContainers.Droid
// aapt resource value: 2
public const int ProgressWheel_ahTextSize = 2;
public static int[] RecyclerView = new int[] {
public static int[] RecyclerView = new int[]
{
16842948,
2130771968,
2130771969,
@ -5697,19 +5734,22 @@ namespace eShopOnContainers.Droid
// aapt resource value: 4
public const int RecyclerView_stackFromEnd = 4;
public static int[] ScrimInsetsFrameLayout = new int[] {
public static int[] ScrimInsetsFrameLayout = new int[]
{
2130772256};
// aapt resource value: 0
public const int ScrimInsetsFrameLayout_insetForeground = 0;
public static int[] ScrollingViewBehavior_Params = new int[] {
public static int[] ScrollingViewBehavior_Params = new int[]
{
2130772257};
// aapt resource value: 0
public const int ScrollingViewBehavior_Params_behavior_overlapTop = 0;
public static int[] SearchView = new int[] {
public static int[] SearchView = new int[]
{
16842970,
16843039,
16843296,
@ -5779,7 +5819,8 @@ namespace eShopOnContainers.Droid
// aapt resource value: 12
public const int SearchView_voiceIcon = 12;
public static int[] SnackbarLayout = new int[] {
public static int[] SnackbarLayout = new int[]
{
16843039,
2130772032,
2130772258};
@ -5793,7 +5834,8 @@ namespace eShopOnContainers.Droid
// aapt resource value: 2
public const int SnackbarLayout_maxActionInlineWidth = 2;
public static int[] Spinner = new int[] {
public static int[] Spinner = new int[]
{
16842930,
16843126,
16843131,
@ -5815,7 +5857,8 @@ namespace eShopOnContainers.Droid
// aapt resource value: 4
public const int Spinner_popupTheme = 4;
public static int[] SwitchCompat = new int[] {
public static int[] SwitchCompat = new int[]
{
16843044,
16843045,
16843074,
@ -5857,7 +5900,8 @@ namespace eShopOnContainers.Droid
// aapt resource value: 3
public const int SwitchCompat_track = 3;
public static int[] TabItem = new int[] {
public static int[] TabItem = new int[]
{
16842754,
16842994,
16843087};
@ -5871,7 +5915,8 @@ namespace eShopOnContainers.Droid
// aapt resource value: 2
public const int TabItem_android_text = 2;
public static int[] TabLayout = new int[] {
public static int[] TabLayout = new int[]
{
2130772259,
2130772260,
2130772261,
@ -5937,7 +5982,8 @@ namespace eShopOnContainers.Droid
// aapt resource value: 9
public const int TabLayout_tabTextColor = 9;
public static int[] TextAppearance = new int[] {
public static int[] TextAppearance = new int[]
{
16842901,
16842902,
16842903,
@ -5975,7 +6021,8 @@ namespace eShopOnContainers.Droid
// aapt resource value: 8
public const int TextAppearance_textAllCaps = 8;
public static int[] TextInputLayout = new int[] {
public static int[] TextInputLayout = new int[]
{
16842906,
16843088,
2130772275,
@ -6021,7 +6068,8 @@ namespace eShopOnContainers.Droid
// aapt resource value: 2
public const int TextInputLayout_hintTextAppearance = 2;
public static int[] Toolbar = new int[] {
public static int[] Toolbar = new int[]
{
16842927,
16843072,
2130772009,
@ -6123,7 +6171,8 @@ namespace eShopOnContainers.Droid
// aapt resource value: 23
public const int Toolbar_titleTextColor = 23;
public static int[] View = new int[] {
public static int[] View = new int[]
{
16842752,
16842970,
2130772210,
@ -6145,7 +6194,8 @@ namespace eShopOnContainers.Droid
// aapt resource value: 4
public const int View_theme = 4;
public static int[] ViewBackgroundHelper = new int[] {
public static int[] ViewBackgroundHelper = new int[]
{
16842964,
2130772213,
2130772214};
@ -6159,7 +6209,8 @@ namespace eShopOnContainers.Droid
// aapt resource value: 2
public const int ViewBackgroundHelper_backgroundTintMode = 2;
public static int[] ViewStubCompat = new int[] {
public static int[] ViewStubCompat = new int[]
{
16842960,
16842994,
16842995};


+ 2
- 15
src/Mobile/eShopOnContainers/eShopOnContainers.Droid/eShopOnContainers.Droid.csproj View File

@ -199,18 +199,6 @@
<HintPath>..\..\..\..\packages\Xamarin.Android.Support.Vector.Drawable.23.3.0\lib\MonoAndroid403\Xamarin.Android.Support.Vector.Drawable.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Xamarin.Forms.Theme.Android">
<HintPath>..\..\..\..\packages\Xamarin.Forms.Theme.Base.1.0.0.43-pre1\lib\MonoAndroid10\Xamarin.Forms.Theme.Android.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Xamarin.Forms.Theme.Base">
<HintPath>..\..\..\..\packages\Xamarin.Forms.Theme.Base.1.0.0.43-pre1\lib\MonoAndroid10\Xamarin.Forms.Theme.Base.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Xamarin.Forms.Theme.Light">
<HintPath>..\..\..\..\packages\Xamarin.Forms.Theme.Light.1.0.0.43-pre1\lib\MonoAndroid10\Xamarin.Forms.Theme.Light.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="FormsViewGroup">
<HintPath>..\..\..\..\packages\Xamarin.Forms.2.3.4.231\lib\MonoAndroid10\FormsViewGroup.dll</HintPath>
</Reference>
@ -226,9 +214,6 @@
<Reference Include="Xamarin.Forms.Xaml">
<HintPath>..\..\..\..\packages\Xamarin.Forms.2.3.4.231\lib\MonoAndroid10\Xamarin.Forms.Xaml.dll</HintPath>
</Reference>
<Reference Include="Xamarin.Forms.Pages">
<HintPath>..\..\..\..\packages\Xamarin.Forms.Pages.2.3.4.231\lib\MonoAndroid10\Xamarin.Forms.Pages.dll</HintPath>
</Reference>
<Reference Include="System.IO.Compression" />
<Reference Include="Autofac">
<HintPath>..\..\..\..\packages\Autofac.4.5.0\lib\netstandard1.1\Autofac.dll</HintPath>
@ -247,6 +232,8 @@
<Compile Include="Renderers\SlideDownMenuPageRenderer.cs" />
<Compile Include="Resources\Resource.Designer.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Effects\CircleEffect.cs" />
<Compile Include="Effects\BaseContainerEffect.cs" />
</ItemGroup>
<ItemGroup>
<AndroidAsset Include="..\CommonResources\Fonts\Montserrat-Bold.ttf">


+ 0
- 3
src/Mobile/eShopOnContainers/eShopOnContainers.Droid/packages.config View File

@ -82,7 +82,4 @@
<package id="Xamarin.FFImageLoading" version="2.2.9" targetFramework="monoandroid60" />
<package id="Xamarin.FFImageLoading.Forms" version="2.2.9" targetFramework="monoandroid60" />
<package id="Xamarin.Forms" version="2.3.4.231" targetFramework="monoandroid60" />
<package id="Xamarin.Forms.Pages" version="2.3.4.231" targetFramework="monoandroid60" />
<package id="Xamarin.Forms.Theme.Base" version="1.0.0.43-pre1" targetFramework="monoandroid70" />
<package id="Xamarin.Forms.Theme.Light" version="1.0.0.43-pre1" targetFramework="monoandroid70" />
</packages>

+ 114
- 65
src/Mobile/eShopOnContainers/eShopOnContainers.TestRunner.Droid/Resources/Resource.Designer.cs View File

@ -1,15 +1,15 @@
#pragma warning disable 1591
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
// ------------------------------------------------------------------------------
// <autogenerated>
// This code was generated by a tool.
// Mono Runtime Version: 4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </autogenerated>
// ------------------------------------------------------------------------------
[assembly: global::Android.Runtime.ResourceDesignerAttribute("eShopOnContainers.TestRunner.Droid.Resource", IsApplication=true)]
[assembly: Android.Runtime.ResourceDesignerAttribute("eShopOnContainers.TestRunner.Droid.Resource", IsApplication=true)]
namespace eShopOnContainers.TestRunner.Droid
{
@ -3038,11 +3038,11 @@ namespace eShopOnContainers.TestRunner.Droid
public partial class String
{
// aapt resource value: 0x7f080027
public const int ApplicationName = 2131230759;
// aapt resource value: 0x7f080028
public const int ApplicationName = 2131230760;
// aapt resource value: 0x7f080026
public const int Hello = 2131230758;
// aapt resource value: 0x7f080027
public const int Hello = 2131230759;
// aapt resource value: 0x7f08000f
public const int abc_action_bar_home_description = 2131230735;
@ -3110,8 +3110,8 @@ namespace eShopOnContainers.TestRunner.Droid
// aapt resource value: 0x7f080025
public const int character_counter_pattern = 2131230757;
// aapt resource value: 0x7f080028
public const int library_name = 2131230760;
// aapt resource value: 0x7f080026
public const int library_name = 2131230758;
// aapt resource value: 0x7f080000
public const int mr_button_content_description = 2131230720;
@ -4297,7 +4297,8 @@ namespace eShopOnContainers.TestRunner.Droid
public partial class Styleable
{
public static int[] ActionBar = new int[] {
public static int[] ActionBar = new int[]
{
2130772007,
2130772009,
2130772010,
@ -4407,13 +4408,15 @@ namespace eShopOnContainers.TestRunner.Droid
// aapt resource value: 5
public const int ActionBar_titleTextStyle = 5;
public static int[] ActionBarLayout = new int[] {
public static int[] ActionBarLayout = new int[]
{
16842931};
// aapt resource value: 0
public const int ActionBarLayout_android_layout_gravity = 0;
public static int[] ActionMenuItemView = new int[] {
public static int[] ActionMenuItemView = new int[]
{
16843071};
// aapt resource value: 0
@ -4421,7 +4424,8 @@ namespace eShopOnContainers.TestRunner.Droid
public static int[] ActionMenuView;
public static int[] ActionMode = new int[] {
public static int[] ActionMode = new int[]
{
2130772007,
2130772013,
2130772014,
@ -4447,7 +4451,8 @@ namespace eShopOnContainers.TestRunner.Droid
// aapt resource value: 1
public const int ActionMode_titleTextStyle = 1;
public static int[] ActivityChooserView = new int[] {
public static int[] ActivityChooserView = new int[]
{
2130772035,
2130772036};
@ -4457,7 +4462,8 @@ namespace eShopOnContainers.TestRunner.Droid
// aapt resource value: 0
public const int ActivityChooserView_initialActivityCount = 0;
public static int[] AlertDialog = new int[] {
public static int[] AlertDialog = new int[]
{
16842994,
2130772037,
2130772038,
@ -4483,7 +4489,8 @@ namespace eShopOnContainers.TestRunner.Droid
// aapt resource value: 4
public const int AlertDialog_singleChoiceItemLayout = 4;
public static int[] AppBarLayout = new int[] {
public static int[] AppBarLayout = new int[]
{
16842964,
2130772032,
2130772215};
@ -4497,7 +4504,8 @@ namespace eShopOnContainers.TestRunner.Droid
// aapt resource value: 2
public const int AppBarLayout_expanded = 2;
public static int[] AppBarLayout_LayoutParams = new int[] {
public static int[] AppBarLayout_LayoutParams = new int[]
{
2130772216,
2130772217};
@ -4507,7 +4515,8 @@ namespace eShopOnContainers.TestRunner.Droid
// aapt resource value: 1
public const int AppBarLayout_LayoutParams_layout_scrollInterpolator = 1;
public static int[] AppCompatImageView = new int[] {
public static int[] AppCompatImageView = new int[]
{
16843033,
2130772042};
@ -4517,7 +4526,8 @@ namespace eShopOnContainers.TestRunner.Droid
// aapt resource value: 1
public const int AppCompatImageView_srcCompat = 1;
public static int[] AppCompatTextView = new int[] {
public static int[] AppCompatTextView = new int[]
{
16842804,
2130772043};
@ -4527,7 +4537,8 @@ namespace eShopOnContainers.TestRunner.Droid
// aapt resource value: 1
public const int AppCompatTextView_textAllCaps = 1;
public static int[] AppCompatTheme = new int[] {
public static int[] AppCompatTheme = new int[]
{
16842839,
16842926,
2130772044,
@ -4977,7 +4988,8 @@ namespace eShopOnContainers.TestRunner.Droid
// aapt resource value: 3
public const int AppCompatTheme_windowNoTitle = 3;
public static int[] BottomSheetBehavior_Params = new int[] {
public static int[] BottomSheetBehavior_Params = new int[]
{
2130772218,
2130772219};
@ -4987,13 +4999,15 @@ namespace eShopOnContainers.TestRunner.Droid
// aapt resource value: 0
public const int BottomSheetBehavior_Params_behavior_peekHeight = 0;
public static int[] ButtonBarLayout = new int[] {
public static int[] ButtonBarLayout = new int[]
{
2130772154};
// aapt resource value: 0
public const int ButtonBarLayout_allowStacking = 0;
public static int[] CardView = new int[] {
public static int[] CardView = new int[]
{
16843071,
16843072,
2130771995,
@ -5047,7 +5061,8 @@ namespace eShopOnContainers.TestRunner.Droid
// aapt resource value: 11
public const int CardView_contentPaddingTop = 11;
public static int[] CollapsingAppBarLayout_LayoutParams = new int[] {
public static int[] CollapsingAppBarLayout_LayoutParams = new int[]
{
2130772220,
2130772221};
@ -5057,7 +5072,8 @@ namespace eShopOnContainers.TestRunner.Droid
// aapt resource value: 1
public const int CollapsingAppBarLayout_LayoutParams_layout_collapseParallaxMultiplier = 1;
public static int[] CollapsingToolbarLayout = new int[] {
public static int[] CollapsingToolbarLayout = new int[]
{
2130772009,
2130772222,
2130772223,
@ -5115,7 +5131,8 @@ namespace eShopOnContainers.TestRunner.Droid
// aapt resource value: 10
public const int CollapsingToolbarLayout_toolbarId = 10;
public static int[] CompoundButton = new int[] {
public static int[] CompoundButton = new int[]
{
16843015,
2130772155,
2130772156};
@ -5129,7 +5146,8 @@ namespace eShopOnContainers.TestRunner.Droid
// aapt resource value: 2
public const int CompoundButton_buttonTintMode = 2;
public static int[] CoordinatorLayout = new int[] {
public static int[] CoordinatorLayout = new int[]
{
2130772235,
2130772236};
@ -5139,7 +5157,8 @@ namespace eShopOnContainers.TestRunner.Droid
// aapt resource value: 1
public const int CoordinatorLayout_statusBarBackground = 1;
public static int[] CoordinatorLayout_LayoutParams = new int[] {
public static int[] CoordinatorLayout_LayoutParams = new int[]
{
16842931,
2130772237,
2130772238,
@ -5161,7 +5180,8 @@ namespace eShopOnContainers.TestRunner.Droid
// aapt resource value: 3
public const int CoordinatorLayout_LayoutParams_layout_keyline = 3;
public static int[] DesignTheme = new int[] {
public static int[] DesignTheme = new int[]
{
2130772241,
2130772242,
2130772243};
@ -5175,7 +5195,8 @@ namespace eShopOnContainers.TestRunner.Droid
// aapt resource value: 2
public const int DesignTheme_textColorError = 2;
public static int[] DrawerArrowToggle = new int[] {
public static int[] DrawerArrowToggle = new int[]
{
2130772157,
2130772158,
2130772159,
@ -5209,7 +5230,8 @@ namespace eShopOnContainers.TestRunner.Droid
// aapt resource value: 7
public const int DrawerArrowToggle_thickness = 7;
public static int[] FloatingActionButton = new int[] {
public static int[] FloatingActionButton = new int[]
{
2130772032,
2130772213,
2130772214,
@ -5243,7 +5265,8 @@ namespace eShopOnContainers.TestRunner.Droid
// aapt resource value: 7
public const int FloatingActionButton_useCompatPadding = 7;
public static int[] ForegroundLinearLayout = new int[] {
public static int[] ForegroundLinearLayout = new int[]
{
16843017,
16843264,
2130772249};
@ -5257,7 +5280,8 @@ namespace eShopOnContainers.TestRunner.Droid
// aapt resource value: 2
public const int ForegroundLinearLayout_foregroundInsidePadding = 2;
public static int[] LinearLayoutCompat = new int[] {
public static int[] LinearLayoutCompat = new int[]
{
16842927,
16842948,
16843046,
@ -5295,7 +5319,8 @@ namespace eShopOnContainers.TestRunner.Droid
// aapt resource value: 7
public const int LinearLayoutCompat_showDividers = 7;
public static int[] LinearLayoutCompat_Layout = new int[] {
public static int[] LinearLayoutCompat_Layout = new int[]
{
16842931,
16842996,
16842997,
@ -5313,7 +5338,8 @@ namespace eShopOnContainers.TestRunner.Droid
// aapt resource value: 1
public const int LinearLayoutCompat_Layout_android_layout_width = 1;
public static int[] ListPopupWindow = new int[] {
public static int[] ListPopupWindow = new int[]
{
16843436,
16843437};
@ -5323,7 +5349,8 @@ namespace eShopOnContainers.TestRunner.Droid
// aapt resource value: 1
public const int ListPopupWindow_android_dropDownVerticalOffset = 1;
public static int[] MediaRouteButton = new int[] {
public static int[] MediaRouteButton = new int[]
{
16843071,
16843072,
2130771994};
@ -5337,7 +5364,8 @@ namespace eShopOnContainers.TestRunner.Droid
// aapt resource value: 2
public const int MediaRouteButton_externalRouteEnabledDrawable = 2;
public static int[] MenuGroup = new int[] {
public static int[] MenuGroup = new int[]
{
16842766,
16842960,
16843156,
@ -5363,7 +5391,8 @@ namespace eShopOnContainers.TestRunner.Droid
// aapt resource value: 2
public const int MenuGroup_android_visible = 2;
public static int[] MenuItem = new int[] {
public static int[] MenuItem = new int[]
{
16842754,
16842766,
16842960,
@ -5433,7 +5462,8 @@ namespace eShopOnContainers.TestRunner.Droid
// aapt resource value: 13
public const int MenuItem_showAsAction = 13;
public static int[] MenuView = new int[] {
public static int[] MenuView = new int[]
{
16842926,
16843052,
16843053,
@ -5467,7 +5497,8 @@ namespace eShopOnContainers.TestRunner.Droid
// aapt resource value: 7
public const int MenuView_preserveIconSpacing = 7;
public static int[] NavigationView = new int[] {
public static int[] NavigationView = new int[]
{
16842964,
16842973,
16843039,
@ -5509,7 +5540,8 @@ namespace eShopOnContainers.TestRunner.Droid
// aapt resource value: 4
public const int NavigationView_menu = 4;
public static int[] PopupWindow = new int[] {
public static int[] PopupWindow = new int[]
{
16843126,
2130772173};
@ -5519,13 +5551,15 @@ namespace eShopOnContainers.TestRunner.Droid
// aapt resource value: 1
public const int PopupWindow_overlapAnchor = 1;
public static int[] PopupWindowBackgroundState = new int[] {
public static int[] PopupWindowBackgroundState = new int[]
{
2130772174};
// aapt resource value: 0
public const int PopupWindowBackgroundState_state_above_anchor = 0;
public static int[] ProgressWheel = new int[] {
public static int[] ProgressWheel = new int[]
{
2130772284,
2130772285,
2130772286,
@ -5575,7 +5609,8 @@ namespace eShopOnContainers.TestRunner.Droid
// aapt resource value: 2
public const int ProgressWheel_ahTextSize = 2;
public static int[] RecyclerView = new int[] {
public static int[] RecyclerView = new int[]
{
16842948,
2130771968,
2130771969,
@ -5597,19 +5632,22 @@ namespace eShopOnContainers.TestRunner.Droid
// aapt resource value: 4
public const int RecyclerView_stackFromEnd = 4;
public static int[] ScrimInsetsFrameLayout = new int[] {
public static int[] ScrimInsetsFrameLayout = new int[]
{
2130772256};
// aapt resource value: 0
public const int ScrimInsetsFrameLayout_insetForeground = 0;
public static int[] ScrollingViewBehavior_Params = new int[] {
public static int[] ScrollingViewBehavior_Params = new int[]
{
2130772257};
// aapt resource value: 0
public const int ScrollingViewBehavior_Params_behavior_overlapTop = 0;
public static int[] SearchView = new int[] {
public static int[] SearchView = new int[]
{
16842970,
16843039,
16843296,
@ -5679,7 +5717,8 @@ namespace eShopOnContainers.TestRunner.Droid
// aapt resource value: 12
public const int SearchView_voiceIcon = 12;
public static int[] SnackbarLayout = new int[] {
public static int[] SnackbarLayout = new int[]
{
16843039,
2130772032,
2130772258};
@ -5693,7 +5732,8 @@ namespace eShopOnContainers.TestRunner.Droid
// aapt resource value: 2
public const int SnackbarLayout_maxActionInlineWidth = 2;
public static int[] Spinner = new int[] {
public static int[] Spinner = new int[]
{
16842930,
16843126,
16843131,
@ -5715,7 +5755,8 @@ namespace eShopOnContainers.TestRunner.Droid
// aapt resource value: 4
public const int Spinner_popupTheme = 4;
public static int[] SwitchCompat = new int[] {
public static int[] SwitchCompat = new int[]
{
16843044,
16843045,
16843074,
@ -5757,7 +5798,8 @@ namespace eShopOnContainers.TestRunner.Droid
// aapt resource value: 3
public const int SwitchCompat_track = 3;
public static int[] TabItem = new int[] {
public static int[] TabItem = new int[]
{
16842754,
16842994,
16843087};
@ -5771,7 +5813,8 @@ namespace eShopOnContainers.TestRunner.Droid
// aapt resource value: 2
public const int TabItem_android_text = 2;
public static int[] TabLayout = new int[] {
public static int[] TabLayout = new int[]
{
2130772259,
2130772260,
2130772261,
@ -5837,7 +5880,8 @@ namespace eShopOnContainers.TestRunner.Droid
// aapt resource value: 9
public const int TabLayout_tabTextColor = 9;
public static int[] TextAppearance = new int[] {
public static int[] TextAppearance = new int[]
{
16842901,
16842902,
16842903,
@ -5875,7 +5919,8 @@ namespace eShopOnContainers.TestRunner.Droid
// aapt resource value: 8
public const int TextAppearance_textAllCaps = 8;
public static int[] TextInputLayout = new int[] {
public static int[] TextInputLayout = new int[]
{
16842906,
16843088,
2130772275,
@ -5921,7 +5966,8 @@ namespace eShopOnContainers.TestRunner.Droid
// aapt resource value: 2
public const int TextInputLayout_hintTextAppearance = 2;
public static int[] Toolbar = new int[] {
public static int[] Toolbar = new int[]
{
16842927,
16843072,
2130772009,
@ -6023,7 +6069,8 @@ namespace eShopOnContainers.TestRunner.Droid
// aapt resource value: 23
public const int Toolbar_titleTextColor = 23;
public static int[] View = new int[] {
public static int[] View = new int[]
{
16842752,
16842970,
2130772210,
@ -6045,7 +6092,8 @@ namespace eShopOnContainers.TestRunner.Droid
// aapt resource value: 4
public const int View_theme = 4;
public static int[] ViewBackgroundHelper = new int[] {
public static int[] ViewBackgroundHelper = new int[]
{
16842964,
2130772213,
2130772214};
@ -6059,7 +6107,8 @@ namespace eShopOnContainers.TestRunner.Droid
// aapt resource value: 2
public const int ViewBackgroundHelper_backgroundTintMode = 2;
public static int[] ViewStubCompat = new int[] {
public static int[] ViewStubCompat = new int[]
{
16842960,
16842994,
16842995};


+ 0
- 12
src/Mobile/eShopOnContainers/eShopOnContainers.TestRunner.Droid/eShopOnContainers.TestRunner.Droid.csproj View File

@ -129,9 +129,6 @@
<Reference Include="Xamarin.Forms.Core, Version=2.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\..\..\packages\Xamarin.Forms.2.3.4.231\lib\MonoAndroid10\Xamarin.Forms.Core.dll</HintPath>
</Reference>
<Reference Include="Xamarin.Forms.Pages, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\..\..\packages\Xamarin.Forms.Pages.2.3.4.231\lib\MonoAndroid10\Xamarin.Forms.Pages.dll</HintPath>
</Reference>
<Reference Include="Xamarin.Forms.Platform, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\..\..\packages\Xamarin.Forms.2.3.4.231\lib\MonoAndroid10\Xamarin.Forms.Platform.dll</HintPath>
</Reference>
@ -215,15 +212,6 @@
<Reference Include="OkHttp">
<HintPath>..\..\..\..\packages\modernhttpclient.2.4.2\lib\MonoAndroid\OkHttp.dll</HintPath>
</Reference>
<Reference Include="Xamarin.Forms.Theme.Android">
<HintPath>..\..\..\..\packages\Xamarin.Forms.Theme.Base.1.0.0.43-pre1\lib\MonoAndroid10\Xamarin.Forms.Theme.Android.dll</HintPath>
</Reference>
<Reference Include="Xamarin.Forms.Theme.Base">
<HintPath>..\..\..\..\packages\Xamarin.Forms.Theme.Base.1.0.0.43-pre1\lib\MonoAndroid10\Xamarin.Forms.Theme.Base.dll</HintPath>
</Reference>
<Reference Include="Xamarin.Forms.Theme.Light">
<HintPath>..\..\..\..\packages\Xamarin.Forms.Theme.Light.1.0.0.43-pre1\lib\MonoAndroid10\Xamarin.Forms.Theme.Light.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
<Compile Include="MainActivity.cs" />


+ 0
- 3
src/Mobile/eShopOnContainers/eShopOnContainers.TestRunner.Droid/packages.config View File

@ -79,9 +79,6 @@
<package id="Xamarin.FFImageLoading" version="2.2.9" targetFramework="monoandroid60" />
<package id="Xamarin.FFImageLoading.Forms" version="2.2.9" targetFramework="monoandroid60" />
<package id="Xamarin.Forms" version="2.3.4.231" targetFramework="monoandroid60" />
<package id="Xamarin.Forms.Pages" version="2.3.4.231" targetFramework="monoandroid60" />
<package id="Xamarin.Forms.Theme.Base" version="1.0.0.43-pre1" targetFramework="monoandroid60" />
<package id="Xamarin.Forms.Theme.Light" version="1.0.0.43-pre1" targetFramework="monoandroid60" />
<package id="xunit.abstractions" version="2.0.0" targetFramework="monoandroid60" />
<package id="xunit.assert" version="2.2.0" targetFramework="monoandroid60" />
<package id="xunit.core" version="2.1.0" targetFramework="monoandroid60" />


+ 0
- 12
src/Mobile/eShopOnContainers/eShopOnContainers.TestRunner.iOS/eShopOnContainers.TestRunner.iOS.csproj View File

@ -139,9 +139,6 @@
<Reference Include="Xamarin.Forms.Core, Version=2.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\..\..\packages\Xamarin.Forms.2.3.4.231\lib\Xamarin.iOS10\Xamarin.Forms.Core.dll</HintPath>
</Reference>
<Reference Include="Xamarin.Forms.Pages, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\..\..\packages\Xamarin.Forms.Pages.2.3.4.231\lib\Xamarin.iOS10\Xamarin.Forms.Pages.dll</HintPath>
</Reference>
<Reference Include="Xamarin.Forms.Platform, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\..\..\packages\Xamarin.Forms.2.3.4.231\lib\Xamarin.iOS10\Xamarin.Forms.Platform.dll</HintPath>
</Reference>
@ -223,15 +220,6 @@
<Reference Include="ModernHttpClient">
<HintPath>..\..\..\..\packages\modernhttpclient.2.4.2\lib\Xamarin.iOS10\ModernHttpClient.dll</HintPath>
</Reference>
<Reference Include="Xamarin.Forms.Theme.Base">
<HintPath>..\..\..\..\packages\Xamarin.Forms.Theme.Base.1.0.0.43-pre1\lib\Xamarin.iOS10\Xamarin.Forms.Theme.Base.dll</HintPath>
</Reference>
<Reference Include="Xamarin.Forms.Theme.iOS">
<HintPath>..\..\..\..\packages\Xamarin.Forms.Theme.Base.1.0.0.43-pre1\lib\Xamarin.iOS10\Xamarin.Forms.Theme.iOS.dll</HintPath>
</Reference>
<Reference Include="Xamarin.Forms.Theme.Light">
<HintPath>..\..\..\..\packages\Xamarin.Forms.Theme.Light.1.0.0.43-pre1\lib\Xamarin.iOS10\Xamarin.Forms.Theme.Light.dll</HintPath>
</Reference>
<Reference Include="Plugin.Geolocator.Abstractions">
<HintPath>..\..\..\..\packages\Xam.Plugin.Geolocator.3.0.4\lib\Xamarin.iOS10\Plugin.Geolocator.Abstractions.dll</HintPath>
</Reference>


+ 0
- 3
src/Mobile/eShopOnContainers/eShopOnContainers.TestRunner.iOS/packages.config View File

@ -69,9 +69,6 @@
<package id="Xamarin.FFImageLoading" version="2.2.9" targetFramework="xamarinios10" />
<package id="Xamarin.FFImageLoading.Forms" version="2.2.9" targetFramework="xamarinios10" />
<package id="Xamarin.Forms" version="2.3.4.231" targetFramework="xamarinios10" />
<package id="Xamarin.Forms.Pages" version="2.3.4.231" targetFramework="xamarinios10" />
<package id="Xamarin.Forms.Theme.Base" version="1.0.0.43-pre1" targetFramework="xamarinios10" />
<package id="Xamarin.Forms.Theme.Light" version="1.0.0.43-pre1" targetFramework="xamarinios10" />
<package id="xunit.abstractions" version="2.0.0" targetFramework="xamarinios10" />
<package id="xunit.assert" version="2.2.0" targetFramework="xamarinios10" />
<package id="xunit.core" version="2.1.0" targetFramework="xamarinios10" />


+ 1
- 3
src/Mobile/eShopOnContainers/eShopOnContainers.Windows/project.json View File

@ -10,9 +10,7 @@
"Xam.Plugins.Settings": "2.6.0.12-beta",
"Xamarin.FFImageLoading": "2.2.9",
"Xamarin.FFImageLoading.Forms": "2.2.9",
"Xamarin.Forms": "2.3.4.231",
"Xamarin.Forms.Theme.Base": "1.0.0.43-pre1",
"Xamarin.Forms.Theme.Light": "1.0.0.43-pre1"
"Xamarin.Forms": "2.3.4.231"
},
"frameworks": {
"uap10.0": {}


+ 1
- 13
src/Mobile/eShopOnContainers/eShopOnContainers.iOS/AppDelegate.cs View File

@ -4,29 +4,17 @@ using UIKit;
namespace eShopOnContainers.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());
SlideOverKit.iOS.SlideOverKit.Init();
CachedImageRenderer.Init();
var x = typeof(Xamarin.Forms.Themes.LightThemeResources);
x = typeof(Xamarin.Forms.Themes.iOS.UnderlineEffect);
return base.FinishedLaunching(app, options);
}
}


+ 53
- 0
src/Mobile/eShopOnContainers/eShopOnContainers.iOS/Effects/CircleEffect.cs View File

@ -0,0 +1,53 @@
using System;
using Xamarin.Forms;
using Xamarin.Forms.Platform.iOS;
using eShopOnContainers.iOS.Effects;
using CoreGraphics;
using CoreAnimation;
[assembly: ExportEffect(typeof(CircleEffect), "CircleEffect")]
namespace eShopOnContainers.iOS.Effects
{
public class CircleEffect : PlatformEffect
{
protected override void OnAttached()
{
UpdateCircle();
}
protected override void OnDetached()
{
Container.Layer.Mask = null;
}
protected override void OnElementPropertyChanged(System.ComponentModel.PropertyChangedEventArgs args)
{
base.OnElementPropertyChanged(args);
if (args.PropertyName == VisualElement.WidthProperty.PropertyName ||
args.PropertyName == VisualElement.HeightProperty.PropertyName)
{
UpdateCircle();
}
}
private void UpdateCircle()
{
double width = ((VisualElement)Element).Width;
double height = ((VisualElement)Element).Height;
if (width <= 0 || height <= 0)
{
return;
}
double min = Math.Min(width, height);
var layerX = width > min ? (width - min) / 2 : 0;
var layerY = height > min ? (height - min) / 2 : 0;
var mask = new CAShapeLayer();
mask.Path = CGPath.EllipseFromRect(new CGRect(layerX, layerY, min, min));
Container.Layer.Mask = mask;
}
}
}

+ 1
- 15
src/Mobile/eShopOnContainers/eShopOnContainers.iOS/eShopOnContainers.iOS.csproj View File

@ -123,6 +123,7 @@
<ITunesArtwork Include="iTunesArtwork" />
<ITunesArtwork Include="iTunesArtwork@2x" />
<None Include="packages.config" />
<Compile Include="Effects\CircleEffect.cs" />
</ItemGroup>
<ItemGroup>
<BundleResource Include="Resources\Icon-60%403x.png" />
@ -219,18 +220,6 @@
<Reference Include="WebP.Touch, Version=1.0.6230.37678, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\..\..\packages\WebP.Touch.1.0.3\lib\Xamarin.iOS10\WebP.Touch.dll</HintPath>
</Reference>
<Reference Include="Xamarin.Forms.Theme.Base, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\..\..\packages\Xamarin.Forms.Theme.Base.1.0.0.43-pre1\lib\Xamarin.iOS10\Xamarin.Forms.Theme.Base.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Xamarin.Forms.Theme.iOS, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\..\..\packages\Xamarin.Forms.Theme.Base.1.0.0.43-pre1\lib\Xamarin.iOS10\Xamarin.Forms.Theme.iOS.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Xamarin.Forms.Theme.Light, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\..\..\packages\Xamarin.Forms.Theme.Light.1.0.0.43-pre1\lib\Xamarin.iOS10\Xamarin.Forms.Theme.Light.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Xamarin.iOS" />
<Reference Include="System.IO.Compression" />
<Reference Include="System.Net.Http" />
@ -249,9 +238,6 @@
<Reference Include="Xamarin.Forms.Xaml">
<HintPath>..\..\..\..\packages\Xamarin.Forms.2.3.4.231\lib\Xamarin.iOS10\Xamarin.Forms.Xaml.dll</HintPath>
</Reference>
<Reference Include="Xamarin.Forms.Pages">
<HintPath>..\..\..\..\packages\Xamarin.Forms.Pages.2.3.4.231\lib\Xamarin.iOS10\Xamarin.Forms.Pages.dll</HintPath>
</Reference>
<Reference Include="Plugin.Geolocator.Abstractions">
<HintPath>..\..\..\..\packages\Xam.Plugin.Geolocator.3.0.4\lib\Xamarin.iOS10\Plugin.Geolocator.Abstractions.dll</HintPath>
</Reference>


+ 0
- 3
src/Mobile/eShopOnContainers/eShopOnContainers.iOS/packages.config View File

@ -69,7 +69,4 @@
<package id="Xamarin.FFImageLoading" version="2.2.9" targetFramework="xamarinios10" />
<package id="Xamarin.FFImageLoading.Forms" version="2.2.9" targetFramework="xamarinios10" />
<package id="Xamarin.Forms" version="2.3.4.231" targetFramework="xamarinios10" />
<package id="Xamarin.Forms.Pages" version="2.3.4.231" targetFramework="xamarinios10" />
<package id="Xamarin.Forms.Theme.Base" version="1.0.0.43-pre1" targetFramework="xamarinios10" />
<package id="Xamarin.Forms.Theme.Light" version="1.0.0.43-pre1" targetFramework="xamarinios10" />
</packages>

+ 1
- 8
src/Services/Basket/Basket.API/Infrastructure/Filters/HttpGlobalExceptionFilter.cs View File

@ -8,7 +8,7 @@ using System.Net;
namespace Basket.API.Infrastructure.Filters
{
public class HttpGlobalExceptionFilter : IExceptionFilter
public partial class HttpGlobalExceptionFilter : IExceptionFilter
{
private readonly IHostingEnvironment env;
private readonly ILogger<HttpGlobalExceptionFilter> logger;
@ -52,12 +52,5 @@ namespace Basket.API.Infrastructure.Filters
}
context.ExceptionHandled = true;
}
private class JsonErrorResponse
{
public string[] Messages { get; set; }
public object DeveloperMessage { get; set; }
}
}
}

+ 9
- 0
src/Services/Basket/Basket.API/Infrastructure/Filters/JsonErrorResponse.cs View File

@ -0,0 +1,9 @@
namespace Basket.API.Infrastructure.Filters
{
public class JsonErrorResponse
{
public string[] Messages { get; set; }
public object DeveloperMessage { get; set; }
}
}

+ 30
- 0
src/Services/Basket/Basket.API/Infrastructure/Filters/ValidateModelStateFilter.cs View File

@ -0,0 +1,30 @@
using System.Linq;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.Filters;
namespace Basket.API.Infrastructure.Filters
{
public class ValidateModelStateFilter : ActionFilterAttribute
{
public override void OnActionExecuting(ActionExecutingContext context)
{
if (context.ModelState.IsValid)
{
return;
}
var validationErrors = context.ModelState
.Keys
.SelectMany(k => context.ModelState[k].Errors)
.Select(e => e.ErrorMessage)
.ToArray();
var json = new JsonErrorResponse
{
Messages = validationErrors
};
context.Result = new BadRequestObjectResult(json);
}
}
}

+ 16
- 2
src/Services/Basket/Basket.API/Model/BasketItem.cs View File

@ -1,6 +1,9 @@
namespace Microsoft.eShopOnContainers.Services.Basket.API.Model
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
namespace Microsoft.eShopOnContainers.Services.Basket.API.Model
{
public class BasketItem
public class BasketItem : IValidatableObject
{
public string Id { get; set; }
public string ProductId { get; set; }
@ -9,5 +12,16 @@
public decimal OldUnitPrice { get; set; }
public int Quantity { get; set; }
public string PictureUrl { get; set; }
public IEnumerable<ValidationResult> Validate(ValidationContext validationContext)
{
var results = new List<ValidationResult>();
if (Quantity < 1)
{
results.Add(new ValidationResult("Invalid number of units", new []{ "Quantity" }));
}
return results;
}
}
}

+ 1
- 0
src/Services/Basket/Basket.API/Startup.cs View File

@ -54,6 +54,7 @@ namespace Microsoft.eShopOnContainers.Services.Basket.API
services.AddMvc(options =>
{
options.Filters.Add(typeof(HttpGlobalExceptionFilter));
options.Filters.Add(typeof(ValidateModelStateFilter));
}).AddControllersAsServices();
services.AddHealthChecks(checks =>


BIN
src/Services/Catalog/Catalog.API/Setup/CatalogItems.zip View File


+ 1
- 1
src/Services/Identity/Identity.API/Startup.cs View File

@ -40,7 +40,7 @@ namespace eShopOnContainers.Identity
if (env.IsDevelopment())
{
// For more details on using the user secret store see http://go.microsoft.com/fwlink/?LinkID=532709
builder.AddUserSecrets();
builder.AddUserSecrets<Startup>();
}
builder.AddEnvironmentVariables();


+ 3
- 3
src/Services/Identity/Identity.API/Views/Shared/_Layout.cshtml View File

@ -7,11 +7,11 @@
<link rel="icon" type="image/x-icon" href="~/favicon.ico" />
<link rel="shortcut icon" type="image/x-icon" href="~/favicon.ico" />
<environment names="Development">
<link rel="stylesheet" href="~/lib/bootstrap/css/bootstrap.css" />
<link rel="stylesheet" href="~/lib/bootstrap/dist/css/bootstrap.css" />
<link rel="stylesheet" href="~/css/site.css" />
</environment>
<environment names="Staging,Production">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.0.0-alpha.5/css/bootstrap.min.css"
<link rel="stylesheet" href="https://ajax.aspnetcdn.com/ajax/bootstrap/3.3.7/css/bootstrap.min.css"
asp-fallback-href="~/lib/bootstrap/dist/css/bootstrap.min.css"
asp-fallback-test-class="sr-only" asp-fallback-test-property="position" asp-fallback-test-value="absolute" />
<link rel="stylesheet" href="~/css/site.min.css" asp-append-version="true" />
@ -49,7 +49,7 @@
<script src="~/lib/jquery/jquery.js"></script>
<script src="~/lib/bootstrap/js/bootstrap.js"></script>
<script src="~/lib/bootstrap/dist/js/bootstrap.js"></script>
@RenderSection("scripts", required: false)
</body>
</html>

+ 1
- 1
src/Services/Identity/Identity.API/bower.json View File

@ -2,7 +2,7 @@
"name": "asp.net",
"private": true,
"dependencies": {
"bootstrap": "3.3.6",
"bootstrap": "v3.3.7",
"jquery": "2.2.0",
"jquery-validation": "1.14.0",
"jquery-validation-unobtrusive": "3.2.6"


+ 9
- 8
src/Services/Identity/Identity.API/wwwroot/lib/bootstrap/.bower.json View File

@ -29,16 +29,17 @@
"test-infra"
],
"dependencies": {
"jquery": "1.9.1 - 2"
"jquery": "1.9.1 - 3"
},
"version": "3.3.6",
"_release": "3.3.6",
"version": "3.3.7",
"_release": "3.3.7",
"_resolution": {
"type": "version",
"tag": "v3.3.6",
"commit": "81df608a40bf0629a1dc08e584849bb1e43e0b7a"
"tag": "v3.3.7",
"commit": "0b9c4a4007c44201dce9a6cc1a38407005c26c86"
},
"_source": "git://github.com/twbs/bootstrap.git",
"_target": "3.3.6",
"_originalSource": "bootstrap"
"_source": "https://github.com/twbs/bootstrap.git",
"_target": "v3.3.7",
"_originalSource": "bootstrap",
"_direct": true
}

+ 1
- 1
src/Services/Identity/Identity.API/wwwroot/lib/bootstrap/LICENSE View File

@ -1,6 +1,6 @@
The MIT License (MIT)
Copyright (c) 2011-2015 Twitter, Inc
Copyright (c) 2011-2016 Twitter, Inc.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal


+ 0
- 6800
src/Services/Identity/Identity.API/wwwroot/lib/bootstrap/css/bootstrap.css
File diff suppressed because it is too large
View File


+ 0
- 1
src/Services/Identity/Identity.API/wwwroot/lib/bootstrap/css/bootstrap.css.map
File diff suppressed because it is too large
View File


+ 0
- 5
src/Services/Identity/Identity.API/wwwroot/lib/bootstrap/css/bootstrap.min.css
File diff suppressed because it is too large
View File


+ 2
- 2
src/Services/Identity/Identity.API/wwwroot/lib/bootstrap/dist/css/bootstrap-theme.css View File

@ -1,6 +1,6 @@
/*!
* Bootstrap v3.3.6 (http://getbootstrap.com)
* Copyright 2011-2015 Twitter, Inc.
* Bootstrap v3.3.7 (http://getbootstrap.com)
* Copyright 2011-2016 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
*/
.btn-default,


+ 1
- 1
src/Services/Identity/Identity.API/wwwroot/lib/bootstrap/dist/css/bootstrap-theme.css.map
File diff suppressed because it is too large
View File


+ 2
- 2
src/Services/Identity/Identity.API/wwwroot/lib/bootstrap/dist/css/bootstrap-theme.min.css
File diff suppressed because it is too large
View File


+ 1
- 1
src/Services/Identity/Identity.API/wwwroot/lib/bootstrap/dist/css/bootstrap-theme.min.css.map
File diff suppressed because it is too large
View File


+ 2
- 5
src/Services/Identity/Identity.API/wwwroot/lib/bootstrap/dist/css/bootstrap.css View File

@ -1,6 +1,6 @@
/*!
* Bootstrap v3.3.6 (http://getbootstrap.com)
* Copyright 2011-2015 Twitter, Inc.
* Bootstrap v3.3.7 (http://getbootstrap.com)
* Copyright 2011-2016 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
*/
/*! normalize.css v3.0.3 | MIT License | github.com/necolas/normalize.css */
@ -1106,7 +1106,6 @@ a:focus {
text-decoration: underline;
}
a:focus {
outline: thin dotted;
outline: 5px auto -webkit-focus-ring-color;
outline-offset: -2px;
}
@ -2537,7 +2536,6 @@ select[size] {
input[type="file"]:focus,
input[type="radio"]:focus,
input[type="checkbox"]:focus {
outline: thin dotted;
outline: 5px auto -webkit-focus-ring-color;
outline-offset: -2px;
}
@ -3029,7 +3027,6 @@ select[multiple].input-lg {
.btn.focus,
.btn:active.focus,
.btn.active.focus {
outline: thin dotted;
outline: 5px auto -webkit-focus-ring-color;
outline-offset: -2px;
}


+ 1
- 1
src/Services/Identity/Identity.API/wwwroot/lib/bootstrap/dist/css/bootstrap.css.map
File diff suppressed because it is too large
View File


+ 3
- 3
src/Services/Identity/Identity.API/wwwroot/lib/bootstrap/dist/css/bootstrap.min.css
File diff suppressed because it is too large
View File


+ 1
- 1
src/Services/Identity/Identity.API/wwwroot/lib/bootstrap/dist/css/bootstrap.min.css.map
File diff suppressed because it is too large
View File


+ 64
- 50
src/Services/Identity/Identity.API/wwwroot/lib/bootstrap/dist/js/bootstrap.js View File

@ -1,6 +1,6 @@
/*!
* Bootstrap v3.3.6 (http://getbootstrap.com)
* Copyright 2011-2015 Twitter, Inc.
* Bootstrap v3.3.7 (http://getbootstrap.com)
* Copyright 2011-2016 Twitter, Inc.
* Licensed under the MIT license
*/
@ -11,16 +11,16 @@ if (typeof jQuery === 'undefined') {
+function ($) {
'use strict';
var version = $.fn.jquery.split(' ')[0].split('.')
if ((version[0] < 2 && version[1] < 9) || (version[0] == 1 && version[1] == 9 && version[2] < 1) || (version[0] > 2)) {
throw new Error('Bootstrap\'s JavaScript requires jQuery version 1.9.1 or higher, but lower than version 3')
if ((version[0] < 2 && version[1] < 9) || (version[0] == 1 && version[1] == 9 && version[2] < 1) || (version[0] > 3)) {
throw new Error('Bootstrap\'s JavaScript requires jQuery version 1.9.1 or higher, but lower than version 4')
}
}(jQuery);
/* ========================================================================
* Bootstrap: transition.js v3.3.6
* Bootstrap: transition.js v3.3.7
* http://getbootstrap.com/javascript/#transitions
* ========================================================================
* Copyright 2011-2015 Twitter, Inc.
* Copyright 2011-2016 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* ======================================================================== */
@ -77,10 +77,10 @@ if (typeof jQuery === 'undefined') {
}(jQuery);
/* ========================================================================
* Bootstrap: alert.js v3.3.6
* Bootstrap: alert.js v3.3.7
* http://getbootstrap.com/javascript/#alerts
* ========================================================================
* Copyright 2011-2015 Twitter, Inc.
* Copyright 2011-2016 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* ======================================================================== */
@ -96,7 +96,7 @@ if (typeof jQuery === 'undefined') {
$(el).on('click', dismiss, this.close)
}
Alert.VERSION = '3.3.6'
Alert.VERSION = '3.3.7'
Alert.TRANSITION_DURATION = 150
@ -109,7 +109,7 @@ if (typeof jQuery === 'undefined') {
selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') // strip for ie7
}
var $parent = $(selector)
var $parent = $(selector === '#' ? [] : selector)
if (e) e.preventDefault()
@ -172,10 +172,10 @@ if (typeof jQuery === 'undefined') {
}(jQuery);
/* ========================================================================
* Bootstrap: button.js v3.3.6
* Bootstrap: button.js v3.3.7
* http://getbootstrap.com/javascript/#buttons
* ========================================================================
* Copyright 2011-2015 Twitter, Inc.
* Copyright 2011-2016 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* ======================================================================== */
@ -192,7 +192,7 @@ if (typeof jQuery === 'undefined') {
this.isLoading = false
}
Button.VERSION = '3.3.6'
Button.VERSION = '3.3.7'
Button.DEFAULTS = {
loadingText: 'loading...'
@ -214,10 +214,10 @@ if (typeof jQuery === 'undefined') {
if (state == 'loadingText') {
this.isLoading = true
$el.addClass(d).attr(d, d)
$el.addClass(d).attr(d, d).prop(d, true)
} else if (this.isLoading) {
this.isLoading = false
$el.removeClass(d).removeAttr(d)
$el.removeClass(d).removeAttr(d).prop(d, false)
}
}, this), 0)
}
@ -281,10 +281,15 @@ if (typeof jQuery === 'undefined') {
$(document)
.on('click.bs.button.data-api', '[data-toggle^="button"]', function (e) {
var $btn = $(e.target)
if (!$btn.hasClass('btn')) $btn = $btn.closest('.btn')
var $btn = $(e.target).closest('.btn')
Plugin.call($btn, 'toggle')
if (!($(e.target).is('input[type="radio"]') || $(e.target).is('input[type="checkbox"]'))) e.preventDefault()
if (!($(e.target).is('input[type="radio"], input[type="checkbox"]'))) {
// Prevent double click on radios, and the double selections (so cancellation) on checkboxes
e.preventDefault()
// The target component still receive the focus
if ($btn.is('input,button')) $btn.trigger('focus')
else $btn.find('input:visible,button:visible').first().trigger('focus')
}
})
.on('focus.bs.button.data-api blur.bs.button.data-api', '[data-toggle^="button"]', function (e) {
$(e.target).closest('.btn').toggleClass('focus', /^focus(in)?$/.test(e.type))
@ -293,10 +298,10 @@ if (typeof jQuery === 'undefined') {
}(jQuery);
/* ========================================================================
* Bootstrap: carousel.js v3.3.6
* Bootstrap: carousel.js v3.3.7
* http://getbootstrap.com/javascript/#carousel
* ========================================================================
* Copyright 2011-2015 Twitter, Inc.
* Copyright 2011-2016 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* ======================================================================== */
@ -324,7 +329,7 @@ if (typeof jQuery === 'undefined') {
.on('mouseleave.bs.carousel', $.proxy(this.cycle, this))
}
Carousel.VERSION = '3.3.6'
Carousel.VERSION = '3.3.7'
Carousel.TRANSITION_DURATION = 600
@ -531,13 +536,14 @@ if (typeof jQuery === 'undefined') {
}(jQuery);
/* ========================================================================
* Bootstrap: collapse.js v3.3.6
* Bootstrap: collapse.js v3.3.7
* http://getbootstrap.com/javascript/#collapse
* ========================================================================
* Copyright 2011-2015 Twitter, Inc.
* Copyright 2011-2016 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* ======================================================================== */
/* jshint latedef: false */
+function ($) {
'use strict';
@ -561,7 +567,7 @@ if (typeof jQuery === 'undefined') {
if (this.options.toggle) this.toggle()
}
Collapse.VERSION = '3.3.6'
Collapse.VERSION = '3.3.7'
Collapse.TRANSITION_DURATION = 350
@ -743,10 +749,10 @@ if (typeof jQuery === 'undefined') {
}(jQuery);
/* ========================================================================
* Bootstrap: dropdown.js v3.3.6
* Bootstrap: dropdown.js v3.3.7
* http://getbootstrap.com/javascript/#dropdowns
* ========================================================================
* Copyright 2011-2015 Twitter, Inc.
* Copyright 2011-2016 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* ======================================================================== */
@ -763,7 +769,7 @@ if (typeof jQuery === 'undefined') {
$(element).on('click.bs.dropdown', this.toggle)
}
Dropdown.VERSION = '3.3.6'
Dropdown.VERSION = '3.3.7'
function getParent($this) {
var selector = $this.attr('data-target')
@ -909,10 +915,10 @@ if (typeof jQuery === 'undefined') {
}(jQuery);
/* ========================================================================
* Bootstrap: modal.js v3.3.6
* Bootstrap: modal.js v3.3.7
* http://getbootstrap.com/javascript/#modals
* ========================================================================
* Copyright 2011-2015 Twitter, Inc.
* Copyright 2011-2016 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* ======================================================================== */
@ -943,7 +949,7 @@ if (typeof jQuery === 'undefined') {
}
}
Modal.VERSION = '3.3.6'
Modal.VERSION = '3.3.7'
Modal.TRANSITION_DURATION = 300
Modal.BACKDROP_TRANSITION_DURATION = 150
@ -1050,7 +1056,9 @@ if (typeof jQuery === 'undefined') {
$(document)
.off('focusin.bs.modal') // guard against infinite focus loop
.on('focusin.bs.modal', $.proxy(function (e) {
if (this.$element[0] !== e.target && !this.$element.has(e.target).length) {
if (document !== e.target &&
this.$element[0] !== e.target &&
!this.$element.has(e.target).length) {
this.$element.trigger('focus')
}
}, this))
@ -1247,11 +1255,11 @@ if (typeof jQuery === 'undefined') {
}(jQuery);
/* ========================================================================
* Bootstrap: tooltip.js v3.3.6
* Bootstrap: tooltip.js v3.3.7
* http://getbootstrap.com/javascript/#tooltip
* Inspired by the original jQuery.tipsy by Jason Frame
* ========================================================================
* Copyright 2011-2015 Twitter, Inc.
* Copyright 2011-2016 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* ======================================================================== */
@ -1274,7 +1282,7 @@ if (typeof jQuery === 'undefined') {
this.init('tooltip', element, options)
}
Tooltip.VERSION = '3.3.6'
Tooltip.VERSION = '3.3.7'
Tooltip.TRANSITION_DURATION = 150
@ -1565,9 +1573,11 @@ if (typeof jQuery === 'undefined') {
function complete() {
if (that.hoverState != 'in') $tip.detach()
that.$element
.removeAttr('aria-describedby')
.trigger('hidden.bs.' + that.type)
if (that.$element) { // TODO: Check whether guarding this code with this `if` is really necessary.
that.$element
.removeAttr('aria-describedby')
.trigger('hidden.bs.' + that.type)
}
callback && callback()
}
@ -1610,7 +1620,10 @@ if (typeof jQuery === 'undefined') {
// width and height are missing in IE8, so compute them manually; see https://github.com/twbs/bootstrap/issues/14093
elRect = $.extend({}, elRect, { width: elRect.right - elRect.left, height: elRect.bottom - elRect.top })
}
var elOffset = isBody ? { top: 0, left: 0 } : $element.offset()
var isSvg = window.SVGElement && el instanceof window.SVGElement
// Avoid using $.offset() on SVGs since it gives incorrect results in jQuery 3.
// See https://github.com/twbs/bootstrap/issues/20280
var elOffset = isBody ? { top: 0, left: 0 } : (isSvg ? null : $element.offset())
var scroll = { scroll: isBody ? document.documentElement.scrollTop || document.body.scrollTop : $element.scrollTop() }
var outerDims = isBody ? { width: $(window).width(), height: $(window).height() } : null
@ -1726,6 +1739,7 @@ if (typeof jQuery === 'undefined') {
that.$tip = null
that.$arrow = null
that.$viewport = null
that.$element = null
})
}
@ -1762,10 +1776,10 @@ if (typeof jQuery === 'undefined') {
}(jQuery);
/* ========================================================================
* Bootstrap: popover.js v3.3.6
* Bootstrap: popover.js v3.3.7
* http://getbootstrap.com/javascript/#popovers
* ========================================================================
* Copyright 2011-2015 Twitter, Inc.
* Copyright 2011-2016 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* ======================================================================== */
@ -1782,7 +1796,7 @@ if (typeof jQuery === 'undefined') {
if (!$.fn.tooltip) throw new Error('Popover requires tooltip.js')
Popover.VERSION = '3.3.6'
Popover.VERSION = '3.3.7'
Popover.DEFAULTS = $.extend({}, $.fn.tooltip.Constructor.DEFAULTS, {
placement: 'right',
@ -1871,10 +1885,10 @@ if (typeof jQuery === 'undefined') {
}(jQuery);
/* ========================================================================
* Bootstrap: scrollspy.js v3.3.6
* Bootstrap: scrollspy.js v3.3.7
* http://getbootstrap.com/javascript/#scrollspy
* ========================================================================
* Copyright 2011-2015 Twitter, Inc.
* Copyright 2011-2016 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* ======================================================================== */
@ -1900,7 +1914,7 @@ if (typeof jQuery === 'undefined') {
this.process()
}
ScrollSpy.VERSION = '3.3.6'
ScrollSpy.VERSION = '3.3.7'
ScrollSpy.DEFAULTS = {
offset: 10
@ -2044,10 +2058,10 @@ if (typeof jQuery === 'undefined') {
}(jQuery);
/* ========================================================================
* Bootstrap: tab.js v3.3.6
* Bootstrap: tab.js v3.3.7
* http://getbootstrap.com/javascript/#tabs
* ========================================================================
* Copyright 2011-2015 Twitter, Inc.
* Copyright 2011-2016 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* ======================================================================== */
@ -2064,7 +2078,7 @@ if (typeof jQuery === 'undefined') {
// jscs:enable requireDollarBeforejQueryAssignment
}
Tab.VERSION = '3.3.6'
Tab.VERSION = '3.3.7'
Tab.TRANSITION_DURATION = 150
@ -2200,10 +2214,10 @@ if (typeof jQuery === 'undefined') {
}(jQuery);
/* ========================================================================
* Bootstrap: affix.js v3.3.6
* Bootstrap: affix.js v3.3.7
* http://getbootstrap.com/javascript/#affix
* ========================================================================
* Copyright 2011-2015 Twitter, Inc.
* Copyright 2011-2016 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* ======================================================================== */
@ -2229,7 +2243,7 @@ if (typeof jQuery === 'undefined') {
this.checkPosition()
}
Affix.VERSION = '3.3.6'
Affix.VERSION = '3.3.7'
Affix.RESET = 'affix affix-top affix-bottom'


+ 4
- 4
src/Services/Identity/Identity.API/wwwroot/lib/bootstrap/dist/js/bootstrap.min.js
File diff suppressed because it is too large
View File


+ 0
- 2363
src/Services/Identity/Identity.API/wwwroot/lib/bootstrap/js/bootstrap.js
File diff suppressed because it is too large
View File


+ 0
- 7
src/Services/Identity/Identity.API/wwwroot/lib/bootstrap/js/bootstrap.min.js
File diff suppressed because it is too large
View File


+ 0
- 1
src/Services/Location/Locations.API/Locations.API.csproj View File

@ -12,7 +12,6 @@
<ItemGroup>
<PackageReference Include="Autofac.Extensions.DependencyInjection" Version="4.1.0" />
<PackageReference Include="IdentityServer4.AccessTokenValidation" Version="1.2.0" />
<PackageReference Include="Microsoft.ApplicationInsights.AspNetCore" Version="2.0.0" />
<PackageReference Include="Microsoft.AspNetCore" Version="1.1.2" />
<PackageReference Include="Microsoft.AspNetCore.Mvc" Version="1.1.3" />
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="1.1.2" />


+ 1
- 6
src/Services/Location/Locations.API/Program.cs View File

@ -1,8 +1,4 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Threading.Tasks;
using System.IO;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
@ -17,7 +13,6 @@ namespace Microsoft.eShopOnContainers.Services.Locations.API
.UseHealthChecks("/hc")
.UseContentRoot(Directory.GetCurrentDirectory())
.UseStartup<Startup>()
.UseApplicationInsights()
.Build();
host.Run();


+ 7
- 1
src/Services/Ordering/Ordering.Domain/AggregatesModel/OrderAggregate/Order.cs View File

@ -72,8 +72,9 @@ namespace Microsoft.eShopOnContainers.Services.Ordering.Domain.AggregatesModel.O
if (discount > existingOrderForProduct.GetCurrentDiscount())
{
existingOrderForProduct.SetNewDiscount(discount);
existingOrderForProduct.AddUnits(units);
}
existingOrderForProduct.AddUnits(units);
}
else
{
@ -187,6 +188,11 @@ namespace Microsoft.eShopOnContainers.Services.Ordering.Domain.AggregatesModel.O
{
throw new OrderingDomainException($"Not possible to change order status from {OrderStatus.Name} to {orderStatusToChange.Name}.");
}
public decimal GetTotal()
{
return _orderItems.Sum(o => o.GetUnits() * o.GetUnitPrice());
}
}
}

+ 5
- 0
src/Services/Ordering/Ordering.Domain/AggregatesModel/OrderAggregate/OrderItem.cs View File

@ -59,6 +59,11 @@ namespace Microsoft.eShopOnContainers.Services.Ordering.Domain.AggregatesModel.O
return _units;
}
public decimal GetUnitPrice()
{
return _unitPrice;
}
public string GetOrderItemProductName() => _productName;
public void SetNewDiscount(decimal discount)


+ 0
- 1
src/Services/Payment/Payment.API/Payment.API.csproj View File

@ -11,7 +11,6 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="Autofac.Extensions.DependencyInjection" Version="4.1.0" />
<PackageReference Include="Microsoft.ApplicationInsights.AspNetCore" Version="2.0.0" />
<PackageReference Include="Microsoft.AspNetCore" Version="1.1.2" />
<PackageReference Include="Microsoft.AspNetCore.Mvc" Version="1.1.3" />
<PackageReference Include="Microsoft.AspNetCore.StaticFiles" Version="1.1.2" />


+ 1
- 6
src/Services/Payment/Payment.API/Program.cs View File

@ -1,8 +1,4 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Threading.Tasks;
using System.IO;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
@ -16,7 +12,6 @@ namespace Payment.API
.UseKestrel()
.UseContentRoot(Directory.GetCurrentDirectory())
.UseStartup<Startup>()
.UseApplicationInsights()
.Build();
host.Run();


+ 0
- 8
src/Web/WebMVC/Controllers/AccountController.cs View File

@ -1,8 +1,6 @@
using System.Security.Claims;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using Microsoft.eShopOnContainers.WebMVC.ViewModels;
using Microsoft.eShopOnContainers.WebMVC.Services;
using Microsoft.AspNetCore.Http.Authentication;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Authentication;
@ -12,12 +10,6 @@ namespace Microsoft.eShopOnContainers.WebMVC.Controllers
[Authorize]
public class AccountController : Controller
{
private readonly IIdentityParser<ApplicationUser> _identityParser;
public AccountController(IIdentityParser<ApplicationUser> identityParser) =>
_identityParser = identityParser;
public ActionResult Index() => View();
[Authorize]
public async Task<IActionResult> SignIn(string returnUrl)
{


+ 1
- 7
src/Web/WebMVC/Controllers/CatalogController.cs View File

@ -1,13 +1,10 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;
using Microsoft.eShopOnContainers.WebMVC.ViewModels.Pagination;
using Microsoft.eShopOnContainers.WebMVC.Services;
using Microsoft.eShopOnContainers.WebMVC.ViewModels.CatalogViewModels;
namespace Microsoft.eShopOnContainers.WebMVC.Controllers
{
public class CatalogController : Controller
@ -42,8 +39,5 @@ namespace Microsoft.eShopOnContainers.WebMVC.Controllers
return View(vm);
}
public IActionResult Error() => View();
}
}
}

+ 9
- 0
src/Web/WebMVC/Controllers/ErrorController.cs View File

@ -0,0 +1,9 @@
using Microsoft.AspNetCore.Mvc;
namespace WebMVC.Controllers
{
public class ErrorController : Controller
{
public IActionResult Error() => View();
}
}

+ 6
- 2
src/Web/WebMVC/Startup.cs View File

@ -29,7 +29,7 @@ namespace Microsoft.eShopOnContainers.WebMVC
if (env.IsDevelopment())
{
// For more details on using the user secret store see http://go.microsoft.com/fwlink/?LinkID=532709
builder.AddUserSecrets();
builder.AddUserSecrets<Startup>();
}
Configuration = builder.Build();
@ -102,7 +102,7 @@ namespace Microsoft.eShopOnContainers.WebMVC
}
else
{
app.UseExceptionHandler("/Catalog/Error");
app.UseExceptionHandler("/Error");
}
app.UseSession();
@ -145,6 +145,10 @@ namespace Microsoft.eShopOnContainers.WebMVC
routes.MapRoute(
name: "default",
template: "{controller=Catalog}/{action=Index}/{id?}");
routes.MapRoute(
name: "defaultError",
template: "{controller=Error}/{action=Error}");
});
}
}


+ 0
- 64
src/Web/WebMVC/Views/Account/Login.cshtml View File

@ -1,64 +0,0 @@
@using System.Collections.Generic
@using Microsoft.AspNetCore.Http
@using Microsoft.AspNetCore.Http.Authentication
@model LoginViewModel
@inject SignInManager<ApplicationUser> SignInManager
@{
ViewData["Title"] = "Log in";
}
<div class="brand-header-block">
<ul class="container">
<li><a asp-area="" asp-controller="Account" asp-action="Register">REGISTER</a></li>
<li class="active" style="margin-right: 65px;">LOGIN</li>
</ul>
</div>
<div class="container account-login-container">
<div class="row">
<div class="col-md-12">
<section>
<form asp-controller="Account" asp-action="Login" asp-route-returnurl="@ViewData["ReturnUrl"]" method="post" class="form-horizontal">
<h4>ARE YOU REGISTERED?</h4>
<div asp-validation-summary="All" class="text-danger"></div>
<div class="form-group">
<label asp-for="Email" class="control-label form-label"></label>
<input asp-for="Email" class="form-control form-input form-input-center" />
<span asp-validation-for="Email" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="Password" class="control-label form-label"></label>
<input asp-for="Password" class="form-control form-input form-input-center" />
<span asp-validation-for="Password" class="text-danger"></span>
</div>
<div class="form-group">
<div class="checkbox">
<label asp-for="RememberMe">
<input asp-for="RememberMe" />
@Html.DisplayNameFor(m => m.RememberMe)
</label>
</div>
</div>
<div class="form-group">
<button type="submit" class="btn btn-default btn-brand btn-brand-big">&nbsp;LOG IN&nbsp;</button>
</div>
<p>
<a asp-action="Register" asp-route-returnurl="@ViewData["ReturnUrl"]" class="text">Register as a new user?</a>
</p>
<p>
Note that for demo purposes you don't need to register and can login with these credentials:
</p>
<p>
User: <b>demouser@microsoft.com</b>
</p>
<p>
Password: <b>Pass@word1</b>
</p>
</form>
</section>
</div>
</div>
</div>
@section Scripts {
@{ await Html.RenderPartialAsync("_ValidationScriptsPartial"); }
}

+ 0
- 106
src/Web/WebMVC/Views/Account/Register.cshtml View File

@ -1,106 +0,0 @@
@model RegisterViewModel
@{
ViewData["Title"] = "Register";
}
<div class="brand-header-block">
<ul class="container">
<li class="active">REGISTER</li>
<li style="margin-right: 65px;"><a asp-area="" asp-controller="Account" asp-action="Login">LOGIN</a></li>
</ul>
</div>
<div class="container register-container">
<form asp-controller="Account" asp-action="Register" asp-route-returnurl="@ViewData["ReturnUrl"]" method="post" class="form-horizontal">
<h4 class="order-create-section-title">CREATE NEW ACCOUNT</h4>
<div asp-validation-summary="All" class="text-danger"></div>
<div class="row">
<div class="form-group col-sm-6">
<label asp-for="User.Name" class="control-label form-label">NAME</label>
<input asp-for="User.Name" class="form-control form-input" />
<span asp-validation-for="User.Name" class="text-danger" />
</div>
<div class="form-group col-sm-6">
<label asp-for="User.LastName" class="control-label form-label">LAST NAME</label>
<input asp-for="User.LastName" class="form-control form-input" />
<span asp-validation-for="User.LastName" class="text-danger" />
</div>
<div class="form-group col-sm-6">
<label asp-for="User.Street" class="control-label form-label">ADDRESS</label>
<input asp-for="User.Street" class="form-control form-input" />
<span asp-validation-for="User.Street" class="text-danger" />
</div>
<div class="form-group col-sm-6">
<label asp-for="User.City" class="control-label form-label"></label>
<input asp-for="User.City" class="form-control form-input" />
<span asp-validation-for="User.City" class="text-danger" />
</div>
<div class="form-group col-sm-6">
<label asp-for="User.State" class="control-label form-label"></label>
<input asp-for="User.State" class="form-control form-input" />
<span asp-validation-for="User.State" class="text-danger" />
</div>
<div class="form-group col-sm-6">
<label asp-for="User.Country" class="control-label form-label"></label>
<input asp-for="User.Country" class="form-control form-input" />
<span asp-validation-for="User.Country" class="text-danger" />
</div>
<div class="form-group col-sm-6">
<label asp-for="User.ZipCode" class="control-label form-label">POSTCODE</label>
<input asp-for="User.ZipCode" class="form-control form-input" />
<span asp-validation-for="User.ZipCode" class="text-danger" />
</div>
<div class="form-group col-sm-6">
<label asp-for="User.PhoneNumber" class="control-label form-label">PHONE NUMBER</label>
<input asp-for="User.PhoneNumber" class="form-control form-input" />
<span asp-validation-for="User.PhoneNumber" class="text-danger" />
</div>
<div class="form-group col-sm-6">
<label asp-for="User.CardNumber" class="control-label form-label">Card Number</label>
<input asp-for="User.CardNumber" class="form-control form-input" />
<span asp-validation-for="User.CardNumber" class="text-danger" />
</div>
<div class="form-group col-sm-6">
<label asp-for="User.CardHolderName" class="control-label form-label">Cardholder Name</label>
<input asp-for="User.CardHolderName" class="form-control form-input" />
<span asp-validation-for="User.CardHolderName" class="text-danger" />
</div>
<div class="form-group col-sm-3">
<label asp-for="User.Expiration" class="control-label form-label">Expiration Date</label>
<input asp-for="User.Expiration" placeholder="MM/YY" class="form-control form-input form-input-small" />
<span asp-validation-for="User.Expiration" class="text-danger" />
</div>
<div class="form-group col-sm-3">
<label asp-for="User.SecurityNumber" class="control-label form-label">Security Code</label>
<input asp-for="User.SecurityNumber" class="form-control form-input form-input-small" />
<span asp-validation-for="User.SecurityNumber" class="text-danger" />
</div>
</div>
<br /><br />
<div class="row">
<div class="form-group col-sm-6">
<label asp-for="Email" class="control-label form-label"></label>
<input asp-for="Email" class="form-control form-input" />
<span asp-validation-for="Email" class="text-danger"></span>
</div>
<div class="form-group col-sm-offset-6"></div>
<div class="form-group col-sm-6">
<label asp-for="Password" class="control-label form-label"></label>
<input asp-for="Password" class="form-control form-input" />
<span asp-validation-for="Password" class="text-danger"></span>
</div>
<div class="form-group col-sm-6">
<label asp-for="ConfirmPassword" class="control-label form-label"></label>
<input asp-for="ConfirmPassword" class="form-control form-input" />
<span asp-validation-for="ConfirmPassword" class="text-danger"></span>
</div>
</div>
<br /><br />
<div class="form-group">
<button type="submit" class="btn btn-default btn-brand">&nbsp;Register&nbsp;</button>
</div>
<br /><br />
</form>
</div>
@section Scripts {
@{ await Html.RenderPartialAsync("_ValidationScriptsPartial"); }
}

+ 2
- 2
src/Web/WebMVC/Views/Shared/_Layout.cshtml View File

@ -22,7 +22,7 @@
<link rel="stylesheet" href="~/css/override.css" type="text/css" />
</environment>
<environment names="Staging,Production">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.0.0-alpha.5/css/bootstrap.min.css"
<link rel="stylesheet" href="https://ajax.aspnetcdn.com/ajax/bootstrap/3.3.7/css/bootstrap.min.css"
asp-fallback-href="~/lib/bootstrap/dist/css/bootstrap.min.css"
asp-fallback-test-class="sr-only" asp-fallback-test-property="position" asp-fallback-test-value="absolute" />
<link rel="stylesheet" href="~/css/site.min.css" asp-append-version="true" />
@ -75,7 +75,7 @@
asp-fallback-src="~/lib/jquery/dist/jquery.min.js"
asp-fallback-test="window.jQuery">
</script>
<script src="https://ajax.aspnetcdn.com/ajax/bootstrap/3.3.6/bootstrap.min.js"
<script src="https://ajax.aspnetcdn.com/ajax/bootstrap/3.3.7/bootstrap.min.js"
asp-fallback-src="~/lib/bootstrap/dist/js/bootstrap.min.js"
asp-fallback-test="window.jQuery && window.jQuery.fn && window.jQuery.fn.modal">
</script>


+ 1
- 1
src/Web/WebMVC/bower.json View File

@ -2,7 +2,7 @@
"name": "asp.net",
"private": true,
"dependencies": {
"bootstrap": "4.0.0-alpha.5",
"bootstrap": "v3.3.7",
"jquery": "2.2.0",
"jquery-validation": "1.14.0",
"jquery-validation-unobtrusive": "3.2.6"


+ 11
- 4
src/Web/WebSPA/Client/modules/basket/basket.component.html View File

@ -1,7 +1,13 @@
<div class="esh-basket">
<esh-header url="/catalog">Back to catalog</esh-header>
<div class="container">
<div *ngFor="let errorMessage of errorMessages">
<div class="esh-basket-items-margin-left1 row">
<div class="alert alert-warning" role="alert">&nbsp;{{errorMessage}}</div>
</div>
</div>
<article class="esh-basket-titles row">
<section class="esh-basket-title col-xs-3">Product</section>
<section class="esh-basket-title col-xs-3 hidden-lg-down"></section>
@ -14,16 +20,17 @@
<article class="esh-basket-items row">
<section class="esh-basket-item esh-basket-item--middle col-lg-3 hidden-lg-down">
<img class="esh-basket-image" src="{{item.pictureUrl}}" />
<img class="esh-basket-image" src="{{item.pictureUrl}}"/>
</section>
<section class="esh-basket-item esh-basket-item--middle col-xs-3">{{item.productName}}</section>
<section class="esh-basket-item esh-basket-item--middle col-xs-2">$ {{item.unitPrice | number:'.2-2'}}</section>
<section class="esh-basket-item esh-basket-item--middle col-xs-2">
<input class="esh-basket-input"
<input id="quantity"
class="esh-basket-input"
type="number"
min="1"
[(ngModel)]="item.quantity"
(change)="itemQuantityChanged(item)" />
(change)="itemQuantityChanged(item)"/>
</section>
<section class="esh-basket-item esh-basket-item--middle esh-basket-item--mark col-xs-2">$ {{(item.unitPrice * item.quantity) | number:'.2-2'}}</section>
</article>


+ 28
- 9
src/Web/WebSPA/Client/modules/basket/basket.component.ts View File

@ -1,9 +1,13 @@
import { Component, OnInit } from '@angular/core';
import { Router } from '@angular/router';
import { Component, OnInit } from '@angular/core';
import { Router } from '@angular/router';
import { BasketService } from './basket.service';
import { IBasket } from '../shared/models/basket.model';
import { IBasketItem } from '../shared/models/basketItem.model';
import 'rxjs/Rx';
import { Observable } from 'rxjs/Observable';
import 'rxjs/add/observable/throw';
import { BasketService } from './basket.service';
import { IBasket } from '../shared/models/basket.model';
import { IBasketItem } from '../shared/models/basketItem.model';
import { BasketWrapperService } from '../shared/services/basket.wrapper.service';
@Component({
@ -12,6 +16,7 @@ import { BasketWrapperService } from '../shared/services/basket.wrapper.service'
templateUrl: './basket.component.html'
})
export class BasketComponent implements OnInit {
errorMessages: any;
basket: IBasket;
totalPrice: number = 0;
@ -29,13 +34,27 @@ export class BasketComponent implements OnInit {
this.service.setBasket(this.basket).subscribe(x => console.log('basket updated: ' + x));
}
update(event: any) {
this.service.setBasket(this.basket).subscribe(x => console.log('basket updated: ' + x));
update(event: any): Observable<boolean> {
let setBasketObservable = this.service.setBasket(this.basket);
setBasketObservable
.subscribe(
x => {
this.errorMessages = [];
console.log('basket updated: ' + x);
},
errMessage => this.errorMessages = errMessage.messages);
return setBasketObservable;
}
checkOut(event: any) {
this.basketwrapper.basket = this.basket;
this.router.navigate(['order']);
this.update(event)
.subscribe(
x => {
this.errorMessages = [];
this.basketwrapper.basket = this.basket;
this.router.navigate(['order'],
errMessage => this.errorMessages = errMessage.messages);
});
}
private calculateTotalPrice() {


+ 2
- 2
src/Web/WebSPA/Client/modules/orders/orders.component.ts View File

@ -20,7 +20,7 @@ export class OrdersComponent implements OnInit {
ngOnInit() {
if (this.configurationService.isReady) {
this.getOrders()
this.getOrders();
} else {
this.configurationService.settingsLoaded$.subscribe(x => {
this.getOrders();
@ -31,7 +31,7 @@ export class OrdersComponent implements OnInit {
this.interval = setTimeout(() => {
this.service.getOrders().subscribe(orders => {
this.orders = orders;
if (this.orders.length != this.oldOrders.length) {
if (this.orders.length !== this.oldOrders.length) {
clearInterval(this.interval);
}
});


+ 3
- 2
src/Web/WebSPA/Client/modules/shared/services/basket.wrapper.service.ts View File

@ -4,7 +4,8 @@ import { Subject } from 'rxjs/Subject';
import { ICatalogItem } from '../models/catalogItem.model';
import { IBasketItem } from '../models/basketItem.model';
import { IBasket } from '../models/basket.model';
import { SecurityService } from '../services/security.service';
import { SecurityService } from '../services/security.service';
import { Guid } from '../../../guid';
@Injectable()
export class BasketWrapperService {
@ -27,7 +28,7 @@ export class BasketWrapperService {
productName: item.name,
quantity: 1,
unitPrice: item.price,
id: '',
id: Guid.newGuid(),
oldUnitPrice: 0
};


+ 1
- 1
src/Web/WebSPA/Client/modules/shared/services/data.service.ts View File

@ -102,7 +102,7 @@ export class DataService {
if (error instanceof Response) {
let errMessage = '';
try {
errMessage = error.json().error;
errMessage = error.json();
} catch (err) {
errMessage = error.statusText;
}


+ 1
- 1
src/Web/WebSPA/Startup.cs View File

@ -31,7 +31,7 @@ namespace eShopConContainers.WebSPA
if (env.IsDevelopment())
{
// For more details on using the user secret store see http://go.microsoft.com/fwlink/?LinkID=532709
builder.AddUserSecrets();
builder.AddUserSecrets<Startup>();
}
Configuration = builder.Build();


+ 1
- 6
src/Web/WebStatus/Program.cs View File

@ -1,8 +1,4 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Threading.Tasks;
using System.IO;
using Microsoft.AspNetCore.Hosting;
namespace WebStatus
@ -16,7 +12,6 @@ namespace WebStatus
.UseContentRoot(Directory.GetCurrentDirectory())
.UseIISIntegration()
.UseStartup<Startup>()
.UseApplicationInsights()
.Build();
host.Run();


+ 1
- 3
src/Web/WebStatus/Views/Shared/_Layout.cshtml View File

@ -1,5 +1,4 @@
@inject Microsoft.ApplicationInsights.AspNetCore.JavaScriptSnippet JavaScriptSnippet
<!DOCTYPE html>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
@ -22,7 +21,6 @@
<meta http-equiv="refresh" content="@ViewBag.RefreshSeconds">
}
@Html.Raw(JavaScriptSnippet.FullScript)
</head>
<body>
<nav class="navbar navbar-inverse navbar-fixed-top">


+ 0
- 1
src/Web/WebStatus/WebStatus.csproj View File

@ -9,7 +9,6 @@
<DockerComposeProjectPath>..\..\..\docker-compose.dcproj</DockerComposeProjectPath>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.ApplicationInsights.AspNetCore" Version="2.0.0" />
<PackageReference Include="Microsoft.AspNetCore" Version="1.1.2" />
<PackageReference Include="Microsoft.AspNetCore.Mvc" Version="1.1.3" />
<PackageReference Include="Microsoft.AspNetCore.StaticFiles" Version="1.1.2" />


+ 10
- 7
test/Services/UnitTest/Account/AccountControllerTest.cs View File

@ -1,4 +1,6 @@
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Authentication;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Http.Authentication;
using Microsoft.AspNetCore.Mvc;
using Microsoft.eShopOnContainers.WebMVC.Controllers;
using Microsoft.eShopOnContainers.WebMVC.Services;
@ -15,12 +17,10 @@ namespace UnitTest.Account
{
public class AccountControllerTest
{
private readonly Mock<IIdentityParser<ApplicationUser>> _identityParserMock;
private readonly Mock<HttpContext> _httpContextMock;
public AccountControllerTest()
{
_identityParserMock = new Mock<IIdentityParser<ApplicationUser>>();
_httpContextMock = new Mock<HttpContext>();
}
@ -29,20 +29,23 @@ namespace UnitTest.Account
{
//Arrange
var fakeCP = GenerateFakeClaimsIdentity();
var mockAuth = new Mock<AuthenticationManager>();
_httpContextMock.Setup(x => x.User)
.Returns(new ClaimsPrincipal(fakeCP));
_httpContextMock.Setup(c => c.Authentication)
.Returns(mockAuth.Object);
//Act
var accountController = new AccountController(_identityParserMock.Object);
var accountController = new AccountController();
accountController.ControllerContext.HttpContext = _httpContextMock.Object;
var actionResult = accountController.SignIn("");
var actionResult = accountController.SignIn("").Result;
//Assert
var redirectResult = Assert.IsType<RedirectToActionResult>(actionResult);
Assert.Equal(redirectResult.ActionName, "Index");
Assert.Equal(redirectResult.ControllerName, "Catalog");
Assert.Equal(accountController.ViewData["access_token"], "fakeToken");
}
private ClaimsIdentity GenerateFakeClaimsIdentity()


+ 47
- 0
test/Services/UnitTest/Ordering/Builders.cs View File

@ -0,0 +1,47 @@
using System;
using Microsoft.eShopOnContainers.Services.Ordering.Domain.AggregatesModel.OrderAggregate;
namespace UnitTest.Ordering
{
public class AddressBuilder
{
public Address Build()
{
return new Address("street", "city", "state", "country", "zipcode");
}
}
public class OrderBuilder
{
private readonly Order order;
public OrderBuilder(Address address)
{
order = new Order(
"userId",
address,
cardTypeId:5,
cardNumber:"12",
cardSecurityNumber:"123",
cardHolderName:"name",
cardExpiration:DateTime.UtcNow);
}
public OrderBuilder AddOne(
int productId,
string productName,
decimal unitPrice,
decimal discount,
string pictureUrl,
int units = 1)
{
order.AddOrderItem(productId, productName, unitPrice, discount, pictureUrl, units);
return this;
}
public Order Build()
{
return order;
}
}
}

Some files were not shown because too many files changed in this diff

Loading…
Cancel
Save