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 Dec 6, 2022
1 parent 57ea3ea commit 9843dd8
Showing 1 changed file with 14 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -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 9843dd8

Please sign in to comment.