Skip to content

Commit 17c5f4b

Browse files
linkdotnetegil
authored andcommitted
Use raw string literals
1 parent 215483e commit 17c5f4b

File tree

1 file changed

+15
-13
lines changed

1 file changed

+15
-13
lines changed

src/bunit.generators/Web.Stubs/AddStubMethodStubGenerator/AddStubGenerator.cs

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -107,19 +107,21 @@ private static void Execute(ImmutableArray<AddStubClassInfo> classInfos, SourceP
107107
private static void GenerateInterceptorCode(AddStubClassInfo stubbedComponentGroup, IEnumerable<AddStubClassInfo> stubClassGrouped, SourceProductionContext context)
108108
{
109109
// Generate the attribute
110-
const string attribute = @"namespace System.Runtime.CompilerServices
111-
{
112-
[AttributeUsage(AttributeTargets.Method, AllowMultiple = true)]
113-
sealed file class InterceptsLocationAttribute : Attribute
114-
{
115-
public InterceptsLocationAttribute(string filePath, int line, int column)
116-
{
117-
_ = filePath;
118-
_ = line;
119-
_ = column;
120-
}
121-
}
122-
}";
110+
const string attribute = """
111+
namespace System.Runtime.CompilerServices
112+
{
113+
[AttributeUsage(AttributeTargets.Method, AllowMultiple = true)]
114+
sealed file class InterceptsLocationAttribute : Attribute
115+
{
116+
public InterceptsLocationAttribute(string filePath, int line, int column)
117+
{
118+
_ = filePath;
119+
_ = line;
120+
_ = column;
121+
}
122+
}
123+
}
124+
""";
123125

124126
// Generate the interceptor
125127
var interceptorSource = new StringBuilder();

0 commit comments

Comments
 (0)