@@ -92,19 +92,18 @@ private void ProcessAll()
9292
9393 foreach ( var type in typesToProcess ) {
9494 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+ }
9898 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 ) ) {
101100 result = Process ( underlyingType ) ;
102101 mappingCache . Add ( request , result ) ;
103102 }
104103 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+ }
108107 }
109108 type . MappingDatabase = result . MappingDatabase ;
110109 type . MappingSchema = result . MappingSchema ;
@@ -118,9 +117,9 @@ private MappingResult Process(Type type)
118117 var resultDatabase = ! string . IsNullOrEmpty ( rule . Database ) ? rule . Database : defaultDatabase ;
119118 var resultSchema = ! string . IsNullOrEmpty ( rule . Schema ) ? rule . Schema : defaultSchema ;
120119
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+ }
124123
125124 return new MappingResult ( resultDatabase , resultSchema ) ;
126125 }
0 commit comments