diff --git a/Labs/3. Startup, Hosting and Middleware.md b/Labs/3. Startup, Hosting and Middleware.md index b230e05..266b389 100644 --- a/Labs/3. Startup, Hosting and Middleware.md +++ b/Labs/3. Startup, Hosting and Middleware.md @@ -1,7 +1,7 @@ ## Create a new ASP.NET Core application -1. Open Visual Studio 29019 +1. Open Visual Studio 2019 1. Create a new ASP.NET Core application: 1. File -> New -> Project -> ASP.NET Core Web Application (C#) 2. Name the project, set the dropdowns to .NET Core and ASP.NET Core 2.2 and select the Empty template. diff --git a/Labs/4. Dependency Injection & Unit Testing.md b/Labs/4. Dependency Injection & Unit Testing.md index 233b7dd..d29f99a 100644 --- a/Labs/4. Dependency Injection & Unit Testing.md +++ b/Labs/4. Dependency Injection & Unit Testing.md @@ -123,7 +123,7 @@ 1. Run the application. You should see the logging messages from the middleware in the console output. -> **Note:** Completed code for this section is found [/Labs/Code/Lab4](/Labs/Code/Lab4). +> **Note:** Completed code for this section is found [/Labs/Code/Lab4A](/Labs/Code/Lab4A). # Adding a unit test project diff --git a/Labs/4.5 Building Middleware.md b/Labs/4.5 Building Middleware.md index f111e00..495c3f1 100644 --- a/Labs/4.5 Building Middleware.md +++ b/Labs/4.5 Building Middleware.md @@ -33,13 +33,12 @@ 1. Run the app now and set the culture via the query string, e.g. http://localhost/?culture=no - ## Move the middleware to its own type -1. Create a new class in the application `RequestCultureMiddleware` -1. Add a constructor that takes a parameter `RequestDelegate next` and assigns it to a private field `private readonly RequestDelegate _next` -1. Add a method `public Task Invoke(HttpContext context)` -1. Copy the code from the inline middleware delegate in the application's `Startup.cs` file to the `Invoke` method you just created and fix the `next` method name -1. Your middleware class should now look something like this: +1. Create a new class calles `RequestCultureMiddleware` +2. Add a constructor that takes a parameter `RequestDelegate next` and assigns it to a private field `private readonly RequestDelegate _next` +3. Add a method `public Task Invoke(HttpContext httpContext)` +4. Copy the code from the inline middleware delegate in the application's `Startup.cs` file to the `Invoke` method you just created and fix the `next` method name +5. Your middleware class should now look something like this: ``` C# public class RequestCultureMiddleware @@ -51,9 +50,9 @@ _next = next; } - public Task Invoke(HttpContext context) + public Task Invoke(HttpContext httpContext) { - var cultureQuery = context.Request.Query["culture"]; + var cultureQuery = httpContext.Request.Query["culture"]; if (!string.IsNullOrWhiteSpace(cultureQuery)) { var culture = new CultureInfo(cultureQuery); @@ -62,12 +61,12 @@ CultureInfo.CurrentUICulture = culture; } - return _next(context); + return _next(httpContext); } } ``` -1. At the bottom of the file, add a class that exposes the middleware via an extension method on `IApplicationBuilder`. +6. At the bottom of the file, add a class that exposes the middleware via an extension method on `IApplicationBuilder`. ```C# public static class RequestCultureMiddlewareExtensions @@ -79,14 +78,14 @@ } ``` -1. Back in the application's `Startup.cs` file, delete the inline middleware delegate -1. Add your new middleware class to the HTTP pipeline: +7. Back in the application's `Startup.cs` file, delete the inline middleware delegate +8. Add your new middleware class to the HTTP pipeline: ``` C# app.UseRequestCulture(); ``` -1. Run the application again and see that the middleware is now running as a class +9. Run the application again and see that the middleware is now running as a class ## Adding options to middleware 1. Create a class called `RequestCultureOptions.cs` with a `CultureInfo` property called DefaultCulture. @@ -97,7 +96,8 @@ public CultureInfo DefaultCulture { get; set; } } ``` -1. Add an overload to `UseRequestCulture` that takes those options and passes them into the `UseMiddleware` call. + +1. In the `RequestCultureMiddleware` class, add an overload to `UseRequestCulture` that takes those options and passes them into the `UseMiddleware` call. ```C# public static IApplicationBuilder UseRequestCulture(this IApplicationBuilder builder) @@ -194,9 +194,9 @@ } ``` -1. Add a new JSON file to the project called `config.json` -1. Add a new key/value pair to the `config.json` file: `"culture": "en-US"` -1. Change the code in `Startup.cs` to set the default culture using the configuration system: +2. Right click on the project -> Add -> New Item -> Data and add a JSON file to the project called `config.json` +3. Add a new key/value pair to the `config.json` file: `"culture": "en-US"` +4. Change the code in `Startup.cs` to set the default culture using the configuration system: ``` C# app.UseRequestCulture(new RequestCultureOptions @@ -205,11 +205,10 @@ }); ``` -1. Run the application and the default culture should be set from the configuration file. -1. Change the culture in the `config.json` file and refresh the page (without changing any other code). Note that the message hasn't changed as the configuration was only read when the application was started. -1. Go back to Visual Studio and touch and save the `Startup.cs` file to force the process to restart -1. Go back to the browser now and refresh the page and it should show the updated message - +5. Run the application and the default culture should be set from the configuration file. +6. Change the culture in the `config.json` file and refresh the page (without changing any other code). Note that the message hasn't changed as the configuration was only read when the application was started. +7. Go back to Visual Studio and touch and save the `Startup.cs` file to force the process to restart +8. Go back to the browser now and refresh the page and it should show the updated message ## Flowing options from dependency injection system to middleware @@ -258,3 +257,5 @@ ``` 1. Run the application and see that options are now being configured from the dependency injection system. + +> **Note:** Completed code for this section is found [/Labs/Code/Lab4B](/Labs/Code/Lab4B). diff --git a/Labs/Code/Lab4A/Lab4.sln b/Labs/Code/Lab4A/Lab4.sln index f620966..f0a0a08 100644 --- a/Labs/Code/Lab4A/Lab4.sln +++ b/Labs/Code/Lab4A/Lab4.sln @@ -1,42 +1,30 @@  Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 15 -VisualStudioVersion = 15.0.26020.0 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.28917.182 MinimumVisualStudioVersion = 10.0.40219.1 -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{14917E84-0349-44AA-9E50-EECB3DAB9976}" +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{665FCCEE-47C5-4936-ADA0-F7E3A0430E87}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Lab4", "src\Lab4\Lab4.csproj", "{3B55DFDA-79ED-4938-903F-5ED05C76ACB7}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Lab4A", "src\Lab4A\Lab4A.csproj", "{091CD54A-0190-4CFC-A20E-BABD61799536}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU - Debug|x64 = Debug|x64 - Debug|x86 = Debug|x86 Release|Any CPU = Release|Any CPU - Release|x64 = Release|x64 - Release|x86 = Release|x86 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {3B55DFDA-79ED-4938-903F-5ED05C76ACB7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {3B55DFDA-79ED-4938-903F-5ED05C76ACB7}.Debug|Any CPU.Build.0 = Debug|Any CPU - {3B55DFDA-79ED-4938-903F-5ED05C76ACB7}.Debug|x64.ActiveCfg = Debug|Any CPU - {3B55DFDA-79ED-4938-903F-5ED05C76ACB7}.Debug|x64.Build.0 = Debug|Any CPU - {3B55DFDA-79ED-4938-903F-5ED05C76ACB7}.Debug|x86.ActiveCfg = Debug|Any CPU - {3B55DFDA-79ED-4938-903F-5ED05C76ACB7}.Debug|x86.Build.0 = Debug|Any CPU - {3B55DFDA-79ED-4938-903F-5ED05C76ACB7}.Release|Any CPU.ActiveCfg = Release|Any CPU - {3B55DFDA-79ED-4938-903F-5ED05C76ACB7}.Release|Any CPU.Build.0 = Release|Any CPU - {3B55DFDA-79ED-4938-903F-5ED05C76ACB7}.Release|x64.ActiveCfg = Release|Any CPU - {3B55DFDA-79ED-4938-903F-5ED05C76ACB7}.Release|x64.Build.0 = Release|Any CPU - {3B55DFDA-79ED-4938-903F-5ED05C76ACB7}.Release|x86.ActiveCfg = Release|Any CPU - {3B55DFDA-79ED-4938-903F-5ED05C76ACB7}.Release|x86.Build.0 = Release|Any CPU + {091CD54A-0190-4CFC-A20E-BABD61799536}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {091CD54A-0190-4CFC-A20E-BABD61799536}.Debug|Any CPU.Build.0 = Debug|Any CPU + {091CD54A-0190-4CFC-A20E-BABD61799536}.Release|Any CPU.ActiveCfg = Release|Any CPU + {091CD54A-0190-4CFC-A20E-BABD61799536}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection GlobalSection(NestedProjects) = preSolution - {3B55DFDA-79ED-4938-903F-5ED05C76ACB7} = {14917E84-0349-44AA-9E50-EECB3DAB9976} + {091CD54A-0190-4CFC-A20E-BABD61799536} = {665FCCEE-47C5-4936-ADA0-F7E3A0430E87} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution - SolutionGuid = {BBA096C2-42FC-405B-BEC2-CB4972578542} + SolutionGuid = {A48721F1-1019-474D-A0B3-01473772CC2D} EndGlobalSection EndGlobal diff --git a/Labs/Code/Lab4/Lab4.sln b/Labs/Code/Lab4A/Lab4A.sln similarity index 76% rename from Labs/Code/Lab4/Lab4.sln rename to Labs/Code/Lab4A/Lab4A.sln index f85e3c9..f0a0a08 100644 --- a/Labs/Code/Lab4/Lab4.sln +++ b/Labs/Code/Lab4A/Lab4A.sln @@ -1,11 +1,11 @@  Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 15 -VisualStudioVersion = 15.0.26020.0 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.28917.182 MinimumVisualStudioVersion = 10.0.40219.1 Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{665FCCEE-47C5-4936-ADA0-F7E3A0430E87}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Lab4", "src\Lab4\Lab4.csproj", "{091CD54A-0190-4CFC-A20E-BABD61799536}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Lab4A", "src\Lab4A\Lab4A.csproj", "{091CD54A-0190-4CFC-A20E-BABD61799536}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -24,4 +24,7 @@ Global GlobalSection(NestedProjects) = preSolution {091CD54A-0190-4CFC-A20E-BABD61799536} = {665FCCEE-47C5-4936-ADA0-F7E3A0430E87} EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {A48721F1-1019-474D-A0B3-01473772CC2D} + EndGlobalSection EndGlobal diff --git a/Labs/Code/Lab4/src/Lab4/Lab4.csproj b/Labs/Code/Lab4A/src/Lab4A/Lab4A.csproj similarity index 100% rename from Labs/Code/Lab4/src/Lab4/Lab4.csproj rename to Labs/Code/Lab4A/src/Lab4A/Lab4A.csproj diff --git a/Labs/Code/Lab4/src/Lab4/Middleware/RequestIdMiddleware.cs b/Labs/Code/Lab4A/src/Lab4A/Middleware/RequestIdMiddleware.cs similarity index 100% rename from Labs/Code/Lab4/src/Lab4/Middleware/RequestIdMiddleware.cs rename to Labs/Code/Lab4A/src/Lab4A/Middleware/RequestIdMiddleware.cs diff --git a/Labs/Code/Lab4/src/Lab4/Program.cs b/Labs/Code/Lab4A/src/Lab4A/Program.cs similarity index 96% rename from Labs/Code/Lab4/src/Lab4/Program.cs rename to Labs/Code/Lab4A/src/Lab4A/Program.cs index 7f4ef75..c90f443 100644 --- a/Labs/Code/Lab4/src/Lab4/Program.cs +++ b/Labs/Code/Lab4A/src/Lab4A/Program.cs @@ -6,7 +6,7 @@ using Microsoft.AspNetCore; using Microsoft.AspNetCore.Hosting; -namespace Lab4 +namespace Lab4A { public class Program { diff --git a/Labs/Code/Lab4/src/Lab4/Properties/launchSettings.json b/Labs/Code/Lab4A/src/Lab4A/Properties/launchSettings.json similarity index 100% rename from Labs/Code/Lab4/src/Lab4/Properties/launchSettings.json rename to Labs/Code/Lab4A/src/Lab4A/Properties/launchSettings.json diff --git a/Labs/Code/Lab4/src/Lab4/Services/RequestId.cs b/Labs/Code/Lab4A/src/Lab4A/Services/RequestId.cs similarity index 100% rename from Labs/Code/Lab4/src/Lab4/Services/RequestId.cs rename to Labs/Code/Lab4A/src/Lab4A/Services/RequestId.cs diff --git a/Labs/Code/Lab4/src/Lab4/Startup.cs b/Labs/Code/Lab4A/src/Lab4A/Startup.cs similarity index 98% rename from Labs/Code/Lab4/src/Lab4/Startup.cs rename to Labs/Code/Lab4A/src/Lab4A/Startup.cs index eaf0b80..876ce54 100644 --- a/Labs/Code/Lab4/src/Lab4/Startup.cs +++ b/Labs/Code/Lab4A/src/Lab4A/Startup.cs @@ -3,7 +3,7 @@ using Microsoft.AspNetCore.Http; using Microsoft.Extensions.DependencyInjection; -namespace Lab4 +namespace Lab4A { public class Startup { diff --git a/Labs/Code/Lab4B/Lab4B.sln b/Labs/Code/Lab4B/Lab4B.sln new file mode 100644 index 0000000..a7fef34 --- /dev/null +++ b/Labs/Code/Lab4B/Lab4B.sln @@ -0,0 +1,25 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.28917.182 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Lab4B", "src\Lab4B.csproj", "{1B524C9F-B407-4B89-A53A-B89BE5B371FE}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {1B524C9F-B407-4B89-A53A-B89BE5B371FE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {1B524C9F-B407-4B89-A53A-B89BE5B371FE}.Debug|Any CPU.Build.0 = Debug|Any CPU + {1B524C9F-B407-4B89-A53A-B89BE5B371FE}.Release|Any CPU.ActiveCfg = Release|Any CPU + {1B524C9F-B407-4B89-A53A-B89BE5B371FE}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {8FF55818-A41B-4C88-BF8C-64D74EECEA0B} + EndGlobalSection +EndGlobal diff --git a/Labs/Code/Lab4B/src/Lab4B.csproj b/Labs/Code/Lab4B/src/Lab4B.csproj new file mode 100644 index 0000000..423afac --- /dev/null +++ b/Labs/Code/Lab4B/src/Lab4B.csproj @@ -0,0 +1,13 @@ + + + + netcoreapp2.2 + InProcess + + + + + + + + diff --git a/Labs/Code/Lab4B/src/Program.cs b/Labs/Code/Lab4B/src/Program.cs new file mode 100644 index 0000000..9fe1dd5 --- /dev/null +++ b/Labs/Code/Lab4B/src/Program.cs @@ -0,0 +1,22 @@ +using Microsoft.AspNetCore; +using Microsoft.AspNetCore.Hosting; +using Microsoft.Extensions.Configuration; + +namespace Lab4B +{ + public class Program + { + public static void Main(string[] args) + { + CreateWebHostBuilder(args).Build().Run(); + } + + public static IWebHostBuilder CreateWebHostBuilder(string[] args) => + WebHost.CreateDefaultBuilder(args) + .ConfigureAppConfiguration((builderContext, config) => + { + config.AddJsonFile("config.json"); + }) + .UseStartup(); + } +} diff --git a/Labs/Code/Lab4B/src/Properties/launchSettings.json b/Labs/Code/Lab4B/src/Properties/launchSettings.json new file mode 100644 index 0000000..2175a69 --- /dev/null +++ b/Labs/Code/Lab4B/src/Properties/launchSettings.json @@ -0,0 +1,27 @@ +{ + "iisSettings": { + "windowsAuthentication": false, + "anonymousAuthentication": true, + "iisExpress": { + "applicationUrl": "http://localhost:58029", + "sslPort": 44334 + } + }, + "profiles": { + "IIS Express": { + "commandName": "IISExpress", + "launchBrowser": true, + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development" + } + }, + "WebApplication2": { + "commandName": "Project", + "launchBrowser": true, + "applicationUrl": "https://localhost:5001;http://localhost:5000", + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development" + } + } + } +} \ No newline at end of file diff --git a/Labs/Code/Lab4B/src/RequestCultureMiddleware.cs b/Labs/Code/Lab4B/src/RequestCultureMiddleware.cs new file mode 100644 index 0000000..2960384 --- /dev/null +++ b/Labs/Code/Lab4B/src/RequestCultureMiddleware.cs @@ -0,0 +1,59 @@ +using Microsoft.AspNetCore.Builder; +using Microsoft.AspNetCore.Http; +using Microsoft.Extensions.Options; +using System; +using System.Collections.Generic; +using System.Globalization; +using System.Linq; +using System.Threading.Tasks; + +namespace Lab4B +{ + public class RequestCultureMiddleware + { + private readonly RequestDelegate _next; + private readonly RequestCultureOptions _options; + + public RequestCultureMiddleware(RequestDelegate next, IOptions options) + { + _next = next; + _options = options.Value; + } + + public Task Invoke(HttpContext httpContext) + { + CultureInfo requestCulture = null; + + var cultureQuery = httpContext.Request.Query["culture"]; + if (!string.IsNullOrWhiteSpace(cultureQuery)) + { + requestCulture = new CultureInfo(cultureQuery); + } + else + { + requestCulture = _options.DefaultCulture; + } + + if (requestCulture != null) + { + CultureInfo.CurrentCulture = requestCulture; + CultureInfo.CurrentUICulture = requestCulture; + } + + return _next(httpContext); + } + } + + public static class RequestCultureMiddlewareExtensions + { + public static IApplicationBuilder UseRequestCulture(this IApplicationBuilder builder) + { + return builder.UseMiddleware(); + } + + public static IApplicationBuilder UseRequestCulture(this IApplicationBuilder builder, RequestCultureOptions options) + { + return builder.UseMiddleware(Options.Create(options)); + } + } +} diff --git a/Labs/Code/Lab4B/src/RequestCultureOptions.cs b/Labs/Code/Lab4B/src/RequestCultureOptions.cs new file mode 100644 index 0000000..66a5fe5 --- /dev/null +++ b/Labs/Code/Lab4B/src/RequestCultureOptions.cs @@ -0,0 +1,16 @@ +using Microsoft.AspNetCore.Builder; +using System; +using System.Collections.Generic; +using System.Globalization; +using System.Linq; +using System.Threading.Tasks; + +namespace Lab4B +{ + public class RequestCultureOptions + { + public CultureInfo DefaultCulture { get; set; } + + } + +} diff --git a/Labs/Code/Lab4B/src/Startup.cs b/Labs/Code/Lab4B/src/Startup.cs new file mode 100644 index 0000000..c644857 --- /dev/null +++ b/Labs/Code/Lab4B/src/Startup.cs @@ -0,0 +1,45 @@ +using System; +using System.Collections.Generic; +using System.Globalization; +using System.Linq; +using System.Threading.Tasks; +using Microsoft.AspNetCore.Builder; +using Microsoft.AspNetCore.Hosting; +using Microsoft.AspNetCore.Http; +using Microsoft.Extensions.Configuration; +using Microsoft.Extensions.DependencyInjection; + +namespace Lab4B +{ + public class Startup + { + private readonly IConfiguration _configuration; + + public Startup(IConfiguration configuration) + { + _configuration = configuration; + } + + // This method gets called by the runtime. Use this method to add services to the container. + // For more information on how to configure your application, visit https://go.microsoft.com/fwlink/?LinkID=398940 + public void ConfigureServices(IServiceCollection services) + { + services.Configure(options => + { + options.DefaultCulture = new CultureInfo(_configuration["culture"] ?? "en-GB"); + }); + } + + // This method gets called by the runtime. Use this method to configure the HTTP request pipeline. + public void Configure(IApplicationBuilder app, IHostingEnvironment env) + { + app.Run(async (context) => + { + await context.Response.WriteAsync($"Hello {CultureInfo.CurrentCulture.DisplayName}"); + }); + + app.UseRequestCulture(); + } + + } +} diff --git a/Labs/Code/Lab4B/src/appsettings.Development.json b/Labs/Code/Lab4B/src/appsettings.Development.json new file mode 100644 index 0000000..e203e94 --- /dev/null +++ b/Labs/Code/Lab4B/src/appsettings.Development.json @@ -0,0 +1,9 @@ +{ + "Logging": { + "LogLevel": { + "Default": "Debug", + "System": "Information", + "Microsoft": "Information" + } + } +} diff --git a/Labs/Code/Lab4B/src/appsettings.json b/Labs/Code/Lab4B/src/appsettings.json new file mode 100644 index 0000000..def9159 --- /dev/null +++ b/Labs/Code/Lab4B/src/appsettings.json @@ -0,0 +1,8 @@ +{ + "Logging": { + "LogLevel": { + "Default": "Warning" + } + }, + "AllowedHosts": "*" +} diff --git a/Labs/Code/Lab4B/src/config.json b/Labs/Code/Lab4B/src/config.json new file mode 100644 index 0000000..81af8c2 --- /dev/null +++ b/Labs/Code/Lab4B/src/config.json @@ -0,0 +1,3 @@ +{ + "culture": "en-US" +} diff --git a/Labs/Code/Lab5A/Lab4.sln b/Labs/Code/Lab5A/Lab4.sln new file mode 100644 index 0000000..f620966 --- /dev/null +++ b/Labs/Code/Lab5A/Lab4.sln @@ -0,0 +1,42 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 15 +VisualStudioVersion = 15.0.26020.0 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{14917E84-0349-44AA-9E50-EECB3DAB9976}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Lab4", "src\Lab4\Lab4.csproj", "{3B55DFDA-79ED-4938-903F-5ED05C76ACB7}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Debug|x64 = Debug|x64 + Debug|x86 = Debug|x86 + Release|Any CPU = Release|Any CPU + Release|x64 = Release|x64 + Release|x86 = Release|x86 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {3B55DFDA-79ED-4938-903F-5ED05C76ACB7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {3B55DFDA-79ED-4938-903F-5ED05C76ACB7}.Debug|Any CPU.Build.0 = Debug|Any CPU + {3B55DFDA-79ED-4938-903F-5ED05C76ACB7}.Debug|x64.ActiveCfg = Debug|Any CPU + {3B55DFDA-79ED-4938-903F-5ED05C76ACB7}.Debug|x64.Build.0 = Debug|Any CPU + {3B55DFDA-79ED-4938-903F-5ED05C76ACB7}.Debug|x86.ActiveCfg = Debug|Any CPU + {3B55DFDA-79ED-4938-903F-5ED05C76ACB7}.Debug|x86.Build.0 = Debug|Any CPU + {3B55DFDA-79ED-4938-903F-5ED05C76ACB7}.Release|Any CPU.ActiveCfg = Release|Any CPU + {3B55DFDA-79ED-4938-903F-5ED05C76ACB7}.Release|Any CPU.Build.0 = Release|Any CPU + {3B55DFDA-79ED-4938-903F-5ED05C76ACB7}.Release|x64.ActiveCfg = Release|Any CPU + {3B55DFDA-79ED-4938-903F-5ED05C76ACB7}.Release|x64.Build.0 = Release|Any CPU + {3B55DFDA-79ED-4938-903F-5ED05C76ACB7}.Release|x86.ActiveCfg = Release|Any CPU + {3B55DFDA-79ED-4938-903F-5ED05C76ACB7}.Release|x86.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(NestedProjects) = preSolution + {3B55DFDA-79ED-4938-903F-5ED05C76ACB7} = {14917E84-0349-44AA-9E50-EECB3DAB9976} + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {BBA096C2-42FC-405B-BEC2-CB4972578542} + EndGlobalSection +EndGlobal diff --git a/Labs/Code/Lab4A/src/Lab4/Lab4.csproj b/Labs/Code/Lab5A/src/Lab4/Lab4.csproj similarity index 100% rename from Labs/Code/Lab4A/src/Lab4/Lab4.csproj rename to Labs/Code/Lab5A/src/Lab4/Lab4.csproj diff --git a/Labs/Code/Lab4A/src/Lab4/Program.cs b/Labs/Code/Lab5A/src/Lab4/Program.cs similarity index 100% rename from Labs/Code/Lab4A/src/Lab4/Program.cs rename to Labs/Code/Lab5A/src/Lab4/Program.cs diff --git a/Labs/Code/Lab4A/src/Lab4/Properties/launchSettings.json b/Labs/Code/Lab5A/src/Lab4/Properties/launchSettings.json similarity index 100% rename from Labs/Code/Lab4A/src/Lab4/Properties/launchSettings.json rename to Labs/Code/Lab5A/src/Lab4/Properties/launchSettings.json diff --git a/Labs/Code/Lab4A/src/Lab4/Startup.cs b/Labs/Code/Lab5A/src/Lab4/Startup.cs similarity index 100% rename from Labs/Code/Lab4A/src/Lab4/Startup.cs rename to Labs/Code/Lab5A/src/Lab4/Startup.cs diff --git a/Labs/Code/Lab4A/src/Lab4/appsettings.json b/Labs/Code/Lab5A/src/Lab4/appsettings.json similarity index 100% rename from Labs/Code/Lab4A/src/Lab4/appsettings.json rename to Labs/Code/Lab5A/src/Lab4/appsettings.json diff --git a/Labs/Code/Lab4A/src/Lab4/wwwroot/index.html b/Labs/Code/Lab5A/src/Lab4/wwwroot/index.html similarity index 100% rename from Labs/Code/Lab4A/src/Lab4/wwwroot/index.html rename to Labs/Code/Lab5A/src/Lab4/wwwroot/index.html diff --git a/Labs/Code/Lab4B/Lab4.sln b/Labs/Code/Lab5B/Lab4.sln similarity index 100% rename from Labs/Code/Lab4B/Lab4.sln rename to Labs/Code/Lab5B/Lab4.sln diff --git a/Labs/Code/Lab4B/src/Lab4/Lab4.csproj b/Labs/Code/Lab5B/src/Lab4/Lab4.csproj similarity index 100% rename from Labs/Code/Lab4B/src/Lab4/Lab4.csproj rename to Labs/Code/Lab5B/src/Lab4/Lab4.csproj diff --git a/Labs/Code/Lab4B/src/Lab4/Program.cs b/Labs/Code/Lab5B/src/Lab4/Program.cs similarity index 100% rename from Labs/Code/Lab4B/src/Lab4/Program.cs rename to Labs/Code/Lab5B/src/Lab4/Program.cs diff --git a/Labs/Code/Lab4B/src/Lab4/Properties/launchSettings.json b/Labs/Code/Lab5B/src/Lab4/Properties/launchSettings.json similarity index 100% rename from Labs/Code/Lab4B/src/Lab4/Properties/launchSettings.json rename to Labs/Code/Lab5B/src/Lab4/Properties/launchSettings.json diff --git a/Labs/Code/Lab4B/src/Lab4/Startup.cs b/Labs/Code/Lab5B/src/Lab4/Startup.cs similarity index 100% rename from Labs/Code/Lab4B/src/Lab4/Startup.cs rename to Labs/Code/Lab5B/src/Lab4/Startup.cs diff --git a/Labs/Code/Lab4B/src/Lab4/appsettings.json b/Labs/Code/Lab5B/src/Lab4/appsettings.json similarity index 100% rename from Labs/Code/Lab4B/src/Lab4/appsettings.json rename to Labs/Code/Lab5B/src/Lab4/appsettings.json diff --git a/Labs/Code/Lab4B/src/Lab4/logfile.txt b/Labs/Code/Lab5B/src/Lab4/logfile.txt similarity index 100% rename from Labs/Code/Lab4B/src/Lab4/logfile.txt rename to Labs/Code/Lab5B/src/Lab4/logfile.txt diff --git a/Labs/Code/Lab4B/src/Lab4/wwwroot/index.html b/Labs/Code/Lab5B/src/Lab4/wwwroot/index.html similarity index 100% rename from Labs/Code/Lab4B/src/Lab4/wwwroot/index.html rename to Labs/Code/Lab5B/src/Lab4/wwwroot/index.html diff --git a/Labs/Code/Lab4C/Lab4.sln b/Labs/Code/Lab5C/Lab4.sln similarity index 100% rename from Labs/Code/Lab4C/Lab4.sln rename to Labs/Code/Lab5C/Lab4.sln diff --git a/Labs/Code/Lab4C/src/Lab4/Lab4.csproj b/Labs/Code/Lab5C/src/Lab4/Lab4.csproj similarity index 100% rename from Labs/Code/Lab4C/src/Lab4/Lab4.csproj rename to Labs/Code/Lab5C/src/Lab4/Lab4.csproj diff --git a/Labs/Code/Lab4C/src/Lab4/Program.cs b/Labs/Code/Lab5C/src/Lab4/Program.cs similarity index 100% rename from Labs/Code/Lab4C/src/Lab4/Program.cs rename to Labs/Code/Lab5C/src/Lab4/Program.cs diff --git a/Labs/Code/Lab4C/src/Lab4/Properties/launchSettings.json b/Labs/Code/Lab5C/src/Lab4/Properties/launchSettings.json similarity index 100% rename from Labs/Code/Lab4C/src/Lab4/Properties/launchSettings.json rename to Labs/Code/Lab5C/src/Lab4/Properties/launchSettings.json diff --git a/Labs/Code/Lab4C/src/Lab4/Startup.cs b/Labs/Code/Lab5C/src/Lab4/Startup.cs similarity index 100% rename from Labs/Code/Lab4C/src/Lab4/Startup.cs rename to Labs/Code/Lab5C/src/Lab4/Startup.cs diff --git a/Labs/Code/Lab4C/src/Lab4/appsettings.json b/Labs/Code/Lab5C/src/Lab4/appsettings.json similarity index 100% rename from Labs/Code/Lab4C/src/Lab4/appsettings.json rename to Labs/Code/Lab5C/src/Lab4/appsettings.json diff --git a/Labs/Code/Lab4C/src/Lab4/logfile.txt b/Labs/Code/Lab5C/src/Lab4/logfile.txt similarity index 100% rename from Labs/Code/Lab4C/src/Lab4/logfile.txt rename to Labs/Code/Lab5C/src/Lab4/logfile.txt diff --git a/Labs/Code/Lab4C/src/Lab4/wwwroot/index.html b/Labs/Code/Lab5C/src/Lab4/wwwroot/index.html similarity index 100% rename from Labs/Code/Lab4C/src/Lab4/wwwroot/index.html rename to Labs/Code/Lab5C/src/Lab4/wwwroot/index.html diff --git a/Labs/Code/Lab4D/Lab4.sln b/Labs/Code/Lab5D/Lab4.sln similarity index 100% rename from Labs/Code/Lab4D/Lab4.sln rename to Labs/Code/Lab5D/Lab4.sln diff --git a/Labs/Code/Lab4D/src/Lab4/Lab4.csproj b/Labs/Code/Lab5D/src/Lab4/Lab4.csproj similarity index 100% rename from Labs/Code/Lab4D/src/Lab4/Lab4.csproj rename to Labs/Code/Lab5D/src/Lab4/Lab4.csproj diff --git a/Labs/Code/Lab4D/src/Lab4/Program.cs b/Labs/Code/Lab5D/src/Lab4/Program.cs similarity index 100% rename from Labs/Code/Lab4D/src/Lab4/Program.cs rename to Labs/Code/Lab5D/src/Lab4/Program.cs diff --git a/Labs/Code/Lab4D/src/Lab4/Properties/launchSettings.json b/Labs/Code/Lab5D/src/Lab4/Properties/launchSettings.json similarity index 100% rename from Labs/Code/Lab4D/src/Lab4/Properties/launchSettings.json rename to Labs/Code/Lab5D/src/Lab4/Properties/launchSettings.json diff --git a/Labs/Code/Lab4D/src/Lab4/Startup.cs b/Labs/Code/Lab5D/src/Lab4/Startup.cs similarity index 100% rename from Labs/Code/Lab4D/src/Lab4/Startup.cs rename to Labs/Code/Lab5D/src/Lab4/Startup.cs diff --git a/Labs/Code/Lab4D/src/Lab4/appsettings.json b/Labs/Code/Lab5D/src/Lab4/appsettings.json similarity index 100% rename from Labs/Code/Lab4D/src/Lab4/appsettings.json rename to Labs/Code/Lab5D/src/Lab4/appsettings.json diff --git a/Labs/Code/Lab4D/src/Lab4/logfile.txt b/Labs/Code/Lab5D/src/Lab4/logfile.txt similarity index 100% rename from Labs/Code/Lab4D/src/Lab4/logfile.txt rename to Labs/Code/Lab5D/src/Lab4/logfile.txt diff --git a/Labs/Code/Lab4D/src/Lab4/wwwroot/index.html b/Labs/Code/Lab5D/src/Lab4/wwwroot/index.html similarity index 100% rename from Labs/Code/Lab4D/src/Lab4/wwwroot/index.html rename to Labs/Code/Lab5D/src/Lab4/wwwroot/index.html diff --git a/notes/1. Intro to .NET Core b/notes/1. Intro to .NET Core index 9affc66..3a1caa9 100644 --- a/notes/1. Intro to .NET Core +++ b/notes/1. Intro to .NET Core @@ -3,7 +3,7 @@ a. .NET Core Overview ii. Acquisition 1) http://dot.net -> https://www.microsoft.com/net/download/core#/current 2) Windows SDK (Installer) - 3) Visual Studio 2017 Tools (Preview 4) + 3) Visual Studio 2019 Tools (Preview 4) iii. Dotnet driver (dotnet.exe) iv. Dotnet CLI commands 1) Dotnet new