/// <inheritdoc /> protected override int ComputeHashCode() { unchecked { var hash = KeyContract.GetHashCode(); hash <<= 5; hash ^= ValueContract.GetHashCode(); return(hash); } }
/// <inheritdoc /> public IWriteContract CopyTo(ContractCollection collection) { return(collection.GetOrCreate(this, () => new DictionaryWriteContract(KeyContract.CopyTo(collection), ValueContract.CopyTo(collection)))); }
/// <inheritdoc /> public bool CanReadFrom(IWriteContract writeContract, bool strict) { return(writeContract is DictionaryWriteContract ws && KeyContract.CanReadFrom(ws.KeyContract, strict) && ValueContract.CanReadFrom(ws.ValueContract, strict)); }