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 class ElapsedEnricher : ILogEventEnricher | |
{ | |
public const string PropertyName = "Elapsed"; | |
private readonly Stopwatch _stopwatch; | |
public ElapsedEnricher() | |
{ | |
_stopwatch = Stopwatch.StartNew(); | |
} |
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
/// <summary> | |
/// Allows you to pass an asynchronous action that writes to the output stream. | |
/// </summary> | |
public class PushStreamContent : HttpContent | |
{ | |
private readonly Func<Stream, Task> _writeToStreamAsync; | |
private readonly int _length; | |
/// <summary> | |
/// Creates an instance of the PushStreamContent |