@@ -92,19 +92,18 @@ private void ProcessAll()
92
92
93
93
foreach ( var type in typesToProcess ) {
94
94
var underlyingType = type . UnderlyingType ;
95
- if ( verbose )
96
- if ( BuildLog . IsLogged ( LogLevel . Info ) )
97
- BuildLog . Info ( nameof ( Strings . LogProcessingX ) , underlyingType . GetShortName ( ) ) ;
95
+ if ( verbose && BuildLog . IsLogged ( LogLevel . Info ) ) {
96
+ BuildLog . Info ( nameof ( Strings . LogProcessingX ) , underlyingType . GetShortName ( ) ) ;
97
+ }
98
98
var request = new MappingRequest ( underlyingType . Assembly , underlyingType . Namespace ) ;
99
- MappingResult result ;
100
- if ( ! mappingCache . TryGetValue ( request , out result ) ) {
99
+ if ( ! mappingCache . TryGetValue ( request , out var result ) ) {
101
100
result = Process ( underlyingType ) ;
102
101
mappingCache . Add ( request , result ) ;
103
102
}
104
103
else {
105
- if ( verbose )
106
- if ( BuildLog . IsLogged ( LogLevel . Info ) )
107
- BuildLog . Info ( nameof ( Strings . LogReusingCachedMappingInformationForX ) , underlyingType . GetShortName ( ) ) ;
104
+ if ( verbose && BuildLog . IsLogged ( LogLevel . Info ) ) {
105
+ BuildLog . Info ( nameof ( Strings . LogReusingCachedMappingInformationForX ) , underlyingType . GetShortName ( ) ) ;
106
+ }
108
107
}
109
108
type . MappingDatabase = result . MappingDatabase ;
110
109
type . MappingSchema = result . MappingSchema ;
@@ -118,9 +117,9 @@ private MappingResult Process(Type type)
118
117
var resultDatabase = ! string . IsNullOrEmpty ( rule . Database ) ? rule . Database : defaultDatabase ;
119
118
var resultSchema = ! string . IsNullOrEmpty ( rule . Schema ) ? rule . Schema : defaultSchema ;
120
119
121
- if ( verbose )
122
- if ( BuildLog . IsLogged ( LogLevel . Info ) )
123
- BuildLog . Info ( nameof ( Strings . ApplyingRuleXToY ) , rule , type . GetShortName ( ) ) ;
120
+ if ( verbose && BuildLog . IsLogged ( LogLevel . Info ) ) {
121
+ BuildLog . Info ( nameof ( Strings . ApplyingRuleXToY ) , rule , type . GetShortName ( ) ) ;
122
+ }
124
123
125
124
return new MappingResult ( resultDatabase , resultSchema ) ;
126
125
}
0 commit comments