Skip to content

Commit 3cd8b59

Browse files
authored
refactor: Use collection expression for array (#115)
1 parent cd0e0d6 commit 3cd8b59

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

src/Common/Results/YeSqlValidationResult.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ public class YeSqlValidationResult : IEnumerable<string>
1313
/// <summary>
1414
/// Allows access to the errors collection.
1515
/// </summary>
16-
private readonly List<string> _errors = new();
16+
private readonly List<string> _errors = [];
1717

1818
internal YeSqlValidationResult() { }
1919

src/Loader/YeSqlLoader.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ public partial class YeSqlLoader
1616
/// <summary>
1717
/// An instance of the <see cref="YeSqlValidationResult"/> class used to store errors associated with the loader.
1818
/// </summary>
19-
private readonly YeSqlValidationResult _validationResult = new();
19+
private readonly YeSqlValidationResult _validationResult = [];
2020

2121
/// <summary>
2222
/// Initializes a new instance of the <see cref="YeSqlLoader"/> class.

src/Parser/YeSqlParser.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ public partial class YeSqlParser
3333
/// <summary>
3434
/// Gets the result of the validation performed on the SQL statements.
3535
/// </summary>
36-
internal YeSqlValidationResult ValidationResult { get; } = new();
36+
internal YeSqlValidationResult ValidationResult { get; } = [];
3737

3838
/// <summary>
3939
/// Initializes a new instance of the <see cref="YeSqlParser"/> class.

src/Reader/YeSqlDictionary.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ internal class YeSqlDictionary : ISqlCollection
1111
/// <summary>
1212
/// A dictionary containing the SQL statements that have been parsed from the data source (e.g., a SQL file).
1313
/// </summary>
14-
private readonly Dictionary<string, string> _sqlStatements = new();
14+
private readonly Dictionary<string, string> _sqlStatements = [];
1515

1616
/// <inheritdoc />
1717
public string this[string tagName]

0 commit comments

Comments
 (0)