public static bool TryAdd <T>( this ImmutableSegmentedDictionary <T, VoidResult> .Builder dictionary, T value) where T : notnull { #if NETCOREAPP return(dictionary.TryAdd(value, default)); #else if (dictionary.ContainsKey(value)) { return(false); } dictionary[value] = default; return(true); #endif }
public bool Contains(TKey item) => _dictionary.ContainsKey(item);