diff --git a/src/SJP.Schematic.Lint/Rules/NoSurrogatePrimaryKeyRule.cs b/src/SJP.Schematic.Lint/Rules/NoSurrogatePrimaryKeyRule.cs index 7549603ab..50befec4b 100644 --- a/src/SJP.Schematic.Lint/Rules/NoSurrogatePrimaryKeyRule.cs +++ b/src/SJP.Schematic.Lint/Rules/NoSurrogatePrimaryKeyRule.cs @@ -51,7 +51,7 @@ protected IEnumerable AnalyseTable(IRelationalDatabaseTable table) Some: pk => { if (pk.Columns.Count == 1) - return Array.Empty(); + return []; var fkColumns = table.ParentKeys .Select(fk => fk.ChildKey) @@ -62,7 +62,7 @@ protected IEnumerable AnalyseTable(IRelationalDatabaseTable table) var areAllColumnsFks = pk.Columns.All(c => fkColumns.Contains(c.Name.LocalName)); return areAllColumnsFks - ? Array.Empty() + ? [] : [BuildMessage(table.Name)]; }, None: Array.Empty diff --git a/src/SJP.Schematic.Oracle/OracleRelationalDatabaseTableProvider.cs b/src/SJP.Schematic.Oracle/OracleRelationalDatabaseTableProvider.cs index 395f517c8..e6f88178b 100644 --- a/src/SJP.Schematic.Oracle/OracleRelationalDatabaseTableProvider.cs +++ b/src/SJP.Schematic.Oracle/OracleRelationalDatabaseTableProvider.cs @@ -692,7 +692,7 @@ private async Task> LoadTriggersAsyncCore( var events = TriggerEvent.None; var triggerEventPieces = triggerRow.TriggerEvent != null ? triggerRow.TriggerEvent.Split(new[] { " OR " }, StringSplitOptions.RemoveEmptyEntries) - : Array.Empty(); + : []; foreach (var triggerEventPiece in triggerEventPieces) { diff --git a/src/SJP.Schematic.Tests.Utilities/DatabaseTestFixtureAttribute.cs b/src/SJP.Schematic.Tests.Utilities/DatabaseTestFixtureAttribute.cs index fd2c14b7a..848bfcda1 100644 --- a/src/SJP.Schematic.Tests.Utilities/DatabaseTestFixtureAttribute.cs +++ b/src/SJP.Schematic.Tests.Utilities/DatabaseTestFixtureAttribute.cs @@ -48,7 +48,7 @@ public DatabaseTestFixtureAttribute(Type target, string propertyName, string ign IDbConnectionFactory factory; try { - var methodResult = getMethod.Invoke(null, Array.Empty()); + var methodResult = getMethod.Invoke(null, []); if (methodResult is not IDbConnectionFactory connFactory) { ResultCache.AddOrUpdate(getMethod, false, static (_, __) => false); diff --git a/src/SJP.Schematic.Tests.Utilities/NoneConstraint.cs b/src/SJP.Schematic.Tests.Utilities/NoneConstraint.cs index f7e0a6838..83a99effa 100644 --- a/src/SJP.Schematic.Tests.Utilities/NoneConstraint.cs +++ b/src/SJP.Schematic.Tests.Utilities/NoneConstraint.cs @@ -32,7 +32,7 @@ public override ConstraintResult ApplyTo(TActual actual) throw new ArgumentException($"Expected an Option object, instead received {actualType.FullName}", nameof(actual)); var propGet = actualType.GetProperty(nameof(Option.IsNone))!.GetGetMethod()!; - var isNone = (bool)propGet.Invoke(actual, Array.Empty())!; + var isNone = (bool)propGet.Invoke(actual, [])!; return new OptionConstraintResult(this, false, isNone); } diff --git a/src/SJP.Schematic.Tests.Utilities/SomeConstraint.cs b/src/SJP.Schematic.Tests.Utilities/SomeConstraint.cs index 94f89be99..e20852f9d 100644 --- a/src/SJP.Schematic.Tests.Utilities/SomeConstraint.cs +++ b/src/SJP.Schematic.Tests.Utilities/SomeConstraint.cs @@ -32,7 +32,7 @@ public override ConstraintResult ApplyTo(TActual actual) throw new ArgumentException($"Expected an Option object, instead received {actualType.FullName}", nameof(actual)); var propGet = actualType.GetProperty(nameof(Option.IsSome))!.GetGetMethod()!; - var isSome = (bool)propGet.Invoke(actual, Array.Empty())!; + var isSome = (bool)propGet.Invoke(actual, [])!; return new OptionConstraintResult(this, true, isSome); }