@@ -379,7 +379,7 @@ public void CleanMethodNamesOfAnonymousDelegatesTest()
379379{
380380var logFactory = new LogFactory ( ) . Setup ( ) . LoadConfigurationFromXml ( @"
381381 <nlog>
382- <targets><target name='debug' type='Debug' layout='${callsite:ClassName=false:CleanNamesOfAnonymousDelegates=true }' /></targets>
382+ <targets><target name='debug' type='Debug' layout='${callsite:ClassName=false}' /></targets>
383383 <rules>
384384 <logger name='*' levels='Fatal' writeTo='debug' />
385385 </rules>
@@ -407,46 +407,12 @@ public void CleanMethodNamesOfAnonymousDelegatesTest()
407407}
408408}
409409
410- [ Fact ]
411- public void DontCleanMethodNamesOfAnonymousDelegatesTest ( )
412- {
413- var logFactory = new LogFactory ( ) . Setup ( ) . LoadConfigurationFromXml ( @"
414- <nlog>
415- <targets><target name='debug' type='Debug' layout='${callsite:ClassName=false:CleanNamesOfAnonymousDelegates=false}' /></targets>
416- <rules>
417- <logger name='*' levels='Fatal' writeTo='debug' />
418- </rules>
419- </nlog>" ) . LogFactory ;
420-
421- var logger = logFactory . GetLogger ( "A" ) ;
422-
423- bool done = false ;
424- ThreadPool . QueueUserWorkItem (
425- state=>
426- {
427- logger . Fatal ( "message" ) ;
428- done = true ;
429- } ,
430- null ) ;
431-
432- while ( done == false )
433- {
434- Thread . Sleep ( 10 ) ;
435- }
436-
437- if ( done == true )
438- {
439- string lastMessage = GetDebugLastMessage ( "debug" , logFactory ) ;
440- Assert . StartsWith ( "<DontCleanMethodNamesOfAnonymousDelegatesTest>" , lastMessage ) ;
441- }
442- }
443-
444410[ Fact ]
445411public void CleanClassNamesOfAnonymousDelegatesTest ( )
446412{
447413var logFactory = new LogFactory ( ) . Setup ( ) . LoadConfigurationFromXml ( @"
448414 <nlog>
449- <targets><target name='debug' type='Debug' layout='${callsite:ClassName=true:MethodName=false:CleanNamesOfAnonymousDelegates=true }' /></targets>
415+ <targets><target name='debug' type='Debug' layout='${callsite:ClassName=true:MethodName=false}' /></targets>
450416 <rules>
451417 <logger name='*' levels='Fatal' writeTo='debug' />
452418 </rules>
@@ -474,45 +440,12 @@ public void CleanClassNamesOfAnonymousDelegatesTest()
474440}
475441}
476442
477- [ Fact ]
478- public void DontCleanClassNamesOfAnonymousDelegatesTest ( )
479- {
480- var logFactory = new LogFactory ( ) . Setup ( ) . LoadConfigurationFromXml ( @"
481- <nlog>
482- <targets><target name='debug' type='Debug' layout='${callsite:ClassName=true:MethodName=false:CleanNamesOfAnonymousDelegates=false}' /></targets>
483- <rules>
484- <logger name='*' levels='Fatal' writeTo='debug' />
485- </rules>
486- </nlog>" ) . LogFactory ;
487-
488- var logger = logFactory . GetLogger ( "A" ) ;
489-
490- bool done = false ;
491- ThreadPool . QueueUserWorkItem (
492- state=>
493- {
494- logger . Fatal ( "message" ) ;
495- done = true ;
496- } ,
497- null ) ;
498-
499- while ( done == false )
500- {
501- Thread . Sleep ( 10 ) ;
502- }
503-
504- if ( done == true )
505- {
506- logFactory . AssertDebugLastMessageContains ( "+<>" ) ;
507- }
508- }
509-
510443[ Fact ]
511444public void When_NotIncludeNameSpace_Then_CleanAnonymousDelegateClassNameShouldReturnParentClassName ( )
512445{
513446var logFactory = new LogFactory ( ) . Setup ( ) . LoadConfigurationFromXml ( @"
514447 <nlog>
515- <targets><target name='debug' type='Debug' layout='${callsite:ClassName=true:MethodName=false:IncludeNamespace=false:CleanNamesOfAnonymousDelegates=true }' /></targets>
448+ <targets><target name='debug' type='Debug' layout='${callsite:ClassName=true:MethodName=false:IncludeNamespace=false}' /></targets>
516449 <rules>
517450 <logger name='*' levels='Fatal' writeTo='debug' />
518451 </rules>
@@ -1232,7 +1165,7 @@ public void LogAfterTaskRunAwait_CleanNamesOfAsyncContinuationsIsTrue_ShouldClea
12321165
12331166var logFactory = new LogFactory ( ) . Setup ( ) . LoadConfigurationFromXml ( @"
12341167 <nlog>
1235- <targets><target name='debug' type='Debug' layout='${callsite:classname=false:cleannamesofasynccontinuations=true }' /></targets>
1168+ <targets><target name='debug' type='Debug' layout='${callsite:classname=false}' /></targets>
12361169 <rules>
12371170 <logger name='*' levels='Debug' writeTo='debug' />
12381171 </rules>
@@ -1262,7 +1195,7 @@ public void LogAfterTaskRunAwait_CleanNamesOfAsyncContinuationsIsTrue_ShouldClea
12621195
12631196var logFactory = new LogFactory ( ) . Setup ( ) . LoadConfigurationFromXml ( @"
12641197 <nlog>
1265- <targets><target name='debug' type='Debug' layout='${callsite:classname=true:includenamespace=true:cleannamesofasynccontinuations=true:cleanNamesOfAnonymousDelegates=true }' /></targets>
1198+ <targets><target name='debug' type='Debug' layout='${callsite:classname=true:includenamespace=true}' /></targets>
12661199 <rules>
12671200 <logger name='*' levels='Debug' writeTo='debug' />
12681201 </rules>
@@ -1284,34 +1217,6 @@ public void LogAfterTaskRunAwait_CleanNamesOfAsyncContinuationsIsTrue_ShouldClea
12841217logFactory . AssertDebugLastMessage ( $ "{ typeof ( InnerClassAsyncMethod6 ) . ToString ( ) } .AsyncMethod6b") ;
12851218}
12861219
1287- #ifNET35
1288- [ Fact ( Skip = "NET35 not supporting async callstack" ) ]
1289- #elifMONO
1290- [ Fact ( Skip = "Not working under MONO - not sure if unit test is wrong, or the code" ) ]
1291- #else
1292- [ Fact ]
1293- #endif
1294- public void LogAfterTaskRunAwait_CleanNamesOfAsyncContinuationsIsFalse_ShouldNotCleanNames ( )
1295- {
1296- var logFactory = new LogFactory ( ) . Setup ( ) . LoadConfigurationFromXml ( @"
1297- <nlog>
1298- <targets><target name='debug' type='Debug' layout='${callsite:includenamespace=true:cleannamesofasynccontinuations=false}' /></targets>
1299- <rules>
1300- <logger name='*' levels='Debug' writeTo='debug' />
1301- </rules>
1302- </nlog>" ) . LogFactory ;
1303-
1304- Task . Run ( async ( ) =>
1305- {
1306- await AMinimalAsyncMethod ( ) ;
1307- var logger = logFactory . GetCurrentClassLogger ( ) ;
1308- logger . Debug ( "dude" ) ;
1309- } ) . Wait ( ) ;
1310-
1311- logFactory . AssertDebugLastMessageContains ( "NLog.UnitTests.LayoutRenderers.CallSiteTests" ) ;
1312- logFactory . AssertDebugLastMessageContains ( "MoveNext" ) ;
1313- }
1314-
13151220private class InnerClassAsyncMethod6
13161221{
13171222public virtual async Task AsyncMethod6a ( LogFactory logFactory )