1
0
mirror of https://github.com/DarthAffe/RGB.NET.git synced 2025-12-12 17:48:31 +00:00
RGB.NET/RGB.NET.Devices.DMX/Generic/LedChannelMapping.cs

23 lines
650 B
C#

using System;
using System.Collections;
using System.Collections.Generic;
using RGB.NET.Core;
namespace RGB.NET.Devices.DMX;
internal sealed class LedChannelMapping(List<(int channel, Func<Color, byte> getValue)> mappings)
: IEnumerable<(int channel, Func<Color, byte> getValue)>
{
#region Properties & Fields
private readonly List<(int channel, Func<Color, byte> getValue)> _mappings = [..mappings];
#endregion
#region Methods
public IEnumerator<(int channel, Func<Color, byte> getValue)> GetEnumerator() => _mappings.GetEnumerator();
IEnumerator IEnumerable.GetEnumerator() => GetEnumerator();
#endregion
}