Skip to content

Commit

Permalink
Fix build by adding deconstruct extension for older .NET frameworks
Browse files Browse the repository at this point in the history
  • Loading branch information
yingxinj committed Apr 15, 2024
1 parent 32e7c8f commit 51e095f
Showing 1 changed file with 14 additions and 0 deletions.
@@ -0,0 +1,14 @@
using System.Collections.Generic;

namespace Swashbuckle.AspNetCore.SwaggerGen
{
public static class KeyValuePairExtensions
{
// Explicit deconstruct required for older .NET frameworks
public static void Deconstruct<TKey, TValue>(this KeyValuePair<TKey, TValue> kvp, out TKey key, out TValue value)
{
key = kvp.Key;
value = kvp.Value;
}
}
}

0 comments on commit 51e095f

Please sign in to comment.