Revert changes to WireMock.Net.OpenApiParser (#1289)

* Revert changes to WireMock.Net.OpenApiParser

* revert
This commit is contained in:
Stef Heyenrath
2025-05-02 07:18:35 +02:00
committed by GitHub
parent e7310fbc7b
commit cf0dcf5855
36 changed files with 1909 additions and 644 deletions

View File

@@ -0,0 +1,22 @@
// Copyright © WireMock.Net
#if NET46 || NET47 || NETSTANDARD2_0
using System.Collections.Generic;
namespace WireMock.Net.OpenApiParser.Extensions;
internal static class DictionaryExtensions
{
public static bool TryAdd<TKey, TValue>(this Dictionary<TKey, TValue>? dictionary, TKey key, TValue value)
{
if (dictionary is null || dictionary.ContainsKey(key))
{
return false;
}
dictionary[key] = value;
return true;
}
}
#endif