// ------------------------------------------------------------------------------------------------- // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License (MIT). See LICENSE in the repo root for license information. // ------------------------------------------------------------------------------------------------- using System; using System.Collections.Generic; using System.Linq; namespace Microsoft.Health.Core.Extensions; public static class KeyValuePairExtensions { public static IReadOnlyList> AsTuples(this IEnumerable> collection) { return collection.Select(x => Tuple.Create(x.Key, x.Value)).ToArray(); } }