1- using System ;
1+ // Copyright (c) Microsoft. All rights reserved.
2+ // Licensed under the MIT license. See LICENSE file in the project root for full license information.
3+
4+ using System ;
25using System . Collections . Generic ;
36using System . Linq ;
47using System . Text ;
@@ -94,7 +97,7 @@ public async Task<Document> ProcessAsync(Document document, CancellationToken ca
9497 root = root . ReplaceNode ( firstMember , firstMember . WithLeadingTrivia ( newLeadingTrivia ) ) ;
9598 }
9699 }
97-
100+
98101 var xUnitUsing = SyntaxFactory . UsingDirective ( SyntaxFactory . ParseName ( "Xunit" ) ) . NormalizeWhitespace ( ) ;
99102 newUsings . Add ( xUnitUsing ) ;
100103
@@ -123,7 +126,6 @@ private void RemoveTestClassAttributes(CompilationUnitSyntax root, SemanticModel
123126 if ( IsTestNamespaceType ( attributeTypeDocID , "TestClassAttribute" ) )
124127 {
125128 return true ;
126-
127129 }
128130 }
129131 return false ;
@@ -149,7 +151,6 @@ private void RemoveTestClassAttributes(CompilationUnitSyntax root, SemanticModel
149151 }
150152 return transformationRoot ;
151153 } ) ;
152-
153154 }
154155 private void ChangeTestMethodAttributesToFact ( CompilationUnitSyntax root , SemanticModel semanticModel , TransformationTracker transformationTracker )
155156 {
@@ -190,7 +191,6 @@ private void ChangeAssertCalls(CompilationUnitSyntax root, SemanticModel semanti
190191 { "IsTrue" , "True" } ,
191192 { "IsFalse" , "False" } ,
192193 { "IsInstanceOfType" , "IsAssignableFrom" } ,
193-
194194 } ;
195195
196196 Dictionary < SimpleNameSyntax , string > nameReplacementsForNodes = new Dictionary < SimpleNameSyntax , string > ( ) ;
@@ -240,7 +240,7 @@ private void ChangeAssertCalls(CompilationUnitSyntax root, SemanticModel semanti
240240 var oldArguments = invocationExpression . ArgumentList . Arguments ;
241241 var newArguments = new SeparatedSyntaxList < ArgumentSyntax > ( ) . AddRange ( new [ ] { oldArguments [ 1 ] , oldArguments [ 0 ] } ) ;
242242
243- return invocationExpression . WithArgumentList ( invocationExpression . ArgumentList . WithArguments ( newArguments ) ) ;
243+ return invocationExpression . WithArgumentList ( invocationExpression . ArgumentList . WithArguments ( newArguments ) ) ;
244244 } ) ;
245245 } ) ;
246246 }
@@ -288,7 +288,7 @@ private static bool IsTestNamespaceType(string docID, string simpleTypeName)
288288
289289 private static bool LoadMSTestNamespaces ( )
290290 {
291- lock ( _lockObject )
291+ lock ( _lockObject )
292292 {
293293 if ( _mstestNamespaces != null )
294294 {
@@ -310,16 +310,13 @@ private static bool LoadMSTestNamespaces()
310310 return true ;
311311 }
312312
313-
314-
315-
316313 }
317314
318315 class TransformationTracker
319316 {
320- Dictionary < SyntaxAnnotation , Func < CompilationUnitSyntax , IEnumerable < SyntaxNode > , Dictionary < SyntaxNode , SyntaxNode > , CompilationUnitSyntax > > _annotationToTransformation = new Dictionary < SyntaxAnnotation , Func < CompilationUnitSyntax , IEnumerable < SyntaxNode > , Dictionary < SyntaxNode , SyntaxNode > , CompilationUnitSyntax > > ( ) ;
321- Dictionary < SyntaxNode , List < SyntaxAnnotation > > _nodeToAnnotations = new Dictionary < SyntaxNode , List < SyntaxAnnotation > > ( ) ;
322- Dictionary < SyntaxAnnotation , SyntaxNode > _originalNodeLookup = new Dictionary < SyntaxAnnotation , SyntaxNode > ( ) ;
317+ private Dictionary < SyntaxAnnotation , Func < CompilationUnitSyntax , IEnumerable < SyntaxNode > , Dictionary < SyntaxNode , SyntaxNode > , CompilationUnitSyntax > > _annotationToTransformation = new Dictionary < SyntaxAnnotation , Func < CompilationUnitSyntax , IEnumerable < SyntaxNode > , Dictionary < SyntaxNode , SyntaxNode > , CompilationUnitSyntax > > ( ) ;
318+ private Dictionary < SyntaxNode , List < SyntaxAnnotation > > _nodeToAnnotations = new Dictionary < SyntaxNode , List < SyntaxAnnotation > > ( ) ;
319+ private Dictionary < SyntaxAnnotation , SyntaxNode > _originalNodeLookup = new Dictionary < SyntaxAnnotation , SyntaxNode > ( ) ;
323320
324321 public void AddTransformation ( IEnumerable < SyntaxNode > nodesToTransform , Func < CompilationUnitSyntax , IEnumerable < SyntaxNode > , Dictionary < SyntaxNode , SyntaxNode > , CompilationUnitSyntax > transformerFunc )
325322 {
0 commit comments