using System.Collections.Generic; namespace EntrustSettle.Common.Extensions; public static class UntilExtensions { public static void AddOrModify(this IDictionary dic, TKey key, TValue value) { if (dic.TryGetValue(key, out _)) { dic[key] = value; } else { dic.Add(key, value); } } }