- Install dotnet: https://dotnet.microsoft.com/en-us/download
- Create a folder named for example:
CsDymamic - Create file in the folder named:
CsDyamic.csprojand copy the content of1_CsDyamic.csprojinto that file - Create file in the folder named:
Program.csand copy the content of2_Program.csbelow into that file - Launch the application in Visual Studio or through the command line
dotnet runfrom the folderCsDymamic
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public void ConfigureServices(IServiceCollection services) | |
| { | |
| services.AddHttpClient("myclient"); | |
| // Global header propagation for any HttpClient that comes from HttpClientFactory | |
| services.AddHeaderPropagation(options => | |
| { | |
| options.HeaderNames.Add("Correlation-Id"); | |
| }); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using Microsoft.VisualStudio.Threading; | |
| using System; | |
| using System.Diagnostics; | |
| using System.Reflection; | |
| using System.Runtime.InteropServices; | |
| using System.Threading; | |
| namespace JoinableTaskTools | |
| { | |
| /// <summary> |