Showing preview only (2,402K chars total). Download the full file or copy to clipboard to get everything.
Repository: PacktPublishing/ASP.NET-Core-3-and-Angular-9-Third-Edition
Branch: master
Commit: aa4d60855afc
Files: 1124
Total size: 2.1 MB
Directory structure:
gitextract_z_phpssj/
├── .gitignore
├── .hgignore
├── All_Chapters.sln
├── Chapter_01/
│ └── HealthCheck/
│ ├── .gitignore
│ ├── ClientApp/
│ │ ├── .editorconfig
│ │ ├── .gitignore
│ │ ├── README.md
│ │ ├── angular.json
│ │ ├── browserslist
│ │ ├── e2e/
│ │ │ ├── protractor.conf.js
│ │ │ ├── src/
│ │ │ │ ├── app.e2e-spec.ts
│ │ │ │ └── app.po.ts
│ │ │ └── tsconfig.e2e.json
│ │ ├── package.json
│ │ ├── src/
│ │ │ ├── app/
│ │ │ │ ├── app.component.html
│ │ │ │ ├── app.component.ts
│ │ │ │ ├── app.module.ts
│ │ │ │ ├── app.server.module.ts
│ │ │ │ ├── counter/
│ │ │ │ │ ├── counter.component.html
│ │ │ │ │ ├── counter.component.spec.ts
│ │ │ │ │ └── counter.component.ts
│ │ │ │ ├── fetch-data/
│ │ │ │ │ ├── fetch-data.component.html
│ │ │ │ │ └── fetch-data.component.ts
│ │ │ │ ├── home/
│ │ │ │ │ ├── home.component.html
│ │ │ │ │ └── home.component.ts
│ │ │ │ └── nav-menu/
│ │ │ │ ├── nav-menu.component.css
│ │ │ │ ├── nav-menu.component.html
│ │ │ │ └── nav-menu.component.ts
│ │ │ ├── assets/
│ │ │ │ └── .gitkeep
│ │ │ ├── environments/
│ │ │ │ ├── environment.prod.ts
│ │ │ │ └── environment.ts
│ │ │ ├── index.html
│ │ │ ├── karma.conf.js
│ │ │ ├── main.ts
│ │ │ ├── polyfills.ts
│ │ │ ├── styles.css
│ │ │ ├── test.ts
│ │ │ ├── tsconfig.app.json
│ │ │ ├── tsconfig.server.json
│ │ │ ├── tsconfig.spec.json
│ │ │ └── tslint.json
│ │ ├── tsconfig.json
│ │ ├── tslint.json
│ │ └── update-npm.bat
│ ├── Controllers/
│ │ └── WeatherForecastController.cs
│ ├── HealthCheck.csproj
│ ├── Pages/
│ │ ├── Error.cshtml
│ │ ├── Error.cshtml.cs
│ │ └── _ViewImports.cshtml
│ ├── Program.cs
│ ├── Startup.cs
│ ├── WeatherForecast.cs
│ ├── appsettings.Development.json
│ └── appsettings.json
├── Chapter_01.sln
├── Chapter_02/
│ └── HealthCheck/
│ ├── .gitignore
│ ├── ClientApp/
│ │ ├── .editorconfig
│ │ ├── .gitignore
│ │ ├── README.md
│ │ ├── angular.json
│ │ ├── browserslist
│ │ ├── e2e/
│ │ │ ├── protractor.conf.js
│ │ │ ├── src/
│ │ │ │ ├── app.e2e-spec.ts
│ │ │ │ └── app.po.ts
│ │ │ └── tsconfig.e2e.json
│ │ ├── package.json
│ │ ├── src/
│ │ │ ├── app/
│ │ │ │ ├── app.component.html
│ │ │ │ ├── app.component.ts
│ │ │ │ ├── app.module.ts
│ │ │ │ ├── app.server.module.ts
│ │ │ │ ├── home/
│ │ │ │ │ ├── home.component.html
│ │ │ │ │ └── home.component.ts
│ │ │ │ └── nav-menu/
│ │ │ │ ├── nav-menu.component.css
│ │ │ │ ├── nav-menu.component.html
│ │ │ │ └── nav-menu.component.ts
│ │ │ ├── assets/
│ │ │ │ └── .gitkeep
│ │ │ ├── environments/
│ │ │ │ ├── environment.prod.ts
│ │ │ │ └── environment.ts
│ │ │ ├── index.html
│ │ │ ├── karma.conf.js
│ │ │ ├── main.ts
│ │ │ ├── polyfills.ts
│ │ │ ├── styles.css
│ │ │ ├── test.ts
│ │ │ ├── tsconfig.app.json
│ │ │ ├── tsconfig.server.json
│ │ │ ├── tsconfig.spec.json
│ │ │ └── tslint.json
│ │ ├── tsconfig.json
│ │ ├── tslint.json
│ │ └── update-npm.bat
│ ├── HealthCheck.csproj
│ ├── Pages/
│ │ ├── Error.cshtml
│ │ ├── Error.cshtml.cs
│ │ └── _ViewImports.cshtml
│ ├── Program.cs
│ ├── Startup.cs
│ ├── appsettings.Development.json
│ ├── appsettings.json
│ ├── libman.json
│ └── wwwroot/
│ └── test.html
├── Chapter_02.sln
├── Chapter_03/
│ └── HealthCheck/
│ ├── .gitignore
│ ├── ClientApp/
│ │ ├── .editorconfig
│ │ ├── .gitignore
│ │ ├── README.md
│ │ ├── angular.json
│ │ ├── browserslist
│ │ ├── e2e/
│ │ │ ├── protractor.conf.js
│ │ │ ├── src/
│ │ │ │ ├── app.e2e-spec.ts
│ │ │ │ └── app.po.ts
│ │ │ └── tsconfig.e2e.json
│ │ ├── package.json
│ │ ├── src/
│ │ │ ├── app/
│ │ │ │ ├── app.component.html
│ │ │ │ ├── app.component.ts
│ │ │ │ ├── app.module.ts
│ │ │ │ ├── app.server.module.ts
│ │ │ │ ├── health-check/
│ │ │ │ │ ├── health-check.component.css
│ │ │ │ │ ├── health-check.component.html
│ │ │ │ │ └── health-check.component.ts
│ │ │ │ ├── home/
│ │ │ │ │ ├── home.component.html
│ │ │ │ │ └── home.component.ts
│ │ │ │ └── nav-menu/
│ │ │ │ ├── nav-menu.component.css
│ │ │ │ ├── nav-menu.component.html
│ │ │ │ └── nav-menu.component.ts
│ │ │ ├── assets/
│ │ │ │ └── .gitkeep
│ │ │ ├── environments/
│ │ │ │ ├── environment.prod.ts
│ │ │ │ └── environment.ts
│ │ │ ├── index.html
│ │ │ ├── karma.conf.js
│ │ │ ├── main.ts
│ │ │ ├── polyfills.ts
│ │ │ ├── styles.css
│ │ │ ├── test.ts
│ │ │ ├── tsconfig.app.json
│ │ │ ├── tsconfig.server.json
│ │ │ ├── tsconfig.spec.json
│ │ │ └── tslint.json
│ │ ├── tsconfig.json
│ │ ├── tslint.json
│ │ └── update-npm.bat
│ ├── CustomHealthCheckOptions.cs
│ ├── HealthCheck.csproj
│ ├── ICMPHealthCheck.cs
│ ├── Pages/
│ │ ├── Error.cshtml
│ │ ├── Error.cshtml.cs
│ │ └── _ViewImports.cshtml
│ ├── Program.cs
│ ├── Startup.cs
│ ├── appsettings.Development.json
│ ├── appsettings.json
│ ├── libman.json
│ └── wwwroot/
│ └── test.html
├── Chapter_03.sln
├── Chapter_04/
│ └── WorldCities/
│ ├── .gitignore
│ ├── ClientApp/
│ │ ├── .editorconfig
│ │ ├── .gitignore
│ │ ├── README.md
│ │ ├── angular.json
│ │ ├── browserslist
│ │ ├── e2e/
│ │ │ ├── protractor.conf.js
│ │ │ ├── src/
│ │ │ │ ├── app.e2e-spec.ts
│ │ │ │ └── app.po.ts
│ │ │ └── tsconfig.e2e.json
│ │ ├── package.json
│ │ ├── src/
│ │ │ ├── app/
│ │ │ │ ├── app.component.html
│ │ │ │ ├── app.component.ts
│ │ │ │ ├── app.module.ts
│ │ │ │ ├── app.server.module.ts
│ │ │ │ ├── home/
│ │ │ │ │ ├── home.component.html
│ │ │ │ │ └── home.component.ts
│ │ │ │ └── nav-menu/
│ │ │ │ ├── nav-menu.component.css
│ │ │ │ ├── nav-menu.component.html
│ │ │ │ └── nav-menu.component.ts
│ │ │ ├── assets/
│ │ │ │ └── .gitkeep
│ │ │ ├── environments/
│ │ │ │ ├── environment.prod.ts
│ │ │ │ └── environment.ts
│ │ │ ├── index.html
│ │ │ ├── karma.conf.js
│ │ │ ├── main.ts
│ │ │ ├── polyfills.ts
│ │ │ ├── styles.css
│ │ │ ├── test.ts
│ │ │ ├── tsconfig.app.json
│ │ │ ├── tsconfig.server.json
│ │ │ ├── tsconfig.spec.json
│ │ │ └── tslint.json
│ │ ├── tsconfig.json
│ │ ├── tslint.json
│ │ └── update-npm.bat
│ ├── Controllers/
│ │ ├── CitiesController.cs
│ │ ├── CountriesController.cs
│ │ └── SeedController.cs
│ ├── Data/
│ │ ├── ApplicationDbContext.cs
│ │ ├── Migrations/
│ │ │ ├── 20191123030140_Initial.Designer.cs
│ │ │ ├── 20191123030140_Initial.cs
│ │ │ └── ApplicationDbContextModelSnapshot.cs
│ │ ├── Models/
│ │ │ ├── City.cs
│ │ │ └── Country.cs
│ │ └── Source/
│ │ └── worldcities.xlsx
│ ├── Pages/
│ │ ├── Error.cshtml
│ │ ├── Error.cshtml.cs
│ │ └── _ViewImports.cshtml
│ ├── Program.cs
│ ├── Startup.cs
│ ├── WorldCities.csproj
│ ├── appsettings.Development.json
│ └── appsettings.json
├── Chapter_04.sln
├── Chapter_05/
│ └── WorldCities/
│ ├── .gitignore
│ ├── ClientApp/
│ │ ├── .editorconfig
│ │ ├── .gitignore
│ │ ├── README.md
│ │ ├── angular.json
│ │ ├── browserslist
│ │ ├── e2e/
│ │ │ ├── protractor.conf.js
│ │ │ ├── src/
│ │ │ │ ├── app.e2e-spec.ts
│ │ │ │ └── app.po.ts
│ │ │ └── tsconfig.e2e.json
│ │ ├── package.json
│ │ ├── src/
│ │ │ ├── app/
│ │ │ │ ├── angular-material.module.ts
│ │ │ │ ├── app.component.html
│ │ │ │ ├── app.component.ts
│ │ │ │ ├── app.module.ts
│ │ │ │ ├── app.server.module.ts
│ │ │ │ ├── cities/
│ │ │ │ │ ├── _clientSidePagination/
│ │ │ │ │ │ ├── _README.txt
│ │ │ │ │ │ ├── cities.component.html
│ │ │ │ │ │ └── cities.component.ts_sample
│ │ │ │ │ ├── cities.component.css
│ │ │ │ │ ├── cities.component.html
│ │ │ │ │ ├── cities.component.ts
│ │ │ │ │ └── city.ts
│ │ │ │ ├── countries/
│ │ │ │ │ ├── countries.component.css
│ │ │ │ │ ├── countries.component.html
│ │ │ │ │ ├── countries.component.ts
│ │ │ │ │ └── country.ts
│ │ │ │ ├── home/
│ │ │ │ │ ├── home.component.html
│ │ │ │ │ └── home.component.ts
│ │ │ │ └── nav-menu/
│ │ │ │ ├── nav-menu.component.css
│ │ │ │ ├── nav-menu.component.html
│ │ │ │ └── nav-menu.component.ts
│ │ │ ├── assets/
│ │ │ │ └── .gitkeep
│ │ │ ├── environments/
│ │ │ │ ├── environment.prod.ts
│ │ │ │ └── environment.ts
│ │ │ ├── index.html
│ │ │ ├── karma.conf.js
│ │ │ ├── main.ts
│ │ │ ├── polyfills.ts
│ │ │ ├── styles.css
│ │ │ ├── test.ts
│ │ │ ├── tsconfig.app.json
│ │ │ ├── tsconfig.server.json
│ │ │ ├── tsconfig.spec.json
│ │ │ └── tslint.json
│ │ ├── tsconfig.json
│ │ ├── tslint.json
│ │ └── update-npm.bat
│ ├── Controllers/
│ │ ├── CitiesController.cs
│ │ ├── CountriesController.cs
│ │ └── SeedController.cs
│ ├── Data/
│ │ ├── ApiResult.cs
│ │ ├── ApplicationDbContext.cs
│ │ ├── Migrations/
│ │ │ ├── 20191123030140_Initial.Designer.cs
│ │ │ ├── 20191123030140_Initial.cs
│ │ │ └── ApplicationDbContextModelSnapshot.cs
│ │ ├── Models/
│ │ │ ├── City.cs
│ │ │ └── Country.cs
│ │ └── Source/
│ │ └── worldcities.xlsx
│ ├── Pages/
│ │ ├── Error.cshtml
│ │ ├── Error.cshtml.cs
│ │ └── _ViewImports.cshtml
│ ├── Program.cs
│ ├── Startup.cs
│ ├── WorldCities.csproj
│ ├── appsettings.Development.json
│ └── appsettings.json
├── Chapter_05.sln
├── Chapter_06/
│ └── WorldCities/
│ ├── .gitignore
│ ├── ClientApp/
│ │ ├── .editorconfig
│ │ ├── .gitignore
│ │ ├── README.md
│ │ ├── angular.json
│ │ ├── browserslist
│ │ ├── e2e/
│ │ │ ├── protractor.conf.js
│ │ │ ├── src/
│ │ │ │ ├── app.e2e-spec.ts
│ │ │ │ └── app.po.ts
│ │ │ └── tsconfig.e2e.json
│ │ ├── package.json
│ │ ├── src/
│ │ │ ├── app/
│ │ │ │ ├── angular-material.module.ts
│ │ │ │ ├── app.component.html
│ │ │ │ ├── app.component.ts
│ │ │ │ ├── app.module.ts
│ │ │ │ ├── app.server.module.ts
│ │ │ │ ├── cities/
│ │ │ │ │ ├── cities.component.css
│ │ │ │ │ ├── cities.component.html
│ │ │ │ │ ├── cities.component.ts
│ │ │ │ │ ├── city-edit.component.css
│ │ │ │ │ ├── city-edit.component.html
│ │ │ │ │ ├── city-edit.component.ts
│ │ │ │ │ └── city.ts
│ │ │ │ ├── countries/
│ │ │ │ │ ├── countries.component.css
│ │ │ │ │ ├── countries.component.html
│ │ │ │ │ ├── countries.component.ts
│ │ │ │ │ ├── country-edit.component.css
│ │ │ │ │ ├── country-edit.component.html
│ │ │ │ │ ├── country-edit.component.ts
│ │ │ │ │ └── country.ts
│ │ │ │ ├── home/
│ │ │ │ │ ├── home.component.html
│ │ │ │ │ └── home.component.ts
│ │ │ │ └── nav-menu/
│ │ │ │ ├── nav-menu.component.css
│ │ │ │ ├── nav-menu.component.html
│ │ │ │ └── nav-menu.component.ts
│ │ │ ├── assets/
│ │ │ │ └── .gitkeep
│ │ │ ├── environments/
│ │ │ │ ├── environment.prod.ts
│ │ │ │ └── environment.ts
│ │ │ ├── index.html
│ │ │ ├── karma.conf.js
│ │ │ ├── main.ts
│ │ │ ├── polyfills.ts
│ │ │ ├── styles.css
│ │ │ ├── test.ts
│ │ │ ├── tsconfig.app.json
│ │ │ ├── tsconfig.server.json
│ │ │ ├── tsconfig.spec.json
│ │ │ └── tslint.json
│ │ ├── tsconfig.json
│ │ ├── tslint.json
│ │ └── update-npm.bat
│ ├── Controllers/
│ │ ├── CitiesController.cs
│ │ ├── CountriesController.cs
│ │ └── SeedController.cs
│ ├── Data/
│ │ ├── ApiResult.cs
│ │ ├── ApplicationDbContext.cs
│ │ ├── Migrations/
│ │ │ ├── 20191123030140_Initial.Designer.cs
│ │ │ ├── 20191123030140_Initial.cs
│ │ │ └── ApplicationDbContextModelSnapshot.cs
│ │ ├── Models/
│ │ │ ├── City.cs
│ │ │ └── Country.cs
│ │ └── Source/
│ │ └── worldcities.xlsx
│ ├── Pages/
│ │ ├── Error.cshtml
│ │ ├── Error.cshtml.cs
│ │ └── _ViewImports.cshtml
│ ├── Program.cs
│ ├── Startup.cs
│ ├── WorldCities.csproj
│ ├── appsettings.Development.json
│ └── appsettings.json
├── Chapter_06.sln
├── Chapter_07/
│ └── WorldCities/
│ ├── .gitignore
│ ├── ClientApp/
│ │ ├── .editorconfig
│ │ ├── .gitignore
│ │ ├── README.md
│ │ ├── angular.json
│ │ ├── browserslist
│ │ ├── e2e/
│ │ │ ├── protractor.conf.js
│ │ │ ├── src/
│ │ │ │ ├── app.e2e-spec.ts
│ │ │ │ └── app.po.ts
│ │ │ └── tsconfig.e2e.json
│ │ ├── package.json
│ │ ├── src/
│ │ │ ├── app/
│ │ │ │ ├── angular-material.module.ts
│ │ │ │ ├── app.component.html
│ │ │ │ ├── app.component.ts
│ │ │ │ ├── app.module.ts
│ │ │ │ ├── app.server.module.ts
│ │ │ │ ├── base.form.component.ts
│ │ │ │ ├── base.service.ts
│ │ │ │ ├── cities/
│ │ │ │ │ ├── cities.component.css
│ │ │ │ │ ├── cities.component.html
│ │ │ │ │ ├── cities.component.ts
│ │ │ │ │ ├── city-edit.component.css
│ │ │ │ │ ├── city-edit.component.html
│ │ │ │ │ ├── city-edit.component.ts
│ │ │ │ │ ├── city.service.ts
│ │ │ │ │ └── city.ts
│ │ │ │ ├── countries/
│ │ │ │ │ ├── countries.component.css
│ │ │ │ │ ├── countries.component.html
│ │ │ │ │ ├── countries.component.ts
│ │ │ │ │ ├── country-edit.component.css
│ │ │ │ │ ├── country-edit.component.html
│ │ │ │ │ ├── country-edit.component.ts
│ │ │ │ │ ├── country.service.ts
│ │ │ │ │ └── country.ts
│ │ │ │ ├── home/
│ │ │ │ │ ├── home.component.html
│ │ │ │ │ └── home.component.ts
│ │ │ │ └── nav-menu/
│ │ │ │ ├── nav-menu.component.css
│ │ │ │ ├── nav-menu.component.html
│ │ │ │ └── nav-menu.component.ts
│ │ │ ├── assets/
│ │ │ │ └── .gitkeep
│ │ │ ├── environments/
│ │ │ │ ├── environment.prod.ts
│ │ │ │ └── environment.ts
│ │ │ ├── index.html
│ │ │ ├── karma.conf.js
│ │ │ ├── main.ts
│ │ │ ├── polyfills.ts
│ │ │ ├── styles.css
│ │ │ ├── test.ts
│ │ │ ├── tsconfig.app.json
│ │ │ ├── tsconfig.server.json
│ │ │ ├── tsconfig.spec.json
│ │ │ └── tslint.json
│ │ ├── tsconfig.json
│ │ ├── tslint.json
│ │ └── update-npm.bat
│ ├── Controllers/
│ │ ├── CitiesController.cs
│ │ ├── CountriesController.cs
│ │ └── SeedController.cs
│ ├── Data/
│ │ ├── ApiResult.cs
│ │ ├── ApplicationDbContext.cs
│ │ ├── CityDTO.cs
│ │ ├── CountryDTO.cs
│ │ ├── Migrations/
│ │ │ ├── 20191123030140_Initial.Designer.cs
│ │ │ ├── 20191123030140_Initial.cs
│ │ │ └── ApplicationDbContextModelSnapshot.cs
│ │ ├── Models/
│ │ │ ├── City.cs
│ │ │ └── Country.cs
│ │ └── Source/
│ │ └── worldcities.xlsx
│ ├── Pages/
│ │ ├── Error.cshtml
│ │ ├── Error.cshtml.cs
│ │ └── _ViewImports.cshtml
│ ├── Program.cs
│ ├── Startup.cs
│ ├── WorldCities.csproj
│ ├── appsettings.Development.json
│ └── appsettings.json
├── Chapter_07.sln
├── Chapter_08/
│ └── WorldCities/
│ ├── .gitignore
│ ├── ClientApp/
│ │ ├── .editorconfig
│ │ ├── .gitignore
│ │ ├── README.md
│ │ ├── angular.json
│ │ ├── browserslist
│ │ ├── e2e/
│ │ │ ├── protractor.conf.js
│ │ │ ├── src/
│ │ │ │ ├── app.e2e-spec.ts
│ │ │ │ └── app.po.ts
│ │ │ └── tsconfig.e2e.json
│ │ ├── package.json
│ │ ├── src/
│ │ │ ├── app/
│ │ │ │ ├── angular-material.module.ts
│ │ │ │ ├── app.component.html
│ │ │ │ ├── app.component.ts
│ │ │ │ ├── app.module.ts
│ │ │ │ ├── app.server.module.ts
│ │ │ │ ├── base.form.component.ts
│ │ │ │ ├── base.service.ts
│ │ │ │ ├── cities/
│ │ │ │ │ ├── cities.component.css
│ │ │ │ │ ├── cities.component.html
│ │ │ │ │ ├── cities.component.ts
│ │ │ │ │ ├── city-edit.component.css
│ │ │ │ │ ├── city-edit.component.html
│ │ │ │ │ ├── city-edit.component.ts
│ │ │ │ │ ├── city.service.ts
│ │ │ │ │ └── city.ts
│ │ │ │ ├── countries/
│ │ │ │ │ ├── countries.component.css
│ │ │ │ │ ├── countries.component.html
│ │ │ │ │ ├── countries.component.ts
│ │ │ │ │ ├── country-edit.component.css
│ │ │ │ │ ├── country-edit.component.html
│ │ │ │ │ ├── country-edit.component.ts
│ │ │ │ │ ├── country.service.ts
│ │ │ │ │ └── country.ts
│ │ │ │ ├── home/
│ │ │ │ │ ├── home.component.html
│ │ │ │ │ └── home.component.ts
│ │ │ │ └── nav-menu/
│ │ │ │ ├── nav-menu.component.css
│ │ │ │ ├── nav-menu.component.html
│ │ │ │ └── nav-menu.component.ts
│ │ │ ├── assets/
│ │ │ │ └── .gitkeep
│ │ │ ├── environments/
│ │ │ │ ├── environment.prod.ts
│ │ │ │ └── environment.ts
│ │ │ ├── index.html
│ │ │ ├── karma.conf.js
│ │ │ ├── main.ts
│ │ │ ├── polyfills.ts
│ │ │ ├── styles.css
│ │ │ ├── test.ts
│ │ │ ├── tsconfig.app.json
│ │ │ ├── tsconfig.server.json
│ │ │ ├── tsconfig.spec.json
│ │ │ └── tslint.json
│ │ ├── tsconfig.json
│ │ ├── tslint.json
│ │ └── update-npm.bat
│ ├── Controllers/
│ │ ├── CitiesController.cs
│ │ ├── CountriesController.cs
│ │ └── SeedController.cs
│ ├── Data/
│ │ ├── ApiResult.cs
│ │ ├── ApplicationDbContext.cs
│ │ ├── CityDTO.cs
│ │ ├── CountryDTO.cs
│ │ ├── IQueryableExtensions.cs
│ │ ├── Migrations/
│ │ │ ├── 20191123030140_Initial.Designer.cs
│ │ │ ├── 20191123030140_Initial.cs
│ │ │ └── ApplicationDbContextModelSnapshot.cs
│ │ ├── Models/
│ │ │ ├── City.cs
│ │ │ └── Country.cs
│ │ └── Source/
│ │ └── worldcities.xlsx
│ ├── Pages/
│ │ ├── Error.cshtml
│ │ ├── Error.cshtml.cs
│ │ └── _ViewImports.cshtml
│ ├── Program.cs
│ ├── Startup.cs
│ ├── WorldCities.csproj
│ ├── appsettings.Development.json
│ └── appsettings.json
├── Chapter_08.sln
├── Chapter_09/
│ ├── WorldCities/
│ │ ├── .gitignore
│ │ ├── ClientApp/
│ │ │ ├── .editorconfig
│ │ │ ├── .gitignore
│ │ │ ├── README.md
│ │ │ ├── angular.json
│ │ │ ├── browserslist
│ │ │ ├── e2e/
│ │ │ │ ├── protractor.conf.js
│ │ │ │ ├── src/
│ │ │ │ │ ├── app.e2e-spec.ts
│ │ │ │ │ └── app.po.ts
│ │ │ │ └── tsconfig.e2e.json
│ │ │ ├── package.json
│ │ │ ├── src/
│ │ │ │ ├── app/
│ │ │ │ │ ├── angular-material.module.ts
│ │ │ │ │ ├── app.component.html
│ │ │ │ │ ├── app.component.ts
│ │ │ │ │ ├── app.module.ts
│ │ │ │ │ ├── app.server.module.ts
│ │ │ │ │ ├── base.form.component.ts
│ │ │ │ │ ├── base.service.ts
│ │ │ │ │ ├── cities/
│ │ │ │ │ │ ├── cities.component.css
│ │ │ │ │ │ ├── cities.component.html
│ │ │ │ │ │ ├── cities.component.spec.ts
│ │ │ │ │ │ ├── cities.component.ts
│ │ │ │ │ │ ├── city-edit.component.css
│ │ │ │ │ │ ├── city-edit.component.html
│ │ │ │ │ │ ├── city-edit.component.ts
│ │ │ │ │ │ ├── city.service.ts
│ │ │ │ │ │ └── city.ts
│ │ │ │ │ ├── countries/
│ │ │ │ │ │ ├── countries.component.css
│ │ │ │ │ │ ├── countries.component.html
│ │ │ │ │ │ ├── countries.component.ts
│ │ │ │ │ │ ├── country-edit.component.css
│ │ │ │ │ │ ├── country-edit.component.html
│ │ │ │ │ │ ├── country-edit.component.ts
│ │ │ │ │ │ ├── country.service.ts
│ │ │ │ │ │ └── country.ts
│ │ │ │ │ ├── home/
│ │ │ │ │ │ ├── home.component.html
│ │ │ │ │ │ └── home.component.ts
│ │ │ │ │ └── nav-menu/
│ │ │ │ │ ├── nav-menu.component.css
│ │ │ │ │ ├── nav-menu.component.html
│ │ │ │ │ └── nav-menu.component.ts
│ │ │ │ ├── assets/
│ │ │ │ │ └── .gitkeep
│ │ │ │ ├── environments/
│ │ │ │ │ ├── environment.prod.ts
│ │ │ │ │ └── environment.ts
│ │ │ │ ├── index.html
│ │ │ │ ├── karma.conf.js
│ │ │ │ ├── main.ts
│ │ │ │ ├── polyfills.ts
│ │ │ │ ├── styles.css
│ │ │ │ ├── test.ts
│ │ │ │ ├── tsconfig.app.json
│ │ │ │ ├── tsconfig.server.json
│ │ │ │ ├── tsconfig.spec.json
│ │ │ │ └── tslint.json
│ │ │ ├── tsconfig.json
│ │ │ ├── tslint.json
│ │ │ └── update-npm.bat
│ │ ├── Controllers/
│ │ │ ├── CitiesController.cs
│ │ │ ├── CountriesController.cs
│ │ │ └── SeedController.cs
│ │ ├── Data/
│ │ │ ├── ApiResult.cs
│ │ │ ├── ApplicationDbContext.cs
│ │ │ ├── CityDTO.cs
│ │ │ ├── CountryDTO.cs
│ │ │ ├── IQueryableExtensions.cs
│ │ │ ├── Migrations/
│ │ │ │ ├── 20191123030140_Initial.Designer.cs
│ │ │ │ ├── 20191123030140_Initial.cs
│ │ │ │ └── ApplicationDbContextModelSnapshot.cs
│ │ │ ├── Models/
│ │ │ │ ├── City.cs
│ │ │ │ └── Country.cs
│ │ │ └── Source/
│ │ │ └── worldcities.xlsx
│ │ ├── Pages/
│ │ │ ├── Error.cshtml
│ │ │ ├── Error.cshtml.cs
│ │ │ └── _ViewImports.cshtml
│ │ ├── Program.cs
│ │ ├── Startup.cs
│ │ ├── WorldCities.csproj
│ │ ├── appsettings.Development.json
│ │ └── appsettings.json
│ └── WorldCities.Tests/
│ ├── CitiesController_Tests.cs
│ └── WorldCities.Tests.csproj
├── Chapter_09.sln
├── Chapter_10/
│ ├── AuthSample/
│ │ ├── .gitignore
│ │ ├── AuthSample.csproj
│ │ ├── ClientApp/
│ │ │ ├── .editorconfig
│ │ │ ├── .gitignore
│ │ │ ├── README.md
│ │ │ ├── angular.json
│ │ │ ├── browserslist
│ │ │ ├── e2e/
│ │ │ │ ├── protractor.conf.js
│ │ │ │ ├── src/
│ │ │ │ │ ├── app.e2e-spec.ts
│ │ │ │ │ └── app.po.ts
│ │ │ │ └── tsconfig.e2e.json
│ │ │ ├── package.json
│ │ │ ├── src/
│ │ │ │ ├── api-authorization/
│ │ │ │ │ ├── api-authorization.constants.ts
│ │ │ │ │ ├── api-authorization.module.spec.ts
│ │ │ │ │ ├── api-authorization.module.ts
│ │ │ │ │ ├── authorize.guard.spec.ts
│ │ │ │ │ ├── authorize.guard.ts
│ │ │ │ │ ├── authorize.interceptor.spec.ts
│ │ │ │ │ ├── authorize.interceptor.ts
│ │ │ │ │ ├── authorize.service.spec.ts
│ │ │ │ │ ├── authorize.service.ts
│ │ │ │ │ ├── login/
│ │ │ │ │ │ ├── login.component.css
│ │ │ │ │ │ ├── login.component.html
│ │ │ │ │ │ ├── login.component.spec.ts
│ │ │ │ │ │ └── login.component.ts
│ │ │ │ │ ├── login-menu/
│ │ │ │ │ │ ├── login-menu.component.css
│ │ │ │ │ │ ├── login-menu.component.html
│ │ │ │ │ │ ├── login-menu.component.spec.ts
│ │ │ │ │ │ └── login-menu.component.ts
│ │ │ │ │ └── logout/
│ │ │ │ │ ├── logout.component.css
│ │ │ │ │ ├── logout.component.html
│ │ │ │ │ ├── logout.component.spec.ts
│ │ │ │ │ └── logout.component.ts
│ │ │ │ ├── app/
│ │ │ │ │ ├── app.component.html
│ │ │ │ │ ├── app.component.ts
│ │ │ │ │ ├── app.module.ts
│ │ │ │ │ ├── app.server.module.ts
│ │ │ │ │ ├── counter/
│ │ │ │ │ │ ├── counter.component.html
│ │ │ │ │ │ ├── counter.component.spec.ts
│ │ │ │ │ │ └── counter.component.ts
│ │ │ │ │ ├── fetch-data/
│ │ │ │ │ │ ├── fetch-data.component.html
│ │ │ │ │ │ └── fetch-data.component.ts
│ │ │ │ │ ├── home/
│ │ │ │ │ │ ├── home.component.html
│ │ │ │ │ │ └── home.component.ts
│ │ │ │ │ └── nav-menu/
│ │ │ │ │ ├── nav-menu.component.css
│ │ │ │ │ ├── nav-menu.component.html
│ │ │ │ │ └── nav-menu.component.ts
│ │ │ │ ├── assets/
│ │ │ │ │ └── .gitkeep
│ │ │ │ ├── environments/
│ │ │ │ │ ├── environment.prod.ts
│ │ │ │ │ └── environment.ts
│ │ │ │ ├── index.html
│ │ │ │ ├── karma.conf.js
│ │ │ │ ├── main.ts
│ │ │ │ ├── polyfills.ts
│ │ │ │ ├── styles.css
│ │ │ │ ├── test.ts
│ │ │ │ ├── tsconfig.app.json
│ │ │ │ ├── tsconfig.server.json
│ │ │ │ ├── tsconfig.spec.json
│ │ │ │ └── tslint.json
│ │ │ ├── tsconfig.json
│ │ │ └── tslint.json
│ │ ├── Controllers/
│ │ │ ├── OidcConfigurationController.cs
│ │ │ └── WeatherForecastController.cs
│ │ ├── Data/
│ │ │ ├── ApplicationDbContext.cs
│ │ │ └── Migrations/
│ │ │ ├── 00000000000000_CreateIdentitySchema.Designer.cs
│ │ │ ├── 00000000000000_CreateIdentitySchema.cs
│ │ │ └── ApplicationDbContextModelSnapshot.cs
│ │ ├── Models/
│ │ │ └── ApplicationUser.cs
│ │ ├── Pages/
│ │ │ ├── Error.cshtml
│ │ │ ├── Error.cshtml.cs
│ │ │ ├── Shared/
│ │ │ │ └── _LoginPartial.cshtml
│ │ │ └── _ViewImports.cshtml
│ │ ├── Program.cs
│ │ ├── Startup.cs
│ │ ├── WeatherForecast.cs
│ │ ├── appsettings.Development.json
│ │ └── appsettings.json
│ ├── WorldCities/
│ │ ├── .gitignore
│ │ ├── ClientApp/
│ │ │ ├── .editorconfig
│ │ │ ├── .gitignore
│ │ │ ├── README.md
│ │ │ ├── angular.json
│ │ │ ├── browserslist
│ │ │ ├── e2e/
│ │ │ │ ├── protractor.conf.js
│ │ │ │ ├── src/
│ │ │ │ │ ├── app.e2e-spec.ts
│ │ │ │ │ └── app.po.ts
│ │ │ │ └── tsconfig.e2e.json
│ │ │ ├── package.json
│ │ │ ├── src/
│ │ │ │ ├── api-authorization/
│ │ │ │ │ ├── api-authorization.constants.ts
│ │ │ │ │ ├── api-authorization.module.spec.ts
│ │ │ │ │ ├── api-authorization.module.ts
│ │ │ │ │ ├── authorize.guard.spec.ts
│ │ │ │ │ ├── authorize.guard.ts
│ │ │ │ │ ├── authorize.interceptor.spec.ts
│ │ │ │ │ ├── authorize.interceptor.ts
│ │ │ │ │ ├── authorize.service.spec.ts
│ │ │ │ │ ├── authorize.service.ts
│ │ │ │ │ ├── login/
│ │ │ │ │ │ ├── login.component.css
│ │ │ │ │ │ ├── login.component.html
│ │ │ │ │ │ ├── login.component.spec.ts
│ │ │ │ │ │ └── login.component.ts
│ │ │ │ │ ├── login-menu/
│ │ │ │ │ │ ├── login-menu.component.css
│ │ │ │ │ │ ├── login-menu.component.html
│ │ │ │ │ │ ├── login-menu.component.spec.ts
│ │ │ │ │ │ └── login-menu.component.ts
│ │ │ │ │ └── logout/
│ │ │ │ │ ├── logout.component.css
│ │ │ │ │ ├── logout.component.html
│ │ │ │ │ ├── logout.component.spec.ts
│ │ │ │ │ └── logout.component.ts
│ │ │ │ ├── app/
│ │ │ │ │ ├── angular-material.module.ts
│ │ │ │ │ ├── app.component.html
│ │ │ │ │ ├── app.component.ts
│ │ │ │ │ ├── app.module.ts
│ │ │ │ │ ├── app.server.module.ts
│ │ │ │ │ ├── base.form.component.ts
│ │ │ │ │ ├── base.service.ts
│ │ │ │ │ ├── cities/
│ │ │ │ │ │ ├── cities.component.css
│ │ │ │ │ │ ├── cities.component.html
│ │ │ │ │ │ ├── cities.component.spec.ts
│ │ │ │ │ │ ├── cities.component.ts
│ │ │ │ │ │ ├── city-edit.component.css
│ │ │ │ │ │ ├── city-edit.component.html
│ │ │ │ │ │ ├── city-edit.component.ts
│ │ │ │ │ │ ├── city.service.ts
│ │ │ │ │ │ └── city.ts
│ │ │ │ │ ├── countries/
│ │ │ │ │ │ ├── countries.component.css
│ │ │ │ │ │ ├── countries.component.html
│ │ │ │ │ │ ├── countries.component.ts
│ │ │ │ │ │ ├── country-edit.component.css
│ │ │ │ │ │ ├── country-edit.component.html
│ │ │ │ │ │ ├── country-edit.component.ts
│ │ │ │ │ │ ├── country.service.ts
│ │ │ │ │ │ └── country.ts
│ │ │ │ │ ├── home/
│ │ │ │ │ │ ├── home.component.html
│ │ │ │ │ │ └── home.component.ts
│ │ │ │ │ └── nav-menu/
│ │ │ │ │ ├── nav-menu.component.css
│ │ │ │ │ ├── nav-menu.component.html
│ │ │ │ │ └── nav-menu.component.ts
│ │ │ │ ├── assets/
│ │ │ │ │ └── .gitkeep
│ │ │ │ ├── environments/
│ │ │ │ │ ├── environment.prod.ts
│ │ │ │ │ └── environment.ts
│ │ │ │ ├── index.html
│ │ │ │ ├── karma.conf.js
│ │ │ │ ├── main.ts
│ │ │ │ ├── polyfills.ts
│ │ │ │ ├── styles.css
│ │ │ │ ├── test.ts
│ │ │ │ ├── tsconfig.app.json
│ │ │ │ ├── tsconfig.server.json
│ │ │ │ ├── tsconfig.spec.json
│ │ │ │ └── tslint.json
│ │ │ ├── tsconfig.json
│ │ │ ├── tslint.json
│ │ │ └── update-npm.bat
│ │ ├── Controllers/
│ │ │ ├── CitiesController.cs
│ │ │ ├── CountriesController.cs
│ │ │ ├── OidcConfigurationController.cs
│ │ │ └── SeedController.cs
│ │ ├── Data/
│ │ │ ├── ApiResult.cs
│ │ │ ├── ApplicationDbContext.cs
│ │ │ ├── CityDTO.cs
│ │ │ ├── CountryDTO.cs
│ │ │ ├── IQueryableExtensions.cs
│ │ │ ├── Migrations/
│ │ │ │ ├── 20191230002753_Identity.Designer.cs
│ │ │ │ ├── 20191230002753_Identity.cs
│ │ │ │ └── ApplicationDbContextModelSnapshot.cs
│ │ │ ├── Models/
│ │ │ │ ├── ApplicationUser.cs
│ │ │ │ ├── City.cs
│ │ │ │ └── Country.cs
│ │ │ └── Source/
│ │ │ └── worldcities.xlsx
│ │ ├── Pages/
│ │ │ ├── Error.cshtml
│ │ │ ├── Error.cshtml.cs
│ │ │ ├── Shared/
│ │ │ │ └── _LoginPartial.cshtml
│ │ │ └── _ViewImports.cshtml
│ │ ├── Program.cs
│ │ ├── Startup.cs
│ │ ├── WorldCities.csproj
│ │ ├── appsettings.Development.json
│ │ └── appsettings.json
│ └── WorldCities.Tests/
│ ├── CitiesController_Tests.cs
│ ├── IdentityHelper.cs
│ ├── SeedController_Tests.cs
│ └── WorldCities.Tests.csproj
├── Chapter_10.sln
├── Chapter_11/
│ ├── HealthCheck/
│ │ ├── .config/
│ │ │ └── dotnet-tools.json
│ │ ├── .gitignore
│ │ ├── ClientApp/
│ │ │ ├── .editorconfig
│ │ │ ├── .gitignore
│ │ │ ├── README.md
│ │ │ ├── angular.json
│ │ │ ├── browserslist
│ │ │ ├── e2e/
│ │ │ │ ├── protractor.conf.js
│ │ │ │ ├── src/
│ │ │ │ │ ├── app.e2e-spec.ts
│ │ │ │ │ └── app.po.ts
│ │ │ │ └── tsconfig.e2e.json
│ │ │ ├── ngsw-config.json
│ │ │ ├── package.json
│ │ │ ├── src/
│ │ │ │ ├── app/
│ │ │ │ │ ├── app.component.html
│ │ │ │ │ ├── app.component.ts
│ │ │ │ │ ├── app.module.ts
│ │ │ │ │ ├── app.server.module.ts
│ │ │ │ │ ├── health-check/
│ │ │ │ │ │ ├── health-check.component.css
│ │ │ │ │ │ ├── health-check.component.html
│ │ │ │ │ │ └── health-check.component.ts
│ │ │ │ │ ├── home/
│ │ │ │ │ │ ├── home.component.html
│ │ │ │ │ │ └── home.component.ts
│ │ │ │ │ └── nav-menu/
│ │ │ │ │ ├── nav-menu.component.css
│ │ │ │ │ ├── nav-menu.component.html
│ │ │ │ │ └── nav-menu.component.ts
│ │ │ │ ├── assets/
│ │ │ │ │ └── .gitkeep
│ │ │ │ ├── environments/
│ │ │ │ │ ├── environment.prod.ts
│ │ │ │ │ └── environment.ts
│ │ │ │ ├── index.html
│ │ │ │ ├── karma.conf.js
│ │ │ │ ├── main.ts
│ │ │ │ ├── manifest.webmanifest
│ │ │ │ ├── ng-connection-service/
│ │ │ │ │ ├── connection-service.module.ts
│ │ │ │ │ ├── connection-service.service.spec.ts
│ │ │ │ │ └── connection-service.service.ts
│ │ │ │ ├── polyfills.ts
│ │ │ │ ├── styles.css
│ │ │ │ ├── test.ts
│ │ │ │ ├── tsconfig.app.json
│ │ │ │ ├── tsconfig.server.json
│ │ │ │ ├── tsconfig.spec.json
│ │ │ │ └── tslint.json
│ │ │ ├── tsconfig.json
│ │ │ ├── tslint.json
│ │ │ └── update-npm.bat
│ │ ├── CustomHealthCheckOptions.cs
│ │ ├── HealthCheck.csproj
│ │ ├── ICMPHealthCheck.cs
│ │ ├── Pages/
│ │ │ ├── Error.cshtml
│ │ │ ├── Error.cshtml.cs
│ │ │ └── _ViewImports.cshtml
│ │ ├── Program.cs
│ │ ├── Startup.cs
│ │ ├── appsettings.Development.json
│ │ ├── appsettings.json
│ │ ├── libman.json
│ │ └── wwwroot/
│ │ ├── isOnline.txt
│ │ ├── manifest.webmanifest
│ │ ├── ngsw-worker.js
│ │ ├── ngsw.json
│ │ ├── safety-worker.js
│ │ └── test.html
│ └── WorldCities/
│ ├── .gitignore
│ ├── ClientApp/
│ │ ├── .editorconfig
│ │ ├── .gitignore
│ │ ├── README.md
│ │ ├── angular.json
│ │ ├── browserslist
│ │ ├── e2e/
│ │ │ ├── protractor.conf.js
│ │ │ ├── src/
│ │ │ │ ├── app.e2e-spec.ts
│ │ │ │ └── app.po.ts
│ │ │ └── tsconfig.e2e.json
│ │ ├── ngsw-config.json
│ │ ├── package.json
│ │ ├── src/
│ │ │ ├── api-authorization/
│ │ │ │ ├── api-authorization.constants.ts
│ │ │ │ ├── api-authorization.module.spec.ts
│ │ │ │ ├── api-authorization.module.ts
│ │ │ │ ├── authorize.guard.spec.ts
│ │ │ │ ├── authorize.guard.ts
│ │ │ │ ├── authorize.interceptor.spec.ts
│ │ │ │ ├── authorize.interceptor.ts
│ │ │ │ ├── authorize.service.spec.ts
│ │ │ │ ├── authorize.service.ts
│ │ │ │ ├── login/
│ │ │ │ │ ├── login.component.css
│ │ │ │ │ ├── login.component.html
│ │ │ │ │ ├── login.component.spec.ts
│ │ │ │ │ └── login.component.ts
│ │ │ │ ├── login-menu/
│ │ │ │ │ ├── login-menu.component.css
│ │ │ │ │ ├── login-menu.component.html
│ │ │ │ │ ├── login-menu.component.spec.ts
│ │ │ │ │ └── login-menu.component.ts
│ │ │ │ └── logout/
│ │ │ │ ├── logout.component.css
│ │ │ │ ├── logout.component.html
│ │ │ │ ├── logout.component.spec.ts
│ │ │ │ └── logout.component.ts
│ │ │ ├── app/
│ │ │ │ ├── angular-material.module.ts
│ │ │ │ ├── app.component.html
│ │ │ │ ├── app.component.ts
│ │ │ │ ├── app.module.ts
│ │ │ │ ├── app.server.module.ts
│ │ │ │ ├── base.form.component.ts
│ │ │ │ ├── base.service.ts
│ │ │ │ ├── cities/
│ │ │ │ │ ├── cities.component.css
│ │ │ │ │ ├── cities.component.html
│ │ │ │ │ ├── cities.component.spec.ts
│ │ │ │ │ ├── cities.component.ts
│ │ │ │ │ ├── city-edit.component.css
│ │ │ │ │ ├── city-edit.component.html
│ │ │ │ │ ├── city-edit.component.ts
│ │ │ │ │ ├── city.service.ts
│ │ │ │ │ └── city.ts
│ │ │ │ ├── countries/
│ │ │ │ │ ├── countries.component.css
│ │ │ │ │ ├── countries.component.html
│ │ │ │ │ ├── countries.component.ts
│ │ │ │ │ ├── country-edit.component.css
│ │ │ │ │ ├── country-edit.component.html
│ │ │ │ │ ├── country-edit.component.ts
│ │ │ │ │ ├── country.service.ts
│ │ │ │ │ └── country.ts
│ │ │ │ ├── home/
│ │ │ │ │ ├── home.component.html
│ │ │ │ │ └── home.component.ts
│ │ │ │ └── nav-menu/
│ │ │ │ ├── nav-menu.component.css
│ │ │ │ ├── nav-menu.component.html
│ │ │ │ └── nav-menu.component.ts
│ │ │ ├── assets/
│ │ │ │ └── .gitkeep
│ │ │ ├── environments/
│ │ │ │ ├── environment.prod.ts
│ │ │ │ └── environment.ts
│ │ │ ├── index.html
│ │ │ ├── karma.conf.js
│ │ │ ├── main.ts
│ │ │ ├── manifest.webmanifest
│ │ │ ├── ng-connection-service/
│ │ │ │ ├── connection-service.module.ts
│ │ │ │ ├── connection-service.service.spec.ts
│ │ │ │ └── connection-service.service.ts
│ │ │ ├── polyfills.ts
│ │ │ ├── styles.css
│ │ │ ├── test.ts
│ │ │ ├── tsconfig.app.json
│ │ │ ├── tsconfig.server.json
│ │ │ ├── tsconfig.spec.json
│ │ │ └── tslint.json
│ │ ├── tsconfig.json
│ │ ├── tslint.json
│ │ └── update-npm.bat
│ ├── Controllers/
│ │ ├── CitiesController.cs
│ │ ├── CountriesController.cs
│ │ ├── OidcConfigurationController.cs
│ │ └── SeedController.cs
│ ├── Data/
│ │ ├── ApiResult.cs
│ │ ├── ApplicationDbContext.cs
│ │ ├── CityDTO.cs
│ │ ├── CountryDTO.cs
│ │ ├── IQueryableExtensions.cs
│ │ ├── Migrations/
│ │ │ ├── 20191230002753_Identity.Designer.cs
│ │ │ ├── 20191230002753_Identity.cs
│ │ │ └── ApplicationDbContextModelSnapshot.cs
│ │ ├── Models/
│ │ │ ├── ApplicationUser.cs
│ │ │ ├── City.cs
│ │ │ └── Country.cs
│ │ └── Source/
│ │ └── worldcities.xlsx
│ ├── Pages/
│ │ ├── Error.cshtml
│ │ ├── Error.cshtml.cs
│ │ ├── Shared/
│ │ │ └── _LoginPartial.cshtml
│ │ └── _ViewImports.cshtml
│ ├── Program.cs
│ ├── Startup.cs
│ ├── WorldCities.csproj
│ ├── appsettings.Development.json
│ ├── appsettings.json
│ └── wwwroot/
│ ├── isOnline.txt
│ ├── manifest.webmanifest
│ ├── ngsw-worker.js
│ ├── ngsw.json
│ └── safety-worker.js
├── Chapter_11.sln
├── Chapter_12/
│ ├── HealthCheck/
│ │ ├── .config/
│ │ │ └── dotnet-tools.json
│ │ ├── .gitignore
│ │ ├── ClientApp/
│ │ │ ├── .editorconfig
│ │ │ ├── .gitignore
│ │ │ ├── README.md
│ │ │ ├── angular.json
│ │ │ ├── browserslist
│ │ │ ├── e2e/
│ │ │ │ ├── protractor.conf.js
│ │ │ │ ├── src/
│ │ │ │ │ ├── app.e2e-spec.ts
│ │ │ │ │ └── app.po.ts
│ │ │ │ └── tsconfig.e2e.json
│ │ │ ├── ngsw-config.json
│ │ │ ├── package.json
│ │ │ ├── src/
│ │ │ │ ├── app/
│ │ │ │ │ ├── app.component.html
│ │ │ │ │ ├── app.component.ts
│ │ │ │ │ ├── app.module.ts
│ │ │ │ │ ├── app.server.module.ts
│ │ │ │ │ ├── health-check/
│ │ │ │ │ │ ├── health-check.component.css
│ │ │ │ │ │ ├── health-check.component.html
│ │ │ │ │ │ └── health-check.component.ts
│ │ │ │ │ ├── home/
│ │ │ │ │ │ ├── home.component.html
│ │ │ │ │ │ └── home.component.ts
│ │ │ │ │ └── nav-menu/
│ │ │ │ │ ├── nav-menu.component.css
│ │ │ │ │ ├── nav-menu.component.html
│ │ │ │ │ └── nav-menu.component.ts
│ │ │ │ ├── assets/
│ │ │ │ │ └── .gitkeep
│ │ │ │ ├── environments/
│ │ │ │ │ ├── environment.prod.ts
│ │ │ │ │ └── environment.ts
│ │ │ │ ├── index.html
│ │ │ │ ├── karma.conf.js
│ │ │ │ ├── main.ts
│ │ │ │ ├── manifest.webmanifest
│ │ │ │ ├── ng-connection-service/
│ │ │ │ │ ├── connection-service.module.ts
│ │ │ │ │ ├── connection-service.service.spec.ts
│ │ │ │ │ └── connection-service.service.ts
│ │ │ │ ├── polyfills.ts
│ │ │ │ ├── styles.css
│ │ │ │ ├── test.ts
│ │ │ │ ├── tsconfig.app.json
│ │ │ │ ├── tsconfig.server.json
│ │ │ │ ├── tsconfig.spec.json
│ │ │ │ └── tslint.json
│ │ │ ├── tsconfig.json
│ │ │ ├── tslint.json
│ │ │ └── update-npm.bat
│ │ ├── CustomHealthCheckOptions.cs
│ │ ├── HealthCheck.csproj
│ │ ├── ICMPHealthCheck.cs
│ │ ├── Pages/
│ │ │ ├── Error.cshtml
│ │ │ ├── Error.cshtml.cs
│ │ │ └── _ViewImports.cshtml
│ │ ├── Program.cs
│ │ ├── Startup.cs
│ │ ├── appsettings.Development.json
│ │ ├── appsettings.json
│ │ ├── libman.json
│ │ └── wwwroot/
│ │ ├── isOnline.txt
│ │ ├── manifest.webmanifest
│ │ ├── ngsw-worker.js
│ │ ├── ngsw.json
│ │ ├── safety-worker.js
│ │ └── test.html
│ └── WorldCities/
│ ├── .gitignore
│ ├── ClientApp/
│ │ ├── .editorconfig
│ │ ├── .gitignore
│ │ ├── README.md
│ │ ├── angular.json
│ │ ├── browserslist
│ │ ├── e2e/
│ │ │ ├── protractor.conf.js
│ │ │ ├── src/
│ │ │ │ ├── app.e2e-spec.ts
│ │ │ │ └── app.po.ts
│ │ │ └── tsconfig.e2e.json
│ │ ├── ngsw-config.json
│ │ ├── package.json
│ │ ├── src/
│ │ │ ├── api-authorization/
│ │ │ │ ├── api-authorization.constants.ts
│ │ │ │ ├── api-authorization.module.spec.ts
│ │ │ │ ├── api-authorization.module.ts
│ │ │ │ ├── authorize.guard.spec.ts
│ │ │ │ ├── authorize.guard.ts
│ │ │ │ ├── authorize.interceptor.spec.ts
│ │ │ │ ├── authorize.interceptor.ts
│ │ │ │ ├── authorize.service.spec.ts
│ │ │ │ ├── authorize.service.ts
│ │ │ │ ├── login/
│ │ │ │ │ ├── login.component.css
│ │ │ │ │ ├── login.component.html
│ │ │ │ │ ├── login.component.spec.ts
│ │ │ │ │ └── login.component.ts
│ │ │ │ ├── login-menu/
│ │ │ │ │ ├── login-menu.component.css
│ │ │ │ │ ├── login-menu.component.html
│ │ │ │ │ ├── login-menu.component.spec.ts
│ │ │ │ │ └── login-menu.component.ts
│ │ │ │ └── logout/
│ │ │ │ ├── logout.component.css
│ │ │ │ ├── logout.component.html
│ │ │ │ ├── logout.component.spec.ts
│ │ │ │ └── logout.component.ts
│ │ │ ├── app/
│ │ │ │ ├── angular-material.module.ts
│ │ │ │ ├── app.component.html
│ │ │ │ ├── app.component.ts
│ │ │ │ ├── app.module.ts
│ │ │ │ ├── app.server.module.ts
│ │ │ │ ├── base.form.component.ts
│ │ │ │ ├── base.service.ts
│ │ │ │ ├── cities/
│ │ │ │ │ ├── cities.component.css
│ │ │ │ │ ├── cities.component.html
│ │ │ │ │ ├── cities.component.spec.ts
│ │ │ │ │ ├── cities.component.ts
│ │ │ │ │ ├── city-edit.component.css
│ │ │ │ │ ├── city-edit.component.html
│ │ │ │ │ ├── city-edit.component.ts
│ │ │ │ │ ├── city.service.ts
│ │ │ │ │ └── city.ts
│ │ │ │ ├── countries/
│ │ │ │ │ ├── countries.component.css
│ │ │ │ │ ├── countries.component.html
│ │ │ │ │ ├── countries.component.ts
│ │ │ │ │ ├── country-edit.component.css
│ │ │ │ │ ├── country-edit.component.html
│ │ │ │ │ ├── country-edit.component.ts
│ │ │ │ │ ├── country.service.ts
│ │ │ │ │ └── country.ts
│ │ │ │ ├── home/
│ │ │ │ │ ├── home.component.html
│ │ │ │ │ └── home.component.ts
│ │ │ │ └── nav-menu/
│ │ │ │ ├── nav-menu.component.css
│ │ │ │ ├── nav-menu.component.html
│ │ │ │ └── nav-menu.component.ts
│ │ │ ├── assets/
│ │ │ │ └── .gitkeep
│ │ │ ├── environments/
│ │ │ │ ├── environment.prod.ts
│ │ │ │ └── environment.ts
│ │ │ ├── index.html
│ │ │ ├── karma.conf.js
│ │ │ ├── main.ts
│ │ │ ├── manifest.webmanifest
│ │ │ ├── ng-connection-service/
│ │ │ │ ├── connection-service.module.ts
│ │ │ │ ├── connection-service.service.spec.ts
│ │ │ │ └── connection-service.service.ts
│ │ │ ├── polyfills.ts
│ │ │ ├── styles.css
│ │ │ ├── test.ts
│ │ │ ├── tsconfig.app.json
│ │ │ ├── tsconfig.server.json
│ │ │ ├── tsconfig.spec.json
│ │ │ └── tslint.json
│ │ ├── tsconfig.json
│ │ ├── tslint.json
│ │ └── update-npm.bat
│ ├── Controllers/
│ │ ├── CitiesController.cs
│ │ ├── CountriesController.cs
│ │ ├── OidcConfigurationController.cs
│ │ └── SeedController.cs
│ ├── Data/
│ │ ├── ApiResult.cs
│ │ ├── ApplicationDbContext.cs
│ │ ├── CityDTO.cs
│ │ ├── CountryDTO.cs
│ │ ├── IQueryableExtensions.cs
│ │ ├── Migrations/
│ │ │ ├── 20191230002753_Identity.Designer.cs
│ │ │ ├── 20191230002753_Identity.cs
│ │ │ └── ApplicationDbContextModelSnapshot.cs
│ │ ├── Models/
│ │ │ ├── ApplicationUser.cs
│ │ │ ├── City.cs
│ │ │ └── Country.cs
│ │ └── Source/
│ │ └── worldcities.xlsx
│ ├── Pages/
│ │ ├── Error.cshtml
│ │ ├── Error.cshtml.cs
│ │ ├── Shared/
│ │ │ └── _LoginPartial.cshtml
│ │ └── _ViewImports.cshtml
│ ├── Program.cs
│ ├── Startup.cs
│ ├── WorldCities.csproj
│ ├── _LinuxVM_ConfigFiles/
│ │ ├── kestrel-worldcities.service
│ │ ├── nginx-worldcities.conf
│ │ └── nginx.conf
│ ├── appsettings.Development.json
│ ├── appsettings.json
│ └── wwwroot/
│ ├── isOnline.txt
│ ├── manifest.webmanifest
│ ├── ngsw-worker.js
│ ├── ngsw.json
│ └── safety-worker.js
├── Chapter_12.sln
├── LICENSE
└── README.md
================================================
FILE CONTENTS
================================================
================================================
FILE: .gitignore
================================================
<<<<<<< HEAD
# use glob syntax
syntax: glob
wwwroot/app/**
wwwroot/bin/**
wwwroot/js/**
wwwroot/scripts/**
wwwroot/styles/**
wwwroot/dist/main-client.*
ClientApp/dist/main-server.*
node_modules/**
[Ss]cripts/[Aa]pp/*.js
[Ss]cripts/[Aa]pp_old/*.js
[Mm]igrations/**
.tscache/**
.vs/
*.mwb.bak # MySQL Workbench .BAK file
*.dbmdl # VS2010 Database Projects cache file
*.obj
*.pdb
*.user
*.aps
*.pch
*.vspscc
*.vssscc
*_i.c
*_p.c
*.ncb
*.suo
*.tlb
*.tlh
*.bak
*.[Cc]ache
*.ilk
*.log
*.lib
*.sbr
*.scc
*.DotSettings
[Bb]in
[Dd]ebug*/**
obj/
[Rr]elease*/**
_ReSharper*/**
NDependOut/**
packages/**
[Tt]humbs.db
[Tt]est[Rr]esult*
[Bb]uild[Ll]og.*
*.[Pp]ublish.xml
*.resharper
*.ncrunch*
*.ndproj
=======
## Ignore Visual Studio temporary files, build results, and
## files generated by popular Visual Studio add-ons.
##
## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore
# User-specific files
*.suo
*.user
*.userosscache
*.sln.docstates
# User-specific files (MonoDevelop/Xamarin Studio)
*.userprefs
# Build results
[Dd]ebug/
[Dd]ebugPublic/
[Rr]elease/
[Rr]eleases/
x64/
x86/
bld/
[Bb]in/
[Oo]bj/
[Ll]og/
# Visual Studio 2015/2017 cache/options directory
.vs/
# Uncomment if you have tasks that create the project's static files in wwwroot
#wwwroot/
# Visual Studio 2017 auto generated files
Generated\ Files/
# MSTest test Results
[Tt]est[Rr]esult*/
[Bb]uild[Ll]og.*
# NUNIT
*.VisualState.xml
TestResult.xml
# Build Results of an ATL Project
[Dd]ebugPS/
[Rr]eleasePS/
dlldata.c
# Benchmark Results
BenchmarkDotNet.Artifacts/
# .NET Core
project.lock.json
project.fragment.lock.json
artifacts/
**/Properties/launchSettings.json
# StyleCop
StyleCopReport.xml
# Files built by Visual Studio
*_i.c
*_p.c
*_i.h
*.ilk
*.meta
*.obj
*.iobj
*.pch
*.pdb
*.ipdb
*.pgc
*.pgd
*.rsp
*.sbr
*.tlb
*.tli
*.tlh
*.tmp
*.tmp_proj
*.log
*.vspscc
*.vssscc
.builds
*.pidb
*.svclog
*.scc
# Chutzpah Test files
_Chutzpah*
# Visual C++ cache files
ipch/
*.aps
*.ncb
*.opendb
*.opensdf
*.sdf
*.cachefile
*.VC.db
*.VC.VC.opendb
# Visual Studio profiler
*.psess
*.vsp
*.vspx
*.sap
# Visual Studio Trace Files
*.e2e
# TFS 2012 Local Workspace
$tf/
# Guidance Automation Toolkit
*.gpState
# ReSharper is a .NET coding add-in
_ReSharper*/
*.[Rr]e[Ss]harper
*.DotSettings.user
# JustCode is a .NET coding add-in
.JustCode
# TeamCity is a build add-in
_TeamCity*
# DotCover is a Code Coverage Tool
*.dotCover
# AxoCover is a Code Coverage Tool
.axoCover/*
!.axoCover/settings.json
# Visual Studio code coverage results
*.coverage
*.coveragexml
# NCrunch
_NCrunch_*
.*crunch*.local.xml
nCrunchTemp_*
# MightyMoose
*.mm.*
AutoTest.Net/
# Web workbench (sass)
.sass-cache/
# Installshield output folder
[Ee]xpress/
# DocProject is a documentation generator add-in
DocProject/buildhelp/
DocProject/Help/*.HxT
DocProject/Help/*.HxC
DocProject/Help/*.hhc
DocProject/Help/*.hhk
DocProject/Help/*.hhp
DocProject/Help/Html2
DocProject/Help/html
# Click-Once directory
publish/
# Publish Web Output
*.[Pp]ublish.xml
*.azurePubxml
# Note: Comment the next line if you want to checkin your web deploy settings,
# but database connection strings (with potential passwords) will be unencrypted
*.pubxml
*.publishproj
# Microsoft Azure Web App publish settings. Comment the next line if you want to
# checkin your Azure Web App publish settings, but sensitive information contained
# in these scripts will be unencrypted
PublishScripts/
# NuGet Packages
*.nupkg
# The packages folder can be ignored because of Package Restore
**/[Pp]ackages/*
# except build/, which is used as an MSBuild target.
!**/[Pp]ackages/build/
# Uncomment if necessary however generally it will be regenerated when needed
#!**/[Pp]ackages/repositories.config
# NuGet v3's project.json files produces more ignorable files
*.nuget.props
*.nuget.targets
# Microsoft Azure Build Output
csx/
*.build.csdef
# Microsoft Azure Emulator
ecf/
rcf/
# Windows Store app package directories and files
AppPackages/
BundleArtifacts/
Package.StoreAssociation.xml
_pkginfo.txt
*.appx
# Visual Studio cache files
# files ending in .cache can be ignored
*.[Cc]ache
# but keep track of directories ending in .cache
!*.[Cc]ache/
# Others
ClientBin/
~$*
*~
*.dbmdl
*.dbproj.schemaview
*.jfm
*.pfx
*.publishsettings
orleans.codegen.cs
# Including strong name files can present a security risk
# (https://github.com/github/gitignore/pull/2483#issue-259490424)
#*.snk
# Since there are multiple workflows, uncomment next line to ignore bower_components
# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622)
#bower_components/
# RIA/Silverlight projects
Generated_Code/
# Backup & report files from converting an old project file
# to a newer Visual Studio version. Backup files are not needed,
# because we have git ;-)
_UpgradeReport_Files/
Backup*/
UpgradeLog*.XML
UpgradeLog*.htm
ServiceFabricBackup/
*.rptproj.bak
# SQL Server files
*.mdf
*.ldf
*.ndf
# Business Intelligence projects
*.rdl.data
*.bim.layout
*.bim_*.settings
*.rptproj.rsuser
# Microsoft Fakes
FakesAssemblies/
# GhostDoc plugin setting file
*.GhostDoc.xml
# Node.js Tools for Visual Studio
.ntvs_analysis.dat
node_modules/
# Visual Studio 6 build log
*.plg
# Visual Studio 6 workspace options file
*.opt
# Visual Studio 6 auto-generated workspace file (contains which files were open etc.)
*.vbw
# Visual Studio LightSwitch build output
**/*.HTMLClient/GeneratedArtifacts
**/*.DesktopClient/GeneratedArtifacts
**/*.DesktopClient/ModelManifest.xml
**/*.Server/GeneratedArtifacts
**/*.Server/ModelManifest.xml
_Pvt_Extensions
# Paket dependency manager
.paket/paket.exe
paket-files/
# FAKE - F# Make
.fake/
# JetBrains Rider
.idea/
*.sln.iml
# CodeRush
.cr/
# Python Tools for Visual Studio (PTVS)
__pycache__/
*.pyc
# Cake - Uncomment if you are using it
# tools/**
# !tools/packages.config
# Tabs Studio
*.tss
# Telerik's JustMock configuration file
*.jmconfig
# BizTalk build output
*.btp.cs
*.btm.cs
*.odx.cs
*.xsd.cs
# OpenCover UI analysis results
OpenCover/
# Azure Stream Analytics local run output
ASALocalRun/
# MSBuild Binary and Structured Log
*.binlog
# NVidia Nsight GPU debugger configuration file
*.nvuser
# MFractors (Xamarin productivity tool) working folder
.mfractor/
>>>>>>> 4584b353e67bb142e570857ccd8679e29581917f
================================================
FILE: .hgignore
================================================
# use glob syntax
syntax: glob
wwwroot/app/**
wwwroot/bin/**
wwwroot/js/**
wwwroot/scripts/**
wwwroot/styles/**
wwwroot/dist/main-client.*
ClientApp/dist/main-server.*
node_modules/**
[Ss]cripts/[Aa]pp/*.js
[Ss]cripts/[Aa]pp_old/*.js
[Mm]igrations/**
.tscache/**
.vs/
*.mwb.bak # MySQL Workbench .BAK file
*.dbmdl # VS2010 Database Projects cache file
*.obj
*.pdb
*.user
*.aps
*.pch
*.vspscc
*.vssscc
*_i.c
*_p.c
*.ncb
*.suo
*.tlb
*.tlh
*.bak
*.[Cc]ache
*.ilk
*.log
*.lib
*.sbr
*.scc
*.DotSettings
[Bb]in
[Dd]ebug*/**
obj/
[Rr]elease*/**
_ReSharper*/**
NDependOut/**
packages/**
[Tt]humbs.db
[Tt]est[Rr]esult*
[Bb]uild[Ll]og.*
*.[Pp]ublish.xml
*.resharper
*.ncrunch*
*.ndproj
================================================
FILE: All_Chapters.sln
================================================
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.29209.62
MinimumVisualStudioVersion = 10.0.40219.1
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Chapter_01", "Chapter_01", "{C7FB2977-FA5B-4F4A-BD6D-54A6D651C0E3}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Chapter_02", "Chapter_02", "{DA4FA59E-4B7D-4A0D-971F-B77BE4267C4C}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "HealthCheck", "Chapter_01\HealthCheck\HealthCheck.csproj", "{86C6803B-67C2-4116-8AD4-43944BDE93F7}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "HealthCheck", "Chapter_02\HealthCheck\HealthCheck.csproj", "{C511A9B1-AE75-4706-89C1-6398145F038A}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Chapter_03", "Chapter_03", "{F5B14D16-0229-4931-A303-D64EC9038864}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "HealthCheck", "Chapter_03\HealthCheck\HealthCheck.csproj", "{B5373428-037B-4CB1-99B4-446C28F5F097}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Chapter_04", "Chapter_04", "{FA1BC5A3-A4D2-4510-BD39-8E01E4862271}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WorldCities", "Chapter_04\WorldCities\WorldCities.csproj", "{9C1F258A-287E-494C-A352-E1A97936F1B6}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Chapter_05", "Chapter_05", "{FFAA313C-D100-4C29-A218-D6CAA01512AF}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WorldCities", "Chapter_05\WorldCities\WorldCities.csproj", "{D9380899-AE72-481D-B12A-6A91E5F47C24}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Chapter_06", "Chapter_06", "{86F733CD-5A19-4106-AF25-787F04E6D2E3}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WorldCities", "Chapter_06\WorldCities\WorldCities.csproj", "{32275E7C-084A-46E4-9A7E-F18D6C85633C}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Chapter_07", "Chapter_07", "{1C38A4BD-8BD8-4B7B-86B4-867FBE9F00B4}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WorldCities", "Chapter_07\WorldCities\WorldCities.csproj", "{5BCFD243-6BD5-46DD-84BD-D54BD015816B}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Chapter_08", "Chapter_08", "{DAE4DCA6-C7C0-41E6-819D-456A7F683FEE}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WorldCities", "Chapter_08\WorldCities\WorldCities.csproj", "{74C81E44-7BDD-4229-8839-1982A5E0BFEF}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Chapter_09", "Chapter_09", "{BE6B5B8C-3C2F-4B03-AF12-DF27CE716CD0}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WorldCities", "Chapter_09\WorldCities\WorldCities.csproj", "{AC1C3B40-F286-491B-9729-CF4DF97C3D14}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WorldCities.Tests", "Chapter_09\WorldCities.Tests\WorldCities.Tests.csproj", "{AA1F2009-1700-417C-B356-7AC41927DE73}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Chapter_10", "Chapter_10", "{F6DB5D7A-3A2B-4E7E-9973-89207916FDEB}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WorldCities", "Chapter_10\WorldCities\WorldCities.csproj", "{3B525260-5C3F-4ABB-9DCE-263A0301155C}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WorldCities.Tests", "Chapter_10\WorldCities.Tests\WorldCities.Tests.csproj", "{FCFD8752-27D6-4349-8782-34D65F48AB7F}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AuthSample", "Chapter_10\AuthSample\AuthSample.csproj", "{F0CB37D6-B777-41AF-BE67-9217A4C59318}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Chapter_11", "Chapter_11", "{0D0E3BFF-75C8-49D9-A00C-CED1A656C64D}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WorldCities", "Chapter_11\WorldCities\WorldCities.csproj", "{137468D5-980E-41AD-8C6A-E93DAA8D44FA}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "HealthCheck", "Chapter_11\HealthCheck\HealthCheck.csproj", "{1969429B-96B6-4247-B38C-1D6A9019C757}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Chapter_12", "Chapter_12", "{2FE8A041-4CCF-4C77-83F4-A3594E705932}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "HealthCheck", "Chapter_12\HealthCheck\HealthCheck.csproj", "{83DB7FA3-A888-46A7-9DFA-DB9A30CB40DD}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WorldCities", "Chapter_12\WorldCities\WorldCities.csproj", "{CC6B414C-356A-4D80-847F-478D2B32FC02}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Root items", "Root items", "{687B1BB3-B260-40C1-B1B5-BD9D0DAF0A38}"
ProjectSection(SolutionItems) = preProject
LICENSE = LICENSE
README.md = README.md
EndProjectSection
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{86C6803B-67C2-4116-8AD4-43944BDE93F7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{86C6803B-67C2-4116-8AD4-43944BDE93F7}.Debug|Any CPU.Build.0 = Debug|Any CPU
{86C6803B-67C2-4116-8AD4-43944BDE93F7}.Release|Any CPU.ActiveCfg = Release|Any CPU
{86C6803B-67C2-4116-8AD4-43944BDE93F7}.Release|Any CPU.Build.0 = Release|Any CPU
{C511A9B1-AE75-4706-89C1-6398145F038A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{C511A9B1-AE75-4706-89C1-6398145F038A}.Debug|Any CPU.Build.0 = Debug|Any CPU
{C511A9B1-AE75-4706-89C1-6398145F038A}.Release|Any CPU.ActiveCfg = Release|Any CPU
{C511A9B1-AE75-4706-89C1-6398145F038A}.Release|Any CPU.Build.0 = Release|Any CPU
{B5373428-037B-4CB1-99B4-446C28F5F097}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{B5373428-037B-4CB1-99B4-446C28F5F097}.Debug|Any CPU.Build.0 = Debug|Any CPU
{B5373428-037B-4CB1-99B4-446C28F5F097}.Release|Any CPU.ActiveCfg = Release|Any CPU
{B5373428-037B-4CB1-99B4-446C28F5F097}.Release|Any CPU.Build.0 = Release|Any CPU
{9C1F258A-287E-494C-A352-E1A97936F1B6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{9C1F258A-287E-494C-A352-E1A97936F1B6}.Debug|Any CPU.Build.0 = Debug|Any CPU
{9C1F258A-287E-494C-A352-E1A97936F1B6}.Release|Any CPU.ActiveCfg = Release|Any CPU
{9C1F258A-287E-494C-A352-E1A97936F1B6}.Release|Any CPU.Build.0 = Release|Any CPU
{D9380899-AE72-481D-B12A-6A91E5F47C24}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{D9380899-AE72-481D-B12A-6A91E5F47C24}.Debug|Any CPU.Build.0 = Debug|Any CPU
{D9380899-AE72-481D-B12A-6A91E5F47C24}.Release|Any CPU.ActiveCfg = Release|Any CPU
{D9380899-AE72-481D-B12A-6A91E5F47C24}.Release|Any CPU.Build.0 = Release|Any CPU
{32275E7C-084A-46E4-9A7E-F18D6C85633C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{32275E7C-084A-46E4-9A7E-F18D6C85633C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{32275E7C-084A-46E4-9A7E-F18D6C85633C}.Release|Any CPU.ActiveCfg = Release|Any CPU
{32275E7C-084A-46E4-9A7E-F18D6C85633C}.Release|Any CPU.Build.0 = Release|Any CPU
{5BCFD243-6BD5-46DD-84BD-D54BD015816B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{5BCFD243-6BD5-46DD-84BD-D54BD015816B}.Debug|Any CPU.Build.0 = Debug|Any CPU
{5BCFD243-6BD5-46DD-84BD-D54BD015816B}.Release|Any CPU.ActiveCfg = Release|Any CPU
{5BCFD243-6BD5-46DD-84BD-D54BD015816B}.Release|Any CPU.Build.0 = Release|Any CPU
{74C81E44-7BDD-4229-8839-1982A5E0BFEF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{74C81E44-7BDD-4229-8839-1982A5E0BFEF}.Debug|Any CPU.Build.0 = Debug|Any CPU
{74C81E44-7BDD-4229-8839-1982A5E0BFEF}.Release|Any CPU.ActiveCfg = Release|Any CPU
{74C81E44-7BDD-4229-8839-1982A5E0BFEF}.Release|Any CPU.Build.0 = Release|Any CPU
{AC1C3B40-F286-491B-9729-CF4DF97C3D14}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{AC1C3B40-F286-491B-9729-CF4DF97C3D14}.Debug|Any CPU.Build.0 = Debug|Any CPU
{AC1C3B40-F286-491B-9729-CF4DF97C3D14}.Release|Any CPU.ActiveCfg = Release|Any CPU
{AC1C3B40-F286-491B-9729-CF4DF97C3D14}.Release|Any CPU.Build.0 = Release|Any CPU
{AA1F2009-1700-417C-B356-7AC41927DE73}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{AA1F2009-1700-417C-B356-7AC41927DE73}.Debug|Any CPU.Build.0 = Debug|Any CPU
{AA1F2009-1700-417C-B356-7AC41927DE73}.Release|Any CPU.ActiveCfg = Release|Any CPU
{AA1F2009-1700-417C-B356-7AC41927DE73}.Release|Any CPU.Build.0 = Release|Any CPU
{3B525260-5C3F-4ABB-9DCE-263A0301155C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{3B525260-5C3F-4ABB-9DCE-263A0301155C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{3B525260-5C3F-4ABB-9DCE-263A0301155C}.Release|Any CPU.ActiveCfg = Release|Any CPU
{3B525260-5C3F-4ABB-9DCE-263A0301155C}.Release|Any CPU.Build.0 = Release|Any CPU
{FCFD8752-27D6-4349-8782-34D65F48AB7F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{FCFD8752-27D6-4349-8782-34D65F48AB7F}.Debug|Any CPU.Build.0 = Debug|Any CPU
{FCFD8752-27D6-4349-8782-34D65F48AB7F}.Release|Any CPU.ActiveCfg = Release|Any CPU
{FCFD8752-27D6-4349-8782-34D65F48AB7F}.Release|Any CPU.Build.0 = Release|Any CPU
{F0CB37D6-B777-41AF-BE67-9217A4C59318}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{F0CB37D6-B777-41AF-BE67-9217A4C59318}.Debug|Any CPU.Build.0 = Debug|Any CPU
{F0CB37D6-B777-41AF-BE67-9217A4C59318}.Release|Any CPU.ActiveCfg = Release|Any CPU
{F0CB37D6-B777-41AF-BE67-9217A4C59318}.Release|Any CPU.Build.0 = Release|Any CPU
{137468D5-980E-41AD-8C6A-E93DAA8D44FA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{137468D5-980E-41AD-8C6A-E93DAA8D44FA}.Debug|Any CPU.Build.0 = Debug|Any CPU
{137468D5-980E-41AD-8C6A-E93DAA8D44FA}.Release|Any CPU.ActiveCfg = Release|Any CPU
{137468D5-980E-41AD-8C6A-E93DAA8D44FA}.Release|Any CPU.Build.0 = Release|Any CPU
{1969429B-96B6-4247-B38C-1D6A9019C757}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{1969429B-96B6-4247-B38C-1D6A9019C757}.Debug|Any CPU.Build.0 = Debug|Any CPU
{1969429B-96B6-4247-B38C-1D6A9019C757}.Release|Any CPU.ActiveCfg = Release|Any CPU
{1969429B-96B6-4247-B38C-1D6A9019C757}.Release|Any CPU.Build.0 = Release|Any CPU
{83DB7FA3-A888-46A7-9DFA-DB9A30CB40DD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{83DB7FA3-A888-46A7-9DFA-DB9A30CB40DD}.Debug|Any CPU.Build.0 = Debug|Any CPU
{83DB7FA3-A888-46A7-9DFA-DB9A30CB40DD}.Release|Any CPU.ActiveCfg = Release|Any CPU
{83DB7FA3-A888-46A7-9DFA-DB9A30CB40DD}.Release|Any CPU.Build.0 = Release|Any CPU
{CC6B414C-356A-4D80-847F-478D2B32FC02}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{CC6B414C-356A-4D80-847F-478D2B32FC02}.Debug|Any CPU.Build.0 = Debug|Any CPU
{CC6B414C-356A-4D80-847F-478D2B32FC02}.Release|Any CPU.ActiveCfg = Release|Any CPU
{CC6B414C-356A-4D80-847F-478D2B32FC02}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{86C6803B-67C2-4116-8AD4-43944BDE93F7} = {C7FB2977-FA5B-4F4A-BD6D-54A6D651C0E3}
{C511A9B1-AE75-4706-89C1-6398145F038A} = {DA4FA59E-4B7D-4A0D-971F-B77BE4267C4C}
{B5373428-037B-4CB1-99B4-446C28F5F097} = {F5B14D16-0229-4931-A303-D64EC9038864}
{9C1F258A-287E-494C-A352-E1A97936F1B6} = {FA1BC5A3-A4D2-4510-BD39-8E01E4862271}
{D9380899-AE72-481D-B12A-6A91E5F47C24} = {FFAA313C-D100-4C29-A218-D6CAA01512AF}
{32275E7C-084A-46E4-9A7E-F18D6C85633C} = {86F733CD-5A19-4106-AF25-787F04E6D2E3}
{5BCFD243-6BD5-46DD-84BD-D54BD015816B} = {1C38A4BD-8BD8-4B7B-86B4-867FBE9F00B4}
{74C81E44-7BDD-4229-8839-1982A5E0BFEF} = {DAE4DCA6-C7C0-41E6-819D-456A7F683FEE}
{AC1C3B40-F286-491B-9729-CF4DF97C3D14} = {BE6B5B8C-3C2F-4B03-AF12-DF27CE716CD0}
{AA1F2009-1700-417C-B356-7AC41927DE73} = {BE6B5B8C-3C2F-4B03-AF12-DF27CE716CD0}
{3B525260-5C3F-4ABB-9DCE-263A0301155C} = {F6DB5D7A-3A2B-4E7E-9973-89207916FDEB}
{FCFD8752-27D6-4349-8782-34D65F48AB7F} = {F6DB5D7A-3A2B-4E7E-9973-89207916FDEB}
{F0CB37D6-B777-41AF-BE67-9217A4C59318} = {F6DB5D7A-3A2B-4E7E-9973-89207916FDEB}
{137468D5-980E-41AD-8C6A-E93DAA8D44FA} = {0D0E3BFF-75C8-49D9-A00C-CED1A656C64D}
{1969429B-96B6-4247-B38C-1D6A9019C757} = {0D0E3BFF-75C8-49D9-A00C-CED1A656C64D}
{83DB7FA3-A888-46A7-9DFA-DB9A30CB40DD} = {2FE8A041-4CCF-4C77-83F4-A3594E705932}
{CC6B414C-356A-4D80-847F-478D2B32FC02} = {2FE8A041-4CCF-4C77-83F4-A3594E705932}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {F0EE0686-783C-472C-8B14-22385361AEE1}
EndGlobalSection
EndGlobal
================================================
FILE: Chapter_01/HealthCheck/.gitignore
================================================
## Ignore Visual Studio temporary files, build results, and
## files generated by popular Visual Studio add-ons.
# User-specific files
*.suo
*.user
*.userosscache
*.sln.docstates
# User-specific files (MonoDevelop/Xamarin Studio)
*.userprefs
# Build results
[Dd]ebug/
[Dd]ebugPublic/
[Rr]elease/
[Rr]eleases/
x64/
x86/
build/
bld/
bin/
Bin/
obj/
Obj/
# Visual Studio 2015 cache/options directory
.vs/
# MSTest test Results
[Tt]est[Rr]esult*/
[Bb]uild[Ll]og.*
# NUNIT
*.VisualState.xml
TestResult.xml
# Build Results of an ATL Project
[Dd]ebugPS/
[Rr]eleasePS/
dlldata.c
*_i.c
*_p.c
*_i.h
*.ilk
*.meta
*.obj
*.pch
*.pdb
*.pgc
*.pgd
*.rsp
*.sbr
*.tlb
*.tli
*.tlh
*.tmp
*.tmp_proj
*.log
*.vspscc
*.vssscc
.builds
*.pidb
*.svclog
*.scc
# Chutzpah Test files
_Chutzpah*
# Visual C++ cache files
ipch/
*.aps
*.ncb
*.opendb
*.opensdf
*.sdf
*.cachefile
# Visual Studio profiler
*.psess
*.vsp
*.vspx
*.sap
# TFS 2012 Local Workspace
$tf/
# Guidance Automation Toolkit
*.gpState
# ReSharper is a .NET coding add-in
_ReSharper*/
*.[Rr]e[Ss]harper
*.DotSettings.user
# JustCode is a .NET coding add-in
.JustCode
# TeamCity is a build add-in
_TeamCity*
# DotCover is a Code Coverage Tool
*.dotCover
# NCrunch
_NCrunch_*
.*crunch*.local.xml
nCrunchTemp_*
# MightyMoose
*.mm.*
AutoTest.Net/
# Web workbench (sass)
.sass-cache/
# Installshield output folder
[Ee]xpress/
# DocProject is a documentation generator add-in
DocProject/buildhelp/
DocProject/Help/*.HxT
DocProject/Help/*.HxC
DocProject/Help/*.hhc
DocProject/Help/*.hhk
DocProject/Help/*.hhp
DocProject/Help/Html2
DocProject/Help/html
# Click-Once directory
publish/
# Publish Web Output
*.[Pp]ublish.xml
*.azurePubxml
# TODO: Comment the next line if you want to checkin your web deploy settings
# but database connection strings (with potential passwords) will be unencrypted
*.pubxml
*.publishproj
# NuGet Packages
*.nupkg
# The packages folder can be ignored because of Package Restore
**/packages/*
# except build/, which is used as an MSBuild target.
!**/packages/build/
# Uncomment if necessary however generally it will be regenerated when needed
#!**/packages/repositories.config
# Microsoft Azure Build Output
csx/
*.build.csdef
# Microsoft Azure Emulator
ecf/
rcf/
# Microsoft Azure ApplicationInsights config file
ApplicationInsights.config
# Windows Store app package directory
AppPackages/
BundleArtifacts/
# Visual Studio cache files
# files ending in .cache can be ignored
*.[Cc]ache
# but keep track of directories ending in .cache
!*.[Cc]ache/
# Others
ClientBin/
~$*
*~
*.dbmdl
*.dbproj.schemaview
*.pfx
*.publishsettings
orleans.codegen.cs
/node_modules
# RIA/Silverlight projects
Generated_Code/
# Backup & report files from converting an old project file
# to a newer Visual Studio version. Backup files are not needed,
# because we have git ;-)
_UpgradeReport_Files/
Backup*/
UpgradeLog*.XML
UpgradeLog*.htm
# SQL Server files
*.mdf
*.ldf
# Business Intelligence projects
*.rdl.data
*.bim.layout
*.bim_*.settings
# Microsoft Fakes
FakesAssemblies/
# GhostDoc plugin setting file
*.GhostDoc.xml
# Node.js Tools for Visual Studio
.ntvs_analysis.dat
# Visual Studio 6 build log
*.plg
# Visual Studio 6 workspace options file
*.opt
# Visual Studio LightSwitch build output
**/*.HTMLClient/GeneratedArtifacts
**/*.DesktopClient/GeneratedArtifacts
**/*.DesktopClient/ModelManifest.xml
**/*.Server/GeneratedArtifacts
**/*.Server/ModelManifest.xml
_Pvt_Extensions
# Paket dependency manager
.paket/paket.exe
# FAKE - F# Make
.fake/
================================================
FILE: Chapter_01/HealthCheck/ClientApp/.editorconfig
================================================
# Editor configuration, see http://editorconfig.org
root = true
[*]
charset = utf-8
indent_style = space
indent_size = 2
insert_final_newline = true
trim_trailing_whitespace = true
[*.md]
max_line_length = off
trim_trailing_whitespace = false
================================================
FILE: Chapter_01/HealthCheck/ClientApp/.gitignore
================================================
# See http://help.github.com/ignore-files/ for more about ignoring files.
# compiled output
/dist
/dist-server
/tmp
/out-tsc
# dependencies
/node_modules
# IDEs and editors
/.idea
.project
.classpath
.c9/
*.launch
.settings/
*.sublime-workspace
# IDE - VSCode
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json
# misc
/.sass-cache
/connect.lock
/coverage
/libpeerconnection.log
npm-debug.log
yarn-error.log
testem.log
/typings
# System Files
.DS_Store
Thumbs.db
================================================
FILE: Chapter_01/HealthCheck/ClientApp/README.md
================================================
# HealthCheck
This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 6.0.0.
## Development server
Run `ng serve` for a dev server. Navigate to `http://localhost:4200/`. The app will automatically reload if you change any of the source files.
## Code scaffolding
Run `ng generate component component-name` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module`.
## Build
Run `ng build` to build the project. The build artifacts will be stored in the `dist/` directory. Use the `--prod` flag for a production build.
## Running unit tests
Run `ng test` to execute the unit tests via [Karma](https://karma-runner.github.io).
## Running end-to-end tests
Run `ng e2e` to execute the end-to-end tests via [Protractor](http://www.protractortest.org/).
## Further help
To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI README](https://github.com/angular/angular-cli/blob/master/README.md).
================================================
FILE: Chapter_01/HealthCheck/ClientApp/angular.json
================================================
{
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
"version": 1,
"newProjectRoot": "projects",
"projects": {
"HealthCheck": {
"root": "",
"sourceRoot": "src",
"projectType": "application",
"prefix": "app",
"schematics": {},
"architect": {
"build": {
"builder": "@angular-devkit/build-angular:browser",
"options": {
"progress": true,
"extractCss": true,
"outputPath": "dist",
"index": "src/index.html",
"main": "src/main.ts",
"polyfills": "src/polyfills.ts",
"tsConfig": "src/tsconfig.app.json",
"assets": ["src/assets"],
"styles": [
"node_modules/bootstrap/dist/css/bootstrap.min.css",
"src/styles.css"
],
"scripts": []
},
"configurations": {
"production": {
"fileReplacements": [
{
"replace": "src/environments/environment.ts",
"with": "src/environments/environment.prod.ts"
}
],
"optimization": true,
"outputHashing": "all",
"sourceMap": false,
"extractCss": true,
"namedChunks": false,
"aot": true,
"extractLicenses": true,
"vendorChunk": false,
"buildOptimizer": true
}
}
},
"serve": {
"builder": "@angular-devkit/build-angular:dev-server",
"options": {
"browserTarget": "HealthCheck:build"
},
"configurations": {
"production": {
"browserTarget": "HealthCheck:build:production"
}
}
},
"extract-i18n": {
"builder": "@angular-devkit/build-angular:extract-i18n",
"options": {
"browserTarget": "HealthCheck:build"
}
},
"test": {
"builder": "@angular-devkit/build-angular:karma",
"options": {
"main": "src/test.ts",
"polyfills": "src/polyfills.ts",
"tsConfig": "src/tsconfig.spec.json",
"karmaConfig": "src/karma.conf.js",
"styles": ["styles.css"],
"scripts": [],
"assets": ["src/assets"]
}
},
"lint": {
"builder": "@angular-devkit/build-angular:tslint",
"options": {
"tsConfig": ["src/tsconfig.app.json", "src/tsconfig.spec.json"],
"exclude": ["**/node_modules/**"]
}
},
"server": {
"builder": "@angular-devkit/build-angular:server",
"options": {
"outputPath": "dist-server",
"main": "src/main.ts",
"tsConfig": "src/tsconfig.server.json"
},
"configurations": {
"dev": {
"optimization": true,
"outputHashing": "all",
"sourceMap": false,
"namedChunks": false,
"extractLicenses": true,
"vendorChunk": true
},
"production": {
"optimization": true,
"outputHashing": "all",
"sourceMap": false,
"namedChunks": false,
"extractLicenses": true,
"vendorChunk": false
}
}
}
}
},
"HealthCheck-e2e": {
"root": "e2e/",
"projectType": "application",
"architect": {
"e2e": {
"builder": "@angular-devkit/build-angular:protractor",
"options": {
"protractorConfig": "e2e/protractor.conf.js",
"devServerTarget": "HealthCheck:serve"
}
},
"lint": {
"builder": "@angular-devkit/build-angular:tslint",
"options": {
"tsConfig": "e2e/tsconfig.e2e.json",
"exclude": ["**/node_modules/**"]
}
}
}
}
},
"defaultProject": "HealthCheck"
}
================================================
FILE: Chapter_01/HealthCheck/ClientApp/browserslist
================================================
# This file is currently used by autoprefixer to adjust CSS to support the below specified browsers
# For additional information regarding the format and rule options, please see:
# https://github.com/browserslist/browserslist#queries
# For IE 9-11 support, please uncomment the last line of the file and adjust as needed
> 0.5%
last 2 versions
Firefox ESR
not dead
# IE 9-11
================================================
FILE: Chapter_01/HealthCheck/ClientApp/e2e/protractor.conf.js
================================================
// Protractor configuration file, see link for more information
// https://github.com/angular/protractor/blob/master/lib/config.ts
const { SpecReporter } = require("jasmine-spec-reporter");
exports.config = {
allScriptsTimeout: 11000,
specs: ["./src/**/*.e2e-spec.ts"],
capabilities: {
browserName: "chrome"
},
directConnect: true,
baseUrl: "http://localhost:4200/",
framework: "jasmine",
jasmineNodeOpts: {
showColors: true,
defaultTimeoutInterval: 30000,
print: function() {}
},
onPrepare() {
require("ts-node").register({
project: require("path").join(__dirname, "./tsconfig.e2e.json")
});
jasmine
.getEnv()
.addReporter(new SpecReporter({ spec: { displayStacktrace: true } }));
}
};
================================================
FILE: Chapter_01/HealthCheck/ClientApp/e2e/src/app.e2e-spec.ts
================================================
import { AppPage } from './app.po';
describe('App', () => {
let page: AppPage;
beforeEach(() => {
page = new AppPage();
});
it('should display welcome message', () => {
page.navigateTo();
expect(page.getMainHeading()).toEqual('Hello, world!');
});
});
================================================
FILE: Chapter_01/HealthCheck/ClientApp/e2e/src/app.po.ts
================================================
import { browser, by, element } from 'protractor';
export class AppPage {
navigateTo() {
return browser.get('/');
}
getMainHeading() {
return element(by.css('app-root h1')).getText();
}
}
================================================
FILE: Chapter_01/HealthCheck/ClientApp/e2e/tsconfig.e2e.json
================================================
{
"extends": "../tsconfig.json",
"compilerOptions": {
"outDir": "../out-tsc/app",
"module": "commonjs",
"target": "es5",
"types": [
"jasmine",
"jasminewd2",
"node"
]
}
}
================================================
FILE: Chapter_01/HealthCheck/ClientApp/package.json
================================================
{
"name": "healthcheck",
"version": "0.0.0",
"scripts": {
"ng": "ng",
"start": "echo Starting... && ng serve",
"build": "ng build",
"build:ssr": "ng run HealthCheck:server:dev",
"test": "ng test",
"lint": "ng lint",
"e2e": "ng e2e"
},
"private": true,
"dependencies": {
"@angular/animations": "9.0.0",
"@angular/common": "9.0.0",
"@angular/compiler": "9.0.0",
"@angular/core": "9.0.0",
"@angular/forms": "9.0.0",
"@angular/platform-browser": "9.0.0",
"@angular/platform-browser-dynamic": "9.0.0",
"@angular/platform-server": "9.0.0",
"@angular/router": "9.0.0",
"@nguniversal/module-map-ngfactory-loader": "9.0.0-next.9",
"aspnet-prerendering": "3.0.1",
"bootstrap": "4.4.1",
"core-js": "3.6.1",
"jquery": "3.5.1",
"oidc-client": "1.9.1",
"popper.js": "1.16.0",
"rxjs": "6.5.4",
"zone.js": "0.10.2"
},
"devDependencies": {
"@angular-devkit/build-angular": "0.900.0",
"@angular/cli": "9.0.0",
"@angular/compiler-cli": "9.0.0",
"@angular/language-service": "9.0.0",
"@types/jasmine": "3.5.0",
"@types/jasminewd2": "2.0.8",
"@types/node": "13.1.1",
"codelyzer": "5.2.1",
"jasmine-core": "3.5.0",
"jasmine-spec-reporter": "4.2.1",
"karma": "4.4.1",
"karma-chrome-launcher": "3.1.0",
"karma-coverage-istanbul-reporter": "2.1.1",
"karma-jasmine": "2.0.1",
"karma-jasmine-html-reporter": "1.5.1",
"typescript": "3.7.5"
},
"optionalDependencies": {
"node-sass": "4.13.0",
"protractor": "5.4.2",
"ts-node": "5.0.1",
"tslint": "5.20.1"
}
}
================================================
FILE: Chapter_01/HealthCheck/ClientApp/src/app/app.component.html
================================================
<body>
<app-nav-menu></app-nav-menu>
<div class="container">
<router-outlet></router-outlet>
</div>
</body>
================================================
FILE: Chapter_01/HealthCheck/ClientApp/src/app/app.component.ts
================================================
import { Component } from '@angular/core';
@Component({
selector: 'app-root',
templateUrl: './app.component.html'
})
export class AppComponent {
title = 'app';
}
================================================
FILE: Chapter_01/HealthCheck/ClientApp/src/app/app.module.ts
================================================
import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import { FormsModule } from '@angular/forms';
import { HttpClientModule, HTTP_INTERCEPTORS } from '@angular/common/http';
import { RouterModule } from '@angular/router';
import { AppComponent } from './app.component';
import { NavMenuComponent } from './nav-menu/nav-menu.component';
import { HomeComponent } from './home/home.component';
import { CounterComponent } from './counter/counter.component';
import { FetchDataComponent } from './fetch-data/fetch-data.component';
@NgModule({
declarations: [
AppComponent,
NavMenuComponent,
HomeComponent,
CounterComponent,
FetchDataComponent
],
imports: [
BrowserModule.withServerTransition({ appId: 'ng-cli-universal' }),
HttpClientModule,
FormsModule,
RouterModule.forRoot([
{ path: '', component: HomeComponent, pathMatch: 'full' },
{ path: 'counter', component: CounterComponent },
{ path: 'fetch-data', component: FetchDataComponent },
])
],
providers: [],
bootstrap: [AppComponent]
})
export class AppModule { }
================================================
FILE: Chapter_01/HealthCheck/ClientApp/src/app/app.server.module.ts
================================================
import { NgModule } from '@angular/core';
import { ServerModule } from '@angular/platform-server';
import { ModuleMapLoaderModule } from '@nguniversal/module-map-ngfactory-loader';
import { AppComponent } from './app.component';
import { AppModule } from './app.module';
@NgModule({
imports: [AppModule, ServerModule, ModuleMapLoaderModule],
bootstrap: [AppComponent]
})
export class AppServerModule { }
================================================
FILE: Chapter_01/HealthCheck/ClientApp/src/app/counter/counter.component.html
================================================
<h1>Counter</h1>
<p>This is a simple example of an Angular component.</p>
<p aria-live="polite">Current count: <strong>{{ currentCount }}</strong></p>
<button class="btn btn-primary" (click)="incrementCounter()">Increment</button>
================================================
FILE: Chapter_01/HealthCheck/ClientApp/src/app/counter/counter.component.spec.ts
================================================
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { CounterComponent } from './counter.component';
describe('CounterComponent', () => {
let component: CounterComponent;
let fixture: ComponentFixture<CounterComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ CounterComponent ]
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(CounterComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should display a title', async(() => {
const titleText = fixture.nativeElement.querySelector('h1').textContent;
expect(titleText).toEqual('Counter');
}));
it('should start with count 0, then increments by 1 when clicked', async(() => {
const countElement = fixture.nativeElement.querySelector('strong');
expect(countElement.textContent).toEqual('0');
const incrementButton = fixture.nativeElement.querySelector('button');
incrementButton.click();
fixture.detectChanges();
expect(countElement.textContent).toEqual('1');
}));
});
================================================
FILE: Chapter_01/HealthCheck/ClientApp/src/app/counter/counter.component.ts
================================================
import { Component } from '@angular/core';
@Component({
selector: 'app-counter-component',
templateUrl: './counter.component.html'
})
export class CounterComponent {
public currentCount = 0;
public incrementCounter() {
this.currentCount++;
}
}
================================================
FILE: Chapter_01/HealthCheck/ClientApp/src/app/fetch-data/fetch-data.component.html
================================================
<h1 id="tableLabel">Weather forecast</h1>
<p>This component demonstrates fetching data from the server.</p>
<p *ngIf="!forecasts"><em>Loading...</em></p>
<table class='table table-striped' aria-labelledby="tableLabel" *ngIf="forecasts">
<thead>
<tr>
<th>Date</th>
<th>Temp. (C)</th>
<th>Temp. (F)</th>
<th>Summary</th>
</tr>
</thead>
<tbody>
<tr *ngFor="let forecast of forecasts">
<td>{{ forecast.date }}</td>
<td>{{ forecast.temperatureC }}</td>
<td>{{ forecast.temperatureF }}</td>
<td>{{ forecast.summary }}</td>
</tr>
</tbody>
</table>
================================================
FILE: Chapter_01/HealthCheck/ClientApp/src/app/fetch-data/fetch-data.component.ts
================================================
import { Component, Inject } from '@angular/core';
import { HttpClient } from '@angular/common/http';
@Component({
selector: 'app-fetch-data',
templateUrl: './fetch-data.component.html'
})
export class FetchDataComponent {
public forecasts: WeatherForecast[];
constructor(http: HttpClient, @Inject('BASE_URL') baseUrl: string) {
http.get<WeatherForecast[]>(baseUrl + 'weatherforecast').subscribe(result => {
this.forecasts = result;
}, error => console.error(error));
}
}
interface WeatherForecast {
date: string;
temperatureC: number;
temperatureF: number;
summary: string;
}
================================================
FILE: Chapter_01/HealthCheck/ClientApp/src/app/home/home.component.html
================================================
<h1>Hello, world!</h1>
<p>Welcome to your new single-page application, built with:</p>
<ul>
<li><a href='https://get.asp.net/'>ASP.NET Core</a> and <a href='https://msdn.microsoft.com/en-us/library/67ef8sbd.aspx'>C#</a> for cross-platform server-side code</li>
<li><a href='https://angular.io/'>Angular</a> and <a href='http://www.typescriptlang.org/'>TypeScript</a> for client-side code</li>
<li><a href='http://getbootstrap.com/'>Bootstrap</a> for layout and styling</li>
</ul>
<p>To help you get started, we've also set up:</p>
<ul>
<li><strong>Client-side navigation</strong>. For example, click <em>Counter</em> then <em>Back</em> to return here.</li>
<li><strong>Angular CLI integration</strong>. In development mode, there's no need to run <code>ng serve</code>. It runs in the background automatically, so your client-side resources are dynamically built on demand and the page refreshes when you modify any file.</li>
<li><strong>Efficient production builds</strong>. In production mode, development-time features are disabled, and your <code>dotnet publish</code> configuration automatically invokes <code>ng build</code> to produce minified, ahead-of-time compiled JavaScript files.</li>
</ul>
<p>The <code>ClientApp</code> subdirectory is a standard Angular CLI application. If you open a command prompt in that directory, you can run any <code>ng</code> command (e.g., <code>ng test</code>), or use <code>npm</code> to install extra packages into it.</p>
================================================
FILE: Chapter_01/HealthCheck/ClientApp/src/app/home/home.component.ts
================================================
import { Component } from '@angular/core';
@Component({
selector: 'app-home',
templateUrl: './home.component.html',
})
export class HomeComponent {
}
================================================
FILE: Chapter_01/HealthCheck/ClientApp/src/app/nav-menu/nav-menu.component.css
================================================
a.navbar-brand {
white-space: normal;
text-align: center;
word-break: break-all;
}
html {
font-size: 14px;
}
@media (min-width: 768px) {
html {
font-size: 16px;
}
}
.box-shadow {
box-shadow: 0 .25rem .75rem rgba(0, 0, 0, .05);
}
================================================
FILE: Chapter_01/HealthCheck/ClientApp/src/app/nav-menu/nav-menu.component.html
================================================
<header>
<nav
class="navbar navbar-expand-sm navbar-toggleable-sm navbar-light bg-white border-bottom box-shadow mb-3"
>
<div class="container">
<a class="navbar-brand" [routerLink]="['/']">HealthCheck</a>
<button
class="navbar-toggler"
type="button"
data-toggle="collapse"
data-target=".navbar-collapse"
aria-label="Toggle navigation"
[attr.aria-expanded]="isExpanded"
(click)="toggle()"
>
<span class="navbar-toggler-icon"></span>
</button>
<div
class="navbar-collapse collapse d-sm-inline-flex flex-sm-row-reverse"
[ngClass]="{ show: isExpanded }"
>
<ul class="navbar-nav flex-grow">
<li
class="nav-item"
[routerLinkActive]="['link-active']"
[routerLinkActiveOptions]="{ exact: true }"
>
<a class="nav-link text-dark" [routerLink]="['/']">Home</a>
</li>
<li class="nav-item" [routerLinkActive]="['link-active']">
<a class="nav-link text-dark" [routerLink]="['/counter']"
>Counter</a
>
</li>
<li class="nav-item" [routerLinkActive]="['link-active']">
<a class="nav-link text-dark" [routerLink]="['/fetch-data']"
>Fetch data</a
>
</li>
</ul>
</div>
</div>
</nav>
</header>
================================================
FILE: Chapter_01/HealthCheck/ClientApp/src/app/nav-menu/nav-menu.component.ts
================================================
import { Component } from '@angular/core';
@Component({
selector: 'app-nav-menu',
templateUrl: './nav-menu.component.html',
styleUrls: ['./nav-menu.component.css']
})
export class NavMenuComponent {
isExpanded = false;
collapse() {
this.isExpanded = false;
}
toggle() {
this.isExpanded = !this.isExpanded;
}
}
================================================
FILE: Chapter_01/HealthCheck/ClientApp/src/assets/.gitkeep
================================================
================================================
FILE: Chapter_01/HealthCheck/ClientApp/src/environments/environment.prod.ts
================================================
export const environment = {
production: true
};
================================================
FILE: Chapter_01/HealthCheck/ClientApp/src/environments/environment.ts
================================================
// This file can be replaced during build by using the `fileReplacements` array.
// `ng build ---prod` replaces `environment.ts` with `environment.prod.ts`.
// The list of file replacements can be found in `angular.json`.
export const environment = {
production: false
};
/*
* In development mode, to ignore zone related error stack frames such as
* `zone.run`, `zoneDelegate.invokeTask` for easier debugging, you can
* import the following file, but please comment it out in production mode
* because it will have performance impact when throw error
*/
// import 'zone.js/dist/zone-error'; // Included with Angular CLI.
================================================
FILE: Chapter_01/HealthCheck/ClientApp/src/index.html
================================================
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>HealthCheck</title>
<base href="/" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link rel="icon" type="image/x-icon" href="favicon.ico" />
</head>
<body>
<app-root>Loading...</app-root>
</body>
</html>
================================================
FILE: Chapter_01/HealthCheck/ClientApp/src/karma.conf.js
================================================
// Karma configuration file, see link for more information
// https://karma-runner.github.io/1.0/config/configuration-file.html
module.exports = function (config) {
config.set({
basePath: '',
frameworks: ['jasmine', '@angular-devkit/build-angular'],
plugins: [
require('karma-jasmine'),
require('karma-chrome-launcher'),
require('karma-jasmine-html-reporter'),
require('karma-coverage-istanbul-reporter'),
require('@angular-devkit/build-angular/plugins/karma')
],
client: {
clearContext: false // leave Jasmine Spec Runner output visible in browser
},
coverageIstanbulReporter: {
dir: require('path').join(__dirname, '../coverage'),
reports: ['html', 'lcovonly'],
fixWebpackSourcePaths: true
},
reporters: ['progress', 'kjhtml'],
port: 9876,
colors: true,
logLevel: config.LOG_INFO,
autoWatch: true,
browsers: ['Chrome'],
singleRun: false
});
};
================================================
FILE: Chapter_01/HealthCheck/ClientApp/src/main.ts
================================================
import { enableProdMode } from '@angular/core';
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
import { AppModule } from './app/app.module';
import { environment } from './environments/environment';
export function getBaseUrl() {
return document.getElementsByTagName('base')[0].href;
}
const providers = [
{ provide: 'BASE_URL', useFactory: getBaseUrl, deps: [] }
];
if (environment.production) {
enableProdMode();
}
platformBrowserDynamic(providers).bootstrapModule(AppModule)
.catch(err => console.error(err));
================================================
FILE: Chapter_01/HealthCheck/ClientApp/src/polyfills.ts
================================================
/**
* This file includes polyfills needed by Angular and is loaded before the app.
* You can add your own extra polyfills to this file.
*
* This file is divided into 2 sections:
* 1. Browser polyfills. These are applied before loading ZoneJS and are sorted by browsers.
* 2. Application imports. Files imported after ZoneJS that should be loaded before your main
* file.
*
* The current setup is for so-called "evergreen" browsers; the last versions of browsers that
* automatically update themselves. This includes Safari >= 10, Chrome >= 55 (including Opera),
* Edge >= 13 on the desktop, and iOS 10 and Chrome on mobile.
*
* Learn more in https://angular.io/guide/browser-support
*/
/***************************************************************************************************
* BROWSER POLYFILLS
*/
/** IE10 and IE11 requires the following for NgClass support on SVG elements */
// import 'classlist.js'; // Run `npm install --save classlist.js`.
/**
* Web Animations `@angular/platform-browser/animations`
* Only required if AnimationBuilder is used within the application and using IE/Edge or Safari.
* Standard animation support in Angular DOES NOT require any polyfills (as of Angular 6.0).
*/
// import 'web-animations-js'; // Run `npm install --save web-animations-js`.
/**
* By default, zone.js will patch all possible macroTask and DomEvents
* user can disable parts of macroTask/DomEvents patch by setting following flags
* because those flags need to be set before `zone.js` being loaded, and webpack
* will put import in the top of bundle, so user need to create a separate file
* in this directory (for example: zone-flags.ts), and put the following flags
* into that file, and then add the following code before importing zone.js.
* import './zone-flags.ts';
*
* The flags allowed in zone-flags.ts are listed here.
*
* The following flags will work for all browsers.
*
* (window as any).__Zone_disable_requestAnimationFrame = true; // disable patch requestAnimationFrame
* (window as any).__Zone_disable_on_property = true; // disable patch onProperty such as onclick
* (window as any).__zone_symbol__UNPATCHED_EVENTS = ['scroll', 'mousemove']; // disable patch specified eventNames
*
* in IE/Edge developer tools, the addEventListener will also be wrapped by zone.js
* with the following flag, it will bypass `zone.js` patch for IE/Edge
*
* (window as any).__Zone_enable_cross_context_check = true;
*
*/
/***************************************************************************************************
* Zone JS is required by default for Angular itself.
*/
import 'zone.js/dist/zone'; // Included with Angular CLI.
/***************************************************************************************************
* APPLICATION IMPORTS
*/
================================================
FILE: Chapter_01/HealthCheck/ClientApp/src/styles.css
================================================
/* You can add global styles to this file, and also import other style files */
/* Provide sufficient contrast against white background */
a {
color: #0366d6;
}
code {
color: #e01a76;
}
.btn-primary {
color: #fff;
background-color: #1b6ec2;
border-color: #1861ac;
}
================================================
FILE: Chapter_01/HealthCheck/ClientApp/src/test.ts
================================================
// This file is required by karma.conf.js and loads recursively all the .spec and framework files
import 'zone.js/dist/zone-testing';
import { getTestBed } from '@angular/core/testing';
import {
BrowserDynamicTestingModule,
platformBrowserDynamicTesting
} from '@angular/platform-browser-dynamic/testing';
declare const require: any;
// First, initialize the Angular testing environment.
getTestBed().initTestEnvironment(
BrowserDynamicTestingModule,
platformBrowserDynamicTesting()
);
// Then we find all the tests.
const context = require.context('./', true, /\.spec\.ts$/);
// And load the modules.
context.keys().map(context);
================================================
FILE: Chapter_01/HealthCheck/ClientApp/src/tsconfig.app.json
================================================
{
"extends": "../tsconfig.json",
"compilerOptions": {
"outDir": "../out-tsc/app",
"types": []
},
"exclude": [
"src/test.ts",
"**/*.spec.ts"
]
}
================================================
FILE: Chapter_01/HealthCheck/ClientApp/src/tsconfig.server.json
================================================
{
"extends": "../tsconfig.json",
"compilerOptions": {
"module": "commonjs"
},
"angularCompilerOptions": {
"entryModule": "app/app.server.module#AppServerModule"
}
}
================================================
FILE: Chapter_01/HealthCheck/ClientApp/src/tsconfig.spec.json
================================================
{
"extends": "../tsconfig.json",
"compilerOptions": {
"outDir": "../out-tsc/spec",
"types": [
"jasmine",
"node"
]
},
"files": [
"test.ts",
"polyfills.ts"
],
"include": [
"**/*.spec.ts",
"**/*.d.ts"
]
}
================================================
FILE: Chapter_01/HealthCheck/ClientApp/src/tslint.json
================================================
{
"extends": "../tslint.json",
"rules": {
"directive-selector": [
true,
"attribute",
"app",
"camelCase"
],
"component-selector": [
true,
"element",
"app",
"kebab-case"
]
}
}
================================================
FILE: Chapter_01/HealthCheck/ClientApp/tsconfig.json
================================================
{
"compileOnSave": false,
"compilerOptions": {
"baseUrl": "./",
"module": "esnext",
"outDir": "./dist/out-tsc",
"sourceMap": true,
"declaration": false,
"moduleResolution": "node",
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"target": "es2015",
"typeRoots": [
"node_modules/@types"
],
"lib": [
"es2017",
"dom"
]
}
}
================================================
FILE: Chapter_01/HealthCheck/ClientApp/tslint.json
================================================
{
"rulesDirectory": [
"node_modules/codelyzer"
],
"rules": {
"arrow-return-shorthand": true,
"callable-types": true,
"class-name": true,
"comment-format": [
true,
"check-space"
],
"curly": true,
"deprecation": {
"severity": "warn"
},
"eofline": true,
"forin": true,
"import-blacklist": [
true,
"rxjs/Rx"
],
"import-spacing": true,
"indent": [
true,
"spaces"
],
"interface-over-type-literal": true,
"label-position": true,
"max-line-length": [
true,
140
],
"member-access": false,
"member-ordering": [
true,
{
"order": [
"static-field",
"instance-field",
"static-method",
"instance-method"
]
}
],
"no-arg": true,
"no-bitwise": true,
"no-console": [
true,
"debug",
"info",
"time",
"timeEnd",
"trace"
],
"no-construct": true,
"no-debugger": true,
"no-duplicate-super": true,
"no-empty": false,
"no-empty-interface": true,
"no-eval": true,
"no-inferrable-types": [
true,
"ignore-params"
],
"no-misused-new": true,
"no-non-null-assertion": true,
"no-shadowed-variable": true,
"no-string-literal": false,
"no-string-throw": true,
"no-switch-case-fall-through": true,
"no-trailing-whitespace": true,
"no-unnecessary-initializer": true,
"no-unused-expression": true,
"no-use-before-declare": true,
"no-var-keyword": true,
"object-literal-sort-keys": false,
"one-line": [
true,
"check-open-brace",
"check-catch",
"check-else",
"check-whitespace"
],
"prefer-const": true,
"quotemark": [
true,
"single"
],
"radix": true,
"semicolon": [
true,
"always"
],
"triple-equals": [
true,
"allow-null-check"
],
"typedef-whitespace": [
true,
{
"call-signature": "nospace",
"index-signature": "nospace",
"parameter": "nospace",
"property-declaration": "nospace",
"variable-declaration": "nospace"
}
],
"unified-signatures": true,
"variable-name": false,
"whitespace": [
true,
"check-branch",
"check-decl",
"check-operator",
"check-separator",
"check-type"
],
"no-output-on-prefix": true,
"no-inputs-metadata-property": true,
"no-outputs-metadata-property": true,
"no-host-metadata-property": true,
"no-input-rename": true,
"no-output-rename": true,
"use-lifecycle-interface": true,
"use-pipe-transform-interface": true,
"component-class-suffix": true,
"directive-class-suffix": true
}
}
================================================
FILE: Chapter_01/HealthCheck/ClientApp/update-npm.bat
================================================
cd %~dp0
npm update
================================================
FILE: Chapter_01/HealthCheck/Controllers/WeatherForecastController.cs
================================================
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Logging;
namespace HealthCheck.Controllers
{
[ApiController]
[Route("[controller]")]
public class WeatherForecastController : ControllerBase
{
private static readonly string[] Summaries = new[]
{
"Freezing", "Bracing", "Chilly", "Cool", "Mild", "Warm", "Balmy", "Hot", "Sweltering", "Scorching"
};
private readonly ILogger<WeatherForecastController> _logger;
public WeatherForecastController(ILogger<WeatherForecastController> logger)
{
_logger = logger;
}
[HttpGet]
public IEnumerable<WeatherForecast> Get()
{
var rng = new Random();
return Enumerable.Range(1, 5).Select(index => new WeatherForecast
{
Date = DateTime.Now.AddDays(index),
TemperatureC = rng.Next(-20, 55),
Summary = Summaries[rng.Next(Summaries.Length)]
})
.ToArray();
}
}
}
================================================
FILE: Chapter_01/HealthCheck/HealthCheck.csproj
================================================
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework>
<TypeScriptCompileBlocked>true</TypeScriptCompileBlocked>
<TypeScriptToolsVersion>Latest</TypeScriptToolsVersion>
<IsPackable>false</IsPackable>
<SpaRoot>ClientApp\</SpaRoot>
<DefaultItemExcludes>$(DefaultItemExcludes);$(SpaRoot)node_modules\**</DefaultItemExcludes>
<!-- Set this to true if you enable server-side prerendering -->
<BuildServerSideRenderer>false</BuildServerSideRenderer>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.SpaServices.Extensions" Version="3.1.1" />
</ItemGroup>
<ItemGroup>
<!-- Don't publish the SPA source files, but do show them in the project files list -->
<Content Remove="$(SpaRoot)**" />
<None Remove="$(SpaRoot)**" />
<None Include="$(SpaRoot)**" Exclude="$(SpaRoot)node_modules\**" />
</ItemGroup>
<Target Name="DebugEnsureNodeEnv" BeforeTargets="Build" Condition=" '$(Configuration)' == 'Debug' And !Exists('$(SpaRoot)node_modules') ">
<!-- Ensure Node.js is installed -->
<Exec Command="node --version" ContinueOnError="true">
<Output TaskParameter="ExitCode" PropertyName="ErrorCode" />
</Exec>
<Error Condition="'$(ErrorCode)' != '0'" Text="Node.js is required to build and run this project. To continue, please install Node.js from https://nodejs.org/, and then restart your command prompt or IDE." />
<Message Importance="high" Text="Restoring dependencies using 'npm'. This may take several minutes..." />
<Exec WorkingDirectory="$(SpaRoot)" Command="npm install" />
</Target>
<Target Name="PublishRunWebpack" AfterTargets="ComputeFilesToPublish">
<!-- As part of publishing, ensure the JS resources are freshly built in production mode -->
<Exec WorkingDirectory="$(SpaRoot)" Command="npm install" />
<Exec WorkingDirectory="$(SpaRoot)" Command="npm run build -- --prod" />
<Exec WorkingDirectory="$(SpaRoot)" Command="npm run build:ssr -- --prod" Condition=" '$(BuildServerSideRenderer)' == 'true' " />
<!-- Include the newly-built files in the publish output -->
<ItemGroup>
<DistFiles Include="$(SpaRoot)dist\**; $(SpaRoot)dist-server\**" />
<DistFiles Include="$(SpaRoot)node_modules\**" Condition="'$(BuildServerSideRenderer)' == 'true'" />
<ResolvedFileToPublish Include="@(DistFiles->'%(FullPath)')" Exclude="@(ResolvedFileToPublish)">
<RelativePath>%(DistFiles.Identity)</RelativePath>
<CopyToPublishDirectory>PreserveNewest</CopyToPublishDirectory>
<ExcludeFromSingleFile>true</ExcludeFromSingleFile>
</ResolvedFileToPublish>
</ItemGroup>
</Target>
</Project>
================================================
FILE: Chapter_01/HealthCheck/Pages/Error.cshtml
================================================
@page
@model ErrorModel
@{
ViewData["Title"] = "Error";
}
<h1 class="text-danger">Error.</h1>
<h2 class="text-danger">An error occurred while processing your request.</h2>
@if (Model.ShowRequestId)
{
<p>
<strong>Request ID:</strong> <code>@Model.RequestId</code>
</p>
}
<h3>Development Mode</h3>
<p>
Swapping to the <strong>Development</strong> environment displays detailed information about the error that occurred.
</p>
<p>
<strong>The Development environment shouldn't be enabled for deployed applications.</strong>
It can result in displaying sensitive information from exceptions to end users.
For local debugging, enable the <strong>Development</strong> environment by setting the <strong>ASPNETCORE_ENVIRONMENT</strong> environment variable to <strong>Development</strong>
and restarting the app.
</p>
================================================
FILE: Chapter_01/HealthCheck/Pages/Error.cshtml.cs
================================================
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.RazorPages;
using Microsoft.Extensions.Logging;
namespace HealthCheck.Pages
{
[ResponseCache(Duration = 0, Location = ResponseCacheLocation.None, NoStore = true)]
public class ErrorModel : PageModel
{
private readonly ILogger<ErrorModel> _logger;
public ErrorModel(ILogger<ErrorModel> logger)
{
_logger = logger;
}
public string RequestId { get; set; }
public bool ShowRequestId => !string.IsNullOrEmpty(RequestId);
public void OnGet()
{
RequestId = Activity.Current?.Id ?? HttpContext.TraceIdentifier;
}
}
}
================================================
FILE: Chapter_01/HealthCheck/Pages/_ViewImports.cshtml
================================================
@using HealthCheck
@namespace HealthCheck.Pages
@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers
================================================
FILE: Chapter_01/HealthCheck/Program.cs
================================================
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore;
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.Logging;
namespace HealthCheck
{
public class Program
{
public static void Main(string[] args)
{
CreateWebHostBuilder(args).Build().Run();
}
public static IWebHostBuilder CreateWebHostBuilder(string[] args) =>
WebHost.CreateDefaultBuilder(args)
.UseStartup<Startup>();
}
}
================================================
FILE: Chapter_01/HealthCheck/Startup.cs
================================================
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.HttpsPolicy;
using Microsoft.AspNetCore.SpaServices.AngularCli;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
namespace HealthCheck
{
public class Startup
{
public Startup(IConfiguration configuration)
{
Configuration = configuration;
}
public IConfiguration Configuration { get; }
// This method gets called by the runtime. Use this method to add services to the container.
public void ConfigureServices(IServiceCollection services)
{
services.AddControllersWithViews();
// In production, the Angular files will be served from this directory
services.AddSpaStaticFiles(configuration =>
{
configuration.RootPath = "ClientApp/dist";
});
}
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
{
if (env.IsDevelopment())
{
app.UseDeveloperExceptionPage();
}
else
{
app.UseExceptionHandler("/Error");
// The default HSTS value is 30 days. You may want to change this for production scenarios, see https://aka.ms/aspnetcore-hsts.
app.UseHsts();
}
app.UseHttpsRedirection();
app.UseStaticFiles();
if (!env.IsDevelopment())
{
app.UseSpaStaticFiles();
}
app.UseRouting();
app.UseEndpoints(endpoints =>
{
endpoints.MapControllerRoute(
name: "default",
pattern: "{controller}/{action=Index}/{id?}");
});
app.UseSpa(spa =>
{
// To learn more about options for serving an Angular SPA from ASP.NET Core,
// see https://go.microsoft.com/fwlink/?linkid=864501
spa.Options.SourcePath = "ClientApp";
if (env.IsDevelopment())
{
spa.UseAngularCliServer(npmScript: "start");
}
});
}
}
}
================================================
FILE: Chapter_01/HealthCheck/WeatherForecast.cs
================================================
using System;
namespace HealthCheck
{
public class WeatherForecast
{
public DateTime Date { get; set; }
public int TemperatureC { get; set; }
public int TemperatureF => 32 + (int)(TemperatureC / 0.5556);
public string Summary { get; set; }
}
}
================================================
FILE: Chapter_01/HealthCheck/appsettings.Development.json
================================================
{
"Logging": {
"LogLevel": {
"Default": "Debug",
"System": "Information",
"Microsoft": "Information"
}
}
}
================================================
FILE: Chapter_01/HealthCheck/appsettings.json
================================================
{
"Logging": {
"LogLevel": {
"Default": "Warning"
}
},
"AllowedHosts": "*"
}
================================================
FILE: Chapter_01.sln
================================================
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.29102.190
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "HealthCheck", "Chapter_01\HealthCheck\HealthCheck.csproj", "{5DC82B04-93AA-4B83-AE82-759A0E21DFF5}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{B140A870-A419-487C-A4D5-D1949CCFB411}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{B140A870-A419-487C-A4D5-D1949CCFB411}.Debug|Any CPU.Build.0 = Debug|Any CPU
{B140A870-A419-487C-A4D5-D1949CCFB411}.Release|Any CPU.ActiveCfg = Release|Any CPU
{B140A870-A419-487C-A4D5-D1949CCFB411}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {922DA531-077E-4848-833C-D0F1791E34E4}
EndGlobalSection
EndGlobal
================================================
FILE: Chapter_02/HealthCheck/.gitignore
================================================
## Ignore Visual Studio temporary files, build results, and
## files generated by popular Visual Studio add-ons.
# User-specific files
*.suo
*.user
*.userosscache
*.sln.docstates
# User-specific files (MonoDevelop/Xamarin Studio)
*.userprefs
# Build results
[Dd]ebug/
[Dd]ebugPublic/
[Rr]elease/
[Rr]eleases/
x64/
x86/
build/
bld/
bin/
Bin/
obj/
Obj/
# Visual Studio 2015 cache/options directory
.vs/
# MSTest test Results
[Tt]est[Rr]esult*/
[Bb]uild[Ll]og.*
# NUNIT
*.VisualState.xml
TestResult.xml
# Build Results of an ATL Project
[Dd]ebugPS/
[Rr]eleasePS/
dlldata.c
*_i.c
*_p.c
*_i.h
*.ilk
*.meta
*.obj
*.pch
*.pdb
*.pgc
*.pgd
*.rsp
*.sbr
*.tlb
*.tli
*.tlh
*.tmp
*.tmp_proj
*.log
*.vspscc
*.vssscc
.builds
*.pidb
*.svclog
*.scc
# Chutzpah Test files
_Chutzpah*
# Visual C++ cache files
ipch/
*.aps
*.ncb
*.opendb
*.opensdf
*.sdf
*.cachefile
# Visual Studio profiler
*.psess
*.vsp
*.vspx
*.sap
# TFS 2012 Local Workspace
$tf/
# Guidance Automation Toolkit
*.gpState
# ReSharper is a .NET coding add-in
_ReSharper*/
*.[Rr]e[Ss]harper
*.DotSettings.user
# JustCode is a .NET coding add-in
.JustCode
# TeamCity is a build add-in
_TeamCity*
# DotCover is a Code Coverage Tool
*.dotCover
# NCrunch
_NCrunch_*
.*crunch*.local.xml
nCrunchTemp_*
# MightyMoose
*.mm.*
AutoTest.Net/
# Web workbench (sass)
.sass-cache/
# Installshield output folder
[Ee]xpress/
# DocProject is a documentation generator add-in
DocProject/buildhelp/
DocProject/Help/*.HxT
DocProject/Help/*.HxC
DocProject/Help/*.hhc
DocProject/Help/*.hhk
DocProject/Help/*.hhp
DocProject/Help/Html2
DocProject/Help/html
# Click-Once directory
publish/
# Publish Web Output
*.[Pp]ublish.xml
*.azurePubxml
# TODO: Comment the next line if you want to checkin your web deploy settings
# but database connection strings (with potential passwords) will be unencrypted
*.pubxml
*.publishproj
# NuGet Packages
*.nupkg
# The packages folder can be ignored because of Package Restore
**/packages/*
# except build/, which is used as an MSBuild target.
!**/packages/build/
# Uncomment if necessary however generally it will be regenerated when needed
#!**/packages/repositories.config
# Microsoft Azure Build Output
csx/
*.build.csdef
# Microsoft Azure Emulator
ecf/
rcf/
# Microsoft Azure ApplicationInsights config file
ApplicationInsights.config
# Windows Store app package directory
AppPackages/
BundleArtifacts/
# Visual Studio cache files
# files ending in .cache can be ignored
*.[Cc]ache
# but keep track of directories ending in .cache
!*.[Cc]ache/
# Others
ClientBin/
~$*
*~
*.dbmdl
*.dbproj.schemaview
*.pfx
*.publishsettings
orleans.codegen.cs
/node_modules
# RIA/Silverlight projects
Generated_Code/
# Backup & report files from converting an old project file
# to a newer Visual Studio version. Backup files are not needed,
# because we have git ;-)
_UpgradeReport_Files/
Backup*/
UpgradeLog*.XML
UpgradeLog*.htm
# SQL Server files
*.mdf
*.ldf
# Business Intelligence projects
*.rdl.data
*.bim.layout
*.bim_*.settings
# Microsoft Fakes
FakesAssemblies/
# GhostDoc plugin setting file
*.GhostDoc.xml
# Node.js Tools for Visual Studio
.ntvs_analysis.dat
# Visual Studio 6 build log
*.plg
# Visual Studio 6 workspace options file
*.opt
# Visual Studio LightSwitch build output
**/*.HTMLClient/GeneratedArtifacts
**/*.DesktopClient/GeneratedArtifacts
**/*.DesktopClient/ModelManifest.xml
**/*.Server/GeneratedArtifacts
**/*.Server/ModelManifest.xml
_Pvt_Extensions
# Paket dependency manager
.paket/paket.exe
# FAKE - F# Make
.fake/
================================================
FILE: Chapter_02/HealthCheck/ClientApp/.editorconfig
================================================
# Editor configuration, see http://editorconfig.org
root = true
[*]
charset = utf-8
indent_style = space
indent_size = 2
insert_final_newline = true
trim_trailing_whitespace = true
[*.md]
max_line_length = off
trim_trailing_whitespace = false
================================================
FILE: Chapter_02/HealthCheck/ClientApp/.gitignore
================================================
# See http://help.github.com/ignore-files/ for more about ignoring files.
# compiled output
/dist
/dist-server
/tmp
/out-tsc
# dependencies
/node_modules
# IDEs and editors
/.idea
.project
.classpath
.c9/
*.launch
.settings/
*.sublime-workspace
# IDE - VSCode
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json
# misc
/.sass-cache
/connect.lock
/coverage
/libpeerconnection.log
npm-debug.log
yarn-error.log
testem.log
/typings
# System Files
.DS_Store
Thumbs.db
================================================
FILE: Chapter_02/HealthCheck/ClientApp/README.md
================================================
# HealthCheck
This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 6.0.0.
## Development server
Run `ng serve` for a dev server. Navigate to `http://localhost:4200/`. The app will automatically reload if you change any of the source files.
## Code scaffolding
Run `ng generate component component-name` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module`.
## Build
Run `ng build` to build the project. The build artifacts will be stored in the `dist/` directory. Use the `--prod` flag for a production build.
## Running unit tests
Run `ng test` to execute the unit tests via [Karma](https://karma-runner.github.io).
## Running end-to-end tests
Run `ng e2e` to execute the end-to-end tests via [Protractor](http://www.protractortest.org/).
## Further help
To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI README](https://github.com/angular/angular-cli/blob/master/README.md).
================================================
FILE: Chapter_02/HealthCheck/ClientApp/angular.json
================================================
{
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
"version": 1,
"newProjectRoot": "projects",
"projects": {
"HealthCheck": {
"root": "",
"sourceRoot": "src",
"projectType": "application",
"prefix": "app",
"schematics": {},
"architect": {
"build": {
"builder": "@angular-devkit/build-angular:browser",
"options": {
"progress": true,
"extractCss": true,
"outputPath": "dist",
"index": "src/index.html",
"main": "src/main.ts",
"polyfills": "src/polyfills.ts",
"tsConfig": "src/tsconfig.app.json",
"assets": ["src/assets"],
"styles": [
"node_modules/bootstrap/dist/css/bootstrap.min.css",
"src/styles.css"
],
"scripts": []
},
"configurations": {
"production": {
"fileReplacements": [
{
"replace": "src/environments/environment.ts",
"with": "src/environments/environment.prod.ts"
}
],
"optimization": true,
"outputHashing": "all",
"sourceMap": false,
"extractCss": true,
"namedChunks": false,
"aot": true,
"extractLicenses": true,
"vendorChunk": false,
"buildOptimizer": true
}
}
},
"serve": {
"builder": "@angular-devkit/build-angular:dev-server",
"options": {
"browserTarget": "HealthCheck:build"
},
"configurations": {
"production": {
"browserTarget": "HealthCheck:build:production"
}
}
},
"extract-i18n": {
"builder": "@angular-devkit/build-angular:extract-i18n",
"options": {
"browserTarget": "HealthCheck:build"
}
},
"test": {
"builder": "@angular-devkit/build-angular:karma",
"options": {
"main": "src/test.ts",
"polyfills": "src/polyfills.ts",
"tsConfig": "src/tsconfig.spec.json",
"karmaConfig": "src/karma.conf.js",
"styles": [ "src/styles.css" ],
"scripts": [],
"assets": ["src/assets"]
}
},
"lint": {
"builder": "@angular-devkit/build-angular:tslint",
"options": {
"tsConfig": ["src/tsconfig.app.json", "src/tsconfig.spec.json"],
"exclude": ["**/node_modules/**"]
}
},
"server": {
"builder": "@angular-devkit/build-angular:server",
"options": {
"outputPath": "dist-server",
"main": "src/main.ts",
"tsConfig": "src/tsconfig.server.json"
},
"configurations": {
"dev": {
"optimization": true,
"outputHashing": "all",
"sourceMap": false,
"namedChunks": false,
"extractLicenses": true,
"vendorChunk": true
},
"production": {
"optimization": true,
"outputHashing": "all",
"sourceMap": false,
"namedChunks": false,
"extractLicenses": true,
"vendorChunk": false
}
}
}
}
},
"HealthCheck-e2e": {
"root": "e2e/",
"projectType": "application",
"architect": {
"e2e": {
"builder": "@angular-devkit/build-angular:protractor",
"options": {
"protractorConfig": "e2e/protractor.conf.js",
"devServerTarget": "HealthCheck:serve"
}
},
"lint": {
"builder": "@angular-devkit/build-angular:tslint",
"options": {
"tsConfig": "e2e/tsconfig.e2e.json",
"exclude": ["**/node_modules/**"]
}
}
}
}
},
"defaultProject": "HealthCheck"
}
================================================
FILE: Chapter_02/HealthCheck/ClientApp/browserslist
================================================
# This file is currently used by autoprefixer to adjust CSS to support the below specified browsers
# For additional information regarding the format and rule options, please see:
# https://github.com/browserslist/browserslist#queries
# For IE 9-11 support, please uncomment the last line of the file and adjust as needed
> 0.5%
last 2 versions
Firefox ESR
not dead
# IE 9-11
================================================
FILE: Chapter_02/HealthCheck/ClientApp/e2e/protractor.conf.js
================================================
// Protractor configuration file, see link for more information
// https://github.com/angular/protractor/blob/master/lib/config.ts
const { SpecReporter } = require("jasmine-spec-reporter");
exports.config = {
allScriptsTimeout: 11000,
specs: ["./src/**/*.e2e-spec.ts"],
capabilities: {
browserName: "chrome"
},
directConnect: true,
baseUrl: "http://localhost:4200/",
framework: "jasmine",
jasmineNodeOpts: {
showColors: true,
defaultTimeoutInterval: 30000,
print: function() {}
},
onPrepare() {
require("ts-node").register({
project: require("path").join(__dirname, "./tsconfig.e2e.json")
});
jasmine
.getEnv()
.addReporter(new SpecReporter({ spec: { displayStacktrace: true } }));
}
};
================================================
FILE: Chapter_02/HealthCheck/ClientApp/e2e/src/app.e2e-spec.ts
================================================
import { AppPage } from './app.po';
describe('App', () => {
let page: AppPage;
beforeEach(() => {
page = new AppPage();
});
it('should display welcome message', () => {
page.navigateTo();
expect(page.getMainHeading()).toEqual('Hello, world!');
});
});
================================================
FILE: Chapter_02/HealthCheck/ClientApp/e2e/src/app.po.ts
================================================
import { browser, by, element } from 'protractor';
export class AppPage {
navigateTo() {
return browser.get('/');
}
getMainHeading() {
return element(by.css('app-root h1')).getText();
}
}
================================================
FILE: Chapter_02/HealthCheck/ClientApp/e2e/tsconfig.e2e.json
================================================
{
"extends": "../tsconfig.json",
"compilerOptions": {
"outDir": "../out-tsc/app",
"module": "commonjs",
"target": "es5",
"types": [
"jasmine",
"jasminewd2",
"node"
]
}
}
================================================
FILE: Chapter_02/HealthCheck/ClientApp/package.json
================================================
{
"name": "healthcheck",
"version": "0.0.0",
"scripts": {
"ng": "ng",
"start": "echo Starting... && ng serve",
"build": "ng build",
"build:ssr": "ng run HealthCheck:server:dev",
"test": "ng test",
"lint": "ng lint",
"e2e": "ng e2e"
},
"private": true,
"dependencies": {
"@angular/animations": "9.0.0",
"@angular/common": "9.0.0",
"@angular/compiler": "9.0.0",
"@angular/core": "9.0.0",
"@angular/forms": "9.0.0",
"@angular/platform-browser": "9.0.0",
"@angular/platform-browser-dynamic": "9.0.0",
"@angular/platform-server": "9.0.0",
"@angular/router": "9.0.0",
"@nguniversal/module-map-ngfactory-loader": "9.0.0-next.9",
"aspnet-prerendering": "3.0.1",
"bootstrap": "4.4.1",
"core-js": "3.6.1",
"jquery": "3.5.1",
"oidc-client": "1.9.1",
"popper.js": "1.16.0",
"rxjs": "6.5.4",
"zone.js": "0.10.2"
},
"devDependencies": {
"@angular-devkit/build-angular": "0.900.0",
"@angular/cli": "9.0.0",
"@angular/compiler-cli": "9.0.0",
"@angular/language-service": "9.0.0",
"@types/jasmine": "3.5.0",
"@types/jasminewd2": "2.0.8",
"@types/node": "13.1.1",
"codelyzer": "5.2.1",
"jasmine-core": "3.5.0",
"jasmine-spec-reporter": "4.2.1",
"karma": "4.4.1",
"karma-chrome-launcher": "3.1.0",
"karma-coverage-istanbul-reporter": "2.1.1",
"karma-jasmine": "2.0.1",
"karma-jasmine-html-reporter": "1.5.1",
"typescript": "3.7.5"
},
"optionalDependencies": {
"node-sass": "4.13.0",
"protractor": "5.4.2",
"ts-node": "5.0.1",
"tslint": "5.20.1"
}
}
================================================
FILE: Chapter_02/HealthCheck/ClientApp/src/app/app.component.html
================================================
<body>
<app-nav-menu></app-nav-menu>
<div class="container">
<router-outlet></router-outlet>
</div>
</body>
================================================
FILE: Chapter_02/HealthCheck/ClientApp/src/app/app.component.ts
================================================
import { Component } from '@angular/core';
@Component({
selector: 'app-root',
templateUrl: './app.component.html'
})
export class AppComponent {
title = 'app';
}
================================================
FILE: Chapter_02/HealthCheck/ClientApp/src/app/app.module.ts
================================================
import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import { FormsModule } from '@angular/forms';
import { HttpClientModule, HTTP_INTERCEPTORS } from '@angular/common/http';
import { RouterModule } from '@angular/router';
import { AppComponent } from './app.component';
import { NavMenuComponent } from './nav-menu/nav-menu.component';
import { HomeComponent } from './home/home.component';
@NgModule({
declarations: [
AppComponent,
NavMenuComponent,
HomeComponent
],
imports: [
BrowserModule.withServerTransition({ appId: 'ng-cli-universal' }),
HttpClientModule,
FormsModule,
RouterModule.forRoot([
{ path: '', component: HomeComponent, pathMatch: 'full' }
])
],
providers: [],
bootstrap: [AppComponent]
})
export class AppModule { }
================================================
FILE: Chapter_02/HealthCheck/ClientApp/src/app/app.server.module.ts
================================================
import { NgModule } from '@angular/core';
import { ServerModule } from '@angular/platform-server';
import { ModuleMapLoaderModule } from '@nguniversal/module-map-ngfactory-loader';
import { AppComponent } from './app.component';
import { AppModule } from './app.module';
@NgModule({
imports: [AppModule, ServerModule, ModuleMapLoaderModule],
bootstrap: [AppComponent]
})
export class AppServerModule { }
================================================
FILE: Chapter_02/HealthCheck/ClientApp/src/app/home/home.component.html
================================================
<h1>Hello, world!</h1>
<p>Welcome to your new single-page application, built with:</p>
<ul>
<li><a href='https://get.asp.net/'>ASP.NET Core</a> and <a href='https://msdn.microsoft.com/en-us/library/67ef8sbd.aspx'>C#</a> for cross-platform server-side code</li>
<li><a href='https://angular.io/'>Angular</a> and <a href='http://www.typescriptlang.org/'>TypeScript</a> for client-side code</li>
<li><a href='http://getbootstrap.com/'>Bootstrap</a> for layout and styling</li>
</ul>
<p>To help you get started, we've also set up:</p>
<ul>
<li><strong>Client-side navigation</strong>. For example, click <em>Counter</em> then <em>Back</em> to return here.</li>
<li><strong>Angular CLI integration</strong>. In development mode, there's no need to run <code>ng serve</code>. It runs in the background automatically, so your client-side resources are dynamically built on demand and the page refreshes when you modify any file.</li>
<li><strong>Efficient production builds</strong>. In production mode, development-time features are disabled, and your <code>dotnet publish</code> configuration automatically invokes <code>ng build</code> to produce minified, ahead-of-time compiled JavaScript files.</li>
</ul>
<p>The <code>ClientApp</code> subdirectory is a standard Angular CLI application. If you open a command prompt in that directory, you can run any <code>ng</code> command (e.g., <code>ng test</code>), or use <code>npm</code> to install extra packages into it.</p>
================================================
FILE: Chapter_02/HealthCheck/ClientApp/src/app/home/home.component.ts
================================================
import { Component } from '@angular/core';
@Component({
selector: 'app-home',
templateUrl: './home.component.html',
})
export class HomeComponent {
}
================================================
FILE: Chapter_02/HealthCheck/ClientApp/src/app/nav-menu/nav-menu.component.css
================================================
a.navbar-brand {
white-space: normal;
text-align: center;
word-break: break-all;
}
html {
font-size: 14px;
}
@media (min-width: 768px) {
html {
font-size: 16px;
}
}
.box-shadow {
box-shadow: 0 .25rem .75rem rgba(0, 0, 0, .05);
}
================================================
FILE: Chapter_02/HealthCheck/ClientApp/src/app/nav-menu/nav-menu.component.html
================================================
<header>
<nav
class="navbar navbar-expand-sm navbar-toggleable-sm navbar-light bg-white border-bottom box-shadow mb-3"
>
<div class="container">
<a class="navbar-brand" [routerLink]="['/']">HealthCheck</a>
<button
class="navbar-toggler"
type="button"
data-toggle="collapse"
data-target=".navbar-collapse"
aria-label="Toggle navigation"
[attr.aria-expanded]="isExpanded"
(click)="toggle()"
>
<span class="navbar-toggler-icon"></span>
</button>
<div
class="navbar-collapse collapse d-sm-inline-flex flex-sm-row-reverse"
[ngClass]="{ show: isExpanded }"
>
<ul class="navbar-nav flex-grow">
<li
class="nav-item"
[routerLinkActive]="['link-active']"
[routerLinkActiveOptions]="{ exact: true }"
>
<a class="nav-link text-dark" [routerLink]="['/']">Home</a>
</li>
</ul>
</div>
</div>
</nav>
</header>
================================================
FILE: Chapter_02/HealthCheck/ClientApp/src/app/nav-menu/nav-menu.component.ts
================================================
import { Component } from '@angular/core';
@Component({
selector: 'app-nav-menu',
templateUrl: './nav-menu.component.html',
styleUrls: ['./nav-menu.component.css']
})
export class NavMenuComponent {
isExpanded = false;
collapse() {
this.isExpanded = false;
}
toggle() {
this.isExpanded = !this.isExpanded;
}
}
================================================
FILE: Chapter_02/HealthCheck/ClientApp/src/assets/.gitkeep
================================================
================================================
FILE: Chapter_02/HealthCheck/ClientApp/src/environments/environment.prod.ts
================================================
export const environment = {
production: true
};
================================================
FILE: Chapter_02/HealthCheck/ClientApp/src/environments/environment.ts
================================================
// This file can be replaced during build by using the `fileReplacements` array.
// `ng build ---prod` replaces `environment.ts` with `environment.prod.ts`.
// The list of file replacements can be found in `angular.json`.
export const environment = {
production: false
};
/*
* In development mode, to ignore zone related error stack frames such as
* `zone.run`, `zoneDelegate.invokeTask` for easier debugging, you can
* import the following file, but please comment it out in production mode
* because it will have performance impact when throw error
*/
// import 'zone.js/dist/zone-error'; // Included with Angular CLI.
================================================
FILE: Chapter_02/HealthCheck/ClientApp/src/index.html
================================================
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>HealthCheck</title>
<base href="/" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link rel="icon" type="image/x-icon" href="favicon.ico" />
</head>
<body>
<app-root>Loading...</app-root>
</body>
</html>
================================================
FILE: Chapter_02/HealthCheck/ClientApp/src/karma.conf.js
================================================
// Karma configuration file, see link for more information
// https://karma-runner.github.io/1.0/config/configuration-file.html
module.exports = function (config) {
config.set({
basePath: '',
frameworks: ['jasmine', '@angular-devkit/build-angular'],
plugins: [
require('karma-jasmine'),
require('karma-chrome-launcher'),
require('karma-jasmine-html-reporter'),
require('karma-coverage-istanbul-reporter'),
require('@angular-devkit/build-angular/plugins/karma')
],
client: {
clearContext: false // leave Jasmine Spec Runner output visible in browser
},
coverageIstanbulReporter: {
dir: require('path').join(__dirname, '../coverage'),
reports: ['html', 'lcovonly'],
fixWebpackSourcePaths: true
},
reporters: ['progress', 'kjhtml'],
port: 9876,
colors: true,
logLevel: config.LOG_INFO,
autoWatch: true,
browsers: ['Chrome'],
singleRun: false
});
};
================================================
FILE: Chapter_02/HealthCheck/ClientApp/src/main.ts
================================================
import { enableProdMode } from '@angular/core';
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
import { AppModule } from './app/app.module';
import { environment } from './environments/environment';
export function getBaseUrl() {
return document.getElementsByTagName('base')[0].href;
}
const providers = [
{ provide: 'BASE_URL', useFactory: getBaseUrl, deps: [] }
];
if (environment.production) {
enableProdMode();
}
platformBrowserDynamic(providers).bootstrapModule(AppModule)
.catch(err => console.error(err));
================================================
FILE: Chapter_02/HealthCheck/ClientApp/src/polyfills.ts
================================================
/**
* This file includes polyfills needed by Angular and is loaded before the app.
* You can add your own extra polyfills to this file.
*
* This file is divided into 2 sections:
* 1. Browser polyfills. These are applied before loading ZoneJS and are sorted by browsers.
* 2. Application imports. Files imported after ZoneJS that should be loaded before your main
* file.
*
* The current setup is for so-called "evergreen" browsers; the last versions of browsers that
* automatically update themselves. This includes Safari >= 10, Chrome >= 55 (including Opera),
* Edge >= 13 on the desktop, and iOS 10 and Chrome on mobile.
*
* Learn more in https://angular.io/guide/browser-support
*/
/***************************************************************************************************
* BROWSER POLYFILLS
*/
/** IE10 and IE11 requires the following for NgClass support on SVG elements */
// import 'classlist.js'; // Run `npm install --save classlist.js`.
/**
* Web Animations `@angular/platform-browser/animations`
* Only required if AnimationBuilder is used within the application and using IE/Edge or Safari.
* Standard animation support in Angular DOES NOT require any polyfills (as of Angular 6.0).
*/
// import 'web-animations-js'; // Run `npm install --save web-animations-js`.
/**
* By default, zone.js will patch all possible macroTask and DomEvents
* user can disable parts of macroTask/DomEvents patch by setting following flags
* because those flags need to be set before `zone.js` being loaded, and webpack
* will put import in the top of bundle, so user need to create a separate file
* in this directory (for example: zone-flags.ts), and put the following flags
* into that file, and then add the following code before importing zone.js.
* import './zone-flags.ts';
*
* The flags allowed in zone-flags.ts are listed here.
*
* The following flags will work for all browsers.
*
* (window as any).__Zone_disable_requestAnimationFrame = true; // disable patch requestAnimationFrame
* (window as any).__Zone_disable_on_property = true; // disable patch onProperty such as onclick
* (window as any).__zone_symbol__UNPATCHED_EVENTS = ['scroll', 'mousemove']; // disable patch specified eventNames
*
* in IE/Edge developer tools, the addEventListener will also be wrapped by zone.js
* with the following flag, it will bypass `zone.js` patch for IE/Edge
*
* (window as any).__Zone_enable_cross_context_check = true;
*
*/
/***************************************************************************************************
* Zone JS is required by default for Angular itself.
*/
import 'zone.js/dist/zone'; // Included with Angular CLI.
/***************************************************************************************************
* APPLICATION IMPORTS
*/
================================================
FILE: Chapter_02/HealthCheck/ClientApp/src/styles.css
================================================
/* You can add global styles to this file, and also import other style files */
/* Provide sufficient contrast against white background */
a {
color: #0366d6;
}
code {
color: #e01a76;
}
.btn-primary {
color: #fff;
background-color: #1b6ec2;
border-color: #1861ac;
}
================================================
FILE: Chapter_02/HealthCheck/ClientApp/src/test.ts
================================================
// This file is required by karma.conf.js and loads recursively all the .spec and framework files
import 'zone.js/dist/zone-testing';
import { getTestBed } from '@angular/core/testing';
import {
BrowserDynamicTestingModule,
platformBrowserDynamicTesting
} from '@angular/platform-browser-dynamic/testing';
declare const require: any;
// First, initialize the Angular testing environment.
getTestBed().initTestEnvironment(
BrowserDynamicTestingModule,
platformBrowserDynamicTesting()
);
// Then we find all the tests.
const context = require.context('./', true, /\.spec\.ts$/);
// And load the modules.
context.keys().map(context);
================================================
FILE: Chapter_02/HealthCheck/ClientApp/src/tsconfig.app.json
================================================
{
"extends": "../tsconfig.json",
"compilerOptions": {
"outDir": "../out-tsc/app",
"types": []
},
"exclude": [
"src/test.ts",
"**/*.spec.ts"
]
}
================================================
FILE: Chapter_02/HealthCheck/ClientApp/src/tsconfig.server.json
================================================
{
"extends": "../tsconfig.json",
"compilerOptions": {
"module": "commonjs"
},
"angularCompilerOptions": {
"entryModule": "app/app.server.module#AppServerModule"
}
}
================================================
FILE: Chapter_02/HealthCheck/ClientApp/src/tsconfig.spec.json
================================================
{
"extends": "../tsconfig.json",
"compilerOptions": {
"outDir": "../out-tsc/spec",
"types": [
"jasmine",
"node"
]
},
"files": [
"test.ts",
"polyfills.ts"
],
"include": [
"**/*.spec.ts",
"**/*.d.ts"
]
}
================================================
FILE: Chapter_02/HealthCheck/ClientApp/src/tslint.json
================================================
{
"extends": "../tslint.json",
"rules": {
"directive-selector": [
true,
"attribute",
"app",
"camelCase"
],
"component-selector": [
true,
"element",
"app",
"kebab-case"
]
}
}
================================================
FILE: Chapter_02/HealthCheck/ClientApp/tsconfig.json
================================================
{
"compileOnSave": false,
"compilerOptions": {
"baseUrl": "./",
"module": "esnext",
"outDir": "./dist/out-tsc",
"sourceMap": true,
"declaration": false,
"moduleResolution": "node",
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"target": "es2015",
"typeRoots": [
"node_modules/@types"
],
"lib": [
"es2017",
"dom"
]
},
"angularCompilerOptions": {
"strictMetadataEmit": true
}
}
================================================
FILE: Chapter_02/HealthCheck/ClientApp/tslint.json
================================================
{
"rulesDirectory": [
"node_modules/codelyzer"
],
"rules": {
"arrow-return-shorthand": true,
"callable-types": true,
"class-name": true,
"comment-format": [
true,
"check-space"
],
"curly": true,
"deprecation": {
"severity": "warn"
},
"eofline": true,
"forin": true,
"import-blacklist": [
true,
"rxjs/Rx"
],
"import-spacing": true,
"indent": [
true,
"spaces"
],
"interface-over-type-literal": true,
"label-position": true,
"max-line-length": [
true,
140
],
"member-access": false,
"member-ordering": [
true,
{
"order": [
"static-field",
"instance-field",
"static-method",
"instance-method"
]
}
],
"no-arg": true,
"no-bitwise": true,
"no-console": [
true,
"debug",
"info",
"time",
"timeEnd",
"trace"
],
"no-construct": true,
"no-debugger": true,
"no-duplicate-super": true,
"no-empty": false,
"no-empty-interface": true,
"no-eval": true,
"no-inferrable-types": [
true,
"ignore-params"
],
"no-misused-new": true,
"no-non-null-assertion": true,
"no-shadowed-variable": true,
"no-string-literal": false,
"no-string-throw": true,
"no-switch-case-fall-through": true,
"no-trailing-whitespace": true,
"no-unnecessary-initializer": true,
"no-unused-expression": true,
"no-use-before-declare": true,
"no-var-keyword": true,
"object-literal-sort-keys": false,
"one-line": [
true,
"check-open-brace",
"check-catch",
"check-else",
"check-whitespace"
],
"prefer-const": true,
"quotemark": [
true,
"single"
],
"radix": true,
"semicolon": [
true,
"always"
],
"triple-equals": [
true,
"allow-null-check"
],
"typedef-whitespace": [
true,
{
"call-signature": "nospace",
"index-signature": "nospace",
"parameter": "nospace",
"property-declaration": "nospace",
"variable-declaration": "nospace"
}
],
"unified-signatures": true,
"variable-name": false,
"whitespace": [
true,
"check-branch",
"check-decl",
"check-operator",
"check-separator",
"check-type"
],
"no-output-on-prefix": true,
"no-inputs-metadata-property": true,
"no-outputs-metadata-property": true,
"no-host-metadata-property": true,
"no-input-rename": true,
"no-output-rename": true,
"use-lifecycle-interface": true,
"use-pipe-transform-interface": true,
"component-class-suffix": true,
"directive-class-suffix": true
}
}
================================================
FILE: Chapter_02/HealthCheck/ClientApp/update-npm.bat
================================================
cd %~dp0
npm update
================================================
FILE: Chapter_02/HealthCheck/HealthCheck.csproj
================================================
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework>
<TypeScriptCompileBlocked>true</TypeScriptCompileBlocked>
<TypeScriptToolsVersion>Latest</TypeScriptToolsVersion>
<IsPackable>false</IsPackable>
<SpaRoot>ClientApp\</SpaRoot>
<DefaultItemExcludes>$(DefaultItemExcludes);$(SpaRoot)node_modules\**</DefaultItemExcludes>
<!-- Set this to true if you enable server-side prerendering -->
<BuildServerSideRenderer>false</BuildServerSideRenderer>
<RootNamespace>HealthCheck</RootNamespace>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.SpaServices.Extensions" Version="3.1.1" />
</ItemGroup>
<ItemGroup>
<!-- Don't publish the SPA source files, but do show them in the project files list -->
<Content Remove="$(SpaRoot)**" />
<None Remove="$(SpaRoot)**" />
<None Include="$(SpaRoot)**" Exclude="$(SpaRoot)node_modules\**" />
</ItemGroup>
<ItemGroup>
<Folder Include="Controllers\" />
</ItemGroup>
<Target Name="DebugEnsureNodeEnv" BeforeTargets="Build" Condition=" '$(Configuration)' == 'Debug' And !Exists('$(SpaRoot)node_modules') ">
<!-- Ensure Node.js is installed -->
<Exec Command="node --version" ContinueOnError="true">
<Output TaskParameter="ExitCode" PropertyName="ErrorCode" />
</Exec>
<Error Condition="'$(ErrorCode)' != '0'" Text="Node.js is required to build and run this project. To continue, please install Node.js from https://nodejs.org/, and then restart your command prompt or IDE." />
<Message Importance="high" Text="Restoring dependencies using 'npm'. This may take several minutes..." />
<Exec WorkingDirectory="$(SpaRoot)" Command="npm install" />
</Target>
<Target Name="PublishRunWebpack" AfterTargets="ComputeFilesToPublish">
<!-- As part of publishing, ensure the JS resources are freshly built in production mode -->
<Exec WorkingDirectory="$(SpaRoot)" Command="npm install" />
<Exec WorkingDirectory="$(SpaRoot)" Command="npm run build -- --prod" />
<Exec WorkingDirectory="$(SpaRoot)" Command="npm run build:ssr -- --prod" Condition=" '$(BuildServerSideRenderer)' == 'true' " />
<!-- Include the newly-built files in the publish output -->
<ItemGroup>
<DistFiles Include="$(SpaRoot)dist\**; $(SpaRoot)dist-server\**" />
<DistFiles Include="$(SpaRoot)node_modules\**" Condition="'$(BuildServerSideRenderer)' == 'true'" />
<ResolvedFileToPublish Include="@(DistFiles->'%(FullPath)')" Exclude="@(ResolvedFileToPublish)">
<RelativePath>%(DistFiles.Identity)</RelativePath>
<CopyToPublishDirectory>PreserveNewest</CopyToPublishDirectory>
</ResolvedFileToPublish>
</ItemGroup>
</Target>
</Project>
================================================
FILE: Chapter_02/HealthCheck/Pages/Error.cshtml
================================================
@page
@model ErrorModel
@{
ViewData["Title"] = "Error";
}
<h1 class="text-danger">Error.</h1>
<h2 class="text-danger">An error occurred while processing your request.</h2>
@if (Model.ShowRequestId)
{
<p>
<strong>Request ID:</strong> <code>@Model.RequestId</code>
</p>
}
<h3>Development Mode</h3>
<p>
Swapping to the <strong>Development</strong> environment displays detailed information about the error that occurred.
</p>
<p>
<strong>The Development environment shouldn't be enabled for deployed applications.</strong>
It can result in displaying sensitive information from exceptions to end users.
For local debugging, enable the <strong>Development</strong> environment by setting the <strong>ASPNETCORE_ENVIRONMENT</strong> environment variable to <strong>Development</strong>
and restarting the app.
</p>
================================================
FILE: Chapter_02/HealthCheck/Pages/Error.cshtml.cs
================================================
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.RazorPages;
using Microsoft.Extensions.Logging;
namespace HealthCheck.Pages
{
[ResponseCache(Duration = 0, Location = ResponseCacheLocation.None, NoStore = true)]
public class ErrorModel : PageModel
{
private readonly ILogger<ErrorModel> _logger;
public ErrorModel(ILogger<ErrorModel> logger)
{
_logger = logger;
}
public string RequestId { get; set; }
public bool ShowRequestId => !string.IsNullOrEmpty(RequestId);
public void OnGet()
{
RequestId = Activity.Current?.Id ?? HttpContext.TraceIdentifier;
}
}
}
================================================
FILE: Chapter_02/HealthCheck/Pages/_ViewImports.cshtml
================================================
@using HealthCheck
@namespace HealthCheck.Pages
@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers
================================================
FILE: Chapter_02/HealthCheck/Program.cs
================================================
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore;
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.Logging;
namespace HealthCheck
{
public class Program
{
public static void Main(string[] args)
{
CreateWebHostBuilder(args).Build().Run();
}
public static IWebHostBuilder CreateWebHostBuilder(string[] args) =>
WebHost.CreateDefaultBuilder(args)
.UseStartup<Startup>();
}
}
================================================
FILE: Chapter_02/HealthCheck/Startup.cs
================================================
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.HttpsPolicy;
using Microsoft.AspNetCore.SpaServices.AngularCli;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
namespace HealthCheck
{
public class Startup
{
public Startup(IConfiguration configuration)
{
Configuration = configuration;
}
public IConfiguration Configuration { get; }
// This method gets called by the runtime. Use this method to add services to the container.
public void ConfigureServices(IServiceCollection services)
{
services.AddControllersWithViews();
// In production, the Angular files will be served from this directory
services.AddSpaStaticFiles(configuration =>
{
configuration.RootPath = "ClientApp/dist";
});
}
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
{
if (env.IsDevelopment())
{
app.UseDeveloperExceptionPage();
}
else
{
app.UseExceptionHandler("/Error");
// The default HSTS value is 30 days. You may want to change this for production scenarios, see https://aka.ms/aspnetcore-hsts.
app.UseHsts();
}
app.UseHttpsRedirection();
app.UseStaticFiles(new StaticFileOptions()
{
OnPrepareResponse = (context) =>
{
// Retrieve cache configuration from appsettings.json
context.Context.Response.Headers["Cache-Control"] =
Configuration["StaticFiles:Headers:Cache-Control"];
context.Context.Response.Headers["Pragma"] =
Configuration["StaticFiles:Headers:Pragma"];
context.Context.Response.Headers["Expires"] =
Configuration["StaticFiles:Headers:Expires"];
}
});
if (!env.IsDevelopment())
{
app.UseSpaStaticFiles();
}
app.UseRouting();
app.UseEndpoints(endpoints =>
{
endpoints.MapControllerRoute(
name: "default",
pattern: "{controller}/{action=Index}/{id?}");
});
app.UseSpa(spa =>
{
// To learn more about options for serving an Angular SPA from ASP.NET Core,
// see https://go.microsoft.com/fwlink/?linkid=864501
spa.Options.SourcePath = "ClientApp";
if (env.IsDevelopment())
{
spa.UseAngularCliServer(npmScript: "start");
}
});
}
}
}
================================================
FILE: Chapter_02/HealthCheck/appsettings.Development.json
================================================
{
"Logging": {
"LogLevel": {
"Default": "Debug",
"System": "Information",
"Microsoft": "Information"
}
},
"StaticFiles": {
"Headers": {
"Cache-Control": "no-cache, no-store",
"Pragma": "no-cache",
"Expires": "-1"
}
}
}
================================================
FILE: Chapter_02/HealthCheck/appsettings.json
================================================
{
"Logging": {
"LogLevel": {
"Default": "Warning"
}
},
"AllowedHosts": "*",
"StaticFiles": {
"Headers": {
"Cache-Control": "max-age=3600",
"Pragma": "cache",
"Expires": null
}
}
}
================================================
FILE: Chapter_02/HealthCheck/libman.json
================================================
{
"version": "1.0",
"defaultProvider": "cdnjs",
"libraries": []
}
================================================
FILE: Chapter_02/HealthCheck/wwwroot/test.html
================================================
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>Time for a test!</title>
</head>
<body>
Hello there!
<br /><br />
This is a test to see if the StaticFiles middleware is working properly.
<br /><br />
What about the client-side cache? Does it work or not?
<br /><br />
It seems like we can configure it: we disabled it during development,
and enabled it in production!
</body>
</html>
================================================
FILE: Chapter_02.sln
================================================
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.29209.62
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "HealthCheck", "Chapter_02\HealthCheck\HealthCheck.csproj", "{5DC82B04-93AA-4B83-AE82-759A0E21DFF5}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{5DC82B04-93AA-4B83-AE82-759A0E21DFF5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{5DC82B04-93AA-4B83-AE82-759A0E21DFF5}.Debug|Any CPU.Build.0 = Debug|Any CPU
{5DC82B04-93AA-4B83-AE82-759A0E21DFF5}.Release|Any CPU.ActiveCfg = Release|Any CPU
{5DC82B04-93AA-4B83-AE82-759A0E21DFF5}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {F0EE0686-783C-472C-8B14-22385361AEE1}
EndGlobalSection
EndGlobal
================================================
FILE: Chapter_03/HealthCheck/.gitignore
================================================
## Ignore Visual Studio temporary files, build results, and
## files generated by popular Visual Studio add-ons.
# User-specific files
*.suo
*.user
*.userosscache
*.sln.docstates
# User-specific files (MonoDevelop/Xamarin Studio)
*.userprefs
# Build results
[Dd]ebug/
[Dd]ebugPublic/
[Rr]elease/
[Rr]eleases/
x64/
x86/
build/
bld/
bin/
Bin/
obj/
Obj/
# Visual Studio 2015 cache/options directory
.vs/
# MSTest test Results
[Tt]est[Rr]esult*/
[Bb]uild[Ll]og.*
# NUNIT
*.VisualState.xml
TestResult.xml
# Build Results of an ATL Project
[Dd]ebugPS/
[Rr]eleasePS/
dlldata.c
*_i.c
*_p.c
*_i.h
*.ilk
*.meta
*.obj
*.pch
*.pdb
*.pgc
*.pgd
*.rsp
*.sbr
*.tlb
*.tli
*.tlh
*.tmp
*.tmp_proj
*.log
*.vspscc
*.vssscc
.builds
*.pidb
*.svclog
*.scc
# Chutzpah Test files
_Chutzpah*
# Visual C++ cache files
ipch/
*.aps
*.ncb
*.opendb
*.opensdf
*.sdf
*.cachefile
# Visual Studio profiler
*.psess
*.vsp
*.vspx
*.sap
# TFS 2012 Local Workspace
$tf/
# Guidance Automation Toolkit
*.gpState
# ReSharper is a .NET coding add-in
_ReSharper*/
*.[Rr]e[Ss]harper
*.DotSettings.user
# JustCode is a .NET coding add-in
.JustCode
# TeamCity is a build add-in
_TeamCity*
# DotCover is a Code Coverage Tool
*.dotCover
# NCrunch
_NCrunch_*
.*crunch*.local.xml
nCrunchTemp_*
# MightyMoose
*.mm.*
AutoTest.Net/
# Web workbench (sass)
.sass-cache/
# Installshield output folder
[Ee]xpress/
# DocProject is a documentation generator add-in
DocProject/buildhelp/
DocProject/Help/*.HxT
DocProject/Help/*.HxC
DocProject/Help/*.hhc
DocProject/Help/*.hhk
DocProject/Help/*.hhp
DocProject/Help/Html2
DocProject/Help/html
# Click-Once directory
publish/
# Publish Web Output
*.[Pp]ublish.xml
*.azurePubxml
# TODO: Comment the next line if you want to checkin your web deploy settings
# but database connection strings (with potential passwords) will be unencrypted
*.pubxml
*.publishproj
# NuGet Packages
*.nupkg
# The packages folder can be ignored because of Package Restore
**/packages/*
# except build/, which is used as an MSBuild target.
!**/packages/build/
# Uncomment if necessary however generally it will be regenerated when needed
#!**/packages/repositories.config
# Microsoft Azure Build Output
csx/
*.build.csdef
# Microsoft Azure Emulator
ecf/
rcf/
# Microsoft Azure ApplicationInsights config file
ApplicationInsights.config
# Windows Store app package directory
AppPackages/
BundleArtifacts/
# Visual Studio cache files
# files ending in .cache can be ignored
*.[Cc]ache
# but keep track of directories ending in .cache
!*.[Cc]ache/
# Others
ClientBin/
~$*
*~
*.dbmdl
*.dbproj.schemaview
*.pfx
*.publishsettings
orleans.codegen.cs
/node_modules
# RIA/Silverlight projects
Generated_Code/
# Backup & report files from converting an old project file
# to a newer Visual Studio version. Backup files are not needed,
# because we have git ;-)
_UpgradeReport_Files/
Backup*/
UpgradeLog*.XML
UpgradeLog*.htm
# SQL Server files
*.mdf
*.ldf
# Business Intelligence projects
*.rdl.data
*.bim.layout
*.bim_*.settings
# Microsoft Fakes
FakesAssemblies/
# GhostDoc plugin setting file
*.GhostDoc.xml
# Node.js Tools for Visual Studio
.ntvs_analysis.dat
# Visual Studio 6 build log
*.plg
# Visual Studio 6 workspace options file
*.opt
# Visual Studio LightSwitch build output
**/*.HTMLClient/GeneratedArtifacts
**/*.DesktopClient/GeneratedArtifacts
**/*.DesktopClient/ModelManifest.xml
**/*.Server/GeneratedArtifacts
**/*.Server/ModelManifest.xml
_Pvt_Extensions
# Paket dependency manager
.paket/paket.exe
# FAKE - F# Make
.fake/
================================================
FILE: Chapter_03/HealthCheck/ClientApp/.editorconfig
================================================
# Editor configuration, see http://editorconfig.org
root = true
[*]
charset = utf-8
indent_style = space
indent_size = 2
insert_final_newline = true
trim_trailing_whitespace = true
[*.md]
max_line_length = off
trim_trailing_whitespace = false
================================================
FILE: Chapter_03/HealthCheck/ClientApp/.gitignore
================================================
# See http://help.github.com/ignore-files/ for more about ignoring files.
# compiled output
/dist
/dist-server
/tmp
/out-tsc
# dependencies
/node_modules
# IDEs and editors
/.idea
.project
.classpath
.c9/
*.launch
.settings/
*.sublime-workspace
# IDE - VSCode
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json
# misc
/.sass-cache
/connect.lock
/coverage
/libpeerconnection.log
npm-debug.log
yarn-error.log
testem.log
/typings
# System Files
.DS_Store
Thumbs.db
================================================
FILE: Chapter_03/HealthCheck/ClientApp/README.md
================================================
# HealthCheck
This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 6.0.0.
## Development server
Run `ng serve` for a dev server. Navigate to `http://localhost:4200/`. The app will automatically reload if you change any of the source files.
## Code scaffolding
Run `ng generate component component-name` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module`.
## Build
Run `ng build` to build the project. The build artifacts will be stored in the `dist/` directory. Use the `--prod` flag for a production build.
## Running unit tests
Run `ng test` to execute the unit tests via [Karma](https://karma-runner.github.io).
## Running end-to-end tests
Run `ng e2e` to execute the end-to-end tests via [Protractor](http://www.protractortest.org/).
## Further help
To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI README](https://github.com/angular/angular-cli/blob/master/README.md).
================================================
FILE: Chapter_03/HealthCheck/ClientApp/angular.json
================================================
{
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
"version": 1,
"newProjectRoot": "projects",
"projects": {
"HealthCheck": {
"root": "",
"sourceRoot": "src",
"projectType": "application",
"prefix": "app",
"schematics": {},
"architect": {
"build": {
"builder": "@angular-devkit/build-angular:browser",
"options": {
"progress": true,
"extractCss": true,
"outputPath": "dist",
"index": "src/index.html",
"main": "src/main.ts",
"polyfills": "src/polyfills.ts",
"tsConfig": "src/tsconfig.app.json",
"assets": ["src/assets"],
"styles": [
"node_modules/bootstrap/dist/css/bootstrap.min.css",
"src/styles.css"
],
"scripts": []
},
"configurations": {
"production": {
"fileReplacements": [
{
"replace": "src/environments/environment.ts",
"with": "src/environments/environment.prod.ts"
}
],
"optimization": true,
"outputHashing": "all",
"sourceMap": false,
"extractCss": true,
"namedChunks": false,
"aot": true,
"extractLicenses": true,
"vendorChunk": false,
"buildOptimizer": true
}
}
},
"serve": {
"builder": "@angular-devkit/build-angular:dev-server",
"options": {
"browserTarget": "HealthCheck:build"
},
"configurations": {
"production": {
"browserTarget": "HealthCheck:build:production"
}
}
},
"extract-i18n": {
"builder": "@angular-devkit/build-angular:extract-i18n",
"options": {
"browserTarget": "HealthCheck:build"
}
},
"test": {
"builder": "@angular-devkit/build-angular:karma",
"options": {
"main": "src/test.ts",
"polyfills": "src/polyfills.ts",
"tsConfig": "src/tsconfig.spec.json",
"karmaConfig": "src/karma.conf.js",
"styles": [ "src/styles.css" ],
"scripts": [],
"assets": ["src/assets"]
}
},
"lint": {
"builder": "@angular-devkit/build-angular:tslint",
"options": {
"tsConfig": ["src/tsconfig.app.json", "src/tsconfig.spec.json"],
"exclude": ["**/node_modules/**"]
}
},
"server": {
"builder": "@angular-devkit/build-angular:server",
"options": {
"outputPath": "dist-server",
"main": "src/main.ts",
"tsConfig": "src/tsconfig.server.json"
},
"configurations": {
"dev": {
"optimization": true,
"outputHashing": "all",
"sourceMap": false,
"namedChunks": false,
"extractLicenses": true,
"vendorChunk": true
},
"production": {
"optimization": true,
"outputHashing": "all",
"sourceMap": false,
"namedChunks": false,
"extractLicenses": true,
"vendorChunk": false
}
}
}
}
},
"HealthCheck-e2e": {
"root": "e2e/",
"projectType": "application",
"architect": {
"e2e": {
"builder": "@angular-devkit/build-angular:protractor",
"options": {
"protractorConfig": "e2e/protractor.conf.js",
"devServerTarget": "HealthCheck:serve"
}
},
"lint": {
"builder": "@angular-devkit/build-angular:tslint",
"options": {
"tsConfig": "e2e/tsconfig.e2e.json",
"exclude": ["**/node_modules/**"]
}
}
}
}
},
"defaultProject": "HealthCheck"
}
================================================
FILE: Chapter_03/HealthCheck/ClientApp/browserslist
================================================
# This file is currently used by autoprefixer to adjust CSS to support the below specified browsers
# For additional information regarding the format and rule options, please see:
# https://github.com/browserslist/browserslist#queries
# For IE 9-11 support, please uncomment the last line of the file and adjust as needed
> 0.5%
last 2 versions
Firefox ESR
not dead
# IE 9-11
================================================
FILE: Chapter_03/HealthCheck/ClientApp/e2e/protractor.conf.js
================================================
// Protractor configuration file, see link for more information
// https://github.com/angular/protractor/blob/master/lib/config.ts
const { SpecReporter } = require("jasmine-spec-reporter");
exports.config = {
allScriptsTimeout: 11000,
specs: ["./src/**/*.e2e-spec.ts"],
capabilities: {
browserName: "chrome"
},
directConnect: true,
baseUrl: "http://localhost:4200/",
framework: "jasmine",
jasmineNodeOpts: {
showColors: true,
defaultTimeoutInterval: 30000,
print: function() {}
},
onPrepare() {
require("ts-node").register({
project: require("path").join(__dirname, "./tsconfig.e2e.json")
});
jasmine
.getEnv()
.addReporter(new SpecReporter({ spec: { displayStacktrace: true } }));
}
};
================================================
FILE: Chapter_03/HealthCheck/ClientApp/e2e/src/app.e2e-spec.ts
================================================
import { AppPage } from './app.po';
describe('App', () => {
let page: AppPage;
beforeEach(() => {
page = new AppPage();
});
it('should display welcome message', () => {
page.navigateTo();
expect(page.getMainHeading()).toEqual('Hello, world!');
});
});
================================================
FILE: Chapter_03/HealthCheck/ClientApp/e2e/src/app.po.ts
================================================
import { browser, by, element } from 'protractor';
export class AppPage {
navigateTo() {
return browser.get('/');
}
getMainHeading() {
return element(by.css('app-root h1')).getText();
}
}
================================================
FILE: Chapter_03/HealthCheck/ClientApp/e2e/tsconfig.e2e.json
================================================
{
"extends": "../tsconfig.json",
"compilerOptions": {
"outDir": "../out-tsc/app",
"module": "commonjs",
"target": "es5",
"types": [
"jasmine",
"jasminewd2",
"node"
]
}
}
================================================
FILE: Chapter_03/HealthCheck/ClientApp/package.json
================================================
{
"name": "healthcheck",
"version": "0.0.0",
"scripts": {
"ng": "ng",
"start": "echo Starting... && ng serve",
"build": "ng build",
"build:ssr": "ng run HealthCheck:server:dev",
"test": "ng test",
"lint": "ng lint",
"e2e": "ng e2e"
},
"private": true,
"dependencies": {
"@angular/animations": "9.0.0",
"@angular/common": "9.0.0",
"@angular/compiler": "9.0.0",
"@angular/core": "9.0.0",
"@angular/forms": "9.0.0",
"@angular/platform-browser": "9.0.0",
"@angular/platform-browser-dynamic": "9.0.0",
"@angular/platform-server": "9.0.0",
"@angular/router": "9.0.0",
"@nguniversal/module-map-ngfactory-loader": "9.0.0-next.9",
"aspnet-prerendering": "3.0.1",
"bootstrap": "4.4.1",
"core-js": "3.6.1",
"jquery": "3.5.1",
"oidc-client": "1.9.1",
"popper.js": "1.16.0",
"rxjs": "6.5.4",
"zone.js": "0.10.2"
},
"devDependencies": {
"@angular-devkit/build-angular": "0.900.0",
"@angular/cli": "9.0.0",
"@angular/compiler-cli": "9.0.0",
"@angular/language-service": "9.0.0",
"@types/jasmine": "3.5.0",
"@types/jasminewd2": "2.0.8",
"@types/node": "13.1.1",
"codelyzer": "5.2.1",
"jasmine-core": "3.5.0",
"jasmine-spec-reporter": "4.2.1",
"karma": "4.4.1",
"karma-chrome-launcher": "3.1.0",
"karma-coverage-istanbul-reporter": "2.1.1",
"karma-jasmine": "2.0.1",
"karma-jasmine-html-reporter": "1.5.1",
"typescript": "3.7.5"
},
"optionalDependencies": {
"node-sass": "4.13.0",
"protractor": "5.4.2",
"ts-node": "5.0.1",
"tslint": "5.20.1"
}
}
================================================
FILE: Chapter_03/HealthCheck/ClientApp/src/app/app.component.html
================================================
<body>
<app-nav-menu></app-nav-menu>
<div class="container">
<router-outlet></router-outlet>
</div>
</body>
================================================
FILE: Chapter_03/HealthCheck/ClientApp/src/app/app.component.ts
================================================
import { Component } from '@angular/core';
@Component({
selector: 'app-root',
templateUrl: './app.component.html'
})
export class AppComponent {
title = 'app';
}
================================================
FILE: Chapter_03/HealthCheck/ClientApp/src/app/app.module.ts
================================================
import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import { FormsModule } from '@angular/forms';
import { HttpClientModule, HTTP_INTERCEPTORS } from '@angular/common/http';
import { RouterModule } from '@angular/router';
import { AppComponent } from './app.component';
import { NavMenuComponent } from './nav-menu/nav-menu.component';
import { HomeComponent } from './home/home.component';
import { HealthCheckComponent } from './health-check/health-check.component';
@NgModule({
declarations: [
AppComponent,
NavMenuComponent,
HomeComponent,
HealthCheckComponent
],
imports: [
BrowserModule.withServerTransition({ appId: 'ng-cli-universal' }),
HttpClientModule,
FormsModule,
RouterModule.forRoot([
{ path: '', component: HomeComponent, pathMatch: 'full' },
{ path: 'health-check', component: HealthCheckComponent }
])
],
providers: [],
bootstrap: [AppComponent]
})
export class AppModule { }
================================================
FILE: Chapter_03/HealthCheck/ClientApp/src/app/app.server.module.ts
================================================
import { NgModule } from '@angular/core';
import { ServerModule } from '@angular/platform-server';
import { ModuleMapLoaderModule } from '@nguniversal/module-map-ngfactory-loader';
import { AppComponent } from './app.component';
import { AppModule } from './app.module';
@NgModule({
imports: [AppModule, ServerModule, ModuleMapLoaderModule],
bootstrap: [AppComponent]
})
export class AppServerModule { }
================================================
FILE: Chapter_03/HealthCheck/ClientApp/src/app/health-check/health-check.component.css
================================================
.status {
font-weight: bold;
}
.Healthy {
color: green;
}
.Degraded {
color: orange;
}
.Unhealthy {
color: red;
}
================================================
FILE: Chapter_03/HealthCheck/ClientApp/src/app/health-check/health-check.component.html
================================================
<h1>Health Check</h1>
<p>Here are the results of our health check:</p>
<p *ngIf="!result"><em>Loading...</em></p>
<table class='table table-striped' aria-labelledby="tableLabel" *ngIf="result">
<thead>
<tr>
<th>Name</th>
<th>Response Time</th>
<th>Status</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr *ngFor="let check of result.checks">
<td>{{ check.name }}</td>
<td>{{ check.responseTime }}</td>
<td class="status {{ check.status }}">{{ check.status }}</td>
<td>{{ check.description }}</td>
</tr>
</tbody>
</table>
================================================
FILE: Chapter_03/HealthCheck/ClientApp/src/app/health-check/health-check.component.ts
================================================
import { Component, Inject } from '@angular/core';
import { HttpClient } from '@angular/common/http';
@Component({
selector: 'app-health-check',
templateUrl: './health-check.component.html',
styleUrls: ['./health-check.component.css']
})
export class HealthCheckComponent {
public result: Result;
constructor(
private http: HttpClient,
@Inject('BASE_URL') private baseUrl: string) {
}
ngOnInit() {
this.http.get<Result>(this.baseUrl + 'hc').subscribe(result => {
this.result = result;
}, error => console.error(error));
}
}
interface Result {
checks: Check[];
totalStatus: string;
totalResponseTime: number;
}
interface Check {
name: string;
status: string;
responseTime: number;
}
================================================
FILE: Chapter_03/HealthCheck/ClientApp/src/app/home/home.component.html
================================================
<h1>Hello, world!</h1>
<p>Welcome to your new single-page application, built with:</p>
<ul>
<li><a href='https://get.asp.net/'>ASP.NET Core</a> and <a href='https://msdn.microsoft.com/en-us/library/67ef8sbd.aspx'>C#</a> for cross-platform server-side code</li>
<li><a href='https://angular.io/'>Angular</a> and <a href='http://www.typescriptlang.org/'>TypeScript</a> for client-side code</li>
<li><a href='http://getbootstrap.com/'>Bootstrap</a> for layout and styling</li>
</ul>
<p>To help you get started, we've also set up:</p>
<ul>
<li><strong>Client-side navigation</strong>. For example, click <em>Counter</em> then <em>Back</em> to return here.</li>
<li><strong>Angular CLI integration</strong>. In development mode, there's no need to run <code>ng serve</code>. It runs in the background automatically, so your client-side resources are dynamically built on demand and the page refreshes when you modify any file.</li>
<li><strong>Efficient production builds</strong>. In production mode, development-time features are disabled, and your <code>dotnet publish</code> configuration automatically invokes <code>ng build</code> to produce minified, ahead-of-time compiled JavaScript files.</li>
</ul>
<p>The <code>ClientApp</code> subdirectory is a standard Angular CLI application. If you open a command prompt in that directory, you can run any <code>ng</code> command (e.g., <code>ng test</code>), or use <code>npm</code> to install extra packages into it.</p>
================================================
FILE: Chapter_03/HealthCheck/ClientApp/src/app/home/home.component.ts
================================================
import { Component } from '@angular/core';
@Component({
selector: 'app-home',
templateUrl: './home.component.html',
})
export class HomeComponent {
}
================================================
FILE: Chapter_03/HealthCheck/ClientApp/src/app/nav-menu/nav-menu.component.css
================================================
a.navbar-brand {
white-space: normal;
text-align: center;
word-break: break-all;
}
html {
font-size: 14px;
}
@media (min-width: 768px) {
html {
font-size: 16px;
}
}
.box-shadow {
box-shadow: 0 .25rem .75rem rgba(0, 0, 0, .05);
}
================================================
FILE: Chapter_03/HealthCheck/ClientApp/src/app/nav-menu/nav-menu.component.html
================================================
<header>
<nav
class="navbar navbar-expand-sm navbar-toggleable-sm navbar-light bg-white border-bottom box-shadow mb-3"
>
<div class="container">
<a class="navbar-brand" [routerLink]="['/']">HealthCheck</a>
<button
class="navbar-toggler"
type="button"
data-toggle="collapse"
data-target=".navbar-collapse"
aria-label="Toggle navigation"
[attr.aria-expanded]="isExpanded"
(click)="toggle()"
>
<span class="navbar-toggler-icon"></span>
</button>
<div
class="navbar-collapse collapse d-sm-inline-flex flex-sm-row-reverse"
[ngClass]="{ show: isExpanded }"
>
<ul class="navbar-nav flex-grow">
<li
class="nav-item"
[routerLinkActive]="['link-active']"
[routerLinkActiveOptions]="{ exact: true }"
>
<a class="nav-link text-dark" [routerLink]="['/']">Home</a>
</li>
<li class="nav-item" [routerLinkActive]="['link-active']">
<a class="nav-link text-dark" [routerLink]="['/health-check']"
>Health Check</a
>
</li>
</ul>
</div>
</div>
</nav>
</header>
================================================
FILE: Chapter_03/HealthCheck/ClientApp/src/app/nav-menu/nav-menu.component.ts
================================================
import { Component } from '@angular/core';
@Component({
selector: 'app-nav-menu',
templateUrl: './nav-menu.component.html',
styleUrls: ['./nav-menu.component.css']
})
export class NavMenuComponent {
isExpanded = false;
collapse() {
this.isExpanded = false;
}
toggle() {
this.isExpanded = !this.isExpanded;
}
}
================================================
FILE: Chapter_03/HealthCheck/ClientApp/src/assets/.gitkeep
================================================
================================================
FILE: Chapter_03/HealthCheck/ClientApp/src/environments/environment.prod.ts
================================================
export const environment = {
production: true
};
================================================
FILE: Chapter_03/HealthCheck/ClientApp/src/environments/environment.ts
================================================
// This file can be replaced during build by using the `fileReplacements` array.
// `ng build ---prod` replaces `environment.ts` with `environment.prod.ts`.
// The list of file replacements can be found in `angular.json`.
export const environment = {
production: false
};
/*
* In development mode, to ignore zone related error stack frames such as
* `zone.run`, `zoneDelegate.invokeTask` for easier debugging, you can
* import the following file, but please comment it out in production mode
* because it will have performance impact when throw error
*/
// import 'zone.js/dist/zone-error'; // Included with Angular CLI.
================================================
FILE: Chapter_03/HealthCheck/ClientApp/src/index.html
================================================
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>HealthCheck</title>
<base href="/" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link rel="icon" type="image/x-icon" href="favicon.ico" />
</head>
<body>
<app-root>Loading...</app-root>
</body>
</html>
================================================
FILE: Chapter_03/HealthCheck/ClientApp/src/karma.conf.js
================================================
// Karma configuration file, see link for more information
// https://karma-runner.github.io/1.0/config/configuration-file.html
module.exports = function (config) {
config.set({
basePath: '',
frameworks: ['jasmine', '@angular-devkit/build-angular'],
plugins: [
require('karma-jasmine'),
require('karma-chrome-launcher'),
require('karma-jasmine-html-reporter'),
require('karma-coverage-istanbul-reporter'),
require('@angular-devkit/build-angular/plugins/karma')
],
client: {
clearContext: false // leave Jasmine Spec Runner output visible in browser
},
coverageIstanbulReporter: {
dir: require('path').join(__dirname, '../coverage'),
reports: ['html', 'lcovonly'],
fixWebpackSourcePaths: true
},
reporters: ['progress', 'kjhtml'],
port: 9876,
colors: true,
logLevel: config.LOG_INFO,
autoWatch: true,
browsers: ['Chrome'],
singleRun: false
});
};
================================================
FILE: Chapter_03/HealthCheck/ClientApp/src/main.ts
================================================
import { enableProdMode } from '@angular/core';
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
import { AppModule } from './app/app.module';
import { environment } from './environments/environment';
export function getBaseUrl() {
return document.getElementsByTagName('base')[0].href;
}
const providers = [
{ provide: 'BASE_URL', useFactory: getBaseUrl, deps: [] }
];
if (environment.production) {
enableProdMode();
}
platformBrowserDynamic(providers).bootstrapModule(AppModule)
.catch(err => console.error(err));
================================================
FILE: Chapter_03/HealthCheck/ClientApp/src/polyfills.ts
================================================
/**
* This file includes polyfills needed by Angular and is loaded before the app.
* You can add your own extra polyfills to this file.
*
* This file is divided into 2 sections:
* 1. Browser polyfills. These are applied before loading ZoneJS and are sorted by browsers.
* 2. Application imports. Files imported after ZoneJS that should be loaded before your main
* file.
*
* The current setup is for so-called "evergreen" browsers; the last versions of browsers that
* automatically update themselves. This includes Safari >= 10, Chrome >= 55 (including Opera),
* Edge >= 13 on the desktop, and iOS 10 and Chrome on mobile.
*
* Learn more in https://angular.io/guide/browser-support
*/
/***************************************************************************************************
* BROWSER POLYFILLS
*/
/** IE10 and IE11 requires the following for NgClass support on SVG elements */
// import 'classlist.js'; // Run `npm install --save classlist.js`.
/**
* Web Animations `@angular/platform-browser/animations`
* Only required if AnimationBuilder is used within the application and using IE/Edge or Safari.
* Standard animation support in Angular DOES NOT require any polyfills (as of Angular 6.0).
*/
// import 'web-animations-js'; // Run `npm install --save web-animations-js`.
/**
* By default, zone.js will patch all possible macroTask and DomEvents
* user can disable parts of macroTask/DomEvents patch by setting following flags
* because those flags need to be set before `zone.js` being loaded, and webpack
* will put import in the top of bundle, so user need to create a separate file
* in this directory (for example: zone-flags.ts), and put the following flags
* into that file, and then add the following code before importing zone.js.
* import './zone-flags.ts';
*
* The flags allowed in zone-flags.ts are listed here.
*
* The following flags will work for all browsers.
*
* (window as any).__Zone_disable_requestAnimationFrame = true; // disable patch requestAnimationFrame
* (window as any).__Zone_disable_on_property = true; // disable patch onProperty such as onclick
* (window as any).__zone_symbol__UNPATCHED_EVENTS = ['scroll', 'mousemove']; // disable patch specified eventNames
*
* in IE/Edge developer tools, the addEventListener will also be wrapped by zone.js
* with the following flag, it will bypass `zone.js` patch for IE/Edge
*
* (window as any).__Zone_enable_cross_context_check = true;
*
*/
/***************************************************************************************************
* Zone JS is required by default for Angular itself.
*/
import 'zone.js/dist/zone'; // Included with Angular CLI.
/***************************************************************************************************
* APPLICATION IMPORTS
*/
================================================
FILE: Chapter_03/HealthCheck/ClientApp/src/styles.css
================================================
/* You can add global styles to this file, and also import other style files */
/* Provide sufficient contrast against white background */
a {
color: #0366d6;
}
code {
color: #e01a76;
}
.btn-primary {
color: #fff;
background-color: #1b6ec2;
border-color: #1861ac;
}
================================================
FILE: Chapter_03/HealthCheck/ClientApp/src/test.ts
================================================
// This file is required by karma.conf.js and loads recursively all the .spec and framework files
import 'zone.js/dist/zone-testing';
import { getTestBed } from '@angular/core/testing';
import {
BrowserDynamicTestingModule,
platformBrowserDynamicTesting
} from '@angular/platform-browser-dynamic/testing';
declare const require: any;
// First, initialize the Angular testing environment.
getTestBed().initTestEnvironment(
BrowserDynamicTestingModule,
platformBrowserDynamicTesting()
);
// Then we find all the tests.
const context = require.context('./', true, /\.spec\.ts$/);
// And load the modules.
context.keys().map(context);
================================================
FILE: Chapter_03/HealthCheck/ClientApp/src/tsconfig.app.json
================================================
{
"extends": "../tsconfig.json",
"compilerOptions": {
"outDir": "../out-tsc/app",
"types": []
},
"exclude": [
"src/test.ts",
"**/*.spec.ts"
]
}
================================================
FILE: Chapter_03/HealthCheck/ClientApp/src/tsconfig.server.json
================================================
{
"extends": "../tsconfig.json",
"compilerOptions": {
"module": "commonjs"
},
"angularCompilerOptions": {
"entryModule": "app/app.server.module#AppServerModule"
}
}
================================================
FILE: Chapter_03/HealthCheck/ClientApp/src/tsconfig.spec.json
================================================
{
"extends": "../tsconfig.json",
"compilerOptions": {
"outDir": "../out-tsc/spec",
"types": [
"jasmine",
"node"
]
},
"files": [
"test.ts",
"polyfills.ts"
],
"include": [
"**/*.spec.ts",
"**/*.d.ts"
]
}
================================================
FILE: Chapter_03/HealthCheck/ClientApp/src/tslint.json
================================================
{
"extends": "../tslint.json",
"rules": {
"directive-selector": [
true,
"attribute",
"app",
"camelCase"
],
"component-selector": [
true,
"element",
"app",
"kebab-case"
]
}
}
================================================
FILE: Chapter_03/HealthCheck/ClientApp/tsconfig.json
================================================
{
"compileOnSave": false,
"compilerOptions": {
"baseUrl": "./",
"module": "esnext",
"outDir": "./dist/out-tsc",
"sourceMap": true,
"declaration": false,
"moduleResolution": "node",
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"target": "es2015",
"typeRoots": [
"node_modules/@types"
],
"lib": [
"es2017",
"dom"
]
},
"angularCompilerOptions": {
"strictMetadataEmit": true
}
}
================================================
FILE: Chapter_03/HealthCheck/ClientApp/tslint.json
================================================
{
"rulesDirectory": [
"node_modules/codelyzer"
],
"rules": {
"arrow-return-shorthand": true,
"callable-types": true,
"class-name": true,
"comment-format": [
true,
"check-space"
],
"curly": true,
"deprecation": {
"severity": "warn"
},
"eofline": true,
"forin": true,
"import-blacklist": [
true,
"rxjs/Rx"
],
"import-spacing": true,
"indent": [
true,
"spaces"
],
"interface-over-type-literal": true,
"label-position": true,
"max-line-length": [
true,
140
],
"member-access": false,
"member-ordering": [
true,
{
"order": [
"static-field",
"instance-field",
"static-method",
"instance-method"
]
}
],
"no-arg": true,
"no-bitwise": true,
"no-console": [
true,
"debug",
"info",
"time",
"timeEnd",
"trace"
],
"no-construct": true,
"no-debugger": true,
"no-duplicate-super": true,
"no-empty": false,
"no-empty-interface": true,
"no-eval": true,
"no-inferrable-types": [
true,
"ignore-params"
],
"no-misused-new": true,
"no-non-null-assertion": true,
"no-shadowed-variable": true,
"no-string-literal": false,
"no-string-throw": true,
"no-switch-case-fall-through": true,
"no-trailing-whitespace": true,
"no-unnecessary-initializer": true,
"no-unused-expression": true,
"no-use-before-declare": true,
"no-var-keyword": true,
"object-literal-sort-keys": false,
"one-line": [
true,
"check-open-brace",
"check-catch",
"check-else",
"check-whitespace"
],
"prefer-const": true,
"quotemark": [
true,
"single"
],
"radix": true,
"semicolon": [
true,
"always"
],
"triple-equals": [
true,
"allow-null-check"
],
"typedef-whitespace": [
true,
{
"call-signature": "nospace",
"index-signature": "nospace",
"parameter": "nospace",
"property-declaration": "nospace",
"variable-declaration": "nospace"
}
],
"unified-signatures": true,
"variable-name": false,
"whitespace": [
true,
"check-branch",
"check-decl",
"check-operator",
"check-separator",
"check-type"
],
"no-output-on-prefix": true,
"no-inputs-metadata-property": true,
"no-outputs-metadata-property": true,
"no-host-metadata-property": true,
"no-input-rename": true,
"no-output-rename": true,
"use-lifecycle-interface": true,
"use-pipe-transform-interface": true,
"component-class-suffix": true,
"directive-class-suffix": true
}
}
================================================
FILE: Chapter_03/HealthCheck/ClientApp/update-npm.bat
================================================
cd %~dp0
npm update
================================================
FILE: Chapter_03/HealthCheck/CustomHealthCheckOptions.cs
================================================
using Microsoft.AspNetCore.Diagnostics.HealthChecks;
using Microsoft.AspNetCore.Http;
using System.Linq;
using System.Net.Mime;
using System.Text.Json;
namespace HealthCheck
{
public class CustomHealthCheckOptions : HealthCheckOptions
{
public CustomHealthCheckOptions() : base()
{
var jsonSerializerOptions = new JsonSerializerOptions()
{
WriteIndented = true
};
ResponseWriter = async (c, r) =>
{
c.Response.ContentType = MediaTypeNames.Application.Json;
c.Response.StatusCode = StatusCodes.Status200OK;
var result = JsonSerializer.Serialize(new
{
checks = r.Entries.Select(e => new
{
name = e.Key,
responseTime = e.Value.Duration.TotalMilliseconds,
status = e.Value.Status.ToString(),
description = e.Value.Description
}),
totalStatus = r.Status,
totalResponseTime = r.TotalDuration.TotalMilliseconds,
}, jsonSerializerOptions);
await c.Response.WriteAsync(result);
};
}
}
}
================================================
FILE: Chapter_03/HealthCheck/HealthCheck.csproj
================================================
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework>
<TypeScriptCompileBlocked>true</TypeScriptCompileBlocked>
<TypeScriptToolsVersion>Latest</TypeScriptToolsVersion>
<IsPackable>false</IsPackable>
<SpaRoot>ClientApp\</SpaRoot>
<DefaultItemExcludes>$(DefaultItemExcludes);$(SpaRoot)node_modules\**</DefaultItemExcludes>
<!-- Set this to true if you enable server-side prerendering -->
<BuildServerSideRenderer>false</BuildServerSideRenderer>
<RootNamespace>HealthCheck</RootNamespace>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.SpaServices.Extensions" Version="3.1.1" />
</ItemGroup>
<ItemGroup>
<!-- Don't publish the SPA source files, but do show them in the project files list -->
<Content Remove="$(SpaRoot)**" />
<None Remove="$(SpaRoot)**" />
<None Include="$(SpaRoot)**" Exclude="$(SpaRoot)node_modules\**" />
</ItemGroup>
<ItemGroup>
<Folder Include="Controllers\" />
</ItemGroup>
<Target Name="DebugEnsureNodeEnv" BeforeTargets="Build" Condition=" '$(Configuration)' == 'Debug' And !Exists('$(SpaRoot)node_modules') ">
<!-- Ensure Node.js is installed -->
<Exec Command="node --version" ContinueOnError="true">
<Output TaskParameter="ExitCode" PropertyName="ErrorCode" />
</Exec>
<Error Condition="'$(ErrorCode)' != '0'" Text="Node.js is required to build and run this project. To continue, please install Node.js from https://nodejs.org/, and then restart your command prompt or IDE." />
<Message Importance="high" Text="Restoring dependencies using 'npm'. This may take several minutes..." />
<Exec WorkingDirectory="$(SpaRoot)" Command="npm install" />
</Target>
<Target Name="PublishRunWebpack" AfterTargets="ComputeFilesToPublish">
<!-- As part of publishing, ensure the JS resources are freshly built in production mode -->
<Exec WorkingDirectory="$(SpaRoot)" Command="npm install" />
<Exec WorkingDirectory="$(SpaRoot)" Command="npm run build -- --prod" />
<Exec WorkingDirectory="$(SpaRoot)" Command="npm run build:ssr -- --prod" Condition=" '$(BuildServerSideRenderer)' == 'true' " />
<!-- Include the newly-built files in the publish output -->
<ItemGroup>
<DistFiles Include="$(SpaRoot)dist\**; $(SpaRoot)dist-server\**" />
<DistFiles Include="$(SpaRoot)node_modules\**" Condition="'$(BuildServerSideRenderer)' == 'true'" />
<ResolvedFileToPublish Include="@(DistFiles->'%(FullPath)')" Exclude="@(ResolvedFileToPublish)">
<RelativePath>%(DistFiles.Identity)</RelativePath>
<CopyToPublishDirectory>PreserveNewest</CopyToPublishDirectory>
</ResolvedFileToPublish>
</ItemGroup>
</Target>
</Project>
================================================
FILE: Chapter_03/HealthCheck/ICMPHealthCheck.cs
================================================
using Microsoft.Extensions.Diagnostics.HealthChecks;
using System;
using System.Net.NetworkInformation;
using System.Threading;
using System.Threading.Tasks;
namespace HealthCheck
{
public class ICMPHealthCheck : IHealthCheck
{
private string Host { get; set; }
private int Timeout { get; set; }
public ICMPHealthCheck(string host, int timeout)
{
Host = host;
Timeout = timeout;
}
public async Task<HealthCheckResult> CheckHealthAsync(
HealthCheckContext context,
CancellationToken cancellationToken = default)
{
try
{
using (var ping = new Ping())
{
var reply = await ping.SendPingAsync(Host);
switch (reply.Status)
{
case IPStatus.Success:
var msg = String.Format(
"IMCP to {0} took {1} ms.",
Host,
reply.RoundtripTime);
return (reply.RoundtripTime > Timeout)
? HealthCheckResult.Degraded(msg)
: HealthCheckResult.Healthy(msg);
default:
var err = String.Format(
"IMCP to {0} failed: {1}",
Host,
reply.Status);
return HealthCheckResult.Unhealthy(err);
}
}
}
catch (Exception e)
{
var err = String.Format(
"IMCP to {0} failed: {1}",
Host,
e.Message);
return HealthCheckResult.Unhealthy(err);
}
}
}
}
================================================
FILE: Chapter_03/HealthCheck/Pages/Error.cshtml
================================================
@page
@model ErrorModel
@{
ViewData["Title"] = "Error";
}
<h1 class="text-danger">Error.</h1>
<h2 class="text-danger">An error occurred while processing your request.</h2>
@if (Model.ShowRequestId)
{
<p>
<strong>Request ID:</strong> <code>@Model.RequestId</code>
</p>
}
<h3>Development Mode</h3>
<p>
Swapping to the <strong>Development</strong> environment displays detailed information about the error that occurred.
</p>
<p>
<strong>The Development environment shouldn't be enabled for deployed applications.</strong>
It can result in displaying sensitive information from exceptions to end users.
For local debugging, enable the <strong>Development</strong> environment by setting the <strong>ASPNETCORE_ENVIRONMENT</strong> environment variable to <strong>Development</strong>
and restarting the app.
</p>
================================================
FILE: Chapter_03/HealthCheck/Pages/Error.cshtml.cs
================================================
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.RazorPages;
using Microsoft.Extensions.Logging;
namespace HealthCheck.Pages
{
[ResponseCache(Duration = 0, Location = ResponseCacheLocation.None, NoStore = true)]
public class ErrorModel : PageModel
{
private readonly ILogger<ErrorModel> _logger;
public ErrorModel(ILogger<ErrorModel> logger)
{
_logger = logger;
}
public string RequestId { get; set; }
public bool ShowRequestId => !string.IsNullOrEmpty(RequestId);
public void OnGet()
{
RequestId = Activity.Current?.Id ?? HttpContext.TraceIdentifier;
}
}
}
================================================
FILE: Chapter_03/HealthCheck/Pages/_ViewImports.cshtml
================================================
@using HealthCheck
@namespace HealthCheck.Pages
@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers
================================================
FILE: Chapter_03/HealthCheck/Program.cs
================================================
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore;
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.Logging;
namespace HealthCheck
{
public class Program
{
public static void Main(string[] args)
{
CreateWebHostBuilder(args).Build().Run();
}
public static IWebHostBuilder CreateWebHostBuilder(string[] args) =>
WebHost.CreateDefaultBuilder(args)
.UseStartup<Startup>();
}
}
================================================
FILE: Chapter_03/HealthCheck/Startup.cs
================================================
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.HttpsPolicy;
using Microsoft.AspNetCore.SpaServices.AngularCli;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
namespace HealthCheck
{
public class Startup
{
public Startup(IConfiguration configuration)
{
Configuration = configuration;
}
public IConfiguration Configuration { get; }
// This method gets called by the runtime. Use this method to add services to the container.
public void ConfigureServices(IServiceCollection services)
{
services.AddControllersWithViews();
// In production, the Angular files will be served from this directory
services.AddSpaStaticFiles(configuration =>
{
configuration.RootPath = "ClientApp/dist";
});
services.AddHealthChecks()
.AddCheck("ICMP_01", new ICMPHealthCheck("www.ryadel.com", 100))
.AddCheck("ICMP_02", new ICMPHealthCheck("www.google.com", 100))
.AddCheck("ICMP_03", new ICMPHealthCheck("www.does-not-exist.com", 100));
}
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
{
if (env.IsDevelopment())
{
app.UseDeveloperExceptionPage();
}
else
{
app.UseExceptionHandler("/Error");
// The default HSTS value is 30 days. You may want to change this for production scenarios, see https://aka.ms/aspnetcore-hsts.
app.UseHsts();
}
app.UseHttpsRedirection();
app.UseStaticFiles(new StaticFileOptions()
{
OnPrepareResponse = (context) =>
{
// Retrieve cache configuration from appsettings.json
context.Context.Response.Headers["Cache-Control"] =
Configuration["StaticFiles:Headers:Cache-Control"];
context.Context.Response.Headers["Pragma"] =
Configuration["StaticFiles:Headers:Pragma"];
context.Context.Response.Headers["Expires"] =
Configuration["StaticFiles:Headers:Expires"];
}
});
if (!env.IsDevelopment())
{
app.UseSpaStaticFiles();
}
app.UseRouting();
app.UseHealthChecks("/hc", new CustomHealthCheckOptions());
app.UseEndpoints(endpoints =>
{
endpoints.MapControllerRoute(
name: "default",
pattern: "{controller}/{action=Index}/{id?}");
});
app.UseSpa(spa =>
{
// To learn more about options for serving an Angular SPA from ASP.NET Core,
// see https://go.microsoft.com/fwlink/?linkid=864501
spa.Options.SourcePath = "ClientApp";
if (env.IsDevelopment())
{
spa.UseAngularCliServer(npmScript: "start");
}
});
}
}
}
================================================
FILE: Chapter_03/HealthCheck/appsettings.Development.json
================================================
{
"Logging": {
"LogLevel": {
"Default": "Debug",
"System": "Information",
"Microsoft": "Information"
}
},
"StaticFiles": {
"Headers": {
"Cache-Control": "no-cache, no-store",
"Pragma": "no-cache",
"Expires": "-1"
}
}
}
================================================
FILE: Chapter_03/HealthCheck/appsettings.json
================================================
{
"Logging": {
"LogLevel": {
"Default": "Warning"
}
},
"AllowedHosts": "*",
"StaticFiles": {
"Headers": {
"Cache-Control": "max-age=3600",
"Pragma": "cache",
"Expires": null
}
}
}
================================================
FILE: Chapter_03/HealthCheck/libman.json
================================================
{
"version": "1.0",
"defaultProvider": "cdnjs",
"libraries": []
}
================================================
FILE: Chapter_03/HealthCheck/wwwroot/test.html
================================================
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>Time for a test!</title>
</head>
<body>
Hello there!
<br /><br />
This is a test to see if the StaticFiles middleware is working properly.
<br /><br />
What about the client-side cache? Does it work or not?
<br /><br />
It seems like we can configure it: we disabled it during development,
and enabled it in production!
</body>
</html>
================================================
FILE: Chapter_03.sln
================================================
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.29209.62
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "HealthCheck", "Chapter_03\HealthCheck\HealthCheck.csproj", "{5DC82B04-93AA-4B83-AE82-759A0E21DFF5}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{5DC82B04-93AA-4B83-AE82-759A0E21DFF5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{5DC82B04-93AA-4B83-AE82-759A0E21DFF5}.Debug|Any CPU.Build.0 = Debug|Any CPU
{5DC82B04-93AA-4B83-AE82-759A0E21DFF5}.Release|Any CPU.ActiveCfg = Release|Any CPU
{5DC82B04-93AA-4B83-AE82-759A0E21DFF5}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {F0EE0686-783C-472C-8B14-22385361AEE1}
EndGlobalSection
EndGlobal
================================================
FILE: Chapter_04/WorldCities/.gitignore
================================================
## Ignore Visual Studio temporary files, build results, and
## files generated by popular Visual Studio add-ons.
# User-specific files
*.suo
*.user
*.userosscache
*.sln.docstates
# User-specific files (MonoDevelop/Xamarin Studio)
*.userprefs
# Build results
[Dd]ebug/
[Dd]ebugPublic/
[Rr]elease/
[Rr]eleases/
x64/
x86/
build/
bld/
bin/
Bin/
obj/
Obj/
# Visual Studio 2015 cache/options directory
.vs/
# MSTest test Results
[Tt]est[Rr]esult*/
[Bb]uild[Ll]og.*
# NUNIT
*.VisualState.xml
TestResult.xml
# Build Results of an ATL Project
[Dd]ebugPS/
[Rr]eleasePS/
dlldata.c
*_i.c
*_p.c
*_i.h
*.ilk
*.meta
*.obj
*.pch
*.pdb
*.pgc
*.pgd
*.rsp
*.sbr
*.tlb
*.tli
*.tlh
*.tmp
*.tmp_proj
*.log
*.vspscc
*.vssscc
.builds
*.pidb
*.svclog
*.scc
# Chutzpah Test files
_Chutzpah*
# Visual C++ cache files
ipch/
*.aps
*.ncb
*.opendb
*.opensdf
*.sdf
*.cachefile
# Visual Studio profiler
*.psess
*.vsp
*.vspx
*.sap
# TFS 2012 Local Workspace
$tf/
# Guidance Automation Toolkit
*.gpState
# ReSharper is a .NET coding add-in
_ReSharper*/
*.[Rr]e[Ss]harper
*.DotSettings.user
# JustCode is a .NET coding add-in
.JustCode
# TeamCity is a build add-in
_TeamCity*
# DotCover is a Code Coverage Tool
*.dotCover
# NCrunch
_NCrunch_*
.*crunch*.local.xml
nCrunchTemp_*
# MightyMoose
*.mm.*
AutoTest.Net/
# Web workbench (sass)
.sass-cache/
# Installshield output folder
[Ee]xpress/
# DocProject is a documentation generator add-in
DocProject/buildhelp/
DocProject/Help/*.HxT
DocProject/Help/*.HxC
DocProject/Help/*.hhc
DocProject/Help/*.hhk
DocProject/Help/*.hhp
DocProject/Help/Html2
DocProject/Help/html
# Click-Once directory
publish/
# Publish Web Output
*.[Pp]ublish.xml
*.azurePubxml
# TODO: Comment the next line if you want to checkin your web deploy settings
# but database connection strings (with potential passwords) will be unencrypted
*.pubxml
*.publishproj
# NuGet Packages
*.nupkg
# The packages folder can be ignored because of Package Restore
**/packages/*
# except build/, which is used as an MSBuild target.
!**/packages/build/
# Uncomment if necessary however generally it will be regenerated when needed
#!**/packages/repositories.config
# Microsoft Azure Build Output
csx/
*.build.csdef
# Microsoft Azure Emulator
ecf/
rcf/
# Microsoft Azure ApplicationInsights config file
ApplicationInsights.config
# Windows Store app package directory
AppPackages/
BundleArtifacts/
# Visual Studio cache files
# files ending in .cache can be ignored
*.[Cc]ache
# but keep track of directories ending in .cache
!*.[Cc]ache/
# Others
ClientBin/
~$*
*~
*.dbmdl
*.dbproj.schemaview
*.pfx
*.publishsettings
orleans.codegen.cs
/node_modules
# RIA/Silverlight projects
Generated_Code/
# Backup & report files from converting an old project file
# to a newer Visual Studio version. Backup files are not needed,
# because we have git ;-)
_UpgradeReport_Files/
Backup*/
UpgradeLog*.XML
UpgradeLog*.htm
# SQL Server files
*.mdf
*.ldf
# Business Intelligence projects
*.rdl.data
*.bim.layout
*.bim_*.settings
# Microsoft Fakes
FakesAssemblies/
# GhostDoc plugin setting file
*.GhostDoc.xml
# Node.js Tools for Visual Studio
.ntvs_analysis.dat
# Visual Studio 6 build log
*.plg
# Visual Studio 6 workspace options file
*.opt
# Visual Studio LightSwitch build output
**/*.HTMLClient/GeneratedArtifacts
**/*.DesktopClient/GeneratedArtifacts
**/*.DesktopClient/ModelManifest.xml
**/*.Server/GeneratedArtifacts
**/*.Server/ModelManifest.xml
_Pvt_Extensions
# Paket dependency manager
.paket/paket.exe
# FAKE - F# Make
.fake/
================================================
FILE: Chapter_04/WorldCities/ClientApp/.editorconfig
================================================
# Editor configuration, see http://editorconfig.org
root = true
[*]
charset = utf-8
indent_style = space
indent_size = 2
insert_final_newline = true
trim_trailing_whitespace = true
[*.md]
max_line_length = off
trim_trailing_whitespace = false
================================================
FILE: Chapter_04/WorldCities/ClientApp/.gitignore
================================================
# See http://help.github.com/ignore-files/ for more about ignoring files.
# compiled output
/dist
/dist-server
/tmp
/out-tsc
# dependencies
/node_modules
# IDEs and editors
/.idea
.project
.classpath
.c9/
*.launch
.settings/
*.sublime-workspace
# IDE - VSCode
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json
# misc
/.sass-cache
/connect.lock
/coverage
/libpeerconnection.log
npm-debug.log
yarn-error.log
testem.log
/typings
# System Files
.DS_Store
Thumbs.db
================================================
FILE: Chapter_04/WorldCities/ClientApp/README.md
================================================
# WorldCities
This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 6.0.0.
## Development server
Run `ng serve` for a dev server. Navigate to `http://localhost:4200/`. The app will automatically reload if you change any of the source files.
## Code scaffolding
Run `ng generate component component-name` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module`.
## Build
Run `ng build` to build the project. The build artifacts will be stored in the `dist/` directory. Use the `--prod` flag for a production build.
## Running unit tests
Run `ng test` to execute the unit tests via [Karma](https://karma-runner.github.io).
## Running end-to-end tests
Run `ng e2e` to execute the end-to-end tests via [Protractor](http://www.protractortest.org/).
## Further help
To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI README](https://github.com/angular/angular-cli/blob/master/README.md).
================================================
FILE: Chapter_04/WorldCities/ClientApp/angular.json
================================================
{
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
"version": 1,
"newProjectRoot": "projects",
"projects": {
"WorldCities": {
"root": "",
"sourceRoot": "src",
"projectType": "application",
"prefix": "app",
"schematics": {},
"architect": {
"build": {
"builder": "@angular-devkit/build-angular:browser",
"options": {
"progress": true,
"extractCss": true,
"outputPath": "dist",
"index": "src/index.html",
"main": "src/main.ts",
"polyfills": "src/polyfills.ts",
"tsConfig": "src/tsconfig.app.json",
"assets": ["src/assets"],
"styles": [
"node_modules/bootstrap/dist/css/bootstrap.min.css",
"src/styles.css"
],
"scripts": []
},
"configurations": {
"production": {
"fileReplacements": [
{
"replace": "src/environments/environment.ts",
"with": "src/environments/environment.prod.ts"
}
],
"optimization": true,
"outputHashing": "all",
"sourceMap": false,
"extractCss": true,
"namedChunks": false,
"aot": true,
"extractLicenses": true,
"vendorChunk": false,
"buildOptimizer": true
}
}
},
"serve": {
"builder": "@angular-devkit/build-angular:dev-server",
"options": {
"browserTarget": "WorldCities:build"
},
"configurations": {
"production": {
"browserTarget": "WorldCities:build:production"
}
}
},
"extract-i18n": {
"builder": "@angular-devkit/build-angular:extract-i18n",
"options": {
"browserTarget": "WorldCities:build"
}
},
"test": {
"builder": "@angular-devkit/build-angular:karma",
"options": {
"main": "src/test.ts",
"polyfills": "src/polyfills.ts",
"tsConfig": "src/tsconfig.spec.json",
"karmaConfig": "src/karma.conf.js",
"styles": ["styles.css"],
"scripts": [],
"assets": ["src/assets"]
}
},
"lint": {
"builder": "@angular-devkit/build-angular:tslint",
"options": {
"tsConfig": ["src/tsconfig.app.json", "src/tsconfig.spec.json"],
"exclude": ["**/node_modules/**"]
}
},
"server": {
"builder": "@angular-devkit/build-angular:server",
"options": {
"outputPath": "dist-server",
"main": "src/main.ts",
"tsConfig": "src/tsconfig.server.json"
},
"configurations": {
"dev": {
"optimization": true,
"outputHashing": "all",
"sourceMap": false,
"namedChunks": false,
"extractLicenses": true,
"vendorChunk": true
},
"production": {
"optimization": true,
"outputHashing": "all",
"sourceMap": false,
"namedChunks": false,
"extractLicenses": true,
"vendorChunk": false
}
}
}
}
},
"WorldCities-e2e": {
"root": "e2e/",
"projectType": "application",
"architect": {
"e2e": {
"builder": "@angular-devkit/build-angular:protractor",
"options": {
"protractorConfig": "e2e/protractor.conf.js",
"devServerTarget": "WorldCities:serve"
}
},
"lint": {
"builder": "@angular-devkit/build-angular:tslint",
"options": {
"tsConfig": "e2e/tsconfig.e2e.json",
"exclude": ["**/node_modules/**"]
}
}
}
}
},
"defaultProject": "WorldCities"
}
================================================
FILE: Chapter_04/WorldCities/ClientApp/browserslist
================================================
# This file is currently used by autoprefixer to adjust CSS to support the below specified browsers
# For additional information regarding the format and rule options, please see:
# https://github.com/browserslist/browserslist#queries
# For IE 9-11 support, please uncomment the last line of the file and adjust as needed
> 0.5%
last 2 versions
Firefox ESR
not dead
# IE 9-11
================================================
FILE: Chapter_04/WorldCities/ClientApp/e2e/protractor.conf.js
================================================
// Protractor configuration file, see link for more information
// https://github.com/angular/protractor/blob/master/lib/config.ts
const { SpecReporter } = require("jasmine-spec-reporter");
exports.config = {
allScriptsTimeout: 11000,
specs: ["./src/**/*.e2e-spec.ts"],
capabilities: {
browserName: "chrome"
},
directConnect: true,
baseUrl: "http://localhost:4200/",
framework: "jasmine",
jasmineNodeOpts: {
showColors: true,
defaultTimeoutInterval: 30000,
print: function() {}
},
onPrepare() {
require("ts-node").register({
project: require("path").join(__dirname, "./tsconfig.e2e.json")
});
jasmine
.getEnv()
.addReporter(new SpecReporter({ spec: { displayStacktrace: true } }));
}
};
================================================
FILE: Chapter_04/WorldCities/ClientApp/e2e/src/app.e2e-spec.ts
================================================
import { AppPage } from './app.po';
describe('App', () => {
let page: AppPage;
beforeEach(() => {
page = new AppPage();
});
it('should display welcome message', () => {
page.navigateTo();
expect(page.getMainHeading()).toEqual('Hello, world!');
});
});
================================================
FILE: Chapter_04/WorldCities/ClientApp/e2e/src/app.po.ts
================================================
import { browser, by, element } from 'protractor';
export class AppPage {
navigateTo() {
return browser.get('/');
}
getMainHeading() {
return element(by.css('app-root h1')).getText();
}
}
================================================
FILE: Chapter_04/WorldCities/ClientApp/e2e/tsconfig.e2e.json
================================================
{
"extends": "../tsconfig.json",
"compilerOptions": {
"outDir": "../out-tsc/app",
"module": "commonjs",
"target": "es5",
"types": [
"jasmine",
"jasminewd2",
"node"
]
}
}
================================================
FILE: Chapter_04/WorldCities/ClientApp/package.json
================================================
{
"name": "worldcities",
"version": "0.0.0",
"scripts": {
"ng": "ng",
"start": "echo Starting... && ng serve",
"build": "ng build",
"build:ssr": "ng run WorldCities:server:dev",
"test": "ng test",
"lint": "ng lint",
"e2e": "ng e2e"
},
"private": true,
"dependencies": {
"@angular/animations": "9.0.0",
"@angular/common": "9.0.0",
"@angular/compiler": "9.0.0",
"@angular/core": "9.0.0",
"@angular/forms": "9.0.0",
"@angular/platform-browser": "9.0.0",
"@angular/platform-browser-dynamic": "9.0.0",
"@angular/platform-server": "9.0.0",
"@angular/router": "9.0.0",
"@nguniversal/module-map-ngfactory-loader": "9.0.0-next.9",
"aspnet-prerendering": "3.0.1",
"bootstrap": "4.4.1",
"core-js": "3.6.1",
"jquery": "3.5.1",
"oidc-client": "1.9.1",
"popper.js": "1.16.0",
"rxjs": "6.5.4",
"zone.js": "0.10.2"
},
"devDependencies": {
"@angular-devkit/build-angular": "0.900.0",
"@angular/cli": "9.0.0",
"@angular/compiler-cli": "9.0.0",
"@angular/language-service": "9.0.0",
"@types/jasmine": "3.5.0",
"@types/jasminewd2": "2.0.8",
"@types/node": "13.1.1",
"codelyzer": "5.2.1",
"jasmine-core": "3.5.0",
"jasmine-spec-reporter": "4.2.1",
"karma": "4.4.1",
"karma-chrome-launcher": "3.1.0",
"karma-coverage-istanbul-reporter": "2.1.1",
"karma-jasmine": "2.0.1",
"karma-jasmine-html-reporter": "1.5.1",
"typescript": "3.7.5"
},
"optionalDependencies": {
"node-sass": "4.13.0",
"protractor": "5.4.2",
"ts-node": "5.0.1",
"tslint": "5.20.1"
}
}
================================================
FILE: Chapter_04/WorldCities/ClientApp/src/app/app.component.html
================================================
<body>
<app-nav-menu></app-nav-menu>
<div class="container">
<router-outlet></router-outlet>
</div>
</body>
================================================
FILE: Chapter_04/WorldCities/ClientApp/src/app/app.component.ts
================================================
import { Component } from '@angular/core';
@Component({
selector: 'app-root',
templateUrl: './app.component.html'
})
export class AppComponent {
title = 'app';
}
================================================
FILE: Chapter_04/WorldCities/ClientApp/src/app/app.module.ts
================================================
import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import { FormsModule } from '@angular/forms';
import { HttpClientModule, HTTP_INTERCEPTORS } from '@angular/common/http';
import { RouterModule } from '@angular/router';
import { AppComponent } from './app.component';
import { NavMenuComponent } from './nav-menu/nav-menu.component';
import { HomeComponent } from './home/home.component';
@NgModule({
declarations: [
AppComponent,
NavMenuComponent,
HomeComponent
],
imports: [
BrowserModule.withServerTransition({ appId: 'ng-cli-universal' }),
HttpClientModule,
FormsModule,
RouterModule.forRoot([
{ path: '', component: HomeComponent, pathMatch: 'full' }
])
],
providers: [],
bootstrap: [AppComponent]
})
export class AppModule { }
================================================
FILE: Chapter_04/WorldCities/ClientApp/src/app/app.server.module.ts
================================================
import { NgModule } from '@angular/core';
import { ServerModule } from '@angular/platform-server';
import { ModuleMapLoaderModule } from '@nguniversal/module-map-ngfactory-loader';
import { AppComponent } from './app.component';
import { AppModule } from './app.module';
@NgModule({
imports: [AppModule, ServerModule, ModuleMapLoaderModule],
bootstrap: [AppComponent]
})
export class AppServerModule { }
================================================
FILE: Chapter_04/WorldCities/ClientApp/src/app/home/home.component.html
================================================
<h1>Hello, world!</h1>
<p>Welcome to your new single-page application, built with:</p>
<ul>
<li><a href='https://get.asp.net/'>ASP.NET Core</a> and <a href='https://msdn.microsoft.com/en-us/library/67ef8sbd.aspx'>C#</a> for cross-platform server-side code</li>
<li><a href='https://angular.io/'>Angular</a> and <a href='http://www.typescriptlang.org/'>TypeScript</a> for client-side code</li>
<li><a href='http://getbootstrap.com/'>Bootstrap</a> for layout and styling</li>
</ul>
<p>To help you get started, we've also set up:</p>
<ul>
<li><strong>Client-side navigation</strong>. For example, click <em>Counter</em> then <em>Back</em> to return here.</li>
<li><strong>Angular CLI integration</strong>. In development mode, there's no need to run <code>ng serve</code>. It runs in the background automatically, so your client-side resources are dynamically built on demand and the page refreshes when you modify any file.</li>
<li><strong>Efficient production builds</strong>. In production mode, development-time features are disabled, and your <code>dotnet publish</code> configuration automatically invokes <code>ng build</code> to produce minified, ahead-of-time compiled JavaScript files.</li>
</ul>
<p>The <code>ClientApp</code> subdirectory is a standard Angular CLI application. If you open a command prompt in that directory, you can run any <code>ng</code> command (e.g., <code>ng test</code>), or use <code>npm</code> to install extra packages into it.</p>
================================================
FILE: Chapter_04/WorldCities/ClientApp/src/app/home/home.component.ts
================================================
import { Component } from '@angular/core';
@Component({
selector: 'app-home',
templateUrl: './home.component.html',
})
export class HomeComponent {
}
================================================
FILE: Chapter_04/WorldCities/ClientApp/src/app/nav-menu/nav-menu.component.css
================================================
a.navbar-brand {
white-space: normal;
text-align: center;
word-break: break-all;
}
html {
font-size: 14px;
}
@media (min-width: 768px) {
html {
font-size: 16px;
}
}
.box-shadow {
box-shadow: 0 .25rem .75rem rgba(0, 0, 0, .05);
}
================================================
FILE: Chapter_04/WorldCities/ClientApp/src/app/nav-menu/nav-menu.component.html
================================================
<header>
<nav
class="navbar navbar-expand-sm navbar-toggleable-sm navbar-light bg-white border-bottom box-shadow mb-3"
>
<div class="container">
<a class="navbar-brand" [routerLink]="['/']">WorldCities</a>
<button
class="navbar-toggler"
type="button"
data-toggle="collapse"
data-target=".navbar-collapse"
aria-label="Toggle navigation"
[attr.aria-expanded]="isExpanded"
(click)="toggle()"
>
<span class="navbar-toggler-icon"></span>
</button>
<div
class="navbar-collapse collapse d-sm-inline-flex flex-sm-row-reverse"
[ngClass]="{ show: isExpanded }"
>
<ul class="navbar-nav flex-grow">
<li
class="nav-item"
[routerLinkActive]="['link-active']"
[routerLinkActiveOptions]="{ exact: true }"
>
<a class="nav-link text-dark" [routerLink]="['/']">Home</a>
</li>
</ul>
</div>
</div>
</nav>
</header>
================================================
FILE: Chapter_04/WorldCities/ClientApp/src/app/nav-menu/nav-menu.component.ts
================================================
import { Component } from '@angular/core';
@Component({
selector: 'app-nav-menu',
templateUrl: './nav-menu.component.html',
styleUrls: ['./nav-menu.component.css']
})
export class NavMenuComponent {
isExpanded = false;
collapse() {
this.isExpanded = false;
}
toggle() {
this.isExpanded = !this.isExpanded;
}
}
================================================
FILE: Chapter_04/WorldCities/ClientApp/src/assets/.gitkeep
================================================
================================================
FILE: Chapter_04/WorldCities/ClientApp/src/environments/environment.prod.ts
================================================
export const environment = {
production: true
};
================================================
FILE: Chapter_04/WorldCities/ClientApp/src/environments/environment.ts
================================================
// This file can be replaced during build by using the `fileReplacements` array.
// `ng build ---prod` replaces `environment.ts` with `environment.prod.ts`.
// The list of file replacements can be found in `angular.json`.
export const environment = {
production: false
};
/*
* In development mode, to ignore zone related error stack frames such as
* `zone.run`, `zoneDelegate.invokeTask` for easier debugging, you can
* import the following file, but please comment it out in production mode
* because it will have performance impact when throw error
*/
// import 'zone.js/dist/zone-error'; // Included with Angular CLI.
================================================
FILE: Chapter_04/WorldCities/ClientApp/src/index.html
================================================
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>WorldCities</title>
<base href="/" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link rel="icon" type="image/x-icon" href="favicon.ico" />
</head>
<body>
<app-root>Loading...</app-root>
</body>
</html>
================================================
FILE: Chapter_04/WorldCities/ClientApp/src/karma.conf.js
================================================
// Karma configuration file, see link for more information
// https://karma-runner.github.io/1.0/config/configuration-file.html
module.exports = function (config) {
config.set({
basePath: '',
frameworks: ['jasmine', '@angular-devkit/build-angular'],
plugins: [
require('karma-jasmine'),
require('karma-chrome-launcher'),
require('karma-jasmine-html-reporter'),
require('karma-coverage-istanbul-reporter'),
require('@angular-devkit/build-angular/plugins/karma')
],
client: {
clearContext: false // leave Jasmine Spec Runner output visible in browser
},
coverageIstanbulReporter: {
dir: require('path').join(__dirname, '../coverage'),
reports: ['html', 'lcovonly'],
fixWebpackSourcePaths: true
},
reporters: ['progress', 'kjhtml'],
port: 9876,
colors: true,
logLevel: config.LOG_INFO,
autoWatch: true,
browsers: ['Chrome'],
singleRun: false
});
};
================================================
FILE: Chapter_04/WorldCities/ClientApp/src/main.ts
================================================
import { enableProdMode } from '@angular/core';
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
import { AppModule } from './app/app.module';
import { environment } from './environments/environment';
export function getBaseUrl() {
return document.getElementsByTagName('base')[0].href;
}
const providers = [
{ provide: 'BASE_URL', useFactory: getBaseUrl, deps: [] }
];
if (environment.production) {
enableProdMode();
}
platformBrowserDynamic(providers).bootstrapModule(AppModule)
.catch(err => console.error(err));
================================================
FILE: Chapter_04/WorldCities/ClientApp/src/polyfills.ts
================================================
/**
* This file includes polyfills needed by Angular and is loaded before the app.
* You can add your own extra polyfills to this file.
*
* This file is divided into 2 sections:
* 1. Browser polyfills. These are applied before loading ZoneJS and are sorted by browsers.
* 2. Application imports. Files imported after ZoneJS that should be loaded before your main
* file.
*
* The current setup is for so-called "evergreen" browsers; the last versions of browsers that
* automatically update themselves. This includes Safari >= 10, Chrome >= 55 (including Opera),
* Edge >= 13 on the desktop, and iOS 10 and Chrome on mobile.
*
* Learn more in https://angular.io/guide/browser-support
*/
/***************************************************************************************************
* BROWSER POLYFILLS
*/
/** IE10 and IE11 requires the following for NgClass support on SVG elements */
// import 'classlist.js'; // Run `npm install --save classlist.js`.
/**
* Web Animations `@angular/platform-browser/animations`
* Only required if AnimationBuilder is used within the application and using IE/Edge or Safari.
* Standard animation support in Angular DOES NOT require any polyfills (as of Angular 6.0).
*/
// import 'web-animations-js'; // Run `npm install --save web-animations-js`.
/**
* By default, zone.js will patch all possible macroTask and DomEvents
* user can disable parts of macroTask/DomEvents patch by setting following flags
* because those flags need to be set before `zone.js` being loaded, and webpack
* will put import in the top of bundle, so user need to create a separate file
* in this directory (for example: zone-flags.ts), and put the following flags
* into that file, and then add the following code before importing zone.js.
* import './zone-flags.ts';
*
* The flags allowed in zone-flags.ts are listed here.
*
* The following flags will work for all browsers.
*
* (window as any).__Zone_disable_requestAnimationFrame = true; // disable patch requestAnimationFrame
* (window as any).__Zone_disable_on_property = true; // disable patch onProperty such as onclick
* (window as any).__zone_symbol__UNPATCHED_EVENTS = ['scroll', 'mousemove']; // disable patch specified eventNames
*
* in IE/Edge developer tools, the addEventListener will also be wrapped by zone.js
* with the following flag, it will bypass `zone.js` patch for IE/Edge
*
* (window as any).__Zone_enable_cross_context_check = true;
*
*/
/***************************************************************************************************
* Zone JS is required by default for Angular itself.
*/
import 'zone.js/dist/zone'; // Included with Angular CLI.
/***************************************************************************************************
* APPLICATION IMPORTS
*/
================================================
FILE: Chapter_04/WorldCities/ClientApp/src/styles.css
================================================
/* You can add global styles to this file, and also import other style files */
/* Provide sufficient contrast against white background */
a {
color: #0366d6;
}
code {
color: #e01a76;
}
.btn-primary {
color: #fff;
background-color: #1b6ec2;
border-color: #1861ac;
}
================================================
FILE: Chapter_04/WorldCities/ClientApp/src/test.ts
================================================
// This file is required by karma.conf.js and loads recursively all the .spec and framework files
import 'zone.js/dist/zone-testing';
import { getTestBed } from '@angular/core/testing';
import {
BrowserDynamicTestingModule,
platformBrowserDynamicTesting
} from '@angular/platform-browser-dynamic/testing';
declare const require: any;
// First, initialize the Angular testing environment.
getTestBed().initTestEnvironment(
BrowserDynamicTestingModule,
platformBrowserDynamicTesting()
);
// Then we find all the tests.
const context = require.context('./', true, /\.spec\.ts$/);
// And load the modules.
context.keys().map(context);
================================================
FILE: Chapter_04/WorldCities/ClientApp/src/tsconfig.app.json
================================================
{
"extends": "../tsconfig.json",
"compilerOptions": {
"outDir": "../out-tsc/app",
"types": []
},
"exclude": [
"src/test.ts",
"**/*.spec.ts"
]
}
================================================
FILE: Chapter_04/WorldCities/ClientApp/src/tsconfig.server.json
================================================
{
"extends": "../tsconfig.json",
"compilerOptions": {
"module": "commonjs"
},
"angularCompilerOptions": {
"entryModule": "app/app.server.module#AppServerModule"
}
}
================================================
FILE: Chapter_04/WorldCities/ClientApp/src/tsconfig.spec.json
================================================
{
"extends": "../tsconfig.json",
"compilerOptions": {
"outDir": "../out-tsc/spec",
"types": [
"jasmine",
"node"
]
},
"files": [
"test.ts",
"polyfills.ts"
],
"include": [
"**/*.spec.ts",
"**/*.d.ts"
]
}
================================================
FILE: Chapter_04/WorldCities/ClientApp/src/tslint.json
================================================
{
"extends": "../tslint.json",
"rules": {
"directive-selector": [
true,
"attribute",
"app",
"camelCase"
],
"component-selector": [
true,
"element",
"app",
"kebab-case"
]
}
}
================================================
FILE: Chapter_04/WorldCities/ClientApp/tsconfig.json
================================================
{
"compileOnSave": false,
"compilerOptions": {
"baseUrl": "./",
"module": "esnext",
"outDir": "./dist/out-tsc",
"sourceMap": true,
"declaration": false,
"moduleResolution": "node",
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"target": "es2015",
"typeRoots": [
"node_modules/@types"
],
"lib": [
"es2017",
"dom"
]
}
}
================================================
FILE: Chapter_04/WorldCities/ClientApp/tslint.json
================================================
{
"rulesDirectory": [
"node_modules/codelyzer"
],
"rules": {
"arrow-return-shorthand": true,
"callable-types": true,
"class-name": true,
"comment-format": [
true,
"check-space"
],
"curly": true,
"deprecation": {
"severity": "warn"
},
"eofline": true,
"forin": true,
"import-blacklist": [
true,
"rxjs/Rx"
],
"import-spacing": true,
"indent": [
true,
"spaces"
],
"interface-over-type-literal": true,
"label-position": true,
"max-line-length": [
true,
140
],
"member-access": false,
"member-ordering": [
true,
{
"order": [
"static-field",
"instance-field",
"static-method",
"instance-method"
]
}
],
"
gitextract_z_phpssj/ ├── .gitignore ├── .hgignore ├── All_Chapters.sln ├── Chapter_01/ │ └── HealthCheck/ │ ├── .gitignore │ ├── ClientApp/ │ │ ├── .editorconfig │ │ ├── .gitignore │ │ ├── README.md │ │ ├── angular.json │ │ ├── browserslist │ │ ├── e2e/ │ │ │ ├── protractor.conf.js │ │ │ ├── src/ │ │ │ │ ├── app.e2e-spec.ts │ │ │ │ └── app.po.ts │ │ │ └── tsconfig.e2e.json │ │ ├── package.json │ │ ├── src/ │ │ │ ├── app/ │ │ │ │ ├── app.component.html │ │ │ │ ├── app.component.ts │ │ │ │ ├── app.module.ts │ │ │ │ ├── app.server.module.ts │ │ │ │ ├── counter/ │ │ │ │ │ ├── counter.component.html │ │ │ │ │ ├── counter.component.spec.ts │ │ │ │ │ └── counter.component.ts │ │ │ │ ├── fetch-data/ │ │ │ │ │ ├── fetch-data.component.html │ │ │ │ │ └── fetch-data.component.ts │ │ │ │ ├── home/ │ │ │ │ │ ├── home.component.html │ │ │ │ │ └── home.component.ts │ │ │ │ └── nav-menu/ │ │ │ │ ├── nav-menu.component.css │ │ │ │ ├── nav-menu.component.html │ │ │ │ └── nav-menu.component.ts │ │ │ ├── assets/ │ │ │ │ └── .gitkeep │ │ │ ├── environments/ │ │ │ │ ├── environment.prod.ts │ │ │ │ └── environment.ts │ │ │ ├── index.html │ │ │ ├── karma.conf.js │ │ │ ├── main.ts │ │ │ ├── polyfills.ts │ │ │ ├── styles.css │ │ │ ├── test.ts │ │ │ ├── tsconfig.app.json │ │ │ ├── tsconfig.server.json │ │ │ ├── tsconfig.spec.json │ │ │ └── tslint.json │ │ ├── tsconfig.json │ │ ├── tslint.json │ │ └── update-npm.bat │ ├── Controllers/ │ │ └── WeatherForecastController.cs │ ├── HealthCheck.csproj │ ├── Pages/ │ │ ├── Error.cshtml │ │ ├── Error.cshtml.cs │ │ └── _ViewImports.cshtml │ ├── Program.cs │ ├── Startup.cs │ ├── WeatherForecast.cs │ ├── appsettings.Development.json │ └── appsettings.json ├── Chapter_01.sln ├── Chapter_02/ │ └── HealthCheck/ │ ├── .gitignore │ ├── ClientApp/ │ │ ├── .editorconfig │ │ ├── .gitignore │ │ ├── README.md │ │ ├── angular.json │ │ ├── browserslist │ │ ├── e2e/ │ │ │ ├── protractor.conf.js │ │ │ ├── src/ │ │ │ │ ├── app.e2e-spec.ts │ │ │ │ └── app.po.ts │ │ │ └── tsconfig.e2e.json │ │ ├── package.json │ │ ├── src/ │ │ │ ├── app/ │ │ │ │ ├── app.component.html │ │ │ │ ├── app.component.ts │ │ │ │ ├── app.module.ts │ │ │ │ ├── app.server.module.ts │ │ │ │ ├── home/ │ │ │ │ │ ├── home.component.html │ │ │ │ │ └── home.component.ts │ │ │ │ └── nav-menu/ │ │ │ │ ├── nav-menu.component.css │ │ │ │ ├── nav-menu.component.html │ │ │ │ └── nav-menu.component.ts │ │ │ ├── assets/ │ │ │ │ └── .gitkeep │ │ │ ├── environments/ │ │ │ │ ├── environment.prod.ts │ │ │ │ └── environment.ts │ │ │ ├── index.html │ │ │ ├── karma.conf.js │ │ │ ├── main.ts │ │ │ ├── polyfills.ts │ │ │ ├── styles.css │ │ │ ├── test.ts │ │ │ ├── tsconfig.app.json │ │ │ ├── tsconfig.server.json │ │ │ ├── tsconfig.spec.json │ │ │ └── tslint.json │ │ ├── tsconfig.json │ │ ├── tslint.json │ │ └── update-npm.bat │ ├── HealthCheck.csproj │ ├── Pages/ │ │ ├── Error.cshtml │ │ ├── Error.cshtml.cs │ │ └── _ViewImports.cshtml │ ├── Program.cs │ ├── Startup.cs │ ├── appsettings.Development.json │ ├── appsettings.json │ ├── libman.json │ └── wwwroot/ │ └── test.html ├── Chapter_02.sln ├── Chapter_03/ │ └── HealthCheck/ │ ├── .gitignore │ ├── ClientApp/ │ │ ├── .editorconfig │ │ ├── .gitignore │ │ ├── README.md │ │ ├── angular.json │ │ ├── browserslist │ │ ├── e2e/ │ │ │ ├── protractor.conf.js │ │ │ ├── src/ │ │ │ │ ├── app.e2e-spec.ts │ │ │ │ └── app.po.ts │ │ │ └── tsconfig.e2e.json │ │ ├── package.json │ │ ├── src/ │ │ │ ├── app/ │ │ │ │ ├── app.component.html │ │ │ │ ├── app.component.ts │ │ │ │ ├── app.module.ts │ │ │ │ ├── app.server.module.ts │ │ │ │ ├── health-check/ │ │ │ │ │ ├── health-check.component.css │ │ │ │ │ ├── health-check.component.html │ │ │ │ │ └── health-check.component.ts │ │ │ │ ├── home/ │ │ │ │ │ ├── home.component.html │ │ │ │ │ └── home.component.ts │ │ │ │ └── nav-menu/ │ │ │ │ ├── nav-menu.component.css │ │ │ │ ├── nav-menu.component.html │ │ │ │ └── nav-menu.component.ts │ │ │ ├── assets/ │ │ │ │ └── .gitkeep │ │ │ ├── environments/ │ │ │ │ ├── environment.prod.ts │ │ │ │ └── environment.ts │ │ │ ├── index.html │ │ │ ├── karma.conf.js │ │ │ ├── main.ts │ │ │ ├── polyfills.ts │ │ │ ├── styles.css │ │ │ ├── test.ts │ │ │ ├── tsconfig.app.json │ │ │ ├── tsconfig.server.json │ │ │ ├── tsconfig.spec.json │ │ │ └── tslint.json │ │ ├── tsconfig.json │ │ ├── tslint.json │ │ └── update-npm.bat │ ├── CustomHealthCheckOptions.cs │ ├── HealthCheck.csproj │ ├── ICMPHealthCheck.cs │ ├── Pages/ │ │ ├── Error.cshtml │ │ ├── Error.cshtml.cs │ │ └── _ViewImports.cshtml │ ├── Program.cs │ ├── Startup.cs │ ├── appsettings.Development.json │ ├── appsettings.json │ ├── libman.json │ └── wwwroot/ │ └── test.html ├── Chapter_03.sln ├── Chapter_04/ │ └── WorldCities/ │ ├── .gitignore │ ├── ClientApp/ │ │ ├── .editorconfig │ │ ├── .gitignore │ │ ├── README.md │ │ ├── angular.json │ │ ├── browserslist │ │ ├── e2e/ │ │ │ ├── protractor.conf.js │ │ │ ├── src/ │ │ │ │ ├── app.e2e-spec.ts │ │ │ │ └── app.po.ts │ │ │ └── tsconfig.e2e.json │ │ ├── package.json │ │ ├── src/ │ │ │ ├── app/ │ │ │ │ ├── app.component.html │ │ │ │ ├── app.component.ts │ │ │ │ ├── app.module.ts │ │ │ │ ├── app.server.module.ts │ │ │ │ ├── home/ │ │ │ │ │ ├── home.component.html │ │ │ │ │ └── home.component.ts │ │ │ │ └── nav-menu/ │ │ │ │ ├── nav-menu.component.css │ │ │ │ ├── nav-menu.component.html │ │ │ │ └── nav-menu.component.ts │ │ │ ├── assets/ │ │ │ │ └── .gitkeep │ │ │ ├── environments/ │ │ │ │ ├── environment.prod.ts │ │ │ │ └── environment.ts │ │ │ ├── index.html │ │ │ ├── karma.conf.js │ │ │ ├── main.ts │ │ │ ├── polyfills.ts │ │ │ ├── styles.css │ │ │ ├── test.ts │ │ │ ├── tsconfig.app.json │ │ │ ├── tsconfig.server.json │ │ │ ├── tsconfig.spec.json │ │ │ └── tslint.json │ │ ├── tsconfig.json │ │ ├── tslint.json │ │ └── update-npm.bat │ ├── Controllers/ │ │ ├── CitiesController.cs │ │ ├── CountriesController.cs │ │ └── SeedController.cs │ ├── Data/ │ │ ├── ApplicationDbContext.cs │ │ ├── Migrations/ │ │ │ ├── 20191123030140_Initial.Designer.cs │ │ │ ├── 20191123030140_Initial.cs │ │ │ └── ApplicationDbContextModelSnapshot.cs │ │ ├── Models/ │ │ │ ├── City.cs │ │ │ └── Country.cs │ │ └── Source/ │ │ └── worldcities.xlsx │ ├── Pages/ │ │ ├── Error.cshtml │ │ ├── Error.cshtml.cs │ │ └── _ViewImports.cshtml │ ├── Program.cs │ ├── Startup.cs │ ├── WorldCities.csproj │ ├── appsettings.Development.json │ └── appsettings.json ├── Chapter_04.sln ├── Chapter_05/ │ └── WorldCities/ │ ├── .gitignore │ ├── ClientApp/ │ │ ├── .editorconfig │ │ ├── .gitignore │ │ ├── README.md │ │ ├── angular.json │ │ ├── browserslist │ │ ├── e2e/ │ │ │ ├── protractor.conf.js │ │ │ ├── src/ │ │ │ │ ├── app.e2e-spec.ts │ │ │ │ └── app.po.ts │ │ │ └── tsconfig.e2e.json │ │ ├── package.json │ │ ├── src/ │ │ │ ├── app/ │ │ │ │ ├── angular-material.module.ts │ │ │ │ ├── app.component.html │ │ │ │ ├── app.component.ts │ │ │ │ ├── app.module.ts │ │ │ │ ├── app.server.module.ts │ │ │ │ ├── cities/ │ │ │ │ │ ├── _clientSidePagination/ │ │ │ │ │ │ ├── _README.txt │ │ │ │ │ │ ├── cities.component.html │ │ │ │ │ │ └── cities.component.ts_sample │ │ │ │ │ ├── cities.component.css │ │ │ │ │ ├── cities.component.html │ │ │ │ │ ├── cities.component.ts │ │ │ │ │ └── city.ts │ │ │ │ ├── countries/ │ │ │ │ │ ├── countries.component.css │ │ │ │ │ ├── countries.component.html │ │ │ │ │ ├── countries.component.ts │ │ │ │ │ └── country.ts │ │ │ │ ├── home/ │ │ │ │ │ ├── home.component.html │ │ │ │ │ └── home.component.ts │ │ │ │ └── nav-menu/ │ │ │ │ ├── nav-menu.component.css │ │ │ │ ├── nav-menu.component.html │ │ │ │ └── nav-menu.component.ts │ │ │ ├── assets/ │ │ │ │ └── .gitkeep │ │ │ ├── environments/ │ │ │ │ ├── environment.prod.ts │ │ │ │ └── environment.ts │ │ │ ├── index.html │ │ │ ├── karma.conf.js │ │ │ ├── main.ts │ │ │ ├── polyfills.ts │ │ │ ├── styles.css │ │ │ ├── test.ts │ │ │ ├── tsconfig.app.json │ │ │ ├── tsconfig.server.json │ │ │ ├── tsconfig.spec.json │ │ │ └── tslint.json │ │ ├── tsconfig.json │ │ ├── tslint.json │ │ └── update-npm.bat │ ├── Controllers/ │ │ ├── CitiesController.cs │ │ ├── CountriesController.cs │ │ └── SeedController.cs │ ├── Data/ │ │ ├── ApiResult.cs │ │ ├── ApplicationDbContext.cs │ │ ├── Migrations/ │ │ │ ├── 20191123030140_Initial.Designer.cs │ │ │ ├── 20191123030140_Initial.cs │ │ │ └── ApplicationDbContextModelSnapshot.cs │ │ ├── Models/ │ │ │ ├── City.cs │ │ │ └── Country.cs │ │ └── Source/ │ │ └── worldcities.xlsx │ ├── Pages/ │ │ ├── Error.cshtml │ │ ├── Error.cshtml.cs │ │ └── _ViewImports.cshtml │ ├── Program.cs │ ├── Startup.cs │ ├── WorldCities.csproj │ ├── appsettings.Development.json │ └── appsettings.json ├── Chapter_05.sln ├── Chapter_06/ │ └── WorldCities/ │ ├── .gitignore │ ├── ClientApp/ │ │ ├── .editorconfig │ │ ├── .gitignore │ │ ├── README.md │ │ ├── angular.json │ │ ├── browserslist │ │ ├── e2e/ │ │ │ ├── protractor.conf.js │ │ │ ├── src/ │ │ │ │ ├── app.e2e-spec.ts │ │ │ │ └── app.po.ts │ │ │ └── tsconfig.e2e.json │ │ ├── package.json │ │ ├── src/ │ │ │ ├── app/ │ │ │ │ ├── angular-material.module.ts │ │ │ │ ├── app.component.html │ │ │ │ ├── app.component.ts │ │ │ │ ├── app.module.ts │ │ │ │ ├── app.server.module.ts │ │ │ │ ├── cities/ │ │ │ │ │ ├── cities.component.css │ │ │ │ │ ├── cities.component.html │ │ │ │ │ ├── cities.component.ts │ │ │ │ │ ├── city-edit.component.css │ │ │ │ │ ├── city-edit.component.html │ │ │ │ │ ├── city-edit.component.ts │ │ │ │ │ └── city.ts │ │ │ │ ├── countries/ │ │ │ │ │ ├── countries.component.css │ │ │ │ │ ├── countries.component.html │ │ │ │ │ ├── countries.component.ts │ │ │ │ │ ├── country-edit.component.css │ │ │ │ │ ├── country-edit.component.html │ │ │ │ │ ├── country-edit.component.ts │ │ │ │ │ └── country.ts │ │ │ │ ├── home/ │ │ │ │ │ ├── home.component.html │ │ │ │ │ └── home.component.ts │ │ │ │ └── nav-menu/ │ │ │ │ ├── nav-menu.component.css │ │ │ │ ├── nav-menu.component.html │ │ │ │ └── nav-menu.component.ts │ │ │ ├── assets/ │ │ │ │ └── .gitkeep │ │ │ ├── environments/ │ │ │ │ ├── environment.prod.ts │ │ │ │ └── environment.ts │ │ │ ├── index.html │ │ │ ├── karma.conf.js │ │ │ ├── main.ts │ │ │ ├── polyfills.ts │ │ │ ├── styles.css │ │ │ ├── test.ts │ │ │ ├── tsconfig.app.json │ │ │ ├── tsconfig.server.json │ │ │ ├── tsconfig.spec.json │ │ │ └── tslint.json │ │ ├── tsconfig.json │ │ ├── tslint.json │ │ └── update-npm.bat │ ├── Controllers/ │ │ ├── CitiesController.cs │ │ ├── CountriesController.cs │ │ └── SeedController.cs │ ├── Data/ │ │ ├── ApiResult.cs │ │ ├── ApplicationDbContext.cs │ │ ├── Migrations/ │ │ │ ├── 20191123030140_Initial.Designer.cs │ │ │ ├── 20191123030140_Initial.cs │ │ │ └── ApplicationDbContextModelSnapshot.cs │ │ ├── Models/ │ │ │ ├── City.cs │ │ │ └── Country.cs │ │ └── Source/ │ │ └── worldcities.xlsx │ ├── Pages/ │ │ ├── Error.cshtml │ │ ├── Error.cshtml.cs │ │ └── _ViewImports.cshtml │ ├── Program.cs │ ├── Startup.cs │ ├── WorldCities.csproj │ ├── appsettings.Development.json │ └── appsettings.json ├── Chapter_06.sln ├── Chapter_07/ │ └── WorldCities/ │ ├── .gitignore │ ├── ClientApp/ │ │ ├── .editorconfig │ │ ├── .gitignore │ │ ├── README.md │ │ ├── angular.json │ │ ├── browserslist │ │ ├── e2e/ │ │ │ ├── protractor.conf.js │ │ │ ├── src/ │ │ │ │ ├── app.e2e-spec.ts │ │ │ │ └── app.po.ts │ │ │ └── tsconfig.e2e.json │ │ ├── package.json │ │ ├── src/ │ │ │ ├── app/ │ │ │ │ ├── angular-material.module.ts │ │ │ │ ├── app.component.html │ │ │ │ ├── app.component.ts │ │ │ │ ├── app.module.ts │ │ │ │ ├── app.server.module.ts │ │ │ │ ├── base.form.component.ts │ │ │ │ ├── base.service.ts │ │ │ │ ├── cities/ │ │ │ │ │ ├── cities.component.css │ │ │ │ │ ├── cities.component.html │ │ │ │ │ ├── cities.component.ts │ │ │ │ │ ├── city-edit.component.css │ │ │ │ │ ├── city-edit.component.html │ │ │ │ │ ├── city-edit.component.ts │ │ │ │ │ ├── city.service.ts │ │ │ │ │ └── city.ts │ │ │ │ ├── countries/ │ │ │ │ │ ├── countries.component.css │ │ │ │ │ ├── countries.component.html │ │ │ │ │ ├── countries.component.ts │ │ │ │ │ ├── country-edit.component.css │ │ │ │ │ ├── country-edit.component.html │ │ │ │ │ ├── country-edit.component.ts │ │ │ │ │ ├── country.service.ts │ │ │ │ │ └── country.ts │ │ │ │ ├── home/ │ │ │ │ │ ├── home.component.html │ │ │ │ │ └── home.component.ts │ │ │ │ └── nav-menu/ │ │ │ │ ├── nav-menu.component.css │ │ │ │ ├── nav-menu.component.html │ │ │ │ └── nav-menu.component.ts │ │ │ ├── assets/ │ │ │ │ └── .gitkeep │ │ │ ├── environments/ │ │ │ │ ├── environment.prod.ts │ │ │ │ └── environment.ts │ │ │ ├── index.html │ │ │ ├── karma.conf.js │ │ │ ├── main.ts │ │ │ ├── polyfills.ts │ │ │ ├── styles.css │ │ │ ├── test.ts │ │ │ ├── tsconfig.app.json │ │ │ ├── tsconfig.server.json │ │ │ ├── tsconfig.spec.json │ │ │ └── tslint.json │ │ ├── tsconfig.json │ │ ├── tslint.json │ │ └── update-npm.bat │ ├── Controllers/ │ │ ├── CitiesController.cs │ │ ├── CountriesController.cs │ │ └── SeedController.cs │ ├── Data/ │ │ ├── ApiResult.cs │ │ ├── ApplicationDbContext.cs │ │ ├── CityDTO.cs │ │ ├── CountryDTO.cs │ │ ├── Migrations/ │ │ │ ├── 20191123030140_Initial.Designer.cs │ │ │ ├── 20191123030140_Initial.cs │ │ │ └── ApplicationDbContextModelSnapshot.cs │ │ ├── Models/ │ │ │ ├── City.cs │ │ │ └── Country.cs │ │ └── Source/ │ │ └── worldcities.xlsx │ ├── Pages/ │ │ ├── Error.cshtml │ │ ├── Error.cshtml.cs │ │ └── _ViewImports.cshtml │ ├── Program.cs │ ├── Startup.cs │ ├── WorldCities.csproj │ ├── appsettings.Development.json │ └── appsettings.json ├── Chapter_07.sln ├── Chapter_08/ │ └── WorldCities/ │ ├── .gitignore │ ├── ClientApp/ │ │ ├── .editorconfig │ │ ├── .gitignore │ │ ├── README.md │ │ ├── angular.json │ │ ├── browserslist │ │ ├── e2e/ │ │ │ ├── protractor.conf.js │ │ │ ├── src/ │ │ │ │ ├── app.e2e-spec.ts │ │ │ │ └── app.po.ts │ │ │ └── tsconfig.e2e.json │ │ ├── package.json │ │ ├── src/ │ │ │ ├── app/ │ │ │ │ ├── angular-material.module.ts │ │ │ │ ├── app.component.html │ │ │ │ ├── app.component.ts │ │ │ │ ├── app.module.ts │ │ │ │ ├── app.server.module.ts │ │ │ │ ├── base.form.component.ts │ │ │ │ ├── base.service.ts │ │ │ │ ├── cities/ │ │ │ │ │ ├── cities.component.css │ │ │ │ │ ├── cities.component.html │ │ │ │ │ ├── cities.component.ts │ │ │ │ │ ├── city-edit.component.css │ │ │ │ │ ├── city-edit.component.html │ │ │ │ │ ├── city-edit.component.ts │ │ │ │ │ ├── city.service.ts │ │ │ │ │ └── city.ts │ │ │ │ ├── countries/ │ │ │ │ │ ├── countries.component.css │ │ │ │ │ ├── countries.component.html │ │ │ │ │ ├── countries.component.ts │ │ │ │ │ ├── country-edit.component.css │ │ │ │ │ ├── country-edit.component.html │ │ │ │ │ ├── country-edit.component.ts │ │ │ │ │ ├── country.service.ts │ │ │ │ │ └── country.ts │ │ │ │ ├── home/ │ │ │ │ │ ├── home.component.html │ │ │ │ │ └── home.component.ts │ │ │ │ └── nav-menu/ │ │ │ │ ├── nav-menu.component.css │ │ │ │ ├── nav-menu.component.html │ │ │ │ └── nav-menu.component.ts │ │ │ ├── assets/ │ │ │ │ └── .gitkeep │ │ │ ├── environments/ │ │ │ │ ├── environment.prod.ts │ │ │ │ └── environment.ts │ │ │ ├── index.html │ │ │ ├── karma.conf.js │ │ │ ├── main.ts │ │ │ ├── polyfills.ts │ │ │ ├── styles.css │ │ │ ├── test.ts │ │ │ ├── tsconfig.app.json │ │ │ ├── tsconfig.server.json │ │ │ ├── tsconfig.spec.json │ │ │ └── tslint.json │ │ ├── tsconfig.json │ │ ├── tslint.json │ │ └── update-npm.bat │ ├── Controllers/ │ │ ├── CitiesController.cs │ │ ├── CountriesController.cs │ │ └── SeedController.cs │ ├── Data/ │ │ ├── ApiResult.cs │ │ ├── ApplicationDbContext.cs │ │ ├── CityDTO.cs │ │ ├── CountryDTO.cs │ │ ├── IQueryableExtensions.cs │ │ ├── Migrations/ │ │ │ ├── 20191123030140_Initial.Designer.cs │ │ │ ├── 20191123030140_Initial.cs │ │ │ └── ApplicationDbContextModelSnapshot.cs │ │ ├── Models/ │ │ │ ├── City.cs │ │ │ └── Country.cs │ │ └── Source/ │ │ └── worldcities.xlsx │ ├── Pages/ │ │ ├── Error.cshtml │ │ ├── Error.cshtml.cs │ │ └── _ViewImports.cshtml │ ├── Program.cs │ ├── Startup.cs │ ├── WorldCities.csproj │ ├── appsettings.Development.json │ └── appsettings.json ├── Chapter_08.sln ├── Chapter_09/ │ ├── WorldCities/ │ │ ├── .gitignore │ │ ├── ClientApp/ │ │ │ ├── .editorconfig │ │ │ ├── .gitignore │ │ │ ├── README.md │ │ │ ├── angular.json │ │ │ ├── browserslist │ │ │ ├── e2e/ │ │ │ │ ├── protractor.conf.js │ │ │ │ ├── src/ │ │ │ │ │ ├── app.e2e-spec.ts │ │ │ │ │ └── app.po.ts │ │ │ │ └── tsconfig.e2e.json │ │ │ ├── package.json │ │ │ ├── src/ │ │ │ │ ├── app/ │ │ │ │ │ ├── angular-material.module.ts │ │ │ │ │ ├── app.component.html │ │ │ │ │ ├── app.component.ts │ │ │ │ │ ├── app.module.ts │ │ │ │ │ ├── app.server.module.ts │ │ │ │ │ ├── base.form.component.ts │ │ │ │ │ ├── base.service.ts │ │ │ │ │ ├── cities/ │ │ │ │ │ │ ├── cities.component.css │ │ │ │ │ │ ├── cities.component.html │ │ │ │ │ │ ├── cities.component.spec.ts │ │ │ │ │ │ ├── cities.component.ts │ │ │ │ │ │ ├── city-edit.component.css │ │ │ │ │ │ ├── city-edit.component.html │ │ │ │ │ │ ├── city-edit.component.ts │ │ │ │ │ │ ├── city.service.ts │ │ │ │ │ │ └── city.ts │ │ │ │ │ ├── countries/ │ │ │ │ │ │ ├── countries.component.css │ │ │ │ │ │ ├── countries.component.html │ │ │ │ │ │ ├── countries.component.ts │ │ │ │ │ │ ├── country-edit.component.css │ │ │ │ │ │ ├── country-edit.component.html │ │ │ │ │ │ ├── country-edit.component.ts │ │ │ │ │ │ ├── country.service.ts │ │ │ │ │ │ └── country.ts │ │ │ │ │ ├── home/ │ │ │ │ │ │ ├── home.component.html │ │ │ │ │ │ └── home.component.ts │ │ │ │ │ └── nav-menu/ │ │ │ │ │ ├── nav-menu.component.css │ │ │ │ │ ├── nav-menu.component.html │ │ │ │ │ └── nav-menu.component.ts │ │ │ │ ├── assets/ │ │ │ │ │ └── .gitkeep │ │ │ │ ├── environments/ │ │ │ │ │ ├── environment.prod.ts │ │ │ │ │ └── environment.ts │ │ │ │ ├── index.html │ │ │ │ ├── karma.conf.js │ │ │ │ ├── main.ts │ │ │ │ ├── polyfills.ts │ │ │ │ ├── styles.css │ │ │ │ ├── test.ts │ │ │ │ ├── tsconfig.app.json │ │ │ │ ├── tsconfig.server.json │ │ │ │ ├── tsconfig.spec.json │ │ │ │ └── tslint.json │ │ │ ├── tsconfig.json │ │ │ ├── tslint.json │ │ │ └── update-npm.bat │ │ ├── Controllers/ │ │ │ ├── CitiesController.cs │ │ │ ├── CountriesController.cs │ │ │ └── SeedController.cs │ │ ├── Data/ │ │ │ ├── ApiResult.cs │ │ │ ├── ApplicationDbContext.cs │ │ │ ├── CityDTO.cs │ │ │ ├── CountryDTO.cs │ │ │ ├── IQueryableExtensions.cs │ │ │ ├── Migrations/ │ │ │ │ ├── 20191123030140_Initial.Designer.cs │ │ │ │ ├── 20191123030140_Initial.cs │ │ │ │ └── ApplicationDbContextModelSnapshot.cs │ │ │ ├── Models/ │ │ │ │ ├── City.cs │ │ │ │ └── Country.cs │ │ │ └── Source/ │ │ │ └── worldcities.xlsx │ │ ├── Pages/ │ │ │ ├── Error.cshtml │ │ │ ├── Error.cshtml.cs │ │ │ └── _ViewImports.cshtml │ │ ├── Program.cs │ │ ├── Startup.cs │ │ ├── WorldCities.csproj │ │ ├── appsettings.Development.json │ │ └── appsettings.json │ └── WorldCities.Tests/ │ ├── CitiesController_Tests.cs │ └── WorldCities.Tests.csproj ├── Chapter_09.sln ├── Chapter_10/ │ ├── AuthSample/ │ │ ├── .gitignore │ │ ├── AuthSample.csproj │ │ ├── ClientApp/ │ │ │ ├── .editorconfig │ │ │ ├── .gitignore │ │ │ ├── README.md │ │ │ ├── angular.json │ │ │ ├── browserslist │ │ │ ├── e2e/ │ │ │ │ ├── protractor.conf.js │ │ │ │ ├── src/ │ │ │ │ │ ├── app.e2e-spec.ts │ │ │ │ │ └── app.po.ts │ │ │ │ └── tsconfig.e2e.json │ │ │ ├── package.json │ │ │ ├── src/ │ │ │ │ ├── api-authorization/ │ │ │ │ │ ├── api-authorization.constants.ts │ │ │ │ │ ├── api-authorization.module.spec.ts │ │ │ │ │ ├── api-authorization.module.ts │ │ │ │ │ ├── authorize.guard.spec.ts │ │ │ │ │ ├── authorize.guard.ts │ │ │ │ │ ├── authorize.interceptor.spec.ts │ │ │ │ │ ├── authorize.interceptor.ts │ │ │ │ │ ├── authorize.service.spec.ts │ │ │ │ │ ├── authorize.service.ts │ │ │ │ │ ├── login/ │ │ │ │ │ │ ├── login.component.css │ │ │ │ │ │ ├── login.component.html │ │ │ │ │ │ ├── login.component.spec.ts │ │ │ │ │ │ └── login.component.ts │ │ │ │ │ ├── login-menu/ │ │ │ │ │ │ ├── login-menu.component.css │ │ │ │ │ │ ├── login-menu.component.html │ │ │ │ │ │ ├── login-menu.component.spec.ts │ │ │ │ │ │ └── login-menu.component.ts │ │ │ │ │ └── logout/ │ │ │ │ │ ├── logout.component.css │ │ │ │ │ ├── logout.component.html │ │ │ │ │ ├── logout.component.spec.ts │ │ │ │ │ └── logout.component.ts │ │ │ │ ├── app/ │ │ │ │ │ ├── app.component.html │ │ │ │ │ ├── app.component.ts │ │ │ │ │ ├── app.module.ts │ │ │ │ │ ├── app.server.module.ts │ │ │ │ │ ├── counter/ │ │ │ │ │ │ ├── counter.component.html │ │ │ │ │ │ ├── counter.component.spec.ts │ │ │ │ │ │ └── counter.component.ts │ │ │ │ │ ├── fetch-data/ │ │ │ │ │ │ ├── fetch-data.component.html │ │ │ │ │ │ └── fetch-data.component.ts │ │ │ │ │ ├── home/ │ │ │ │ │ │ ├── home.component.html │ │ │ │ │ │ └── home.component.ts │ │ │ │ │ └── nav-menu/ │ │ │ │ │ ├── nav-menu.component.css │ │ │ │ │ ├── nav-menu.component.html │ │ │ │ │ └── nav-menu.component.ts │ │ │ │ ├── assets/ │ │ │ │ │ └── .gitkeep │ │ │ │ ├── environments/ │ │ │ │ │ ├── environment.prod.ts │ │ │ │ │ └── environment.ts │ │ │ │ ├── index.html │ │ │ │ ├── karma.conf.js │ │ │ │ ├── main.ts │ │ │ │ ├── polyfills.ts │ │ │ │ ├── styles.css │ │ │ │ ├── test.ts │ │ │ │ ├── tsconfig.app.json │ │ │ │ ├── tsconfig.server.json │ │ │ │ ├── tsconfig.spec.json │ │ │ │ └── tslint.json │ │ │ ├── tsconfig.json │ │ │ └── tslint.json │ │ ├── Controllers/ │ │ │ ├── OidcConfigurationController.cs │ │ │ └── WeatherForecastController.cs │ │ ├── Data/ │ │ │ ├── ApplicationDbContext.cs │ │ │ └── Migrations/ │ │ │ ├── 00000000000000_CreateIdentitySchema.Designer.cs │ │ │ ├── 00000000000000_CreateIdentitySchema.cs │ │ │ └── ApplicationDbContextModelSnapshot.cs │ │ ├── Models/ │ │ │ └── ApplicationUser.cs │ │ ├── Pages/ │ │ │ ├── Error.cshtml │ │ │ ├── Error.cshtml.cs │ │ │ ├── Shared/ │ │ │ │ └── _LoginPartial.cshtml │ │ │ └── _ViewImports.cshtml │ │ ├── Program.cs │ │ ├── Startup.cs │ │ ├── WeatherForecast.cs │ │ ├── appsettings.Development.json │ │ └── appsettings.json │ ├── WorldCities/ │ │ ├── .gitignore │ │ ├── ClientApp/ │ │ │ ├── .editorconfig │ │ │ ├── .gitignore │ │ │ ├── README.md │ │ │ ├── angular.json │ │ │ ├── browserslist │ │ │ ├── e2e/ │ │ │ │ ├── protractor.conf.js │ │ │ │ ├── src/ │ │ │ │ │ ├── app.e2e-spec.ts │ │ │ │ │ └── app.po.ts │ │ │ │ └── tsconfig.e2e.json │ │ │ ├── package.json │ │ │ ├── src/ │ │ │ │ ├── api-authorization/ │ │ │ │ │ ├── api-authorization.constants.ts │ │ │ │ │ ├── api-authorization.module.spec.ts │ │ │ │ │ ├── api-authorization.module.ts │ │ │ │ │ ├── authorize.guard.spec.ts │ │ │ │ │ ├── authorize.guard.ts │ │ │ │ │ ├── authorize.interceptor.spec.ts │ │ │ │ │ ├── authorize.interceptor.ts │ │ │ │ │ ├── authorize.service.spec.ts │ │ │ │ │ ├── authorize.service.ts │ │ │ │ │ ├── login/ │ │ │ │ │ │ ├── login.component.css │ │ │ │ │ │ ├── login.component.html │ │ │ │ │ │ ├── login.component.spec.ts │ │ │ │ │ │ └── login.component.ts │ │ │ │ │ ├── login-menu/ │ │ │ │ │ │ ├── login-menu.component.css │ │ │ │ │ │ ├── login-menu.component.html │ │ │ │ │ │ ├── login-menu.component.spec.ts │ │ │ │ │ │ └── login-menu.component.ts │ │ │ │ │ └── logout/ │ │ │ │ │ ├── logout.component.css │ │ │ │ │ ├── logout.component.html │ │ │ │ │ ├── logout.component.spec.ts │ │ │ │ │ └── logout.component.ts │ │ │ │ ├── app/ │ │ │ │ │ ├── angular-material.module.ts │ │ │ │ │ ├── app.component.html │ │ │ │ │ ├── app.component.ts │ │ │ │ │ ├── app.module.ts │ │ │ │ │ ├── app.server.module.ts │ │ │ │ │ ├── base.form.component.ts │ │ │ │ │ ├── base.service.ts │ │ │ │ │ ├── cities/ │ │ │ │ │ │ ├── cities.component.css │ │ │ │ │ │ ├── cities.component.html │ │ │ │ │ │ ├── cities.component.spec.ts │ │ │ │ │ │ ├── cities.component.ts │ │ │ │ │ │ ├── city-edit.component.css │ │ │ │ │ │ ├── city-edit.component.html │ │ │ │ │ │ ├── city-edit.component.ts │ │ │ │ │ │ ├── city.service.ts │ │ │ │ │ │ └── city.ts │ │ │ │ │ ├── countries/ │ │ │ │ │ │ ├── countries.component.css │ │ │ │ │ │ ├── countries.component.html │ │ │ │ │ │ ├── countries.component.ts │ │ │ │ │ │ ├── country-edit.component.css │ │ │ │ │ │ ├── country-edit.component.html │ │ │ │ │ │ ├── country-edit.component.ts │ │ │ │ │ │ ├── country.service.ts │ │ │ │ │ │ └── country.ts │ │ │ │ │ ├── home/ │ │ │ │ │ │ ├── home.component.html │ │ │ │ │ │ └── home.component.ts │ │ │ │ │ └── nav-menu/ │ │ │ │ │ ├── nav-menu.component.css │ │ │ │ │ ├── nav-menu.component.html │ │ │ │ │ └── nav-menu.component.ts │ │ │ │ ├── assets/ │ │ │ │ │ └── .gitkeep │ │ │ │ ├── environments/ │ │ │ │ │ ├── environment.prod.ts │ │ │ │ │ └── environment.ts │ │ │ │ ├── index.html │ │ │ │ ├── karma.conf.js │ │ │ │ ├── main.ts │ │ │ │ ├── polyfills.ts │ │ │ │ ├── styles.css │ │ │ │ ├── test.ts │ │ │ │ ├── tsconfig.app.json │ │ │ │ ├── tsconfig.server.json │ │ │ │ ├── tsconfig.spec.json │ │ │ │ └── tslint.json │ │ │ ├── tsconfig.json │ │ │ ├── tslint.json │ │ │ └── update-npm.bat │ │ ├── Controllers/ │ │ │ ├── CitiesController.cs │ │ │ ├── CountriesController.cs │ │ │ ├── OidcConfigurationController.cs │ │ │ └── SeedController.cs │ │ ├── Data/ │ │ │ ├── ApiResult.cs │ │ │ ├── ApplicationDbContext.cs │ │ │ ├── CityDTO.cs │ │ │ ├── CountryDTO.cs │ │ │ ├── IQueryableExtensions.cs │ │ │ ├── Migrations/ │ │ │ │ ├── 20191230002753_Identity.Designer.cs │ │ │ │ ├── 20191230002753_Identity.cs │ │ │ │ └── ApplicationDbContextModelSnapshot.cs │ │ │ ├── Models/ │ │ │ │ ├── ApplicationUser.cs │ │ │ │ ├── City.cs │ │ │ │ └── Country.cs │ │ │ └── Source/ │ │ │ └── worldcities.xlsx │ │ ├── Pages/ │ │ │ ├── Error.cshtml │ │ │ ├── Error.cshtml.cs │ │ │ ├── Shared/ │ │ │ │ └── _LoginPartial.cshtml │ │ │ └── _ViewImports.cshtml │ │ ├── Program.cs │ │ ├── Startup.cs │ │ ├── WorldCities.csproj │ │ ├── appsettings.Development.json │ │ └── appsettings.json │ └── WorldCities.Tests/ │ ├── CitiesController_Tests.cs │ ├── IdentityHelper.cs │ ├── SeedController_Tests.cs │ └── WorldCities.Tests.csproj ├── Chapter_10.sln ├── Chapter_11/ │ ├── HealthCheck/ │ │ ├── .config/ │ │ │ └── dotnet-tools.json │ │ ├── .gitignore │ │ ├── ClientApp/ │ │ │ ├── .editorconfig │ │ │ ├── .gitignore │ │ │ ├── README.md │ │ │ ├── angular.json │ │ │ ├── browserslist │ │ │ ├── e2e/ │ │ │ │ ├── protractor.conf.js │ │ │ │ ├── src/ │ │ │ │ │ ├── app.e2e-spec.ts │ │ │ │ │ └── app.po.ts │ │ │ │ └── tsconfig.e2e.json │ │ │ ├── ngsw-config.json │ │ │ ├── package.json │ │ │ ├── src/ │ │ │ │ ├── app/ │ │ │ │ │ ├── app.component.html │ │ │ │ │ ├── app.component.ts │ │ │ │ │ ├── app.module.ts │ │ │ │ │ ├── app.server.module.ts │ │ │ │ │ ├── health-check/ │ │ │ │ │ │ ├── health-check.component.css │ │ │ │ │ │ ├── health-check.component.html │ │ │ │ │ │ └── health-check.component.ts │ │ │ │ │ ├── home/ │ │ │ │ │ │ ├── home.component.html │ │ │ │ │ │ └── home.component.ts │ │ │ │ │ └── nav-menu/ │ │ │ │ │ ├── nav-menu.component.css │ │ │ │ │ ├── nav-menu.component.html │ │ │ │ │ └── nav-menu.component.ts │ │ │ │ ├── assets/ │ │ │ │ │ └── .gitkeep │ │ │ │ ├── environments/ │ │ │ │ │ ├── environment.prod.ts │ │ │ │ │ └── environment.ts │ │ │ │ ├── index.html │ │ │ │ ├── karma.conf.js │ │ │ │ ├── main.ts │ │ │ │ ├── manifest.webmanifest │ │ │ │ ├── ng-connection-service/ │ │ │ │ │ ├── connection-service.module.ts │ │ │ │ │ ├── connection-service.service.spec.ts │ │ │ │ │ └── connection-service.service.ts │ │ │ │ ├── polyfills.ts │ │ │ │ ├── styles.css │ │ │ │ ├── test.ts │ │ │ │ ├── tsconfig.app.json │ │ │ │ ├── tsconfig.server.json │ │ │ │ ├── tsconfig.spec.json │ │ │ │ └── tslint.json │ │ │ ├── tsconfig.json │ │ │ ├── tslint.json │ │ │ └── update-npm.bat │ │ ├── CustomHealthCheckOptions.cs │ │ ├── HealthCheck.csproj │ │ ├── ICMPHealthCheck.cs │ │ ├── Pages/ │ │ │ ├── Error.cshtml │ │ │ ├── Error.cshtml.cs │ │ │ └── _ViewImports.cshtml │ │ ├── Program.cs │ │ ├── Startup.cs │ │ ├── appsettings.Development.json │ │ ├── appsettings.json │ │ ├── libman.json │ │ └── wwwroot/ │ │ ├── isOnline.txt │ │ ├── manifest.webmanifest │ │ ├── ngsw-worker.js │ │ ├── ngsw.json │ │ ├── safety-worker.js │ │ └── test.html │ └── WorldCities/ │ ├── .gitignore │ ├── ClientApp/ │ │ ├── .editorconfig │ │ ├── .gitignore │ │ ├── README.md │ │ ├── angular.json │ │ ├── browserslist │ │ ├── e2e/ │ │ │ ├── protractor.conf.js │ │ │ ├── src/ │ │ │ │ ├── app.e2e-spec.ts │ │ │ │ └── app.po.ts │ │ │ └── tsconfig.e2e.json │ │ ├── ngsw-config.json │ │ ├── package.json │ │ ├── src/ │ │ │ ├── api-authorization/ │ │ │ │ ├── api-authorization.constants.ts │ │ │ │ ├── api-authorization.module.spec.ts │ │ │ │ ├── api-authorization.module.ts │ │ │ │ ├── authorize.guard.spec.ts │ │ │ │ ├── authorize.guard.ts │ │ │ │ ├── authorize.interceptor.spec.ts │ │ │ │ ├── authorize.interceptor.ts │ │ │ │ ├── authorize.service.spec.ts │ │ │ │ ├── authorize.service.ts │ │ │ │ ├── login/ │ │ │ │ │ ├── login.component.css │ │ │ │ │ ├── login.component.html │ │ │ │ │ ├── login.component.spec.ts │ │ │ │ │ └── login.component.ts │ │ │ │ ├── login-menu/ │ │ │ │ │ ├── login-menu.component.css │ │ │ │ │ ├── login-menu.component.html │ │ │ │ │ ├── login-menu.component.spec.ts │ │ │ │ │ └── login-menu.component.ts │ │ │ │ └── logout/ │ │ │ │ ├── logout.component.css │ │ │ │ ├── logout.component.html │ │ │ │ ├── logout.component.spec.ts │ │ │ │ └── logout.component.ts │ │ │ ├── app/ │ │ │ │ ├── angular-material.module.ts │ │ │ │ ├── app.component.html │ │ │ │ ├── app.component.ts │ │ │ │ ├── app.module.ts │ │ │ │ ├── app.server.module.ts │ │ │ │ ├── base.form.component.ts │ │ │ │ ├── base.service.ts │ │ │ │ ├── cities/ │ │ │ │ │ ├── cities.component.css │ │ │ │ │ ├── cities.component.html │ │ │ │ │ ├── cities.component.spec.ts │ │ │ │ │ ├── cities.component.ts │ │ │ │ │ ├── city-edit.component.css │ │ │ │ │ ├── city-edit.component.html │ │ │ │ │ ├── city-edit.component.ts │ │ │ │ │ ├── city.service.ts │ │ │ │ │ └── city.ts │ │ │ │ ├── countries/ │ │ │ │ │ ├── countries.component.css │ │ │ │ │ ├── countries.component.html │ │ │ │ │ ├── countries.component.ts │ │ │ │ │ ├── country-edit.component.css │ │ │ │ │ ├── country-edit.component.html │ │ │ │ │ ├── country-edit.component.ts │ │ │ │ │ ├── country.service.ts │ │ │ │ │ └── country.ts │ │ │ │ ├── home/ │ │ │ │ │ ├── home.component.html │ │ │ │ │ └── home.component.ts │ │ │ │ └── nav-menu/ │ │ │ │ ├── nav-menu.component.css │ │ │ │ ├── nav-menu.component.html │ │ │ │ └── nav-menu.component.ts │ │ │ ├── assets/ │ │ │ │ └── .gitkeep │ │ │ ├── environments/ │ │ │ │ ├── environment.prod.ts │ │ │ │ └── environment.ts │ │ │ ├── index.html │ │ │ ├── karma.conf.js │ │ │ ├── main.ts │ │ │ ├── manifest.webmanifest │ │ │ ├── ng-connection-service/ │ │ │ │ ├── connection-service.module.ts │ │ │ │ ├── connection-service.service.spec.ts │ │ │ │ └── connection-service.service.ts │ │ │ ├── polyfills.ts │ │ │ ├── styles.css │ │ │ ├── test.ts │ │ │ ├── tsconfig.app.json │ │ │ ├── tsconfig.server.json │ │ │ ├── tsconfig.spec.json │ │ │ └── tslint.json │ │ ├── tsconfig.json │ │ ├── tslint.json │ │ └── update-npm.bat │ ├── Controllers/ │ │ ├── CitiesController.cs │ │ ├── CountriesController.cs │ │ ├── OidcConfigurationController.cs │ │ └── SeedController.cs │ ├── Data/ │ │ ├── ApiResult.cs │ │ ├── ApplicationDbContext.cs │ │ ├── CityDTO.cs │ │ ├── CountryDTO.cs │ │ ├── IQueryableExtensions.cs │ │ ├── Migrations/ │ │ │ ├── 20191230002753_Identity.Designer.cs │ │ │ ├── 20191230002753_Identity.cs │ │ │ └── ApplicationDbContextModelSnapshot.cs │ │ ├── Models/ │ │ │ ├── ApplicationUser.cs │ │ │ ├── City.cs │ │ │ └── Country.cs │ │ └── Source/ │ │ └── worldcities.xlsx │ ├── Pages/ │ │ ├── Error.cshtml │ │ ├── Error.cshtml.cs │ │ ├── Shared/ │ │ │ └── _LoginPartial.cshtml │ │ └── _ViewImports.cshtml │ ├── Program.cs │ ├── Startup.cs │ ├── WorldCities.csproj │ ├── appsettings.Development.json │ ├── appsettings.json │ └── wwwroot/ │ ├── isOnline.txt │ ├── manifest.webmanifest │ ├── ngsw-worker.js │ ├── ngsw.json │ └── safety-worker.js ├── Chapter_11.sln ├── Chapter_12/ │ ├── HealthCheck/ │ │ ├── .config/ │ │ │ └── dotnet-tools.json │ │ ├── .gitignore │ │ ├── ClientApp/ │ │ │ ├── .editorconfig │ │ │ ├── .gitignore │ │ │ ├── README.md │ │ │ ├── angular.json │ │ │ ├── browserslist │ │ │ ├── e2e/ │ │ │ │ ├── protractor.conf.js │ │ │ │ ├── src/ │ │ │ │ │ ├── app.e2e-spec.ts │ │ │ │ │ └── app.po.ts │ │ │ │ └── tsconfig.e2e.json │ │ │ ├── ngsw-config.json │ │ │ ├── package.json │ │ │ ├── src/ │ │ │ │ ├── app/ │ │ │ │ │ ├── app.component.html │ │ │ │ │ ├── app.component.ts │ │ │ │ │ ├── app.module.ts │ │ │ │ │ ├── app.server.module.ts │ │ │ │ │ ├── health-check/ │ │ │ │ │ │ ├── health-check.component.css │ │ │ │ │ │ ├── health-check.component.html │ │ │ │ │ │ └── health-check.component.ts │ │ │ │ │ ├── home/ │ │ │ │ │ │ ├── home.component.html │ │ │ │ │ │ └── home.component.ts │ │ │ │ │ └── nav-menu/ │ │ │ │ │ ├── nav-menu.component.css │ │ │ │ │ ├── nav-menu.component.html │ │ │ │ │ └── nav-menu.component.ts │ │ │ │ ├── assets/ │ │ │ │ │ └── .gitkeep │ │ │ │ ├── environments/ │ │ │ │ │ ├── environment.prod.ts │ │ │ │ │ └── environment.ts │ │ │ │ ├── index.html │ │ │ │ ├── karma.conf.js │ │ │ │ ├── main.ts │ │ │ │ ├── manifest.webmanifest │ │ │ │ ├── ng-connection-service/ │ │ │ │ │ ├── connection-service.module.ts │ │ │ │ │ ├── connection-service.service.spec.ts │ │ │ │ │ └── connection-service.service.ts │ │ │ │ ├── polyfills.ts │ │ │ │ ├── styles.css │ │ │ │ ├── test.ts │ │ │ │ ├── tsconfig.app.json │ │ │ │ ├── tsconfig.server.json │ │ │ │ ├── tsconfig.spec.json │ │ │ │ └── tslint.json │ │ │ ├── tsconfig.json │ │ │ ├── tslint.json │ │ │ └── update-npm.bat │ │ ├── CustomHealthCheckOptions.cs │ │ ├── HealthCheck.csproj │ │ ├── ICMPHealthCheck.cs │ │ ├── Pages/ │ │ │ ├── Error.cshtml │ │ │ ├── Error.cshtml.cs │ │ │ └── _ViewImports.cshtml │ │ ├── Program.cs │ │ ├── Startup.cs │ │ ├── appsettings.Development.json │ │ ├── appsettings.json │ │ ├── libman.json │ │ └── wwwroot/ │ │ ├── isOnline.txt │ │ ├── manifest.webmanifest │ │ ├── ngsw-worker.js │ │ ├── ngsw.json │ │ ├── safety-worker.js │ │ └── test.html │ └── WorldCities/ │ ├── .gitignore │ ├── ClientApp/ │ │ ├── .editorconfig │ │ ├── .gitignore │ │ ├── README.md │ │ ├── angular.json │ │ ├── browserslist │ │ ├── e2e/ │ │ │ ├── protractor.conf.js │ │ │ ├── src/ │ │ │ │ ├── app.e2e-spec.ts │ │ │ │ └── app.po.ts │ │ │ └── tsconfig.e2e.json │ │ ├── ngsw-config.json │ │ ├── package.json │ │ ├── src/ │ │ │ ├── api-authorization/ │ │ │ │ ├── api-authorization.constants.ts │ │ │ │ ├── api-authorization.module.spec.ts │ │ │ │ ├── api-authorization.module.ts │ │ │ │ ├── authorize.guard.spec.ts │ │ │ │ ├── authorize.guard.ts │ │ │ │ ├── authorize.interceptor.spec.ts │ │ │ │ ├── authorize.interceptor.ts │ │ │ │ ├── authorize.service.spec.ts │ │ │ │ ├── authorize.service.ts │ │ │ │ ├── login/ │ │ │ │ │ ├── login.component.css │ │ │ │ │ ├── login.component.html │ │ │ │ │ ├── login.component.spec.ts │ │ │ │ │ └── login.component.ts │ │ │ │ ├── login-menu/ │ │ │ │ │ ├── login-menu.component.css │ │ │ │ │ ├── login-menu.component.html │ │ │ │ │ ├── login-menu.component.spec.ts │ │ │ │ │ └── login-menu.component.ts │ │ │ │ └── logout/ │ │ │ │ ├── logout.component.css │ │ │ │ ├── logout.component.html │ │ │ │ ├── logout.component.spec.ts │ │ │ │ └── logout.component.ts │ │ │ ├── app/ │ │ │ │ ├── angular-material.module.ts │ │ │ │ ├── app.component.html │ │ │ │ ├── app.component.ts │ │ │ │ ├── app.module.ts │ │ │ │ ├── app.server.module.ts │ │ │ │ ├── base.form.component.ts │ │ │ │ ├── base.service.ts │ │ │ │ ├── cities/ │ │ │ │ │ ├── cities.component.css │ │ │ │ │ ├── cities.component.html │ │ │ │ │ ├── cities.component.spec.ts │ │ │ │ │ ├── cities.component.ts │ │ │ │ │ ├── city-edit.component.css │ │ │ │ │ ├── city-edit.component.html │ │ │ │ │ ├── city-edit.component.ts │ │ │ │ │ ├── city.service.ts │ │ │ │ │ └── city.ts │ │ │ │ ├── countries/ │ │ │ │ │ ├── countries.component.css │ │ │ │ │ ├── countries.component.html │ │ │ │ │ ├── countries.component.ts │ │ │ │ │ ├── country-edit.component.css │ │ │ │ │ ├── country-edit.component.html │ │ │ │ │ ├── country-edit.component.ts │ │ │ │ │ ├── country.service.ts │ │ │ │ │ └── country.ts │ │ │ │ ├── home/ │ │ │ │ │ ├── home.component.html │ │ │ │ │ └── home.component.ts │ │ │ │ └── nav-menu/ │ │ │ │ ├── nav-menu.component.css │ │ │ │ ├── nav-menu.component.html │ │ │ │ └── nav-menu.component.ts │ │ │ ├── assets/ │ │ │ │ └── .gitkeep │ │ │ ├── environments/ │ │ │ │ ├── environment.prod.ts │ │ │ │ └── environment.ts │ │ │ ├── index.html │ │ │ ├── karma.conf.js │ │ │ ├── main.ts │ │ │ ├── manifest.webmanifest │ │ │ ├── ng-connection-service/ │ │ │ │ ├── connection-service.module.ts │ │ │ │ ├── connection-service.service.spec.ts │ │ │ │ └── connection-service.service.ts │ │ │ ├── polyfills.ts │ │ │ ├── styles.css │ │ │ ├── test.ts │ │ │ ├── tsconfig.app.json │ │ │ ├── tsconfig.server.json │ │ │ ├── tsconfig.spec.json │ │ │ └── tslint.json │ │ ├── tsconfig.json │ │ ├── tslint.json │ │ └── update-npm.bat │ ├── Controllers/ │ │ ├── CitiesController.cs │ │ ├── CountriesController.cs │ │ ├── OidcConfigurationController.cs │ │ └── SeedController.cs │ ├── Data/ │ │ ├── ApiResult.cs │ │ ├── ApplicationDbContext.cs │ │ ├── CityDTO.cs │ │ ├── CountryDTO.cs │ │ ├── IQueryableExtensions.cs │ │ ├── Migrations/ │ │ │ ├── 20191230002753_Identity.Designer.cs │ │ │ ├── 20191230002753_Identity.cs │ │ │ └── ApplicationDbContextModelSnapshot.cs │ │ ├── Models/ │ │ │ ├── ApplicationUser.cs │ │ │ ├── City.cs │ │ │ └── Country.cs │ │ └── Source/ │ │ └── worldcities.xlsx │ ├── Pages/ │ │ ├── Error.cshtml │ │ ├── Error.cshtml.cs │ │ ├── Shared/ │ │ │ └── _LoginPartial.cshtml │ │ └── _ViewImports.cshtml │ ├── Program.cs │ ├── Startup.cs │ ├── WorldCities.csproj │ ├── _LinuxVM_ConfigFiles/ │ │ ├── kestrel-worldcities.service │ │ ├── nginx-worldcities.conf │ │ └── nginx.conf │ ├── appsettings.Development.json │ ├── appsettings.json │ └── wwwroot/ │ ├── isOnline.txt │ ├── manifest.webmanifest │ ├── ngsw-worker.js │ ├── ngsw.json │ └── safety-worker.js ├── Chapter_12.sln ├── LICENSE └── README.md
SYMBOL INDEX (2086 symbols across 426 files)
FILE: Chapter_01/HealthCheck/ClientApp/e2e/protractor.conf.js
method onPrepare (line 20) | onPrepare() {
FILE: Chapter_01/HealthCheck/ClientApp/e2e/src/app.po.ts
class AppPage (line 3) | class AppPage {
method navigateTo (line 4) | navigateTo() {
method getMainHeading (line 8) | getMainHeading() {
FILE: Chapter_01/HealthCheck/ClientApp/src/app/app.component.ts
class AppComponent (line 7) | class AppComponent {
FILE: Chapter_01/HealthCheck/ClientApp/src/app/app.module.ts
class AppModule (line 34) | class AppModule { }
FILE: Chapter_01/HealthCheck/ClientApp/src/app/app.server.module.ts
class AppServerModule (line 11) | class AppServerModule { }
FILE: Chapter_01/HealthCheck/ClientApp/src/app/counter/counter.component.ts
class CounterComponent (line 7) | class CounterComponent {
method incrementCounter (line 10) | public incrementCounter() {
FILE: Chapter_01/HealthCheck/ClientApp/src/app/fetch-data/fetch-data.component.ts
class FetchDataComponent (line 8) | class FetchDataComponent {
method constructor (line 11) | constructor(http: HttpClient, @Inject('BASE_URL') baseUrl: string) {
type WeatherForecast (line 18) | interface WeatherForecast {
FILE: Chapter_01/HealthCheck/ClientApp/src/app/home/home.component.ts
class HomeComponent (line 7) | class HomeComponent {
FILE: Chapter_01/HealthCheck/ClientApp/src/app/nav-menu/nav-menu.component.ts
class NavMenuComponent (line 8) | class NavMenuComponent {
method collapse (line 11) | collapse() {
method toggle (line 15) | toggle() {
FILE: Chapter_01/HealthCheck/ClientApp/src/main.ts
function getBaseUrl (line 7) | function getBaseUrl() {
FILE: Chapter_01/HealthCheck/Controllers/WeatherForecastController.cs
class WeatherForecastController (line 10) | [ApiController]
method WeatherForecastController (line 21) | public WeatherForecastController(ILogger<WeatherForecastController> lo...
method Get (line 26) | [HttpGet]
FILE: Chapter_01/HealthCheck/Pages/Error.cshtml.cs
class ErrorModel (line 12) | [ResponseCache(Duration = 0, Location = ResponseCacheLocation.None, NoSt...
method ErrorModel (line 17) | public ErrorModel(ILogger<ErrorModel> logger)
method OnGet (line 26) | public void OnGet()
FILE: Chapter_01/HealthCheck/Program.cs
class Program (line 12) | public class Program
method Main (line 14) | public static void Main(string[] args)
method CreateWebHostBuilder (line 19) | public static IWebHostBuilder CreateWebHostBuilder(string[] args) =>
FILE: Chapter_01/HealthCheck/Startup.cs
class Startup (line 11) | public class Startup
method Startup (line 13) | public Startup(IConfiguration configuration)
method ConfigureServices (line 21) | public void ConfigureServices(IServiceCollection services)
method Configure (line 32) | public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
FILE: Chapter_01/HealthCheck/WeatherForecast.cs
class WeatherForecast (line 5) | public class WeatherForecast
FILE: Chapter_02/HealthCheck/ClientApp/e2e/protractor.conf.js
method onPrepare (line 20) | onPrepare() {
FILE: Chapter_02/HealthCheck/ClientApp/e2e/src/app.po.ts
class AppPage (line 3) | class AppPage {
method navigateTo (line 4) | navigateTo() {
method getMainHeading (line 8) | getMainHeading() {
FILE: Chapter_02/HealthCheck/ClientApp/src/app/app.component.ts
class AppComponent (line 7) | class AppComponent {
FILE: Chapter_02/HealthCheck/ClientApp/src/app/app.module.ts
class AppModule (line 28) | class AppModule { }
FILE: Chapter_02/HealthCheck/ClientApp/src/app/app.server.module.ts
class AppServerModule (line 11) | class AppServerModule { }
FILE: Chapter_02/HealthCheck/ClientApp/src/app/home/home.component.ts
class HomeComponent (line 7) | class HomeComponent {
FILE: Chapter_02/HealthCheck/ClientApp/src/app/nav-menu/nav-menu.component.ts
class NavMenuComponent (line 8) | class NavMenuComponent {
method collapse (line 11) | collapse() {
method toggle (line 15) | toggle() {
FILE: Chapter_02/HealthCheck/ClientApp/src/main.ts
function getBaseUrl (line 7) | function getBaseUrl() {
FILE: Chapter_02/HealthCheck/Pages/Error.cshtml.cs
class ErrorModel (line 12) | [ResponseCache(Duration = 0, Location = ResponseCacheLocation.None, NoSt...
method ErrorModel (line 17) | public ErrorModel(ILogger<ErrorModel> logger)
method OnGet (line 26) | public void OnGet()
FILE: Chapter_02/HealthCheck/Program.cs
class Program (line 12) | public class Program
method Main (line 14) | public static void Main(string[] args)
method CreateWebHostBuilder (line 19) | public static IWebHostBuilder CreateWebHostBuilder(string[] args) =>
FILE: Chapter_02/HealthCheck/Startup.cs
class Startup (line 11) | public class Startup
method Startup (line 13) | public Startup(IConfiguration configuration)
method ConfigureServices (line 21) | public void ConfigureServices(IServiceCollection services)
method Configure (line 32) | public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
FILE: Chapter_03/HealthCheck/ClientApp/e2e/protractor.conf.js
method onPrepare (line 20) | onPrepare() {
FILE: Chapter_03/HealthCheck/ClientApp/e2e/src/app.po.ts
class AppPage (line 3) | class AppPage {
method navigateTo (line 4) | navigateTo() {
method getMainHeading (line 8) | getMainHeading() {
FILE: Chapter_03/HealthCheck/ClientApp/src/app/app.component.ts
class AppComponent (line 7) | class AppComponent {
FILE: Chapter_03/HealthCheck/ClientApp/src/app/app.module.ts
class AppModule (line 31) | class AppModule { }
FILE: Chapter_03/HealthCheck/ClientApp/src/app/app.server.module.ts
class AppServerModule (line 11) | class AppServerModule { }
FILE: Chapter_03/HealthCheck/ClientApp/src/app/health-check/health-check.component.ts
class HealthCheckComponent (line 9) | class HealthCheckComponent {
method constructor (line 12) | constructor(
method ngOnInit (line 17) | ngOnInit() {
type Result (line 24) | interface Result {
type Check (line 30) | interface Check {
FILE: Chapter_03/HealthCheck/ClientApp/src/app/home/home.component.ts
class HomeComponent (line 7) | class HomeComponent {
FILE: Chapter_03/HealthCheck/ClientApp/src/app/nav-menu/nav-menu.component.ts
class NavMenuComponent (line 8) | class NavMenuComponent {
method collapse (line 11) | collapse() {
method toggle (line 15) | toggle() {
FILE: Chapter_03/HealthCheck/ClientApp/src/main.ts
function getBaseUrl (line 7) | function getBaseUrl() {
FILE: Chapter_03/HealthCheck/CustomHealthCheckOptions.cs
class CustomHealthCheckOptions (line 9) | public class CustomHealthCheckOptions : HealthCheckOptions
method CustomHealthCheckOptions (line 11) | public CustomHealthCheckOptions() : base()
FILE: Chapter_03/HealthCheck/ICMPHealthCheck.cs
class ICMPHealthCheck (line 9) | public class ICMPHealthCheck : IHealthCheck
method ICMPHealthCheck (line 14) | public ICMPHealthCheck(string host, int timeout)
method CheckHealthAsync (line 20) | public async Task<HealthCheckResult> CheckHealthAsync(
FILE: Chapter_03/HealthCheck/Pages/Error.cshtml.cs
class ErrorModel (line 12) | [ResponseCache(Duration = 0, Location = ResponseCacheLocation.None, NoSt...
method ErrorModel (line 17) | public ErrorModel(ILogger<ErrorModel> logger)
method OnGet (line 26) | public void OnGet()
FILE: Chapter_03/HealthCheck/Program.cs
class Program (line 12) | public class Program
method Main (line 14) | public static void Main(string[] args)
method CreateWebHostBuilder (line 19) | public static IWebHostBuilder CreateWebHostBuilder(string[] args) =>
FILE: Chapter_03/HealthCheck/Startup.cs
class Startup (line 11) | public class Startup
method Startup (line 13) | public Startup(IConfiguration configuration)
method ConfigureServices (line 21) | public void ConfigureServices(IServiceCollection services)
method Configure (line 37) | public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
FILE: Chapter_04/WorldCities/ClientApp/e2e/protractor.conf.js
method onPrepare (line 20) | onPrepare() {
FILE: Chapter_04/WorldCities/ClientApp/e2e/src/app.po.ts
class AppPage (line 3) | class AppPage {
method navigateTo (line 4) | navigateTo() {
method getMainHeading (line 8) | getMainHeading() {
FILE: Chapter_04/WorldCities/ClientApp/src/app/app.component.ts
class AppComponent (line 7) | class AppComponent {
FILE: Chapter_04/WorldCities/ClientApp/src/app/app.module.ts
class AppModule (line 28) | class AppModule { }
FILE: Chapter_04/WorldCities/ClientApp/src/app/app.server.module.ts
class AppServerModule (line 11) | class AppServerModule { }
FILE: Chapter_04/WorldCities/ClientApp/src/app/home/home.component.ts
class HomeComponent (line 7) | class HomeComponent {
FILE: Chapter_04/WorldCities/ClientApp/src/app/nav-menu/nav-menu.component.ts
class NavMenuComponent (line 8) | class NavMenuComponent {
method collapse (line 11) | collapse() {
method toggle (line 15) | toggle() {
FILE: Chapter_04/WorldCities/ClientApp/src/main.ts
function getBaseUrl (line 7) | function getBaseUrl() {
FILE: Chapter_04/WorldCities/Controllers/CitiesController.cs
class CitiesController (line 13) | [Route("api/[controller]")]
method CitiesController (line 19) | public CitiesController(ApplicationDbContext context)
method GetCities (line 25) | [HttpGet]
method GetCity (line 32) | [HttpGet("{id}")]
method PutCity (line 48) | [HttpPut("{id}")]
method PostCity (line 80) | [HttpPost]
method DeleteCity (line 90) | [HttpDelete("{id}")]
method CityExists (line 105) | private bool CityExists(int id)
FILE: Chapter_04/WorldCities/Controllers/CountriesController.cs
class CountriesController (line 13) | [Route("api/[controller]")]
method CountriesController (line 19) | public CountriesController(ApplicationDbContext context)
method GetCountries (line 25) | [HttpGet]
method GetCountry (line 32) | [HttpGet("{id}")]
method PutCountry (line 48) | [HttpPut("{id}")]
method PostCountry (line 80) | [HttpPost]
method DeleteCountry (line 90) | [HttpDelete("{id}")]
method CountryExists (line 105) | private bool CountryExists(int id)
FILE: Chapter_04/WorldCities/Controllers/SeedController.cs
class SeedController (line 16) | [Route("api/[controller]/[action]")]
method SeedController (line 23) | public SeedController(
method Import (line 31) | [HttpGet]
FILE: Chapter_04/WorldCities/Data/ApplicationDbContext.cs
class ApplicationDbContext (line 6) | public class ApplicationDbContext : DbContext
method ApplicationDbContext (line 9) | public ApplicationDbContext() : base()
method ApplicationDbContext (line 13) | public ApplicationDbContext(DbContextOptions options) : base(options)
method OnModelCreating (line 19) | protected override void OnModelCreating(ModelBuilder modelBuilder)
FILE: Chapter_04/WorldCities/Data/Migrations/20191123030140_Initial.Designer.cs
class Initial (line 11) | [DbContext(typeof(ApplicationDbContext))]
method BuildTargetModel (line 15) | protected override void BuildTargetModel(ModelBuilder modelBuilder)
FILE: Chapter_04/WorldCities/Data/Migrations/20191123030140_Initial.cs
class Initial (line 5) | public partial class Initial : Migration
method Up (line 7) | protected override void Up(MigrationBuilder migrationBuilder)
method Down (line 53) | protected override void Down(MigrationBuilder migrationBuilder)
FILE: Chapter_04/WorldCities/Data/Migrations/ApplicationDbContextModelSnapshot.cs
class ApplicationDbContextModelSnapshot (line 10) | [DbContext(typeof(ApplicationDbContext))]
method BuildModel (line 13) | protected override void BuildModel(ModelBuilder modelBuilder)
FILE: Chapter_04/WorldCities/Data/Models/City.cs
class City (line 10) | public class City
method City (line 13) | public City()
FILE: Chapter_04/WorldCities/Data/Models/Country.cs
class Country (line 9) | public class Country
method Country (line 12) | public Country()
FILE: Chapter_04/WorldCities/Pages/Error.cshtml.cs
class ErrorModel (line 12) | [ResponseCache(Duration = 0, Location = ResponseCacheLocation.None, NoSt...
method ErrorModel (line 17) | public ErrorModel(ILogger<ErrorModel> logger)
method OnGet (line 26) | public void OnGet()
FILE: Chapter_04/WorldCities/Program.cs
class Program (line 12) | public class Program
method Main (line 14) | public static void Main(string[] args)
method CreateWebHostBuilder (line 19) | public static IWebHostBuilder CreateWebHostBuilder(string[] args) =>
FILE: Chapter_04/WorldCities/Startup.cs
class Startup (line 13) | public class Startup
method Startup (line 15) | public Startup(IConfiguration configuration)
method ConfigureServices (line 23) | public void ConfigureServices(IServiceCollection services)
method Configure (line 44) | public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
FILE: Chapter_05/WorldCities/ClientApp/e2e/protractor.conf.js
method onPrepare (line 20) | onPrepare() {
FILE: Chapter_05/WorldCities/ClientApp/e2e/src/app.po.ts
class AppPage (line 3) | class AppPage {
method navigateTo (line 4) | navigateTo() {
method getMainHeading (line 8) | getMainHeading() {
FILE: Chapter_05/WorldCities/ClientApp/src/app/angular-material.module.ts
class AngularMaterialModule (line 22) | class AngularMaterialModule { }
FILE: Chapter_05/WorldCities/ClientApp/src/app/app.component.ts
class AppComponent (line 7) | class AppComponent {
FILE: Chapter_05/WorldCities/ClientApp/src/app/app.module.ts
class AppModule (line 38) | class AppModule { }
FILE: Chapter_05/WorldCities/ClientApp/src/app/app.server.module.ts
class AppServerModule (line 11) | class AppServerModule { }
FILE: Chapter_05/WorldCities/ClientApp/src/app/cities/cities.component.ts
class CitiesComponent (line 14) | class CitiesComponent {
method constructor (line 29) | constructor(
method ngOnInit (line 34) | ngOnInit() {
method loadData (line 38) | loadData(query: string = null) {
method getData (line 48) | getData(event: PageEvent) {
FILE: Chapter_05/WorldCities/ClientApp/src/app/cities/city.ts
type City (line 1) | interface City {
FILE: Chapter_05/WorldCities/ClientApp/src/app/countries/countries.component.ts
class CountriesComponent (line 14) | class CountriesComponent {
method constructor (line 29) | constructor(
method ngOnInit (line 34) | ngOnInit() {
method loadData (line 38) | loadData(query: string = null) {
method getData (line 48) | getData(event: PageEvent) {
FILE: Chapter_05/WorldCities/ClientApp/src/app/countries/country.ts
type Country (line 1) | interface Country {
FILE: Chapter_05/WorldCities/ClientApp/src/app/home/home.component.ts
class HomeComponent (line 7) | class HomeComponent {
FILE: Chapter_05/WorldCities/ClientApp/src/app/nav-menu/nav-menu.component.ts
class NavMenuComponent (line 8) | class NavMenuComponent {
method collapse (line 11) | collapse() {
method toggle (line 15) | toggle() {
FILE: Chapter_05/WorldCities/ClientApp/src/main.ts
function getBaseUrl (line 8) | function getBaseUrl() {
FILE: Chapter_05/WorldCities/Controllers/CitiesController.cs
class CitiesController (line 13) | [Route("api/[controller]")]
method CitiesController (line 19) | public CitiesController(ApplicationDbContext context)
method GetCities (line 28) | [HttpGet]
method GetCity (line 48) | [HttpGet("{id}")]
method PutCity (line 64) | [HttpPut("{id}")]
method PostCity (line 96) | [HttpPost]
method DeleteCity (line 106) | [HttpDelete("{id}")]
method CityExists (line 121) | private bool CityExists(int id)
FILE: Chapter_05/WorldCities/Controllers/CountriesController.cs
class CountriesController (line 13) | [Route("api/[controller]")]
method CountriesController (line 19) | public CountriesController(ApplicationDbContext context)
method GetCountries (line 28) | [HttpGet]
method GetCountry (line 49) | [HttpGet("{id}")]
method PutCountry (line 65) | [HttpPut("{id}")]
method PostCountry (line 97) | [HttpPost]
method DeleteCountry (line 107) | [HttpDelete("{id}")]
method CountryExists (line 122) | private bool CountryExists(int id)
FILE: Chapter_05/WorldCities/Controllers/SeedController.cs
class SeedController (line 16) | [Route("api/[controller]/[action]")]
method SeedController (line 23) | public SeedController(
method Import (line 31) | [HttpGet]
FILE: Chapter_05/WorldCities/Data/ApiResult.cs
class ApiResult (line 11) | public class ApiResult<T>
method ApiResult (line 16) | private ApiResult(
method CreateAsync (line 52) | public static async Task<ApiResult<T>> CreateAsync(
method IsValidProperty (line 109) | public static bool IsValidProperty(
FILE: Chapter_05/WorldCities/Data/ApplicationDbContext.cs
class ApplicationDbContext (line 6) | public class ApplicationDbContext : DbContext
method ApplicationDbContext (line 9) | public ApplicationDbContext() : base()
method ApplicationDbContext (line 13) | public ApplicationDbContext(DbContextOptions options) : base(options)
method OnModelCreating (line 19) | protected override void OnModelCreating(ModelBuilder modelBuilder)
FILE: Chapter_05/WorldCities/Data/Migrations/20191123030140_Initial.Designer.cs
class Initial (line 11) | [DbContext(typeof(ApplicationDbContext))]
method BuildTargetModel (line 15) | protected override void BuildTargetModel(ModelBuilder modelBuilder)
FILE: Chapter_05/WorldCities/Data/Migrations/20191123030140_Initial.cs
class Initial (line 5) | public partial class Initial : Migration
method Up (line 7) | protected override void Up(MigrationBuilder migrationBuilder)
method Down (line 53) | protected override void Down(MigrationBuilder migrationBuilder)
FILE: Chapter_05/WorldCities/Data/Migrations/ApplicationDbContextModelSnapshot.cs
class ApplicationDbContextModelSnapshot (line 10) | [DbContext(typeof(ApplicationDbContext))]
method BuildModel (line 13) | protected override void BuildModel(ModelBuilder modelBuilder)
FILE: Chapter_05/WorldCities/Data/Models/City.cs
class City (line 10) | public class City
method City (line 13) | public City()
FILE: Chapter_05/WorldCities/Data/Models/Country.cs
class Country (line 10) | public class Country
method Country (line 13) | public Country()
FILE: Chapter_05/WorldCities/Pages/Error.cshtml.cs
class ErrorModel (line 12) | [ResponseCache(Duration = 0, Location = ResponseCacheLocation.None, NoSt...
method ErrorModel (line 17) | public ErrorModel(ILogger<ErrorModel> logger)
method OnGet (line 26) | public void OnGet()
FILE: Chapter_05/WorldCities/Program.cs
class Program (line 12) | public class Program
method Main (line 14) | public static void Main(string[] args)
method CreateWebHostBuilder (line 19) | public static IWebHostBuilder CreateWebHostBuilder(string[] args) =>
FILE: Chapter_05/WorldCities/Startup.cs
class Startup (line 14) | public class Startup
method Startup (line 16) | public Startup(IConfiguration configuration)
method ConfigureServices (line 24) | public void ConfigureServices(IServiceCollection services)
method Configure (line 53) | public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
FILE: Chapter_06/WorldCities/ClientApp/e2e/protractor.conf.js
method onPrepare (line 20) | onPrepare() {
FILE: Chapter_06/WorldCities/ClientApp/e2e/src/app.po.ts
class AppPage (line 3) | class AppPage {
method navigateTo (line 4) | navigateTo() {
method getMainHeading (line 8) | getMainHeading() {
FILE: Chapter_06/WorldCities/ClientApp/src/app/angular-material.module.ts
class AngularMaterialModule (line 25) | class AngularMaterialModule { }
FILE: Chapter_06/WorldCities/ClientApp/src/app/app.component.ts
class AppComponent (line 7) | class AppComponent {
FILE: Chapter_06/WorldCities/ClientApp/src/app/app.module.ts
class AppModule (line 48) | class AppModule { }
FILE: Chapter_06/WorldCities/ClientApp/src/app/app.server.module.ts
class AppServerModule (line 11) | class AppServerModule { }
FILE: Chapter_06/WorldCities/ClientApp/src/app/cities/cities.component.ts
class CitiesComponent (line 14) | class CitiesComponent {
method constructor (line 29) | constructor(
method ngOnInit (line 34) | ngOnInit() {
method loadData (line 38) | loadData(query: string = null) {
method getData (line 48) | getData(event: PageEvent) {
FILE: Chapter_06/WorldCities/ClientApp/src/app/cities/city-edit.component.ts
class CityEditComponent (line 16) | class CityEditComponent {
method constructor (line 35) | constructor(
method ngOnInit (line 42) | ngOnInit() {
method loadData (line 53) | loadData() {
method loadCountries (line 80) | loadCountries() {
method onSubmit (line 93) | onSubmit() {
method isDupeCity (line 131) | isDupeCity(): AsyncValidatorFn {
FILE: Chapter_06/WorldCities/ClientApp/src/app/cities/city.ts
type City (line 1) | interface City {
FILE: Chapter_06/WorldCities/ClientApp/src/app/countries/countries.component.ts
class CountriesComponent (line 14) | class CountriesComponent {
method constructor (line 29) | constructor(
method ngOnInit (line 34) | ngOnInit() {
method loadData (line 38) | loadData(query: string = null) {
method getData (line 48) | getData(event: PageEvent) {
FILE: Chapter_06/WorldCities/ClientApp/src/app/countries/country-edit.component.ts
class CountryEditComponent (line 15) | class CountryEditComponent {
method constructor (line 31) | constructor(
method ngOnInit (line 40) | ngOnInit() {
method loadData (line 65) | loadData() {
method onSubmit (line 89) | onSubmit() {
method isDupeField (line 126) | isDupeField(fieldName: string): AsyncValidatorFn {
FILE: Chapter_06/WorldCities/ClientApp/src/app/countries/country.ts
type Country (line 1) | interface Country {
FILE: Chapter_06/WorldCities/ClientApp/src/app/home/home.component.ts
class HomeComponent (line 7) | class HomeComponent {
FILE: Chapter_06/WorldCities/ClientApp/src/app/nav-menu/nav-menu.component.ts
class NavMenuComponent (line 8) | class NavMenuComponent {
method collapse (line 11) | collapse() {
method toggle (line 15) | toggle() {
FILE: Chapter_06/WorldCities/ClientApp/src/main.ts
function getBaseUrl (line 8) | function getBaseUrl() {
FILE: Chapter_06/WorldCities/Controllers/CitiesController.cs
class CitiesController (line 13) | [Route("api/[controller]")]
method CitiesController (line 19) | public CitiesController(ApplicationDbContext context)
method GetCities (line 28) | [HttpGet]
method GetCity (line 48) | [HttpGet("{id}")]
method PutCity (line 64) | [HttpPut("{id}")]
method PostCity (line 102) | [HttpPost]
method DeleteCity (line 112) | [HttpDelete("{id}")]
method CityExists (line 127) | private bool CityExists(int id)
method IsDupeCity (line 132) | [HttpPost]
FILE: Chapter_06/WorldCities/Controllers/CountriesController.cs
class CountriesController (line 14) | [Route("api/[controller]")]
method CountriesController (line 20) | public CountriesController(ApplicationDbContext context)
method GetCountries (line 29) | [HttpGet]
method GetCountry (line 50) | [HttpGet("{id}")]
method PutCountry (line 66) | [HttpPut("{id}")]
method PostCountry (line 98) | [HttpPost]
method DeleteCountry (line 108) | [HttpDelete("{id}")]
method CountryExists (line 123) | private bool CountryExists(int id)
method IsDupeField (line 128) | [HttpPost]
FILE: Chapter_06/WorldCities/Controllers/SeedController.cs
class SeedController (line 16) | [Route("api/[controller]/[action]")]
method SeedController (line 23) | public SeedController(
method Import (line 31) | [HttpGet]
FILE: Chapter_06/WorldCities/Data/ApiResult.cs
class ApiResult (line 11) | public class ApiResult<T>
method ApiResult (line 16) | private ApiResult(
method CreateAsync (line 52) | public static async Task<ApiResult<T>> CreateAsync(
method IsValidProperty (line 109) | public static bool IsValidProperty(
FILE: Chapter_06/WorldCities/Data/ApplicationDbContext.cs
class ApplicationDbContext (line 6) | public class ApplicationDbContext : DbContext
method ApplicationDbContext (line 9) | public ApplicationDbContext() : base()
method ApplicationDbContext (line 13) | public ApplicationDbContext(DbContextOptions options) : base(options)
method OnModelCreating (line 19) | protected override void OnModelCreating(ModelBuilder modelBuilder)
FILE: Chapter_06/WorldCities/Data/Migrations/20191123030140_Initial.Designer.cs
class Initial (line 11) | [DbContext(typeof(ApplicationDbContext))]
method BuildTargetModel (line 15) | protected override void BuildTargetModel(ModelBuilder modelBuilder)
FILE: Chapter_06/WorldCities/Data/Migrations/20191123030140_Initial.cs
class Initial (line 5) | public partial class Initial : Migration
method Up (line 7) | protected override void Up(MigrationBuilder migrationBuilder)
method Down (line 53) | protected override void Down(MigrationBuilder migrationBuilder)
FILE: Chapter_06/WorldCities/Data/Migrations/ApplicationDbContextModelSnapshot.cs
class ApplicationDbContextModelSnapshot (line 10) | [DbContext(typeof(ApplicationDbContext))]
method BuildModel (line 13) | protected override void BuildModel(ModelBuilder modelBuilder)
FILE: Chapter_06/WorldCities/Data/Models/City.cs
class City (line 10) | public class City
method City (line 13) | public City()
FILE: Chapter_06/WorldCities/Data/Models/Country.cs
class Country (line 10) | public class Country
method Country (line 13) | public Country()
FILE: Chapter_06/WorldCities/Pages/Error.cshtml.cs
class ErrorModel (line 12) | [ResponseCache(Duration = 0, Location = ResponseCacheLocation.None, NoSt...
method ErrorModel (line 17) | public ErrorModel(ILogger<ErrorModel> logger)
method OnGet (line 26) | public void OnGet()
FILE: Chapter_06/WorldCities/Program.cs
class Program (line 12) | public class Program
method Main (line 14) | public static void Main(string[] args)
method CreateWebHostBuilder (line 19) | public static IWebHostBuilder CreateWebHostBuilder(string[] args) =>
FILE: Chapter_06/WorldCities/Startup.cs
class Startup (line 14) | public class Startup
method Startup (line 16) | public Startup(IConfiguration configuration)
method ConfigureServices (line 24) | public void ConfigureServices(IServiceCollection services)
method Configure (line 53) | public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
FILE: Chapter_07/WorldCities/ClientApp/e2e/protractor.conf.js
method onPrepare (line 20) | onPrepare() {
FILE: Chapter_07/WorldCities/ClientApp/e2e/src/app.po.ts
class AppPage (line 3) | class AppPage {
method navigateTo (line 4) | navigateTo() {
method getMainHeading (line 8) | getMainHeading() {
FILE: Chapter_07/WorldCities/ClientApp/src/app/angular-material.module.ts
class AngularMaterialModule (line 25) | class AngularMaterialModule { }
FILE: Chapter_07/WorldCities/ClientApp/src/app/app.component.ts
class AppComponent (line 7) | class AppComponent {
FILE: Chapter_07/WorldCities/ClientApp/src/app/app.module.ts
class AppModule (line 50) | class AppModule { }
FILE: Chapter_07/WorldCities/ClientApp/src/app/app.server.module.ts
class AppServerModule (line 11) | class AppServerModule { }
FILE: Chapter_07/WorldCities/ClientApp/src/app/base.form.component.ts
class BaseFormComponent (line 7) | class BaseFormComponent {
method constructor (line 12) | constructor() {
method getControl (line 16) | getControl(name: string) {
method isValid (line 21) | isValid(name: string) {
method isChanged (line 27) | isChanged(name: string) {
method hasError (line 34) | hasError(name: string) {
FILE: Chapter_07/WorldCities/ClientApp/src/app/base.service.ts
method constructor (line 7) | constructor(
type ApiResult (line 26) | interface ApiResult<T> {
FILE: Chapter_07/WorldCities/ClientApp/src/app/cities/cities.component.ts
class CitiesComponent (line 16) | class CitiesComponent {
method constructor (line 31) | constructor(
method ngOnInit (line 35) | ngOnInit() {
method loadData (line 39) | loadData(query: string = null) {
method getData (line 49) | getData(event: PageEvent) {
FILE: Chapter_07/WorldCities/ClientApp/src/app/cities/city-edit.component.ts
class CityEditComponent (line 19) | class CityEditComponent
method constructor (line 39) | constructor(
method ngOnInit (line 46) | ngOnInit() {
method loadData (line 63) | loadData() {
method loadCountries (line 89) | loadCountries() {
method onSubmit (line 103) | onSubmit() {
method isDupeCity (line 138) | isDupeCity(): AsyncValidatorFn {
FILE: Chapter_07/WorldCities/ClientApp/src/app/cities/city.service.ts
class CityService (line 11) | class CityService
method constructor (line 13) | constructor(
method getData (line 19) | getData<ApiResult>(
method get (line 43) | get<City>(id): Observable<City> {
method put (line 48) | put<City>(item): Observable<City> {
method post (line 53) | post<City>(item): Observable<City> {
method getCountries (line 58) | getCountries<ApiResult>(
method isDupeCity (line 82) | isDupeCity(item): Observable<boolean> {
FILE: Chapter_07/WorldCities/ClientApp/src/app/cities/city.ts
type City (line 1) | interface City {
FILE: Chapter_07/WorldCities/ClientApp/src/app/countries/countries.component.ts
class CountriesComponent (line 16) | class CountriesComponent {
method constructor (line 31) | constructor(
method ngOnInit (line 35) | ngOnInit() {
method loadData (line 39) | loadData(query: string = null) {
method getData (line 49) | getData(event: PageEvent) {
FILE: Chapter_07/WorldCities/ClientApp/src/app/countries/country-edit.component.ts
class CountryEditComponent (line 17) | class CountryEditComponent
method constructor (line 34) | constructor(
method ngOnInit (line 42) | ngOnInit() {
method loadData (line 67) | loadData() {
method onSubmit (line 91) | onSubmit() {
method isDupeField (line 125) | isDupeField(fieldName: string): AsyncValidatorFn {
FILE: Chapter_07/WorldCities/ClientApp/src/app/countries/country.service.ts
class CountryService (line 11) | class CountryService
method constructor (line 13) | constructor(
method getData (line 19) | getData<ApiResult>(
method get (line 43) | get<Country>(id): Observable<Country> {
method put (line 48) | put<Country>(item): Observable<Country> {
method post (line 53) | post<Country>(item): Observable<Country> {
method isDupeField (line 58) | isDupeField(countryId, fieldName, fieldValue): Observable<boolean> {
FILE: Chapter_07/WorldCities/ClientApp/src/app/countries/country.ts
type Country (line 1) | interface Country {
FILE: Chapter_07/WorldCities/ClientApp/src/app/home/home.component.ts
class HomeComponent (line 7) | class HomeComponent {
FILE: Chapter_07/WorldCities/ClientApp/src/app/nav-menu/nav-menu.component.ts
class NavMenuComponent (line 8) | class NavMenuComponent {
method collapse (line 11) | collapse() {
method toggle (line 15) | toggle() {
FILE: Chapter_07/WorldCities/ClientApp/src/main.ts
function getBaseUrl (line 8) | function getBaseUrl() {
FILE: Chapter_07/WorldCities/Controllers/CitiesController.cs
class CitiesController (line 13) | [Route("api/[controller]")]
method CitiesController (line 19) | public CitiesController(ApplicationDbContext context)
method GetCities (line 28) | [HttpGet]
method GetCity (line 57) | [HttpGet("{id}")]
method PutCity (line 73) | [HttpPut("{id}")]
method PostCity (line 111) | [HttpPost]
method DeleteCity (line 121) | [HttpDelete("{id}")]
method CityExists (line 136) | private bool CityExists(int id)
method IsDupeCity (line 141) | [HttpPost]
FILE: Chapter_07/WorldCities/Controllers/CountriesController.cs
class CountriesController (line 14) | [Route("api/[controller]")]
method CountriesController (line 20) | public CountriesController(ApplicationDbContext context)
method GetCountries (line 29) | [HttpGet]
method GetCountry (line 110) | [HttpGet("{id}")]
method PutCountry (line 126) | [HttpPut("{id}")]
method PostCountry (line 158) | [HttpPost]
method DeleteCountry (line 168) | [HttpDelete("{id}")]
method CountryExists (line 183) | private bool CountryExists(int id)
method IsDupeField (line 188) | [HttpPost]
FILE: Chapter_07/WorldCities/Controllers/SeedController.cs
class SeedController (line 16) | [Route("api/[controller]/[action]")]
method SeedController (line 23) | public SeedController(
method Import (line 31) | [HttpGet]
FILE: Chapter_07/WorldCities/Data/ApiResult.cs
class ApiResult (line 12) | public class ApiResult<T>
method ApiResult (line 17) | private ApiResult(
method CreateAsync (line 53) | public static async Task<ApiResult<T>> CreateAsync(
method IsValidProperty (line 110) | public static bool IsValidProperty(
FILE: Chapter_07/WorldCities/Data/ApplicationDbContext.cs
class ApplicationDbContext (line 6) | public class ApplicationDbContext : DbContext
method ApplicationDbContext (line 9) | public ApplicationDbContext() : base()
method ApplicationDbContext (line 13) | public ApplicationDbContext(DbContextOptions options) : base(options)
method OnModelCreating (line 19) | protected override void OnModelCreating(ModelBuilder modelBuilder)
FILE: Chapter_07/WorldCities/Data/CityDTO.cs
class CityDTO (line 3) | public class CityDTO
method CityDTO (line 5) | public CityDTO() { }
FILE: Chapter_07/WorldCities/Data/CountryDTO.cs
class CountryDTO (line 5) | public class CountryDTO
method CountryDTO (line 7) | public CountryDTO() { }
FILE: Chapter_07/WorldCities/Data/Migrations/20191123030140_Initial.Designer.cs
class Initial (line 11) | [DbContext(typeof(ApplicationDbContext))]
method BuildTargetModel (line 15) | protected override void BuildTargetModel(ModelBuilder modelBuilder)
FILE: Chapter_07/WorldCities/Data/Migrations/20191123030140_Initial.cs
class Initial (line 5) | public partial class Initial : Migration
method Up (line 7) | protected override void Up(MigrationBuilder migrationBuilder)
method Down (line 53) | protected override void Down(MigrationBuilder migrationBuilder)
FILE: Chapter_07/WorldCities/Data/Migrations/ApplicationDbContextModelSnapshot.cs
class ApplicationDbContextModelSnapshot (line 10) | [DbContext(typeof(ApplicationDbContext))]
method BuildModel (line 13) | protected override void BuildModel(ModelBuilder modelBuilder)
FILE: Chapter_07/WorldCities/Data/Models/City.cs
class City (line 10) | public class City
method City (line 13) | public City()
FILE: Chapter_07/WorldCities/Data/Models/Country.cs
class Country (line 11) | public class Country
method Country (line 14) | public Country()
FILE: Chapter_07/WorldCities/Pages/Error.cshtml.cs
class ErrorModel (line 12) | [ResponseCache(Duration = 0, Location = ResponseCacheLocation.None, NoSt...
method ErrorModel (line 17) | public ErrorModel(ILogger<ErrorModel> logger)
method OnGet (line 26) | public void OnGet()
FILE: Chapter_07/WorldCities/Program.cs
class Program (line 12) | public class Program
method Main (line 14) | public static void Main(string[] args)
method CreateWebHostBuilder (line 19) | public static IWebHostBuilder CreateWebHostBuilder(string[] args) =>
FILE: Chapter_07/WorldCities/Startup.cs
class Startup (line 14) | public class Startup
method Startup (line 16) | public Startup(IConfiguration configuration)
method ConfigureServices (line 24) | public void ConfigureServices(IServiceCollection services)
method Configure (line 53) | public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
FILE: Chapter_08/WorldCities/ClientApp/e2e/protractor.conf.js
method onPrepare (line 20) | onPrepare() {
FILE: Chapter_08/WorldCities/ClientApp/e2e/src/app.po.ts
class AppPage (line 3) | class AppPage {
method navigateTo (line 4) | navigateTo() {
method getMainHeading (line 8) | getMainHeading() {
FILE: Chapter_08/WorldCities/ClientApp/src/app/angular-material.module.ts
class AngularMaterialModule (line 25) | class AngularMaterialModule { }
FILE: Chapter_08/WorldCities/ClientApp/src/app/app.component.ts
class AppComponent (line 7) | class AppComponent {
FILE: Chapter_08/WorldCities/ClientApp/src/app/app.module.ts
class AppModule (line 50) | class AppModule { }
FILE: Chapter_08/WorldCities/ClientApp/src/app/app.server.module.ts
class AppServerModule (line 11) | class AppServerModule { }
FILE: Chapter_08/WorldCities/ClientApp/src/app/base.form.component.ts
class BaseFormComponent (line 7) | class BaseFormComponent {
method constructor (line 12) | constructor() {
method getControl (line 16) | getControl(name: string) {
method isValid (line 21) | isValid(name: string) {
method isChanged (line 27) | isChanged(name: string) {
method hasError (line 34) | hasError(name: string) {
FILE: Chapter_08/WorldCities/ClientApp/src/app/base.service.ts
method constructor (line 7) | constructor(
type ApiResult (line 26) | interface ApiResult<T> {
FILE: Chapter_08/WorldCities/ClientApp/src/app/cities/cities.component.ts
class CitiesComponent (line 16) | class CitiesComponent {
method constructor (line 31) | constructor(
method ngOnInit (line 35) | ngOnInit() {
method loadData (line 39) | loadData(query: string = null) {
method getData (line 49) | getData(event: PageEvent) {
FILE: Chapter_08/WorldCities/ClientApp/src/app/cities/city-edit.component.ts
class CityEditComponent (line 19) | class CityEditComponent
method constructor (line 42) | constructor(
method ngOnInit (line 49) | ngOnInit() {
method log (line 88) | log(str: string) {
method loadData (line 94) | loadData() {
method loadCountries (line 120) | loadCountries() {
method onSubmit (line 134) | onSubmit() {
method isDupeCity (line 169) | isDupeCity(): AsyncValidatorFn {
FILE: Chapter_08/WorldCities/ClientApp/src/app/cities/city.service.ts
class CityService (line 9) | class CityService
method constructor (line 11) | constructor(
method getData (line 17) | getData<ApiResult>(
method get (line 41) | get<City>(id): Observable<City> {
method put (line 46) | put<City>(item): Observable<City> {
method post (line 51) | post<City>(item): Observable<City> {
method getCountries (line 56) | getCountries<ApiResult>(
method isDupeCity (line 80) | isDupeCity(item): Observable<boolean> {
FILE: Chapter_08/WorldCities/ClientApp/src/app/cities/city.ts
type City (line 1) | interface City {
FILE: Chapter_08/WorldCities/ClientApp/src/app/countries/countries.component.ts
class CountriesComponent (line 16) | class CountriesComponent {
method constructor (line 31) | constructor(
method ngOnInit (line 35) | ngOnInit() {
method loadData (line 39) | loadData(query: string = null) {
method getData (line 49) | getData(event: PageEvent) {
FILE: Chapter_08/WorldCities/ClientApp/src/app/countries/country-edit.component.ts
class CountryEditComponent (line 17) | class CountryEditComponent
method constructor (line 34) | constructor(
method ngOnInit (line 42) | ngOnInit() {
method loadData (line 67) | loadData() {
method onSubmit (line 91) | onSubmit() {
method isDupeField (line 125) | isDupeField(fieldName: string): AsyncValidatorFn {
FILE: Chapter_08/WorldCities/ClientApp/src/app/countries/country.service.ts
class CountryService (line 9) | class CountryService
method constructor (line 11) | constructor(
method getData (line 17) | getData<ApiResult>(
method get (line 41) | get<Country>(id): Observable<Country> {
method put (line 46) | put<Country>(item): Observable<Country> {
method post (line 51) | post<Country>(item): Observable<Country> {
method isDupeField (line 56) | isDupeField(countryId, fieldName, fieldValue): Observable<boolean> {
FILE: Chapter_08/WorldCities/ClientApp/src/app/countries/country.ts
type Country (line 1) | interface Country {
FILE: Chapter_08/WorldCities/ClientApp/src/app/home/home.component.ts
class HomeComponent (line 7) | class HomeComponent {
FILE: Chapter_08/WorldCities/ClientApp/src/app/nav-menu/nav-menu.component.ts
class NavMenuComponent (line 8) | class NavMenuComponent {
method collapse (line 11) | collapse() {
method toggle (line 15) | toggle() {
FILE: Chapter_08/WorldCities/ClientApp/src/main.ts
function getBaseUrl (line 8) | function getBaseUrl() {
FILE: Chapter_08/WorldCities/Controllers/CitiesController.cs
class CitiesController (line 13) | [Route("api/[controller]")]
method CitiesController (line 19) | public CitiesController(ApplicationDbContext context)
method GetCities (line 28) | [HttpGet]
method GetCity (line 57) | [HttpGet("{id}")]
method PutCity (line 73) | [HttpPut("{id}")]
method PostCity (line 111) | [HttpPost]
method DeleteCity (line 121) | [HttpDelete("{id}")]
method CityExists (line 136) | private bool CityExists(int id)
method IsDupeCity (line 141) | [HttpPost]
FILE: Chapter_08/WorldCities/Controllers/CountriesController.cs
class CountriesController (line 14) | [Route("api/[controller]")]
method CountriesController (line 20) | public CountriesController(ApplicationDbContext context)
method GetCountries (line 29) | [HttpGet]
method GetCountry (line 110) | [HttpGet("{id}")]
method PutCountry (line 126) | [HttpPut("{id}")]
method PostCountry (line 158) | [HttpPost]
method DeleteCountry (line 168) | [HttpDelete("{id}")]
method CountryExists (line 183) | private bool CountryExists(int id)
method IsDupeField (line 188) | [HttpPost]
FILE: Chapter_08/WorldCities/Controllers/SeedController.cs
class SeedController (line 16) | [Route("api/[controller]/[action]")]
method SeedController (line 23) | public SeedController(
method Import (line 31) | [HttpGet]
FILE: Chapter_08/WorldCities/Data/ApiResult.cs
class ApiResult (line 12) | public class ApiResult<T>
method ApiResult (line 17) | private ApiResult(
method CreateAsync (line 53) | public static async Task<ApiResult<T>> CreateAsync(
method IsValidProperty (line 118) | public static bool IsValidProperty(
FILE: Chapter_08/WorldCities/Data/ApplicationDbContext.cs
class ApplicationDbContext (line 6) | public class ApplicationDbContext : DbContext
method ApplicationDbContext (line 9) | public ApplicationDbContext() : base()
method ApplicationDbContext (line 13) | public ApplicationDbContext(DbContextOptions options) : base(options)
method OnModelCreating (line 19) | protected override void OnModelCreating(ModelBuilder modelBuilder)
FILE: Chapter_08/WorldCities/Data/CityDTO.cs
class CityDTO (line 3) | public class CityDTO
method CityDTO (line 5) | public CityDTO() { }
FILE: Chapter_08/WorldCities/Data/CountryDTO.cs
class CountryDTO (line 5) | public class CountryDTO
method CountryDTO (line 7) | public CountryDTO() { }
FILE: Chapter_08/WorldCities/Data/IQueryableExtensions.cs
class IQueryableExtension (line 11) | public static class IQueryableExtension
method ToSql (line 13) | public static string ToSql<T>(this IQueryable<T> query)
method Private (line 31) | private static object Private(this object obj, string privateField) =>
method Private (line 35) | private static T Private<T>(this object obj, string privateField) =>
FILE: Chapter_08/WorldCities/Data/Migrations/20191123030140_Initial.Designer.cs
class Initial (line 11) | [DbContext(typeof(ApplicationDbContext))]
method BuildTargetModel (line 15) | protected override void BuildTargetModel(ModelBuilder modelBuilder)
FILE: Chapter_08/WorldCities/Data/Migrations/20191123030140_Initial.cs
class Initial (line 5) | public partial class Initial : Migration
method Up (line 7) | protected override void Up(MigrationBuilder migrationBuilder)
method Down (line 53) | protected override void Down(MigrationBuilder migrationBuilder)
FILE: Chapter_08/WorldCities/Data/Migrations/ApplicationDbContextModelSnapshot.cs
class ApplicationDbContextModelSnapshot (line 10) | [DbContext(typeof(ApplicationDbContext))]
method BuildModel (line 13) | protected override void BuildModel(ModelBuilder modelBuilder)
FILE: Chapter_08/WorldCities/Data/Models/City.cs
class City (line 10) | public class City
method City (line 13) | public City()
FILE: Chapter_08/WorldCities/Data/Models/Country.cs
class Country (line 11) | public class Country
method Country (line 14) | public Country()
FILE: Chapter_08/WorldCities/Pages/Error.cshtml.cs
class ErrorModel (line 12) | [ResponseCache(Duration = 0, Location = ResponseCacheLocation.None, NoSt...
method ErrorModel (line 17) | public ErrorModel(ILogger<ErrorModel> logger)
method OnGet (line 26) | public void OnGet()
FILE: Chapter_08/WorldCities/Program.cs
class Program (line 12) | public class Program
method Main (line 14) | public static void Main(string[] args)
method CreateWebHostBuilder (line 19) | public static IWebHostBuilder CreateWebHostBuilder(string[] args) =>
FILE: Chapter_08/WorldCities/Startup.cs
class Startup (line 14) | public class Startup
method Startup (line 16) | public Startup(IConfiguration configuration)
method ConfigureServices (line 24) | public void ConfigureServices(IServiceCollection services)
method Configure (line 53) | public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
FILE: Chapter_09/WorldCities.Tests/CitiesController_Tests.cs
class CitiesController_Tests (line 9) | public class CitiesController_Tests
method GetCity (line 14) | [Fact]
FILE: Chapter_09/WorldCities/ClientApp/e2e/protractor.conf.js
method onPrepare (line 20) | onPrepare() {
FILE: Chapter_09/WorldCities/ClientApp/e2e/src/app.po.ts
class AppPage (line 3) | class AppPage {
method navigateTo (line 4) | navigateTo() {
method getMainHeading (line 8) | getMainHeading() {
FILE: Chapter_09/WorldCities/ClientApp/src/app/angular-material.module.ts
class AngularMaterialModule (line 25) | class AngularMaterialModule { }
FILE: Chapter_09/WorldCities/ClientApp/src/app/app.component.ts
class AppComponent (line 7) | class AppComponent {
FILE: Chapter_09/WorldCities/ClientApp/src/app/app.module.ts
class AppModule (line 50) | class AppModule { }
FILE: Chapter_09/WorldCities/ClientApp/src/app/app.server.module.ts
class AppServerModule (line 11) | class AppServerModule { }
FILE: Chapter_09/WorldCities/ClientApp/src/app/base.form.component.ts
class BaseFormComponent (line 7) | class BaseFormComponent {
method constructor (line 12) | constructor() {
method getControl (line 16) | getControl(name: string) {
method isValid (line 21) | isValid(name: string) {
method isChanged (line 27) | isChanged(name: string) {
method hasError (line 34) | hasError(name: string) {
FILE: Chapter_09/WorldCities/ClientApp/src/app/base.service.ts
method constructor (line 7) | constructor(
type ApiResult (line 26) | interface ApiResult<T> {
FILE: Chapter_09/WorldCities/ClientApp/src/app/cities/cities.component.ts
class CitiesComponent (line 16) | class CitiesComponent {
method constructor (line 31) | constructor(
method ngOnInit (line 35) | ngOnInit() {
method loadData (line 39) | loadData(query: string = null) {
method getData (line 49) | getData(event: PageEvent) {
FILE: Chapter_09/WorldCities/ClientApp/src/app/cities/city-edit.component.ts
class CityEditComponent (line 19) | class CityEditComponent
method constructor (line 42) | constructor(
method ngOnInit (line 49) | ngOnInit() {
method log (line 88) | log(str: string) {
method loadData (line 94) | loadData() {
method loadCountries (line 120) | loadCountries() {
method onSubmit (line 134) | onSubmit() {
method isDupeCity (line 169) | isDupeCity(): AsyncValidatorFn {
FILE: Chapter_09/WorldCities/ClientApp/src/app/cities/city.service.ts
class CityService (line 9) | class CityService
method constructor (line 11) | constructor(
method getData (line 17) | getData<ApiResult>(
method get (line 41) | get<City>(id): Observable<City> {
method put (line 46) | put<City>(item): Observable<City> {
method post (line 51) | post<City>(item): Observable<City> {
method getCountries (line 56) | getCountries<ApiResult>(
method isDupeCity (line 80) | isDupeCity(item): Observable<boolean> {
FILE: Chapter_09/WorldCities/ClientApp/src/app/cities/city.ts
type City (line 1) | interface City {
FILE: Chapter_09/WorldCities/ClientApp/src/app/countries/countries.component.ts
class CountriesComponent (line 16) | class CountriesComponent {
method constructor (line 31) | constructor(
method ngOnInit (line 35) | ngOnInit() {
method loadData (line 39) | loadData(query: string = null) {
method getData (line 49) | getData(event: PageEvent) {
FILE: Chapter_09/WorldCities/ClientApp/src/app/countries/country-edit.component.ts
class CountryEditComponent (line 17) | class CountryEditComponent
method constructor (line 34) | constructor(
method ngOnInit (line 42) | ngOnInit() {
method loadData (line 67) | loadData() {
method onSubmit (line 91) | onSubmit() {
method isDupeField (line 125) | isDupeField(fieldName: string): AsyncValidatorFn {
FILE: Chapter_09/WorldCities/ClientApp/src/app/countries/country.service.ts
class CountryService (line 9) | class CountryService
method constructor (line 11) | constructor(
method getData (line 17) | getData<ApiResult>(
method get (line 41) | get<Country>(id): Observable<Country> {
method put (line 46) | put<Country>(item): Observable<Country> {
method post (line 51) | post<Country>(item): Observable<Country> {
method isDupeField (line 56) | isDupeField(countryId, fieldName, fieldValue): Observable<boolean> {
FILE: Chapter_09/WorldCities/ClientApp/src/app/countries/country.ts
type Country (line 1) | interface Country {
FILE: Chapter_09/WorldCities/ClientApp/src/app/home/home.component.ts
class HomeComponent (line 7) | class HomeComponent {
FILE: Chapter_09/WorldCities/ClientApp/src/app/nav-menu/nav-menu.component.ts
class NavMenuComponent (line 8) | class NavMenuComponent {
method collapse (line 11) | collapse() {
method toggle (line 15) | toggle() {
FILE: Chapter_09/WorldCities/ClientApp/src/main.ts
function getBaseUrl (line 8) | function getBaseUrl() {
FILE: Chapter_09/WorldCities/Controllers/CitiesController.cs
class CitiesController (line 13) | [Route("api/[controller]")]
method CitiesController (line 19) | public CitiesController(ApplicationDbContext context)
method GetCities (line 28) | [HttpGet]
method GetCity (line 57) | [HttpGet("{id}")]
method PutCity (line 73) | [HttpPut("{id}")]
method PostCity (line 111) | [HttpPost]
method DeleteCity (line 121) | [HttpDelete("{id}")]
method CityExists (line 136) | private bool CityExists(int id)
method IsDupeCity (line 141) | [HttpPost]
FILE: Chapter_09/WorldCities/Controllers/CountriesController.cs
class CountriesController (line 14) | [Route("api/[controller]")]
method CountriesController (line 20) | public CountriesController(ApplicationDbContext context)
method GetCountries (line 29) | [HttpGet]
method GetCountry (line 110) | [HttpGet("{id}")]
method PutCountry (line 126) | [HttpPut("{id}")]
method PostCountry (line 158) | [HttpPost]
method DeleteCountry (line 168) | [HttpDelete("{id}")]
method CountryExists (line 183) | private bool CountryExists(int id)
method IsDupeField (line 188) | [HttpPost]
FILE: Chapter_09/WorldCities/Controllers/SeedController.cs
class SeedController (line 16) | [Route("api/[controller]/[action]")]
method SeedController (line 23) | public SeedController(
method Import (line 31) | [HttpGet]
FILE: Chapter_09/WorldCities/Data/ApiResult.cs
class ApiResult (line 12) | public class ApiResult<T>
method ApiResult (line 17) | private ApiResult(
method CreateAsync (line 53) | public static async Task<ApiResult<T>> CreateAsync(
method IsValidProperty (line 118) | public static bool IsValidProperty(
FILE: Chapter_09/WorldCities/Data/ApplicationDbContext.cs
class ApplicationDbContext (line 6) | public class ApplicationDbContext : DbContext
method ApplicationDbContext (line 9) | public ApplicationDbContext() : base()
method ApplicationDbContext (line 13) | public ApplicationDbContext(DbContextOptions options) : base(options)
method OnModelCreating (line 19) | protected override void OnModelCreating(ModelBuilder modelBuilder)
FILE: Chapter_09/WorldCities/Data/CityDTO.cs
class CityDTO (line 3) | public class CityDTO
method CityDTO (line 5) | public CityDTO() { }
FILE: Chapter_09/WorldCities/Data/CountryDTO.cs
class CountryDTO (line 5) | public class CountryDTO
method CountryDTO (line 7) | public CountryDTO() { }
FILE: Chapter_09/WorldCities/Data/IQueryableExtensions.cs
class IQueryableExtension (line 11) | public static class IQueryableExtension
method ToSql (line 13) | public static string ToSql<T>(this IQueryable<T> query)
method Private (line 31) | private static object Private(this object obj, string privateField) =>
method Private (line 35) | private static T Private<T>(this object obj, string privateField) =>
FILE: Chapter_09/WorldCities/Data/Migrations/20191123030140_Initial.Designer.cs
class Initial (line 11) | [DbContext(typeof(ApplicationDbContext))]
method BuildTargetModel (line 15) | protected override void BuildTargetModel(ModelBuilder modelBuilder)
FILE: Chapter_09/WorldCities/Data/Migrations/20191123030140_Initial.cs
class Initial (line 5) | public partial class Initial : Migration
method Up (line 7) | protected override void Up(MigrationBuilder migrationBuilder)
method Down (line 53) | protected override void Down(MigrationBuilder migrationBuilder)
FILE: Chapter_09/WorldCities/Data/Migrations/ApplicationDbContextModelSnapshot.cs
class ApplicationDbContextModelSnapshot (line 10) | [DbContext(typeof(ApplicationDbContext))]
method BuildModel (line 13) | protected override void BuildModel(ModelBuilder modelBuilder)
FILE: Chapter_09/WorldCities/Data/Models/City.cs
class City (line 10) | public class City
method City (line 13) | public City()
FILE: Chapter_09/WorldCities/Data/Models/Country.cs
class Country (line 11) | public class Country
method Country (line 14) | public Country()
FILE: Chapter_09/WorldCities/Pages/Error.cshtml.cs
class ErrorModel (line 12) | [ResponseCache(Duration = 0, Location = ResponseCacheLocation.None, NoSt...
method ErrorModel (line 17) | public ErrorModel(ILogger<ErrorModel> logger)
method OnGet (line 26) | public void OnGet()
FILE: Chapter_09/WorldCities/Program.cs
class Program (line 12) | public class Program
method Main (line 14) | public static void Main(string[] args)
method CreateWebHostBuilder (line 19) | public static IWebHostBuilder CreateWebHostBuilder(string[] args) =>
FILE: Chapter_09/WorldCities/Startup.cs
class Startup (line 14) | public class Startup
method Startup (line 16) | public Startup(IConfiguration configuration)
method ConfigureServices (line 24) | public void ConfigureServices(IServiceCollection services)
method Configure (line 53) | public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
FILE: Chapter_10/AuthSample/ClientApp/e2e/protractor.conf.js
method onPrepare (line 20) | onPrepare() {
FILE: Chapter_10/AuthSample/ClientApp/e2e/src/app.po.ts
class AppPage (line 3) | class AppPage {
method navigateTo (line 4) | navigateTo() {
method getMainHeading (line 8) | getMainHeading() {
FILE: Chapter_10/AuthSample/ClientApp/src/api-authorization/api-authorization.constants.ts
type ApplicationPathsType (line 58) | interface ApplicationPathsType {
FILE: Chapter_10/AuthSample/ClientApp/src/api-authorization/api-authorization.module.ts
class ApiAuthorizationModule (line 30) | class ApiAuthorizationModule { }
FILE: Chapter_10/AuthSample/ClientApp/src/api-authorization/authorize.guard.ts
class AuthorizeGuard (line 11) | class AuthorizeGuard implements CanActivate {
method constructor (line 12) | constructor(private authorize: AuthorizeService, private router: Route...
method canActivate (line 14) | canActivate(
method handleAuthorization (line 21) | private handleAuthorization(isAuthenticated: boolean, state: RouterSta...
FILE: Chapter_10/AuthSample/ClientApp/src/api-authorization/authorize.interceptor.ts
class AuthorizeInterceptor (line 10) | class AuthorizeInterceptor implements HttpInterceptor {
method constructor (line 11) | constructor(private authorize: AuthorizeService) { }
method intercept (line 13) | intercept(req: HttpRequest<any>, next: HttpHandler): Observable<HttpEv...
method processRequestWithToken (line 21) | private processRequestWithToken(token: string, req: HttpRequest<any>, ...
method isSameOriginUrl (line 33) | private isSameOriginUrl(req: any) {
FILE: Chapter_10/AuthSample/ClientApp/src/api-authorization/authorize.service.ts
type IAuthenticationResult (line 7) | type IAuthenticationResult =
type SuccessAuthenticationResult (line 12) | interface SuccessAuthenticationResult {
type FailureAuthenticationResult (line 17) | interface FailureAuthenticationResult {
type RedirectAuthenticationResult (line 22) | interface RedirectAuthenticationResult {
type AuthenticationResultStatus (line 26) | enum AuthenticationResultStatus {
type IUser (line 32) | interface IUser {
class AuthorizeService (line 39) | class AuthorizeService {
method isAuthenticated (line 47) | public isAuthenticated(): Observable<boolean> {
method getUser (line 51) | public getUser(): Observable<IUser | null> {
method getAccessToken (line 58) | public getAccessToken(): Observable<string> {
method signIn (line 72) | public async signIn(state: any): Promise<IAuthenticationResult> {
method completeSignIn (line 110) | public async completeSignIn(url: string): Promise<IAuthenticationResul...
method signOut (line 122) | public async signOut(state: any): Promise<IAuthenticationResult> {
method completeSignOut (line 144) | public async completeSignOut(url: string): Promise<IAuthenticationResu...
method createArguments (line 156) | private createArguments(state?: any): any {
method error (line 160) | private error(message: string): IAuthenticationResult {
method success (line 164) | private success(state: any): IAuthenticationResult {
method redirect (line 168) | private redirect(): IAuthenticationResult {
method ensureUserManagerInitialized (line 172) | private async ensureUserManagerInitialized(): Promise<void> {
method getUserFromStorage (line 193) | private getUserFromStorage(): Observable<IUser> {
FILE: Chapter_10/AuthSample/ClientApp/src/api-authorization/login-menu/login-menu.component.ts
class LoginMenuComponent (line 11) | class LoginMenuComponent implements OnInit {
method constructor (line 15) | constructor(private authorizeService: AuthorizeService) { }
method ngOnInit (line 17) | ngOnInit() {
FILE: Chapter_10/AuthSample/ClientApp/src/api-authorization/login/login.component.ts
class LoginComponent (line 16) | class LoginComponent implements OnInit {
method constructor (line 19) | constructor(
method ngOnInit (line 24) | async ngOnInit() {
method login (line 49) | private async login(returnUrl: string): Promise<void> {
method processLoginCallback (line 69) | private async processLoginCallback(): Promise<void> {
method redirectToRegister (line 85) | private redirectToRegister(): any {
method redirectToProfile (line 90) | private redirectToProfile(): void {
method navigateToReturnUrl (line 94) | private async navigateToReturnUrl(returnUrl: string) {
method getReturnUrl (line 102) | private getReturnUrl(state?: INavigationState): string {
method redirectToApiAuthorizationPath (line 117) | private redirectToApiAuthorizationPath(apiAuthorizationPath: string) {
type INavigationState (line 126) | interface INavigationState {
FILE: Chapter_10/AuthSample/ClientApp/src/api-authorization/logout/logout.component.ts
class LogoutComponent (line 16) | class LogoutComponent implements OnInit {
method constructor (line 19) | constructor(
method ngOnInit (line 24) | async ngOnInit() {
method logout (line 47) | private async logout(returnUrl: string): Promise<void> {
method processLogoutCallback (line 71) | private async processLogoutCallback(): Promise<void> {
method navigateToReturnUrl (line 90) | private async navigateToReturnUrl(returnUrl: string) {
method getReturnUrl (line 96) | private getReturnUrl(state?: INavigationState): string {
type INavigationState (line 112) | interface INavigationState {
FILE: Chapter_10/AuthSample/ClientApp/src/app/app.component.ts
class AppComponent (line 7) | class AppComponent {
FILE: Chapter_10/AuthSample/ClientApp/src/app/app.module.ts
class AppModule (line 40) | class AppModule { }
FILE: Chapter_10/AuthSample/ClientApp/src/app/app.server.module.ts
class AppServerModule (line 11) | class AppServerModule { }
FILE: Chapter_10/AuthSample/ClientApp/src/app/counter/counter.component.ts
class CounterComponent (line 7) | class CounterComponent {
method incrementCounter (line 10) | public incrementCounter() {
FILE: Chapter_10/AuthSample/ClientApp/src/app/fetch-data/fetch-data.component.ts
class FetchDataComponent (line 8) | class FetchDataComponent {
method constructor (line 11) | constructor(http: HttpClient, @Inject('BASE_URL') baseUrl: string) {
type WeatherForecast (line 18) | interface WeatherForecast {
FILE: Chapter_10/AuthSample/ClientApp/src/app/home/home.component.ts
class HomeComponent (line 7) | class HomeComponent {
FILE: Chapter_10/AuthSample/ClientApp/src/app/nav-menu/nav-menu.component.ts
class NavMenuComponent (line 8) | class NavMenuComponent {
method collapse (line 11) | collapse() {
method toggle (line 15) | toggle() {
FILE: Chapter_10/AuthSample/ClientApp/src/main.ts
function getBaseUrl (line 7) | function getBaseUrl() {
FILE: Chapter_10/AuthSample/Controllers/OidcConfigurationController.cs
class OidcConfigurationController (line 7) | public class OidcConfigurationController : Controller
method OidcConfigurationController (line 11) | public OidcConfigurationController(IClientRequestParametersProvider cl...
method GetClientRequestParameters (line 19) | [HttpGet("_configuration/{clientId}")]
FILE: Chapter_10/AuthSample/Controllers/WeatherForecastController.cs
class WeatherForecastController (line 11) | [Authorize]
method WeatherForecastController (line 23) | public WeatherForecastController(ILogger<WeatherForecastController> lo...
method Get (line 28) | [HttpGet]
FILE: Chapter_10/AuthSample/Data/ApplicationDbContext.cs
class ApplicationDbContext (line 13) | public class ApplicationDbContext : ApiAuthorizationDbContext<Applicatio...
method ApplicationDbContext (line 15) | public ApplicationDbContext(
FILE: Chapter_10/AuthSample/Data/Migrations/00000000000000_CreateIdentitySchema.Designer.cs
class CreateIdentitySchema (line 11) | [DbContext(typeof(ApplicationDbContext))]
method BuildTargetModel (line 15) | protected override void BuildTargetModel(ModelBuilder modelBuilder)
FILE: Chapter_10/AuthSample/Data/Migrations/00000000000000_CreateIdentitySchema.cs
class CreateIdentitySchema (line 6) | public partial class CreateIdentitySchema : Migration
method Up (line 8) | protected override void Up(MigrationBuilder migrationBuilder)
method Down (line 248) | protected override void Down(MigrationBuilder migrationBuilder)
FILE: Chapter_10/AuthSample/Data/Migrations/ApplicationDbContextModelSnapshot.cs
class ApplicationDbContextModelSnapshot (line 10) | [DbContext(typeof(ApplicationDbContext))]
method BuildModel (line 13) | protected override void BuildModel(ModelBuilder modelBuilder)
FILE: Chapter_10/AuthSample/Models/ApplicationUser.cs
class ApplicationUser (line 9) | public class ApplicationUser : IdentityUser
FILE: Chapter_10/AuthSample/Pages/Error.cshtml.cs
class ErrorModel (line 12) | [ResponseCache(Duration = 0, Location = ResponseCacheLocation.None, NoSt...
method ErrorModel (line 17) | public ErrorModel(ILogger<ErrorModel> logger)
method OnGet (line 26) | public void OnGet()
FILE: Chapter_10/AuthSample/Program.cs
class Program (line 12) | public class Program
method Main (line 14) | public static void Main(string[] args)
method CreateHostBuilder (line 19) | public static IHostBuilder CreateHostBuilder(string[] args) =>
FILE: Chapter_10/AuthSample/Startup.cs
class Startup (line 17) | public class Startup
method Startup (line 19) | public Startup(IConfiguration configuration)
method ConfigureServices (line 27) | public void ConfigureServices(IServiceCollection services)
method Configure (line 51) | public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
FILE: Chapter_10/AuthSample/WeatherForecast.cs
class WeatherForecast (line 5) | public class WeatherForecast
FILE: Chapter_10/WorldCities.Tests/CitiesController_Tests.cs
class CitiesController_Tests (line 12) | public class CitiesController_Tests
method GetCity (line 17) | [Fact]
FILE: Chapter_10/WorldCities.Tests/IdentityHelper.cs
class IdentityHelper (line 11) | public static class IdentityHelper
method GetRoleManager (line 13) | public static RoleManager<TIdentityRole> GetRoleManager<TIdentityRole>(
method GetUserManager (line 24) | public static UserManager<TIDentityUser> GetUserManager<TIDentityUser>(
FILE: Chapter_10/WorldCities.Tests/SeedController_Tests.cs
class SeedController_Tests (line 17) | public class SeedController_Tests
method CreateDefaultUsers (line 22) | [Fact]
FILE: Chapter_10/WorldCities/ClientApp/e2e/protractor.conf.js
method onPrepare (line 20) | onPrepare() {
FILE: Chapter_10/WorldCities/ClientApp/e2e/src/app.po.ts
class AppPage (line 3) | class AppPage {
method navigateTo (line 4) | navigateTo() {
method getMainHeading (line 8) | getMainHeading() {
FILE: Chapter_10/WorldCities/ClientApp/src/api-authorization/api-authorization.constants.ts
type ApplicationPathsType (line 58) | interface ApplicationPathsType {
FILE: Chapter_10/WorldCities/ClientApp/src/api-authorization/api-authorization.module.ts
class ApiAuthorizationModule (line 30) | class ApiAuthorizationModule { }
FILE: Chapter_10/WorldCities/ClientApp/src/api-authorization/authorize.guard.ts
class AuthorizeGuard (line 11) | class AuthorizeGuard implements CanActivate {
method constructor (line 12) | constructor(private authorize: AuthorizeService, private router: Route...
method canActivate (line 14) | canActivate(
method handleAuthorization (line 21) | private handleAuthorization(isAuthenticated: boolean, state: RouterSta...
FILE: Chapter_10/WorldCities/ClientApp/src/api-authorization/authorize.interceptor.ts
class AuthorizeInterceptor (line 10) | class AuthorizeInterceptor implements HttpInterceptor {
method constructor (line 11) | constructor(private authorize: AuthorizeService) { }
method intercept (line 13) | intercept(req: HttpRequest<any>, next: HttpHandler): Observable<HttpEv...
method processRequestWithToken (line 21) | private processRequestWithToken(token: string, req: HttpRequest<any>, ...
method isSameOriginUrl (line 33) | private isSameOriginUrl(req: any) {
FILE: Chapter_10/WorldCities/ClientApp/src/api-authorization/authorize.service.ts
type IAuthenticationResult (line 7) | type IAuthenticationResult =
type SuccessAuthenticationResult (line 12) | interface SuccessAuthenticationResult {
type FailureAuthenticationResult (line 17) | interface FailureAuthenticationResult {
type RedirectAuthenticationResult (line 22) | interface RedirectAuthenticationResult {
type AuthenticationResultStatus (line 26) | enum AuthenticationResultStatus {
type IUser (line 32) | interface IUser {
class AuthorizeService (line 39) | class AuthorizeService {
method isAuthenticated (line 47) | public isAuthenticated(): Observable<boolean> {
method getUser (line 51) | public getUser(): Observable<IUser | null> {
method getAccessToken (line 58) | public getAccessToken(): Observable<string> {
method signIn (line 72) | public async signIn(state: any): Promise<IAuthenticationResult> {
method completeSignIn (line 110) | public async completeSignIn(url: string): Promise<IAuthenticationResul...
method signOut (line 122) | public async signOut(state: any): Promise<IAuthenticationResult> {
method completeSignOut (line 144) | public async completeSignOut(url: string): Promise<IAuthenticationResu...
method createArguments (line 156) | private createArguments(state?: any): any {
method error (line 160) | private error(message: string): IAuthenticationResult {
method success (line 164) | private success(state: any): IAuthenticationResult {
method redirect (line 168) | private redirect(): IAuthenticationResult {
method ensureUserManagerInitialized (line 172) | private async ensureUserManagerInitialized(): Promise<void> {
method getUserFromStorage (line 193) | private getUserFromStorage(): Observable<IUser> {
FILE: Chapter_10/WorldCities/ClientApp/src/api-authorization/login-menu/login-menu.component.ts
class LoginMenuComponent (line 11) | class LoginMenuComponent implements OnInit {
method constructor (line 15) | constructor(private authorizeService: AuthorizeService) { }
method ngOnInit (line 17) | ngOnInit() {
FILE: Chapter_10/WorldCities/ClientApp/src/api-authorization/login/login.component.ts
class LoginComponent (line 16) | class LoginComponent implements OnInit {
method constructor (line 19) | constructor(
method ngOnInit (line 24) | async ngOnInit() {
method login (line 49) | private async login(returnUrl: string): Promise<void> {
method processLoginCallback (line 69) | private async processLoginCallback(): Promise<void> {
method redirectToRegister (line 85) | private redirectToRegister(): any {
method redirectToProfile (line 90) | private redirectToProfile(): void {
method navigateToReturnUrl (line 94) | private async navigateToReturnUrl(returnUrl: string) {
method getReturnUrl (line 102) | private getReturnUrl(state?: INavigationState): string {
method redirectToApiAuthorizationPath (line 117) | private redirectToApiAuthorizationPath(apiAuthorizationPath: string) {
type INavigationState (line 126) | interface INavigationState {
FILE: Chapter_10/WorldCities/ClientApp/src/api-authorization/logout/logout.component.ts
class LogoutComponent (line 16) | class LogoutComponent implements OnInit {
method constructor (line 19) | constructor(
method ngOnInit (line 24) | async ngOnInit() {
method logout (line 47) | private async logout(returnUrl: string): Promise<void> {
method processLogoutCallback (line 71) | private async processLogoutCallback(): Promise<void> {
method navigateToReturnUrl (line 90) | private async navigateToReturnUrl(returnUrl: string) {
method getReturnUrl (line 96) | private getReturnUrl(state?: INavigationState): string {
type INavigationState (line 112) | interface INavigationState {
FILE: Chapter_10/WorldCities/ClientApp/src/app/angular-material.module.ts
class AngularMaterialModule (line 25) | class AngularMaterialModule { }
FILE: Chapter_10/WorldCities/ClientApp/src/app/app.component.ts
class AppComponent (line 7) | class AppComponent {
FILE: Chapter_10/WorldCities/ClientApp/src/app/app.module.ts
class AppModule (line 87) | class AppModule { }
FILE: Chapter_10/WorldCities/ClientApp/src/app/app.server.module.ts
class AppServerModule (line 11) | class AppServerModule { }
FILE: Chapter_10/WorldCities/ClientApp/src/app/base.form.component.ts
class BaseFormComponent (line 7) | class BaseFormComponent {
method constructor (line 12) | constructor() {
method getControl (line 16) | getControl(name: string) {
method isValid (line 21) | isValid(name: string) {
method isChanged (line 27) | isChanged(name: string) {
method hasError (line 34) | hasError(name: string) {
FILE: Chapter_10/WorldCities/ClientApp/src/app/base.service.ts
method constructor (line 7) | constructor(
type ApiResult (line 26) | interface ApiResult<T> {
FILE: Chapter_10/WorldCities/ClientApp/src/app/cities/cities.component.ts
class CitiesComponent (line 16) | class CitiesComponent {
method constructor (line 31) | constructor(
method ngOnInit (line 35) | ngOnInit() {
method loadData (line 39) | loadData(query: string = null) {
method getData (line 49) | getData(event: PageEvent) {
FILE: Chapter_10/WorldCities/ClientApp/src/app/cities/city-edit.component.ts
class CityEditComponent (line 19) | class CityEditComponent
method constructor (line 42) | constructor(
method ngOnInit (line 49) | ngOnInit() {
method log (line 88) | log(str: string) {
method loadData (line 94) | loadData() {
method loadCountries (line 120) | loadCountries() {
method onSubmit (line 134) | onSubmit() {
method isDupeCity (line 169) | isDupeCity(): AsyncValidatorFn {
FILE: Chapter_10/WorldCities/ClientApp/src/app/cities/city.service.ts
class CityService (line 9) | class CityService
method constructor (line 11) | constructor(
method getData (line 17) | getData<ApiResult>(
method get (line 41) | get<City>(id): Observable<City> {
method put (line 46) | put<City>(item): Observable<City> {
method post (line 51) | post<City>(item): Observable<City> {
method getCountries (line 56) | getCountries<ApiResult>(
method isDupeCity (line 80) | isDupeCity(item): Observable<boolean> {
FILE: Chapter_10/WorldCities/ClientApp/src/app/cities/city.ts
type City (line 1) | interface City {
FILE: Chapter_10/WorldCities/ClientApp/src/app/countries/countries.component.ts
class CountriesComponent (line 16) | class CountriesComponent {
method constructor (line 31) | constructor(
method ngOnInit (line 35) | ngOnInit() {
method loadData (line 39) | loadData(query: string = null) {
method getData (line 49) | getData(event: PageEvent) {
FILE: Chapter_10/WorldCities/ClientApp/src/app/countries/country-edit.component.ts
class CountryEditComponent (line 17) | class CountryEditComponent
method constructor (line 34) | constructor(
method ngOnInit (line 42) | ngOnInit() {
method loadData (line 67) | loadData() {
method onSubmit (line 91) | onSubmit() {
method isDupeField (line 125) | isDupeField(fieldName: string): AsyncValidatorFn {
FILE: Chapter_10/WorldCities/ClientApp/src/app/countries/country.service.ts
class CountryService (line 9) | class CountryService
method constructor (line 11) | constructor(
method getData (line 17) | getData<ApiResult>(
method get (line 41) | get<Country>(id): Observable<Country> {
method put (line 46) | put<Country>(item): Observable<Country> {
method post (line 51) | post<Country>(item): Observable<Country> {
method isDupeField (line 56) | isDupeField(countryId, fieldName, fieldValue): Observable<boolean> {
FILE: Chapter_10/WorldCities/ClientApp/src/app/countries/country.ts
type Country (line 1) | interface Country {
FILE: Chapter_10/WorldCities/ClientApp/src/app/home/home.component.ts
class HomeComponent (line 7) | class HomeComponent {
FILE: Chapter_10/WorldCities/ClientApp/src/app/nav-menu/nav-menu.component.ts
class NavMenuComponent (line 8) | class NavMenuComponent {
method collapse (line 11) | collapse() {
method toggle (line 15) | toggle() {
FILE: Chapter_10/WorldCities/ClientApp/src/main.ts
function getBaseUrl (line 8) | function getBaseUrl() {
FILE: Chapter_10/WorldCities/Controllers/CitiesController.cs
class CitiesController (line 14) | [Route("api/[controller]")]
method CitiesController (line 20) | public CitiesController(ApplicationDbContext context)
method GetCities (line 29) | [HttpGet]
method GetCity (line 58) | [HttpGet("{id}")]
method PutCity (line 74) | [Authorize]
method PostCity (line 113) | [Authorize]
method DeleteCity (line 124) | [Authorize]
method CityExists (line 140) | private bool CityExists(int id)
method IsDupeCity (line 145) | [HttpPost]
FILE: Chapter_10/WorldCities/Controllers/CountriesController.cs
class CountriesController (line 15) | [Route("api/[controller]")]
method CountriesController (line 21) | public CountriesController(ApplicationDbContext context)
method GetCountries (line 30) | [HttpGet]
method GetCountry (line 111) | [HttpGet("{id}")]
method PutCountry (line 127) | [Authorize]
method PostCountry (line 160) | [Authorize]
method DeleteCountry (line 171) | [Authorize]
method CountryExists (line 187) | private bool CountryExists(int id)
method IsDupeField (line 192) | [HttpPost]
FILE: Chapter_10/WorldCities/Controllers/OidcConfigurationController.cs
class OidcConfigurationController (line 7) | public class OidcConfigurationController : Controller
method OidcConfigurationController (line 11) | public OidcConfigurationController(IClientRequestParametersProvider cl...
method GetClientRequestParameters (line 19) | [HttpGet("_configuration/{clientId}")]
FILE: Chapter_10/WorldCities/Controllers/SeedController.cs
class SeedController (line 17) | [Route("api/[controller]/[action]")]
method SeedController (line 26) | public SeedController(
method Import (line 38) | [HttpGet]
method CreateDefaultUsers (line 160) | [HttpGet]
FILE: Chapter_10/WorldCities/Data/ApiResult.cs
class ApiResult (line 12) | public class ApiResult<T>
method ApiResult (line 17) | private ApiResult(
method CreateAsync (line 53) | public static async Task<ApiResult<T>> CreateAsync(
method IsValidProperty (line 118) | public static bool IsValidProperty(
FILE: Chapter_10/WorldCities/Data/ApplicationDbContext.cs
class ApplicationDbContext (line 9) | public class ApplicationDbContext : ApiAuthorizationDbContext<Applicatio...
method ApplicationDbContext (line 12) | public ApplicationDbContext(
method OnModelCreating (line 21) | protected override void OnModelCreating(ModelBuilder modelBuilder)
FILE: Chapter_10/WorldCities/Data/CityDTO.cs
class CityDTO (line 3) | public class CityDTO
method CityDTO (line 5) | public CityDTO() { }
FILE: Chapter_10/WorldCities/Data/CountryDTO.cs
class CountryDTO (line 5) | public class CountryDTO
method CountryDTO (line 7) | public CountryDTO() { }
FILE: Chapter_10/WorldCities/Data/IQueryableExtensions.cs
class IQueryableExtension (line 11) | public static class IQueryableExtension
method ToSql (line 13) | public static string ToSql<T>(this IQueryable<T> query)
method Private (line 31) | private static object Private(this object obj, string privateField) =>
method Private (line 35) | private static T Private<T>(this object obj, string privateField) =>
FILE: Chapter_10/WorldCities/Data/Migrations/20191230002753_Identity.Designer.cs
class Identity (line 12) | [DbContext(typeof(ApplicationDbContext))]
method BuildTargetModel (line 16) | protected override void BuildTargetModel(ModelBuilder modelBuilder)
FILE: Chapter_10/WorldCities/Data/Migrations/20191230002753_Identity.cs
class Identity (line 6) | public partial class Identity : Migration
method Up (line 8) | protected override void Up(MigrationBuilder migrationBuilder)
method Down (line 250) | protected override void Down(MigrationBuilder migrationBuilder)
FILE: Chapter_10/WorldCities/Data/Migrations/ApplicationDbContextModelSnapshot.cs
class ApplicationDbContextModelSnapshot (line 11) | [DbContext(typeof(ApplicationDbContext))]
method BuildModel (line 14) | protected override void BuildModel(ModelBuilder modelBuilder)
FILE: Chapter_10/WorldCities/Data/Models/ApplicationUser.cs
class ApplicationUser (line 9) | public class ApplicationUser : IdentityUser
FILE: Chapter_10/WorldCities/Data/Models/City.cs
class City (line 10) | public class City
method City (line 13) | public City()
FILE: Chapter_10/WorldCities/Data/Models/Country.cs
class Country (line 11) | public class Country
method Country (line 14) | public Country()
FILE: Chapter_10/WorldCities/Pages/Error.cshtml.cs
class ErrorModel (line 12) | [ResponseCache(Duration = 0, Location = ResponseCacheLocation.None, NoSt...
method ErrorModel (line 17) | public ErrorModel(ILogger<ErrorModel> logger)
method OnGet (line 26) | public void OnGet()
FILE: Chapter_10/WorldCities/Program.cs
class Program (line 12) | public class Program
method Main (line 14) | public static void Main(string[] args)
method CreateWebHostBuilder (line 19) | public static IWebHostBuilder CreateWebHostBuilder(string[] args) =>
FILE: Chapter_10/WorldCities/Startup.cs
class Startup (line 17) | public class Startup
method Startup (line 19) | public Startup(IConfiguration configuration)
method ConfigureServices (line 27) | public void ConfigureServices(IServiceCollection services)
method Configure (line 75) | public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
FILE: Chapter_11/HealthCheck/ClientApp/e2e/protractor.conf.js
method onPrepare (line 20) | onPrepare() {
FILE: Chapter_11/HealthCheck/ClientApp/e2e/src/app.po.ts
class AppPage (line 3) | class AppPage {
method navigateTo (line 4) | navigateTo() {
method getMainHeading (line 8) | getMainHeading() {
FILE: Chapter_11/HealthCheck/ClientApp/src/app/app.component.ts
class AppComponent (line 8) | class AppComponent {
method constructor (line 16) | constructor(private connectionService: ConnectionService) {
FILE: Chapter_11/HealthCheck/ClientApp/src/app/app.module.ts
class AppModule (line 38) | class AppModule { }
FILE: Chapter_11/HealthCheck/ClientApp/src/app/app.server.module.ts
class AppServerModule (line 11) | class AppServerModule { }
FILE: Chapter_11/HealthCheck/ClientApp/src/app/health-check/health-check.component.ts
class HealthCheckComponent (line 9) | class HealthCheckComponent {
method constructor (line 12) | constructor(
method ngOnInit (line 17) | ngOnInit() {
type Result (line 24) | interface Result {
type Check (line 30) | interface Check {
FILE: Chapter_11/HealthCheck/ClientApp/src/app/home/home.component.ts
class HomeComponent (line 7) | class HomeComponent {
FILE: Chapter_11/HealthCheck/ClientApp/src/app/nav-menu/nav-menu.component.ts
class NavMenuComponent (line 8) | class NavMenuComponent {
method collapse (line 11) | collapse() {
method toggle (line 15) | toggle() {
FILE: Chapter_11/HealthCheck/ClientApp/src/main.ts
function getBaseUrl (line 7) | function getBaseUrl() {
FILE: Chapter_11/HealthCheck/ClientApp/src/ng-connection-service/connection-service.module.ts
class ConnectionServiceModule (line 9) | class ConnectionServiceModule {
FILE: Chapter_11/HealthCheck/ClientApp/src/ng-connection-service/connection-service.service.ts
type ConnectionState (line 10) | interface ConnectionState {
type ConnectionServiceOptions (line 24) | interface ConnectionServiceOptions {
class ConnectionService (line 57) | class ConnectionService implements OnDestroy {
method options (line 81) | get options(): ConnectionServiceOptions {
method constructor (line 85) | constructor(private http: HttpClient, @Inject(ConnectionServiceOptions...
method checkInternetState (line 92) | private checkInternetState() {
method checkNetworkState (line 125) | private checkNetworkState() {
method emitEvent (line 139) | private emitEvent() {
method ngOnDestroy (line 143) | ngOnDestroy(): void {
method monitor (line 157) | monitor(reportCurrentState = true): Observable<ConnectionState> {
method updateOptions (line 174) | updateOptions(options: Partial<ConnectionServiceOptions>) {
FILE: Chapter_11/HealthCheck/CustomHealthCheckOptions.cs
class CustomHealthCheckOptions (line 9) | public class CustomHealthCheckOptions : HealthCheckOptions
method CustomHealthCheckOptions (line 11) | public CustomHealthCheckOptions() : base()
FILE: Chapter_11/HealthCheck/ICMPHealthCheck.cs
class ICMPHealthCheck (line 9) | public class ICMPHealthCheck : IHealthCheck
method ICMPHealthCheck (line 14) | public ICMPHealthCheck(string host, int timeout)
method CheckHealthAsync (line 20) | public async Task<HealthCheckResult> CheckHealthAsync(
FILE: Chapter_11/HealthCheck/Pages/Error.cshtml.cs
class ErrorModel (line 12) | [ResponseCache(Duration = 0, Location = ResponseCacheLocation.None, NoSt...
method ErrorModel (line 17) | public ErrorModel(ILogger<ErrorModel> logger)
method OnGet (line 26) | public void OnGet()
FILE: Chapter_11/HealthCheck/Program.cs
class Program (line 12) | public class Program
method Main (line 14) | public static void Main(string[] args)
method CreateWebHostBuilder (line 19) | public static IWebHostBuilder CreateWebHostBuilder(string[] args) =>
FILE: Chapter_11/HealthCheck/Startup.cs
class Startup (line 12) | public class Startup
method Startup (line 14) | public Startup(IConfiguration configuration)
method ConfigureServices (line 22) | public void ConfigureServices(IServiceCollection services)
method Configure (line 38) | public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
FILE: Chapter_11/HealthCheck/wwwroot/ngsw-worker.js
class Adapter (line 17) | class Adapter {
method constructor (line 18) | constructor(scope) {
method newRequest (line 27) | newRequest(input, init) {
method newResponse (line 33) | newResponse(body, init) { return new Response(body, init); }
method newHeaders (line 37) | newHeaders(headers) { return new Headers(headers); }
method isClient (line 41) | isClient(source) { return (source instanceof Client); }
method time (line 45) | get time() { return Date.now(); }
method parseUrl (line 49) | parseUrl(url, relativeTo) {
method timeout (line 58) | timeout(ms) {
class NotFound (line 73) | class NotFound {
method constructor (line 74) | constructor(table, key) {
class CacheDatabase (line 91) | class CacheDatabase {
method constructor (line 92) | constructor(scope, adapter) {
method 'delete' (line 97) | 'delete'(name) {
method list (line 103) | list() {
method open (line 106) | open(name) {
class CacheTable (line 118) | class CacheTable {
method constructor (line 119) | constructor(table, cache, adapter) {
method request (line 124) | request(key) { return this.adapter.newRequest('/' + key); }
method 'delete' (line 125) | 'delete'(key) { return this.cache.delete(this.request(key)); }
method keys (line 126) | keys() {
method read (line 129) | read(key) {
method write (line 137) | write(key, value) {
class SwCriticalError (line 163) | class SwCriticalError extends Error {
method constructor (line 164) | constructor() {
function errorToString (line 169) | function errorToString(error) {
function sha1 (line 195) | function sha1(str) {
function sha1Binary (line 200) | function sha1Binary(buffer) {
function _sha1 (line 204) | function _sha1(words32, len) {
function add32 (line 226) | function add32(a, b) {
function add32to64 (line 229) | function add32to64(a, b) {
function rol32 (line 235) | function rol32(a, count) {
function fk (line 243) | function fk(index, b, c, d) {
function stringToWords32 (line 255) | function stringToWords32(str, endian) {
function arrayBufferToWords32 (line 263) | function arrayBufferToWords32(buffer, endian) {
function byteAt (line 272) | function byteAt(str, index) {
function wordAt (line 280) | function wordAt(str, index, endian) {
function words32ToByteString (line 294) | function words32ToByteString(words32) {
function word32ToByteString (line 297) | function word32ToByteString(word) {
function byteStringToHexString (line 304) | function byteStringToHexString(str) {
function adopt (line 321) | function adopt(value) { return value instanceof P ? value : new P(functi...
function fulfilled (line 323) | function fulfilled(value) { try { step(generator.next(value)); } catch (...
function rejected (line 324) | function rejected(value) { try { step(generator["throw"](value)); } catc...
function step (line 325) | function step(result) { result.done ? resolve(result.value) : adopt(resu...
class AssetGroup (line 334) | class AssetGroup {
method constructor (line 335) | constructor(scope, adapter, idle, config, hashes, db, prefix) {
method cacheStatus (line 366) | cacheStatus(url) {
method cleanup (line 389) | cleanup() {
method handleFetch (line 398) | handleFetch(req, ctx) {
method getConfigUrl (line 443) | getConfigUrl(url) {
method needToRevalidate (line 460) | needToRevalidate(req, res) {
method fetchFromCacheOnly (line 537) | fetchFromCacheOnly(url) {
method unhashedResources (line 562) | unhashedResources() {
method fetchAndCacheOnce (line 575) | fetchAndCacheOnce(req, used = true) {
method fetchFromNetwork (line 631) | fetchFromNetwork(req, redirectLimit = 3) {
method cacheBustedFetchFromNetwork (line 650) | cacheBustedFetchFromNetwork(req) {
method maybeUpdate (line 720) | maybeUpdate(updateFrom, req, cache) {
method cacheBust (line 746) | cacheBust(url) {
method safeFetch (line 749) | safeFetch(req) {
class PrefetchAssetGroup (line 766) | class PrefetchAssetGroup extends AssetGroup {
method initializeFully (line 767) | initializeFully(updateFrom) {
class LazyAssetGroup (line 828) | class LazyAssetGroup extends AssetGroup {
method initializeFully (line 829) | initializeFully(updateFrom) {
function adopt (line 879) | function adopt(value) { return value instanceof P ? value : new P(functi...
function fulfilled (line 881) | function fulfilled(value) { try { step(generator.next(value)); } catch (...
function rejected (line 882) | function rejected(value) { try { step(generator["throw"](value)); } catc...
function step (line 883) | function step(result) { result.done ? resolve(result.value) : adopt(resu...
class LruList (line 891) | class LruList {
method constructor (line 892) | constructor(state) {
method size (line 906) | get size() { return this.state.count; }
method pop (line 910) | pop() {
method remove (line 920) | remove(url) {
method accessed (line 968) | accessed(url) {
class DataGroup (line 1013) | class DataGroup {
method constructor (line 1014) | constructor(scope, adapter, config, db, debugHandler, prefix) {
method lru (line 1033) | lru() {
method syncLru (line 1050) | syncLru() {
method handleFetch (line 1072) | handleFetch(req, ctx) {
method handleFetchWithPerformance (line 1111) | handleFetchWithPerformance(req, ctx, lru) {
method handleFetchWithFreshness (line 1145) | handleFetchWithFreshness(req, ctx, lru) {
method networkFetchWithTimeout (line 1177) | networkFetchWithTimeout(req) {
method safeCacheResponse (line 1213) | safeCacheResponse(req, resOrPromise, lru, okToCacheOpaque) {
method loadFromCache (line 1234) | loadFromCache(req, lru) {
method cacheResponse (line 1271) | cacheResponse(req, res, lru, okToCacheOpaque = false) {
method cleanup (line 1303) | cleanup() {
method clearCacheForUrl (line 1320) | clearCacheForUrl(url) {
method safeFetch (line 1330) | safeFetch(req) {
function adopt (line 1353) | function adopt(value) { return value instanceof P ? value : new P(functi...
function fulfilled (line 1355) | function fulfilled(value) { try { step(generator.next(value)); } catch (...
function rejected (line 1356) | function rejected(value) { try { step(generator["throw"](value)); } catc...
function step (line 1357) | function step(result) { result.done ? resolve(result.value) : adopt(resu...
class AppVersion (line 1373) | class AppVersion {
method constructor (line 1374) | constructor(scope, adapter, database, idle, debugHandler, manifest, ma...
method okay (line 1425) | get okay() { return this._okay; }
method initializeFully (line 1431) | initializeFully(updateFrom) {
method handleFetch (line 1452) | handleFetch(req, context) {
method isNavigationRequest (line 1504) | isNavigationRequest(req) {
method lookupResourceWithHash (line 1520) | lookupResourceWithHash(url, hash) {
method lookupResourceWithoutHash (line 1539) | lookupResourceWithoutHash(url) {
method previouslyCachedResources (line 1555) | previouslyCachedResources() {
method recentCacheStatus (line 1560) | recentCacheStatus(url) {
method cleanup (line 1578) | cleanup() {
method appData (line 1587) | get appData() { return this.manifest.appData || null; }
method acceptsTextHtml (line 1591) | acceptsTextHtml(req) {
function adopt (line 1609) | function adopt(value) { return value instanceof P ? value : new P(functi...
function fulfilled (line 1611) | function fulfilled(value) { try { step(generator.next(value)); } catch (...
function rejected (line 1612) | function rejected(value) { try { step(generator["throw"](value)); } catc...
function step (line 1613) | function step(result) { result.done ? resolve(result.value) : adopt(resu...
class DebugHandler (line 1618) | class DebugHandler {
method constructor (line 1619) | constructor(driver, adapter) {
method handleFetch (line 1630) | handleFetch(req) {
method since (line 1664) | since(time) {
method log (line 1681) | log(value, context = '') {
method errorToString (line 1694) | errorToString(err) { return `${err.name}(${err.message}, ${err.stack})...
method formatDebugLog (line 1695) | formatDebugLog(log) {
function adopt (line 1709) | function adopt(value) { return value instanceof P ? value : new P(functi...
function fulfilled (line 1711) | function fulfilled(value) { try { step(generator.next(value)); } catch (...
function rejected (line 1712) | function rejected(value) { try { step(generator["throw"](value)); } catc...
function step (line 1713) | function step(result) { result.done ? resolve(result.value) : adopt(resu...
class IdleScheduler (line 1717) | class IdleScheduler {
method constructor (line 1718) | constructor(adapter, threshold, debug) {
method trigger (line 1729) | trigger() {
method execute (line 1750) | execute() {
method schedule (line 1773) | schedule(desc, run) {
method size (line 1779) | get size() { return this.queue.length; }
method taskDescriptions (line 1780) | get taskDescriptions() { return this.queue.map(task => task.desc); }
function hashManifest (line 1790) | function hashManifest(manifest) {
function isMsgCheckForUpdates (line 1801) | function isMsgCheckForUpdates(msg) {
function isMsgActivateUpdate (line 1804) | function isMsgActivateUpdate(msg) {
function adopt (line 1816) | function adopt(value) { return value instanceof P ? value : new P(functi...
function fulfilled (line 1818) | function fulfilled(value) { try { step(generator.next(value)); } catch (...
function rejected (line 1819) | function rejected(value) { try { step(generator["throw"](value)); } catc...
function step (line 1820) | function step(result) { result.done ? resolve(result.value) : adopt(resu...
class Driver (line 1842) | class Driver {
method constructor (line 1843) | constructor(scope, adapter, db) {
method onFetch (line 1943) | onFetch(event) {
method onMessage (line 1998) | onMessage(event) {
method onPush (line 2024) | onPush(msg) {
method onClick (line 2032) | onClick(event) {
method ensureInitialized (line 2036) | ensureInitialized(event) {
method handleMessage (line 2063) | handleMessage(msg, from) {
method handlePush (line 2074) | handlePush(data) {
method handleClick (line 2090) | handleClick(notification, action) {
method reportStatus (line 2104) | reportStatus(client, promise, nonce) {
method updateClient (line 2116) | updateClient(client) {
method handleFetch (line 2146) | handleFetch(event) {
method initialize (line 2206) | initialize() {
method lookupVersionByHash (line 2310) | lookupVersionByHash(hash, debugName = 'lookupVersionByHash') {
method assignVersion (line 2320) | assignVersion(event) {
method fetchLatestManifest (line 2400) | fetchLatestManifest(ignoreOfflineError = false) {
method deleteAllCaches (line 2417) | deleteAllCaches() {
method scheduleInitialization (line 2434) | scheduleInitialization(appVersion) {
method versionFailed (line 2452) | versionFailed(appVersion, err) {
method setupUpdate (line 2492) | setupUpdate(manifest, hash) {
method checkForUpdate (line 2518) | checkForUpdate() {
method sync (line 2548) | sync() {
method cleanupCaches (line 2571) | cleanupCaches() {
method cleanupOldSwCaches (line 2620) | cleanupOldSwCaches() {
method lookupResourceWithHash (line 2631) | lookupResourceWithHash(url, hash) {
method lookupResourceWithoutHash (line 2651) | lookupResourceWithoutHash(url) {
method previouslyCachedResources (line 2658) | previouslyCachedResources() {
method recentCacheStatus (line 2665) | recentCacheStatus(url) {
method mergeHashWithAppData (line 2671) | mergeHashWithAppData(manifest, hash) {
method notifyClientsAboutUpdate (line 2677) | notifyClientsAboutUpdate(next) {
method broadcast (line 2704) | broadcast(msg) {
method debugState (line 2710) | debugState() {
method debugVersions (line 2720) | debugVersions() {
method debugIdleState (line 2736) | debugIdleState() {
method safeFetch (line 2745) | safeFetch(req) {
FILE: Chapter_11/WorldCities/ClientApp/e2e/protractor.conf.js
method onPrepare (line 20) | onPrepare() {
FILE: Chapter_11/WorldCities/ClientApp/e2e/src/app.po.ts
class AppPage (line 3) | class AppPage {
method navigateTo (line 4) | navigateTo() {
method getMainHeading (line 8) | getMainHeading() {
FILE: Chapter_11/WorldCities/ClientApp/src/api-authorization/api-authorization.constants.ts
type ApplicationPathsType (line 58) | interface ApplicationPathsType {
FILE: Chapter_11/WorldCities/ClientApp/src/api-authorization/api-authorization.module.ts
class ApiAuthorizationModule (line 30) | class ApiAuthorizationModule { }
FILE: Chapter_11/WorldCities/ClientApp/src/api-authorization/authorize.guard.ts
class AuthorizeGuard (line 11) | class AuthorizeGuard implements CanActivate {
method constructor (line 12) | constructor(private authorize: AuthorizeService, private router: Route...
method canActivate (line 14) | canActivate(
method handleAuthorization (line 21) | private handleAuthorization(isAuthenticated: boolean, state: RouterSta...
FILE: Chapter_11/WorldCities/ClientApp/src/api-authorization/authorize.interceptor.ts
class AuthorizeInterceptor (line 10) | class AuthorizeInterceptor implements HttpInterceptor {
method constructor (line 11) | constructor(private authorize: AuthorizeService) { }
method intercept (line 13) | intercept(req: HttpRequest<any>, next: HttpHandler): Observable<HttpEv...
method processRequestWithToken (line 21) | private processRequestWithToken(token: string, req: HttpRequest<any>, ...
method isSameOriginUrl (line 33) | private isSameOriginUrl(req: any) {
FILE: Chapter_11/WorldCities/ClientApp/src/api-authorization/authorize.service.ts
type IAuthenticationResult (line 7) | type IAuthenticationResult =
type SuccessAuthenticationResult (line 12) | interface SuccessAuthenticationResult {
type FailureAuthenticationResult (line 17) | interface FailureAuthenticationResult {
type RedirectAuthenticationResult (line 22) | interface RedirectAuthenticationResult {
type AuthenticationResultStatus (line 26) | enum AuthenticationResultStatus {
type IUser (line 32) | interface IUser {
class AuthorizeService (line 39) | class AuthorizeService {
method isAuthenticated (line 47) | public isAuthenticated(): Observable<boolean> {
method getUser (line 51) | public getUser(): Observable<IUser | null> {
method getAccessToken (line 58) | public getAccessToken(): Observable<string> {
method signIn (line 72) | public async signIn(state: any): Promise<IAuthenticationResult> {
method completeSignIn (line 110) | public async completeSignIn(url: string): Promise<IAuthenticationResul...
method signOut (line 122) | public async signOut(state: any): Promise<IAuthenticationResult> {
method completeSignOut (line 144) | public async completeSignOut(url: string): Promise<IAuthenticationResu...
method createArguments (line 156) | private createArguments(state?: any): any {
method error (line 160) | private error(message: string): IAuthenticationResult {
method success (line 164) | private success(state: any): IAuthenticationResult {
method redirect (line 168) | private redirect(): IAuthenticationResult {
method ensureUserManagerInitialized (line 172) | private async ensureUserManagerInitialized(): Promise<void> {
method getUserFromStorage (line 193) | private getUserFromStorage(): Observable<IUser> {
FILE: Chapter_11/WorldCities/ClientApp/src/api-authorization/login-menu/login-menu.component.ts
class LoginMenuComponent (line 11) | class LoginMenuComponent implements OnInit {
method constructor (line 15) | constructor(private authorizeService: AuthorizeService) { }
method ngOnInit (line 17) | ngOnInit() {
FILE: Chapter_11/WorldCities/ClientApp/src/api-authorization/login/login.component.ts
class LoginComponent (line 16) | class LoginComponent implements OnInit {
method constructor (line 19) | constructor(
method ngOnInit (line 24) | async ngOnInit() {
method login (line 49) | private async login(returnUrl: string): Promise<void> {
method processLoginCallback (line 69) | private async processLoginCallback(): Promise<void> {
method redirectToRegister (line 85) | private redirectToRegister(): any {
method redirectToProfile (line 90) | private redirectToProfile(): void {
method navigateToReturnUrl (line 94) | private async navigateToReturnUrl(returnUrl: string) {
method getReturnUrl (line 102) | private getReturnUrl(state?: INavigationState): string {
method redirectToApiAuthorizationPath (line 117) | private redirectToApiAuthorizationPath(apiAuthorizationPath: string) {
type INavigationState (line 126) | interface INavigationState {
FILE: Chapter_11/WorldCities/ClientApp/src/api-authorization/logout/logout.component.ts
class LogoutComponent (line 16) | class LogoutComponent implements OnInit {
method constructor (line 19) | constructor(
method ngOnInit (line 24) | async ngOnInit() {
method logout (line 47) | private async logout(returnUrl: string): Promise<void> {
method processLogoutCallback (line 71) | private async processLogoutCallback(): Promise<void> {
method navigateToReturnUrl (line 90) | private async navigateToReturnUrl(returnUrl: string) {
method getReturnUrl (line 96) | private getReturnUrl(state?: INavigationState): string {
type INavigationState (line 112) | interface INavigationState {
FILE: Chapter_11/WorldCities/ClientApp/src/app/angular-material.module.ts
class AngularMaterialModule (line 25) | class AngularMaterialModule { }
FILE: Chapter_11/WorldCities/ClientApp/src/app/app.component.ts
class AppComponent (line 8) | class AppComponent {
method constructor (line 16) | constructor(private connectionService: ConnectionService) {
FILE: Chapter_11/WorldCities/ClientApp/src/app/app.module.ts
class AppModule (line 95) | class AppModule { }
FILE: Chapter_11/WorldCities/ClientApp/src/app/app.server.module.ts
class AppServerModule (line 11) | class AppServerModule { }
FILE: Chapter_11/WorldCities/ClientApp/src/app/base.form.component.ts
class BaseFormComponent (line 7) | class BaseFormComponent {
method constructor (line 12) | constructor() {
method getControl (line 16) | getControl(name: string) {
method isValid (line 21) | isValid(name: string) {
method isChanged (line 27) | isChanged(name: string) {
method hasError (line 34) | hasError(name: string) {
FILE: Chapter_11/WorldCities/ClientApp/src/app/base.service.ts
method constructor (line 7) | constructor(
type ApiResult (line 26) | interface ApiResult<T> {
FILE: Chapter_11/WorldCities/ClientApp/src/app/cities/cities.component.ts
class CitiesComponent (line 16) | class CitiesComponent {
method constructor (line 31) | constructor(
method ngOnInit (line 35) | ngOnInit() {
method loadData (line 39) | loadData(query: string = null) {
method getData (line 49) | getData(event: PageEvent) {
FILE: Chapter_11/WorldCities/ClientApp/src/app/cities/city-edit.component.ts
class CityEditComponent (line 19) | class CityEditComponent
method constructor (line 42) | constructor(
method ngOnInit (line 49) | ngOnInit() {
method log (line 88) | log(str: string) {
method loadData (line 94) | loadData() {
method loadCountries (line 120) | loadCountries() {
method onSubmit (line 134) | onSubmit() {
method isDupeCity (line 169) | isDupeCity(): AsyncValidatorFn {
FILE: Chapter_11/WorldCities/ClientApp/src/app/cities/city.service.ts
class CityService (line 9) | class CityService
method constructor (line 11) | constructor(
method getData (line 17) | getData<ApiResult>(
method get (line 41) | get<City>(id): Observable<City> {
method put (line 46) | put<City>(item): Observable<City> {
method post (line 51) | post<City>(item): Observable<City> {
method getCountries (line 56) | getCountries<ApiResult>(
method isDupeCity (line 80) | isDupeCity(item): Observable<boolean> {
FILE: Chapter_11/WorldCities/ClientApp/src/app/cities/city.ts
type City (line 1) | interface City {
FILE: Chapter_11/WorldCities/ClientApp/src/app/countries/countries.component.ts
class CountriesComponent (line 16) | class CountriesComponent {
method constructor (line 31) | constructor(
method ngOnInit (line 35) | ngOnInit() {
method loadData (line 39) | loadData(query: string = null) {
method getData (line 49) | getData(event: PageEvent) {
FILE: Chapter_11/WorldCities/ClientApp/src/app/countries/country-edit.component.ts
class CountryEditComponent (line 17) | class CountryEditComponent
method constructor (line 34) | constructor(
method ngOnInit (line 42) | ngOnInit() {
method loadData (line 67) | loadData() {
method onSubmit (line 91) | onSubmit() {
method isDupeField (line 125) | isDupeField(fieldName: string): AsyncValidatorFn {
FILE: Chapter_11/WorldCities/ClientApp/src/app/countries/country.service.ts
class CountryService (line 9) | class CountryService
method constructor (line 11) | constructor(
method getData (line 17) | getData<ApiResult>(
method get (line 41) | get<Country>(id): Observable<Country> {
method put (line 46) | put<Country>(item): Observable<Country> {
method post (line 51) | post<Country>(item): Observable<Country> {
method isDupeField (line 56) | isDupeField(countryId, fieldName, fieldValue): Observable<boolean> {
FILE: Chapter_11/WorldCities/ClientApp/src/app/countries/country.ts
type Country (line 1) | interface Country {
FILE: Chapter_11/WorldCities/ClientApp/src/app/home/home.component.ts
class HomeComponent (line 7) | class HomeComponent {
FILE: Chapter_11/WorldCities/ClientApp/src/app/nav-menu/nav-menu.component.ts
class NavMenuComponent (line 8) | class NavMenuComponent {
method collapse (line 11) | collapse() {
method toggle (line 15) | toggle() {
FILE: Chapter_11/WorldCities/ClientApp/src/main.ts
function getBaseUrl (line 8) | function getBaseUrl() {
FILE: Chapter_11/WorldCities/ClientApp/src/ng-connection-service/connection-service.module.ts
class ConnectionServiceModule (line 9) | class ConnectionServiceModule {
FILE: Chapter_11/WorldCities/ClientApp/src/ng-connection-service/connection-service.service.ts
type ConnectionState (line 10) | interface ConnectionState {
type ConnectionServiceOptions (line 24) | interface ConnectionServiceOptions {
class ConnectionService (line 57) | class ConnectionService implements OnDestroy {
method options (line 81) | get options(): ConnectionServiceOptions {
method constructor (line 85) | constructor(private http: HttpClient, @Inject(ConnectionServiceOptions...
method checkInternetState (line 92) | private checkInternetState() {
method checkNetworkState (line 125) | private checkNetworkState() {
method emitEvent (line 139) | private emitEvent() {
method ngOnDestroy (line 143) | ngOnDestroy(): void {
method monitor (line 157) | monitor(reportCurrentState = true): Observable<ConnectionState> {
method updateOptions (line 174) | updateOptions(options: Partial<ConnectionServiceOptions>) {
FILE: Chapter_11/WorldCities/Controllers/CitiesController.cs
class CitiesController (line 14) | [Route("api/[controller]")]
method CitiesController (line 20) | public CitiesController(ApplicationDbContext context)
method GetCities (line 29) | [HttpGet]
method GetCity (line 58) | [HttpGet("{id}")]
method PutCity (line 74) | [Authorize]
method PostCity (line 113) | [Authorize]
method DeleteCity (line 124) | [Authorize]
method CityExists (line 140) | private bool CityExists(int id)
method IsDupeCity (line 145) | [HttpPost]
FILE: Chapter_11/WorldCities/Controllers/CountriesController.cs
class CountriesController (line 15) | [Route("api/[controller]")]
method CountriesController (line 21) | public CountriesController(ApplicationDbContext context)
method GetCountries (line 30) | [HttpGet]
method GetCountry (line 111) | [HttpGet("{id}")]
method PutCountry (line 127) | [Authorize]
method PostCountry (line 160) | [Authorize]
method DeleteCountry (line 171) | [Authorize]
method CountryExists (line 187) | private bool CountryExists(int id)
method IsDupeField (line 192) | [HttpPost]
FILE: Chapter_11/WorldCities/Controllers/OidcConfigurationController.cs
class OidcConfigurationController (line 7) | public class OidcConfigurationController : Controller
method OidcConfigurationController (line 11) | public OidcConfigurationController(IClientRequestParametersProvider cl...
method GetClientRequestParameters (line 19) | [HttpGet("_configuration/{clientId}")]
FILE: Chapter_11/WorldCities/Controllers/SeedController.cs
class SeedController (line 17) | [Route("api/[controller]/[action]")]
method SeedController (line 26) | public SeedController(
method Import (line 38) | [HttpGet]
method CreateDefaultUsers (line 160) | [HttpGet]
FILE: Chapter_11/WorldCities/Data/ApiResult.cs
class ApiResult (line 12) | public class ApiResult<T>
method ApiResult (line 17) | private ApiResult(
method CreateAsync (line 53) | public static async Task<ApiResult<T>> CreateAsync(
method IsValidProperty (line 118) | public static bool IsValidProperty(
FILE: Chapter_11/WorldCities/Data/ApplicationDbContext.cs
class ApplicationDbContext (line 9) | public class ApplicationDbContext : ApiAuthorizationDbContext<Applicatio...
method ApplicationDbContext (line 12) | public ApplicationDbContext(
method OnModelCreating (line 21) | protected override void OnModelCreating(ModelBuilder modelBuilder)
FILE: Chapter_11/WorldCities/Data/CityDTO.cs
class CityDTO (line 3) | public class CityDTO
method CityDTO (line 5) | public CityDTO() { }
FILE: Chapter_11/WorldCities/Data/CountryDTO.cs
class CountryDTO (line 5) | public class CountryDTO
method CountryDTO (line 7) | public CountryDTO() { }
FILE: Chapter_11/WorldCities/Data/IQueryableExtensions.cs
class IQueryableExtension (line 11) | public static class IQueryableExtension
method ToSql (line 13) | public static string ToSql<T>(this IQueryable<T> query)
method Private (line 31) | private static object Private(this object obj, string privateField) =>
method Private (line 35) | private static T Private<T>(this object obj, string privateField) =>
FILE: Chapter_11/WorldCities/Data/Migrations/20191230002753_Identity.Designer.cs
class Identity (line 12) | [DbContext(typeof(ApplicationDbContext))]
method BuildTargetModel (line 16) | protected override void BuildTargetModel(ModelBuilder modelBuilder)
FILE: Chapter_11/WorldCities/Data/Migrations/20191230002753_Identity.cs
class Identity (line 6) | public partial class Identity : Migration
method Up (line 8) | protected override void Up(MigrationBuilder migrationBuilder)
method Down (line 250) | protected override void Down(MigrationBuilder migrationBuilder)
FILE: Chapter_11/WorldCities/Data/Migrations/ApplicationDbContextModelSnapshot.cs
class ApplicationDbContextModelSnapshot (line 11) | [DbContext(typeof(ApplicationDbContext))]
method BuildModel (line 14) | protected override void BuildModel(ModelBuilder modelBuilder)
FILE: Chapter_11/WorldCities/Data/Models/ApplicationUser.cs
class ApplicationUser (line 9) | public class ApplicationUser : IdentityUser
FILE: Chapter_11/WorldCities/Data/Models/City.cs
class City (line 10) | public class City
method City (line 13) | public City()
FILE: Chapter_11/WorldCities/Data/Models/Country.cs
class Country (line 11) | public class Country
method Country (line 14) | public Country()
FILE: Chapter_11/WorldCities/Pages/Error.cshtml.cs
class ErrorModel (line 12) | [ResponseCache(Duration = 0, Location = ResponseCacheLocation.None, NoSt...
method ErrorModel (line 17) | public ErrorModel(ILogger<ErrorModel> logger)
method OnGet (line 26) | public void OnGet()
FILE: Chapter_11/WorldCities/Program.cs
class Program (line 12) | public class Program
method Main (line 14) | public static void Main(string[] args)
method CreateWebHostBuilder (line 19) | public static IWebHostBuilder CreateWebHostBuilder(string[] args) =>
FILE: Chapter_11/WorldCities/Startup.cs
class Startup (line 18) | public class Startup
method Startup (line 20) | public Startup(IConfiguration configuration)
method ConfigureServices (line 28) | public void ConfigureServices(IServiceCollection services)
method Configure (line 76) | public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
FILE: Chapter_11/WorldCities/wwwroot/ngsw-worker.js
class Adapter (line 17) | class Adapter {
method constructor (line 18) | constructor(scope) {
method newRequest (line 27) | newRequest(input, init) {
method newResponse (line 33) | newResponse(body, init) { return new Response(body, init); }
method newHeaders (line 37) | newHeaders(headers) { return new Headers(headers); }
method isClient (line 41) | isClient(source) { return (source instanceof Client); }
method time (line 45) | get time() { return Date.now(); }
method parseUrl (line 49) | parseUrl(url, relativeTo) {
method timeout (line 58) | timeout(ms) {
class NotFound (line 73) | class NotFound {
method constructor (line 74) | constructor(table, key) {
class CacheDatabase (line 91) | class CacheDatabase {
method constructor (line 92) | constructor(scope, adapter) {
method 'delete' (line 97) | 'delete'(name) {
method list (line 103) | list() {
method open (line 106) | open(name) {
class CacheTable (line 118) | class CacheTable {
method constructor (line 119) | constructor(table, cache, adapter) {
method request (line 124) | request(key) { return this.adapter.newRequest('/' + key); }
method 'delete' (line 125) | 'delete'(key) { return this.cache.delete(this.request(key)); }
method keys (line 126) | keys() {
method read (line 129) | read(key) {
method write (line 137) | write(key, value) {
class SwCriticalError (line 163) | class SwCriticalError extends Error {
method constructor (line 164) | constructor() {
function errorToString (line 169) | function errorToString(error) {
function sha1 (line 195) | function sha1(str) {
function sha1Binary (line 200) | function sha1Binary(buffer) {
function _sha1 (line 204) | function _sha1(words32, len) {
function add32 (line 226) | function add32(a, b) {
function add32to64 (line 229) | function add32to64(a, b) {
function rol32 (line 235) | function rol32(a, count) {
function fk (line 243) | function fk(index, b, c, d) {
function stringToWords32 (line 255) | function stringToWords32(str, endian) {
function arrayBufferToWords32 (line 263) | function arrayBufferToWords32(buffer, endian) {
function byteAt (line 272) | function byteAt(str, index) {
function wordAt (line 280) | function wordAt(str, index, endian) {
function words32ToByteString (line 294) | function words32ToByteString(words32) {
function word32ToByteString (line 297) | function word32ToByteString(word) {
function byteStringToHexString (line 304) | function byteStringToHexString(str) {
function adopt (line 321) | function adopt(value) { return value instanceof P ? value : new P(functi...
function fulfilled (line 323) | function fulfilled(value) { try { step(generator.next(value)); } catch (...
function rejected (line 324) | function rejected(value) { try { step(generator["throw"](value)); } catc...
function step (line 325) | function step(result) { result.done ? resolve(result.value) : adopt(resu...
class AssetGroup (line 334) | class AssetGroup {
method constructor (line 335) | constructor(scope, adapter, idle, config, hashes, db, prefix) {
method cacheStatus (line 366) | cacheStatus(url) {
method cleanup (line 389) | cleanup() {
method handleFetch (line 398) | handleFetch(req, ctx) {
method getConfigUrl (line 443) | getConfigUrl(url) {
method needToRevalidate (line 460) | needToRevalidate(req, res) {
method fetchFromCacheOnly (line 537) | fetchFromCacheOnly(url) {
method unhashedResources (line 562) | unhashedResources() {
method fetchAndCacheOnce (line 575) | fetchAndCacheOnce(req, used = true) {
method fetchFromNetwork (line 631) | fetchFromNetwork(req, redirectLimit = 3) {
method cacheBustedFetchFromNetwork (line 650) | cacheBustedFetchFromNetwork(req) {
method maybeUpdate (line 720) | maybeUpdate(updateFrom, req, cache) {
method cacheBust (line 746) | cacheBust(url) {
method safeFetch (line 749) | safeFetch(req) {
class PrefetchAssetGroup (line 766) | class PrefetchAssetGroup extends AssetGroup {
method initializeFully (line 767) | initializeFully(updateFrom) {
class LazyAssetGroup (line 828) | class LazyAssetGroup extends AssetGroup {
method initializeFully (line 829) | initializeFully(updateFrom) {
function adopt (line 879) | function adopt(value) { return value instanceof P ? value : new P(functi...
function fulfilled (line 881) | function fulfilled(value) { try { step(generator.next(value)); } catch (...
function rejected (line 882) | function rejected(value) { try { step(generator["throw"](value)); } catc...
function step (line 883) | function step(result) { result.done ? resolve(result.value) : adopt(resu...
class LruList (line 891) | class LruList {
method constructor (line 892) | constructor(state) {
method size (line 906) | get size() { return this.state.count; }
method pop (line 910) | pop() {
method remove (line 920) | remove(url) {
method accessed (line 968) | accessed(url) {
class DataGroup (line 1013) | class DataGroup {
method constructor (line 1014) | constructor(scope, adapter, config, db, debugHandler, prefix) {
method lru (line 1033) | lru() {
method syncLru (line 1050) | syncLru() {
method handleFetch (line 1072) | handleFetch(req, ctx) {
method handleFetchWithPerformance (line 1111) | handleFetchWithPerformance(req, ctx, lru) {
method handleFetchWithFreshness (line 1145) | handleFetchWithFreshness(req, ctx, lru) {
method networkFetchWithTimeout (line 1177) | networkFetchWithTimeout(req) {
method safeCacheResponse (line 1213) | safeCacheResponse(req, resOrPromise, lru, okToCacheOpaque) {
method loadFromCache (line 1234) | loadFromCache(req, lru) {
method cacheResponse (line 1271) | cacheResponse(req, res, lru, okToCacheOpaque = false) {
method cleanup (line 1303) | cleanup() {
method clearCacheForUrl (line 1320) | clearCacheForUrl(url) {
method safeFetch (line 1330) | safeFetch(req) {
function adopt (line 1353) | function adopt(value) { return value instanceof P ? value : new P(functi...
function fulfilled (line 1355) | function fulfilled(value) { try { step(generator.next(value)); } catch (...
function rejected (line 1356) | function rejected(value) { try { step(generator["throw"](value)); } catc...
function step (line 1357) | function step(result) { result.done ? resolve(result.value) : adopt(resu...
class AppVersion (line 1373) | class AppVersion {
method constructor (line 1374) | constructor(scope, adapter, database, idle, debugHandler, manifest, ma...
method okay (line 1425) | get okay() { return this._okay; }
method initializeFully (line 1431) | initializeFully(updateFrom) {
method handleFetch (line 1452) | handleFetch(req, context) {
method isNavigationRequest (line 1504) | isNavigationRequest(req) {
method lookupResourceWithHash (line 1520) | lookupResourceWithHash(url, hash) {
method lookupResourceWithoutHash (line 1539) | lookupResourceWithoutHash(url) {
method previouslyCachedResources (line 1555) | previouslyCachedResources() {
method recentCacheStatus (line 1560) | recentCacheStatus(url) {
method cleanup (line 1578) | cleanup() {
method appData (line 1587) | get appData() { return this.manifest.appData || null; }
method acceptsTextHtml (line 1591) | acceptsTextHtml(req) {
function adopt (line 1609) | function adopt(value) { return value instanceof P ? value : new P(functi...
function fulfilled (line 1611) | function fulfilled(value) { try { step(generator.next(value)); } catch (...
function rejected (line 1612) | function rejected(value) { try { step(generator["throw"](value)); } catc...
function step (line 1613) | function step(result) { result.done ? resolve(result.value) : adopt(resu...
class DebugHandler (line 1618) | class DebugHandler {
method constructor (line 1619) | constructor(driver, adapter) {
method handleFetch (line 1630) | handleFetch(req) {
method since (line 1664) | since(time) {
method log (line 1681) | log(value, context = '') {
method errorToString (line 1694) | errorToString(err) { return `${err.name}(${err.message}, ${err.stack})...
method formatDebugLog (line 1695) | formatDebugLog(log) {
function adopt (line 1709) | function adopt(value) { return value instanceof P ? value : new P(functi...
function fulfilled (line 1711) | function fulfilled(value) { try { step(generator.next(value)); } catch (...
function rejected (line 1712) | function rejected(value) { try { step(generator["throw"](value)); } catc...
function step (line 1713) | function step(result) { result.done ? resolve(result.value) : adopt(resu...
class IdleScheduler (line 1717) | class IdleScheduler {
method constructor (line 1718) | constructor(adapter, threshold, debug) {
method trigger (line 1729) | trigger() {
method execute (line 1750) | execute() {
method schedule (line 1773) | schedule(desc, run) {
method size (line 1779) | get size() { return this.queue.length; }
method taskDescriptions (line 1780) | get taskDescriptions() { return this.queue.map(task => task.desc); }
function hashManifest (line 1790) | function hashManifest(manifest) {
function isMsgCheckForUpdates (line 1801) | function isMsgCheckForUpdates(msg) {
function isMsgActivateUpdate (line 1804) | function isMsgActivateUpdate(msg) {
function adopt (line 1816) | function adopt(value) { return value instanceof P ? value : new P(functi...
function fulfilled (line 1818) | function fulfilled(value) { try { step(generator.next(value)); } catch (...
function rejected (line 1819) | function rejected(value) { try { step(generator["throw"](value)); } catc...
function step (line 1820) | function step(result) { result.done ? resolve(result.value) : adopt(resu...
class Driver (line 1842) | class Driver {
method constructor (line 1843) | constructor(scope, adapter, db) {
method onFetch (line 1943) | onFetch(event) {
method onMessage (line 1998) | onMessage(event) {
method onPush (line 2024) | onPush(msg) {
method onClick (line 2032) | onClick(event) {
method ensureInitialized (line 2036) | ensureInitialized(event) {
method handleMessage (line 2063) | handleMessage(msg, from) {
method handlePush (line 2074) | handlePush(data) {
method handleClick (line 2090) | handleClick(notification, action) {
method reportStatus (line 2104) | reportStatus(client, promise, nonce) {
method updateClient (line 2116) | updateClient(client) {
method handleFetch (line 2146) | handleFetch(event) {
method initialize (line 2206) | initialize() {
method lookupVersionByHash (line 2310) | lookupVersionByHash(hash, debugName = 'lookupVersionByHash') {
method assignVersion (line 2320) | assignVersion(event) {
method fetchLatestManifest (line 2400) | fetchLatestManifest(ignoreOfflineError = false) {
method deleteAllCaches (line 2417) | deleteAllCaches() {
method scheduleInitialization (line 2434) | scheduleInitialization(appVersion) {
method versionFailed (line 2452) | versionFailed(appVersion, err) {
method setupUpdate (line 2492) | setupUpdate(manifest, hash) {
method checkForUpdate (line 2518) | checkForUpdate() {
method sync (line 2548) | sync() {
method cleanupCaches (line 2571) | cleanupCaches() {
method cleanupOldSwCaches (line 2620) | cleanupOldSwCaches() {
method lookupResourceWithHash (line 2631) | lookupResourceWithHash(url, hash) {
method lookupResourceWithoutHash (line 2651) | lookupResourceWithoutHash(url) {
method previouslyCachedResources (line 2658) | previouslyCachedResources() {
method recentCacheStatus (line 2665) | recentCacheStatus(url) {
method mergeHashWithAppData (line 2671) | mergeHashWithAppData(manifest, hash) {
method notifyClientsAboutUpdate (line 2677) | notifyClientsAboutUpdate(next) {
method broadcast (line 2704) | broadcast(msg) {
method debugState (line 2710) | debugState() {
method debugVersions (line 2720) | debugVersions() {
method debugIdleState (line 2736) | debugIdleState() {
method safeFetch (line 2745) | safeFetch(req) {
FILE: Chapter_12/HealthCheck/ClientApp/e2e/protractor.conf.js
method onPrepare (line 20) | onPrepare() {
FILE: Chapter_12/HealthCheck/ClientApp/e2e/src/app.po.ts
class AppPage (line 3) | class AppPage {
method navigateTo (line 4) | navigateTo() {
method getMainHeading (line 8) | getMainHeading() {
FILE: Chapter_12/HealthCheck/ClientApp/src/app/app.component.ts
class AppComponent (line 8) | class AppComponent {
method constructor (line 16) | constructor(private connectionService: ConnectionService) {
FILE: Chapter_12/HealthCheck/ClientApp/src/app/app.module.ts
class AppModule (line 38) | class AppModule { }
FILE: Chapter_12/HealthCheck/ClientApp/src/app/app.server.module.ts
class AppServerModule (line 11) | class AppServerModule { }
FILE: Chapter_12/HealthCheck/ClientApp/src/app/health-check/health-check.component.ts
class HealthCheckComponent (line 9) | class HealthCheckComponent {
method constructor (line 12) | constructor(
method ngOnInit (line 17) | ngOnInit() {
type Result (line 24) | interface Result {
type Check (line 30) | interface Check {
FILE: Chapter_12/HealthCheck/ClientApp/src/app/home/home.component.ts
class HomeComponent (line 7) | class HomeComponent {
FILE: Chapter_12/HealthCheck/ClientApp/src/app/nav-menu/nav-menu.component.ts
class NavMenuComponent (line 8) | class NavMenuComponent {
method collapse (line 11) | collapse() {
method toggle (line 15) | toggle() {
FILE: Chapter_12/HealthCheck/ClientApp/src/main.ts
function getBaseUrl (line 7) | function getBaseUrl() {
FILE: Chapter_12/HealthCheck/ClientApp/src/ng-connection-service/connection-service.module.ts
class ConnectionServiceModule (line 9) | class ConnectionServiceModule {
FILE: Chapter_12/HealthCheck/ClientApp/src/ng-connection-service/connection-service.service.ts
type ConnectionState (line 10) | interface ConnectionState {
type ConnectionServiceOptions (line 24) | interface ConnectionServiceOptions {
class ConnectionService (line 57) | class ConnectionService implements OnDestroy {
method options (line 81) | get options(): ConnectionServiceOptions {
method constructor (line 85) | constructor(private http: HttpClient, @Inject(ConnectionServiceOptions...
method checkInternetState (line 92) | private checkInternetState() {
method checkNetworkState (line 125) | private checkNetworkState() {
method emitEvent (line 139) | private emitEvent() {
method ngOnDestroy (line 143) | ngOnDestroy(): void {
method monitor (line 157) | monitor(reportCurrentState = true): Observable<ConnectionState> {
method updateOptions (line 174) | updateOptions(options: Partial<ConnectionServiceOptions>) {
FILE: Chapter_12/HealthCheck/CustomHealthCheckOptions.cs
class CustomHealthCheckOptions (line 9) | public class CustomHealthCheckOptions : HealthCheckOptions
method CustomHealthCheckOptions (line 11) | public CustomHealthCheckOptions() : base()
FILE: Chapter_12/HealthCheck/ICMPHealthCheck.cs
class ICMPHealthCheck (line 9) | public class ICMPHealthCheck : IHealthCheck
method ICMPHealthCheck (line 14) | public ICMPHealthCheck(string host, int timeout)
method CheckHealthAsync (line 20) | public async Task<HealthCheckResult> CheckHealthAsync(
FILE: Chapter_12/HealthCheck/Pages/Error.cshtml.cs
class ErrorModel (line 12) | [ResponseCache(Duration = 0, Location = ResponseCacheLocation.None, NoSt...
method ErrorModel (line 17) | public ErrorModel(ILogger<ErrorModel> logger)
method OnGet (line 26) | public void OnGet()
FILE: Chapter_12/HealthCheck/Program.cs
class Program (line 12) | public class Program
method Main (line 14) | public static void Main(string[] args)
method CreateWebHostBuilder (line 19) | public static IWebHostBuilder CreateWebHostBuilder(string[] args) =>
FILE: Chapter_12/HealthCheck/Startup.cs
class Startup (line 12) | public class Startup
method Startup (line 14) | public Startup(IConfiguration configuration)
method ConfigureServices (line 22) | public void ConfigureServices(IServiceCollection services)
method Configure (line 38) | public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
FILE: Chapter_12/HealthCheck/wwwroot/ngsw-worker.js
class Adapter (line 17) | class Adapter {
method constructor (line 18) | constructor(scope) {
method newRequest (line 27) | newRequest(input, init) {
method newResponse (line 33) | newResponse(body, init) { return new Response(body, init); }
method newHeaders (line 37) | newHeaders(headers) { return new Headers(headers); }
method isClient (line 41) | isClient(source) { return (source instanceof Client); }
method time (line 45) | get time() { return Date.now(); }
method parseUrl (line 49) | parseUrl(url, relativeTo) {
method timeout (line 58) | timeout(ms) {
class NotFound (line 73) | class NotFound {
method constructor (line 74) | constructor(table, key) {
class CacheDatabase (line 91) | class CacheDatabase {
method constructor (line 92) | constructor(scope, adapter) {
method 'delete' (line 97) | 'delete'(name) {
method list (line 103) | list() {
method open (line 106) | open(name) {
class CacheTable (line 118) | class CacheTable {
method constructor (line 119) | constructor(table, cache, adapter) {
method request (line 124) | request(key) { return this.adapter.newRequest('/' + key); }
method 'delete' (line 125) | 'delete'(key) { return this.cache.delete(this.request(key)); }
method keys (line 126) | keys() {
method read (line 129) | read(key) {
method write (line 137) | write(key, value) {
class SwCriticalError (line 163) | class SwCriticalError extends Error {
method constructor (line 164) | constructor() {
function errorToString (line 169) | function errorToString(error) {
function sha1 (line 195) | function sha1(str) {
function sha1Binary (line 200) | function sha1Binary(buffer) {
function _sha1 (line 204) | function _sha1(words32, len) {
function add32 (line 226) | function add32(a, b) {
function add32to64 (line 229) | function add32to64(a, b) {
function rol32 (line 235) | function rol32(a, count) {
function fk (line 243) | function fk(index, b, c, d) {
function stringToWords32 (line 255) | function stringToWords32(str, endian) {
function arrayBufferToWords32 (line 263) | function arrayBufferToWords32(buffer, endian) {
function byteAt (line 272) | function byteAt(str, index) {
function wordAt (line 280) | function wordAt(str, index, endian) {
function words32ToByteString (line 294) | function words32ToByteString(words32) {
function word32ToByteString (line 297) | function word32ToByteString(word) {
function byteStringToHexString (line 304) | function byteStringToHexString(str) {
function adopt (line 321) | function adopt(value) { return value instanceof P ? value : new P(functi...
function fulfilled (line 323) | function fulfilled(value) { try { step(generator.next(value)); } catch (...
function rejected (line 324) | function rejected(value) { try { step(generator["throw"](value)); } catc...
function step (line 325) | function step(result) { result.done ? resolve(result.value) : adopt(resu...
class AssetGroup (line 334) | class AssetGroup {
method constructor (line 335) | constructor(scope, adapter, idle, config, hashes, db, prefix) {
method cacheStatus (line 366) | cacheStatus(url) {
method cleanup (line 389) | cleanup() {
method handleFetch (line 398) | handleFetch(req, ctx) {
method getConfigUrl (line 443) | getConfigUrl(url) {
method needToRevalidate (line 460) | needToRevalidate(req, res) {
method fetchFromCacheOnly (line 537) | fetchFromCacheOnly(url) {
method unhashedResources (line 562) | unhashedResources() {
method fetchAndCacheOnce (line 575) | fetchAndCacheOnce(req, used = true) {
method fetchFromNetwork (line 631) | fetchFromNetwork(req, redirectLimit = 3) {
method cacheBustedFetchFromNetwork (line 650) | cacheBustedFetchFromNetwork(req) {
method maybeUpdate (line 720) | maybeUpdate(updateFrom, req, cache) {
method cacheBust (line 746) | cacheBust(url) {
method safeFetch (line 749) | safeFetch(req) {
class PrefetchAssetGroup (line 766) | class PrefetchAssetGroup extends AssetGroup {
method initializeFully (line 767) | initializeFully(updateFrom) {
class LazyAssetGroup (line 828) | class LazyAssetGroup extends AssetGroup {
method initializeFully (line 829) | initializeFully(updateFrom) {
function adopt (line 879) | function adopt(value) { return value instanceof P ? value : new P(functi...
function fulfilled (line 881) | function fulfilled(value) { try { step(generator.next(value)); } catch (...
function rejected (line 882) | function rejected(value) { try { step(generator["throw"](value)); } catc...
function step (line 883) | function step(result) { result.done ? resolve(result.value) : adopt(resu...
class LruList (line 891) | class LruList {
method constructor (line 892) | constructor(state) {
method size (line 906) | get size() { return this.state.count; }
method pop (line 910) | pop() {
method remove (line 920) | remove(url) {
method accessed (line 968) | accessed(url) {
class DataGroup (line 1013) | class DataGroup {
method constructor (line 1014) | constructor(scope, adapter, config, db, debugHandler, prefix) {
method lru (line 1033) | lru() {
method syncLru (line 1050) | syncLru() {
method handleFetch (line 1072) | handleFetch(req, ctx) {
method handleFetchWithPerformance (line 1111) | handleFetchWithPerformance(req, ctx, lru) {
method handleFetchWithFreshness (line 1145) | handleFetchWithFreshness(req, ctx, lru) {
method networkFetchWithTimeout (line 1177) | networkFetchWithTimeout(req) {
method safeCacheResponse (line 1213) | safeCacheResponse(req, resOrPromise, lru, okToCacheOpaque) {
method loadFromCache (line 1234) | loadFromCache(req, lru) {
method cacheResponse (line 1271) | cacheResponse(req, res, lru, okToCacheOpaque = false) {
method cleanup (line 1303) | cleanup() {
method clearCacheForUrl (line 1320) | clearCacheForUrl(url) {
method safeFetch (line 1330) | safeFetch(req) {
function adopt (line 1353) | function adopt(value) { return value instanceof P ? value : new P(functi...
function fulfilled (line 1355) | function fulfilled(value) { try { step(generator.next(value)); } catch (...
function rejected (line 1356) | function rejected(value) { try { step(generator["throw"](value)); } catc...
function step (line 1357) | function step(result) { result.done ? resolve(result.value) : adopt(resu...
class AppVersion (line 1373) | class AppVersion {
method constructor (line 1374) | constructor(scope, adapter, database, idle, debugHandler, manifest, ma...
method okay (line 1425) | get okay() { return this._okay; }
method initializeFully (line 1431) | initializeFully(updateFrom) {
method handleFetch (line 1452) | handleFetch(req, context) {
method isNavigationRequest (line 1504) | isNavigationRequest(req) {
method lookupResourceWithHash (line 1520) | lookupResourceWithHash(url, hash) {
method lookupResourceWithoutHash (line 1539) | lookupResourceWithoutHash(url) {
method previouslyCachedResources (line 1555) | previouslyCachedResources() {
method recentCacheStatus (line 1560) | recentCacheStatus(url) {
method cleanup (line 1578) | cleanup() {
method appData (line 1587) | get appData() { return this.manifest.appData || null; }
method acceptsTextHtml (line 1591) | acceptsTextHtml(req) {
function adopt (line 1609) | function adopt(value) { return value instanceof P ? value : new P(functi...
function fulfilled (line 1611) | function fulfilled(value) { try { step(generator.next(value)); } catch (...
function rejected (line 1612) | function rejected(value) { try { step(generator["throw"](value)); } catc...
function step (line 1613) | function step(result) { result.done ? resolve(result.value) : adopt(resu...
class DebugHandler (line 1618) | class DebugHandler {
method constructor (line 1619) | constructor(driver, adapter) {
method handleFetch (line 1630) | handleFetch(req) {
method since (line 1664) | since(time) {
method log (line 1681) | log(value, context = '') {
method errorToString (line 1694) | errorToString(err) { return `${err.name}(${err.message}, ${err.stack})...
method formatDebugLog (line 1695) | formatDebugLog(log) {
function adopt (line 1709) | function adopt(value) { return value instanceof P ? value : new P(functi...
function fulfilled (line 1711) | function fulfilled(value) { try { step(generator.next(value)); } catch (...
function rejected (line 1712) | function rejected(value) { try { step(generator["throw"](value)); } catc...
function step (line 1713) | function step(result) { result.done ? resolve(result.value) : adopt(resu...
class IdleScheduler (line 1717) | class IdleScheduler {
method constructor (line 1718) | constructor(adapter, threshold, debug) {
method trigger (line 1729) | trigger() {
method execute (line 1750) | execute() {
method schedule (line 1773) | schedule(desc, run) {
method size (line 1779) | get size() { return this.queue.length; }
method taskDescriptions (line 1780) | get taskDescriptions() { return this.queue.map(task => task.desc); }
function hashManifest (line 1790) | function hashManifest(manifest) {
function isMsgCheckForUpdates (line 1801) | function isMsgCheckForUpdates(msg) {
function isMsgActivateUpdate (line 1804) | function isMsgActivateUpdate(msg) {
function adopt (line 1816) | function adopt(value) { return value instanceof P ? value : new P(functi...
function fulfilled (line 1818) | function fulfilled(value) { try { step(generator.next(value)); } catch (...
function rejected (line 1819) | function rejected(value) { try { step(generator["throw"](value)); } catc...
function step (line 1820) | function step(result) { result.done ? resolve(result.value) : adopt(resu...
class Driver (line 1842) | class Driver {
method constructor (line 1843) | constructor(scope, adapter, db) {
method onFetch (line 1943) | onFetch(event) {
method onMessage (line 1998) | onMessage(event) {
method onPush (line 2024) | onPush(msg) {
method onClick (line 2032) | onClick(event) {
method ensureInitialized (line 2036) | ensureInitialized(event) {
method handleMessage (line 2063) | handleMessage(msg, from) {
method handlePush (line 2074) | handlePush(data) {
method handleClick (line 2090) | handleClick(notification, action) {
method reportStatus (line 2104) | reportStatus(client, promise, nonce) {
method updateClient (line 2116) | updateClient(client) {
method handleFetch (line 2146) | handleFetch(event) {
method initialize (line 2206) | initialize() {
method lookupVersionByHash (line 2310) | lookupVersionByHash(hash, debugName = 'lookupVersionByHash') {
method assignVersion (line 2320) | assignVersion(event) {
method fetchLatestManifest (line 2400) | fetchLatestManifest(ignoreOfflineError = false) {
method deleteAllCaches (line 2417) | deleteAllCaches() {
method scheduleInitialization (line 2434) | scheduleInitialization(appVersion) {
method versionFailed (line 2452) | versionFailed(appVersion, err) {
method setupUpdate (line 2492) | setupUpdate(manifest, hash) {
method checkForUpdate (line 2518) | checkForUpdate() {
method sync (line 2548) | sync() {
method cleanupCaches (line 2571) | cleanupCaches() {
method cleanupOldSwCaches (line 2620) | cleanupOldSwCaches() {
method lookupResourceWithHash (line 2631) | lookupResourceWithHash(url, hash) {
method lookupResourceWithoutHash (line 2651) | lookupResourceWithoutHash(url) {
method previouslyCachedResources (line 2658) | previouslyCachedResources() {
method recentCacheStatus (line 2665) | recentCacheStatus(url) {
method mergeHashWithAppData (line 2671) | mergeHashWithAppData(manifest, hash) {
method notifyClientsAboutUpdate (line 2677) | notifyClientsAboutUpdate(next) {
method broadcast (line 2704) | broadcast(msg) {
method debugState (line 2710) | debugState() {
method debugVersions (line 2720) | debugVersions() {
method debugIdleState (line 2736) | debugIdleState() {
method safeFetch (line 2745) | safeFetch(req) {
FILE: Chapter_12/WorldCities/ClientApp/e2e/protractor.conf.js
method onPrepare (line 20) | onPrepare() {
FILE: Chapter_12/WorldCities/ClientApp/e2e/src/app.po.ts
class AppPage (line 3) | class AppPage {
method navigateTo (line 4) | navigateTo() {
method getMainHeading (line 8) | getMainHeading() {
FILE: Chapter_12/WorldCities/ClientApp/src/api-authorization/api-authorization.constants.ts
type ApplicationPathsType (line 58) | interface ApplicationPathsType {
FILE: Chapter_12/WorldCities/ClientApp/src/api-authorization/api-authorization.module.ts
class ApiAuthorizationModule (line 30) | class ApiAuthorizationModule { }
FILE: Chapter_12/WorldCities/ClientApp/src/api-authorization/authorize.guard.ts
class AuthorizeGuard (line 11) | class AuthorizeGuard implements CanActivate {
method constructor (line 12) | constructor(private authorize: AuthorizeService, private router: Route...
method canActivate (line 14) | canActivate(
method handleAuthorization (line 21) | private handleAuthorization(isAuthenticated: boolean, state: RouterSta...
FILE: Chapter_12/WorldCities/ClientApp/src/api-authorization/authorize.interceptor.ts
class AuthorizeInterceptor (line 10) | class AuthorizeInterceptor implements HttpInterceptor {
method constructor (line 11) | constructor(private authorize: AuthorizeService) { }
method intercept (line 13) | intercept(req: HttpRequest<any>, next: HttpHandler): Observable<HttpEv...
method processRequestWithToken (line 21) | private processRequestWithToken(token: string, req: HttpRequest<any>, ...
method isSameOriginUrl (line 33) | private isSameOriginUrl(req: any) {
FILE: Chapter_12/WorldCities/ClientApp/src/api-authorization/authorize.service.ts
type IAuthenticationResult (line 7) | type IAuthenticationResult =
type SuccessAuthenticationResult (line 12) | interface SuccessAuthenticationResult {
type FailureAuthenticationResult (line 17) | interface FailureAuthenticationResult {
type RedirectAuthenticationResult (line 22) | interface RedirectAuthenticationResult {
type AuthenticationResultStatus (line 26) | enum AuthenticationResultStatus {
type IUser (line 32) | interface IUser {
class AuthorizeService (line 39) | class AuthorizeService {
method isAuthenticated (line 47) | public isAuthenticated(): Observable<boolean> {
method getUser (line 51) | public getUser(): Observable<IUser | null> {
method getAccessToken (line 58) | public getAccessToken(): Observable<string> {
method signIn (line 72) | public async signIn(state: any): Promise<IAuthenticationResult> {
method completeSignIn (line 110) | public async completeSignIn(url: string): Promise<IAuthenticationResul...
method signOut (line 122) | public async signOut(state: any): Promise<IAuthenticationResult> {
method completeSignOut (line 144) | public async completeSignOut(url: string): Promise<IAuthenticationResu...
method createArguments (line 156) | private createArguments(state?: any): any {
method error (line 160) | private error(message: string): IAuthenticationResult {
method success (line 164) | private success(state: any): IAuthenticationResult {
method redirect (line 168) | private redirect(): IAuthenticationResult {
method ensureUserManagerInitialized (line 172) | private async ensureUserManagerInitialized(): Promise<void> {
method getUserFromStorage (line 193) | private getUserFromStorage(): Observable<IUser> {
FILE: Chapter_12/WorldCities/ClientApp/src/api-authorization/login-menu/login-menu.component.ts
class LoginMenuComponent (line 11) | class LoginMenuComponent implements OnInit {
method constructor (line 15) | constructor(private authorizeService: AuthorizeService) { }
method ngOnInit (line 17) | ngOnInit() {
FILE: Chapter_12/WorldCities/ClientApp/src/api-authorization/login/login.component.ts
class LoginComponent (line 16) | class LoginComponent implements OnInit {
method constructor (line 19) | constructor(
method ngOnInit (line 24) | async ngOnInit() {
method login (line 49) | private async login(returnUrl: string): Promise<void> {
method processLoginCallback (line 69) | private async processLoginCallback(): Promise<void> {
method redirectToRegister (line 85) | private redirectToRegister(): any {
method redirectToProfile (line 90) | private redirectToProfile(): void {
method navigateToReturnUrl (line 94) | private async navigateToReturnUrl(returnUrl: string) {
method getReturnUrl (line 102) | private getReturnUrl(state?: INavigationState): string {
method redirectToApiAuthorizationPath (line 117) | private redirectToApiAuthorizationPath(apiAuthorizationPath: string) {
type INavigationState (line 126) | interface INavigationState {
FILE: Chapter_12/WorldCities/ClientApp/src/api-authorization/logout/logout.component.ts
class LogoutComponent (line 16) | class LogoutComponent implements OnInit {
method constructor (line 19) | constructor(
method ngOnInit (line 24) | async ngOnInit() {
method logout (line 47) | private async logout(returnUrl: string): Promise<void> {
method processLogoutCallback (line 71) | private async processLogoutCallback(): Promise<void> {
method navigateToReturnUrl (line 90) | private async navigateToReturnUrl(returnUrl: string) {
method getReturnUrl (line 96) | private getReturnUrl(state?: INavigationState): string {
type INavigationState (line 112) | interface INavigationState {
FILE: Chapter_12/WorldCities/ClientApp/src/app/angular-material.module.ts
class AngularMaterialModule (line 25) | class AngularMaterialModule { }
FILE: Chapter_12/WorldCities/ClientApp/src/app/app.component.ts
class AppComponent (line 8) | class AppComponent {
method constructor (line 16) | constructor(private connectionService: ConnectionService) {
FILE: Chapter_12/WorldCities/ClientApp/src/app/app.module.ts
class AppModule (line 95) | class AppModule { }
FILE: Chapter_12/WorldCities/ClientApp/src/app/app.server.module.ts
class AppServerModule (line 11) | class AppServerModule { }
FILE: Chapter_12/WorldCities/ClientApp/src/app/base.form.component.ts
class BaseFormComponent (line 7) | class BaseFormComponent {
method constructor (line 12) | constructor() {
method getControl (line 16) | getControl(name: string) {
method isValid (line 21) | isValid(name: string) {
method isChanged (line 27) | isChanged(name: string) {
method hasError (line 34) | hasError(name: string) {
FILE: Chapter_12/WorldCities/ClientApp/src/app/base.service.ts
method constructor (line 7) | constructor(
type ApiResult (line 26) | interface ApiResult<T> {
FILE: Chapter_12/WorldCities/ClientApp/src/app/cities/cities.component.ts
class CitiesComponent (line 16) | class CitiesComponent {
method constructor (line 31) | constructor(
method ngOnInit (line 35) | ngOnInit() {
method loadData (line 39) | loadData(query: string = null) {
method getData (line 49) | getData(event: PageEvent) {
FILE: Chapter_12/WorldCities/ClientApp/src/app/cities/city-edit.component.ts
class CityEditComponent (line 19) | class CityEditComponent
method constructor (line 42) | constructor(
method ngOnInit (line 49) | ngOnInit() {
method log (line 88) | log(str: string) {
method loadData (line 94) | loadData() {
method loadCountries (line 120) | loadCountries() {
method onSubmit (line 134) | onSubmit() {
method isDupeCity (line 169) | isDupeCity(): AsyncValidatorFn {
FILE: Chapter_12/WorldCities/ClientApp/src/app/cities/city.service.ts
class CityService (line 9) | class CityService
method constructor (line 11) | constructor(
method getData (line 17) | getData<ApiResult>(
method get (line 41) | get<City>(id): Observable<City> {
method put (line 46) | put<City>(item): Observable<City> {
method post (line 51) | post<City>(item): Observable<City> {
method getCountries (line 56) | getCountries<ApiResult>(
method isDupeCity (line 80) | isDupeCity(item): Observable<boolean> {
FILE: Chapter_12/WorldCities/ClientApp/src/app/cities/city.ts
type City (line 1) | interface City {
FILE: Chapter_12/WorldCities/ClientApp/src/app/countries/countries.component.ts
class CountriesComponent (line 16) | class CountriesComponent {
method constructor (line 31) | constructor(
method ngOnInit (line 35) | ngOnInit() {
method loadData (line 39) | loadData(query: string = null) {
method getData (line 49) | getData(event: PageEvent) {
FILE: Chapter_12/WorldCities/ClientApp/src/app/countries/country-edit.component.ts
class CountryEditComponent (line 17) | class CountryEditComponent
method constructor (line 34) | constructor(
method ngOnInit (line 42) | ngOnInit() {
method loadData (line 67) | loadData() {
method onSubmit (line 91) | onSubmit() {
method isDupeField (line 125) | isDupeField(fieldName: string): AsyncValidatorFn {
FILE: Chapter_12/WorldCities/ClientApp/src/app/countries/country.service.ts
class CountryService (line 9) | class CountryService
method constructor (line 11) | constructor(
method getData (line 17) | getData<ApiResult>(
method get (line 41) | get<Country>(id): Observable<Country> {
method put (line 46) | put<Country>(item): Observable<Country> {
method post (line 51) | post<Country>(item): Observable<Country> {
method isDupeField (line 56) | isDupeField(countryId, fieldName, fieldValue): Observable<boolean> {
FILE: Chapter_12/WorldCities/ClientApp/src/app/countries/country.ts
type Country (line 1) | interface Country {
FILE: Chapter_12/WorldCities/ClientApp/src/app/home/home.component.ts
class HomeComponent (line 7) | class HomeComponent {
FILE: Chapter_12/WorldCities/ClientApp/src/app/nav-menu/nav-menu.component.ts
class NavMenuComponent (line 8) | class NavMenuComponent {
method collapse (line 11) | collapse() {
method toggle (line 15) | toggle() {
FILE: Chapter_12/WorldCities/ClientApp/src/main.ts
function getBaseUrl (line 8) | function getBaseUrl() {
FILE: Chapter_12/WorldCities/ClientApp/src/ng-connection-service/connection-service.module.ts
class ConnectionServiceModule (line 9) | class ConnectionServiceModule {
FILE: Chapter_12/WorldCities/ClientApp/src/ng-connection-service/connection-service.service.ts
type ConnectionState (line 10) | interface ConnectionState {
type ConnectionServiceOptions (line 24) | interface ConnectionServiceOptions {
class ConnectionService (line 57) | class ConnectionService implements OnDestroy {
method options (line 81) | get options(): ConnectionServiceOptions {
method constructor (line 85) | constructor(private http: HttpClient, @Inject(ConnectionServiceOptions...
method checkInternetState (line 92) | private checkInternetState() {
method checkNetworkState (line 125) | private checkNetworkState() {
method emitEvent (line 139) | private emitEvent() {
method ngOnDestroy (line 143) | ngOnDestroy(): void {
method monitor (line 157) | monitor(reportCurrentState = true): Observable<ConnectionState> {
method updateOptions (line 174) | updateOptions(options: Partial<ConnectionServiceOptions>) {
FILE: Chapter_12/WorldCities/Controllers/CitiesController.cs
class CitiesController (line 14) | [Route("api/[controller]")]
method CitiesController (line 20) | public CitiesController(ApplicationDbContext context)
method GetCities (line 29) | [HttpGet]
method GetCity (line 58) | [HttpGet("{id}")]
method PutCity (line 74) | [Authorize]
method PostCity (line 113) | [Authorize]
method DeleteCity (line 124) | [Authorize]
method CityExists (line 140) | private bool CityExists(int id)
method IsDupeCity (line 145) | [HttpPost]
FILE: Chapter_12/WorldCities/Controllers/CountriesController.cs
class CountriesController (line 15) | [Route("api/[controller]")]
method CountriesController (line 21) | public CountriesController(ApplicationDbContext context)
method GetCountries (line 30) | [HttpGet]
method GetCountry (line 111) | [HttpGet("{id}")]
method PutCountry (line 127) | [Authorize]
method PostCountry (line 160) | [Authorize]
method DeleteCountry (line 171) | [Authorize]
method CountryExists (line 187) | private bool CountryExists(int id)
method IsDupeField (line 192) | [HttpPost]
FILE: Chapter_12/WorldCities/Controllers/OidcConfigurationController.cs
class OidcConfigurationController (line 7) | public class OidcConfigurationController : Controller
method OidcConfigurationController (line 11) | public OidcConfigurationController(IClientRequestParametersProvider cl...
method GetClientRequestParameters (line 19) | [HttpGet("_configuration/{clientId}")]
FILE: Chapter_12/WorldCities/Controllers/SeedController.cs
class SeedController (line 17) | [Route("api/[controller]/[action]")]
method SeedController (line 26) | public SeedController(
method Import (line 38) | [HttpGet]
method CreateDefaultUsers (line 160) | [HttpGet]
FILE: Chapter_12/WorldCities/Data/ApiResult.cs
class ApiResult (line 12) | public class ApiResult<T>
method ApiResult (line 17) | private ApiResult(
method CreateAsync (line 53) | public static async Task<ApiResult<T>> CreateAsync(
method IsValidProperty (line 118) | public static bool IsValidProperty(
FILE: Chapter_12/WorldCities/Data/ApplicationDbContext.cs
class ApplicationDbContext (line 9) | public class ApplicationDbContext : ApiAuthorizationDbContext<Applicatio...
method ApplicationDbContext (line 12) | public ApplicationDbContext(
method OnModelCreating (line 21) | protected override void OnModelCreating(ModelBuilder modelBuilder)
FILE: Chapter_12/WorldCities/Data/CityDTO.cs
class CityDTO (line 3) | public class CityDTO
method CityDTO (line 5) | public CityDTO() { }
FILE: Chapter_12/WorldCities/Data/CountryDTO.cs
class CountryDTO (line 5) | public class CountryDTO
method CountryDTO (line 7) | public CountryDTO() { }
FILE: Chapter_12/WorldCities/Data/IQueryableExtensions.cs
class IQueryableExtension (line 11) | public static class IQueryableExtension
method ToSql (line 13) | public static string ToSql<T>(this IQueryable<T> query)
method Private (line 31) | private static object Private(this object obj, string privateField) =>
method Private (line 35) | private static T Private<T>(this object obj, string privateField) =>
FILE: Chapter_12/WorldCities/Data/Migrations/20191230002753_Identity.Designer.cs
class Identity (line 12) | [DbContext(typeof(ApplicationDbContext))]
method BuildTargetModel (line 16) | protected override void BuildTargetModel(ModelBuilder modelBuilder)
FILE: Chapter_12/WorldCities/Data/Migrations/20191230002753_Identity.cs
class Identity (line 6) | public partial class Identity : Migration
method Up (line 8) | protected override void Up(MigrationBuilder migrationBuilder)
method Down (line 250) | protected override void Down(MigrationBuilder migrationBuilder)
FILE: Chapter_12/WorldCities/Data/Migrations/ApplicationDbContextModelSnapshot.cs
class ApplicationDbContextModelSnapshot (line 11) | [DbContext(typeof(ApplicationDbContext))]
method BuildModel (line 14) | protected override void BuildModel(ModelBuilder modelBuilder)
FILE: Chapter_12/WorldCities/Data/Models/ApplicationUser.cs
class ApplicationUser (line 9) | public class ApplicationUser : IdentityUser
FILE: Chapter_12/WorldCities/Data/Models/City.cs
class City (line 10) | public class City
method City (line 13) | public City()
FILE: Chapter_12/WorldCities/Data/Models/Country.cs
class Country (line 11) | public class Country
method Country (line 14) | public Country()
FILE: Chapter_12/WorldCities/Pages/Error.cshtml.cs
class ErrorModel (line 12) | [ResponseCache(Duration = 0, Location = ResponseCacheLocation.None, NoSt...
method ErrorModel (line 17) | public ErrorModel(ILogger<ErrorModel> logger)
method OnGet (line 26) | public void OnGet()
FILE: Chapter_12/WorldCities/Program.cs
class Program (line 12) | public class Program
method Main (line 14) | public static void Main(string[] args)
method CreateWebHostBuilder (line 19) | public static IWebHostBuilder CreateWebHostBuilder(string[] args) =>
FILE: Chapter_12/WorldCities/Startup.cs
class Startup (line 19) | public class Startup
method Startup (line 21) | public Startup(IConfiguration configuration)
method ConfigureServices (line 29) | public void ConfigureServices(IServiceCollection services)
method Configure (line 77) | public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
FILE: Chapter_12/WorldCities/wwwroot/ngsw-worker.js
class Adapter (line 17) | class Adapter {
method constructor (line 18) | constructor(scope) {
method newRequest (line 27) | newRequest(input, init) {
method newResponse (line 33) | newResponse(body, init) { return new Response(body, init); }
method newHeaders (line 37) | newHeaders(headers) { return new Headers(headers); }
method isClient (line 41) | isClient(source) { return (source instanceof Client); }
method time (line 45) | get time() { return Date.now(); }
method parseUrl (line 49) | parseUrl(url, relativeTo) {
method timeout (line 58) | timeout(ms) {
class NotFound (line 73) | class NotFound {
method constructor (line 74) | constructor(table, key) {
class CacheDatabase (line 91) | class CacheDatabase {
method constructor (line 92) | constructor(scope, adapter) {
method 'delete' (line 97) | 'delete'(name) {
method list (line 103) | list() {
method open (line 106) | open(name) {
class CacheTable (line 118) | class CacheTable {
method constructor (line 119) | constructor(table, cache, adapter) {
method request (line 124) | request(key) { return this.adapter.newRequest('/' + key); }
method 'delete' (line 125) | 'delete'(key) { return this.cache.delete(this.request(key)); }
method keys (line 126) | keys() {
method read (line 129) | read(key) {
method write (line 137) | write(key, value) {
class SwCriticalError (line 163) | class SwCriticalError extends Error {
method constructor (line 164) | constructor() {
function errorToString (line 169) | function errorToString(error) {
function sha1 (line 195) | function sha1(str) {
function sha1Binary (line 200) | function sha1Binary(buffer) {
function _sha1 (line 204) | function _sha1(words32, len) {
function add32 (line 226) | function add32(a, b) {
function add32to64 (line 229) | function add32to64(a, b) {
function rol32 (line 235) | function rol32(a, count) {
function fk (line 243) | function fk(index, b, c, d) {
function stringToWords32 (line 255) | function stringToWords32(str, endian) {
function arrayBufferToWords32 (line 263) | function arrayBufferToWords32(buffer, endian) {
function byteAt (line 272) | function byteAt(str, index) {
function wordAt (line 280) | function wordAt(str, index, endian) {
function words32ToByteString (line 294) | function words32ToByteString(words32) {
function word32ToByteString (line 297) | function word32ToByteString(word) {
function byteStringToHexString (line 304) | function byteStringToHexString(str) {
function adopt (line 321) | function adopt(value) { return value instanceof P ? value : new P(functi...
function fulfilled (line 323) | function fulfilled(value) { try { step(generator.next(value)); } catch (...
function rejected (line 324) | function rejected(value) { try { step(generator["throw"](value)); } catc...
function step (line 325) | function step(result) { result.done ? resolve(result.value) : adopt(resu...
class AssetGroup (line 334) | class AssetGroup {
method constructor (line 335) | constructor(scope, adapter, idle, config, hashes, db, prefix) {
method cacheStatus (line 366) | cacheStatus(url) {
method cleanup (line 389) | cleanup() {
method handleFetch (line 398) | handleFetch(req, ctx) {
method getConfigUrl (line 443) | getConfigUrl(url) {
method needToRevalidate (line 460) | needToRevalidate(req, res) {
method fetchFromCacheOnly (line 537) | fetchFromCacheOnly(url) {
method unhashedResources (line 562) | unhashedResources() {
method fetchAndCacheOnce (line 575) | fetchAndCacheOnce(req, used = true) {
method fetchFromNetwork (line 631) | fetchFromNetwork(req, redirectLimit = 3) {
method cacheBustedFetchFromNetwork (line 650) | cacheBustedFetchFromNetwork(req) {
method maybeUpdate (line 720) | maybeUpdate(updateFrom, req, cache) {
method cacheBust (line 746) | cacheBust(url) {
method safeFetch (line 749) | safeFetch(req) {
class PrefetchAssetGroup (line 766) | class PrefetchAssetGroup extends AssetGroup {
method initializeFully (line 767) | initializeFully(updateFrom) {
class LazyAssetGroup (line 828) | class LazyAssetGroup extends AssetGroup {
method initializeFully (line 829) | initializeFully(updateFrom) {
function adopt (line 879) | function adopt(value) { return value instanceof P ? value : new P(functi...
function fulfilled (line 881) | function fulfilled(value) { try { step(generator.next(value)); } catch (...
function rejected (line 882) | function rejected(value) { try { step(generator["throw"](value)); } catc...
function step (line 883) | function step(result) { result.done ? resolve(result.value) : adopt(resu...
class LruList (line 891) | class LruList {
method constructor (line 892) | constructor(state) {
method size (line 906) | get size() { return this.state.count; }
method pop (line 910) | pop() {
method remove (line 920) | remove(url) {
method accessed (line 968) | accessed(url) {
class DataGroup (line 1013) | class DataGroup {
method constructor (line 1014) | constructor(scope, adapter, config, db, debugHandler, prefix) {
method lru (line 1033) | lru() {
method syncLru (line 1050) | syncLru() {
method handleFetch (line 1072) | handleFetch(req, ctx) {
method handleFetchWithPerformance (line 1111) | handleFetchWithPerformance(req, ctx, lru) {
method handleFetchWithFreshness (line 1145) | handleFetchWithFreshness(req, ctx, lru) {
method networkFetchWithTimeout (line 1177) | networkFetchWithTimeout(req) {
method safeCacheResponse (line 1213) | safeCacheResponse(req, resOrPromise, lru, okToCacheOpaque) {
method loadFromCache (line 1234) | loadFromCache(req, lru) {
method cacheResponse (line 1271) | cacheResponse(req, res, lru, okToCacheOpaque = false) {
method cleanup (line 1303) | cleanup() {
method clearCacheForUrl (line 1320) | clearCacheForUrl(url) {
method safeFetch (line 1330) | safeFetch(req) {
function adopt (line 1353) | function adopt(value) { return value instanceof P ? value : new P(functi...
function fulfilled (line 1355) | function fulfilled(value) { try { step(generator.next(value)); } catch (...
function rejected (line 1356) | function rejected(value) { try { step(generator["throw"](value)); } catc...
function step (line 1357) | function step(result) { result.done ? resolve(result.value) : adopt(resu...
class AppVersion (line 1373) | class AppVersion {
method constructor (line 1374) | constructor(scope, adapter, database, idle, debugHandler, manifest, ma...
method okay (line 1425) | get okay() { return this._okay; }
method initializeFully (line 1431) | initializeFully(updateFrom) {
method handleFetch (line 1452) | handleFetch(req, context) {
method isNavigationRequest (line 1504) | isNavigationRequest(req) {
method lookupResourceWithHash (line 1520) | lookupResourceWithHash(url, hash) {
method lookupResourceWithoutHash (line 1539) | lookupResourceWithoutHash(url) {
method previouslyCachedResources (line 1555) | previouslyCachedResources() {
method recentCacheStatus (line 1560) | recentCacheStatus(url) {
method cleanup (line 1578) | cleanup() {
method appData (line 1587) | get appData() { return this.manifest.appData || null; }
method acceptsTextHtml (line 1591) | acceptsTextHtml(req) {
function adopt (line 1609) | function adopt(value) { return value instanceof P ? value : new P(functi...
function fulfilled (line 1611) | function fulfilled(value) { try { step(generator.next(value)); } catch (...
function rejected (line 1612) | function rejected(value) { try { step(generator["throw"](value)); } catc...
function step (line 1613) | function step(result) { result.done ? resolve(result.value) : adopt(resu...
class DebugHandler (line 1618) | class DebugHandler {
method constructor (line 1619) | constructor(driver, adapter) {
method handleFetch (line 1630) | handleFetch(req) {
method since (line 1664) | since(time) {
method log (line 1681) | log(value, context = '') {
method errorToString (line 1694) | errorToString(err) { return `${err.name}(${err.message}, ${err.stack})...
method formatDebugLog (line 1695) | formatDebugLog(log) {
function adopt (line 1709) | function adopt(value) { return value instanceof P ? value : new P(functi...
function fulfilled (line 1711) | function fulfilled(value) { try { step(generator.next(value)); } catch (...
function rejected (line 1712) | function rejected(value) { try { step(generator["throw"](value)); } catc...
function step (line 1713) | function step(result) { result.done ? resolve(result.value) : adopt(resu...
class IdleScheduler (line 1717) | class IdleScheduler {
method constructor (line 1718) | constructor(adapter, threshold, debug) {
method trigger (line 1729) | trigger() {
method execute (line 1750) | execute() {
method schedule (line 1773) | schedule(desc, run) {
method size (line 1779) | get size() { return this.queue.length; }
method taskDescriptions (line 1780) | get taskDescriptions() { return this.queue.map(task => task.desc); }
function hashManifest (line 1790) | function hashManifest(manifest) {
function isMsgCheckForUpdates (line 1801) | function isMsgCheckForUpdates(msg) {
function isMsgActivateUpdate (line 1804) | function isMsgActivateUpdate(msg) {
function adopt (line 1816) | function adopt(value) { return value instanceof P ? value : new P(functi...
function fulfilled (line 1818) | function fulfilled(value) { try { step(generator.next(value)); } catch (...
function rejected (line 1819) | function rejected(value) { try { step(generator["throw"](value)); } catc...
function step (line 1820) | function step(result) { result.done ? resolve(result.value) : adopt(resu...
class Driver (line 1842) | class Driver {
method constructor (line 1843) | constructor(scope, adapter, db) {
method onFetch (line 1943) | onFetch(event) {
method onMessage (line 1998) | onMessage(event) {
method onPush (line 2024) | onPush(msg) {
method onClick (line 2032) | onClick(event) {
method ensureInitialized (line 2036) | ensureInitialized(event) {
method handleMessage (line 2063) | handleMessage(msg, from) {
method handlePush (line 2074) | handlePush(data) {
method handleClick (line 2090) | handleClick(notification, action) {
method reportStatus (line 2104) | reportStatus(client, promise, nonce) {
method updateClient (line 2116) | updateClient(client) {
method handleFetch (line 2146) | handleFetch(event) {
method initialize (line 2206) | initialize() {
method lookupVersionByHash (line 2310) | lookupVersionByHash(hash, debugName = 'lookupVersionByHash') {
method assignVersion (line 2320) | assignVersion(event) {
method fetchLatestManifest (line 2400) | fetchLatestManifest(ignoreOfflineError = false) {
method deleteAllCaches (line 2417) | deleteAllCaches() {
method scheduleInitialization (line 2434) | scheduleInitialization(appVersion) {
method versionFailed (line 2452) | versionFailed(appVersion, err) {
method setupUpdate (line 2492) | setupUpdate(manifest, hash) {
method checkForUpdate (line 2518) | checkForUpdate() {
method sync (line 2548) | sync() {
method cleanupCaches (line 2571) | cleanupCaches() {
method cleanupOldSwCaches (line 2620) | cleanupOldSwCaches() {
method lookupResourceWithHash (line 2631) | lookupResourceWithHash(url, hash) {
method lookupResourceWithoutHash (line 2651) | lookupResourceWithoutHash(url) {
method previouslyCachedResources (line 2658) | previouslyCachedResources() {
method recentCacheStatus (line 2665) | recentCacheStatus(url) {
method mergeHashWithAppData (line 2671) | mergeHashWithAppData(manifest, hash) {
method notifyClientsAboutUpdate (line 2677) | notifyClientsAboutUpdate(next) {
method broadcast (line 2704) | broadcast(msg) {
method debugState (line 2710) | debugState() {
method debugVersions (line 2720) | debugVersions() {
method debugIdleState (line 2736) | debugIdleState() {
method safeFetch (line 2745) | safeFetch(req) {
Condensed preview — 1124 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (2,340K chars).
[
{
"path": ".gitignore",
"chars": 6334,
"preview": "<<<<<<< HEAD\n# use glob syntax\nsyntax: glob\n\nwwwroot/app/**\nwwwroot/bin/**\nwwwroot/js/**\nwwwroot/scripts/**\nwwwroot/styl"
},
{
"path": ".hgignore",
"chars": 681,
"preview": "# use glob syntax\nsyntax: glob\n\nwwwroot/app/**\nwwwroot/bin/**\nwwwroot/js/**\nwwwroot/scripts/**\nwwwroot/styles/**\nwwwroot"
},
{
"path": "All_Chapters.sln",
"chars": 12307,
"preview": "\nMicrosoft Visual Studio Solution File, Format Version 12.00\n# Visual Studio Version 16\nVisualStudioVersion = 16.0.2920"
},
{
"path": "Chapter_01/HealthCheck/.gitignore",
"chars": 3534,
"preview": "## Ignore Visual Studio temporary files, build results, and\n## files generated by popular Visual Studio add-ons.\n\n# User"
},
{
"path": "Chapter_01/HealthCheck/ClientApp/.editorconfig",
"chars": 245,
"preview": "# Editor configuration, see http://editorconfig.org\nroot = true\n\n[*]\ncharset = utf-8\nindent_style = space\nindent_size = "
},
{
"path": "Chapter_01/HealthCheck/ClientApp/.gitignore",
"chars": 516,
"preview": "# See http://help.github.com/ignore-files/ for more about ignoring files.\n\n# compiled output\n/dist\n/dist-server\n/tmp\n/ou"
},
{
"path": "Chapter_01/HealthCheck/ClientApp/README.md",
"chars": 1028,
"preview": "# HealthCheck\n\nThis project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 6.0.0.\n\n## "
},
{
"path": "Chapter_01/HealthCheck/ClientApp/angular.json",
"chars": 4120,
"preview": "{\n \"$schema\": \"./node_modules/@angular/cli/lib/config/schema.json\",\n \"version\": 1,\n \"newProjectRoot\": \"projects\",\n \""
},
{
"path": "Chapter_01/HealthCheck/ClientApp/browserslist",
"chars": 375,
"preview": "# This file is currently used by autoprefixer to adjust CSS to support the below specified browsers\n# For additional inf"
},
{
"path": "Chapter_01/HealthCheck/ClientApp/e2e/protractor.conf.js",
"chars": 757,
"preview": "// Protractor configuration file, see link for more information\n// https://github.com/angular/protractor/blob/master/lib"
},
{
"path": "Chapter_01/HealthCheck/ClientApp/e2e/src/app.e2e-spec.ts",
"chars": 277,
"preview": "import { AppPage } from './app.po';\n\ndescribe('App', () => {\n let page: AppPage;\n\n beforeEach(() => {\n page = new A"
},
{
"path": "Chapter_01/HealthCheck/ClientApp/e2e/src/app.po.ts",
"chars": 206,
"preview": "import { browser, by, element } from 'protractor';\n\nexport class AppPage {\n navigateTo() {\n return browser.get('/');"
},
{
"path": "Chapter_01/HealthCheck/ClientApp/e2e/tsconfig.e2e.json",
"chars": 213,
"preview": "{\n \"extends\": \"../tsconfig.json\",\n \"compilerOptions\": {\n \"outDir\": \"../out-tsc/app\",\n \"module\": \"commonjs\",\n "
},
{
"path": "Chapter_01/HealthCheck/ClientApp/package.json",
"chars": 1632,
"preview": "{\n \"name\": \"healthcheck\",\n \"version\": \"0.0.0\",\n \"scripts\": {\n \"ng\": \"ng\",\n \"start\": \"echo Starting... && ng ser"
},
{
"path": "Chapter_01/HealthCheck/ClientApp/src/app/app.component.html",
"chars": 118,
"preview": "<body>\n <app-nav-menu></app-nav-menu>\n <div class=\"container\">\n <router-outlet></router-outlet>\n </div>\n</body>\n"
},
{
"path": "Chapter_01/HealthCheck/ClientApp/src/app/app.component.ts",
"chars": 169,
"preview": "import { Component } from '@angular/core';\n\n@Component({\n selector: 'app-root',\n templateUrl: './app.component.html'\n}"
},
{
"path": "Chapter_01/HealthCheck/ClientApp/src/app/app.module.ts",
"chars": 1136,
"preview": "import { BrowserModule } from '@angular/platform-browser';\nimport { NgModule } from '@angular/core';\nimport { FormsModul"
},
{
"path": "Chapter_01/HealthCheck/ClientApp/src/app/app.server.module.ts",
"chars": 413,
"preview": "import { NgModule } from '@angular/core';\nimport { ServerModule } from '@angular/platform-server';\nimport { ModuleMapLoa"
},
{
"path": "Chapter_01/HealthCheck/ClientApp/src/app/counter/counter.component.html",
"chars": 234,
"preview": "<h1>Counter</h1>\n\n<p>This is a simple example of an Angular component.</p>\n\n<p aria-live=\"polite\">Current count: <strong"
},
{
"path": "Chapter_01/HealthCheck/ClientApp/src/app/counter/counter.component.spec.ts",
"chars": 1133,
"preview": "import { async, ComponentFixture, TestBed } from '@angular/core/testing';\n\nimport { CounterComponent } from './counter.c"
},
{
"path": "Chapter_01/HealthCheck/ClientApp/src/app/counter/counter.component.ts",
"chars": 260,
"preview": "import { Component } from '@angular/core';\n\n@Component({\n selector: 'app-counter-component',\n templateUrl: './counter."
},
{
"path": "Chapter_01/HealthCheck/ClientApp/src/app/fetch-data/fetch-data.component.html",
"chars": 616,
"preview": "<h1 id=\"tableLabel\">Weather forecast</h1>\n\n<p>This component demonstrates fetching data from the server.</p>\n\n<p *ngIf=\""
},
{
"path": "Chapter_01/HealthCheck/ClientApp/src/app/fetch-data/fetch-data.component.ts",
"chars": 612,
"preview": "import { Component, Inject } from '@angular/core';\nimport { HttpClient } from '@angular/common/http';\n\n@Component({\n se"
},
{
"path": "Chapter_01/HealthCheck/ClientApp/src/app/home/home.component.html",
"chars": 1480,
"preview": "<h1>Hello, world!</h1>\n<p>Welcome to your new single-page application, built with:</p>\n<ul>\n <li><a href='https://get.a"
},
{
"path": "Chapter_01/HealthCheck/ClientApp/src/app/home/home.component.ts",
"chars": 155,
"preview": "import { Component } from '@angular/core';\n\n@Component({\n selector: 'app-home',\n templateUrl: './home.component.html',"
},
{
"path": "Chapter_01/HealthCheck/ClientApp/src/app/nav-menu/nav-menu.component.css",
"chars": 249,
"preview": "a.navbar-brand {\n white-space: normal;\n text-align: center;\n word-break: break-all;\n}\n\nhtml {\n font-size: 14px;\n}\n@m"
},
{
"path": "Chapter_01/HealthCheck/ClientApp/src/app/nav-menu/nav-menu.component.html",
"chars": 1424,
"preview": "<header>\n <nav\n class=\"navbar navbar-expand-sm navbar-toggleable-sm navbar-light bg-white border-bottom box-shadow m"
},
{
"path": "Chapter_01/HealthCheck/ClientApp/src/app/nav-menu/nav-menu.component.ts",
"chars": 337,
"preview": "import { Component } from '@angular/core';\n\n@Component({\n selector: 'app-nav-menu',\n templateUrl: './nav-menu.componen"
},
{
"path": "Chapter_01/HealthCheck/ClientApp/src/assets/.gitkeep",
"chars": 0,
"preview": ""
},
{
"path": "Chapter_01/HealthCheck/ClientApp/src/environments/environment.prod.ts",
"chars": 51,
"preview": "export const environment = {\n production: true\n};\n"
},
{
"path": "Chapter_01/HealthCheck/ClientApp/src/environments/environment.ts",
"chars": 631,
"preview": "// This file can be replaced during build by using the `fileReplacements` array.\n// `ng build ---prod` replaces `environ"
},
{
"path": "Chapter_01/HealthCheck/ClientApp/src/index.html",
"chars": 336,
"preview": "<!DOCTYPE html>\n<html lang=\"en\">\n <head>\n <meta charset=\"utf-8\" />\n <title>HealthCheck</title>\n <base href=\"/\""
},
{
"path": "Chapter_01/HealthCheck/ClientApp/src/karma.conf.js",
"chars": 965,
"preview": "// Karma configuration file, see link for more information\n// https://karma-runner.github.io/1.0/config/configuration-fi"
},
{
"path": "Chapter_01/HealthCheck/ClientApp/src/main.ts",
"chars": 555,
"preview": "import { enableProdMode } from '@angular/core';\nimport { platformBrowserDynamic } from '@angular/platform-browser-dynami"
},
{
"path": "Chapter_01/HealthCheck/ClientApp/src/polyfills.ts",
"chars": 2838,
"preview": "/**\n * This file includes polyfills needed by Angular and is loaded before the app.\n * You can add your own extra polyfi"
},
{
"path": "Chapter_01/HealthCheck/ClientApp/src/styles.css",
"chars": 279,
"preview": "/* You can add global styles to this file, and also import other style files */\n\n/* Provide sufficient contrast against "
},
{
"path": "Chapter_01/HealthCheck/ClientApp/src/test.ts",
"chars": 642,
"preview": "// This file is required by karma.conf.js and loads recursively all the .spec and framework files\n\nimport 'zone.js/dist/"
},
{
"path": "Chapter_01/HealthCheck/ClientApp/src/tsconfig.app.json",
"chars": 170,
"preview": "{\n \"extends\": \"../tsconfig.json\",\n \"compilerOptions\": {\n \"outDir\": \"../out-tsc/app\",\n \"types\": []\n },\n \"exclud"
},
{
"path": "Chapter_01/HealthCheck/ClientApp/src/tsconfig.server.json",
"chars": 183,
"preview": "{\n \"extends\": \"../tsconfig.json\",\n \"compilerOptions\": {\n \"module\": \"commonjs\"\n },\n \"angularCompilerOptions\": {\n "
},
{
"path": "Chapter_01/HealthCheck/ClientApp/src/tsconfig.spec.json",
"chars": 256,
"preview": "{\n \"extends\": \"../tsconfig.json\",\n \"compilerOptions\": {\n \"outDir\": \"../out-tsc/spec\",\n \"types\": [\n \"jasmine"
},
{
"path": "Chapter_01/HealthCheck/ClientApp/src/tslint.json",
"chars": 314,
"preview": "{\n \"extends\": \"../tslint.json\",\n \"rules\": {\n \"directive-selector\": [\n true,\n \"attribu"
},
{
"path": "Chapter_01/HealthCheck/ClientApp/tsconfig.json",
"chars": 411,
"preview": "{\n \"compileOnSave\": false,\n \"compilerOptions\": {\n \"baseUrl\": \"./\",\n \"module\": \"esnext\",\n \"outDir\": \"./dist/ou"
},
{
"path": "Chapter_01/HealthCheck/ClientApp/tslint.json",
"chars": 2800,
"preview": "{\n \"rulesDirectory\": [\n \"node_modules/codelyzer\"\n ],\n \"rules\": {\n \"arrow-return-shorthand\": true,\n \"callable"
},
{
"path": "Chapter_01/HealthCheck/ClientApp/update-npm.bat",
"chars": 20,
"preview": "cd %~dp0\nnpm update\n"
},
{
"path": "Chapter_01/HealthCheck/Controllers/WeatherForecastController.cs",
"chars": 1143,
"preview": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Threading.Tasks;\nusing Microsoft.AspNet"
},
{
"path": "Chapter_01/HealthCheck/HealthCheck.csproj",
"chars": 2736,
"preview": "<Project Sdk=\"Microsoft.NET.Sdk.Web\">\n\n <PropertyGroup>\n <TargetFramework>netcoreapp3.1</TargetFramework>\n <TypeS"
},
{
"path": "Chapter_01/HealthCheck/Pages/Error.cshtml",
"chars": 854,
"preview": "@page\n@model ErrorModel\n@{\n ViewData[\"Title\"] = \"Error\";\n}\n\n<h1 class=\"text-danger\">Error.</h1>\n<h2 class=\"text-dang"
},
{
"path": "Chapter_01/HealthCheck/Pages/Error.cshtml.cs",
"chars": 812,
"preview": "using System;\nusing System.Collections.Generic;\nusing System.Diagnostics;\nusing System.Linq;\nusing System.Threading.Task"
},
{
"path": "Chapter_01/HealthCheck/Pages/_ViewImports.cshtml",
"chars": 101,
"preview": "@using HealthCheck\n@namespace HealthCheck.Pages\n@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers\n"
},
{
"path": "Chapter_01/HealthCheck/Program.cs",
"chars": 589,
"preview": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Threading.Tasks;\nusing Microsoft.AspNetC"
},
{
"path": "Chapter_01/HealthCheck/Startup.cs",
"chars": 2438,
"preview": "using Microsoft.AspNetCore.Builder;\nusing Microsoft.AspNetCore.Hosting;\nusing Microsoft.AspNetCore.HttpsPolicy;\nusing Mi"
},
{
"path": "Chapter_01/HealthCheck/WeatherForecast.cs",
"chars": 292,
"preview": "using System;\n\nnamespace HealthCheck\n{\n public class WeatherForecast\n {\n public DateTime Date { get; set; }"
},
{
"path": "Chapter_01/HealthCheck/appsettings.Development.json",
"chars": 137,
"preview": "{\n \"Logging\": {\n \"LogLevel\": {\n \"Default\": \"Debug\",\n \"System\": \"Information\",\n \"Microsoft\": \"Informat"
},
{
"path": "Chapter_01/HealthCheck/appsettings.json",
"chars": 103,
"preview": "{\n \"Logging\": {\n \"LogLevel\": {\n \"Default\": \"Warning\"\n }\n },\n\"AllowedHosts\": \"*\"\n}\n"
},
{
"path": "Chapter_01.sln",
"chars": 1123,
"preview": "\nMicrosoft Visual Studio Solution File, Format Version 12.00\n# Visual Studio Version 16\nVisualStudioVersion = 16.0.2910"
},
{
"path": "Chapter_02/HealthCheck/.gitignore",
"chars": 3534,
"preview": "## Ignore Visual Studio temporary files, build results, and\n## files generated by popular Visual Studio add-ons.\n\n# User"
},
{
"path": "Chapter_02/HealthCheck/ClientApp/.editorconfig",
"chars": 245,
"preview": "# Editor configuration, see http://editorconfig.org\nroot = true\n\n[*]\ncharset = utf-8\nindent_style = space\nindent_size = "
},
{
"path": "Chapter_02/HealthCheck/ClientApp/.gitignore",
"chars": 516,
"preview": "# See http://help.github.com/ignore-files/ for more about ignoring files.\n\n# compiled output\n/dist\n/dist-server\n/tmp\n/ou"
},
{
"path": "Chapter_02/HealthCheck/ClientApp/README.md",
"chars": 1028,
"preview": "# HealthCheck\n\nThis project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 6.0.0.\n\n## "
},
{
"path": "Chapter_02/HealthCheck/ClientApp/angular.json",
"chars": 4126,
"preview": "{\n \"$schema\": \"./node_modules/@angular/cli/lib/config/schema.json\",\n \"version\": 1,\n \"newProjectRoot\": \"projects\",\n \""
},
{
"path": "Chapter_02/HealthCheck/ClientApp/browserslist",
"chars": 375,
"preview": "# This file is currently used by autoprefixer to adjust CSS to support the below specified browsers\n# For additional inf"
},
{
"path": "Chapter_02/HealthCheck/ClientApp/e2e/protractor.conf.js",
"chars": 757,
"preview": "// Protractor configuration file, see link for more information\n// https://github.com/angular/protractor/blob/master/lib"
},
{
"path": "Chapter_02/HealthCheck/ClientApp/e2e/src/app.e2e-spec.ts",
"chars": 277,
"preview": "import { AppPage } from './app.po';\n\ndescribe('App', () => {\n let page: AppPage;\n\n beforeEach(() => {\n page = new A"
},
{
"path": "Chapter_02/HealthCheck/ClientApp/e2e/src/app.po.ts",
"chars": 206,
"preview": "import { browser, by, element } from 'protractor';\n\nexport class AppPage {\n navigateTo() {\n return browser.get('/');"
},
{
"path": "Chapter_02/HealthCheck/ClientApp/e2e/tsconfig.e2e.json",
"chars": 213,
"preview": "{\n \"extends\": \"../tsconfig.json\",\n \"compilerOptions\": {\n \"outDir\": \"../out-tsc/app\",\n \"module\": \"commonjs\",\n "
},
{
"path": "Chapter_02/HealthCheck/ClientApp/package.json",
"chars": 1632,
"preview": "{\n \"name\": \"healthcheck\",\n \"version\": \"0.0.0\",\n \"scripts\": {\n \"ng\": \"ng\",\n \"start\": \"echo Starting... && ng ser"
},
{
"path": "Chapter_02/HealthCheck/ClientApp/src/app/app.component.html",
"chars": 118,
"preview": "<body>\n <app-nav-menu></app-nav-menu>\n <div class=\"container\">\n <router-outlet></router-outlet>\n </div>\n</body>\n"
},
{
"path": "Chapter_02/HealthCheck/ClientApp/src/app/app.component.ts",
"chars": 169,
"preview": "import { Component } from '@angular/core';\n\n@Component({\n selector: 'app-root',\n templateUrl: './app.component.html'\n}"
},
{
"path": "Chapter_02/HealthCheck/ClientApp/src/app/app.module.ts",
"chars": 836,
"preview": "import { BrowserModule } from '@angular/platform-browser';\nimport { NgModule } from '@angular/core';\nimport { FormsModul"
},
{
"path": "Chapter_02/HealthCheck/ClientApp/src/app/app.server.module.ts",
"chars": 413,
"preview": "import { NgModule } from '@angular/core';\nimport { ServerModule } from '@angular/platform-server';\nimport { ModuleMapLoa"
},
{
"path": "Chapter_02/HealthCheck/ClientApp/src/app/home/home.component.html",
"chars": 1480,
"preview": "<h1>Hello, world!</h1>\n<p>Welcome to your new single-page application, built with:</p>\n<ul>\n <li><a href='https://get.a"
},
{
"path": "Chapter_02/HealthCheck/ClientApp/src/app/home/home.component.ts",
"chars": 155,
"preview": "import { Component } from '@angular/core';\n\n@Component({\n selector: 'app-home',\n templateUrl: './home.component.html',"
},
{
"path": "Chapter_02/HealthCheck/ClientApp/src/app/nav-menu/nav-menu.component.css",
"chars": 249,
"preview": "a.navbar-brand {\n white-space: normal;\n text-align: center;\n word-break: break-all;\n}\n\nhtml {\n font-size: 14px;\n}\n@m"
},
{
"path": "Chapter_02/HealthCheck/ClientApp/src/app/nav-menu/nav-menu.component.html",
"chars": 1028,
"preview": "<header>\n <nav\n class=\"navbar navbar-expand-sm navbar-toggleable-sm navbar-light bg-white border-bottom box-shadow m"
},
{
"path": "Chapter_02/HealthCheck/ClientApp/src/app/nav-menu/nav-menu.component.ts",
"chars": 337,
"preview": "import { Component } from '@angular/core';\n\n@Component({\n selector: 'app-nav-menu',\n templateUrl: './nav-menu.componen"
},
{
"path": "Chapter_02/HealthCheck/ClientApp/src/assets/.gitkeep",
"chars": 0,
"preview": ""
},
{
"path": "Chapter_02/HealthCheck/ClientApp/src/environments/environment.prod.ts",
"chars": 51,
"preview": "export const environment = {\n production: true\n};\n"
},
{
"path": "Chapter_02/HealthCheck/ClientApp/src/environments/environment.ts",
"chars": 631,
"preview": "// This file can be replaced during build by using the `fileReplacements` array.\n// `ng build ---prod` replaces `environ"
},
{
"path": "Chapter_02/HealthCheck/ClientApp/src/index.html",
"chars": 336,
"preview": "<!DOCTYPE html>\n<html lang=\"en\">\n <head>\n <meta charset=\"utf-8\" />\n <title>HealthCheck</title>\n <base href=\"/\""
},
{
"path": "Chapter_02/HealthCheck/ClientApp/src/karma.conf.js",
"chars": 965,
"preview": "// Karma configuration file, see link for more information\n// https://karma-runner.github.io/1.0/config/configuration-fi"
},
{
"path": "Chapter_02/HealthCheck/ClientApp/src/main.ts",
"chars": 555,
"preview": "import { enableProdMode } from '@angular/core';\nimport { platformBrowserDynamic } from '@angular/platform-browser-dynami"
},
{
"path": "Chapter_02/HealthCheck/ClientApp/src/polyfills.ts",
"chars": 2838,
"preview": "/**\n * This file includes polyfills needed by Angular and is loaded before the app.\n * You can add your own extra polyfi"
},
{
"path": "Chapter_02/HealthCheck/ClientApp/src/styles.css",
"chars": 279,
"preview": "/* You can add global styles to this file, and also import other style files */\n\n/* Provide sufficient contrast against "
},
{
"path": "Chapter_02/HealthCheck/ClientApp/src/test.ts",
"chars": 642,
"preview": "// This file is required by karma.conf.js and loads recursively all the .spec and framework files\n\nimport 'zone.js/dist/"
},
{
"path": "Chapter_02/HealthCheck/ClientApp/src/tsconfig.app.json",
"chars": 170,
"preview": "{\n \"extends\": \"../tsconfig.json\",\n \"compilerOptions\": {\n \"outDir\": \"../out-tsc/app\",\n \"types\": []\n },\n \"exclud"
},
{
"path": "Chapter_02/HealthCheck/ClientApp/src/tsconfig.server.json",
"chars": 183,
"preview": "{\n \"extends\": \"../tsconfig.json\",\n \"compilerOptions\": {\n \"module\": \"commonjs\"\n },\n \"angularCompilerOptions\": {\n "
},
{
"path": "Chapter_02/HealthCheck/ClientApp/src/tsconfig.spec.json",
"chars": 256,
"preview": "{\n \"extends\": \"../tsconfig.json\",\n \"compilerOptions\": {\n \"outDir\": \"../out-tsc/spec\",\n \"types\": [\n \"jasmine"
},
{
"path": "Chapter_02/HealthCheck/ClientApp/src/tslint.json",
"chars": 314,
"preview": "{\n \"extends\": \"../tslint.json\",\n \"rules\": {\n \"directive-selector\": [\n true,\n \"attribu"
},
{
"path": "Chapter_02/HealthCheck/ClientApp/tsconfig.json",
"chars": 477,
"preview": "{\n \"compileOnSave\": false,\n \"compilerOptions\": {\n \"baseUrl\": \"./\",\n \"module\": \"esnext\",\n \"outDir\": \"./dist/ou"
},
{
"path": "Chapter_02/HealthCheck/ClientApp/tslint.json",
"chars": 2800,
"preview": "{\n \"rulesDirectory\": [\n \"node_modules/codelyzer\"\n ],\n \"rules\": {\n \"arrow-return-shorthand\": true,\n \"callable"
},
{
"path": "Chapter_02/HealthCheck/ClientApp/update-npm.bat",
"chars": 20,
"preview": "cd %~dp0\nnpm update\n"
},
{
"path": "Chapter_02/HealthCheck/HealthCheck.csproj",
"chars": 2792,
"preview": "<Project Sdk=\"Microsoft.NET.Sdk.Web\">\n\n <PropertyGroup>\n <TargetFramework>netcoreapp3.1</TargetFramework>\n <Type"
},
{
"path": "Chapter_02/HealthCheck/Pages/Error.cshtml",
"chars": 854,
"preview": "@page\n@model ErrorModel\n@{\n ViewData[\"Title\"] = \"Error\";\n}\n\n<h1 class=\"text-danger\">Error.</h1>\n<h2 class=\"text-dang"
},
{
"path": "Chapter_02/HealthCheck/Pages/Error.cshtml.cs",
"chars": 812,
"preview": "using System;\nusing System.Collections.Generic;\nusing System.Diagnostics;\nusing System.Linq;\nusing System.Threading.Task"
},
{
"path": "Chapter_02/HealthCheck/Pages/_ViewImports.cshtml",
"chars": 101,
"preview": "@using HealthCheck\n@namespace HealthCheck.Pages\n@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers\n"
},
{
"path": "Chapter_02/HealthCheck/Program.cs",
"chars": 589,
"preview": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Threading.Tasks;\nusing Microsoft.AspNetC"
},
{
"path": "Chapter_02/HealthCheck/Startup.cs",
"chars": 3066,
"preview": "using Microsoft.AspNetCore.Builder;\nusing Microsoft.AspNetCore.Hosting;\nusing Microsoft.AspNetCore.HttpsPolicy;\nusing Mi"
},
{
"path": "Chapter_02/HealthCheck/appsettings.Development.json",
"chars": 279,
"preview": "{\n \"Logging\": {\n \"LogLevel\": {\n \"Default\": \"Debug\",\n \"System\": \"Information\",\n \"Microsoft\": \"Informat"
},
{
"path": "Chapter_02/HealthCheck/appsettings.json",
"chars": 230,
"preview": "{\n \"Logging\": {\n \"LogLevel\": {\n \"Default\": \"Warning\"\n }\n },\n \"AllowedHosts\": \"*\",\n \"StaticFiles\": {\n \""
},
{
"path": "Chapter_02/HealthCheck/libman.json",
"chars": 71,
"preview": "{\n \"version\": \"1.0\",\n \"defaultProvider\": \"cdnjs\",\n \"libraries\": []\n}"
},
{
"path": "Chapter_02/HealthCheck/wwwroot/test.html",
"chars": 440,
"preview": "<!DOCTYPE html>\n<html>\n<head>\n <meta charset=\"utf-8\" />\n <title>Time for a test!</title>\n</head>\n<body>\n Hello"
},
{
"path": "Chapter_02.sln",
"chars": 1122,
"preview": "\nMicrosoft Visual Studio Solution File, Format Version 12.00\n# Visual Studio Version 16\nVisualStudioVersion = 16.0.2920"
},
{
"path": "Chapter_03/HealthCheck/.gitignore",
"chars": 3534,
"preview": "## Ignore Visual Studio temporary files, build results, and\n## files generated by popular Visual Studio add-ons.\n\n# User"
},
{
"path": "Chapter_03/HealthCheck/ClientApp/.editorconfig",
"chars": 245,
"preview": "# Editor configuration, see http://editorconfig.org\nroot = true\n\n[*]\ncharset = utf-8\nindent_style = space\nindent_size = "
},
{
"path": "Chapter_03/HealthCheck/ClientApp/.gitignore",
"chars": 516,
"preview": "# See http://help.github.com/ignore-files/ for more about ignoring files.\n\n# compiled output\n/dist\n/dist-server\n/tmp\n/ou"
},
{
"path": "Chapter_03/HealthCheck/ClientApp/README.md",
"chars": 1028,
"preview": "# HealthCheck\n\nThis project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 6.0.0.\n\n## "
},
{
"path": "Chapter_03/HealthCheck/ClientApp/angular.json",
"chars": 4126,
"preview": "{\n \"$schema\": \"./node_modules/@angular/cli/lib/config/schema.json\",\n \"version\": 1,\n \"newProjectRoot\": \"projects\",\n \""
},
{
"path": "Chapter_03/HealthCheck/ClientApp/browserslist",
"chars": 375,
"preview": "# This file is currently used by autoprefixer to adjust CSS to support the below specified browsers\n# For additional inf"
},
{
"path": "Chapter_03/HealthCheck/ClientApp/e2e/protractor.conf.js",
"chars": 757,
"preview": "// Protractor configuration file, see link for more information\n// https://github.com/angular/protractor/blob/master/lib"
},
{
"path": "Chapter_03/HealthCheck/ClientApp/e2e/src/app.e2e-spec.ts",
"chars": 277,
"preview": "import { AppPage } from './app.po';\n\ndescribe('App', () => {\n let page: AppPage;\n\n beforeEach(() => {\n page = new A"
},
{
"path": "Chapter_03/HealthCheck/ClientApp/e2e/src/app.po.ts",
"chars": 206,
"preview": "import { browser, by, element } from 'protractor';\n\nexport class AppPage {\n navigateTo() {\n return browser.get('/');"
},
{
"path": "Chapter_03/HealthCheck/ClientApp/e2e/tsconfig.e2e.json",
"chars": 213,
"preview": "{\n \"extends\": \"../tsconfig.json\",\n \"compilerOptions\": {\n \"outDir\": \"../out-tsc/app\",\n \"module\": \"commonjs\",\n "
},
{
"path": "Chapter_03/HealthCheck/ClientApp/package.json",
"chars": 1632,
"preview": "{\n \"name\": \"healthcheck\",\n \"version\": \"0.0.0\",\n \"scripts\": {\n \"ng\": \"ng\",\n \"start\": \"echo Starting... && ng ser"
},
{
"path": "Chapter_03/HealthCheck/ClientApp/src/app/app.component.html",
"chars": 118,
"preview": "<body>\n <app-nav-menu></app-nav-menu>\n <div class=\"container\">\n <router-outlet></router-outlet>\n </div>\n</body>\n"
},
{
"path": "Chapter_03/HealthCheck/ClientApp/src/app/app.component.ts",
"chars": 169,
"preview": "import { Component } from '@angular/core';\n\n@Component({\n selector: 'app-root',\n templateUrl: './app.component.html'\n}"
},
{
"path": "Chapter_03/HealthCheck/ClientApp/src/app/app.module.ts",
"chars": 1065,
"preview": "import { BrowserModule } from '@angular/platform-browser';\nimport { NgModule } from '@angular/core';\nimport { FormsModul"
},
{
"path": "Chapter_03/HealthCheck/ClientApp/src/app/app.server.module.ts",
"chars": 413,
"preview": "import { NgModule } from '@angular/core';\nimport { ServerModule } from '@angular/platform-server';\nimport { ModuleMapLoa"
},
{
"path": "Chapter_03/HealthCheck/ClientApp/src/app/health-check/health-check.component.css",
"chars": 125,
"preview": ".status {\n font-weight: bold;\n}\n\n.Healthy {\n color: green;\n}\n\n.Degraded {\n color: orange;\n}\n\n.Unhealthy {\n color: re"
},
{
"path": "Chapter_03/HealthCheck/ClientApp/src/app/health-check/health-check.component.html",
"chars": 599,
"preview": "<h1>Health Check</h1>\n\n<p>Here are the results of our health check:</p>\n\n<p *ngIf=\"!result\"><em>Loading...</em></p>\n\n<ta"
},
{
"path": "Chapter_03/HealthCheck/ClientApp/src/app/health-check/health-check.component.ts",
"chars": 756,
"preview": "import { Component, Inject } from '@angular/core';\nimport { HttpClient } from '@angular/common/http';\n\n@Component({\n "
},
{
"path": "Chapter_03/HealthCheck/ClientApp/src/app/home/home.component.html",
"chars": 1480,
"preview": "<h1>Hello, world!</h1>\n<p>Welcome to your new single-page application, built with:</p>\n<ul>\n <li><a href='https://get.a"
},
{
"path": "Chapter_03/HealthCheck/ClientApp/src/app/home/home.component.ts",
"chars": 155,
"preview": "import { Component } from '@angular/core';\n\n@Component({\n selector: 'app-home',\n templateUrl: './home.component.html',"
},
{
"path": "Chapter_03/HealthCheck/ClientApp/src/app/nav-menu/nav-menu.component.css",
"chars": 249,
"preview": "a.navbar-brand {\n white-space: normal;\n text-align: center;\n word-break: break-all;\n}\n\nhtml {\n font-size: 14px;\n}\n@m"
},
{
"path": "Chapter_03/HealthCheck/ClientApp/src/app/nav-menu/nav-menu.component.html",
"chars": 1233,
"preview": "<header>\n <nav\n class=\"navbar navbar-expand-sm navbar-toggleable-sm navbar-light bg-white border-bottom box-shadow m"
},
{
"path": "Chapter_03/HealthCheck/ClientApp/src/app/nav-menu/nav-menu.component.ts",
"chars": 337,
"preview": "import { Component } from '@angular/core';\n\n@Component({\n selector: 'app-nav-menu',\n templateUrl: './nav-menu.componen"
},
{
"path": "Chapter_03/HealthCheck/ClientApp/src/assets/.gitkeep",
"chars": 0,
"preview": ""
},
{
"path": "Chapter_03/HealthCheck/ClientApp/src/environments/environment.prod.ts",
"chars": 51,
"preview": "export const environment = {\n production: true\n};\n"
},
{
"path": "Chapter_03/HealthCheck/ClientApp/src/environments/environment.ts",
"chars": 631,
"preview": "// This file can be replaced during build by using the `fileReplacements` array.\n// `ng build ---prod` replaces `environ"
},
{
"path": "Chapter_03/HealthCheck/ClientApp/src/index.html",
"chars": 336,
"preview": "<!DOCTYPE html>\n<html lang=\"en\">\n <head>\n <meta charset=\"utf-8\" />\n <title>HealthCheck</title>\n <base href=\"/\""
},
{
"path": "Chapter_03/HealthCheck/ClientApp/src/karma.conf.js",
"chars": 965,
"preview": "// Karma configuration file, see link for more information\n// https://karma-runner.github.io/1.0/config/configuration-fi"
},
{
"path": "Chapter_03/HealthCheck/ClientApp/src/main.ts",
"chars": 555,
"preview": "import { enableProdMode } from '@angular/core';\nimport { platformBrowserDynamic } from '@angular/platform-browser-dynami"
},
{
"path": "Chapter_03/HealthCheck/ClientApp/src/polyfills.ts",
"chars": 2838,
"preview": "/**\n * This file includes polyfills needed by Angular and is loaded before the app.\n * You can add your own extra polyfi"
},
{
"path": "Chapter_03/HealthCheck/ClientApp/src/styles.css",
"chars": 279,
"preview": "/* You can add global styles to this file, and also import other style files */\n\n/* Provide sufficient contrast against "
},
{
"path": "Chapter_03/HealthCheck/ClientApp/src/test.ts",
"chars": 642,
"preview": "// This file is required by karma.conf.js and loads recursively all the .spec and framework files\n\nimport 'zone.js/dist/"
},
{
"path": "Chapter_03/HealthCheck/ClientApp/src/tsconfig.app.json",
"chars": 170,
"preview": "{\n \"extends\": \"../tsconfig.json\",\n \"compilerOptions\": {\n \"outDir\": \"../out-tsc/app\",\n \"types\": []\n },\n \"exclud"
},
{
"path": "Chapter_03/HealthCheck/ClientApp/src/tsconfig.server.json",
"chars": 183,
"preview": "{\n \"extends\": \"../tsconfig.json\",\n \"compilerOptions\": {\n \"module\": \"commonjs\"\n },\n \"angularCompilerOptions\": {\n "
},
{
"path": "Chapter_03/HealthCheck/ClientApp/src/tsconfig.spec.json",
"chars": 256,
"preview": "{\n \"extends\": \"../tsconfig.json\",\n \"compilerOptions\": {\n \"outDir\": \"../out-tsc/spec\",\n \"types\": [\n \"jasmine"
},
{
"path": "Chapter_03/HealthCheck/ClientApp/src/tslint.json",
"chars": 314,
"preview": "{\n \"extends\": \"../tslint.json\",\n \"rules\": {\n \"directive-selector\": [\n true,\n \"attribu"
},
{
"path": "Chapter_03/HealthCheck/ClientApp/tsconfig.json",
"chars": 477,
"preview": "{\n \"compileOnSave\": false,\n \"compilerOptions\": {\n \"baseUrl\": \"./\",\n \"module\": \"esnext\",\n \"outDir\": \"./dist/ou"
},
{
"path": "Chapter_03/HealthCheck/ClientApp/tslint.json",
"chars": 2800,
"preview": "{\n \"rulesDirectory\": [\n \"node_modules/codelyzer\"\n ],\n \"rules\": {\n \"arrow-return-shorthand\": true,\n \"callable"
},
{
"path": "Chapter_03/HealthCheck/ClientApp/update-npm.bat",
"chars": 20,
"preview": "cd %~dp0\nnpm update\n"
},
{
"path": "Chapter_03/HealthCheck/CustomHealthCheckOptions.cs",
"chars": 1349,
"preview": "using Microsoft.AspNetCore.Diagnostics.HealthChecks;\nusing Microsoft.AspNetCore.Http;\nusing System.Linq;\nusing System.N"
},
{
"path": "Chapter_03/HealthCheck/HealthCheck.csproj",
"chars": 2792,
"preview": "<Project Sdk=\"Microsoft.NET.Sdk.Web\">\n\n <PropertyGroup>\n <TargetFramework>netcoreapp3.1</TargetFramework>\n <Type"
},
{
"path": "Chapter_03/HealthCheck/ICMPHealthCheck.cs",
"chars": 1938,
"preview": "using Microsoft.Extensions.Diagnostics.HealthChecks;\nusing System;\nusing System.Net.NetworkInformation;\nusing System.Th"
},
{
"path": "Chapter_03/HealthCheck/Pages/Error.cshtml",
"chars": 854,
"preview": "@page\n@model ErrorModel\n@{\n ViewData[\"Title\"] = \"Error\";\n}\n\n<h1 class=\"text-danger\">Error.</h1>\n<h2 class=\"text-dang"
},
{
"path": "Chapter_03/HealthCheck/Pages/Error.cshtml.cs",
"chars": 812,
"preview": "using System;\nusing System.Collections.Generic;\nusing System.Diagnostics;\nusing System.Linq;\nusing System.Threading.Task"
},
{
"path": "Chapter_03/HealthCheck/Pages/_ViewImports.cshtml",
"chars": 101,
"preview": "@using HealthCheck\n@namespace HealthCheck.Pages\n@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers\n"
},
{
"path": "Chapter_03/HealthCheck/Program.cs",
"chars": 589,
"preview": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Threading.Tasks;\nusing Microsoft.AspNetC"
},
{
"path": "Chapter_03/HealthCheck/Startup.cs",
"chars": 3431,
"preview": "using Microsoft.AspNetCore.Builder;\nusing Microsoft.AspNetCore.Hosting;\nusing Microsoft.AspNetCore.HttpsPolicy;\nusing Mi"
},
{
"path": "Chapter_03/HealthCheck/appsettings.Development.json",
"chars": 279,
"preview": "{\n \"Logging\": {\n \"LogLevel\": {\n \"Default\": \"Debug\",\n \"System\": \"Information\",\n \"Microsoft\": \"Informat"
},
{
"path": "Chapter_03/HealthCheck/appsettings.json",
"chars": 230,
"preview": "{\n \"Logging\": {\n \"LogLevel\": {\n \"Default\": \"Warning\"\n }\n },\n \"AllowedHosts\": \"*\",\n \"StaticFiles\": {\n \""
},
{
"path": "Chapter_03/HealthCheck/libman.json",
"chars": 71,
"preview": "{\n \"version\": \"1.0\",\n \"defaultProvider\": \"cdnjs\",\n \"libraries\": []\n}"
},
{
"path": "Chapter_03/HealthCheck/wwwroot/test.html",
"chars": 440,
"preview": "<!DOCTYPE html>\n<html>\n<head>\n <meta charset=\"utf-8\" />\n <title>Time for a test!</title>\n</head>\n<body>\n Hello"
},
{
"path": "Chapter_03.sln",
"chars": 1122,
"preview": "\nMicrosoft Visual Studio Solution File, Format Version 12.00\n# Visual Studio Version 16\nVisualStudioVersion = 16.0.2920"
},
{
"path": "Chapter_04/WorldCities/.gitignore",
"chars": 3534,
"preview": "## Ignore Visual Studio temporary files, build results, and\n## files generated by popular Visual Studio add-ons.\n\n# User"
},
{
"path": "Chapter_04/WorldCities/ClientApp/.editorconfig",
"chars": 245,
"preview": "# Editor configuration, see http://editorconfig.org\nroot = true\n\n[*]\ncharset = utf-8\nindent_style = space\nindent_size = "
},
{
"path": "Chapter_04/WorldCities/ClientApp/.gitignore",
"chars": 516,
"preview": "# See http://help.github.com/ignore-files/ for more about ignoring files.\n\n# compiled output\n/dist\n/dist-server\n/tmp\n/ou"
},
{
"path": "Chapter_04/WorldCities/ClientApp/README.md",
"chars": 1028,
"preview": "# WorldCities\n\nThis project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 6.0.0.\n\n## "
},
{
"path": "Chapter_04/WorldCities/ClientApp/angular.json",
"chars": 4120,
"preview": "{\n \"$schema\": \"./node_modules/@angular/cli/lib/config/schema.json\",\n \"version\": 1,\n \"newProjectRoot\": \"projects\",\n \""
},
{
"path": "Chapter_04/WorldCities/ClientApp/browserslist",
"chars": 375,
"preview": "# This file is currently used by autoprefixer to adjust CSS to support the below specified browsers\n# For additional inf"
},
{
"path": "Chapter_04/WorldCities/ClientApp/e2e/protractor.conf.js",
"chars": 757,
"preview": "// Protractor configuration file, see link for more information\n// https://github.com/angular/protractor/blob/master/lib"
},
{
"path": "Chapter_04/WorldCities/ClientApp/e2e/src/app.e2e-spec.ts",
"chars": 277,
"preview": "import { AppPage } from './app.po';\n\ndescribe('App', () => {\n let page: AppPage;\n\n beforeEach(() => {\n page = new A"
},
{
"path": "Chapter_04/WorldCities/ClientApp/e2e/src/app.po.ts",
"chars": 206,
"preview": "import { browser, by, element } from 'protractor';\n\nexport class AppPage {\n navigateTo() {\n return browser.get('/');"
},
{
"path": "Chapter_04/WorldCities/ClientApp/e2e/tsconfig.e2e.json",
"chars": 213,
"preview": "{\n \"extends\": \"../tsconfig.json\",\n \"compilerOptions\": {\n \"outDir\": \"../out-tsc/app\",\n \"module\": \"commonjs\",\n "
},
{
"path": "Chapter_04/WorldCities/ClientApp/package.json",
"chars": 1632,
"preview": "{\n \"name\": \"worldcities\",\n \"version\": \"0.0.0\",\n \"scripts\": {\n \"ng\": \"ng\",\n \"start\": \"echo Starting... && ng ser"
},
{
"path": "Chapter_04/WorldCities/ClientApp/src/app/app.component.html",
"chars": 118,
"preview": "<body>\n <app-nav-menu></app-nav-menu>\n <div class=\"container\">\n <router-outlet></router-outlet>\n </div>\n</body>\n"
},
{
"path": "Chapter_04/WorldCities/ClientApp/src/app/app.component.ts",
"chars": 169,
"preview": "import { Component } from '@angular/core';\n\n@Component({\n selector: 'app-root',\n templateUrl: './app.component.html'\n}"
},
{
"path": "Chapter_04/WorldCities/ClientApp/src/app/app.module.ts",
"chars": 836,
"preview": "import { BrowserModule } from '@angular/platform-browser';\nimport { NgModule } from '@angular/core';\nimport { FormsModul"
},
{
"path": "Chapter_04/WorldCities/ClientApp/src/app/app.server.module.ts",
"chars": 413,
"preview": "import { NgModule } from '@angular/core';\nimport { ServerModule } from '@angular/platform-server';\nimport { ModuleMapLoa"
},
{
"path": "Chapter_04/WorldCities/ClientApp/src/app/home/home.component.html",
"chars": 1480,
"preview": "<h1>Hello, world!</h1>\n<p>Welcome to your new single-page application, built with:</p>\n<ul>\n <li><a href='https://get.a"
},
{
"path": "Chapter_04/WorldCities/ClientApp/src/app/home/home.component.ts",
"chars": 155,
"preview": "import { Component } from '@angular/core';\n\n@Component({\n selector: 'app-home',\n templateUrl: './home.component.html',"
},
{
"path": "Chapter_04/WorldCities/ClientApp/src/app/nav-menu/nav-menu.component.css",
"chars": 249,
"preview": "a.navbar-brand {\n white-space: normal;\n text-align: center;\n word-break: break-all;\n}\n\nhtml {\n font-size: 14px;\n}\n@m"
},
{
"path": "Chapter_04/WorldCities/ClientApp/src/app/nav-menu/nav-menu.component.html",
"chars": 1028,
"preview": "<header>\n <nav\n class=\"navbar navbar-expand-sm navbar-toggleable-sm navbar-light bg-white border-bottom box-shadow m"
},
{
"path": "Chapter_04/WorldCities/ClientApp/src/app/nav-menu/nav-menu.component.ts",
"chars": 337,
"preview": "import { Component } from '@angular/core';\n\n@Component({\n selector: 'app-nav-menu',\n templateUrl: './nav-menu.componen"
},
{
"path": "Chapter_04/WorldCities/ClientApp/src/assets/.gitkeep",
"chars": 0,
"preview": ""
},
{
"path": "Chapter_04/WorldCities/ClientApp/src/environments/environment.prod.ts",
"chars": 51,
"preview": "export const environment = {\n production: true\n};\n"
},
{
"path": "Chapter_04/WorldCities/ClientApp/src/environments/environment.ts",
"chars": 631,
"preview": "// This file can be replaced during build by using the `fileReplacements` array.\n// `ng build ---prod` replaces `environ"
},
{
"path": "Chapter_04/WorldCities/ClientApp/src/index.html",
"chars": 336,
"preview": "<!DOCTYPE html>\n<html lang=\"en\">\n <head>\n <meta charset=\"utf-8\" />\n <title>WorldCities</title>\n <base href=\"/\""
},
{
"path": "Chapter_04/WorldCities/ClientApp/src/karma.conf.js",
"chars": 965,
"preview": "// Karma configuration file, see link for more information\n// https://karma-runner.github.io/1.0/config/configuration-fi"
},
{
"path": "Chapter_04/WorldCities/ClientApp/src/main.ts",
"chars": 555,
"preview": "import { enableProdMode } from '@angular/core';\nimport { platformBrowserDynamic } from '@angular/platform-browser-dynami"
},
{
"path": "Chapter_04/WorldCities/ClientApp/src/polyfills.ts",
"chars": 2838,
"preview": "/**\n * This file includes polyfills needed by Angular and is loaded before the app.\n * You can add your own extra polyfi"
},
{
"path": "Chapter_04/WorldCities/ClientApp/src/styles.css",
"chars": 279,
"preview": "/* You can add global styles to this file, and also import other style files */\n\n/* Provide sufficient contrast against "
},
{
"path": "Chapter_04/WorldCities/ClientApp/src/test.ts",
"chars": 642,
"preview": "// This file is required by karma.conf.js and loads recursively all the .spec and framework files\n\nimport 'zone.js/dist/"
},
{
"path": "Chapter_04/WorldCities/ClientApp/src/tsconfig.app.json",
"chars": 170,
"preview": "{\n \"extends\": \"../tsconfig.json\",\n \"compilerOptions\": {\n \"outDir\": \"../out-tsc/app\",\n \"types\": []\n },\n \"exclud"
},
{
"path": "Chapter_04/WorldCities/ClientApp/src/tsconfig.server.json",
"chars": 183,
"preview": "{\n \"extends\": \"../tsconfig.json\",\n \"compilerOptions\": {\n \"module\": \"commonjs\"\n },\n \"angularCompilerOptions\": {\n "
},
{
"path": "Chapter_04/WorldCities/ClientApp/src/tsconfig.spec.json",
"chars": 256,
"preview": "{\n \"extends\": \"../tsconfig.json\",\n \"compilerOptions\": {\n \"outDir\": \"../out-tsc/spec\",\n \"types\": [\n \"jasmine"
},
{
"path": "Chapter_04/WorldCities/ClientApp/src/tslint.json",
"chars": 314,
"preview": "{\n \"extends\": \"../tslint.json\",\n \"rules\": {\n \"directive-selector\": [\n true,\n \"attribu"
},
{
"path": "Chapter_04/WorldCities/ClientApp/tsconfig.json",
"chars": 411,
"preview": "{\n \"compileOnSave\": false,\n \"compilerOptions\": {\n \"baseUrl\": \"./\",\n \"module\": \"esnext\",\n \"outDir\": \"./dist/ou"
},
{
"path": "Chapter_04/WorldCities/ClientApp/tslint.json",
"chars": 2800,
"preview": "{\n \"rulesDirectory\": [\n \"node_modules/codelyzer\"\n ],\n \"rules\": {\n \"arrow-return-shorthand\": true,\n \"callable"
},
{
"path": "Chapter_04/WorldCities/ClientApp/update-npm.bat",
"chars": 20,
"preview": "cd %~dp0\nnpm update\n"
},
{
"path": "Chapter_04/WorldCities/Controllers/CitiesController.cs",
"chars": 2967,
"preview": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Threading.Tasks;\nusing Microsoft.AspNet"
},
{
"path": "Chapter_04/WorldCities/Controllers/CountriesController.cs",
"chars": 3090,
"preview": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Threading.Tasks;\nusing Microsoft.AspNet"
},
{
"path": "Chapter_04/WorldCities/Controllers/SeedController.cs",
"chars": 6050,
"preview": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Threading.Tasks;\nusing Microsoft.AspNet"
},
{
"path": "Chapter_04/WorldCities/Data/ApplicationDbContext.cs",
"chars": 918,
"preview": "using Microsoft.EntityFrameworkCore;\nusing WorldCities.Data.Models;\n\nnamespace WorldCities.Data\n{\n public class Appl"
},
{
"path": "Chapter_04/WorldCities/Data/Migrations/20191123030140_Initial.Designer.cs",
"chars": 3053,
"preview": "// <auto-generated />\nusing Microsoft.EntityFrameworkCore;\nusing Microsoft.EntityFrameworkCore.Infrastructure;\nusing Mi"
},
{
"path": "Chapter_04/WorldCities/Data/Migrations/20191123030140_Initial.cs",
"chars": 2362,
"preview": "using Microsoft.EntityFrameworkCore.Migrations;\n\nnamespace WorldCities.Data.Migrations\n{\n public partial class Initi"
},
{
"path": "Chapter_04/WorldCities/Data/Migrations/ApplicationDbContextModelSnapshot.cs",
"chars": 2999,
"preview": "// <auto-generated />\nusing Microsoft.EntityFrameworkCore;\nusing Microsoft.EntityFrameworkCore.Infrastructure;\nusing Mi"
},
{
"path": "Chapter_04/WorldCities/Data/Models/City.cs",
"chars": 1509,
"preview": "using System;\nusing System.Collections.Generic;\nusing System.ComponentModel.DataAnnotations;\nusing System.ComponentMode"
},
{
"path": "Chapter_04/WorldCities/Data/Models/Country.cs",
"chars": 1175,
"preview": "using System;\nusing System.Collections.Generic;\nusing System.ComponentModel.DataAnnotations;\nusing System.Linq;\nusing S"
},
{
"path": "Chapter_04/WorldCities/Pages/Error.cshtml",
"chars": 854,
"preview": "@page\n@model ErrorModel\n@{\n ViewData[\"Title\"] = \"Error\";\n}\n\n<h1 class=\"text-danger\">Error.</h1>\n<h2 class=\"text-dang"
}
]
// ... and 924 more files (download for full content)
About this extraction
This page contains the full source code of the PacktPublishing/ASP.NET-Core-3-and-Angular-9-Third-Edition GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 1124 files (2.1 MB), approximately 602.4k tokens, and a symbol index with 2086 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.
Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.