@@ -4,26 +4,26 @@ namespace Boxed.AspNetCore
44 using Microsoft . Extensions . Logging ;
55
66 /// <summary>
7- /// <see cref="ILoggerFactory "/> extension methods.
7+ /// <see cref="ILoggingBuilder "/> extension methods.
88 /// </summary>
9- public static class LoggerFactoryExtensions
9+ public static class LoggingBuilderExtensions
1010 {
1111 /// <summary>
1212 /// Executes the specified action if the specified <paramref name="condition"/> is <c>true</c> which can be
13- /// used to conditionally add to the logger factory .
13+ /// used to conditionally add to the logging builder .
1414 /// </summary>
15- /// <param name="loggerFactory ">The logger factory .</param>
15+ /// <param name="loggingBuilder ">The logging builder .</param>
1616 /// <param name="condition">If set to <c>true</c> the action is executed.</param>
17- /// <param name="action">The action used to add to the logger factory .</param>
18- /// <returns>The same logger factory .</returns>
19- public static ILoggerFactory AddIf (
20- this ILoggerFactory loggerFactory ,
17+ /// <param name="action">The action used to add to the logging builder .</param>
18+ /// <returns>The same logging builder .</returns>
19+ public static ILoggingBuilder AddIf (
20+ this ILoggingBuilder loggingBuilder ,
2121 bool condition ,
22- Func < ILoggerFactory , ILoggerFactory > action )
22+ Func < ILoggingBuilder , ILoggingBuilder > action )
2323 {
24- if ( loggerFactory is null )
24+ if ( loggingBuilder is null )
2525 {
26- throw new ArgumentNullException ( nameof ( loggerFactory ) ) ;
26+ throw new ArgumentNullException ( nameof ( loggingBuilder ) ) ;
2727 }
2828
2929 if ( action is null )
@@ -33,32 +33,32 @@ public static ILoggerFactory AddIf(
3333
3434 if ( condition )
3535 {
36- loggerFactory = action ( loggerFactory ) ;
36+ loggingBuilder = action ( loggingBuilder ) ;
3737 }
3838
39- return loggerFactory ;
39+ return loggingBuilder ;
4040 }
4141
4242 /// <summary>
4343 /// Executes the specified <paramref name="ifAction"/> if the specified <paramref name="condition"/> is
4444 /// <c>true</c>, otherwise executes the <paramref name="elseAction"/>. This can be used to conditionally add to
45- /// the logger factory .
45+ /// the logging builder .
4646 /// </summary>
47- /// <param name="loggerFactory ">The logger factory .</param>
47+ /// <param name="loggingBuilder ">The logging builder .</param>
4848 /// <param name="condition">If set to <c>true</c> the <paramref name="ifAction"/> is executed, otherwise the
4949 /// <paramref name="elseAction"/> is executed.</param>
50- /// <param name="ifAction">The action used to add to the logger factory if the condition is <c>true</c>.</param>
51- /// <param name="elseAction">The action used to add to the logger factory if the condition is <c>false</c>.</param>
52- /// <returns>The same logger factory .</returns>
53- public static ILoggerFactory AddIfElse (
54- this ILoggerFactory loggerFactory ,
50+ /// <param name="ifAction">The action used to add to the logging builder if the condition is <c>true</c>.</param>
51+ /// <param name="elseAction">The action used to add to the logging builder if the condition is <c>false</c>.</param>
52+ /// <returns>The same logging builder .</returns>
53+ public static ILoggingBuilder AddIfElse (
54+ this ILoggingBuilder loggingBuilder ,
5555 bool condition ,
56- Func < ILoggerFactory , ILoggerFactory > ifAction ,
57- Func < ILoggerFactory , ILoggerFactory > elseAction )
56+ Func < ILoggingBuilder , ILoggingBuilder > ifAction ,
57+ Func < ILoggingBuilder , ILoggingBuilder > elseAction )
5858 {
59- if ( loggerFactory is null )
59+ if ( loggingBuilder is null )
6060 {
61- throw new ArgumentNullException ( nameof ( loggerFactory ) ) ;
61+ throw new ArgumentNullException ( nameof ( loggingBuilder ) ) ;
6262 }
6363
6464 if ( ifAction is null )
@@ -73,14 +73,14 @@ public static ILoggerFactory AddIfElse(
7373
7474 if ( condition )
7575 {
76- loggerFactory = ifAction ( loggerFactory ) ;
76+ loggingBuilder = ifAction ( loggingBuilder ) ;
7777 }
7878 else
7979 {
80- loggerFactory = elseAction ( loggerFactory ) ;
80+ loggingBuilder = elseAction ( loggingBuilder ) ;
8181 }
8282
83- return loggerFactory ;
83+ return loggingBuilder ;
8484 }
8585 }
8686}
0 commit comments