mirror of
https://github.com/DarthAffe/CUE.NET.git
synced 2026-11-11 13:06:24 +00:00
Fixed update mechanism
This commit is contained in:
1 parent
603c4f72fe
commit
dbdc1c22e8
6 files changed
+53
-22
No files matched your search
@@ -1,4 +1,5 @@
|
||||
// ReSharper disable MemberCanBePrivate.Global
|
||||
// ReSharper disable UnusedAutoPropertyAccessor.Global
|
||||
|
||||
using System.Collections.Generic;
|
||||
|
||||
@@ -8,15 +9,15 @@ namespace CUE.NET.Devices.Generic.EventArgs
|
||||
{
|
||||
#region Properties & Fields
|
||||
|
||||
public IEnumerable<KeyValuePair<int, CorsairLed>> UpdatedLeds { get; private set; }
|
||||
public IEnumerable<LedUpateRequest> UpdatedLeds { get; }
|
||||
|
||||
#endregion
|
||||
|
||||
#region Constructors
|
||||
|
||||
public LedsUpdatedEventArgs(IEnumerable<KeyValuePair<int, CorsairLed>> updatedLeds)
|
||||
public LedsUpdatedEventArgs(IEnumerable<LedUpateRequest> updatedLeds)
|
||||
{
|
||||
this.UpdatedLeds = new List<KeyValuePair<int, CorsairLed>>(updatedLeds); // Copy this - we don't want anyone to change the original led list.
|
||||
this.UpdatedLeds = updatedLeds;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
// ReSharper disable MemberCanBePrivate.Global
|
||||
// ReSharper disable UnusedAutoPropertyAccessor.Global
|
||||
|
||||
using System.Collections.Generic;
|
||||
|
||||
@@ -8,15 +9,15 @@ namespace CUE.NET.Devices.Generic.EventArgs
|
||||
{
|
||||
#region Properties & Fields
|
||||
|
||||
public ICollection<KeyValuePair<int, CorsairLed>> UpdatingLeds { get; private set; }
|
||||
public ICollection<LedUpateRequest> UpdatingLeds { get; }
|
||||
|
||||
#endregion
|
||||
|
||||
#region Constructors
|
||||
|
||||
public LedsUpdatingEventArgs(ICollection<KeyValuePair<int, CorsairLed>> updatingLeds)
|
||||
public LedsUpdatingEventArgs(ICollection<LedUpateRequest> updatingLeds)
|
||||
{
|
||||
this.UpdatingLeds = updatingLeds; // No copy here - before the update changing this is ok.
|
||||
this.UpdatingLeds = updatingLeds;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
Reference in new issue
Block a user