Skip to content

Commit

Permalink
refactor: Use collection expression for array (#115)
Browse files Browse the repository at this point in the history
  • Loading branch information
MrDave1999 authored Jul 5, 2024
1 parent cd0e0d6 commit 3cd8b59
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/Common/Results/YeSqlValidationResult.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ public class YeSqlValidationResult : IEnumerable<string>
/// <summary>
/// Allows access to the errors collection.
/// </summary>
private readonly List<string> _errors = new();
private readonly List<string> _errors = [];

internal YeSqlValidationResult() { }

Expand Down
2 changes: 1 addition & 1 deletion src/Loader/YeSqlLoader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public partial class YeSqlLoader
/// <summary>
/// An instance of the <see cref="YeSqlValidationResult"/> class used to store errors associated with the loader.
/// </summary>
private readonly YeSqlValidationResult _validationResult = new();
private readonly YeSqlValidationResult _validationResult = [];

/// <summary>
/// Initializes a new instance of the <see cref="YeSqlLoader"/> class.
Expand Down
2 changes: 1 addition & 1 deletion src/Parser/YeSqlParser.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public partial class YeSqlParser
/// <summary>
/// Gets the result of the validation performed on the SQL statements.
/// </summary>
internal YeSqlValidationResult ValidationResult { get; } = new();
internal YeSqlValidationResult ValidationResult { get; } = [];

/// <summary>
/// Initializes a new instance of the <see cref="YeSqlParser"/> class.
Expand Down
2 changes: 1 addition & 1 deletion src/Reader/YeSqlDictionary.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ internal class YeSqlDictionary : ISqlCollection
/// <summary>
/// A dictionary containing the SQL statements that have been parsed from the data source (e.g., a SQL file).
/// </summary>
private readonly Dictionary<string, string> _sqlStatements = new();
private readonly Dictionary<string, string> _sqlStatements = [];

/// <inheritdoc />
public string this[string tagName]
Expand Down

0 comments on commit 3cd8b59

Please sign in to comment.