mirror of
https://github.com/DarthAffe/RGB.NET.git
synced 2025-12-12 17:48:31 +00:00
12 lines
372 B
C#
12 lines
372 B
C#
using System.Collections.Generic;
|
|
using System.Linq;
|
|
|
|
namespace RGB.NET.Devices.Corsair;
|
|
|
|
internal static class DictionaryExtension
|
|
{
|
|
public static Dictionary<TValue, TKey> SwapKeyValue<TKey, TValue>(this Dictionary<TKey, TValue> dictionary)
|
|
where TKey : notnull
|
|
where TValue : notnull
|
|
=> dictionary.ToDictionary(x => x.Value, x => x.Key);
|
|
} |