diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ee05bfe..7abcf80 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -31,7 +31,7 @@ jobs: run: ./Push.ps1 shell: pwsh - name: Artifacts - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v4 with: name: artifacts path: artifacts/**/* \ No newline at end of file diff --git a/src/MongoDB.Driver.Core.Extensions.DiagnosticSources/CommandStartedEventExtensions.cs b/src/MongoDB.Driver.Core.Extensions.DiagnosticSources/CommandStartedEventExtensions.cs index 39f1184..7df6052 100644 --- a/src/MongoDB.Driver.Core.Extensions.DiagnosticSources/CommandStartedEventExtensions.cs +++ b/src/MongoDB.Driver.Core.Extensions.DiagnosticSources/CommandStartedEventExtensions.cs @@ -1,11 +1,12 @@ using System.Collections.Generic; +using System.Collections.Frozen; using MongoDB.Driver.Core.Events; namespace MongoDB.Driver.Core.Extensions.DiagnosticSources { public static class CommandStartedEventExtensions { - private static readonly HashSet CommandsWithCollectionNameAsValue = + private static readonly FrozenSet CommandsWithCollectionNameAsValue = new HashSet { "aggregate", @@ -23,7 +24,7 @@ public static class CommandStartedEventExtensions "drop", "createIndexes", "listIndexes" - }; + }.ToFrozenSet(); public static string GetCollectionName(this CommandStartedEvent @event) { diff --git a/src/MongoDB.Driver.Core.Extensions.DiagnosticSources/MongoDB.Driver.Core.Extensions.DiagnosticSources.csproj b/src/MongoDB.Driver.Core.Extensions.DiagnosticSources/MongoDB.Driver.Core.Extensions.DiagnosticSources.csproj index 4454323..fbfa438 100644 --- a/src/MongoDB.Driver.Core.Extensions.DiagnosticSources/MongoDB.Driver.Core.Extensions.DiagnosticSources.csproj +++ b/src/MongoDB.Driver.Core.Extensions.DiagnosticSources/MongoDB.Driver.Core.Extensions.DiagnosticSources.csproj @@ -15,10 +15,11 @@ - - + + +