using System; using System.Collections; using System.Collections.Generic; using System.Threading.Tasks; namespace StgSharp.Collections { public interface IBidirectionalDictionary : IDictionary { #pragma warning disable CA1033 ICollection IDictionary.Keys => FirstIndex; ICollection IDictionary.Values => SecondIndex; bool IDictionary.ContainsKey(TFirst key) => Contains(key); #pragma warning restore CA1033 public IReadOnlyDictionary Forward { get; } public IReadOnlyDictionary Reverse { get; } public ICollection FirstIndex { get;} public ICollection SecondIndex { get; } public TFirst this[TSecond key] { get;set; } /// /// Determines whether the contains the /// specified key. /// /// The value to locate in the . /// /// true if the contains an element with the /// specified key; otherwise, false. /// public bool Contains(TSecond key); /// /// Determines whether the contains the /// specified key. /// /// The value to locate in the . /// /// true if the contains an element with the /// specified key; otherwise, false. /// public bool Contains(TFirst key); public bool TryGetValue(TSecond key, out TFirst value); } }