// DictionaryExtensions.cs using System.Collections.Generic; namespace FreelancerListServer { public static class DictionaryExtensions { public static TValue GetValueOrDefault(this IDictionary dictionary, TKey key, TValue defaultValue) { return dictionary.TryGetValue(key, out TValue value) ? value : defaultValue; } } }