/// <summary>Reads the values of multiple entries in the map</summary>
        /// <param name="trans">Transaction used for the operation</param>
        /// <param name="ids">List of the keys to read</param>
        /// <returns>Array of results, in the same order as specified in <paramref name="ids"/>.</returns>
        public async Task <Optional <TValue>[]> GetValuesAsync([NotNull] IFdbReadOnlyTransaction trans, [NotNull] IEnumerable <TKey> ids)
        {
            if (trans == null)
            {
                throw new ArgumentNullException("trans");
            }
            if (ids == null)
            {
                throw new ArgumentNullException("ids");
            }

            var results = await trans.GetValuesAsync(this.Location.Keys.Encode(ids)).ConfigureAwait(false);

            return(Optional.DecodeRange(this.ValueEncoder, results));
        }