25 references to WithBody
Microsoft.CodeAnalysis.NetAnalyzers.UnitTests (25)
Microsoft.NetCore.Analyzers\Runtime\PreferAsSpanOverSubstringTests.cs (25)
107Sources = { VB.WithBody(testStatements) }, 114Sources = { VB.WithBody(fixedStatements) }, 181string testCode = VB.WithBody(WithKey($"thing.Consume(foo.{substring})", 0)); 182string fixedCode = VB.WithBody($"thing.Consume(foo.{asSpan})"); 280string testCode = VB.WithBody(WithKey($"Thing.Consume({testArguments})", 0)); 281string fixedCode = VB.WithBody($"Thing.Consume({fixedArguments})"); 538string testCode = VB.WithBody(WithKey(testExpression, 0)); 539string fixedCode = VB.WithBody(fixedExpression); 624string testCode = VB.WithBody(WithKey(testExpression, 0)); 625string fixedCode = VB.WithBody(fixedExpression); 727string testCode = VB.WithBody(testExpression); 728string fixedCode = VB.WithBody(fixedExpression); 792string testCode = VB.WithBody(WithKey(@"C.Consume(foo.Substring(1))", 0), includeImports: false); 793string fixedCode = VB.WithBody(@"C.Consume(foo.AsSpan(1))", includeImports: true); 828string testCode = VB.WithBody(WithKey(@"C.Consume(foo.Substring(1))", 0), includeImports: false); 829string fixedCode = VB.WithBody(@"C.Consume(foo.AsSpan(1))", includeImports: false); 1040VB.WithBody(WithKey(@"R.Consume(foo.Substring(1), foo.Substring(2), foo.Substring(3))", 0)), 1041VB.WithBody(@"R.Consume(foo.AsSpan(1), foo.AsSpan(2), foo.Substring(3))") 1054VB.WithBody(WithKey(@"R.Consume(7, foo.Substring(2), foo.Substring(3))", 0)), 1055VB.WithBody(@"R.Consume(7, foo.Substring(2), foo.AsSpan(3))") 1142VB.WithBody(WithKey(@"R.Consume(foo.Substring(1), foo.Substring(2))", 0)) 1157VB.WithBody(WithKey(@"R.Consume(foo.Substring(1), foo.Substring(2), foo.Substring(3))", 0)) 1267string testCode = VB.WithBody(WithKey(testExpression, 0)); 1395string testCode = VB.WithBody(testStatements); 1736string testCode = VB.WithBody(