1
0
mirror of https://github.com/DarthAffe/RGB.NET.git synced 2025-12-12 17:48:31 +00:00
RGB.NET/RGB.NET.Core/Events/DevicesChangedEventArgs.cs

30 lines
696 B
C#

using System;
namespace RGB.NET.Core;
public sealed class DevicesChangedEventArgs : EventArgs
{
#region Properties & Fields
public IRGBDevice? Added { get; }
public IRGBDevice? Removed { get; }
#endregion
#region Constructors
private DevicesChangedEventArgs(IRGBDevice? added, IRGBDevice? removed)
{
this.Added = added;
this.Removed = removed;
}
#endregion
#region Methods
public static DevicesChangedEventArgs CreateDevicesAddedArgs(IRGBDevice addedDevice) => new(addedDevice, null);
public static DevicesChangedEventArgs CreateDevicesRemovedArgs(IRGBDevice removedDevice) => new(null, removedDevice);
#endregion
}