move 'WireMock.Net.OpenApiParser.Preview' to ''src-preview' folder

This commit is contained in:
Stef Heyenrath
2025-05-02 09:15:59 +02:00
parent 630ffab56e
commit 5c8105b50d
17 changed files with 0 additions and 0 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