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
class SubTypesConverter<T> : JsonConverter<T> where T: new() | |
{ | |
[ThreadStatic] | |
private static bool isWriting; | |
private readonly string discriminatorName; | |
private readonly Dictionary<string, Func<T>> factories; | |
private readonly Dictionary<Type, string> discriminators; |
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
class DumpToConsoleDelegatingHandler : DelegatingHandler | |
{ | |
public DumpToConsoleDelegatingHandler() | |
{ | |
InnerHandler = new HttpClientHandler(); | |
} | |
protected override async Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken cancellationToken) | |
{ | |
Console.WriteLine(""); |