Merge branch 'dev' into integration-events-rmq
# Conflicts: # docker-compose.override.yml # eShopOnContainers-ServicesAndWebApps.sln
8
.env
Normal file
@ -0,0 +1,8 @@
|
||||
# Compose supports declaring default environment variables in an environment file named .env placed in the folder docker-compose command is executed from (current working directory).
|
||||
# Compose expects each line in an env file to be in VAR=VAL format. Lines beginning with # (i.e. comments) are ignored, as are blank lines.
|
||||
# Note: Values present in the environment at runtime will always override those defined inside the .env file. Similarly, values passed via command-line arguments take precedence as well.
|
||||
|
||||
# The IP below should be swapped to your real IP or DNS name, like 192.168.88.248, etc. if testing from remote browsers or mobile devices
|
||||
|
||||
ESHOP_EXTERNAL_DNS_NAME_OR_IP=localhost
|
||||
ESHOP_PROD_EXTERNAL_DNS_NAME_OR_IP=10.121.122.92
|
21
README.md
@ -5,7 +5,10 @@ Sample .NET Core reference application, powered by Microsoft, based on a simplif
|
||||
> **IMPORTANT:** The current state of this sample application is **ALPHA**, consider it version a 0.1 foundational version, therefore, many areas could be improved and change significantly while refactoring current code and implementing new features. **Feedback with improvements and pull requests from the community will be highly appreciated and accepted.**
|
||||
>
|
||||
> This reference application proposes a simplified microservice oriented architecture implementation to introduce technologies like .NET Core with Docker containers through a comprehensive application. However, this reference application it is not trying to solve all the problems in a large and mission-critical distributed system, it is just a bootstrap for developers to easily get started in the world of Docker containers and microservices with .NET Core.
|
||||
> <p>For example, the next step (still not covered here) after understanding Docker containers and microservices is to select a microservice cluster/orchestrator like Docker Swarm, Kubernetes or DC/OS (in Azure Container Service) or Azure Service Fabric which in most of the cases will require additional partial changes to your application's configuration (although the present architecture should work on most orchestrators with small changes). In the future we might fork this project and make multiple versions targeting specific microservice cluster/orchestrators. <p>
|
||||
> <p>For example, the next step (still not covered in eShopOnContainers) after understanding Docker containers and microservices development with .NET Core, is to select a microservice cluster/orchestrator like Docker Swarm, Kubernetes or DC/OS (in Azure Container Service) or Azure Service Fabric which in most of the cases will require additional partial changes to your application's configuration (although the present architecture should work on most orchestrators with small changes).
|
||||
> Or moving your databases to HA cloud services, or implementing your EventBus with Azure Service Bus or any other production ready Service Bus in the market.
|
||||
> <p> In the future we might fork this project and make multiple versions targeting specific microservice cluster/orchestrators plus using additional cloud infrastructure. <p>
|
||||
> <img src="img/exploring-to-production-ready.png">
|
||||
> Read the planned <a href='https://github.com/dotnet/eShopOnContainers/wiki/01.-Roadmap-and-Milestones-for-future-releases'>Roadmap and Milestones for future releases of eShopOnContainers</a> within the Wiki for further info about possible new implementations and provide feedback at the <a href='https://github.com/dotnet/eShopOnContainers/issues'>ISSUES section</a> if you'd like to see any specific scenario implemented or improved. Also, feel free to discuss on any current issue.
|
||||
|
||||
**Architecture overview**: This reference application is cross-platform either at the server and client side, thanks to .NET Core services capable of running on Linux or Windows containers depending on your Docker host, and to Xamarin for mobile apps running on Android, iOS or Windows/UWP plus any browser for the client web apps.
|
||||
@ -17,7 +20,7 @@ The plan is to add asynchronous communication for data updates propagation acros
|
||||
<img src="img/eShopOnContainers_Architecture_Diagram.png">
|
||||
<p>
|
||||
<p>
|
||||
Additional miroservice styles with other frameworks and No-SQL databases will be added, eventually. This is a great opportunity for pull requests from the community, like a new microservice using Nancy, or even other languages like Node, Go, Python or data containers with MongoDB with Azure DocDB compatibility, Postgress, RavenDB, Event Store, MySql, etc. You name it! :)
|
||||
Additional miroservice styles with other frameworks and No-SQL databases will be added, eventually. This is a great opportunity for pull requests from the community, like a new microservice using Nancy, or even other languages like Node, Go, Python or data containers with MongoDB with Azure DocDB compatibility, PostgreSQL, RavenDB, Event Store, MySql, etc. You name it! :)
|
||||
|
||||
> ### Important Note on Database Servers/Containers
|
||||
> In this solution's current configuration for a development environment, the SQL databases are automatically deployed with sample data into a single SQL Server for Linux container (a single shared Docker container for SQL databases) so the whole solution can be up and running without any dependency to any cloud or specific server. Each database could also be deployed as a single Docker container, but then you'd need more then 8GB or memory RAM assigned to Docker in your development machine in order to be able to run 3 SQL Server Docker containers in your Docker Linux host in "Docker for Windows" or "Docker for Mac" development environments.
|
||||
@ -55,13 +58,13 @@ The screenshot below shows the VS Solution structure for those microservices/con
|
||||
|
||||
Finally, those microservices are consumed by multiple client web and mobile apps, as described below.
|
||||
<br>
|
||||
<b>*MVC Application (ASP.NET Core)*</b>: Its an MVC 6 application where you can find interesting scenarios on how to consume HTTP-based microservices from C# running in the server side, as it is a typical ASP.NET Core MVC application. Since it is a server-side application, access to other containers/microservices is done within the internal Docker Host network with its internal name resolution.
|
||||
<b>*MVC Application (ASP.NET Core)*</b>: Its an MVC application where you can find interesting scenarios on how to consume HTTP-based microservices from C# running in the server side, as it is a typical ASP.NET Core MVC application. Since it is a server-side application, access to other containers/microservices is done within the internal Docker Host network with its internal name resolution.
|
||||
<img src="img/eshop-webmvc-app-screenshot.png">
|
||||
<br>
|
||||
<b>*SPA (Single Page Application)*</b>: Providing similar "eShop business functionality" but developed with Angular 2, Typescript and slightly using ASP.NET Core MVC 6. This is another approach for client web applications to be used when you want to have a more modern client behavior which is not behaving with the typical browser round-trip on every action but behaving like a Single-Page-Application which is more similar to a desktop app usage experience. The consumption of the HTTP-based microservices is done from TypeScript/JavaScript in the client browser, so the client calls to the microservices come from out of the Docker Host internal network (Like from your network or even from the Internet).
|
||||
<b>*SPA (Single Page Application)*</b>: Providing similar "eShop business functionality" but developed with Angular 2, Typescript and slightly using ASP.NET Core MVC. This is another approach for client web applications to be used when you want to have a more modern client behavior which is not behaving with the typical browser round-trip on every action but behaving like a Single-Page-Application which is more similar to a desktop app usage experience. The consumption of the HTTP-based microservices is done from TypeScript/JavaScript in the client browser, so the client calls to the microservices come from out of the Docker Host internal network (Like from your network or even from the Internet).
|
||||
<img src="img/eshop-webspa-app-screenshot.png">
|
||||
<br>
|
||||
<b>*Xamarin Mobile App (For iOS, Android and Windows/UWP)*</b>: It is a client mobile app supporting the most common mobilee OS platforms (iOS, Android and Windows/UWP). In this case, the consumption of the microservices is done from C# but running on the client devices, so out of the Docker Host internal network (Like from your network or even the Internet).
|
||||
<b>*Xamarin Mobile App (For iOS, Android and Windows/UWP)*</b>: It is a client mobile app supporting the most common mobile OS platforms (iOS, Android and Windows/UWP). In this case, the consumption of the microservices is done from C# but running on the client devices, so out of the Docker Host internal network (Like from your network or even the Internet).
|
||||
|
||||
<img src="img/xamarin-mobile-App.png">
|
||||
|
||||
@ -85,5 +88,9 @@ The <b>Windows Containers scenario is currently being implemented/tested yet</b>
|
||||
The app was also partially tested on "Docker for Mac" using a development MacOS machine with .NET Core and VS Code installed, which is still a scenario using Linux containers running on the VM setup in the Mac by the "Docker for Windows" setup. But further testing and feedback on Mac environments and Windows Containers, from the community, will be appreciated.
|
||||
|
||||
## Sending feedback and pull requests
|
||||
As mentioned, ew'd love to get your feedback, improvements and ideas.
|
||||
Create new issues at the issues section and/or send emails to cesardl@microsoft.com
|
||||
As mentioned, we'd appreciate to your feedback, improvements and ideas.
|
||||
You can create new issues at the issues section, do pull requests and/or send emails to eshop_feedback@service.microsoft.com
|
||||
|
||||
## Questions
|
||||
[QUESTION] Answer +1 if the solution is working for you (Through VS2017 or CLI environment):
|
||||
https://github.com/dotnet/eShopOnContainers/issues/107
|
||||
|
7
cli-linux/prepare-spa-app.sh
Normal file
@ -0,0 +1,7 @@
|
||||
|
||||
# Build SPA app
|
||||
pushd $(pwd)/src/Web/WebSPA
|
||||
npm rebuild node-sass
|
||||
#npm run build:prod
|
||||
|
||||
|
@ -6,4 +6,5 @@ services:
|
||||
volumes:
|
||||
- .:/src
|
||||
working_dir: /src
|
||||
command: /bin/bash -c "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 && pushd ./../../.. && dotnet restore ./eShopOnContainers-ServicesAndWebApps.sln && dotnet publish ./eShopOnContainers-ServicesAndWebApps.sln -c Release -o ./obj/Docker/publish"
|
||||
|
||||
|
@ -11,6 +11,9 @@
|
||||
<None Include="docker-compose.override.yml">
|
||||
<DependentUpon>docker-compose.yml</DependentUpon>
|
||||
</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>
|
||||
|
@ -1,5 +1,11 @@
|
||||
version: '2'
|
||||
|
||||
# The default docker-compose.override file can use the "localhost" as the external name for testing web apps within the same dev machine.
|
||||
# The ESHOP_EXTERNAL_DNS_NAME_OR_IP environment variable is taken, by default, from the ".env" file defined like:
|
||||
# ESHOP_EXTERNAL_DNS_NAME_OR_IP=localhost
|
||||
# but values present in the environment vars at runtime will always override those defined inside the .env file
|
||||
# An external IP or DNS name has to be used (instead localhost and the 10.0.75.1 IP) when testing the Web apps and the Xamarin apps from remote machines/devices using the same WiFi, for instance.
|
||||
|
||||
services:
|
||||
|
||||
basket.api:
|
||||
@ -17,7 +23,7 @@ services:
|
||||
- ASPNETCORE_ENVIRONMENT=Development
|
||||
- ASPNETCORE_URLS=http://0.0.0.0:5101
|
||||
- ConnectionString=Server=sql.data;Database=Microsoft.eShopOnContainers.Services.CatalogDb;User Id=sa;Password=Pass@word
|
||||
- ExternalCatalogBaseUrl=http://localhost:5101 #Local: You need to open your local dev-machine firewall at range 5100-5105. at range 5100-5105.
|
||||
- ExternalCatalogBaseUrl=http://${ESHOP_EXTERNAL_DNS_NAME_OR_IP}:5101 #Local: You need to open your local dev-machine firewall at range 5100-5105. at range 5100-5105.
|
||||
- EventBusConnection=rabbitmq
|
||||
ports:
|
||||
- "5101:5101"
|
||||
@ -26,9 +32,9 @@ services:
|
||||
environment:
|
||||
- ASPNETCORE_ENVIRONMENT=Development
|
||||
- ASPNETCORE_URLS=http://0.0.0.0:5105
|
||||
- SpaClient=http://localhost:5104
|
||||
- SpaClient=http://${ESHOP_EXTERNAL_DNS_NAME_OR_IP}:5104
|
||||
- ConnectionStrings__DefaultConnection=Server=sql.data;Database=Microsoft.eShopOnContainers.Service.IdentityDb;User Id=sa;Password=Pass@word
|
||||
- MvcClient=http://localhost:5100 #Local: You need to open your local dev-machine firewall at range 5100-5105.
|
||||
- MvcClient=http://${ESHOP_EXTERNAL_DNS_NAME_OR_IP}:5100 #Local: You need to open your local dev-machine firewall at range 5100-5105.
|
||||
ports:
|
||||
- "5105:5105"
|
||||
|
||||
@ -46,10 +52,10 @@ services:
|
||||
environment:
|
||||
- ASPNETCORE_ENVIRONMENT=Development
|
||||
- ASPNETCORE_URLS=http://0.0.0.0:5104
|
||||
- CatalogUrl=http://localhost:5101
|
||||
- OrderingUrl=http://localhost:5102
|
||||
- IdentityUrl=http://localhost:5105 #Local: You need to open your local dev-machine firewall at range 5100-5105. at range 5100-5105.
|
||||
- BasketUrl=http://localhost:5103
|
||||
- CatalogUrl=http://${ESHOP_EXTERNAL_DNS_NAME_OR_IP}:5101
|
||||
- OrderingUrl=http://${ESHOP_EXTERNAL_DNS_NAME_OR_IP}:5102
|
||||
- IdentityUrl=http://${ESHOP_EXTERNAL_DNS_NAME_OR_IP}:5105 #Local: You need to open your local dev-machine firewall at range 5100-5105. at range 5100-5105.
|
||||
- BasketUrl=http://${ESHOP_EXTERNAL_DNS_NAME_OR_IP}:5103
|
||||
ports:
|
||||
- "5104:5104"
|
||||
|
||||
@ -59,8 +65,9 @@ services:
|
||||
- ASPNETCORE_URLS=http://0.0.0.0:5100
|
||||
- CatalogUrl=http://catalog.api:5101
|
||||
- OrderingUrl=http://ordering.api:5102
|
||||
- IdentityUrl=http://10.0.75.1:5105 #Local: You need to open your local dev-machine firewall at range 5100-5105. at range 5100-5105.
|
||||
- BasketUrl=http://basket.api:5103
|
||||
- IdentityUrl=http://10.0.75.1:5105 #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.
|
||||
ports:
|
||||
- "5100:5100"
|
||||
|
||||
|
80
docker-compose.prod.yml
Normal file
@ -0,0 +1,80 @@
|
||||
version: '2'
|
||||
|
||||
# The Production docker-compose file has to have the external/real IPs or DNS names for the services
|
||||
# The ESHOP_PROD_EXTERNAL_DNS_NAME_OR_IP environment variable is taken, by default, from the ".env" file defined like:
|
||||
# ESHOP_PROD_EXTERNAL_DNS_NAME_OR_IP=192.168.88.248
|
||||
# but values present in the environment vars at runtime will always override those defined inside the .env file
|
||||
# An external IP or DNS name has to be used when testing the Web apps and the Xamarin apps from remote machines/devices using the same WiFi, for instance.
|
||||
#
|
||||
# Set ASPNETCORE_ENVIRONMENT=Development to get errors while testing.
|
||||
#
|
||||
# You need to start it with the following CLI command:
|
||||
# docker-compose -f docker-compose.yml -f docker-compose.prod.yml up -d
|
||||
|
||||
services:
|
||||
|
||||
basket.api:
|
||||
environment:
|
||||
- ASPNETCORE_ENVIRONMENT=Production
|
||||
- ASPNETCORE_URLS=http://0.0.0.0:5103
|
||||
- ConnectionString=basket.data
|
||||
- identityUrl=http://identity.api:5105 #Local: You need to open your host's firewall at range 5100-5105. at range 5100-5105.
|
||||
ports:
|
||||
- "5103:5103"
|
||||
|
||||
catalog.api:
|
||||
environment:
|
||||
- ASPNETCORE_ENVIRONMENT=Production
|
||||
- ASPNETCORE_URLS=http://0.0.0.0:5101
|
||||
- ConnectionString=Server=sql.data;Database=Microsoft.eShopOnContainers.Services.CatalogDb;User Id=sa;Password=Pass@word
|
||||
- ExternalCatalogBaseUrl=http://${ESHOP_PROD_EXTERNAL_DNS_NAME_OR_IP}:5101 #Local: You need to open your host's firewall at range 5100-5105. at range 5100-5105.
|
||||
ports:
|
||||
- "5101:5101"
|
||||
|
||||
identity.api:
|
||||
environment:
|
||||
- ASPNETCORE_ENVIRONMENT=Production
|
||||
- ASPNETCORE_URLS=http://0.0.0.0:5105
|
||||
- SpaClient=http://${ESHOP_PROD_EXTERNAL_DNS_NAME_OR_IP}:5104
|
||||
- ConnectionStrings__DefaultConnection=Server=sql.data;Database=Microsoft.eShopOnContainers.Service.IdentityDb;User Id=sa;Password=Pass@word
|
||||
- MvcClient=http://${ESHOP_PROD_EXTERNAL_DNS_NAME_OR_IP}:5100 #Local: You need to open your host's firewall at range 5100-5105.
|
||||
ports:
|
||||
- "5105:5105"
|
||||
|
||||
ordering.api:
|
||||
environment:
|
||||
- ASPNETCORE_ENVIRONMENT=Production
|
||||
- ASPNETCORE_URLS=http://0.0.0.0:5102
|
||||
- ConnectionString=Server=sql.data;Database=Microsoft.eShopOnContainers.Services.OrderingDb;User Id=sa;Password=Pass@word
|
||||
- identityUrl=http://identity.api:5105 #Local: You need to open your host's firewall at range 5100-5105. at range 5100-5105.
|
||||
ports:
|
||||
- "5102:5102"
|
||||
|
||||
webspa:
|
||||
environment:
|
||||
- ASPNETCORE_ENVIRONMENT=Production
|
||||
- ASPNETCORE_URLS=http://0.0.0.0:5104
|
||||
- CatalogUrl=http://${ESHOP_PROD_EXTERNAL_DNS_NAME_OR_IP}:5101
|
||||
- OrderingUrl=http://${ESHOP_PROD_EXTERNAL_DNS_NAME_OR_IP}:5102
|
||||
- IdentityUrl=http://${ESHOP_PROD_EXTERNAL_DNS_NAME_OR_IP}:5105 #Local: You need to open your host's firewall at range 5100-5105. at range 5100-5105.
|
||||
- BasketUrl=http://${ESHOP_PROD_EXTERNAL_DNS_NAME_OR_IP}:5103
|
||||
ports:
|
||||
- "5104:5104"
|
||||
|
||||
webmvc:
|
||||
environment:
|
||||
- ASPNETCORE_ENVIRONMENT=Production
|
||||
- ASPNETCORE_URLS=http://0.0.0.0:5100
|
||||
- CatalogUrl=http://catalog.api:5101
|
||||
- OrderingUrl=http://ordering.api:5102
|
||||
- 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:5103
|
||||
ports:
|
||||
- "5100:5100"
|
||||
|
||||
sql.data:
|
||||
environment:
|
||||
- SA_PASSWORD=Pass@word
|
||||
- ACCEPT_EULA=Y
|
||||
ports:
|
||||
- "5433:1433"
|
@ -38,8 +38,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WebMVC", "src\Web\WebMVC\We
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Ordering.Infrastructure", "src\Services\Ordering\Ordering.Infrastructure\Ordering.Infrastructure.csproj", "{95F1F07C-4D92-4742-BD07-E5B805AAB651}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "FunctionalTests", "test\Services\FunctionalTests\FunctionalTests.csproj", "{621E7211-58D0-45FD-9600-1CB490BD930E}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "UnitTest", "test\Services\UnitTest\UnitTest.csproj", "{7796F5D8-31FC-45A4-B673-19DE5BA194CF}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Identity.API", "src\Services\Identity\Identity.API\Identity.API.csproj", "{A579E108-5445-403D-A407-339AC4D1611B}"
|
||||
@ -48,6 +46,10 @@ Project("{E53339B2-1760-4266-BCC7-CA923CBCF16C}") = "docker-compose", "docker-co
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WebSPA", "src\Web\WebSPA\WebSPA.csproj", "{F16E3C6A-1C94-4EAB-BE91-099618060B68}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "IntegrationTests", "test\Services\IntegrationTests\IntegrationTests.csproj", "{5B810E3D-112E-4857-B197-F09D2FD41E27}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "FunctionalTests", "test\Services\FunctionalTests\FunctionalTests.csproj", "{CFE2FACB-4538-4B99-8A10-306F3882952D}"
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Common", "Common", "{47857844-D05A-4C37-BFB2-AF19B7EC418D}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Infrastructure", "src\Services\Common\Infrastructure\Infrastructure.csproj", "{B08BA891-ABA2-4BD5-80E8-40B7546C3BE0}"
|
||||
@ -258,54 +260,6 @@ Global
|
||||
{95F1F07C-4D92-4742-BD07-E5B805AAB651}.Release|x64.Build.0 = Release|Any CPU
|
||||
{95F1F07C-4D92-4742-BD07-E5B805AAB651}.Release|x86.ActiveCfg = Release|Any CPU
|
||||
{95F1F07C-4D92-4742-BD07-E5B805AAB651}.Release|x86.Build.0 = Release|Any CPU
|
||||
{621E7211-58D0-45FD-9600-1CB490BD930E}.Ad-Hoc|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{621E7211-58D0-45FD-9600-1CB490BD930E}.Ad-Hoc|Any CPU.Build.0 = Debug|Any CPU
|
||||
{621E7211-58D0-45FD-9600-1CB490BD930E}.Ad-Hoc|ARM.ActiveCfg = Debug|Any CPU
|
||||
{621E7211-58D0-45FD-9600-1CB490BD930E}.Ad-Hoc|ARM.Build.0 = Debug|Any CPU
|
||||
{621E7211-58D0-45FD-9600-1CB490BD930E}.Ad-Hoc|iPhone.ActiveCfg = Debug|Any CPU
|
||||
{621E7211-58D0-45FD-9600-1CB490BD930E}.Ad-Hoc|iPhone.Build.0 = Debug|Any CPU
|
||||
{621E7211-58D0-45FD-9600-1CB490BD930E}.Ad-Hoc|iPhoneSimulator.ActiveCfg = Debug|Any CPU
|
||||
{621E7211-58D0-45FD-9600-1CB490BD930E}.Ad-Hoc|iPhoneSimulator.Build.0 = Debug|Any CPU
|
||||
{621E7211-58D0-45FD-9600-1CB490BD930E}.Ad-Hoc|x64.ActiveCfg = Debug|Any CPU
|
||||
{621E7211-58D0-45FD-9600-1CB490BD930E}.Ad-Hoc|x64.Build.0 = Debug|Any CPU
|
||||
{621E7211-58D0-45FD-9600-1CB490BD930E}.Ad-Hoc|x86.ActiveCfg = Debug|Any CPU
|
||||
{621E7211-58D0-45FD-9600-1CB490BD930E}.Ad-Hoc|x86.Build.0 = Debug|Any CPU
|
||||
{621E7211-58D0-45FD-9600-1CB490BD930E}.AppStore|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{621E7211-58D0-45FD-9600-1CB490BD930E}.AppStore|Any CPU.Build.0 = Debug|Any CPU
|
||||
{621E7211-58D0-45FD-9600-1CB490BD930E}.AppStore|ARM.ActiveCfg = Debug|Any CPU
|
||||
{621E7211-58D0-45FD-9600-1CB490BD930E}.AppStore|ARM.Build.0 = Debug|Any CPU
|
||||
{621E7211-58D0-45FD-9600-1CB490BD930E}.AppStore|iPhone.ActiveCfg = Debug|Any CPU
|
||||
{621E7211-58D0-45FD-9600-1CB490BD930E}.AppStore|iPhone.Build.0 = Debug|Any CPU
|
||||
{621E7211-58D0-45FD-9600-1CB490BD930E}.AppStore|iPhoneSimulator.ActiveCfg = Debug|Any CPU
|
||||
{621E7211-58D0-45FD-9600-1CB490BD930E}.AppStore|iPhoneSimulator.Build.0 = Debug|Any CPU
|
||||
{621E7211-58D0-45FD-9600-1CB490BD930E}.AppStore|x64.ActiveCfg = Debug|Any CPU
|
||||
{621E7211-58D0-45FD-9600-1CB490BD930E}.AppStore|x64.Build.0 = Debug|Any CPU
|
||||
{621E7211-58D0-45FD-9600-1CB490BD930E}.AppStore|x86.ActiveCfg = Debug|Any CPU
|
||||
{621E7211-58D0-45FD-9600-1CB490BD930E}.AppStore|x86.Build.0 = Debug|Any CPU
|
||||
{621E7211-58D0-45FD-9600-1CB490BD930E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{621E7211-58D0-45FD-9600-1CB490BD930E}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{621E7211-58D0-45FD-9600-1CB490BD930E}.Debug|ARM.ActiveCfg = Debug|Any CPU
|
||||
{621E7211-58D0-45FD-9600-1CB490BD930E}.Debug|ARM.Build.0 = Debug|Any CPU
|
||||
{621E7211-58D0-45FD-9600-1CB490BD930E}.Debug|iPhone.ActiveCfg = Debug|Any CPU
|
||||
{621E7211-58D0-45FD-9600-1CB490BD930E}.Debug|iPhone.Build.0 = Debug|Any CPU
|
||||
{621E7211-58D0-45FD-9600-1CB490BD930E}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU
|
||||
{621E7211-58D0-45FD-9600-1CB490BD930E}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU
|
||||
{621E7211-58D0-45FD-9600-1CB490BD930E}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||
{621E7211-58D0-45FD-9600-1CB490BD930E}.Debug|x64.Build.0 = Debug|Any CPU
|
||||
{621E7211-58D0-45FD-9600-1CB490BD930E}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||
{621E7211-58D0-45FD-9600-1CB490BD930E}.Debug|x86.Build.0 = Debug|Any CPU
|
||||
{621E7211-58D0-45FD-9600-1CB490BD930E}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{621E7211-58D0-45FD-9600-1CB490BD930E}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{621E7211-58D0-45FD-9600-1CB490BD930E}.Release|ARM.ActiveCfg = Release|Any CPU
|
||||
{621E7211-58D0-45FD-9600-1CB490BD930E}.Release|ARM.Build.0 = Release|Any CPU
|
||||
{621E7211-58D0-45FD-9600-1CB490BD930E}.Release|iPhone.ActiveCfg = Release|Any CPU
|
||||
{621E7211-58D0-45FD-9600-1CB490BD930E}.Release|iPhone.Build.0 = Release|Any CPU
|
||||
{621E7211-58D0-45FD-9600-1CB490BD930E}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
|
||||
{621E7211-58D0-45FD-9600-1CB490BD930E}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
|
||||
{621E7211-58D0-45FD-9600-1CB490BD930E}.Release|x64.ActiveCfg = Release|Any CPU
|
||||
{621E7211-58D0-45FD-9600-1CB490BD930E}.Release|x64.Build.0 = Release|Any CPU
|
||||
{621E7211-58D0-45FD-9600-1CB490BD930E}.Release|x86.ActiveCfg = Release|Any CPU
|
||||
{621E7211-58D0-45FD-9600-1CB490BD930E}.Release|x86.Build.0 = Release|Any CPU
|
||||
{7796F5D8-31FC-45A4-B673-19DE5BA194CF}.Ad-Hoc|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{7796F5D8-31FC-45A4-B673-19DE5BA194CF}.Ad-Hoc|Any CPU.Build.0 = Debug|Any CPU
|
||||
{7796F5D8-31FC-45A4-B673-19DE5BA194CF}.Ad-Hoc|ARM.ActiveCfg = Debug|Any CPU
|
||||
@ -498,6 +452,102 @@ Global
|
||||
{F16E3C6A-1C94-4EAB-BE91-099618060B68}.Release|x64.Build.0 = Release|Any CPU
|
||||
{F16E3C6A-1C94-4EAB-BE91-099618060B68}.Release|x86.ActiveCfg = Release|Any CPU
|
||||
{F16E3C6A-1C94-4EAB-BE91-099618060B68}.Release|x86.Build.0 = Release|Any CPU
|
||||
{5B810E3D-112E-4857-B197-F09D2FD41E27}.Ad-Hoc|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{5B810E3D-112E-4857-B197-F09D2FD41E27}.Ad-Hoc|Any CPU.Build.0 = Debug|Any CPU
|
||||
{5B810E3D-112E-4857-B197-F09D2FD41E27}.Ad-Hoc|ARM.ActiveCfg = Debug|Any CPU
|
||||
{5B810E3D-112E-4857-B197-F09D2FD41E27}.Ad-Hoc|ARM.Build.0 = Debug|Any CPU
|
||||
{5B810E3D-112E-4857-B197-F09D2FD41E27}.Ad-Hoc|iPhone.ActiveCfg = Debug|Any CPU
|
||||
{5B810E3D-112E-4857-B197-F09D2FD41E27}.Ad-Hoc|iPhone.Build.0 = Debug|Any CPU
|
||||
{5B810E3D-112E-4857-B197-F09D2FD41E27}.Ad-Hoc|iPhoneSimulator.ActiveCfg = Debug|Any CPU
|
||||
{5B810E3D-112E-4857-B197-F09D2FD41E27}.Ad-Hoc|iPhoneSimulator.Build.0 = Debug|Any CPU
|
||||
{5B810E3D-112E-4857-B197-F09D2FD41E27}.Ad-Hoc|x64.ActiveCfg = Debug|Any CPU
|
||||
{5B810E3D-112E-4857-B197-F09D2FD41E27}.Ad-Hoc|x64.Build.0 = Debug|Any CPU
|
||||
{5B810E3D-112E-4857-B197-F09D2FD41E27}.Ad-Hoc|x86.ActiveCfg = Debug|Any CPU
|
||||
{5B810E3D-112E-4857-B197-F09D2FD41E27}.Ad-Hoc|x86.Build.0 = Debug|Any CPU
|
||||
{5B810E3D-112E-4857-B197-F09D2FD41E27}.AppStore|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{5B810E3D-112E-4857-B197-F09D2FD41E27}.AppStore|Any CPU.Build.0 = Debug|Any CPU
|
||||
{5B810E3D-112E-4857-B197-F09D2FD41E27}.AppStore|ARM.ActiveCfg = Debug|Any CPU
|
||||
{5B810E3D-112E-4857-B197-F09D2FD41E27}.AppStore|ARM.Build.0 = Debug|Any CPU
|
||||
{5B810E3D-112E-4857-B197-F09D2FD41E27}.AppStore|iPhone.ActiveCfg = Debug|Any CPU
|
||||
{5B810E3D-112E-4857-B197-F09D2FD41E27}.AppStore|iPhone.Build.0 = Debug|Any CPU
|
||||
{5B810E3D-112E-4857-B197-F09D2FD41E27}.AppStore|iPhoneSimulator.ActiveCfg = Debug|Any CPU
|
||||
{5B810E3D-112E-4857-B197-F09D2FD41E27}.AppStore|iPhoneSimulator.Build.0 = Debug|Any CPU
|
||||
{5B810E3D-112E-4857-B197-F09D2FD41E27}.AppStore|x64.ActiveCfg = Debug|Any CPU
|
||||
{5B810E3D-112E-4857-B197-F09D2FD41E27}.AppStore|x64.Build.0 = Debug|Any CPU
|
||||
{5B810E3D-112E-4857-B197-F09D2FD41E27}.AppStore|x86.ActiveCfg = Debug|Any CPU
|
||||
{5B810E3D-112E-4857-B197-F09D2FD41E27}.AppStore|x86.Build.0 = Debug|Any CPU
|
||||
{5B810E3D-112E-4857-B197-F09D2FD41E27}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{5B810E3D-112E-4857-B197-F09D2FD41E27}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{5B810E3D-112E-4857-B197-F09D2FD41E27}.Debug|ARM.ActiveCfg = Debug|Any CPU
|
||||
{5B810E3D-112E-4857-B197-F09D2FD41E27}.Debug|ARM.Build.0 = Debug|Any CPU
|
||||
{5B810E3D-112E-4857-B197-F09D2FD41E27}.Debug|iPhone.ActiveCfg = Debug|Any CPU
|
||||
{5B810E3D-112E-4857-B197-F09D2FD41E27}.Debug|iPhone.Build.0 = Debug|Any CPU
|
||||
{5B810E3D-112E-4857-B197-F09D2FD41E27}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU
|
||||
{5B810E3D-112E-4857-B197-F09D2FD41E27}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU
|
||||
{5B810E3D-112E-4857-B197-F09D2FD41E27}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||
{5B810E3D-112E-4857-B197-F09D2FD41E27}.Debug|x64.Build.0 = Debug|Any CPU
|
||||
{5B810E3D-112E-4857-B197-F09D2FD41E27}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||
{5B810E3D-112E-4857-B197-F09D2FD41E27}.Debug|x86.Build.0 = Debug|Any CPU
|
||||
{5B810E3D-112E-4857-B197-F09D2FD41E27}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{5B810E3D-112E-4857-B197-F09D2FD41E27}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{5B810E3D-112E-4857-B197-F09D2FD41E27}.Release|ARM.ActiveCfg = Release|Any CPU
|
||||
{5B810E3D-112E-4857-B197-F09D2FD41E27}.Release|ARM.Build.0 = Release|Any CPU
|
||||
{5B810E3D-112E-4857-B197-F09D2FD41E27}.Release|iPhone.ActiveCfg = Release|Any CPU
|
||||
{5B810E3D-112E-4857-B197-F09D2FD41E27}.Release|iPhone.Build.0 = Release|Any CPU
|
||||
{5B810E3D-112E-4857-B197-F09D2FD41E27}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
|
||||
{5B810E3D-112E-4857-B197-F09D2FD41E27}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
|
||||
{5B810E3D-112E-4857-B197-F09D2FD41E27}.Release|x64.ActiveCfg = Release|Any CPU
|
||||
{5B810E3D-112E-4857-B197-F09D2FD41E27}.Release|x64.Build.0 = Release|Any CPU
|
||||
{5B810E3D-112E-4857-B197-F09D2FD41E27}.Release|x86.ActiveCfg = Release|Any CPU
|
||||
{5B810E3D-112E-4857-B197-F09D2FD41E27}.Release|x86.Build.0 = Release|Any CPU
|
||||
{CFE2FACB-4538-4B99-8A10-306F3882952D}.Ad-Hoc|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{CFE2FACB-4538-4B99-8A10-306F3882952D}.Ad-Hoc|Any CPU.Build.0 = Debug|Any CPU
|
||||
{CFE2FACB-4538-4B99-8A10-306F3882952D}.Ad-Hoc|ARM.ActiveCfg = Debug|Any CPU
|
||||
{CFE2FACB-4538-4B99-8A10-306F3882952D}.Ad-Hoc|ARM.Build.0 = Debug|Any CPU
|
||||
{CFE2FACB-4538-4B99-8A10-306F3882952D}.Ad-Hoc|iPhone.ActiveCfg = Debug|Any CPU
|
||||
{CFE2FACB-4538-4B99-8A10-306F3882952D}.Ad-Hoc|iPhone.Build.0 = Debug|Any CPU
|
||||
{CFE2FACB-4538-4B99-8A10-306F3882952D}.Ad-Hoc|iPhoneSimulator.ActiveCfg = Debug|Any CPU
|
||||
{CFE2FACB-4538-4B99-8A10-306F3882952D}.Ad-Hoc|iPhoneSimulator.Build.0 = Debug|Any CPU
|
||||
{CFE2FACB-4538-4B99-8A10-306F3882952D}.Ad-Hoc|x64.ActiveCfg = Debug|Any CPU
|
||||
{CFE2FACB-4538-4B99-8A10-306F3882952D}.Ad-Hoc|x64.Build.0 = Debug|Any CPU
|
||||
{CFE2FACB-4538-4B99-8A10-306F3882952D}.Ad-Hoc|x86.ActiveCfg = Debug|Any CPU
|
||||
{CFE2FACB-4538-4B99-8A10-306F3882952D}.Ad-Hoc|x86.Build.0 = Debug|Any CPU
|
||||
{CFE2FACB-4538-4B99-8A10-306F3882952D}.AppStore|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{CFE2FACB-4538-4B99-8A10-306F3882952D}.AppStore|Any CPU.Build.0 = Debug|Any CPU
|
||||
{CFE2FACB-4538-4B99-8A10-306F3882952D}.AppStore|ARM.ActiveCfg = Debug|Any CPU
|
||||
{CFE2FACB-4538-4B99-8A10-306F3882952D}.AppStore|ARM.Build.0 = Debug|Any CPU
|
||||
{CFE2FACB-4538-4B99-8A10-306F3882952D}.AppStore|iPhone.ActiveCfg = Debug|Any CPU
|
||||
{CFE2FACB-4538-4B99-8A10-306F3882952D}.AppStore|iPhone.Build.0 = Debug|Any CPU
|
||||
{CFE2FACB-4538-4B99-8A10-306F3882952D}.AppStore|iPhoneSimulator.ActiveCfg = Debug|Any CPU
|
||||
{CFE2FACB-4538-4B99-8A10-306F3882952D}.AppStore|iPhoneSimulator.Build.0 = Debug|Any CPU
|
||||
{CFE2FACB-4538-4B99-8A10-306F3882952D}.AppStore|x64.ActiveCfg = Debug|Any CPU
|
||||
{CFE2FACB-4538-4B99-8A10-306F3882952D}.AppStore|x64.Build.0 = Debug|Any CPU
|
||||
{CFE2FACB-4538-4B99-8A10-306F3882952D}.AppStore|x86.ActiveCfg = Debug|Any CPU
|
||||
{CFE2FACB-4538-4B99-8A10-306F3882952D}.AppStore|x86.Build.0 = Debug|Any CPU
|
||||
{CFE2FACB-4538-4B99-8A10-306F3882952D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{CFE2FACB-4538-4B99-8A10-306F3882952D}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{CFE2FACB-4538-4B99-8A10-306F3882952D}.Debug|ARM.ActiveCfg = Debug|Any CPU
|
||||
{CFE2FACB-4538-4B99-8A10-306F3882952D}.Debug|ARM.Build.0 = Debug|Any CPU
|
||||
{CFE2FACB-4538-4B99-8A10-306F3882952D}.Debug|iPhone.ActiveCfg = Debug|Any CPU
|
||||
{CFE2FACB-4538-4B99-8A10-306F3882952D}.Debug|iPhone.Build.0 = Debug|Any CPU
|
||||
{CFE2FACB-4538-4B99-8A10-306F3882952D}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU
|
||||
{CFE2FACB-4538-4B99-8A10-306F3882952D}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU
|
||||
{CFE2FACB-4538-4B99-8A10-306F3882952D}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||
{CFE2FACB-4538-4B99-8A10-306F3882952D}.Debug|x64.Build.0 = Debug|Any CPU
|
||||
{CFE2FACB-4538-4B99-8A10-306F3882952D}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||
{CFE2FACB-4538-4B99-8A10-306F3882952D}.Debug|x86.Build.0 = Debug|Any CPU
|
||||
{CFE2FACB-4538-4B99-8A10-306F3882952D}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{CFE2FACB-4538-4B99-8A10-306F3882952D}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{CFE2FACB-4538-4B99-8A10-306F3882952D}.Release|ARM.ActiveCfg = Release|Any CPU
|
||||
{CFE2FACB-4538-4B99-8A10-306F3882952D}.Release|ARM.Build.0 = Release|Any CPU
|
||||
{CFE2FACB-4538-4B99-8A10-306F3882952D}.Release|iPhone.ActiveCfg = Release|Any CPU
|
||||
{CFE2FACB-4538-4B99-8A10-306F3882952D}.Release|iPhone.Build.0 = Release|Any CPU
|
||||
{CFE2FACB-4538-4B99-8A10-306F3882952D}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
|
||||
{CFE2FACB-4538-4B99-8A10-306F3882952D}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
|
||||
{CFE2FACB-4538-4B99-8A10-306F3882952D}.Release|x64.ActiveCfg = Release|Any CPU
|
||||
{CFE2FACB-4538-4B99-8A10-306F3882952D}.Release|x64.Build.0 = Release|Any CPU
|
||||
{CFE2FACB-4538-4B99-8A10-306F3882952D}.Release|x86.ActiveCfg = Release|Any CPU
|
||||
{CFE2FACB-4538-4B99-8A10-306F3882952D}.Release|x86.Build.0 = Release|Any CPU
|
||||
{B08BA891-ABA2-4BD5-80E8-40B7546C3BE0}.Ad-Hoc|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{B08BA891-ABA2-4BD5-80E8-40B7546C3BE0}.Ad-Hoc|Any CPU.Build.0 = Debug|Any CPU
|
||||
{B08BA891-ABA2-4BD5-80E8-40B7546C3BE0}.Ad-Hoc|ARM.ActiveCfg = Debug|Any CPU
|
||||
@ -564,11 +614,11 @@ Global
|
||||
{F5598DCB-6DDE-4661-AD9D-A55612DA7E76} = {0BD0DB92-2D98-44D9-9AC0-C59186D59B0B}
|
||||
{F0333D8E-0B27-42B7-B2C6-78F3657624E2} = {E279BF0F-7F66-4F3A-A3AB-2CDA66C1CD04}
|
||||
{95F1F07C-4D92-4742-BD07-E5B805AAB651} = {0BD0DB92-2D98-44D9-9AC0-C59186D59B0B}
|
||||
{621E7211-58D0-45FD-9600-1CB490BD930E} = {EF0337F2-ED00-4643-89FD-EE10863F1870}
|
||||
{7796F5D8-31FC-45A4-B673-19DE5BA194CF} = {EF0337F2-ED00-4643-89FD-EE10863F1870}
|
||||
{A579E108-5445-403D-A407-339AC4D1611B} = {24CD3B53-141E-4A07-9B0D-796641E1CF78}
|
||||
{F16E3C6A-1C94-4EAB-BE91-099618060B68} = {E279BF0F-7F66-4F3A-A3AB-2CDA66C1CD04}
|
||||
{47857844-D05A-4C37-BFB2-AF19B7EC418D} = {91CF7717-08AB-4E65-B10E-0B426F01E2E8}
|
||||
{B08BA891-ABA2-4BD5-80E8-40B7546C3BE0} = {47857844-D05A-4C37-BFB2-AF19B7EC418D}
|
||||
{5B810E3D-112E-4857-B197-F09D2FD41E27} = {EF0337F2-ED00-4643-89FD-EE10863F1870}
|
||||
{CFE2FACB-4538-4B99-8A10-306F3882952D} = {EF0337F2-ED00-4643-89FD-EE10863F1870}
|
||||
{B08BA891-ABA2-4BD5-80E8-40B7546C3BE0} = {EF0337F2-ED00-4643-89FD-EE10863F1870}
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
|
@ -65,7 +65,7 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Ordering.Infrastructure", "
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Identity", "Identity", "{02DF7FEE-C302-433D-A6CD-237A2569F236}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "FunctionalTests", "test\Services\FunctionalTests\FunctionalTests.csproj", "{621E7211-58D0-45FD-9600-1CB490BD930E}"
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "IntegrationTests", "test\Services\IntegrationTests\IntegrationTests.csproj", "{621E7211-58D0-45FD-9600-1CB490BD930E}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "eShopOnContainers.UITests", "src\Mobile\eShopOnContainers\eShopOnContainers.UITests\eShopOnContainers.UITests.csproj", "{E3B18084-842C-4B80-8E4A-A7E588EC3137}"
|
||||
EndProject
|
||||
|
Before Width: | Height: | Size: 33 KiB After Width: | Height: | Size: 31 KiB |
BIN
img/exploring-to-production-ready.png
Normal file
After Width: | Height: | Size: 211 KiB |
@ -1,71 +0,0 @@
|
||||
using System;
|
||||
using System.Linq;
|
||||
using Microsoft.eShopOnContainers.Services.Ordering.SqlData.UnitOfWork;
|
||||
using Microsoft.eShopOnContainers.Services.Ordering.Domain.AggregatesModel;
|
||||
using Microsoft.eShopOnContainers.Services.Ordering.Domain.Contracts;
|
||||
using Microsoft.eShopOnContainers.Services.Ordering.SqlData.Repositories;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
|
||||
namespace eShopConsole
|
||||
{
|
||||
public class Program
|
||||
{
|
||||
public static void Main(string[] args)
|
||||
{
|
||||
//// All contexts that share the same service provider will share the same database
|
||||
|
||||
////Using InMemory DB
|
||||
////var options = DbContextUtil.CreateNewContextOptionsForInMemoryDB();
|
||||
|
||||
////Using Sql Server
|
||||
//var options = DbContextUtil.CreateNewContextOptionsForSqlDb();
|
||||
|
||||
//// Run the test against one instance of the context
|
||||
//using (var context = new OrderingDbContext(options))
|
||||
//{
|
||||
// IOrderRepository orderRepository = new OrderRepository(context);
|
||||
|
||||
// //Create generic Address ValueObject
|
||||
// Address sampleAddress = new Address("15703 NE 61st Ct.",
|
||||
// "Redmond",
|
||||
// "Washington",
|
||||
// "WA",
|
||||
// "United States",
|
||||
// "US",
|
||||
// "98052",
|
||||
// 47.661492,
|
||||
// -122.131309
|
||||
// );
|
||||
// //Create sample Orders
|
||||
// Order order1 = new Order(Guid.NewGuid(), sampleAddress, sampleAddress);
|
||||
|
||||
// //Add a few OrderItems
|
||||
// order1.AddNewOrderItem(Guid.NewGuid(), 2, 25, 30);
|
||||
// order1.AddNewOrderItem(Guid.NewGuid(), 1, 58, 0);
|
||||
// order1.AddNewOrderItem(Guid.NewGuid(), 1, 60, 0);
|
||||
// order1.AddNewOrderItem(Guid.NewGuid(), 3, 12, 0);
|
||||
// order1.AddNewOrderItem(Guid.NewGuid(), 5, 3, 0);
|
||||
|
||||
// orderRepository.Add(order1);
|
||||
// orderRepository.UnitOfWork.CommitAsync();
|
||||
|
||||
// //With no Async Repository
|
||||
// //context.Orders.Add(order1);
|
||||
// //context.SaveChanges();
|
||||
|
||||
//}
|
||||
|
||||
////// Use a separate instance of the context to verify correct data was saved to database
|
||||
//using (var context = new OrderingDbContext(options))
|
||||
//{
|
||||
// var orders = context.Orders
|
||||
// .Include(o => o.ShippingAddress)
|
||||
// .Include(o => o.BillingAddress)
|
||||
// .ToList();
|
||||
|
||||
// string cityName = orders.First<Order>().ShippingAddress.City;
|
||||
// Console.WriteLine("City name retreived from SQL Server: "+cityName);
|
||||
//}
|
||||
}
|
||||
}
|
||||
}
|
@ -1,19 +0,0 @@
|
||||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// General Information about an assembly is controlled through the following
|
||||
// set of attributes. Change these attribute values to modify the information
|
||||
// associated with an assembly.
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyProduct("eShopConsole")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
|
||||
// Setting ComVisible to false makes the types in this assembly not visible
|
||||
// to COM components. If you need to access a type in this assembly from
|
||||
// COM, set the ComVisible attribute to true on that type.
|
||||
[assembly: ComVisible(false)]
|
||||
|
||||
// The following GUID is for the ID of the typelib if this project is exposed to COM
|
||||
[assembly: Guid("c10c7b69-ce4f-4167-928e-33b7fa1dffc7")]
|
@ -1,8 +0,0 @@
|
||||
{
|
||||
"profiles": {
|
||||
"Docker": {
|
||||
"executablePath": "%WINDIR%\\System32\\WindowsPowerShell\\v1.0\\powershell.exe",
|
||||
"commandLineArgs": "-ExecutionPolicy RemoteSigned .\\DockerTask.ps1 -Run -Environment $(Configuration) -Machine '$(DockerMachineName)'"
|
||||
}
|
||||
}
|
||||
}
|
@ -1,18 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">14.0</VisualStudioVersion>
|
||||
<VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectGuid>c10c7b69-ce4f-4167-928e-33b7fa1dffc7</ProjectGuid>
|
||||
<RootNamespace>eShopConsole</RootNamespace>
|
||||
<BaseIntermediateOutputPath Condition="'$(BaseIntermediateOutputPath)'=='' ">.\obj</BaseIntermediateOutputPath>
|
||||
<OutputPath Condition="'$(OutputPath)'=='' ">.\bin\</OutputPath>
|
||||
<TargetFrameworkVersion>v4.6</TargetFrameworkVersion>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<SchemaVersion>2.0</SchemaVersion>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VSToolsPath)\DotNet\Microsoft.DotNet.targets" Condition="'$(VSToolsPath)' != ''" />
|
||||
</Project>
|
@ -1,29 +0,0 @@
|
||||
{
|
||||
"version": "1.0.0-*",
|
||||
"buildOptions": {
|
||||
"emitEntryPoint": true,
|
||||
"debugType": "portable"
|
||||
},
|
||||
"dependencies": {
|
||||
"Microsoft.EntityFrameworkCore": "1.0.0",
|
||||
"Microsoft.NETCore.App": {
|
||||
"type": "platform",
|
||||
"version": "1.0.0"
|
||||
},
|
||||
"Ordering.Domain": "1.0.0-*",
|
||||
},
|
||||
"frameworks": {
|
||||
"netcoreapp1.0": {
|
||||
"imports": "dnxcore50"
|
||||
}
|
||||
},
|
||||
"publishOptions": {
|
||||
"include": [
|
||||
"docker-compose.yml",
|
||||
"docker-compose.debug.yml",
|
||||
"Dockerfile.debug",
|
||||
"Dockerfile",
|
||||
".dockerignore"
|
||||
]
|
||||
}
|
||||
}
|
39
src/Mobile/AndroidSDKManager.ps1
Normal file
@ -0,0 +1,39 @@
|
||||
$AndroidToolPath = "${env:ProgramFiles(x86)}\Android\android-sdk\tools\android.bat"
|
||||
if (!(Test-Path $AndroidToolPath)) {
|
||||
$AndroidToolPath = "$env:localappdata\Android\android-sdk\tools\android.bat"
|
||||
} elseif (!(Test-Path $AndroidToolPath)) {
|
||||
Write-Error "Unable to find Android SDK Manager tools."
|
||||
return
|
||||
}
|
||||
|
||||
Function Get-AndroidSDKs() {
|
||||
$output = & $AndroidToolPath list sdk --all
|
||||
$sdks = $output |% {
|
||||
if ($_ -match '(?<index>\d+)- (?<sdk>.+), revision (?<revision>[\d\.]+)') {
|
||||
$sdk = New-Object PSObject
|
||||
Add-Member -InputObject $sdk -MemberType NoteProperty -Name Index -Value $Matches.index
|
||||
Add-Member -InputObject $sdk -MemberType NoteProperty -Name Name -Value $Matches.sdk
|
||||
Add-Member -InputObject $sdk -MemberType NoteProperty -Name Revision -Value $Matches.revision
|
||||
$sdk
|
||||
}
|
||||
}
|
||||
$sdks
|
||||
}
|
||||
|
||||
Function Install-AndroidSDK() {
|
||||
[CmdletBinding()]
|
||||
Param(
|
||||
[Parameter(Mandatory=$true, Position=0)]
|
||||
[PSObject[]]$sdks
|
||||
)
|
||||
|
||||
$sdkIndexes = $sdks |% { $_.Index }
|
||||
$sdkIndexArgument = [string]::Join(',', $sdkIndexes)
|
||||
Echo 'y' | & $AndroidToolPath update sdk -u -a -t $sdkIndexArgument
|
||||
}
|
||||
|
||||
# Example usage:
|
||||
# $sdks = Get-AndroidSDKs |? { $_.name -like 'sdk platform*API 10*' -or $_.name -like 'google apis*api 10' }
|
||||
# Install-AndroidSDK -sdks $sdks
|
||||
|
||||
# https://github.com/AArnott
|
@ -16,6 +16,7 @@ This project exercises the following platforms, frameworks or features:
|
||||
|
||||
* Xamarin.Forms
|
||||
* XAML
|
||||
* Behaviors
|
||||
* Bindings
|
||||
* Converters
|
||||
* Central Styles
|
||||
@ -39,10 +40,10 @@ The app targets **three** platforms:
|
||||
* iOS
|
||||
* Android
|
||||
* Universal Windows Platform (UWP)
|
||||
* UWP supported only in Visual Studio, not Xamarin Studio
|
||||
* UWP supported only in Visual Studio, not Xamarin Studio or Visual Studio for MacOS
|
||||
|
||||
|
||||
As of 19/12/2016, eShopOnContainers features **89.2% code share** (7.2% iOS / 16.7% Android / 8.7% Windows).
|
||||
As of 07/03/2017, eShopOnContainers features **89.2% code share** (7.2% iOS / 16.7% Android / 8.7% Windows).
|
||||
|
||||
##Licenses
|
||||
|
||||
@ -55,12 +56,12 @@ This project uses some third-party assets with a license that requires attributi
|
||||
- [SlideOverKit](https://github.com/XAM-Consulting/SlideOverKit): by XAM-Consulting
|
||||
|
||||
## Requirements
|
||||
### Requirements for Jan. 2017 version of eShopOnContainers
|
||||
### Requirements for March 2017 version of eShopOnContainers
|
||||
|
||||
* [Visual Studio __2015__](https://www.visualstudio.com/en-us/products/vs-2015-product-editions.aspx) (14.0 or higher) to compile C# 6 langage features (or Visual Studio MacOS)
|
||||
* Xamarin add-ons for Visual Studio (available via the Visual Studio installer)
|
||||
* __Visual Studio Community Edition is fully supported!__
|
||||
* Android SDK Tools 25.2.3 or higher
|
||||
* [Android SDK Tools](https://developer.xamarin.com/guides/android/getting_started/installation/windows/) 25.2.3 or higher
|
||||
* JDK 8.0
|
||||
|
||||
## Setup
|
||||
@ -154,4 +155,4 @@ In the configuration window of the machine, go to the Compatibility section and
|
||||
<img src="Images/set-compatibility-vs-sml.png" alt="Migrate to a physical computer with a different processor version" Width="600" />
|
||||
|
||||
## Copyright and license
|
||||
* Code and documentation copyright 2016 Microsoft Corp. Code released under the [MIT license](https://opensource.org/licenses/MIT).
|
||||
* Code and documentation copyright 2017 Microsoft Corp. Code released under the [MIT license](https://opensource.org/licenses/MIT).
|
@ -106,6 +106,7 @@
|
||||
<converters:InverseBoolConverter x:Key="InverseBoolConverter" />
|
||||
<converters:ItemsToHeightConverter x:Key="ItemsToHeightConverter" />
|
||||
<converters:ToUpperConverter x:Key="ToUpperConverter" />
|
||||
<converters:WebNavigatingEventArgsConverter x:Key="WebNavigatingEventArgsConverter" />
|
||||
|
||||
<!-- STYLES -->
|
||||
<Style x:Key="EntryStyle"
|
||||
|
@ -1,52 +0,0 @@
|
||||
using System.Windows.Input;
|
||||
using Xamarin.Forms;
|
||||
|
||||
namespace eShopOnContainers.Core.Behaviors
|
||||
{
|
||||
public sealed class ItemTappedCommandListViewBehavior
|
||||
{
|
||||
public static readonly BindableProperty ItemTappedCommandProperty =
|
||||
BindableProperty.CreateAttached(
|
||||
"ItemTappedCommand",
|
||||
typeof(ICommand),
|
||||
typeof(ItemTappedCommandListViewBehavior),
|
||||
default(ICommand),
|
||||
BindingMode.OneWay,
|
||||
null,
|
||||
PropertyChanged);
|
||||
|
||||
private static void PropertyChanged(BindableObject bindable, object oldValue, object newValue)
|
||||
{
|
||||
var listView = bindable as ListView;
|
||||
if (listView != null)
|
||||
{
|
||||
listView.ItemTapped -= ListViewOnItemTapped;
|
||||
listView.ItemTapped += ListViewOnItemTapped;
|
||||
}
|
||||
}
|
||||
|
||||
private static void ListViewOnItemTapped(object sender, ItemTappedEventArgs e)
|
||||
{
|
||||
var list = sender as ListView;
|
||||
if (list != null && list.IsEnabled && !list.IsRefreshing)
|
||||
{
|
||||
list.SelectedItem = null;
|
||||
var command = GetItemTappedCommand(list);
|
||||
if (command != null && command.CanExecute(e.Item))
|
||||
{
|
||||
command.Execute(e.Item);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static ICommand GetItemTappedCommand(BindableObject bindableObject)
|
||||
{
|
||||
return (ICommand)bindableObject.GetValue(ItemTappedCommandProperty);
|
||||
}
|
||||
|
||||
public static void SetItemTappedCommand(BindableObject bindableObject, object value)
|
||||
{
|
||||
bindableObject.SetValue(ItemTappedCommandProperty, value);
|
||||
}
|
||||
}
|
||||
}
|
@ -1,49 +0,0 @@
|
||||
using System.Windows.Input;
|
||||
using Xamarin.Forms;
|
||||
|
||||
namespace eShopOnContainers.Core.Behaviors
|
||||
{
|
||||
public class WebViewNavigationBehavior : Behavior<WebView>
|
||||
{
|
||||
private VisualElement _element;
|
||||
|
||||
public static readonly BindableProperty NavigateCommandProperty =
|
||||
BindableProperty.Create("NavigateCommand", typeof(ICommand),
|
||||
typeof(WebViewNavigationBehavior), default(ICommand),
|
||||
BindingMode.OneWay, null);
|
||||
|
||||
public ICommand NavigateCommand
|
||||
{
|
||||
get { return (ICommand)GetValue(NavigateCommandProperty); }
|
||||
set { SetValue(NavigateCommandProperty, value); }
|
||||
}
|
||||
|
||||
protected override void OnAttachedTo(WebView bindable)
|
||||
{
|
||||
_element = bindable;
|
||||
bindable.Navigating += OnWebViewNavigating;
|
||||
bindable.BindingContextChanged += OnBindingContextChanged;
|
||||
}
|
||||
|
||||
protected override void OnDetachingFrom(WebView bindable)
|
||||
{
|
||||
_element = null;
|
||||
BindingContext = null;
|
||||
bindable.Navigating -= OnWebViewNavigating;
|
||||
bindable.BindingContextChanged -= OnBindingContextChanged;
|
||||
}
|
||||
|
||||
private void OnBindingContextChanged(object sender, System.EventArgs e)
|
||||
{
|
||||
BindingContext = _element?.BindingContext;
|
||||
}
|
||||
|
||||
private void OnWebViewNavigating(object sender, WebNavigatingEventArgs e)
|
||||
{
|
||||
if (NavigateCommand != null && NavigateCommand.CanExecute(e.Url))
|
||||
{
|
||||
NavigateCommand.Execute(e.Url);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,23 @@
|
||||
using System;
|
||||
using System.Globalization;
|
||||
using Xamarin.Forms;
|
||||
|
||||
namespace eShopOnContainers.Core.Converters
|
||||
{
|
||||
public class WebNavigatingEventArgsConverter : IValueConverter
|
||||
{
|
||||
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
|
||||
{
|
||||
var eventArgs = value as WebNavigatingEventArgs;
|
||||
if (eventArgs == null)
|
||||
throw new ArgumentException("Expected WebNavigatingEventArgs as value", "value");
|
||||
|
||||
return eventArgs.Url;
|
||||
}
|
||||
|
||||
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
}
|
@ -9,19 +9,13 @@ namespace eShopOnContainers.Core.Extensions
|
||||
{
|
||||
ObservableCollection<T> collection = new ObservableCollection<T>();
|
||||
|
||||
try
|
||||
foreach (T item in source)
|
||||
{
|
||||
foreach (T item in source)
|
||||
{
|
||||
collection.Add(item);
|
||||
}
|
||||
collection.Add(item);
|
||||
}
|
||||
|
||||
return collection;
|
||||
|
||||
return collection;
|
||||
}
|
||||
catch
|
||||
{
|
||||
return collection;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -1,7 +1,9 @@
|
||||
using eShopOnContainers.Core.Models.Basket;
|
||||
using eShopOnContainers.Core.Models.Catalog;
|
||||
using eShopOnContainers.ViewModels.Base;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.Text.RegularExpressions;
|
||||
|
||||
namespace eShopOnContainers.Core.Helpers
|
||||
@ -12,27 +14,35 @@ namespace eShopOnContainers.Core.Helpers
|
||||
|
||||
public static void FixCatalogItemPictureUri(IEnumerable<CatalogItem> catalogItems)
|
||||
{
|
||||
if(catalogItems == null)
|
||||
if (catalogItems == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (!ViewModelLocator.Instance.UseMockService
|
||||
&& Settings.UrlBase != GlobalSetting.DefaultEndpoint)
|
||||
try
|
||||
{
|
||||
foreach (var catalogItem in catalogItems)
|
||||
if (!ViewModelLocator.Instance.UseMockService
|
||||
&& Settings.UrlBase != GlobalSetting.DefaultEndpoint)
|
||||
{
|
||||
MatchCollection serverResult = IpRegex.Matches(catalogItem.PictureUri);
|
||||
MatchCollection localResult = IpRegex.Matches(Settings.UrlBase);
|
||||
|
||||
if (serverResult.Count != -1 && localResult.Count != -1)
|
||||
foreach (var catalogItem in catalogItems)
|
||||
{
|
||||
var serviceIp = serverResult[0].Value;
|
||||
var localIp = localResult[0].Value;
|
||||
catalogItem.PictureUri = catalogItem.PictureUri.Replace(serviceIp, localIp);
|
||||
MatchCollection serverResult = IpRegex.Matches(catalogItem.PictureUri);
|
||||
MatchCollection localResult = IpRegex.Matches(Settings.UrlBase);
|
||||
|
||||
if (serverResult.Count != -1 && localResult.Count != -1)
|
||||
{
|
||||
var serviceIp = serverResult[0].Value;
|
||||
var localIp = localResult[0].Value;
|
||||
|
||||
catalogItem.PictureUri = catalogItem.PictureUri.Replace(serviceIp, localIp);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Debug.WriteLine(ex.Message);
|
||||
}
|
||||
}
|
||||
|
||||
public static void FixBasketItemPictureUri(IEnumerable<BasketItem> basketItems)
|
||||
@ -42,22 +52,29 @@ namespace eShopOnContainers.Core.Helpers
|
||||
return;
|
||||
}
|
||||
|
||||
if (!ViewModelLocator.Instance.UseMockService
|
||||
&& Settings.UrlBase != GlobalSetting.DefaultEndpoint)
|
||||
try
|
||||
{
|
||||
foreach (var basketItem in basketItems)
|
||||
if (!ViewModelLocator.Instance.UseMockService
|
||||
&& Settings.UrlBase != GlobalSetting.DefaultEndpoint)
|
||||
{
|
||||
MatchCollection serverResult = IpRegex.Matches(basketItem.PictureUrl);
|
||||
MatchCollection localResult = IpRegex.Matches(Settings.UrlBase);
|
||||
|
||||
if (serverResult.Count != -1 && localResult.Count != -1)
|
||||
foreach (var basketItem in basketItems)
|
||||
{
|
||||
var serviceIp = serverResult[0].Value;
|
||||
var localIp = localResult[0].Value;
|
||||
basketItem.PictureUrl = basketItem.PictureUrl.Replace(serviceIp, localIp);
|
||||
MatchCollection serverResult = IpRegex.Matches(basketItem.PictureUrl);
|
||||
MatchCollection localResult = IpRegex.Matches(Settings.UrlBase);
|
||||
|
||||
if (serverResult.Count != -1 && localResult.Count != -1)
|
||||
{
|
||||
var serviceIp = serverResult[0].Value;
|
||||
var localIp = localResult[0].Value;
|
||||
basketItem.PictureUrl = basketItem.PictureUrl.Replace(serviceIp, localIp);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Debug.WriteLine(ex.Message);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -17,35 +17,24 @@ namespace eShopOnContainers.Core.Services.Basket
|
||||
|
||||
public async Task<CustomerBasket> GetBasketAsync(string guidUser, string token)
|
||||
{
|
||||
try
|
||||
{
|
||||
UriBuilder builder = new UriBuilder(GlobalSetting.Instance.BasketEndpoint);
|
||||
|
||||
UriBuilder builder = new UriBuilder(GlobalSetting.Instance.BasketEndpoint);
|
||||
|
||||
builder.Path = guidUser;
|
||||
builder.Path = guidUser;
|
||||
|
||||
string uri = builder.ToString();
|
||||
string uri = builder.ToString();
|
||||
|
||||
CustomerBasket basket =
|
||||
await _requestProvider.GetAsync<CustomerBasket>(uri, token);
|
||||
CustomerBasket basket =
|
||||
await _requestProvider.GetAsync<CustomerBasket>(uri, token);
|
||||
|
||||
ServicesHelper.FixBasketItemPictureUri(basket?.Items);
|
||||
ServicesHelper.FixBasketItemPictureUri(basket?.Items);
|
||||
|
||||
return basket;
|
||||
|
||||
return basket;
|
||||
}
|
||||
catch
|
||||
{
|
||||
return new CustomerBasket
|
||||
{
|
||||
BuyerId = guidUser,
|
||||
Items = new System.Collections.Generic.List<BasketItem>()
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
public async Task<CustomerBasket> UpdateBasketAsync(CustomerBasket customerBasket, string token)
|
||||
{
|
||||
try
|
||||
{
|
||||
UriBuilder builder = new UriBuilder(GlobalSetting.Instance.BasketEndpoint);
|
||||
|
||||
string uri = builder.ToString();
|
||||
@ -53,11 +42,6 @@ namespace eShopOnContainers.Core.Services.Basket
|
||||
var result = await _requestProvider.PostAsync(uri, customerBasket, token);
|
||||
|
||||
return result;
|
||||
}
|
||||
catch
|
||||
{
|
||||
return new CustomerBasket();
|
||||
}
|
||||
}
|
||||
|
||||
public async Task ClearBasketAsync(string guidUser, string token)
|
||||
|
@ -20,54 +20,44 @@ namespace eShopOnContainers.Core.Services.Catalog
|
||||
|
||||
public async Task<ObservableCollection<CatalogItem>> FilterAsync(int catalogBrandId, int catalogTypeId)
|
||||
{
|
||||
try
|
||||
{
|
||||
UriBuilder builder = new UriBuilder(GlobalSetting.Instance.CatalogEndpoint);
|
||||
|
||||
builder.Path = string.Format("api/v1/catalog/items/type/{0}/brand/{1}", catalogTypeId, catalogBrandId);
|
||||
UriBuilder builder = new UriBuilder(GlobalSetting.Instance.CatalogEndpoint);
|
||||
|
||||
string uri = builder.ToString();
|
||||
builder.Path = string.Format("api/v1/catalog/items/type/{0}/brand/{1}", catalogTypeId, catalogBrandId);
|
||||
|
||||
CatalogRoot catalog =
|
||||
await _requestProvider.GetAsync<CatalogRoot>(uri);
|
||||
string uri = builder.ToString();
|
||||
|
||||
if (catalog?.Data != null)
|
||||
return catalog?.Data.ToObservableCollection();
|
||||
else
|
||||
return new ObservableCollection<CatalogItem>();
|
||||
}
|
||||
catch
|
||||
{
|
||||
CatalogRoot catalog =
|
||||
await _requestProvider.GetAsync<CatalogRoot>(uri);
|
||||
|
||||
if (catalog?.Data != null)
|
||||
return catalog?.Data.ToObservableCollection();
|
||||
else
|
||||
return new ObservableCollection<CatalogItem>();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public async Task<ObservableCollection<CatalogItem>> GetCatalogAsync()
|
||||
{
|
||||
try
|
||||
|
||||
UriBuilder builder = new UriBuilder(GlobalSetting.Instance.CatalogEndpoint);
|
||||
|
||||
builder.Path = "api/v1/catalog/items";
|
||||
|
||||
string uri = builder.ToString();
|
||||
|
||||
CatalogRoot catalog =
|
||||
await _requestProvider.GetAsync<CatalogRoot>(uri);
|
||||
|
||||
if (catalog?.Data != null)
|
||||
{
|
||||
UriBuilder builder = new UriBuilder(GlobalSetting.Instance.CatalogEndpoint);
|
||||
ServicesHelper.FixCatalogItemPictureUri(catalog?.Data);
|
||||
|
||||
builder.Path = "api/v1/catalog/items";
|
||||
|
||||
string uri = builder.ToString();
|
||||
|
||||
CatalogRoot catalog =
|
||||
await _requestProvider.GetAsync<CatalogRoot>(uri);
|
||||
|
||||
if (catalog?.Data != null)
|
||||
{
|
||||
ServicesHelper.FixCatalogItemPictureUri(catalog?.Data);
|
||||
|
||||
return catalog?.Data.ToObservableCollection();
|
||||
}
|
||||
else
|
||||
return new ObservableCollection<CatalogItem>();
|
||||
return catalog?.Data.ToObservableCollection();
|
||||
}
|
||||
catch
|
||||
{
|
||||
else
|
||||
return new ObservableCollection<CatalogItem>();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public Task<CatalogItem> GetCatalogItemAsync(string id)
|
||||
@ -77,8 +67,7 @@ namespace eShopOnContainers.Core.Services.Catalog
|
||||
|
||||
public async Task<ObservableCollection<CatalogBrand>> GetCatalogBrandAsync()
|
||||
{
|
||||
try
|
||||
{
|
||||
|
||||
UriBuilder builder = new UriBuilder(GlobalSetting.Instance.CatalogEndpoint);
|
||||
|
||||
builder.Path = "api/v1/catalog/catalogbrands";
|
||||
@ -92,35 +81,26 @@ namespace eShopOnContainers.Core.Services.Catalog
|
||||
return brands?.ToObservableCollection();
|
||||
else
|
||||
return new ObservableCollection<CatalogBrand>();
|
||||
}
|
||||
catch
|
||||
{
|
||||
return new ObservableCollection<CatalogBrand>();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public async Task<ObservableCollection<CatalogType>> GetCatalogTypeAsync()
|
||||
{
|
||||
try
|
||||
{
|
||||
UriBuilder builder = new UriBuilder(GlobalSetting.Instance.CatalogEndpoint);
|
||||
|
||||
builder.Path = "api/v1/catalog/catalogtypes";
|
||||
UriBuilder builder = new UriBuilder(GlobalSetting.Instance.CatalogEndpoint);
|
||||
|
||||
string uri = builder.ToString();
|
||||
builder.Path = "api/v1/catalog/catalogtypes";
|
||||
|
||||
IEnumerable<CatalogType> types =
|
||||
await _requestProvider.GetAsync<IEnumerable<CatalogType>>(uri);
|
||||
string uri = builder.ToString();
|
||||
|
||||
if (types != null)
|
||||
return types.ToObservableCollection();
|
||||
else
|
||||
return new ObservableCollection<CatalogType>();
|
||||
}
|
||||
catch
|
||||
{
|
||||
IEnumerable<CatalogType> types =
|
||||
await _requestProvider.GetAsync<IEnumerable<CatalogType>>(uri);
|
||||
|
||||
if (types != null)
|
||||
return types.ToObservableCollection();
|
||||
else
|
||||
return new ObservableCollection<CatalogType>();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -22,28 +22,23 @@ namespace eShopOnContainers.Core.Services.Order
|
||||
|
||||
string uri = builder.ToString();
|
||||
|
||||
await _requestProvider.PostAsync(uri, newOrder, token);
|
||||
await _requestProvider.PostAsync(uri, newOrder, token, "x-requestid");
|
||||
}
|
||||
|
||||
public async Task<ObservableCollection<Models.Orders.Order>> GetOrdersAsync(string token)
|
||||
{
|
||||
try
|
||||
{
|
||||
UriBuilder builder = new UriBuilder(GlobalSetting.Instance.OrdersEndpoint);
|
||||
|
||||
UriBuilder builder = new UriBuilder(GlobalSetting.Instance.OrdersEndpoint);
|
||||
|
||||
builder.Path = "api/v1/orders";
|
||||
builder.Path = "api/v1/orders";
|
||||
|
||||
string uri = builder.ToString();
|
||||
string uri = builder.ToString();
|
||||
|
||||
ObservableCollection<Models.Orders.Order> orders =
|
||||
await _requestProvider.GetAsync<ObservableCollection<Models.Orders.Order>>(uri, token);
|
||||
ObservableCollection<Models.Orders.Order> orders =
|
||||
await _requestProvider.GetAsync<ObservableCollection<Models.Orders.Order>>(uri, token);
|
||||
|
||||
return orders;
|
||||
}
|
||||
catch
|
||||
{
|
||||
return new ObservableCollection<Models.Orders.Order>();
|
||||
}
|
||||
return orders;
|
||||
|
||||
}
|
||||
|
||||
public async Task<Models.Orders.Order> GetOrderAsync(int orderId, string token)
|
||||
|
@ -8,6 +8,8 @@ namespace eShopOnContainers.Core.Services.RequestProvider
|
||||
|
||||
Task<TResult> PostAsync<TResult>(string uri, TResult data, string token = "");
|
||||
|
||||
Task<TResult> PostAsync<TResult>(string uri, TResult data, string token = "", string header = "");
|
||||
|
||||
Task<TResult> PostAsync<TRequest, TResult>(string uri, TRequest data, string token = "");
|
||||
|
||||
Task<TResult> PutAsync<TResult>(string uri, TResult data, string token = "");
|
||||
|
@ -7,6 +7,7 @@ using System.Net.Http;
|
||||
using System.Net.Http.Headers;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System;
|
||||
|
||||
namespace eShopOnContainers.Core.Services.RequestProvider
|
||||
{
|
||||
@ -41,6 +42,29 @@ namespace eShopOnContainers.Core.Services.RequestProvider
|
||||
return result;
|
||||
}
|
||||
|
||||
public async Task<TResult> PostAsync<TResult>(string uri, TResult data, string token = "", string header = "")
|
||||
{
|
||||
HttpClient httpClient = CreateHttpClient(token);
|
||||
|
||||
if (!string.IsNullOrEmpty(header))
|
||||
{
|
||||
AddHeaderParameter(httpClient, header);
|
||||
}
|
||||
|
||||
var content = new StringContent(JsonConvert.SerializeObject(data));
|
||||
content.Headers.ContentType = new MediaTypeHeaderValue("application/json");
|
||||
HttpResponseMessage response = await httpClient.PostAsync(uri, content);
|
||||
|
||||
await HandleResponse(response);
|
||||
|
||||
string serialized = await response.Content.ReadAsStringAsync();
|
||||
|
||||
TResult result = await Task.Run(() =>
|
||||
JsonConvert.DeserializeObject<TResult>(serialized, _serializerSettings));
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
public Task<TResult> PostAsync<TResult>(string uri, TResult data, string token = "")
|
||||
{
|
||||
return PostAsync<TResult, TResult>(uri, data, token);
|
||||
@ -99,6 +123,17 @@ namespace eShopOnContainers.Core.Services.RequestProvider
|
||||
return httpClient;
|
||||
}
|
||||
|
||||
private void AddHeaderParameter(HttpClient httpClient, string parameter)
|
||||
{
|
||||
if (httpClient == null)
|
||||
return;
|
||||
|
||||
if (string.IsNullOrEmpty(parameter))
|
||||
return;
|
||||
|
||||
httpClient.DefaultRequestHeaders.Add(parameter, Guid.NewGuid().ToString());
|
||||
}
|
||||
|
||||
private async Task HandleResponse(HttpResponseMessage response)
|
||||
{
|
||||
if (!response.IsSuccessStatusCode)
|
||||
|
@ -16,21 +16,16 @@ namespace eShopOnContainers.Core.Services.User
|
||||
|
||||
public async Task<UserInfo> GetUserInfoAsync(string authToken)
|
||||
{
|
||||
try
|
||||
{
|
||||
UriBuilder builder = new UriBuilder(GlobalSetting.Instance.UserInfoEndpoint);
|
||||
|
||||
string uri = builder.ToString();
|
||||
UriBuilder builder = new UriBuilder(GlobalSetting.Instance.UserInfoEndpoint);
|
||||
|
||||
var userInfo =
|
||||
await _requestProvider.GetAsync<UserInfo>(uri, authToken);
|
||||
string uri = builder.ToString();
|
||||
|
||||
var userInfo =
|
||||
await _requestProvider.GetAsync<UserInfo>(uri, authToken);
|
||||
|
||||
return userInfo;
|
||||
|
||||
return userInfo;
|
||||
}
|
||||
catch
|
||||
{
|
||||
return new UserInfo();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -63,7 +63,7 @@ namespace eShopOnContainers.Core.ViewModels
|
||||
|
||||
public ICommand AddCommand => new Command<BasketItem>(AddItem);
|
||||
|
||||
public ICommand CheckoutCommand => new Command(Checkout);
|
||||
public ICommand CheckoutCommand => new Command(async () => await CheckoutAsync());
|
||||
|
||||
public override async Task InitializeAsync(object navigationData)
|
||||
{
|
||||
@ -151,11 +151,11 @@ namespace eShopOnContainers.Core.ViewModels
|
||||
}, authToken);
|
||||
}
|
||||
|
||||
private void Checkout()
|
||||
private async Task CheckoutAsync()
|
||||
{
|
||||
if (BasketItems.Any())
|
||||
{
|
||||
NavigationService.NavigateToAsync<CheckoutViewModel>(BasketItems);
|
||||
await NavigationService.NavigateToAsync<CheckoutViewModel>(BasketItems);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -66,7 +66,7 @@ namespace eShopOnContainers.Core.ViewModels
|
||||
}
|
||||
}
|
||||
|
||||
public ICommand CheckoutCommand => new Command(Checkout);
|
||||
public ICommand CheckoutCommand => new Command(async () => await CheckoutAsync());
|
||||
|
||||
public override async Task InitializeAsync(object navigationData)
|
||||
{
|
||||
@ -79,13 +79,13 @@ namespace eShopOnContainers.Core.ViewModels
|
||||
|
||||
OrderItems = orderItems;
|
||||
|
||||
var authToken = Settings.AuthAccessToken;
|
||||
var authToken = Settings.AuthAccessToken;
|
||||
var userInfo = await _userService.GetUserInfoAsync(authToken);
|
||||
|
||||
// Create Shipping Address
|
||||
ShippingAddress = new Address
|
||||
{
|
||||
Id = new Guid(userInfo.UserId),
|
||||
Id = !string.IsNullOrEmpty(userInfo?.UserId) ? new Guid(userInfo.UserId) : Guid.NewGuid(),
|
||||
Street = userInfo?.Street,
|
||||
ZipCode = userInfo?.ZipCode,
|
||||
State = userInfo?.State,
|
||||
@ -125,7 +125,7 @@ namespace eShopOnContainers.Core.ViewModels
|
||||
}
|
||||
}
|
||||
|
||||
private async void Checkout()
|
||||
private async Task CheckoutAsync()
|
||||
{
|
||||
try
|
||||
{
|
||||
|
@ -121,15 +121,15 @@ namespace eShopOnContainers.Core.ViewModels
|
||||
}
|
||||
}
|
||||
|
||||
public ICommand MockSignInCommand => new Command(MockSignInAsync);
|
||||
public ICommand MockSignInCommand => new Command(async () => await MockSignInAsync());
|
||||
|
||||
public ICommand SignInCommand => new Command(async () => await SignInAsync());
|
||||
|
||||
public ICommand RegisterCommand => new Command(Register);
|
||||
|
||||
public ICommand NavigateCommand => new Command<string>(NavigateAsync);
|
||||
public ICommand NavigateCommand => new Command<string>(async (url) => await NavigateAsync(url));
|
||||
|
||||
public ICommand SettingsCommand => new Command(SettingsAsync);
|
||||
public ICommand SettingsCommand => new Command(async () => await SettingsAsync());
|
||||
|
||||
public override Task InitializeAsync(object navigationData)
|
||||
{
|
||||
@ -146,7 +146,7 @@ namespace eShopOnContainers.Core.ViewModels
|
||||
return base.InitializeAsync(navigationData);
|
||||
}
|
||||
|
||||
private async void MockSignInAsync()
|
||||
private async Task MockSignInAsync()
|
||||
{
|
||||
IsBusy = true;
|
||||
IsValid = true;
|
||||
@ -219,7 +219,7 @@ namespace eShopOnContainers.Core.ViewModels
|
||||
}
|
||||
}
|
||||
|
||||
private async void NavigateAsync(string url)
|
||||
private async Task NavigateAsync(string url)
|
||||
{
|
||||
if (url.Equals(GlobalSetting.Instance.LogoutCallback))
|
||||
{
|
||||
@ -246,7 +246,7 @@ namespace eShopOnContainers.Core.ViewModels
|
||||
}
|
||||
}
|
||||
|
||||
private async void SettingsAsync()
|
||||
private async Task SettingsAsync()
|
||||
{
|
||||
await NavigationService.NavigateToAsync<SettingsViewModel>();
|
||||
}
|
||||
|
@ -9,7 +9,7 @@ namespace eShopOnContainers.Core.ViewModels
|
||||
{
|
||||
public class MainViewModel : ViewModelBase
|
||||
{
|
||||
public ICommand SettingsCommand => new Command(Settings);
|
||||
public ICommand SettingsCommand => new Command(async () => await SettingsAsync());
|
||||
|
||||
public override Task InitializeAsync(object navigationData)
|
||||
{
|
||||
@ -25,9 +25,9 @@ namespace eShopOnContainers.Core.ViewModels
|
||||
return base.InitializeAsync(navigationData);
|
||||
}
|
||||
|
||||
private void Settings()
|
||||
private async Task SettingsAsync()
|
||||
{
|
||||
NavigationService.NavigateToAsync<SettingsViewModel>();
|
||||
await NavigationService.NavigateToAsync<SettingsViewModel>();
|
||||
}
|
||||
}
|
||||
}
|
@ -32,9 +32,9 @@ namespace eShopOnContainers.Core.ViewModels
|
||||
}
|
||||
}
|
||||
|
||||
public ICommand LogoutCommand => new Command(LogoutAsync);
|
||||
public ICommand LogoutCommand => new Command(async () => await LogoutAsync());
|
||||
|
||||
public ICommand OrderDetailCommand => new Command<Order>(OrderDetail);
|
||||
public ICommand OrderDetailCommand => new Command<Order>(async (order) => await OrderDetailAsync(order));
|
||||
|
||||
public override async Task InitializeAsync(object navigationData)
|
||||
{
|
||||
@ -48,7 +48,7 @@ namespace eShopOnContainers.Core.ViewModels
|
||||
IsBusy = false;
|
||||
}
|
||||
|
||||
private async void LogoutAsync()
|
||||
private async Task LogoutAsync()
|
||||
{
|
||||
IsBusy = true;
|
||||
|
||||
@ -59,9 +59,9 @@ namespace eShopOnContainers.Core.ViewModels
|
||||
IsBusy = false;
|
||||
}
|
||||
|
||||
private void OrderDetail(Order order)
|
||||
private async Task OrderDetailAsync(Order order)
|
||||
{
|
||||
NavigationService.NavigateToAsync<OrderDetailViewModel>(order);
|
||||
await NavigationService.NavigateToAsync<OrderDetailViewModel>(order);
|
||||
}
|
||||
}
|
||||
}
|
@ -1,4 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
||||
x:Class="eShopOnContainers.Core.Views.BasketView"
|
||||
@ -76,12 +76,17 @@
|
||||
<!-- ITEMS -->
|
||||
<ListView
|
||||
ItemsSource="{Binding BasketItems}"
|
||||
behaviors:ItemTappedCommandListViewBehavior.ItemTappedCommand="{Binding AddCommand}"
|
||||
HeightRequest="{Binding BasketItems.Count, Converter={StaticResource ItemsToHeightConverter}}"
|
||||
HasUnevenRows="True"
|
||||
SeparatorVisibility="None"
|
||||
VerticalOptions="FillAndExpand"
|
||||
CachingStrategy="RecycleElement">
|
||||
<ListView.Behaviors>
|
||||
<behaviors:EventToCommandBehavior
|
||||
EventName="ItemTapped"
|
||||
EventArgsConverter="{StaticResource ItemTappedEventArgsConverter}"
|
||||
Command="{Binding AddCommand}" />
|
||||
</ListView.Behaviors>
|
||||
<ListView.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<ViewCell>
|
||||
|
@ -1,4 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
||||
x:Class="eShopOnContainers.Core.Views.LoginView"
|
||||
@ -313,8 +313,10 @@
|
||||
AbsoluteLayout.LayoutBounds="0, 0, 1, 1"
|
||||
AbsoluteLayout.LayoutFlags="All">
|
||||
<WebView.Behaviors>
|
||||
<behaviors:WebViewNavigationBehavior
|
||||
NavigateCommand="{Binding NavigateCommand}"/>
|
||||
<behaviors:EventToCommandBehavior
|
||||
EventName="Navigating"
|
||||
EventArgsConverter="{StaticResource WebNavigatingEventArgsConverter}"
|
||||
Command="{Binding NavigateCommand}" />
|
||||
</WebView.Behaviors>
|
||||
</WebView>
|
||||
</AbsoluteLayout>
|
||||
|
@ -44,8 +44,6 @@
|
||||
</Compile>
|
||||
<Compile Include="Behaviors\Base\BindableBehavior.cs" />
|
||||
<Compile Include="Behaviors\EventToCommandBehavior.cs" />
|
||||
<Compile Include="Behaviors\ItemTappedCommandListViewBehavior.cs" />
|
||||
<Compile Include="Behaviors\WebViewNavigationBehavior.cs" />
|
||||
<Compile Include="Controls\AddBasketButton.xaml.cs">
|
||||
<DependentUpon>AddBasketButton.xaml</DependentUpon>
|
||||
</Compile>
|
||||
@ -58,7 +56,7 @@
|
||||
<Compile Include="Converters\InverseBoolConverter.cs" />
|
||||
<Compile Include="Converters\InverseCountToBoolConverter.cs" />
|
||||
<Compile Include="Converters\ItemsToHeightConverter.cs" />
|
||||
<Compile Include="Converters\ItemTappedConverter.cs" />
|
||||
<Compile Include="Converters\ItemTappedEventArgsConverter.cs" />
|
||||
<Compile Include="Converters\ToUpperConverter.cs" />
|
||||
<Compile Include="Effects\LineColorEffect.cs" />
|
||||
<Compile Include="Exceptions\ServiceAuthenticationException.cs" />
|
||||
@ -166,6 +164,7 @@
|
||||
<Compile Include="Views\Templates\ProductTemplate.xaml.cs">
|
||||
<DependentUpon>ProductTemplate.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Converters\WebNavigatingEventArgsConverter.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="app.config" />
|
||||
|
@ -385,7 +385,7 @@
|
||||
<Import Project="..\..\..\..\packages\Xamarin.Android.Support.Vector.Drawable.23.3.0\build\Xamarin.Android.Support.Vector.Drawable.targets" Condition="Exists('..\..\packages\Xamarin.Android.Support.Vector.Drawable.23.3.0\build\Xamarin.Android.Support.Vector.Drawable.targets')" />
|
||||
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
|
||||
<PropertyGroup>
|
||||
<ErrorText>Este proyecto hace referencia a los paquetes NuGet que faltan en este equipo. Use la restauración de paquetes NuGet para descargarlos. Para obtener más información, consulte http://go.microsoft.com/fwlink/?LinkID=322105. El archivo que falta es {0}.</ErrorText>
|
||||
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
|
||||
</PropertyGroup>
|
||||
<Error Condition="!Exists('..\..\..\..\packages\Xamarin.Android.Support.Vector.Drawable.23.3.0\build\Xamarin.Android.Support.Vector.Drawable.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\..\..\packages\Xamarin.Android.Support.Vector.Drawable.23.3.0\build\Xamarin.Android.Support.Vector.Drawable.targets'))" />
|
||||
<Error Condition="!Exists('..\..\..\..\packages\Microsoft.Bcl.Build.1.0.21\build\Microsoft.Bcl.Build.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\Microsoft.Bcl.Build.1.0.21\build\Microsoft.Bcl.Build.targets'))" />
|
||||
|
@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="eShopOnContainers.TestRunner.Droid.eShopOnContainers.TestRunner.Droid" android:versionCode="1" android:versionName="1.0">
|
||||
<uses-sdk android:minSdkVersion="16" />
|
||||
<application android:label="eShopOnContainers.TestRunner.Droid"></application>
|
||||
<uses-sdk android:minSdkVersion="16" />
|
||||
<application android:label="eShopOnContainers.TestRunner.Droid"></application>
|
||||
</manifest>
|
@ -15,7 +15,7 @@
|
||||
<AndroidApplication>true</AndroidApplication>
|
||||
<AndroidResgenFile>Resources\Resource.Designer.cs</AndroidResgenFile>
|
||||
<GenerateSerializationAssemblies>Off</GenerateSerializationAssemblies>
|
||||
<AndroidUseLatestPlatformSdk>True</AndroidUseLatestPlatformSdk>
|
||||
<AndroidUseLatestPlatformSdk>False</AndroidUseLatestPlatformSdk>
|
||||
<TargetFrameworkVersion>v6.0</TargetFrameworkVersion>
|
||||
<AndroidManifest>Properties\AndroidManifest.xml</AndroidManifest>
|
||||
<NuGetPackageImportStamp>
|
||||
@ -170,7 +170,7 @@
|
||||
<Import Project="..\..\..\..\packages\Xamarin.Android.Support.Vector.Drawable.23.3.0\build\Xamarin.Android.Support.Vector.Drawable.targets" Condition="Exists('..\..\..\..\packages\Xamarin.Android.Support.Vector.Drawable.23.3.0\build\Xamarin.Android.Support.Vector.Drawable.targets')" />
|
||||
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
|
||||
<PropertyGroup>
|
||||
<ErrorText>Este proyecto hace referencia a los paquetes NuGet que faltan en este equipo. Use la restauración de paquetes NuGet para descargarlos. Para obtener más información, consulte http://go.microsoft.com/fwlink/?LinkID=322105. El archivo que falta es {0}.</ErrorText>
|
||||
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
|
||||
</PropertyGroup>
|
||||
<Error Condition="!Exists('..\..\..\..\packages\Xamarin.Android.Support.Vector.Drawable.23.3.0\build\Xamarin.Android.Support.Vector.Drawable.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\..\..\packages\Xamarin.Android.Support.Vector.Drawable.23.3.0\build\Xamarin.Android.Support.Vector.Drawable.targets'))" />
|
||||
<Error Condition="!Exists('..\..\..\..\packages\xunit.runner.devices.2.1.0\build\MonoAndroid\xunit.runner.devices.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\..\..\packages\xunit.runner.devices.2.1.0\build\MonoAndroid\xunit.runner.devices.targets'))" />
|
||||
|
@ -16,7 +16,7 @@
|
||||
<AndroidResgenFile>Resources\Resource.Designer.cs</AndroidResgenFile>
|
||||
<GenerateSerializationAssemblies>Off</GenerateSerializationAssemblies>
|
||||
<AndroidUseLatestPlatformSdk>True</AndroidUseLatestPlatformSdk>
|
||||
<TargetFrameworkVersion>v7.0</TargetFrameworkVersion>
|
||||
<TargetFrameworkVersion>v6.0</TargetFrameworkVersion>
|
||||
<AndroidManifest>Properties\AndroidManifest.xml</AndroidManifest>
|
||||
<NuGetPackageImportStamp>
|
||||
</NuGetPackageImportStamp>
|
||||
|
@ -169,7 +169,7 @@
|
||||
<Import Project="$(MSBuildExtensionsPath)\Xamarin\iOS\Xamarin.iOS.CSharp.targets" />
|
||||
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
|
||||
<PropertyGroup>
|
||||
<ErrorText>Este proyecto hace referencia a los paquetes NuGet que faltan en este equipo. Use la restauración de paquetes NuGet para descargarlos. Para obtener más información, consulte http://go.microsoft.com/fwlink/?LinkID=322105. El archivo que falta es {0}.</ErrorText>
|
||||
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
|
||||
</PropertyGroup>
|
||||
<Error Condition="!Exists('..\..\..\..\packages\xunit.runner.devices.2.1.0\build\Xamarin.iOS\xunit.runner.devices.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\..\..\packages\xunit.runner.devices.2.1.0\build\Xamarin.iOS\xunit.runner.devices.targets'))" />
|
||||
<Error Condition="!Exists('..\..\..\..\packages\Xamarin.Forms.2.3.3.175\build\portable-win+net45+wp80+win81+wpa81+MonoAndroid10+Xamarin.iOS10+xamarinmac20\Xamarin.Forms.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\..\..\packages\Xamarin.Forms.2.3.3.175\build\portable-win+net45+wp80+win81+wpa81+MonoAndroid10+Xamarin.iOS10+xamarinmac20\Xamarin.Forms.targets'))" />
|
||||
|
@ -433,7 +433,7 @@
|
||||
<Import Project="$(MSBuildExtensionsPath)\Xamarin\iOS\Xamarin.iOS.CSharp.targets" />
|
||||
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
|
||||
<PropertyGroup>
|
||||
<ErrorText>Este proyecto hace referencia a los paquetes NuGet que faltan en este equipo. Use la restauración de paquetes NuGet para descargarlos. Para obtener más información, consulte http://go.microsoft.com/fwlink/?LinkID=322105. El archivo que falta es {0}.</ErrorText>
|
||||
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
|
||||
</PropertyGroup>
|
||||
<Error Condition="!Exists('..\..\..\..\packages\Microsoft.Bcl.Build.1.0.21\build\Microsoft.Bcl.Build.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\..\..\packages\Microsoft.Bcl.Build.1.0.21\build\Microsoft.Bcl.Build.targets'))" />
|
||||
<Error Condition="!Exists('..\..\..\..\packages\Xamarin.Forms.2.3.3.175\build\portable-win+net45+wp80+win81+wpa81+MonoAndroid10+Xamarin.iOS10+xamarinmac20\Xamarin.Forms.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\..\..\packages\Xamarin.Forms.2.3.3.175\build\portable-win+net45+wp80+win81+wpa81+MonoAndroid10+Xamarin.iOS10+xamarinmac20\Xamarin.Forms.targets'))" />
|
||||
|
@ -23,10 +23,6 @@
|
||||
"environmentVariables": {
|
||||
"ASPNETCORE_ENVIRONMENT": "Development"
|
||||
}
|
||||
},
|
||||
"Docker": {
|
||||
"launchBrowser": true,
|
||||
"launchUrl": "http://localhost:{ServicePort}/api/values"
|
||||
}
|
||||
}
|
||||
}
|
@ -22,10 +22,6 @@
|
||||
"environmentVariables": {
|
||||
"ASPNETCORE_ENVIRONMENT": "Development"
|
||||
}
|
||||
},
|
||||
"Docker": {
|
||||
"launchBrowser": true,
|
||||
"launchUrl": "http://localhost:{ServicePort}/api/values"
|
||||
}
|
||||
}
|
||||
}
|
@ -13,20 +13,6 @@
|
||||
<DockerComposeProjectPath>..\..\..\..\docker-compose.dcproj</DockerComposeProjectPath>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<None Include="wwwroot\css\*.min.css" CopyToPublishDirectory="PreserveNewest" />
|
||||
<None Include="wwwroot\fonts\**\*" CopyToPublishDirectory="PreserveNewest" />
|
||||
<None Include="wwwroot\images\**\*" CopyToPublishDirectory="PreserveNewest" />
|
||||
<None Include="wwwroot\js\*.min.js" CopyToPublishDirectory="PreserveNewest" />
|
||||
<None Include="wwwroot\*.*" CopyToPublishDirectory="PreserveNewest" />
|
||||
<None Include="wwwroot\lib\bootstrap\dist\**\*.min.*" CopyToPublishDirectory="PreserveNewest" />
|
||||
<None Include="wwwroot\lib\jquery*\**\*.min.*" CopyToPublishDirectory="PreserveNewest" />
|
||||
<Content Update="wwwroot\**\*;" CopyToPublishDirectory="Never" />
|
||||
<Content Update="Views\**\*;" CopyToPublishDirectory="PreserveNewest" />
|
||||
<Content Update="web.config" CopyToPublishDirectory="PreserveNewest" />
|
||||
<Content Update=".dockerignore" CopyToPublishDirectory="PreserveNewest" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.AspNetCore.Authentication.Cookies" Version="1.1.0" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Diagnostics" Version="1.1.0" />
|
||||
@ -61,7 +47,7 @@
|
||||
|
||||
<Target Name="PrepublishScript" BeforeTargets="PrepareForPublish">
|
||||
<Exec Command="bower install --allow-root" />
|
||||
<Exec Command="dotnet bundle" />
|
||||
<Exec Command="dotnet bundle" Condition="'$(ASPNETCORE_ENVIRONMENT)'!='Development'" />
|
||||
</Target>
|
||||
|
||||
<ItemGroup>
|
||||
@ -77,8 +63,4 @@
|
||||
</None>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Folder Include="wwwroot\css\" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
@ -23,12 +23,6 @@
|
||||
"environmentVariables": {
|
||||
"ASPNETCORE_ENVIRONMENT": "Development"
|
||||
}
|
||||
},
|
||||
"Docker": {
|
||||
"executablePath": "%WINDIR%\\System32\\WindowsPowerShell\\v1.0\\powershell.exe",
|
||||
"commandLineArgs": "-ExecutionPolicy RemoteSigned .\\DockerTask.ps1 -Run -Environment $(Configuration) -Machine '$(DockerMachineName)'",
|
||||
"launchBrowser": true,
|
||||
"launchUrl": "http://localhost:{ServicePort}/api/environmentInfo/machinename"
|
||||
}
|
||||
}
|
||||
}
|
@ -109,15 +109,7 @@
|
||||
|
||||
app.UseCors("CorsPolicy");
|
||||
|
||||
var identityUrl = Configuration.GetValue<string>("IdentityUrl");
|
||||
|
||||
app.UseIdentityServerAuthentication(new IdentityServerAuthenticationOptions
|
||||
{
|
||||
Authority = identityUrl.ToString(),
|
||||
ScopeName = "orders",
|
||||
RequireHttpsMetadata = false
|
||||
});
|
||||
|
||||
ConfigureAuth(app);
|
||||
|
||||
app.UseMvcWithDefaultRoute();
|
||||
|
||||
@ -126,5 +118,16 @@
|
||||
|
||||
OrderingContextSeed.SeedAsync(app).Wait();
|
||||
}
|
||||
|
||||
protected virtual void ConfigureAuth(IApplicationBuilder app)
|
||||
{
|
||||
var identityUrl = Configuration.GetValue<string>("IdentityUrl");
|
||||
app.UseIdentityServerAuthentication(new IdentityServerAuthenticationOptions
|
||||
{
|
||||
Authority = identityUrl.ToString(),
|
||||
ScopeName = "orders",
|
||||
RequireHttpsMetadata = false
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,38 +0,0 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio 15
|
||||
VisualStudioVersion = 15.0.26228.0
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Catalog.WebForms", "Catalog.WebForms\Catalog.WebForms.csproj", "{07B42E24-32F8-4C10-99A8-0FB5AC6BFEBB}"
|
||||
EndProject
|
||||
Project("{E53339B2-1760-4266-BCC7-CA923CBCF16C}") = "docker-compose", "docker-compose.dcproj", "{7816BBB6-20B9-4D5A-864D-47B7C6E3D3D5}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{07B42E24-32F8-4C10-99A8-0FB5AC6BFEBB} = {07B42E24-32F8-4C10-99A8-0FB5AC6BFEBB}
|
||||
{9B92B9F2-0DB5-4294-8DBF-DE2F87AEADDD} = {9B92B9F2-0DB5-4294-8DBF-DE2F87AEADDD}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Catalog.API", "..\..\Services\Catalog\Catalog.API\Catalog.API.csproj", "{9B92B9F2-0DB5-4294-8DBF-DE2F87AEADDD}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
Release|Any CPU = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{07B42E24-32F8-4C10-99A8-0FB5AC6BFEBB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{07B42E24-32F8-4C10-99A8-0FB5AC6BFEBB}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{07B42E24-32F8-4C10-99A8-0FB5AC6BFEBB}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{07B42E24-32F8-4C10-99A8-0FB5AC6BFEBB}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{7816BBB6-20B9-4D5A-864D-47B7C6E3D3D5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{7816BBB6-20B9-4D5A-864D-47B7C6E3D3D5}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{7816BBB6-20B9-4D5A-864D-47B7C6E3D3D5}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{7816BBB6-20B9-4D5A-864D-47B7C6E3D3D5}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{9B92B9F2-0DB5-4294-8DBF-DE2F87AEADDD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{9B92B9F2-0DB5-4294-8DBF-DE2F87AEADDD}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{9B92B9F2-0DB5-4294-8DBF-DE2F87AEADDD}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{9B92B9F2-0DB5-4294-8DBF-DE2F87AEADDD}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
EndGlobal
|
@ -1,3 +0,0 @@
|
||||
*
|
||||
!obj\Docker\publish\*
|
||||
!obj\Docker\empty\
|
@ -1,7 +0,0 @@
|
||||
<%@ Page Title="About" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="About.aspx.cs" Inherits="Microsoft.eShopOnContainers.Catalog.WebForms.About" %>
|
||||
|
||||
<asp:Content ID="BodyContent" ContentPlaceHolderID="MainContent" runat="server">
|
||||
<h2><%: Title %>.</h2>
|
||||
<h3>Your application description page.</h3>
|
||||
<p>Use this area to provide additional information.</p>
|
||||
</asp:Content>
|
@ -1,17 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
|
||||
namespace Microsoft.eShopOnContainers.Catalog.WebForms
|
||||
{
|
||||
public partial class About : Page
|
||||
{
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
@ -1,15 +0,0 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace Microsoft.eShopOnContainers.Catalog.WebForms {
|
||||
|
||||
|
||||
public partial class About {
|
||||
}
|
||||
}
|
@ -1,46 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using System.Web.Optimization;
|
||||
using System.Web.UI;
|
||||
|
||||
namespace Microsoft.eShopOnContainers.Catalog.WebForms
|
||||
{
|
||||
public class BundleConfig
|
||||
{
|
||||
// For more information on Bundling, visit https://go.microsoft.com/fwlink/?LinkID=303951
|
||||
public static void RegisterBundles(BundleCollection bundles)
|
||||
{
|
||||
bundles.Add(new ScriptBundle("~/bundles/WebFormsJs").Include(
|
||||
"~/Scripts/WebForms/WebForms.js",
|
||||
"~/Scripts/WebForms/WebUIValidation.js",
|
||||
"~/Scripts/WebForms/MenuStandards.js",
|
||||
"~/Scripts/WebForms/Focus.js",
|
||||
"~/Scripts/WebForms/GridView.js",
|
||||
"~/Scripts/WebForms/DetailsView.js",
|
||||
"~/Scripts/WebForms/TreeView.js",
|
||||
"~/Scripts/WebForms/WebParts.js"));
|
||||
|
||||
// Order is very important for these files to work, they have explicit dependencies
|
||||
bundles.Add(new ScriptBundle("~/bundles/MsAjaxJs").Include(
|
||||
"~/Scripts/WebForms/MsAjax/MicrosoftAjax.js",
|
||||
"~/Scripts/WebForms/MsAjax/MicrosoftAjaxApplicationServices.js",
|
||||
"~/Scripts/WebForms/MsAjax/MicrosoftAjaxTimer.js",
|
||||
"~/Scripts/WebForms/MsAjax/MicrosoftAjaxWebForms.js"));
|
||||
|
||||
// Use the Development version of Modernizr to develop with and learn from. Then, when you’re
|
||||
// ready for production, use the build tool at https://modernizr.com to pick only the tests you need
|
||||
bundles.Add(new ScriptBundle("~/bundles/modernizr").Include(
|
||||
"~/Scripts/modernizr-*"));
|
||||
|
||||
System.Web.UI.ScriptManager.ScriptResourceMapping.AddDefinition(
|
||||
"respond",
|
||||
new ScriptResourceDefinition
|
||||
{
|
||||
Path = "~/Scripts/respond.min.js",
|
||||
DebugPath = "~/Scripts/respond.js",
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
@ -1,18 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Web;
|
||||
using System.Web.Routing;
|
||||
using Microsoft.AspNet.FriendlyUrls;
|
||||
|
||||
namespace Microsoft.eShopOnContainers.Catalog.WebForms
|
||||
{
|
||||
public static class RouteConfig
|
||||
{
|
||||
public static void RegisterRoutes(RouteCollection routes)
|
||||
{
|
||||
var settings = new FriendlyUrlSettings();
|
||||
settings.AutoRedirectMode = RedirectMode.Permanent;
|
||||
routes.EnableFriendlyUrls(settings);
|
||||
}
|
||||
}
|
||||
}
|
@ -1,79 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<ApplicationInsights xmlns="http://schemas.microsoft.com/ApplicationInsights/2013/Settings">
|
||||
<TelemetryInitializers>
|
||||
<Add Type="Microsoft.ApplicationInsights.DependencyCollector.HttpDependenciesParsingTelemetryInitializer, Microsoft.AI.DependencyCollector"/>
|
||||
<Add Type="Microsoft.ApplicationInsights.WindowsServer.AzureRoleEnvironmentTelemetryInitializer, Microsoft.AI.WindowsServer"/>
|
||||
<Add Type="Microsoft.ApplicationInsights.WindowsServer.AzureWebAppRoleEnvironmentTelemetryInitializer, Microsoft.AI.WindowsServer"/>
|
||||
<Add Type="Microsoft.ApplicationInsights.WindowsServer.BuildInfoConfigComponentVersionTelemetryInitializer, Microsoft.AI.WindowsServer"/>
|
||||
<Add Type="Microsoft.ApplicationInsights.Web.WebTestTelemetryInitializer, Microsoft.AI.Web"/>
|
||||
<Add Type="Microsoft.ApplicationInsights.Web.SyntheticUserAgentTelemetryInitializer, Microsoft.AI.Web">
|
||||
<!-- Extended list of bots:
|
||||
search|spider|crawl|Bot|Monitor|BrowserMob|BingPreview|PagePeeker|WebThumb|URL2PNG|ZooShot|GomezA|Google SketchUp|Read Later|KTXN|KHTE|Keynote|Pingdom|AlwaysOn|zao|borg|oegp|silk|Xenu|zeal|NING|htdig|lycos|slurp|teoma|voila|yahoo|Sogou|CiBra|Nutch|Java|JNLP|Daumoa|Genieo|ichiro|larbin|pompos|Scrapy|snappy|speedy|vortex|favicon|indexer|Riddler|scooter|scraper|scrubby|WhatWeb|WinHTTP|voyager|archiver|Icarus6j|mogimogi|Netvibes|altavista|charlotte|findlinks|Retreiver|TLSProber|WordPress|wsr-agent|http client|Python-urllib|AppEngine-Google|semanticdiscovery|facebookexternalhit|web/snippet|Google-HTTP-Java-Client-->
|
||||
<Filters>search|spider|crawl|Bot|Monitor|AlwaysOn</Filters>
|
||||
</Add>
|
||||
<Add Type="Microsoft.ApplicationInsights.Web.ClientIpHeaderTelemetryInitializer, Microsoft.AI.Web"/>
|
||||
<Add Type="Microsoft.ApplicationInsights.Web.OperationNameTelemetryInitializer, Microsoft.AI.Web"/>
|
||||
<Add Type="Microsoft.ApplicationInsights.Web.OperationCorrelationTelemetryInitializer, Microsoft.AI.Web"/>
|
||||
<Add Type="Microsoft.ApplicationInsights.Web.UserTelemetryInitializer, Microsoft.AI.Web"/>
|
||||
<Add Type="Microsoft.ApplicationInsights.Web.AuthenticatedUserIdTelemetryInitializer, Microsoft.AI.Web"/>
|
||||
<Add Type="Microsoft.ApplicationInsights.Web.AccountIdTelemetryInitializer, Microsoft.AI.Web"/>
|
||||
<Add Type="Microsoft.ApplicationInsights.Web.SessionTelemetryInitializer, Microsoft.AI.Web"/>
|
||||
</TelemetryInitializers>
|
||||
<TelemetryModules>
|
||||
<Add Type="Microsoft.ApplicationInsights.DependencyCollector.DependencyTrackingTelemetryModule, Microsoft.AI.DependencyCollector"/>
|
||||
<Add Type="Microsoft.ApplicationInsights.Extensibility.PerfCounterCollector.PerformanceCollectorModule, Microsoft.AI.PerfCounterCollector">
|
||||
<!--
|
||||
Use the following syntax here to collect additional performance counters:
|
||||
|
||||
<Counters>
|
||||
<Add PerformanceCounter="\Process(??APP_WIN32_PROC??)\Handle Count" ReportAs="Process handle count" />
|
||||
...
|
||||
</Counters>
|
||||
|
||||
PerformanceCounter must be either \CategoryName(InstanceName)\CounterName or \CategoryName\CounterName
|
||||
|
||||
NOTE: performance counters configuration will be lost upon NuGet upgrade.
|
||||
|
||||
The following placeholders are supported as InstanceName:
|
||||
??APP_WIN32_PROC?? - instance name of the application process for Win32 counters.
|
||||
??APP_W3SVC_PROC?? - instance name of the application IIS worker process for IIS/ASP.NET counters.
|
||||
??APP_CLR_PROC?? - instance name of the application CLR process for .NET counters.
|
||||
-->
|
||||
</Add>
|
||||
<Add Type="Microsoft.ApplicationInsights.Extensibility.PerfCounterCollector.QuickPulse.QuickPulseTelemetryModule, Microsoft.AI.PerfCounterCollector"/>
|
||||
<Add Type="Microsoft.ApplicationInsights.WindowsServer.DeveloperModeWithDebuggerAttachedTelemetryModule, Microsoft.AI.WindowsServer"/>
|
||||
<Add Type="Microsoft.ApplicationInsights.WindowsServer.UnhandledExceptionTelemetryModule, Microsoft.AI.WindowsServer"/>
|
||||
<Add Type="Microsoft.ApplicationInsights.WindowsServer.UnobservedExceptionTelemetryModule, Microsoft.AI.WindowsServer"/>
|
||||
<Add Type="Microsoft.ApplicationInsights.Web.RequestTrackingTelemetryModule, Microsoft.AI.Web">
|
||||
<Handlers>
|
||||
<!--
|
||||
Add entries here to filter out additional handlers:
|
||||
|
||||
NOTE: handler configuration will be lost upon NuGet upgrade.
|
||||
-->
|
||||
<Add>System.Web.Handlers.TransferRequestHandler</Add>
|
||||
<Add>Microsoft.VisualStudio.Web.PageInspector.Runtime.Tracing.RequestDataHttpHandler</Add>
|
||||
<Add>System.Web.StaticFileHandler</Add>
|
||||
<Add>System.Web.Handlers.AssemblyResourceLoader</Add>
|
||||
<Add>System.Web.Optimization.BundleHandler</Add>
|
||||
<Add>System.Web.Script.Services.ScriptHandlerFactory</Add>
|
||||
<Add>System.Web.Handlers.TraceHandler</Add>
|
||||
<Add>System.Web.Services.Discovery.DiscoveryRequestHandler</Add>
|
||||
<Add>System.Web.HttpDebugHandler</Add>
|
||||
</Handlers>
|
||||
</Add>
|
||||
<Add Type="Microsoft.ApplicationInsights.Web.ExceptionTrackingTelemetryModule, Microsoft.AI.Web"/>
|
||||
</TelemetryModules>
|
||||
<TelemetryProcessors>
|
||||
<Add Type="Microsoft.ApplicationInsights.Extensibility.PerfCounterCollector.QuickPulse.QuickPulseTelemetryProcessor, Microsoft.AI.PerfCounterCollector"/>
|
||||
<Add Type="Microsoft.ApplicationInsights.WindowsServer.TelemetryChannel.AdaptiveSamplingTelemetryProcessor, Microsoft.AI.ServerTelemetryChannel">
|
||||
<MaxTelemetryItemsPerSecond>5</MaxTelemetryItemsPerSecond>
|
||||
</Add>
|
||||
</TelemetryProcessors>
|
||||
<TelemetryChannel Type="Microsoft.ApplicationInsights.WindowsServer.TelemetryChannel.ServerTelemetryChannel, Microsoft.AI.ServerTelemetryChannel"/>
|
||||
<!--
|
||||
Learn more about Application Insights configuration with ApplicationInsights.config here:
|
||||
http://go.microsoft.com/fwlink/?LinkID=513840
|
||||
|
||||
Note: If not present, please add <InstrumentationKey>Your Key</InstrumentationKey> to the top of this file.
|
||||
--></ApplicationInsights>
|
@ -1,7 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<bundles version="1.0">
|
||||
<styleBundle path="~/Content/css">
|
||||
<include path="~/Content/bootstrap.css" />
|
||||
<include path="~/Content/Site.css" />
|
||||
</styleBundle>
|
||||
</bundles>
|
@ -1,304 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="..\packages\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.1.0.3\build\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.props" Condition="Exists('..\packages\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.1.0.3\build\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.props')" />
|
||||
<Import Project="..\packages\Microsoft.Net.Compilers.1.3.2\build\Microsoft.Net.Compilers.props" Condition="Exists('..\packages\Microsoft.Net.Compilers.1.3.2\build\Microsoft.Net.Compilers.props')" />
|
||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProductVersion>
|
||||
</ProductVersion>
|
||||
<SchemaVersion>2.0</SchemaVersion>
|
||||
<ProjectGuid>{07B42E24-32F8-4C10-99A8-0FB5AC6BFEBB}</ProjectGuid>
|
||||
<ProjectTypeGuids>{349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>
|
||||
<OutputType>Library</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>Microsoft.eShopOnContainers.Catalog.WebForms</RootNamespace>
|
||||
<AssemblyName>Catalog.WebForms</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
|
||||
<UseIISExpress>true</UseIISExpress>
|
||||
<IISExpressSSLPort />
|
||||
<IISExpressAnonymousAuthentication />
|
||||
<IISExpressWindowsAuthentication />
|
||||
<IISExpressUseClassicPipelineMode />
|
||||
<UseGlobalApplicationHostFile />
|
||||
<NuGetPackageImportStamp>
|
||||
</NuGetPackageImportStamp>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="Autofac, Version=4.3.0.0, Culture=neutral, PublicKeyToken=17863af14b0044da, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Autofac.4.3.0\lib\net45\Autofac.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=1.0.3.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.1.0.3\lib\net45\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
<Reference Include="System.ComponentModel.DataAnnotations" />
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Data.DataSetExtensions" />
|
||||
<Reference Include="System.Web.Extensions" />
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
<Reference Include="System.Drawing" />
|
||||
<Reference Include="System.Web" />
|
||||
<Reference Include="System.Xml" />
|
||||
<Reference Include="System.Configuration" />
|
||||
<Reference Include="System.Web.Services" />
|
||||
<Reference Include="System.EnterpriseServices" />
|
||||
<Reference Include="System.Web.DynamicData" />
|
||||
<Reference Include="System.Web.Entity" />
|
||||
<Reference Include="System.Web.ApplicationServices" />
|
||||
<Reference Include="Microsoft.Web.Infrastructure, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<Private>True</Private>
|
||||
<HintPath>..\packages\Microsoft.Web.Infrastructure.1.0.0.0\lib\net40\Microsoft.Web.Infrastructure.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="AspNet.ScriptManager.bootstrap">
|
||||
<HintPath>..\packages\AspNet.ScriptManager.bootstrap.3.0.0\lib\net45\AspNet.ScriptManager.bootstrap.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="AspNet.ScriptManager.jQuery">
|
||||
<HintPath>..\packages\AspNet.ScriptManager.jQuery.1.10.2\lib\net45\AspNet.ScriptManager.jQuery.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.ScriptManager.MSAjax">
|
||||
<HintPath>..\packages\Microsoft.AspNet.ScriptManager.MSAjax.5.0.0\lib\net45\Microsoft.ScriptManager.MSAjax.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.ScriptManager.WebForms">
|
||||
<HintPath>..\packages\Microsoft.AspNet.ScriptManager.WebForms.5.0.0\lib\net45\Microsoft.ScriptManager.WebForms.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Web.Optimization, Version=1.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35">
|
||||
<HintPath>..\packages\Microsoft.AspNet.Web.Optimization.1.1.3\lib\net40\System.Web.Optimization.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="WebGrease">
|
||||
<Private>True</Private>
|
||||
<HintPath>..\packages\WebGrease.1.5.2\lib\WebGrease.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Antlr3.Runtime">
|
||||
<Private>True</Private>
|
||||
<HintPath>..\packages\Antlr.3.4.1.9004\lib\Antlr3.Runtime.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.AspNet.Web.Optimization.WebForms">
|
||||
<Private>True</Private>
|
||||
<HintPath>..\packages\Microsoft.AspNet.Web.Optimization.WebForms.1.1.3\lib\net45\Microsoft.AspNet.Web.Optimization.WebForms.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.AspNet.FriendlyUrls">
|
||||
<HintPath>..\packages\Microsoft.AspNet.FriendlyUrls.Core.1.0.2\lib\net45\Microsoft.AspNet.FriendlyUrls.dll</HintPath>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="Newtonsoft.Json">
|
||||
<HintPath>..\packages\Newtonsoft.Json.6.0.4\lib\net45\Newtonsoft.Json.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.ApplicationInsights">
|
||||
<HintPath>..\packages\Microsoft.ApplicationInsights.2.2.0\lib\net45\Microsoft.ApplicationInsights.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.AI.Agent.Intercept">
|
||||
<HintPath>..\packages\Microsoft.ApplicationInsights.Agent.Intercept.2.0.6\lib\net45\Microsoft.AI.Agent.Intercept.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.AI.DependencyCollector">
|
||||
<HintPath>..\packages\Microsoft.ApplicationInsights.DependencyCollector.2.2.0\lib\net45\Microsoft.AI.DependencyCollector.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.AI.PerfCounterCollector">
|
||||
<HintPath>..\packages\Microsoft.ApplicationInsights.PerfCounterCollector.2.2.0\lib\net45\Microsoft.AI.PerfCounterCollector.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.AI.ServerTelemetryChannel">
|
||||
<HintPath>..\packages\Microsoft.ApplicationInsights.WindowsServer.TelemetryChannel.2.2.0\lib\net45\Microsoft.AI.ServerTelemetryChannel.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.AI.WindowsServer">
|
||||
<HintPath>..\packages\Microsoft.ApplicationInsights.WindowsServer.2.2.0\lib\net45\Microsoft.AI.WindowsServer.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.AI.Web">
|
||||
<HintPath>..\packages\Microsoft.ApplicationInsights.Web.2.2.0\lib\net45\Microsoft.AI.Web.dll</HintPath>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="About.aspx" />
|
||||
<Content Include="Contact.aspx" />
|
||||
<Content Include="Content\bootstrap.css" />
|
||||
<Content Include="Content\bootstrap.min.css" />
|
||||
<Content Include="Content\fake_product_01.png" />
|
||||
<Content Include="Content\fake_product_02.png" />
|
||||
<Content Include="Content\fake_product_03.png" />
|
||||
<Content Include="Content\fake_product_04.png" />
|
||||
<Content Include="Content\fake_product_05.png" />
|
||||
<Content Include="Content\Site.css" />
|
||||
<Content Include="Default.aspx" />
|
||||
<Content Include="favicon.ico" />
|
||||
<Content Include="fonts\glyphicons-halflings-regular.svg" />
|
||||
<Content Include="Global.asax" />
|
||||
<Content Include="fonts\glyphicons-halflings-regular.woff" />
|
||||
<Content Include="fonts\glyphicons-halflings-regular.ttf" />
|
||||
<Content Include="fonts\glyphicons-halflings-regular.eot" />
|
||||
<Content Include="ApplicationInsights.config">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<None Include="Dockerfile" />
|
||||
<None Include=".dockerignore">
|
||||
<DependentUpon>Dockerfile</DependentUpon>
|
||||
</None>
|
||||
<None Include="Properties\PublishProfiles\FolderProfile.pubxml" />
|
||||
<None Include="Scripts\jquery-1.10.2.intellisense.js" />
|
||||
<Content Include="Scripts\bootstrap.js" />
|
||||
<Content Include="Scripts\bootstrap.min.js" />
|
||||
<Content Include="Scripts\jquery-1.10.2.js" />
|
||||
<Content Include="Scripts\jquery-1.10.2.min.js" />
|
||||
<Content Include="Scripts\modernizr-2.6.2.js" />
|
||||
<Content Include="Scripts\respond.js" />
|
||||
<Content Include="Scripts\respond.min.js" />
|
||||
<Content Include="Scripts\WebForms\DetailsView.js" />
|
||||
<Content Include="Scripts\WebForms\Focus.js" />
|
||||
<Content Include="Scripts\WebForms\GridView.js" />
|
||||
<Content Include="Scripts\WebForms\Menu.js" />
|
||||
<Content Include="Scripts\WebForms\MenuStandards.js" />
|
||||
<Content Include="Scripts\WebForms\MSAjax\MicrosoftAjax.js" />
|
||||
<Content Include="Scripts\WebForms\MSAjax\MicrosoftAjaxApplicationServices.js" />
|
||||
<Content Include="Scripts\WebForms\MSAjax\MicrosoftAjaxComponentModel.js" />
|
||||
<Content Include="Scripts\WebForms\MSAjax\MicrosoftAjaxCore.js" />
|
||||
<Content Include="Scripts\WebForms\MSAjax\MicrosoftAjaxGlobalization.js" />
|
||||
<Content Include="Scripts\WebForms\MSAjax\MicrosoftAjaxHistory.js" />
|
||||
<Content Include="Scripts\WebForms\MSAjax\MicrosoftAjaxNetwork.js" />
|
||||
<Content Include="Scripts\WebForms\MSAjax\MicrosoftAjaxSerialization.js" />
|
||||
<Content Include="Scripts\WebForms\MSAjax\MicrosoftAjaxTimer.js" />
|
||||
<Content Include="Scripts\WebForms\MSAjax\MicrosoftAjaxWebForms.js" />
|
||||
<Content Include="Scripts\WebForms\MSAjax\MicrosoftAjaxWebServices.js" />
|
||||
<Content Include="Scripts\WebForms\SmartNav.js" />
|
||||
<Content Include="Scripts\WebForms\TreeView.js" />
|
||||
<Content Include="Scripts\WebForms\WebForms.js" />
|
||||
<Content Include="Scripts\WebForms\WebParts.js" />
|
||||
<Content Include="Scripts\WebForms\WebUIValidation.js" />
|
||||
<Content Include="Site.Master" />
|
||||
<Content Include="ViewSwitcher.ascx" />
|
||||
<Content Include="Web.config" />
|
||||
<Content Include="Bundle.config" />
|
||||
<Content Include="Site.Mobile.Master" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="App_Start\BundleConfig.cs" />
|
||||
<Compile Include="About.aspx.cs">
|
||||
<DependentUpon>About.aspx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
</Compile>
|
||||
<Compile Include="About.aspx.designer.cs">
|
||||
<DependentUpon>About.aspx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="App_Start\RouteConfig.cs" />
|
||||
<Compile Include="Contact.aspx.cs">
|
||||
<DependentUpon>Contact.aspx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Contact.aspx.designer.cs">
|
||||
<DependentUpon>Contact.aspx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Default.aspx.cs">
|
||||
<DependentUpon>Default.aspx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Default.aspx.designer.cs">
|
||||
<DependentUpon>Default.aspx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Extensions\ObservableExtensions.cs" />
|
||||
<Compile Include="Global.asax.cs">
|
||||
<DependentUpon>Global.asax</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Models\CatalogBrand.cs" />
|
||||
<Compile Include="Models\CatalogItem.cs" />
|
||||
<Compile Include="Models\CatalogRoot.cs" />
|
||||
<Compile Include="Models\CatalogType.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="Services\CatalogMockService.cs" />
|
||||
<Compile Include="Services\CatalogService.cs" />
|
||||
<Compile Include="Services\Common.cs" />
|
||||
<Compile Include="Services\ICatalogService.cs" />
|
||||
<Compile Include="Services\IRouteProvider.cs" />
|
||||
<Compile Include="Site.Master.cs">
|
||||
<DependentUpon>Site.Master</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Site.Master.designer.cs">
|
||||
<DependentUpon>Site.Master</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Site.Mobile.Master.cs">
|
||||
<DependentUpon>Site.Mobile.Master</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Site.Mobile.Master.designer.cs">
|
||||
<DependentUpon>Site.Mobile.Master</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="ViewSwitcher.ascx.cs">
|
||||
<DependentUpon>ViewSwitcher.ascx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
</Compile>
|
||||
<Compile Include="ViewSwitcher.ascx.designer.cs">
|
||||
<DependentUpon>ViewSwitcher.ascx</DependentUpon>
|
||||
</Compile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Folder Include="App_Data\" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="packages.config" />
|
||||
<Content Include="Scripts\jquery-1.10.2.min.map" />
|
||||
<None Include="Web.Debug.config">
|
||||
<DependentUpon>Web.config</DependentUpon>
|
||||
</None>
|
||||
<None Include="Web.Release.config">
|
||||
<DependentUpon>Web.config</DependentUpon>
|
||||
</None>
|
||||
</ItemGroup>
|
||||
<PropertyGroup>
|
||||
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">10.0</VisualStudioVersion>
|
||||
<VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
|
||||
<Import Project="$(VSToolsPath)\WebApplications\Microsoft.WebApplication.targets" Condition="'$(VSToolsPath)' != ''" />
|
||||
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v10.0\WebApplications\Microsoft.WebApplication.targets" Condition="false" />
|
||||
<ProjectExtensions>
|
||||
<VisualStudio>
|
||||
<FlavorProperties GUID="{349c5851-65df-11da-9384-00065b846f21}">
|
||||
<WebProjectProperties>
|
||||
<UseIIS>True</UseIIS>
|
||||
<AutoAssignPort>True</AutoAssignPort>
|
||||
<DevelopmentServerPort>58178</DevelopmentServerPort>
|
||||
<DevelopmentServerVPath>/</DevelopmentServerVPath>
|
||||
<IISUrl>http://localhost:58178/</IISUrl>
|
||||
<NTLMAuthentication>False</NTLMAuthentication>
|
||||
<UseCustomServer>False</UseCustomServer>
|
||||
<CustomServerUrl>
|
||||
</CustomServerUrl>
|
||||
<SaveServerSettingsInUserFile>False</SaveServerSettingsInUserFile>
|
||||
</WebProjectProperties>
|
||||
</FlavorProperties>
|
||||
</VisualStudio>
|
||||
</ProjectExtensions>
|
||||
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
|
||||
<PropertyGroup>
|
||||
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
|
||||
</PropertyGroup>
|
||||
<Error Condition="!Exists('..\packages\Microsoft.Net.Compilers.1.3.2\build\Microsoft.Net.Compilers.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Microsoft.Net.Compilers.1.3.2\build\Microsoft.Net.Compilers.props'))" />
|
||||
<Error Condition="!Exists('..\packages\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.1.0.3\build\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.1.0.3\build\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.props'))" />
|
||||
</Target>
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
<Target Name="BeforeBuild">
|
||||
</Target>
|
||||
<Target Name="AfterBuild">
|
||||
</Target>
|
||||
-->
|
||||
</Project>
|
@ -1,17 +0,0 @@
|
||||
<%@ Page Title="Contact" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="Contact.aspx.cs" Inherits="Microsoft.eShopOnContainers.Catalog.WebForms.Contact" %>
|
||||
|
||||
<asp:Content ID="BodyContent" ContentPlaceHolderID="MainContent" runat="server">
|
||||
<h2><%: Title %>.</h2>
|
||||
<h3>Your contact page.</h3>
|
||||
<address>
|
||||
One Microsoft Way<br />
|
||||
Redmond, WA 98052-6399<br />
|
||||
<abbr title="Phone">P:</abbr>
|
||||
425.555.0100
|
||||
</address>
|
||||
|
||||
<address>
|
||||
<strong>Support:</strong> <a href="mailto:Support@example.com">Support@example.com</a><br />
|
||||
<strong>Marketing:</strong> <a href="mailto:Marketing@example.com">Marketing@example.com</a>
|
||||
</address>
|
||||
</asp:Content>
|
@ -1,17 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
|
||||
namespace Microsoft.eShopOnContainers.Catalog.WebForms
|
||||
{
|
||||
public partial class Contact : Page
|
||||
{
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
@ -1,15 +0,0 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace Microsoft.eShopOnContainers.Catalog.WebForms {
|
||||
|
||||
|
||||
public partial class Contact {
|
||||
}
|
||||
}
|
@ -1,31 +0,0 @@
|
||||
/* Move down content because we have a fixed navbar that is 50px tall */
|
||||
body {
|
||||
padding-top: 50px;
|
||||
padding-bottom: 20px;
|
||||
}
|
||||
|
||||
/* Wrapping element */
|
||||
/* Set some basic padding to keep content from hitting the edges */
|
||||
.body-content {
|
||||
padding-left: 15px;
|
||||
padding-right: 15px;
|
||||
}
|
||||
|
||||
/* Set widths on the form inputs since otherwise they're 100% wide */
|
||||
input,
|
||||
select,
|
||||
textarea {
|
||||
max-width: 280px;
|
||||
}
|
||||
|
||||
|
||||
/* Responsive: Portrait tablets and up */
|
||||
@media screen and (min-width: 768px) {
|
||||
.jumbotron {
|
||||
margin-top: 20px;
|
||||
}
|
||||
|
||||
.body-content {
|
||||
padding: 0;
|
||||
}
|
||||
}
|
Before Width: | Height: | Size: 595 KiB |
Before Width: | Height: | Size: 560 KiB |
Before Width: | Height: | Size: 504 KiB |
Before Width: | Height: | Size: 81 KiB |
Before Width: | Height: | Size: 498 KiB |
@ -1,73 +0,0 @@
|
||||
<%@ Page Title="Home Page" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="Microsoft.eShopOnContainers.Catalog.WebForms._Default" Async="true" %>
|
||||
|
||||
<asp:Content ID="BodyContent" ContentPlaceHolderID="MainContent" runat="server">
|
||||
<div class="row">
|
||||
<asp:ListView ID="catalogList" runat="server"
|
||||
DataKeyNames="Id" GroupItemCount="4"
|
||||
ItemType="eShopOnContainers.Core.Models.Catalog.CatalogItem">
|
||||
<EmptyDataTemplate>
|
||||
<table >
|
||||
<tr>
|
||||
<td>Well, there's nothing in the catalog.</td>
|
||||
</tr>
|
||||
</table>
|
||||
</EmptyDataTemplate>
|
||||
<EmptyItemTemplate>
|
||||
<td/>
|
||||
</EmptyItemTemplate>
|
||||
<GroupTemplate>
|
||||
<tr id="itemPlaceholderContainer" runat="server">
|
||||
<td id="itemPlaceholder" runat="server"></td>
|
||||
</tr>
|
||||
</GroupTemplate>
|
||||
<ItemTemplate>
|
||||
<td runat="server">
|
||||
<table>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="ProductDetails.aspx?productID=<%#:Item.Id%>">
|
||||
<img src="<%#:Item.PictureUri%>"
|
||||
style="border: solid" /></a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="ProductDetails.aspx?productID=<%#:Item.Id%>">
|
||||
<span>
|
||||
<%#:Item.Name%>
|
||||
</span>
|
||||
</a>
|
||||
<br />
|
||||
<span>
|
||||
<b>Price: </b><%#:String.Format("{0:c}", Item.Price)%>
|
||||
</span>
|
||||
<br />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</p>
|
||||
</td>
|
||||
</ItemTemplate>
|
||||
<LayoutTemplate>
|
||||
<table style="width:100%;">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
<table id="groupPlaceholderContainer" runat="server" style="width:100%">
|
||||
<tr id="groupPlaceholder"></tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr></tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</LayoutTemplate>
|
||||
</asp:ListView>
|
||||
</div>
|
||||
</asp:Content>
|
@ -1,45 +0,0 @@
|
||||
using Autofac;
|
||||
using Autofac.Core;
|
||||
using eShopOnContainers.Core.Models.Catalog;
|
||||
using eShopOnContainers.Core.Services.Catalog;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using System.Web;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
|
||||
namespace Microsoft.eShopOnContainers.Catalog.WebForms
|
||||
{
|
||||
public partial class _Default : Page
|
||||
{
|
||||
private ILifetimeScope scope;
|
||||
|
||||
private ICatalogService catalog;
|
||||
|
||||
protected override void OnLoad(EventArgs e)
|
||||
{
|
||||
RegisterAsyncTask(new PageAsyncTask(LoadCatalogDataAsync));
|
||||
|
||||
base.OnLoad(e);
|
||||
}
|
||||
|
||||
private async Task LoadCatalogDataAsync()
|
||||
{
|
||||
var container = Application.Get("container") as IContainer;
|
||||
using (scope = container?.BeginLifetimeScope())
|
||||
{
|
||||
catalog = container?.Resolve<ICatalogService>();
|
||||
var collection = await catalog?.GetCatalogAsync();
|
||||
catalogList.DataSource = collection;
|
||||
catalogList.DataBind();
|
||||
}
|
||||
}
|
||||
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
@ -1,24 +0,0 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace Microsoft.eShopOnContainers.Catalog.WebForms {
|
||||
|
||||
|
||||
public partial class _Default {
|
||||
|
||||
/// <summary>
|
||||
/// catalogList control.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Auto-generated field.
|
||||
/// To modify move field declaration from designer file to code-behind file.
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.ListView catalogList;
|
||||
}
|
||||
}
|
@ -1,4 +0,0 @@
|
||||
FROM microsoft/aspnet
|
||||
ARG source
|
||||
WORKDIR /inetpub/wwwroot
|
||||
COPY ${source:-obj/Docker/publish} .
|
@ -1,28 +0,0 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
|
||||
namespace eShopOnContainers.Core.Extensions
|
||||
{
|
||||
public static class ObservableExtension
|
||||
{
|
||||
public static ObservableCollection<T> ToObservableCollection<T>(this IEnumerable<T> source)
|
||||
{
|
||||
ObservableCollection<T> collection = new ObservableCollection<T>();
|
||||
|
||||
try
|
||||
{
|
||||
foreach (T item in source)
|
||||
{
|
||||
collection.Add(item);
|
||||
}
|
||||
|
||||
return collection;
|
||||
}
|
||||
// Really?
|
||||
catch
|
||||
{
|
||||
return collection;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -1 +0,0 @@
|
||||
<%@ Application Codebehind="Global.asax.cs" Inherits="Microsoft.eShopOnContainers.Catalog.WebForms.Global" Language="C#" %>
|
@ -1,41 +0,0 @@
|
||||
using Autofac;
|
||||
using eShopOnContainers.Core.Services.Catalog;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using System.Web.Configuration;
|
||||
using System.Web.Optimization;
|
||||
using System.Web.Routing;
|
||||
using System.Web.Security;
|
||||
using System.Web.SessionState;
|
||||
|
||||
namespace Microsoft.eShopOnContainers.Catalog.WebForms
|
||||
{
|
||||
public class Global : HttpApplication
|
||||
{
|
||||
|
||||
void Application_Start(object sender, EventArgs e)
|
||||
{
|
||||
// Code that runs on application startup
|
||||
RouteConfig.RegisterRoutes(RouteTable.Routes);
|
||||
BundleConfig.RegisterBundles(BundleTable.Bundles);
|
||||
|
||||
// Register Containers:
|
||||
var settings= WebConfigurationManager.AppSettings;
|
||||
var useFake = settings["usefake"];
|
||||
bool fake = useFake == "true";
|
||||
var builder = new ContainerBuilder();
|
||||
if (fake)
|
||||
{
|
||||
builder.RegisterType<CatalogMockService>()
|
||||
.As<ICatalogService>();
|
||||
} else {
|
||||
builder.RegisterType<CatalogMockService>()
|
||||
.As<ICatalogService>();
|
||||
}
|
||||
var container = builder.Build();
|
||||
Application.Add("container", container);
|
||||
}
|
||||
}
|
||||
}
|
@ -1,13 +0,0 @@
|
||||
// Taken from https://github.com/dotnet/eShopOnContainers/blob/vs2017/src/Mobile/eShopOnContainers/eShopOnContainers.Core/Models/Catalog/CatalogBrand.cs
|
||||
// Issue: How to make this DRY and still support the monolithic lift and shift scenario?
|
||||
|
||||
namespace eShopOnContainers.Core.Models.Catalog
|
||||
{
|
||||
public class CatalogBrand
|
||||
{
|
||||
public int Id { get; set; }
|
||||
public string Brand { get; set; }
|
||||
|
||||
public override string ToString() => Brand;
|
||||
}
|
||||
}
|
@ -1,17 +0,0 @@
|
||||
// Taken from https://github.com/dotnet/eShopOnContainers/blob/vs2017/src/Mobile/eShopOnContainers/eShopOnContainers.Core/Models/Catalog/CatalogItem.cs
|
||||
// Issue: How to make this DRY and still support the monolithic lift and shift scenario?
|
||||
namespace eShopOnContainers.Core.Models.Catalog
|
||||
{
|
||||
public class CatalogItem
|
||||
{
|
||||
public string Id { get; set; }
|
||||
public string Name { get; set; }
|
||||
public string Description { get; set; }
|
||||
public decimal Price { get; set; }
|
||||
public string PictureUri { get; set; }
|
||||
public int CatalogBrandId { get; set; }
|
||||
public string CatalogBrand { get; set; }
|
||||
public int CatalogTypeId { get; set; }
|
||||
public string CatalogType { get; set; }
|
||||
}
|
||||
}
|
@ -1,12 +0,0 @@
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace eShopOnContainers.Core.Models.Catalog
|
||||
{
|
||||
public class CatalogRoot
|
||||
{
|
||||
public int PageIndex { get; set; }
|
||||
public int PageSize { get; set; }
|
||||
public int Count { get; set; }
|
||||
public List<CatalogItem> Data { get; set; }
|
||||
}
|
||||
}
|
@ -1,12 +0,0 @@
|
||||
// Taken from https://github.com/dotnet/eShopOnContainers/blob/vs2017/src/Mobile/eShopOnContainers/eShopOnContainers.Core/Models/Catalog/CatalogType.cs
|
||||
// Issue: How to make this DRY and still support the monolithic lift and shift scenario?
|
||||
namespace eShopOnContainers.Core.Models.Catalog
|
||||
{
|
||||
public class CatalogType
|
||||
{
|
||||
public int Id { get; set; }
|
||||
public string Type { get; set; }
|
||||
|
||||
public override string ToString() => Type;
|
||||
}
|
||||
}
|
@ -1,35 +0,0 @@
|
||||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// General Information about an assembly is controlled through the following
|
||||
// set of attributes. Change these attribute values to modify the information
|
||||
// associated with an assembly.
|
||||
[assembly: AssemblyTitle("Catalog.WebForms")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyProduct("Catalog.WebForms")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2017")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
// Setting ComVisible to false makes the types in this assembly not visible
|
||||
// to COM components. If you need to access a type in this assembly from
|
||||
// COM, set the ComVisible attribute to true on that type.
|
||||
[assembly: ComVisible(false)]
|
||||
|
||||
// The following GUID is for the ID of the typelib if this project is exposed to COM
|
||||
[assembly: Guid("07b42e24-32f8-4c10-99a8-0fb5ac6bfebb")]
|
||||
|
||||
// Version information for an assembly consists of the following four values:
|
||||
//
|
||||
// Major Version
|
||||
// Minor Version
|
||||
// Build Number
|
||||
// Revision
|
||||
//
|
||||
// You can specify all the values or you can default the Revision and Build Numbers
|
||||
// by using the '*' as shown below:
|
||||
[assembly: AssemblyVersion("1.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
@ -1,34 +0,0 @@
|
||||
//CdnPath=http://ajax.aspnetcdn.com/ajax/4.5.1/1/DetailsView.js
|
||||
function DetailsView() {
|
||||
this.pageIndex = null;
|
||||
this.dataKeys = null;
|
||||
this.createPropertyString = DetailsView_createPropertyString;
|
||||
this.setStateField = DetailsView_setStateValue;
|
||||
this.getHiddenFieldContents = DetailsView_getHiddenFieldContents;
|
||||
this.stateField = null;
|
||||
this.panelElement = null;
|
||||
this.callback = null;
|
||||
}
|
||||
function DetailsView_createPropertyString() {
|
||||
return createPropertyStringFromValues_DetailsView(this.pageIndex, this.dataKeys);
|
||||
}
|
||||
function DetailsView_setStateValue() {
|
||||
this.stateField.value = this.createPropertyString();
|
||||
}
|
||||
function DetailsView_OnCallback (result, context) {
|
||||
var value = new String(result);
|
||||
var valsArray = value.split("|");
|
||||
var innerHtml = valsArray[2];
|
||||
for (var i = 3; i < valsArray.length; i++) {
|
||||
innerHtml += "|" + valsArray[i];
|
||||
}
|
||||
context.panelElement.innerHTML = innerHtml;
|
||||
context.stateField.value = createPropertyStringFromValues_DetailsView(valsArray[0], valsArray[1]);
|
||||
}
|
||||
function DetailsView_getHiddenFieldContents(arg) {
|
||||
return arg + "|" + this.stateField.value;
|
||||
}
|
||||
function createPropertyStringFromValues_DetailsView(pageIndex, dataKeys) {
|
||||
var value = new Array(pageIndex, dataKeys);
|
||||
return value.join("|");
|
||||
}
|
@ -1,93 +0,0 @@
|
||||
//CdnPath=http://ajax.aspnetcdn.com/ajax/4.5.1/1/WebForms.js
|
||||
function WebForm_FindFirstFocusableChild(control) {
|
||||
if (!control || !(control.tagName)) {
|
||||
return null;
|
||||
}
|
||||
var tagName = control.tagName.toLowerCase();
|
||||
if (tagName == "undefined") {
|
||||
return null;
|
||||
}
|
||||
var children = control.childNodes;
|
||||
if (children) {
|
||||
for (var i = 0; i < children.length; i++) {
|
||||
try {
|
||||
if (WebForm_CanFocus(children[i])) {
|
||||
return children[i];
|
||||
}
|
||||
else {
|
||||
var focused = WebForm_FindFirstFocusableChild(children[i]);
|
||||
if (WebForm_CanFocus(focused)) {
|
||||
return focused;
|
||||
}
|
||||
}
|
||||
} catch (e) {
|
||||
}
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
function WebForm_AutoFocus(focusId) {
|
||||
var targetControl;
|
||||
if (__nonMSDOMBrowser) {
|
||||
targetControl = document.getElementById(focusId);
|
||||
}
|
||||
else {
|
||||
targetControl = document.all[focusId];
|
||||
}
|
||||
var focused = targetControl;
|
||||
if (targetControl && (!WebForm_CanFocus(targetControl)) ) {
|
||||
focused = WebForm_FindFirstFocusableChild(targetControl);
|
||||
}
|
||||
if (focused) {
|
||||
try {
|
||||
focused.focus();
|
||||
if (__nonMSDOMBrowser) {
|
||||
focused.scrollIntoView(false);
|
||||
}
|
||||
if (window.__smartNav) {
|
||||
window.__smartNav.ae = focused.id;
|
||||
}
|
||||
}
|
||||
catch (e) {
|
||||
}
|
||||
}
|
||||
}
|
||||
function WebForm_CanFocus(element) {
|
||||
if (!element || !(element.tagName)) return false;
|
||||
var tagName = element.tagName.toLowerCase();
|
||||
return (!(element.disabled) &&
|
||||
(!(element.type) || element.type.toLowerCase() != "hidden") &&
|
||||
WebForm_IsFocusableTag(tagName) &&
|
||||
WebForm_IsInVisibleContainer(element)
|
||||
);
|
||||
}
|
||||
function WebForm_IsFocusableTag(tagName) {
|
||||
return (tagName == "input" ||
|
||||
tagName == "textarea" ||
|
||||
tagName == "select" ||
|
||||
tagName == "button" ||
|
||||
tagName == "a");
|
||||
}
|
||||
function WebForm_IsInVisibleContainer(ctrl) {
|
||||
var current = ctrl;
|
||||
while((typeof(current) != "undefined") && (current != null)) {
|
||||
if (current.disabled ||
|
||||
( typeof(current.style) != "undefined" &&
|
||||
( ( typeof(current.style.display) != "undefined" &&
|
||||
current.style.display == "none") ||
|
||||
( typeof(current.style.visibility) != "undefined" &&
|
||||
current.style.visibility == "hidden") ) ) ) {
|
||||
return false;
|
||||
}
|
||||
if (typeof(current.parentNode) != "undefined" &&
|
||||
current.parentNode != null &&
|
||||
current.parentNode != current &&
|
||||
current.parentNode.tagName.toLowerCase() != "body") {
|
||||
current = current.parentNode;
|
||||
}
|
||||
else {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
@ -1,36 +0,0 @@
|
||||
//CdnPath=http://ajax.aspnetcdn.com/ajax/4.5.1/1/GridView.js
|
||||
function GridView() {
|
||||
this.pageIndex = null;
|
||||
this.sortExpression = null;
|
||||
this.sortDirection = null;
|
||||
this.dataKeys = null;
|
||||
this.createPropertyString = GridView_createPropertyString;
|
||||
this.setStateField = GridView_setStateValue;
|
||||
this.getHiddenFieldContents = GridView_getHiddenFieldContents;
|
||||
this.stateField = null;
|
||||
this.panelElement = null;
|
||||
this.callback = null;
|
||||
}
|
||||
function GridView_createPropertyString() {
|
||||
return createPropertyStringFromValues_GridView(this.pageIndex, this.sortDirection, this.sortExpression, this.dataKeys);
|
||||
}
|
||||
function GridView_setStateValue() {
|
||||
this.stateField.value = this.createPropertyString();
|
||||
}
|
||||
function GridView_OnCallback (result, context) {
|
||||
var value = new String(result);
|
||||
var valsArray = value.split("|");
|
||||
var innerHtml = valsArray[4];
|
||||
for (var i = 5; i < valsArray.length; i++) {
|
||||
innerHtml += "|" + valsArray[i];
|
||||
}
|
||||
context.panelElement.innerHTML = innerHtml;
|
||||
context.stateField.value = createPropertyStringFromValues_GridView(valsArray[0], valsArray[1], valsArray[2], valsArray[3]);
|
||||
}
|
||||
function GridView_getHiddenFieldContents(arg) {
|
||||
return arg + "|" + this.stateField.value;
|
||||
}
|
||||
function createPropertyStringFromValues_GridView(pageIndex, sortDirection, sortExpression, dataKeys) {
|
||||
var value = new Array(pageIndex, sortDirection, sortExpression, dataKeys);
|
||||
return value.join("|");
|
||||
}
|
@ -1,6 +0,0 @@
|
||||
//CdnPath=http://ajax.aspnetcdn.com/ajax/4.5.1/1/MicrosoftAjaxTimer.js
|
||||
//----------------------------------------------------------
|
||||
// Copyright (C) Microsoft Corporation. All rights reserved.
|
||||
//----------------------------------------------------------
|
||||
// MicrosoftAjaxTimer.js
|
||||
Type._registerScript("Timer.js",["MicrosoftAjaxComponentModel.js"]);Sys.UI._Timer=function(a){Sys.UI._Timer.initializeBase(this,[a]);this._interval=60000;this._enabled=true;this._postbackPending=false;this._raiseTickDelegate=null;this._endRequestHandlerDelegate=null;this._timer=null;this._pageRequestManager=null;this._uniqueID=null};Sys.UI._Timer.prototype={get_enabled:function(){return this._enabled},set_enabled:function(a){this._enabled=a},get_interval:function(){return this._interval},set_interval:function(a){this._interval=a},get_uniqueID:function(){return this._uniqueID},set_uniqueID:function(a){this._uniqueID=a},dispose:function(){this._stopTimer();if(this._pageRequestManager!==null)this._pageRequestManager.remove_endRequest(this._endRequestHandlerDelegate);Sys.UI._Timer.callBaseMethod(this,"dispose")},_doPostback:function(){__doPostBack(this.get_uniqueID(),"")},_handleEndRequest:function(c,b){var a=b.get_dataItems()[this.get_id()];if(a)this._update(a[0],a[1]);if(this._postbackPending===true&&this._pageRequestManager!==null&&this._pageRequestManager.get_isInAsyncPostBack()===false){this._postbackPending=false;this._doPostback()}},initialize:function(){Sys.UI._Timer.callBaseMethod(this,"initialize");this._raiseTickDelegate=Function.createDelegate(this,this._raiseTick);this._endRequestHandlerDelegate=Function.createDelegate(this,this._handleEndRequest);if(Sys.WebForms&&Sys.WebForms.PageRequestManager)this._pageRequestManager=Sys.WebForms.PageRequestManager.getInstance();if(this._pageRequestManager!==null)this._pageRequestManager.add_endRequest(this._endRequestHandlerDelegate);if(this.get_enabled())this._startTimer()},_raiseTick:function(){this._startTimer();if(this._pageRequestManager===null||!this._pageRequestManager.get_isInAsyncPostBack()){this._doPostback();this._postbackPending=false}else this._postbackPending=true},_startTimer:function(){this._timer=window.setTimeout(Function.createDelegate(this,this._raiseTick),this.get_interval())},_stopTimer:function(){if(this._timer!==null){window.clearTimeout(this._timer);this._timer=null}},_update:function(c,b){var a=!this.get_enabled(),d=this.get_interval()!==b;if(!a&&(!c||d)){this._stopTimer();a=true}this.set_enabled(c);this.set_interval(b);if(this.get_enabled()&&a)this._startTimer()}};Sys.UI._Timer.registerClass("Sys.UI._Timer",Sys.UI.Control);
|
@ -1,6 +0,0 @@
|
||||
//CdnPath=http://ajax.aspnetcdn.com/ajax/4.5.1/1/MicrosoftAjaxWebServices.js
|
||||
//----------------------------------------------------------
|
||||
// Copyright (C) Microsoft Corporation. All rights reserved.
|
||||
//----------------------------------------------------------
|
||||
// MicrosoftAjaxWebServices.js
|
||||
Type._registerScript("MicrosoftAjaxWebServices.js",["MicrosoftAjaxNetwork.js"]);Type.registerNamespace("Sys.Net");Sys.Net.WebServiceProxy=function(){};Sys.Net.WebServiceProxy.prototype={get_timeout:function(){return this._timeout||0},set_timeout:function(a){if(a<0)throw Error.argumentOutOfRange("value",a,Sys.Res.invalidTimeout);this._timeout=a},get_defaultUserContext:function(){return typeof this._userContext==="undefined"?null:this._userContext},set_defaultUserContext:function(a){this._userContext=a},get_defaultSucceededCallback:function(){return this._succeeded||null},set_defaultSucceededCallback:function(a){this._succeeded=a},get_defaultFailedCallback:function(){return this._failed||null},set_defaultFailedCallback:function(a){this._failed=a},get_enableJsonp:function(){return !!this._jsonp},set_enableJsonp:function(a){this._jsonp=a},get_path:function(){return this._path||null},set_path:function(a){this._path=a},get_jsonpCallbackParameter:function(){return this._callbackParameter||"callback"},set_jsonpCallbackParameter:function(a){this._callbackParameter=a},_invoke:function(d,e,g,f,c,b,a){c=c||this.get_defaultSucceededCallback();b=b||this.get_defaultFailedCallback();if(a===null||typeof a==="undefined")a=this.get_defaultUserContext();return Sys.Net.WebServiceProxy.invoke(d,e,g,f,c,b,a,this.get_timeout(),this.get_enableJsonp(),this.get_jsonpCallbackParameter())}};Sys.Net.WebServiceProxy.registerClass("Sys.Net.WebServiceProxy");Sys.Net.WebServiceProxy.invoke=function(q,a,m,l,j,b,g,e,w,p){var i=w!==false?Sys.Net.WebServiceProxy._xdomain.exec(q):null,c,n=i&&i.length===3&&(i[1]!==location.protocol||i[2]!==location.host);m=n||m;if(n){p=p||"callback";c="_jsonp"+Sys._jsonp++}if(!l)l={};var r=l;if(!m||!r)r={};var s,h,f=null,k,o=null,u=Sys.Net.WebRequest._createUrl(a?q+"/"+encodeURIComponent(a):q,r,n?p+"=Sys."+c:null);if(n){s=document.createElement("script");s.src=u;k=new Sys._ScriptLoaderTask(s,function(d,b){if(!b||c)t({Message:String.format(Sys.Res.webServiceFailedNoMsg,a)},-1)});function v(){if(f===null)return;f=null;h=new Sys.Net.WebServiceError(true,String.format(Sys.Res.webServiceTimedOut,a));k.dispose();delete Sys[c];if(b)b(h,g,a)}function t(d,e){if(f!==null){window.clearTimeout(f);f=null}k.dispose();delete Sys[c];c=null;if(typeof e!=="undefined"&&e!==200){if(b){h=new Sys.Net.WebServiceError(false,d.Message||String.format(Sys.Res.webServiceFailedNoMsg,a),d.StackTrace||null,d.ExceptionType||null,d);h._statusCode=e;b(h,g,a)}}else if(j)j(d,g,a)}Sys[c]=t;e=e||Sys.Net.WebRequestManager.get_defaultTimeout();if(e>0)f=window.setTimeout(v,e);k.execute();return null}var d=new Sys.Net.WebRequest;d.set_url(u);d.get_headers()["Content-Type"]="application/json; charset=utf-8";if(!m){o=Sys.Serialization.JavaScriptSerializer.serialize(l);if(o==="{}")o=""}d.set_body(o);d.add_completed(x);if(e&&e>0)d.set_timeout(e);d.invoke();function x(d){if(d.get_responseAvailable()){var f=d.get_statusCode(),c=null;try{var e=d.getResponseHeader("Content-Type");if(e.startsWith("application/json"))c=d.get_object();else if(e.startsWith("text/xml"))c=d.get_xml();else c=d.get_responseData()}catch(m){}var k=d.getResponseHeader("jsonerror"),h=k==="true";if(h){if(c)c=new Sys.Net.WebServiceError(false,c.Message,c.StackTrace,c.ExceptionType,c)}else if(e.startsWith("application/json"))c=!c||typeof c.d==="undefined"?c:c.d;if(f<200||f>=300||h){if(b){if(!c||!h)c=new Sys.Net.WebServiceError(false,String.format(Sys.Res.webServiceFailedNoMsg,a));c._statusCode=f;b(c,g,a)}}else if(j)j(c,g,a)}else{var i;if(d.get_timedOut())i=String.format(Sys.Res.webServiceTimedOut,a);else i=String.format(Sys.Res.webServiceFailedNoMsg,a);if(b)b(new Sys.Net.WebServiceError(d.get_timedOut(),i,"",""),g,a)}}return d};Sys.Net.WebServiceProxy._generateTypedConstructor=function(a){return function(b){if(b)for(var c in b)this[c]=b[c];this.__type=a}};Sys._jsonp=0;Sys.Net.WebServiceProxy._xdomain=/^\s*([a-zA-Z0-9\+\-\.]+\:)\/\/([^?#\/]+)/;Sys.Net.WebServiceError=function(d,e,c,a,b){this._timedOut=d;this._message=e;this._stackTrace=c;this._exceptionType=a;this._errorObject=b;this._statusCode=-1};Sys.Net.WebServiceError.prototype={get_timedOut:function(){return this._timedOut},get_statusCode:function(){return this._statusCode},get_message:function(){return this._message},get_stackTrace:function(){return this._stackTrace||""},get_exceptionType:function(){return this._exceptionType||""},get_errorObject:function(){return this._errorObject||null}};Sys.Net.WebServiceError.registerClass("Sys.Net.WebServiceError");
|
@ -1,898 +0,0 @@
|
||||
//CdnPath=http://ajax.aspnetcdn.com/ajax/4.5.1/1/Menu.js
|
||||
var __rootMenuItem;
|
||||
var __menuInterval;
|
||||
var __scrollPanel;
|
||||
var __disappearAfter = 500;
|
||||
function Menu_ClearInterval() {
|
||||
if (__menuInterval) {
|
||||
window.clearInterval(__menuInterval);
|
||||
}
|
||||
}
|
||||
function Menu_Collapse(item) {
|
||||
Menu_SetRoot(item);
|
||||
if (__rootMenuItem) {
|
||||
Menu_ClearInterval();
|
||||
if (__disappearAfter >= 0) {
|
||||
__menuInterval = window.setInterval("Menu_HideItems()", __disappearAfter);
|
||||
}
|
||||
}
|
||||
}
|
||||
function Menu_Expand(item, horizontalOffset, verticalOffset, hideScrollers) {
|
||||
Menu_ClearInterval();
|
||||
var tr = item.parentNode.parentNode.parentNode.parentNode.parentNode;
|
||||
var horizontal = true;
|
||||
if (!tr.id) {
|
||||
horizontal = false;
|
||||
tr = tr.parentNode;
|
||||
}
|
||||
var child = Menu_FindSubMenu(item);
|
||||
if (child) {
|
||||
var data = Menu_GetData(item);
|
||||
if (!data) {
|
||||
return null;
|
||||
}
|
||||
child.rel = tr.id;
|
||||
child.x = horizontalOffset;
|
||||
child.y = verticalOffset;
|
||||
if (horizontal) child.pos = "bottom";
|
||||
PopOut_Show(child.id, hideScrollers, data);
|
||||
}
|
||||
Menu_SetRoot(item);
|
||||
if (child) {
|
||||
if (!document.body.__oldOnClick && document.body.onclick) {
|
||||
document.body.__oldOnClick = document.body.onclick;
|
||||
}
|
||||
if (__rootMenuItem) {
|
||||
document.body.onclick = Menu_HideItems;
|
||||
}
|
||||
}
|
||||
Menu_ResetSiblings(tr);
|
||||
return child;
|
||||
}
|
||||
function Menu_FindMenu(item) {
|
||||
if (item && item.menu) return item.menu;
|
||||
var tr = item.parentNode.parentNode.parentNode.parentNode.parentNode;
|
||||
if (!tr.id) {
|
||||
tr = tr.parentNode;
|
||||
}
|
||||
for (var i = tr.id.length - 1; i >= 0; i--) {
|
||||
if (tr.id.charAt(i) < '0' || tr.id.charAt(i) > '9') {
|
||||
var menu = WebForm_GetElementById(tr.id.substr(0, i));
|
||||
if (menu) {
|
||||
item.menu = menu;
|
||||
return menu;
|
||||
}
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
function Menu_FindNext(item) {
|
||||
var a = WebForm_GetElementByTagName(item, "A");
|
||||
var parent = Menu_FindParentContainer(item);
|
||||
var first = null;
|
||||
if (parent) {
|
||||
var links = WebForm_GetElementsByTagName(parent, "A");
|
||||
var match = false;
|
||||
for (var i = 0; i < links.length; i++) {
|
||||
var link = links[i];
|
||||
if (Menu_IsSelectable(link)) {
|
||||
if (Menu_FindParentContainer(link) == parent) {
|
||||
if (match) {
|
||||
return link;
|
||||
}
|
||||
else if (!first) {
|
||||
first = link;
|
||||
}
|
||||
}
|
||||
if (!match && link == a) {
|
||||
match = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return first;
|
||||
}
|
||||
function Menu_FindParentContainer(item) {
|
||||
if (item.menu_ParentContainerCache) return item.menu_ParentContainerCache;
|
||||
var a = (item.tagName.toLowerCase() == "a") ? item : WebForm_GetElementByTagName(item, "A");
|
||||
var menu = Menu_FindMenu(a);
|
||||
if (menu) {
|
||||
var parent = item;
|
||||
while (parent && parent.tagName &&
|
||||
parent.id != menu.id &&
|
||||
parent.tagName.toLowerCase() != "div") {
|
||||
parent = parent.parentNode;
|
||||
}
|
||||
item.menu_ParentContainerCache = parent;
|
||||
return parent;
|
||||
}
|
||||
}
|
||||
function Menu_FindParentItem(item) {
|
||||
var parentContainer = Menu_FindParentContainer(item);
|
||||
var parentContainerID = parentContainer.id;
|
||||
var len = parentContainerID.length;
|
||||
if (parentContainerID && parentContainerID.substr(len - 5) == "Items") {
|
||||
var parentItemID = parentContainerID.substr(0, len - 5);
|
||||
return WebForm_GetElementById(parentItemID);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
function Menu_FindPrevious(item) {
|
||||
var a = WebForm_GetElementByTagName(item, "A");
|
||||
var parent = Menu_FindParentContainer(item);
|
||||
var last = null;
|
||||
if (parent) {
|
||||
var links = WebForm_GetElementsByTagName(parent, "A");
|
||||
for (var i = 0; i < links.length; i++) {
|
||||
var link = links[i];
|
||||
if (Menu_IsSelectable(link)) {
|
||||
if (link == a && last) {
|
||||
return last;
|
||||
}
|
||||
if (Menu_FindParentContainer(link) == parent) {
|
||||
last = link;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return last;
|
||||
}
|
||||
function Menu_FindSubMenu(item) {
|
||||
var tr = item.parentNode.parentNode.parentNode.parentNode.parentNode;
|
||||
if (!tr.id) {
|
||||
tr=tr.parentNode;
|
||||
}
|
||||
return WebForm_GetElementById(tr.id + "Items");
|
||||
}
|
||||
function Menu_Focus(item) {
|
||||
if (item && item.focus) {
|
||||
var pos = WebForm_GetElementPosition(item);
|
||||
var parentContainer = Menu_FindParentContainer(item);
|
||||
if (!parentContainer.offset) {
|
||||
parentContainer.offset = 0;
|
||||
}
|
||||
var posParent = WebForm_GetElementPosition(parentContainer);
|
||||
var delta;
|
||||
if (pos.y + pos.height > posParent.y + parentContainer.offset + parentContainer.clippedHeight) {
|
||||
delta = pos.y + pos.height - posParent.y - parentContainer.offset - parentContainer.clippedHeight;
|
||||
PopOut_Scroll(parentContainer, delta);
|
||||
}
|
||||
else if (pos.y < posParent.y + parentContainer.offset) {
|
||||
delta = posParent.y + parentContainer.offset - pos.y;
|
||||
PopOut_Scroll(parentContainer, -delta);
|
||||
}
|
||||
PopOut_HideScrollers(parentContainer);
|
||||
item.focus();
|
||||
}
|
||||
}
|
||||
function Menu_GetData(item) {
|
||||
if (!item.data) {
|
||||
var a = (item.tagName.toLowerCase() == "a" ? item : WebForm_GetElementByTagName(item, "a"));
|
||||
var menu = Menu_FindMenu(a);
|
||||
try {
|
||||
item.data = eval(menu.id + "_Data");
|
||||
}
|
||||
catch(e) {}
|
||||
}
|
||||
return item.data;
|
||||
}
|
||||
function Menu_HideItems(items) {
|
||||
if (document.body.__oldOnClick) {
|
||||
document.body.onclick = document.body.__oldOnClick;
|
||||
document.body.__oldOnClick = null;
|
||||
}
|
||||
Menu_ClearInterval();
|
||||
if (!items || ((typeof(items.tagName) == "undefined") && (items instanceof Event))) {
|
||||
items = __rootMenuItem;
|
||||
}
|
||||
var table = items;
|
||||
if ((typeof(table) == "undefined") || (table == null) || !table.tagName || (table.tagName.toLowerCase() != "table")) {
|
||||
table = WebForm_GetElementByTagName(table, "TABLE");
|
||||
}
|
||||
if ((typeof(table) == "undefined") || (table == null) || !table.tagName || (table.tagName.toLowerCase() != "table")) {
|
||||
return;
|
||||
}
|
||||
var rows = table.rows ? table.rows : table.firstChild.rows;
|
||||
var isVertical = false;
|
||||
for (var r = 0; r < rows.length; r++) {
|
||||
if (rows[r].id) {
|
||||
isVertical = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
var i, child, nextLevel;
|
||||
if (isVertical) {
|
||||
for(i = 0; i < rows.length; i++) {
|
||||
if (rows[i].id) {
|
||||
child = WebForm_GetElementById(rows[i].id + "Items");
|
||||
if (child) {
|
||||
Menu_HideItems(child);
|
||||
}
|
||||
}
|
||||
else if (rows[i].cells[0]) {
|
||||
nextLevel = WebForm_GetElementByTagName(rows[i].cells[0], "TABLE");
|
||||
if (nextLevel) {
|
||||
Menu_HideItems(nextLevel);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (rows[0]) {
|
||||
for(i = 0; i < rows[0].cells.length; i++) {
|
||||
if (rows[0].cells[i].id) {
|
||||
child = WebForm_GetElementById(rows[0].cells[i].id + "Items");
|
||||
if (child) {
|
||||
Menu_HideItems(child);
|
||||
}
|
||||
}
|
||||
else {
|
||||
nextLevel = WebForm_GetElementByTagName(rows[0].cells[i], "TABLE");
|
||||
if (nextLevel) {
|
||||
Menu_HideItems(rows[0].cells[i].firstChild);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (items && items.id) {
|
||||
PopOut_Hide(items.id);
|
||||
}
|
||||
}
|
||||
function Menu_HoverDisabled(item) {
|
||||
var node = (item.tagName.toLowerCase() == "td") ?
|
||||
item:
|
||||
item.cells[0];
|
||||
var data = Menu_GetData(item);
|
||||
if (!data) return;
|
||||
node = WebForm_GetElementByTagName(node, "table").rows[0].cells[0].childNodes[0];
|
||||
if (data.disappearAfter >= 200) {
|
||||
__disappearAfter = data.disappearAfter;
|
||||
}
|
||||
Menu_Expand(node, data.horizontalOffset, data.verticalOffset);
|
||||
}
|
||||
function Menu_HoverDynamic(item) {
|
||||
var node = (item.tagName.toLowerCase() == "td") ?
|
||||
item:
|
||||
item.cells[0];
|
||||
var data = Menu_GetData(item);
|
||||
if (!data) return;
|
||||
var nodeTable = WebForm_GetElementByTagName(node, "table");
|
||||
if (data.hoverClass) {
|
||||
nodeTable.hoverClass = data.hoverClass;
|
||||
WebForm_AppendToClassName(nodeTable, data.hoverClass);
|
||||
}
|
||||
node = nodeTable.rows[0].cells[0].childNodes[0];
|
||||
if (data.hoverHyperLinkClass) {
|
||||
node.hoverHyperLinkClass = data.hoverHyperLinkClass;
|
||||
WebForm_AppendToClassName(node, data.hoverHyperLinkClass);
|
||||
}
|
||||
if (data.disappearAfter >= 200) {
|
||||
__disappearAfter = data.disappearAfter;
|
||||
}
|
||||
Menu_Expand(node, data.horizontalOffset, data.verticalOffset);
|
||||
}
|
||||
function Menu_HoverRoot(item) {
|
||||
var node = (item.tagName.toLowerCase() == "td") ?
|
||||
item:
|
||||
item.cells[0];
|
||||
var data = Menu_GetData(item);
|
||||
if (!data) {
|
||||
return null;
|
||||
}
|
||||
var nodeTable = WebForm_GetElementByTagName(node, "table");
|
||||
if (data.staticHoverClass) {
|
||||
nodeTable.hoverClass = data.staticHoverClass;
|
||||
WebForm_AppendToClassName(nodeTable, data.staticHoverClass);
|
||||
}
|
||||
node = nodeTable.rows[0].cells[0].childNodes[0];
|
||||
if (data.staticHoverHyperLinkClass) {
|
||||
node.hoverHyperLinkClass = data.staticHoverHyperLinkClass;
|
||||
WebForm_AppendToClassName(node, data.staticHoverHyperLinkClass);
|
||||
}
|
||||
return node;
|
||||
}
|
||||
function Menu_HoverStatic(item) {
|
||||
var node = Menu_HoverRoot(item);
|
||||
var data = Menu_GetData(item);
|
||||
if (!data) return;
|
||||
__disappearAfter = data.disappearAfter;
|
||||
Menu_Expand(node, data.horizontalOffset, data.verticalOffset);
|
||||
}
|
||||
function Menu_IsHorizontal(item) {
|
||||
if (item) {
|
||||
var a = ((item.tagName && (item.tagName.toLowerCase == "a")) ? item : WebForm_GetElementByTagName(item, "A"));
|
||||
if (!a) {
|
||||
return false;
|
||||
}
|
||||
var td = a.parentNode.parentNode.parentNode.parentNode.parentNode;
|
||||
if (td.id) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
function Menu_IsSelectable(link) {
|
||||
return (link && link.href)
|
||||
}
|
||||
function Menu_Key(item) {
|
||||
var event;
|
||||
if (item.currentTarget) {
|
||||
event = item;
|
||||
item = event.currentTarget;
|
||||
}
|
||||
else {
|
||||
event = window.event;
|
||||
}
|
||||
var key = (event ? event.keyCode : -1);
|
||||
var data = Menu_GetData(item);
|
||||
if (!data) return;
|
||||
var horizontal = Menu_IsHorizontal(item);
|
||||
var a = WebForm_GetElementByTagName(item, "A");
|
||||
var nextItem, parentItem, previousItem;
|
||||
if ((!horizontal && key == 38) || (horizontal && key == 37)) {
|
||||
previousItem = Menu_FindPrevious(item);
|
||||
while (previousItem && previousItem.disabled) {
|
||||
previousItem = Menu_FindPrevious(previousItem);
|
||||
}
|
||||
if (previousItem) {
|
||||
Menu_Focus(previousItem);
|
||||
Menu_Expand(previousItem, data.horizontalOffset, data.verticalOffset, true);
|
||||
event.cancelBubble = true;
|
||||
if (event.stopPropagation) event.stopPropagation();
|
||||
return;
|
||||
}
|
||||
}
|
||||
if ((!horizontal && key == 40) || (horizontal && key == 39)) {
|
||||
if (horizontal) {
|
||||
var subMenu = Menu_FindSubMenu(a);
|
||||
if (subMenu && subMenu.style && subMenu.style.visibility &&
|
||||
subMenu.style.visibility.toLowerCase() == "hidden") {
|
||||
Menu_Expand(a, data.horizontalOffset, data.verticalOffset, true);
|
||||
event.cancelBubble = true;
|
||||
if (event.stopPropagation) event.stopPropagation();
|
||||
return;
|
||||
}
|
||||
}
|
||||
nextItem = Menu_FindNext(item);
|
||||
while (nextItem && nextItem.disabled) {
|
||||
nextItem = Menu_FindNext(nextItem);
|
||||
}
|
||||
if (nextItem) {
|
||||
Menu_Focus(nextItem);
|
||||
Menu_Expand(nextItem, data.horizontalOffset, data.verticalOffset, true);
|
||||
event.cancelBubble = true;
|
||||
if (event.stopPropagation) event.stopPropagation();
|
||||
return;
|
||||
}
|
||||
}
|
||||
if ((!horizontal && key == 39) || (horizontal && key == 40)) {
|
||||
var children = Menu_Expand(a, data.horizontalOffset, data.verticalOffset, true);
|
||||
if (children) {
|
||||
var firstChild;
|
||||
children = WebForm_GetElementsByTagName(children, "A");
|
||||
for (var i = 0; i < children.length; i++) {
|
||||
if (!children[i].disabled && Menu_IsSelectable(children[i])) {
|
||||
firstChild = children[i];
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (firstChild) {
|
||||
Menu_Focus(firstChild);
|
||||
Menu_Expand(firstChild, data.horizontalOffset, data.verticalOffset, true);
|
||||
event.cancelBubble = true;
|
||||
if (event.stopPropagation) event.stopPropagation();
|
||||
return;
|
||||
}
|
||||
}
|
||||
else {
|
||||
parentItem = Menu_FindParentItem(item);
|
||||
while (parentItem && !Menu_IsHorizontal(parentItem)) {
|
||||
parentItem = Menu_FindParentItem(parentItem);
|
||||
}
|
||||
if (parentItem) {
|
||||
nextItem = Menu_FindNext(parentItem);
|
||||
while (nextItem && nextItem.disabled) {
|
||||
nextItem = Menu_FindNext(nextItem);
|
||||
}
|
||||
if (nextItem) {
|
||||
Menu_Focus(nextItem);
|
||||
Menu_Expand(nextItem, data.horizontalOffset, data.verticalOffset, true);
|
||||
event.cancelBubble = true;
|
||||
if (event.stopPropagation) event.stopPropagation();
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if ((!horizontal && key == 37) || (horizontal && key == 38)) {
|
||||
parentItem = Menu_FindParentItem(item);
|
||||
if (parentItem) {
|
||||
if (Menu_IsHorizontal(parentItem)) {
|
||||
previousItem = Menu_FindPrevious(parentItem);
|
||||
while (previousItem && previousItem.disabled) {
|
||||
previousItem = Menu_FindPrevious(previousItem);
|
||||
}
|
||||
if (previousItem) {
|
||||
Menu_Focus(previousItem);
|
||||
Menu_Expand(previousItem, data.horizontalOffset, data.verticalOffset, true);
|
||||
event.cancelBubble = true;
|
||||
if (event.stopPropagation) event.stopPropagation();
|
||||
return;
|
||||
}
|
||||
}
|
||||
var parentA = WebForm_GetElementByTagName(parentItem, "A");
|
||||
if (parentA) {
|
||||
Menu_Focus(parentA);
|
||||
}
|
||||
Menu_ResetSiblings(parentItem);
|
||||
event.cancelBubble = true;
|
||||
if (event.stopPropagation) event.stopPropagation();
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (key == 27) {
|
||||
Menu_HideItems();
|
||||
event.cancelBubble = true;
|
||||
if (event.stopPropagation) event.stopPropagation();
|
||||
return;
|
||||
}
|
||||
}
|
||||
function Menu_ResetSiblings(item) {
|
||||
var table = (item.tagName.toLowerCase() == "td") ?
|
||||
item.parentNode.parentNode.parentNode :
|
||||
item.parentNode.parentNode;
|
||||
var isVertical = false;
|
||||
for (var r = 0; r < table.rows.length; r++) {
|
||||
if (table.rows[r].id) {
|
||||
isVertical = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
var i, child, childNode;
|
||||
if (isVertical) {
|
||||
for(i = 0; i < table.rows.length; i++) {
|
||||
childNode = table.rows[i];
|
||||
if (childNode != item) {
|
||||
child = WebForm_GetElementById(childNode.id + "Items");
|
||||
if (child) {
|
||||
Menu_HideItems(child);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
for(i = 0; i < table.rows[0].cells.length; i++) {
|
||||
childNode = table.rows[0].cells[i];
|
||||
if (childNode != item) {
|
||||
child = WebForm_GetElementById(childNode.id + "Items");
|
||||
if (child) {
|
||||
Menu_HideItems(child);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Menu_ResetTopMenus(table, table, 0, true);
|
||||
}
|
||||
function Menu_ResetTopMenus(table, doNotReset, level, up) {
|
||||
var i, child, childNode;
|
||||
if (up && table.id == "") {
|
||||
var parentTable = table.parentNode.parentNode.parentNode.parentNode;
|
||||
if (parentTable.tagName.toLowerCase() == "table") {
|
||||
Menu_ResetTopMenus(parentTable, doNotReset, level + 1, true);
|
||||
}
|
||||
}
|
||||
else {
|
||||
if (level == 0 && table != doNotReset) {
|
||||
if (table.rows[0].id) {
|
||||
for(i = 0; i < table.rows.length; i++) {
|
||||
childNode = table.rows[i];
|
||||
child = WebForm_GetElementById(childNode.id + "Items");
|
||||
if (child) {
|
||||
Menu_HideItems(child);
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
for(i = 0; i < table.rows[0].cells.length; i++) {
|
||||
childNode = table.rows[0].cells[i];
|
||||
child = WebForm_GetElementById(childNode.id + "Items");
|
||||
if (child) {
|
||||
Menu_HideItems(child);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (level > 0) {
|
||||
for (i = 0; i < table.rows.length; i++) {
|
||||
for (var j = 0; j < table.rows[i].cells.length; j++) {
|
||||
var subTable = table.rows[i].cells[j].firstChild;
|
||||
if (subTable && subTable.tagName.toLowerCase() == "table") {
|
||||
Menu_ResetTopMenus(subTable, doNotReset, level - 1, false);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
function Menu_RestoreInterval() {
|
||||
if (__menuInterval && __rootMenuItem) {
|
||||
Menu_ClearInterval();
|
||||
__menuInterval = window.setInterval("Menu_HideItems()", __disappearAfter);
|
||||
}
|
||||
}
|
||||
function Menu_SetRoot(item) {
|
||||
var newRoot = Menu_FindMenu(item);
|
||||
if (newRoot) {
|
||||
if (__rootMenuItem && __rootMenuItem != newRoot) {
|
||||
Menu_HideItems();
|
||||
}
|
||||
__rootMenuItem = newRoot;
|
||||
}
|
||||
}
|
||||
function Menu_Unhover(item) {
|
||||
var node = (item.tagName.toLowerCase() == "td") ?
|
||||
item:
|
||||
item.cells[0];
|
||||
var nodeTable = WebForm_GetElementByTagName(node, "table");
|
||||
if (nodeTable.hoverClass) {
|
||||
WebForm_RemoveClassName(nodeTable, nodeTable.hoverClass);
|
||||
}
|
||||
node = nodeTable.rows[0].cells[0].childNodes[0];
|
||||
if (node.hoverHyperLinkClass) {
|
||||
WebForm_RemoveClassName(node, node.hoverHyperLinkClass);
|
||||
}
|
||||
Menu_Collapse(node);
|
||||
}
|
||||
function PopOut_Clip(element, y, height) {
|
||||
if (element && element.style) {
|
||||
element.style.clip = "rect(" + y + "px auto " + (y + height) + "px auto)";
|
||||
element.style.overflow = "hidden";
|
||||
}
|
||||
}
|
||||
function PopOut_Down(scroller) {
|
||||
Menu_ClearInterval();
|
||||
var panel;
|
||||
if (scroller) {
|
||||
panel = scroller.parentNode
|
||||
}
|
||||
else {
|
||||
panel = __scrollPanel;
|
||||
}
|
||||
if (panel && ((panel.offset + panel.clippedHeight) < panel.physicalHeight)) {
|
||||
PopOut_Scroll(panel, 2)
|
||||
__scrollPanel = panel;
|
||||
PopOut_ShowScrollers(panel);
|
||||
PopOut_Stop();
|
||||
__scrollPanel.interval = window.setInterval("PopOut_Down()", 8);
|
||||
}
|
||||
else {
|
||||
PopOut_ShowScrollers(panel);
|
||||
}
|
||||
}
|
||||
function PopOut_Hide(panelId) {
|
||||
var panel = WebForm_GetElementById(panelId);
|
||||
if (panel && panel.tagName.toLowerCase() == "div") {
|
||||
panel.style.visibility = "hidden";
|
||||
panel.style.display = "none";
|
||||
panel.offset = 0;
|
||||
panel.scrollTop = 0;
|
||||
var table = WebForm_GetElementByTagName(panel, "TABLE");
|
||||
if (table) {
|
||||
WebForm_SetElementY(table, 0);
|
||||
}
|
||||
if (window.navigator && window.navigator.appName == "Microsoft Internet Explorer" &&
|
||||
!window.opera) {
|
||||
var childFrameId = panel.id + "_MenuIFrame";
|
||||
var childFrame = WebForm_GetElementById(childFrameId);
|
||||
if (childFrame) {
|
||||
childFrame.style.display = "none";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
function PopOut_HideScrollers(panel) {
|
||||
if (panel && panel.style) {
|
||||
var up = WebForm_GetElementById(panel.id + "Up");
|
||||
var dn = WebForm_GetElementById(panel.id + "Dn");
|
||||
if (up) {
|
||||
up.style.visibility = "hidden";
|
||||
up.style.display = "none";
|
||||
}
|
||||
if (dn) {
|
||||
dn.style.visibility = "hidden";
|
||||
dn.style.display = "none";
|
||||
}
|
||||
}
|
||||
}
|
||||
function PopOut_Position(panel, hideScrollers) {
|
||||
if (window.opera) {
|
||||
panel.parentNode.removeChild(panel);
|
||||
document.forms[0].appendChild(panel);
|
||||
}
|
||||
var rel = WebForm_GetElementById(panel.rel);
|
||||
var relTable = WebForm_GetElementByTagName(rel, "TABLE");
|
||||
var relCoordinates = WebForm_GetElementPosition(relTable ? relTable : rel);
|
||||
var panelCoordinates = WebForm_GetElementPosition(panel);
|
||||
var panelHeight = ((typeof(panel.physicalHeight) != "undefined") && (panel.physicalHeight != null)) ?
|
||||
panel.physicalHeight :
|
||||
panelCoordinates.height;
|
||||
panel.physicalHeight = panelHeight;
|
||||
var panelParentCoordinates;
|
||||
if (panel.offsetParent) {
|
||||
panelParentCoordinates = WebForm_GetElementPosition(panel.offsetParent);
|
||||
}
|
||||
else {
|
||||
panelParentCoordinates = new Object();
|
||||
panelParentCoordinates.x = 0;
|
||||
panelParentCoordinates.y = 0;
|
||||
}
|
||||
var overflowElement = WebForm_GetElementById("__overFlowElement");
|
||||
if (!overflowElement) {
|
||||
overflowElement = document.createElement("img");
|
||||
overflowElement.id="__overFlowElement";
|
||||
WebForm_SetElementWidth(overflowElement, 1);
|
||||
document.body.appendChild(overflowElement);
|
||||
}
|
||||
WebForm_SetElementHeight(overflowElement, panelHeight + relCoordinates.y + parseInt(panel.y ? panel.y : 0));
|
||||
overflowElement.style.visibility = "visible";
|
||||
overflowElement.style.display = "inline";
|
||||
var clientHeight = 0;
|
||||
var clientWidth = 0;
|
||||
if (window.innerHeight) {
|
||||
clientHeight = window.innerHeight;
|
||||
clientWidth = window.innerWidth;
|
||||
}
|
||||
else if (document.documentElement && document.documentElement.clientHeight) {
|
||||
clientHeight = document.documentElement.clientHeight;
|
||||
clientWidth = document.documentElement.clientWidth;
|
||||
}
|
||||
else if (document.body && document.body.clientHeight) {
|
||||
clientHeight = document.body.clientHeight;
|
||||
clientWidth = document.body.clientWidth;
|
||||
}
|
||||
var scrollTop = 0;
|
||||
var scrollLeft = 0;
|
||||
if (typeof(window.pageYOffset) != "undefined") {
|
||||
scrollTop = window.pageYOffset;
|
||||
scrollLeft = window.pageXOffset;
|
||||
}
|
||||
else if (document.documentElement && (typeof(document.documentElement.scrollTop) != "undefined")) {
|
||||
scrollTop = document.documentElement.scrollTop;
|
||||
scrollLeft = document.documentElement.scrollLeft;
|
||||
}
|
||||
else if (document.body && (typeof(document.body.scrollTop) != "undefined")) {
|
||||
scrollTop = document.body.scrollTop;
|
||||
scrollLeft = document.body.scrollLeft;
|
||||
}
|
||||
overflowElement.style.visibility = "hidden";
|
||||
overflowElement.style.display = "none";
|
||||
var bottomWindowBorder = clientHeight + scrollTop;
|
||||
var rightWindowBorder = clientWidth + scrollLeft;
|
||||
var position = panel.pos;
|
||||
if ((typeof(position) == "undefined") || (position == null) || (position == "")) {
|
||||
position = (WebForm_GetElementDir(rel) == "rtl" ? "middleleft" : "middleright");
|
||||
}
|
||||
position = position.toLowerCase();
|
||||
var y = relCoordinates.y + parseInt(panel.y ? panel.y : 0) - panelParentCoordinates.y;
|
||||
var borderParent = (rel && rel.parentNode && rel.parentNode.parentNode && rel.parentNode.parentNode.parentNode
|
||||
&& rel.parentNode.parentNode.parentNode.tagName.toLowerCase() == "div") ?
|
||||
rel.parentNode.parentNode.parentNode : null;
|
||||
WebForm_SetElementY(panel, y);
|
||||
PopOut_SetPanelHeight(panel, panelHeight, true);
|
||||
var clip = false;
|
||||
var overflow;
|
||||
if (position.indexOf("top") != -1) {
|
||||
y -= panelHeight;
|
||||
WebForm_SetElementY(panel, y);
|
||||
if (y < -panelParentCoordinates.y) {
|
||||
y = -panelParentCoordinates.y;
|
||||
WebForm_SetElementY(panel, y);
|
||||
if (panelHeight > clientHeight - 2) {
|
||||
clip = true;
|
||||
PopOut_SetPanelHeight(panel, clientHeight - 2);
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
if (position.indexOf("bottom") != -1) {
|
||||
y += relCoordinates.height;
|
||||
WebForm_SetElementY(panel, y);
|
||||
}
|
||||
overflow = y + panelParentCoordinates.y + panelHeight - bottomWindowBorder;
|
||||
if (overflow > 0) {
|
||||
y -= overflow;
|
||||
WebForm_SetElementY(panel, y);
|
||||
if (y < -panelParentCoordinates.y) {
|
||||
y = 2 - panelParentCoordinates.y + scrollTop;
|
||||
WebForm_SetElementY(panel, y);
|
||||
clip = true;
|
||||
PopOut_SetPanelHeight(panel, clientHeight - 2);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!clip) {
|
||||
PopOut_SetPanelHeight(panel, panel.clippedHeight, true);
|
||||
}
|
||||
var panelParentOffsetY = 0;
|
||||
if (panel.offsetParent) {
|
||||
panelParentOffsetY = WebForm_GetElementPosition(panel.offsetParent).y;
|
||||
}
|
||||
var panelY = ((typeof(panel.originY) != "undefined") && (panel.originY != null)) ?
|
||||
panel.originY :
|
||||
y - panelParentOffsetY;
|
||||
panel.originY = panelY;
|
||||
if (!hideScrollers) {
|
||||
PopOut_ShowScrollers(panel);
|
||||
}
|
||||
else {
|
||||
PopOut_HideScrollers(panel);
|
||||
}
|
||||
var x = relCoordinates.x + parseInt(panel.x ? panel.x : 0) - panelParentCoordinates.x;
|
||||
if (borderParent && borderParent.clientLeft) {
|
||||
x += 2 * borderParent.clientLeft;
|
||||
}
|
||||
WebForm_SetElementX(panel, x);
|
||||
if (position.indexOf("left") != -1) {
|
||||
x -= panelCoordinates.width;
|
||||
WebForm_SetElementX(panel, x);
|
||||
if (x < -panelParentCoordinates.x) {
|
||||
WebForm_SetElementX(panel, -panelParentCoordinates.x);
|
||||
}
|
||||
}
|
||||
else {
|
||||
if (position.indexOf("right") != -1) {
|
||||
x += relCoordinates.width;
|
||||
WebForm_SetElementX(panel, x);
|
||||
}
|
||||
overflow = x + panelParentCoordinates.x + panelCoordinates.width - rightWindowBorder;
|
||||
if (overflow > 0) {
|
||||
if (position.indexOf("bottom") == -1 && relCoordinates.x > panelCoordinates.width) {
|
||||
x -= relCoordinates.width + panelCoordinates.width;
|
||||
}
|
||||
else {
|
||||
x -= overflow;
|
||||
}
|
||||
WebForm_SetElementX(panel, x);
|
||||
if (x < -panelParentCoordinates.x) {
|
||||
WebForm_SetElementX(panel, -panelParentCoordinates.x);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
function PopOut_Scroll(panel, offsetDelta) {
|
||||
var table = WebForm_GetElementByTagName(panel, "TABLE");
|
||||
if (!table) return;
|
||||
table.style.position = "relative";
|
||||
var tableY = (table.style.top ? parseInt(table.style.top) : 0);
|
||||
panel.offset += offsetDelta;
|
||||
WebForm_SetElementY(table, tableY - offsetDelta);
|
||||
}
|
||||
function PopOut_SetPanelHeight(element, height, doNotClip) {
|
||||
if (element && element.style) {
|
||||
var size = WebForm_GetElementPosition(element);
|
||||
element.physicalWidth = size.width;
|
||||
element.clippedHeight = height;
|
||||
WebForm_SetElementHeight(element, height - (element.clientTop ? (2 * element.clientTop) : 0));
|
||||
if (doNotClip && element.style) {
|
||||
element.style.clip = "rect(auto auto auto auto)";
|
||||
}
|
||||
else {
|
||||
PopOut_Clip(element, 0, height);
|
||||
}
|
||||
}
|
||||
}
|
||||
function PopOut_Show(panelId, hideScrollers, data) {
|
||||
var panel = WebForm_GetElementById(panelId);
|
||||
if (panel && panel.tagName.toLowerCase() == "div") {
|
||||
panel.style.visibility = "visible";
|
||||
panel.style.display = "inline";
|
||||
if (!panel.offset || hideScrollers) {
|
||||
panel.scrollTop = 0;
|
||||
panel.offset = 0;
|
||||
var table = WebForm_GetElementByTagName(panel, "TABLE");
|
||||
if (table) {
|
||||
WebForm_SetElementY(table, 0);
|
||||
}
|
||||
}
|
||||
PopOut_Position(panel, hideScrollers);
|
||||
var z = 1;
|
||||
var isIE = window.navigator && window.navigator.appName == "Microsoft Internet Explorer" && !window.opera;
|
||||
if (isIE && data) {
|
||||
var childFrameId = panel.id + "_MenuIFrame";
|
||||
var childFrame = WebForm_GetElementById(childFrameId);
|
||||
var parent = panel.offsetParent;
|
||||
if (!childFrame) {
|
||||
childFrame = document.createElement("iframe");
|
||||
childFrame.id = childFrameId;
|
||||
childFrame.src = (data.iframeUrl ? data.iframeUrl : "about:blank");
|
||||
childFrame.style.position = "absolute";
|
||||
childFrame.style.display = "none";
|
||||
childFrame.scrolling = "no";
|
||||
childFrame.frameBorder = "0";
|
||||
if (parent.tagName.toLowerCase() == "html") {
|
||||
document.body.appendChild(childFrame);
|
||||
}
|
||||
else {
|
||||
parent.appendChild(childFrame);
|
||||
}
|
||||
}
|
||||
var pos = WebForm_GetElementPosition(panel);
|
||||
var parentPos = WebForm_GetElementPosition(parent);
|
||||
WebForm_SetElementX(childFrame, pos.x - parentPos.x);
|
||||
WebForm_SetElementY(childFrame, pos.y - parentPos.y);
|
||||
WebForm_SetElementWidth(childFrame, pos.width);
|
||||
WebForm_SetElementHeight(childFrame, pos.height);
|
||||
childFrame.style.display = "block";
|
||||
if (panel.currentStyle && panel.currentStyle.zIndex && panel.currentStyle.zIndex != "auto") {
|
||||
z = panel.currentStyle.zIndex;
|
||||
}
|
||||
else if (panel.style.zIndex) {
|
||||
z = panel.style.zIndex;
|
||||
}
|
||||
}
|
||||
panel.style.zIndex = z;
|
||||
}
|
||||
}
|
||||
function PopOut_ShowScrollers(panel) {
|
||||
if (panel && panel.style) {
|
||||
var up = WebForm_GetElementById(panel.id + "Up");
|
||||
var dn = WebForm_GetElementById(panel.id + "Dn");
|
||||
var cnt = 0;
|
||||
if (up && dn) {
|
||||
if (panel.offset && panel.offset > 0) {
|
||||
up.style.visibility = "visible";
|
||||
up.style.display = "inline";
|
||||
cnt++;
|
||||
if (panel.clientWidth) {
|
||||
WebForm_SetElementWidth(up, panel.clientWidth
|
||||
- (up.clientLeft ? (2 * up.clientLeft) : 0));
|
||||
}
|
||||
WebForm_SetElementY(up, 0);
|
||||
}
|
||||
else {
|
||||
up.style.visibility = "hidden";
|
||||
up.style.display = "none";
|
||||
}
|
||||
if (panel.offset + panel.clippedHeight + 2 <= panel.physicalHeight) {
|
||||
dn.style.visibility = "visible";
|
||||
dn.style.display = "inline";
|
||||
cnt++;
|
||||
if (panel.clientWidth) {
|
||||
WebForm_SetElementWidth(dn, panel.clientWidth
|
||||
- (dn.clientLeft ? (2 * dn.clientLeft) : 0));
|
||||
}
|
||||
WebForm_SetElementY(dn, panel.clippedHeight - WebForm_GetElementPosition(dn).height
|
||||
- (panel.clientTop ? (2 * panel.clientTop) : 0));
|
||||
}
|
||||
else {
|
||||
dn.style.visibility = "hidden";
|
||||
dn.style.display = "none";
|
||||
}
|
||||
if (cnt == 0) {
|
||||
panel.style.clip = "rect(auto auto auto auto)";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
function PopOut_Stop() {
|
||||
if (__scrollPanel && __scrollPanel.interval) {
|
||||
window.clearInterval(__scrollPanel.interval);
|
||||
}
|
||||
Menu_RestoreInterval();
|
||||
}
|
||||
function PopOut_Up(scroller) {
|
||||
Menu_ClearInterval();
|
||||
var panel;
|
||||
if (scroller) {
|
||||
panel = scroller.parentNode
|
||||
}
|
||||
else {
|
||||
panel = __scrollPanel;
|
||||
}
|
||||
if (panel && panel.offset && panel.offset > 0) {
|
||||
PopOut_Scroll(panel, -2);
|
||||
__scrollPanel = panel;
|
||||
PopOut_ShowScrollers(panel);
|
||||
PopOut_Stop();
|
||||
__scrollPanel.interval = window.setInterval("PopOut_Up()", 8);
|
||||
}
|
||||
}
|