diff --git a/ArchiSteamFarm/Collections/ObservableConcurrentDictionary.cs b/ArchiSteamFarm/Collections/ObservableConcurrentDictionary.cs index 95fa0eae7..cb53209bd 100644 --- a/ArchiSteamFarm/Collections/ObservableConcurrentDictionary.cs +++ b/ArchiSteamFarm/Collections/ObservableConcurrentDictionary.cs @@ -28,12 +28,15 @@ using Newtonsoft.Json; namespace ArchiSteamFarm.Collections; -[PublicAPI] public sealed class ObservableConcurrentDictionary : IDictionary, IReadOnlyDictionary where TKey : notnull { public event EventHandler? OnModified; + [PublicAPI] public int Count => BackingDictionary.Count; + + [PublicAPI] public bool IsEmpty => BackingDictionary.IsEmpty; + public bool IsReadOnly => false; [JsonProperty(Required = Required.DisallowNull)] @@ -107,6 +110,7 @@ public sealed class ObservableConcurrentDictionary : IDictionary.TryGetValue(TKey key, out TValue value) => BackingDictionary.TryGetValue(key, out value!); bool IDictionary.TryGetValue(TKey key, out TValue value) => BackingDictionary.TryGetValue(key, out value!); + [PublicAPI] public bool TryAdd(TKey key, TValue value) { if (!BackingDictionary.TryAdd(key, value)) { return false; @@ -117,5 +121,6 @@ public sealed class ObservableConcurrentDictionary : IDictionary BackingDictionary.TryGetValue(key, out value); }