|
6 | 6 | // more info in ThirdPartyNotices.txt in the root of the project. |
7 | 7 |
|
8 | 8 | using System.ComponentModel; |
| 9 | +using System.Diagnostics.CodeAnalysis; |
9 | 10 | using System.Globalization; |
10 | 11 | using System.Runtime.CompilerServices; |
11 | 12 | using System.Text; |
@@ -115,7 +116,7 @@ public void DecreaseIndent() |
115 | 116 | /// Writes a block to the underlying buffer. |
116 | 117 | /// </summary> |
117 | 118 | /// <returns>A <see cref="Block"/> value to close the open block with.</returns> |
118 | | - public Block WriteBlock(string? clause = default, bool isExpression = false) |
| 119 | + public Block WriteBlock([StringSyntax("C#")] string? clause = default, bool isExpression = false) |
119 | 120 | { |
120 | 121 | if (clause is not null) |
121 | 122 | { |
@@ -244,7 +245,7 @@ public void WriteLine(bool skipIfPresent = false) |
244 | 245 | /// </summary> |
245 | 246 | /// <param name="content">The content to write.</param> |
246 | 247 | /// <param name="isMultiline">Whether the input content is multiline.</param> |
247 | | - public void WriteLine(string content, bool isMultiline = false) |
| 248 | + public void WriteLine([StringSyntax("C#")] string content, bool isMultiline = false) |
248 | 249 | { |
249 | 250 | WriteLine(content.AsSpan(), isMultiline); |
250 | 251 | } |
@@ -288,7 +289,7 @@ public void WriteLineIf(bool condition, bool skipIfPresent = false) |
288 | 289 | /// <param name="condition">The condition to use to decide whether or not to write content.</param> |
289 | 290 | /// <param name="content">The content to write.</param> |
290 | 291 | /// <param name="isMultiline">Whether the input content is multiline.</param> |
291 | | - public void WriteLineIf(bool condition, string content, bool isMultiline = false) |
| 292 | + public void WriteLineIf(bool condition, [StringSyntax("C#")] string content, bool isMultiline = false) |
292 | 293 | { |
293 | 294 | if (condition) |
294 | 295 | { |
|
0 commit comments