@@ -193,8 +193,9 @@ private void EnsureCorrectMsDataCollectorAndReplace(XPathNavigator xpathNavigato
193
193
if ( msDataCollectorNavigator != null )
194
194
{
195
195
addedMsDataCollector = false ;
196
+ var msDataCollectorNavigatorClone = msDataCollectorNavigator . Clone ( ) ;
196
197
EnsureCorrectCoberturaFormat ( msDataCollectorNavigator ) ;
197
- ReplaceExcludesIncludes ( msDataCollectorNavigator . Clone ( ) , replacements ) ;
198
+ ReplaceExcludesIncludes ( msDataCollectorNavigatorClone , replacements ) ;
198
199
}
199
200
else
200
201
{
@@ -236,27 +237,27 @@ private void ReplaceExcludesIncludes(XPathNavigator msDataCollectorNavigator, IR
236
237
msDataCollectorNavigator . OuterXml = replaced ;
237
238
}
238
239
239
- private void EnsureCorrectCoberturaFormat ( XPathNavigator navigator )
240
+ private void EnsureCorrectCoberturaFormat ( XPathNavigator msDataCollectorNavigator )
240
241
{
241
- var movedToConfiguration = navigator . MoveToChild ( "Configuration" , "" ) ;
242
+ var movedToConfiguration = msDataCollectorNavigator . MoveToChild ( "Configuration" , "" ) ;
242
243
if ( movedToConfiguration )
243
244
{
244
- var movedToFormat = navigator . MoveToChild ( "Format" , "" ) ;
245
+ var movedToFormat = msDataCollectorNavigator . MoveToChild ( "Format" , "" ) ;
245
246
if ( movedToFormat )
246
247
{
247
- if ( navigator . InnerXml != "Cobertura" )
248
+ if ( msDataCollectorNavigator . InnerXml != "Cobertura" )
248
249
{
249
- navigator . InnerXml = "Cobertura" ;
250
+ msDataCollectorNavigator . InnerXml = "Cobertura" ;
250
251
}
251
252
}
252
253
else
253
254
{
254
- navigator . AppendChild ( "<Format>Cobertura</Format>" ) ;
255
+ msDataCollectorNavigator . AppendChild ( "<Format>Cobertura</Format>" ) ;
255
256
}
256
257
}
257
258
else
258
259
{
259
- navigator . AppendChild ( "<Configuration><Format>Cobertura</Format></Configuration>" ) ;
260
+ msDataCollectorNavigator . AppendChild ( "<Configuration><Format>Cobertura</Format></Configuration>" ) ;
260
261
}
261
262
}
262
263
0 commit comments