@@ -448,7 +448,7 @@ internal void TracerObjectHeader(
448
448
449
449
internal IDisposable TraceScope ( string msg )
450
450
{
451
- if ( ( _flags & PSTraceSourceOptions . Scope ) != PSTraceSourceOptions . None )
451
+ if ( _flags . HasFlag ( PSTraceSourceOptions . Scope ) )
452
452
{
453
453
try
454
454
{
@@ -462,7 +462,7 @@ internal IDisposable TraceScope(string msg)
462
462
463
463
internal IDisposable TraceScope ( string format , object arg1 )
464
464
{
465
- if ( ( _flags & PSTraceSourceOptions . Scope ) != PSTraceSourceOptions . None )
465
+ if ( _flags . HasFlag ( PSTraceSourceOptions . Scope ) )
466
466
{
467
467
try
468
468
{
@@ -476,7 +476,7 @@ internal IDisposable TraceScope(string format, object arg1)
476
476
477
477
internal IDisposable TraceScope ( string format , object arg1 , object arg2 )
478
478
{
479
- if ( ( _flags & PSTraceSourceOptions . Scope ) != PSTraceSourceOptions . None )
479
+ if ( _flags . HasFlag ( PSTraceSourceOptions . Scope ) )
480
480
{
481
481
try
482
482
{
@@ -531,7 +531,7 @@ internal IDisposable TraceMethod(
531
531
string format ,
532
532
params object [ ] args )
533
533
{
534
- if ( ( _flags & PSTraceSourceOptions . Method ) != PSTraceSourceOptions . None )
534
+ if ( _flags . HasFlag ( PSTraceSourceOptions . Method ) )
535
535
{
536
536
try
537
537
{
@@ -578,7 +578,7 @@ internal IDisposable TraceMethod(
578
578
/// </returns>
579
579
internal IDisposable TraceEventHandlers ( )
580
580
{
581
- if ( ( _flags & PSTraceSourceOptions . Events ) != PSTraceSourceOptions . None )
581
+ if ( _flags . HasFlag ( PSTraceSourceOptions . Events ) )
582
582
{
583
583
try
584
584
{
@@ -628,7 +628,7 @@ internal IDisposable TraceEventHandlers(
628
628
string format ,
629
629
params object [ ] args )
630
630
{
631
- if ( ( _flags & PSTraceSourceOptions . Events ) != PSTraceSourceOptions . None )
631
+ if ( _flags . HasFlag ( PSTraceSourceOptions . Events ) )
632
632
{
633
633
try
634
634
{
@@ -697,7 +697,7 @@ internal IDisposable TraceEventHandlers(
697
697
/// </remarks>
698
698
internal IDisposable TraceLock ( string lockName )
699
699
{
700
- if ( ( _flags & PSTraceSourceOptions . Lock ) != PSTraceSourceOptions . None )
700
+ if ( _flags . HasFlag ( PSTraceSourceOptions . Lock ) )
701
701
{
702
702
try
703
703
{
@@ -729,7 +729,7 @@ internal IDisposable TraceLock(string lockName)
729
729
/// </param>
730
730
internal void TraceLockAcquiring ( string lockName )
731
731
{
732
- if ( ( _flags & PSTraceSourceOptions . Lock ) != PSTraceSourceOptions . None )
732
+ if ( _flags . HasFlag ( PSTraceSourceOptions . Lock ) )
733
733
{
734
734
TraceLockHelper (
735
735
lockAcquiringFormatter ,
@@ -751,7 +751,7 @@ internal void TraceLockAcquiring(string lockName)
751
751
/// </remarks>
752
752
internal void TraceLockAcquired ( string lockName )
753
753
{
754
- if ( ( _flags & PSTraceSourceOptions . Lock ) != PSTraceSourceOptions . None )
754
+ if ( _flags . HasFlag ( PSTraceSourceOptions . Lock ) )
755
755
{
756
756
TraceLockHelper (
757
757
lockEnterFormatter ,
@@ -769,7 +769,7 @@ internal void TraceLockAcquired(string lockName)
769
769
/// </param>
770
770
internal void TraceLockReleased ( string lockName )
771
771
{
772
- if ( ( _flags & PSTraceSourceOptions . Lock ) != PSTraceSourceOptions . None )
772
+ if ( _flags . HasFlag ( PSTraceSourceOptions . Lock ) )
773
773
{
774
774
TraceLockHelper (
775
775
lockLeavingFormatter ,
@@ -823,7 +823,7 @@ internal void TraceError(
823
823
string errorMessageFormat ,
824
824
params object [ ] args )
825
825
{
826
- if ( ( _flags & PSTraceSourceOptions . Error ) != PSTraceSourceOptions . None )
826
+ if ( _flags . HasFlag ( PSTraceSourceOptions . Error ) )
827
827
{
828
828
FormatOutputLine (
829
829
PSTraceSourceOptions . Error ,
@@ -847,7 +847,7 @@ internal void TraceWarning(
847
847
string warningMessageFormat ,
848
848
params object [ ] args )
849
849
{
850
- if ( ( _flags & PSTraceSourceOptions . Warning ) != PSTraceSourceOptions . None )
850
+ if ( _flags . HasFlag ( PSTraceSourceOptions . Warning ) )
851
851
{
852
852
FormatOutputLine (
853
853
PSTraceSourceOptions . Warning ,
@@ -871,7 +871,7 @@ internal void TraceVerbose(
871
871
string verboseMessageFormat ,
872
872
params object [ ] args )
873
873
{
874
- if ( ( _flags & PSTraceSourceOptions . Verbose ) != PSTraceSourceOptions . None )
874
+ if ( _flags . HasFlag ( PSTraceSourceOptions . Verbose ) )
875
875
{
876
876
FormatOutputLine (
877
877
PSTraceSourceOptions . Verbose ,
@@ -889,7 +889,7 @@ internal void TraceVerbose(
889
889
/// </param>
890
890
internal void WriteLine ( string format )
891
891
{
892
- if ( ( _flags & PSTraceSourceOptions . WriteLine ) != PSTraceSourceOptions . None )
892
+ if ( _flags . HasFlag ( PSTraceSourceOptions . WriteLine ) )
893
893
{
894
894
FormatOutputLine (
895
895
PSTraceSourceOptions . WriteLine ,
@@ -906,7 +906,7 @@ internal void WriteLine(string format)
906
906
/// <param name="arg1"></param>
907
907
internal void WriteLine ( string format , object arg1 )
908
908
{
909
- if ( ( _flags & PSTraceSourceOptions . WriteLine ) != PSTraceSourceOptions . None )
909
+ if ( _flags . HasFlag ( PSTraceSourceOptions . WriteLine ) )
910
910
{
911
911
FormatOutputLine (
912
912
PSTraceSourceOptions . WriteLine ,
@@ -974,7 +974,7 @@ internal void WriteLine(string format, ulong arg1)
974
974
/// <param name="arg2"></param>
975
975
internal void WriteLine ( string format , object arg1 , object arg2 )
976
976
{
977
- if ( ( _flags & PSTraceSourceOptions . WriteLine ) != PSTraceSourceOptions . None )
977
+ if ( _flags . HasFlag ( PSTraceSourceOptions . WriteLine ) )
978
978
{
979
979
FormatOutputLine (
980
980
PSTraceSourceOptions . WriteLine ,
@@ -993,7 +993,7 @@ internal void WriteLine(string format, object arg1, object arg2)
993
993
/// <param name="arg3"></param>
994
994
internal void WriteLine ( string format , object arg1 , object arg2 , object arg3 )
995
995
{
996
- if ( ( _flags & PSTraceSourceOptions . WriteLine ) != PSTraceSourceOptions . None )
996
+ if ( _flags . HasFlag ( PSTraceSourceOptions . WriteLine ) )
997
997
{
998
998
FormatOutputLine (
999
999
PSTraceSourceOptions . WriteLine ,
@@ -1013,7 +1013,7 @@ internal void WriteLine(string format, object arg1, object arg2, object arg3)
1013
1013
/// <param name="arg4"></param>
1014
1014
internal void WriteLine ( string format , object arg1 , object arg2 , object arg3 , object arg4 )
1015
1015
{
1016
- if ( ( _flags & PSTraceSourceOptions . WriteLine ) != PSTraceSourceOptions . None )
1016
+ if ( _flags . HasFlag ( PSTraceSourceOptions . WriteLine ) )
1017
1017
{
1018
1018
FormatOutputLine (
1019
1019
PSTraceSourceOptions . WriteLine ,
@@ -1034,7 +1034,7 @@ internal void WriteLine(string format, object arg1, object arg2, object arg3, ob
1034
1034
/// <param name="arg5"></param>
1035
1035
internal void WriteLine ( string format , object arg1 , object arg2 , object arg3 , object arg4 , object arg5 )
1036
1036
{
1037
- if ( ( _flags & PSTraceSourceOptions . WriteLine ) != PSTraceSourceOptions . None )
1037
+ if ( _flags . HasFlag ( PSTraceSourceOptions . WriteLine ) )
1038
1038
{
1039
1039
FormatOutputLine (
1040
1040
PSTraceSourceOptions . WriteLine ,
@@ -1056,7 +1056,7 @@ internal void WriteLine(string format, object arg1, object arg2, object arg3, ob
1056
1056
/// <param name="arg6"></param>
1057
1057
internal void WriteLine ( string format , object arg1 , object arg2 , object arg3 , object arg4 , object arg5 , object arg6 )
1058
1058
{
1059
- if ( ( _flags & PSTraceSourceOptions . WriteLine ) != PSTraceSourceOptions . None )
1059
+ if ( _flags . HasFlag ( PSTraceSourceOptions . WriteLine ) )
1060
1060
{
1061
1061
FormatOutputLine (
1062
1062
PSTraceSourceOptions . WriteLine ,
@@ -1074,7 +1074,7 @@ internal void WriteLine(string format, object arg1, object arg2, object arg3, ob
1074
1074
/// </param>
1075
1075
internal void WriteLine ( object arg )
1076
1076
{
1077
- if ( ( _flags & PSTraceSourceOptions . WriteLine ) != PSTraceSourceOptions . None )
1077
+ if ( _flags . HasFlag ( PSTraceSourceOptions . WriteLine ) )
1078
1078
{
1079
1079
WriteLine ( "{0}" , arg == null ? "null" : arg . ToString ( ) ) ;
1080
1080
}
0 commit comments