File tree Expand file tree Collapse file tree
src/C3D/Extensions/Logging/Xunit/Extensions Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ using System . Globalization ;
2+
3+ namespace C3D . Extensions . Xunit . Logging ;
4+
5+ public static class XunitLoggerOptionsExtensions {
6+ public static XunitLoggerOptions WithTimeStamp ( this XunitLoggerOptions options , XunitLoggerTimeStamp timeStamp )
7+ {
8+ options . TimeStamp = timeStamp ;
9+ return options ;
10+ }
11+
12+ public static XunitLoggerOptions WithTimeStampFormat ( this XunitLoggerOptions options , string timeStampFormat )
13+ {
14+ options . TimeStampFormat = timeStampFormat ;
15+ return options ;
16+ }
17+
18+ public static XunitLoggerOptions UseTimeProvider ( this XunitLoggerOptions options , TimeProvider timeProvider )
19+ {
20+ options . GetUtcNow = timeProvider . GetUtcNow ;
21+ return options ;
22+ }
23+
24+ public static XunitLoggerOptions Restart ( this XunitLoggerOptions options )
25+ {
26+ options . LogStart = options . GetUtcNow ( ) ;
27+ return options ;
28+ }
29+
30+ public static XunitLoggerOptions UseCulture ( this XunitLoggerOptions options , CultureInfo culture )
31+ {
32+ options . Culture = culture ;
33+ return options ;
34+ }
35+ }
You can’t perform that action at this time.
0 commit comments