/
githubmirror
/
roslyn
Обзор
Документация
Войти
/
githubmirror
/
roslyn
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
src/Dependencies/Collections/Extensions/KeyValuePairExtensions.cs
21 строка
727 B
Tomáš Matoušek
Clean up KeyValuePair polyfills (#78872)
24 июн 2025, 03:17
Не верифицирован
24 июн 2025, 03:17
f294360
Код
Авторство
О чём код?
// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. #nullable enable namespace System.Collections.Generic; internal static class RoslynKeyValuePairExtensions { #if NET public static void Deconstruct<TKey, TValue>(KeyValuePair<TKey, TValue> keyValuePair, out TKey key, out TValue value) => keyValuePair.Deconstruct(out key, out value); #else public static void Deconstruct<TKey, TValue>(this KeyValuePair<TKey, TValue> keyValuePair, out TKey key, out TValue value) { key = keyValuePair.Key; value = keyValuePair.Value; } #endif }