- Install dotnet: https://dotnet.microsoft.com/en-us/download
- Create a folder named for example:
CsDymamic
- Create file in the folder named:
CsDyamic.csproj
and copy the content of1_CsDyamic.csproj
into that file - Create file in the folder named:
Program.cs
and copy the content of2_Program.cs
below into that file - Launch the application in Visual Studio or through the command line
dotnet run
from the folderCsDymamic
This file contains 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 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> |