add IReadOnlyObservableDictionary interface

This commit is contained in:
TORISOUP 2024-06-05 18:13:34 +09:00
parent e34d0231c6
commit 89a9424ec3
2 changed files with 7 additions and 2 deletions

View File

@ -15,6 +15,11 @@ namespace ObservableCollections
ISynchronizedView<T, TView> CreateView<TView>(Func<T, TView> transform, bool reverse = false);
}
public interface IReadOnlyObservableDictionary<TKey, TValue> :
IReadOnlyDictionary<TKey, TValue>, IObservableCollection<KeyValuePair<TKey, TValue>>
{
}
public interface IFreezedCollection<T>
{
ISynchronizedView<T, TView> CreateView<TView>(Func<T, TView> transform, bool reverse = false);

View File

@ -6,8 +6,8 @@ using System.Diagnostics.CodeAnalysis;
namespace ObservableCollections
{
public sealed partial class ObservableDictionary<TKey, TValue>
: IDictionary<TKey, TValue>, IReadOnlyDictionary<TKey, TValue>, IObservableCollection<KeyValuePair<TKey, TValue>>
public sealed partial class ObservableDictionary<TKey, TValue> : IDictionary<TKey, TValue>,
IReadOnlyObservableDictionary<TKey, TValue>
where TKey : notnull
{
readonly Dictionary<TKey, TValue> dictionary;