16 references to WithBody
Microsoft.CodeAnalysis.NetAnalyzers.UnitTests (16)
Microsoft.NetCore.Analyzers\Runtime\PreferAsSpanOverSubstringTests.cs (16)
71Sources = { thing, CS.WithBody(testStatements) }, 76Sources = { thing, CS.WithBody(fixedStatements) } 140string testCode = CS.WithBody(WithKey($"thing.Consume(foo.{substring})", 0) + ';'); 141string fixedCode = CS.WithBody($"thing.Consume(foo.{asSpan});"); 247string testCode = CS.WithBody(WithKey($"Thing.Consume({testArguments})", 0) + ';'); 248string fixedCode = CS.WithBody($"Thing.Consume({fixedArguments});"); 411string testCode = CS.WithBody(WithKey(testExpression, 0) + ';'); 412string fixedCode = CS.WithBody(fixedExpression + ';'); 601string testCode = CS.WithBody(WithKey(testExpression, 0) + ';'); 602string fixedCode = CS.WithBody(fixedExpression + ';'); 701string testCode = CS.WithBody(testExpression + ';'); 702string fixedCode = CS.WithBody(fixedExpression + ';'); 764string testCode = CS.WithBody(WithKey(@"C.Consume(foo.Substring(1))", 0) + ';', includeUsings: false); 765string fixedCode = CS.WithBody(@"C.Consume(foo.AsSpan(1));", includeUsings: true); 1220string testCode = CS.WithBody(testExpression + ';'); 1334string testCode = CS.WithBody(testStatements);