microsoft/healthcare-shared-components

Public

mirrored from https://github.com/microsoft/healthcare-shared-componentsAvailable

CodeCommitsIssuesPull requestsActionsInsightsSecurity
1.0.0-1.0.79

Branches

Tags

  • No tags available.
0Branches0Tags
Go to file
Add file
Code

Clone

HTTPS

Download ZIP

src/Microsoft.Health.Core/Extensions/KeyValuePairExtensions.cs

19lines · modecode

1// -------------------------------------------------------------------------------------------------
2// Copyright (c) Microsoft Corporation. All rights reserved.
3// Licensed under the MIT License (MIT). See LICENSE in the repo root for license information.
4// -------------------------------------------------------------------------------------------------
5
6using System;
7using System.Collections.Generic;
8using System.Linq;
9
10namespace Microsoft.Health.Core.Extensions
11{
12 public static class KeyValuePairExtensions
13 {
14 public static IReadOnlyList<Tuple<T1, T2>> AsTuples<T1, T2>(this IEnumerable<KeyValuePair<T1, T2>> collection)
15 {
16 return collection.Select(x => Tuple.Create(x.Key, x.Value)).ToArray();
17 }
18 }
19}
20