Skip to content

Commit

Permalink
♻️ Rename "FeatureCollection" into "FeatureSet" in more places.
Browse files Browse the repository at this point in the history
  • Loading branch information
hexawyz committed Apr 2, 2024
1 parent a5a8f70 commit e010c29
Show file tree
Hide file tree
Showing 15 changed files with 308 additions and 299 deletions.
8 changes: 4 additions & 4 deletions Exo.Core/Driver.cs
Original file line number Diff line number Diff line change
Expand Up @@ -87,17 +87,17 @@ protected Driver(string friendlyName, DeviceConfigurationKey configurationKey)
/// <summary>Gets the feature collection for the specified base feature type.</summary>
/// <remarks>
/// <para>
/// Implementors should return <see cref="FeatureCollection.Empty{TFeature}"/> for unavailable features anf for all unsupported feature sets.
/// In the case of supported feature sets, an empty collection is always assumed to indicate the feature set being unavailable.
/// Implementors should return <see cref="FeatureSet.Empty{TFeature}"/> for unavailable features anf for all unsupported feature sets.
/// In the case of supported feature sets, an empty set is always assumed to indicate the feature set being unavailable.
/// </para>
/// <para>
/// Returning an empty feature set in all supported cases makes the work of the callers easier, not necessitating to check if a given feature set is supported before requesting it.
/// It also does not incur any excessive work in the implementors, as the fallback to <see cref="FeatureCollection.Empty{TFeature}"/> is very easy to implement.
/// It also does not incur any excessive work in the implementors, as the fallback to <see cref="FeatureSet.Empty{TFeature}"/> is very easy to implement.
/// </para>
/// </remarks>
/// <typeparam name="TFeature">The base feature type.</typeparam>
/// <returns>A feature collection of the specified type.</returns>
public virtual IDeviceFeatureSet<TFeature> GetFeatureSet<TFeature>()
where TFeature : class, IDeviceFeature
=> (this as IDeviceDriver<TFeature>)?.Features ?? FeatureCollection.Empty<TFeature>();
=> (this as IDeviceDriver<TFeature>)?.Features ?? FeatureSet.Empty<TFeature>();
}
474 changes: 237 additions & 237 deletions Exo.Core/FeatureCollection.cs → Exo.Core/FeatureSet.cs

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions Exo.Core/Features/FeatureSetDescription.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ public static FeatureSetDescription CreateDynamic<TFeature>(bool isAvailable)
where TFeature : class, IDeviceFeature
{
// This is merely a way to validate the feature type.
_ = FeatureCollection.Empty<TFeature>();
_ = FeatureSet.Empty<TFeature>();

return new FeatureSetDescription(typeof(TFeature), true, isAvailable);
}
Expand All @@ -15,7 +15,7 @@ public static FeatureSetDescription CreateStatic<TFeature>()
where TFeature : class, IDeviceFeature
{
// This is merely a way to validate the feature type.
_ = FeatureCollection.Empty<TFeature>();
_ = FeatureSet.Empty<TFeature>();

return new FeatureSetDescription(typeof(TFeature), false, true);
}
Expand Down
2 changes: 1 addition & 1 deletion Exo.Core/GenericKeyboardDriver.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ private GenericKeyboardDriver(string friendlyName, DeviceConfigurationKey config
{
}

IDeviceFeatureSet<IKeyboardDeviceFeature> IDeviceDriver<IKeyboardDeviceFeature>.Features => FeatureCollection<IKeyboardDeviceFeature>.Empty();
IDeviceFeatureSet<IKeyboardDeviceFeature> IDeviceDriver<IKeyboardDeviceFeature>.Features => FeatureSet<IKeyboardDeviceFeature>.Empty();

public override ValueTask DisposeAsync() => ValueTask.CompletedTask;
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,15 @@ namespace Exo;
public interface IDeviceFeatureSet : IEnumerable
{
Type FeatureType { get; }

/// <summary>Gets a value indicating if this feature set is empty.</summary>
/// <remarks>
/// <para>
/// Usage of this property should be preferred over <see cref="ICollection.Count"/> when possible,
/// as the implementation of <see cref="ICollection.Count"/> can be costlier in some implementations.
/// </para>
/// <para>Obviously, implementors should always make evaluating <see cref="IsEmpty"/> as cheap as possible.</para>
/// </remarks>
bool IsEmpty { get; }
}

Expand Down
2 changes: 1 addition & 1 deletion Exo.Devices.Asus.Aura/AuraRamDriver.cs
Original file line number Diff line number Diff line change
Expand Up @@ -380,7 +380,7 @@ private AuraRamDriver(ISystemManagementBus smBus, ImmutableArray<DiscoveredModul
_lightingZones = ImmutableCollectionsMarshal.AsImmutableArray(lightingZones);
_deferredChangesBuffer = new FinalPendingChanges[lightingZones.Length];
_lightingZoneCollection = new ReadOnlyCollection<ILightingZone>(lightingZones);
_lightingFeatures = FeatureCollection.Create<ILightingDeviceFeature, AuraRamDriver, ILightingControllerFeature, ILightingDeferredChangesFeature>(this);
_lightingFeatures = FeatureSet.Create<ILightingDeviceFeature, AuraRamDriver, ILightingControllerFeature, ILightingDeferredChangesFeature>(this);
}

public override ValueTask DisposeAsync() => ValueTask.CompletedTask;
Expand Down
2 changes: 1 addition & 1 deletion Exo.Devices.Elgato.StreamDeck/StreamDeckDeviceDriver.cs
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ DeviceConfigurationKey configurationKey
_productId = productId;
_versionNumber = versionNumber;

_genericFeatures = FeatureCollection.Create<IGenericDeviceFeature, StreamDeckDeviceDriver, IDeviceIdFeature, IDeviceSerialNumberFeature>(this);
_genericFeatures = FeatureSet.Create<IGenericDeviceFeature, StreamDeckDeviceDriver, IDeviceIdFeature, IDeviceSerialNumberFeature>(this);
}

public override DeviceCategory DeviceCategory => DeviceCategory.Keyboard;
Expand Down
10 changes: 5 additions & 5 deletions Exo.Devices.Gigabyte/RgbFusionIT5702Driver.cs
Original file line number Diff line number Diff line change
Expand Up @@ -564,7 +564,7 @@ System.Collections.IEnumerable GetFeatures()
if (typeof(TFeature) == typeof(ILightingDeviceFeature)) return _lightingFeatures;
if (typeof(TFeature) == typeof(IMotherboardDeviceFeature)) return _motherboardFeatures;

return FeatureCollection.Empty<TFeature>();
return FeatureSet.Empty<TFeature>();
}

return Unsafe.As<IDeviceFeatureSet<TFeature>>(GetFeatures());
Expand All @@ -585,15 +585,15 @@ DeviceConfigurationKey configurationKey
{
_stream = stream;

_lightingFeatures = FeatureCollection.Create<
_lightingFeatures = FeatureSet.Create<
ILightingDeviceFeature,
RgbFusionIT5702Driver,
ILightingControllerFeature,
ILightingBrightnessFeature,
IUnifiedLightingFeature,
ILightingDeferredChangesFeature,
IPersistentLightingFeature>(this);
_genericFeatures = FeatureCollection.Create<IGenericDeviceFeature, RgbFusionIT5702Driver, IDeviceIdFeature>(this);
_genericFeatures = FeatureSet.Create<IGenericDeviceFeature, RgbFusionIT5702Driver, IDeviceIdFeature>(this);

_unifiedLightingZone = new WaveLightingZone((byte)((1 << ledCount) - 1), Z490MotherboardUnifiedZoneId, this);
_lightingZones = new LightingZone[ledCount];
Expand All @@ -619,7 +619,7 @@ DeviceConfigurationKey configurationKey

if (smBusFeature is not null)
{
_motherboardFeatures = FeatureCollection.Create<IMotherboardDeviceFeature, IMotherboardSystemManagementBusFeature>(smBusFeature);
_motherboardFeatures = FeatureSet.Create<IMotherboardDeviceFeature, IMotherboardSystemManagementBusFeature>(smBusFeature);
FeatureSets =
[
FeatureSetDescription.CreateStatic<IGenericDeviceFeature>(),
Expand All @@ -629,7 +629,7 @@ DeviceConfigurationKey configurationKey
}
else
{
_motherboardFeatures = FeatureCollection.Empty<IMotherboardDeviceFeature>();
_motherboardFeatures = FeatureSet.Empty<IMotherboardDeviceFeature>();
FeatureSets =
[
FeatureSetDescription.CreateStatic<IGenericDeviceFeature>(),
Expand Down
4 changes: 2 additions & 2 deletions Exo.Devices.Intel/IntelGpuDriver.cs
Original file line number Diff line number Diff line change
Expand Up @@ -124,8 +124,8 @@ ControlLibrary.DisplayAdapter gpu
{
DeviceId = deviceId;
_gpu = gpu;
_displayAdapterFeatures = FeatureCollection.Create<IDisplayAdapterDeviceFeature, IntelGpuDriver, IDisplayAdapterI2CBusProviderFeature>(this);
_genericFeatures = FeatureCollection.Create<IGenericDeviceFeature, IntelGpuDriver, IDeviceIdFeature>(this);
_displayAdapterFeatures = FeatureSet.Create<IDisplayAdapterDeviceFeature, IntelGpuDriver, IDisplayAdapterI2CBusProviderFeature>(this);
_genericFeatures = FeatureSet.Create<IGenericDeviceFeature, IntelGpuDriver, IDeviceIdFeature>(this);
}

public override ValueTask DisposeAsync() => ValueTask.CompletedTask;
Expand Down
14 changes: 7 additions & 7 deletions Exo.Devices.Lg.Monitors/LgMonitorDriver.cs
Original file line number Diff line number Diff line change
Expand Up @@ -360,13 +360,13 @@ protected override async ValueTask DisposeAsync(LgMonitorDriver driver)
private void UpdateFeatures(UltraGearLightingFeatures? ultraGearLightingFeatures)
{
var lightingFeatures = ultraGearLightingFeatures is not null ?
FeatureCollection.Create<
FeatureSet.Create<
ILightingDeviceFeature,
UltraGearLightingFeatures,
IUnifiedLightingFeature,
ILightingDeferredChangesFeature,
ILightingBrightnessFeature>(ultraGearLightingFeatures) :
FeatureCollection.Empty<ILightingDeviceFeature>();
FeatureSet.Empty<ILightingDeviceFeature>();
Volatile.Write(ref _lightingFeatures, lightingFeatures);
Volatile.Write
(
Expand Down Expand Up @@ -402,7 +402,7 @@ System.Collections.IEnumerable GetFeatures()
if (typeof(TFeature) == typeof(IMonitorDeviceFeature)) return _monitorFeatures;
if (typeof(TFeature) == typeof(ILgMonitorDeviceFeature)) return _lgMonitorFeatures;

return FeatureCollection.Empty<TFeature>();
return FeatureSet.Empty<TFeature>();
}

return Unsafe.As<IDeviceFeatureSet<TFeature>>(GetFeatures());
Expand Down Expand Up @@ -430,7 +430,7 @@ DeviceConfigurationKey configurationKey
_dscVersion = dscVersion;
_rawCapabilities = rawCapabilities;
_parsedCapabilities = parsedCapabilities;
_monitorFeatures = FeatureCollection.Create<
_monitorFeatures = FeatureSet.Create<
IMonitorDeviceFeature,
LgMonitorDriver,
IMonitorRawCapabilitiesFeature,
Expand All @@ -439,20 +439,20 @@ DeviceConfigurationKey configurationKey
IMonitorBrightnessFeature,
IMonitorContrastFeature,
IMonitorSpeakerAudioVolumeFeature>(this);
_lgMonitorFeatures = FeatureCollection.Create<
_lgMonitorFeatures = FeatureSet.Create<
ILgMonitorDeviceFeature,
LgMonitorDriver,
ILgMonitorScalerVersionFeature,
ILgMonitorNxpVersionFeature,
ILgMonitorDisplayStreamCompressionVersionFeature>(this);
_genericFeatures = FeatureCollection.Create<IGenericDeviceFeature, LgMonitorDriver, IDeviceSerialNumberFeature, IDeviceIdFeature, IDeviceIdsFeature, IVariableFeatureSetDeviceFeature>(this);
_genericFeatures = FeatureSet.Create<IGenericDeviceFeature, LgMonitorDriver, IDeviceSerialNumberFeature, IDeviceIdFeature, IDeviceIdsFeature, IVariableFeatureSetDeviceFeature>(this);
if ((features & MonitorDeviceFeatures.Lighting) != 0)
{
UpdateFeatures(ultraGearLightingFeatures);
}
else
{
_lightingFeatures = FeatureCollection.Empty<ILightingDeviceFeature>();
_lightingFeatures = FeatureSet.Empty<ILightingDeviceFeature>();
_featureSets =
[
FeatureSetDescription.CreateStatic<IGenericDeviceFeature>(),
Expand Down
40 changes: 20 additions & 20 deletions Exo.Devices.Logitech/LogitechUniversalDriver.cs
Original file line number Diff line number Diff line change
Expand Up @@ -330,8 +330,8 @@ ushort versionNumber
// NB: Called from the main constructor, so derived classes need to make sure they are not missing any information at that point.
protected virtual IDeviceFeatureSet<IGenericDeviceFeature> CreateGenericFeatures()
=> HasSerialNumber ?
FeatureCollection.Create<IGenericDeviceFeature, LogitechUniversalDriver, IDeviceIdFeature, IDeviceSerialNumberFeature>(this) :
FeatureCollection.Create<IGenericDeviceFeature, LogitechUniversalDriver, IDeviceIdFeature>(this);
FeatureSet.Create<IGenericDeviceFeature, LogitechUniversalDriver, IDeviceIdFeature, IDeviceSerialNumberFeature>(this) :
FeatureSet.Create<IGenericDeviceFeature, LogitechUniversalDriver, IDeviceIdFeature>(this);

// NB: This calls DisposeAsync on all devices, but child devices will not actually be disposed, as they are managed by their parent.
public override ValueTask DisposeAsync() => _device.DisposeAsync();
Expand Down Expand Up @@ -359,11 +359,11 @@ public FeatureAccess(HidPlusPlusDevice.FeatureAccess device, ILogger<FeatureAcce
protected override IDeviceFeatureSet<IGenericDeviceFeature> CreateGenericFeatures()
=> HasSerialNumber ?
HasBattery ?
FeatureCollection.Create<IGenericDeviceFeature, FeatureAccess, IDeviceIdFeature, IDeviceSerialNumberFeature, IBatteryStateDeviceFeature>(this) :
FeatureCollection.Create<IGenericDeviceFeature, FeatureAccess, IDeviceIdFeature, IDeviceSerialNumberFeature>(this) :
FeatureSet.Create<IGenericDeviceFeature, FeatureAccess, IDeviceIdFeature, IDeviceSerialNumberFeature, IBatteryStateDeviceFeature>(this) :
FeatureSet.Create<IGenericDeviceFeature, FeatureAccess, IDeviceIdFeature, IDeviceSerialNumberFeature>(this) :
HasBattery ?
FeatureCollection.Create<IGenericDeviceFeature, FeatureAccess, IDeviceIdFeature, IBatteryStateDeviceFeature>(this) :
FeatureCollection.Create<IGenericDeviceFeature, FeatureAccess, IDeviceIdFeature>(this);
FeatureSet.Create<IGenericDeviceFeature, FeatureAccess, IDeviceIdFeature, IBatteryStateDeviceFeature>(this) :
FeatureSet.Create<IGenericDeviceFeature, FeatureAccess, IDeviceIdFeature>(this);

public override ValueTask DisposeAsync()
{
Expand Down Expand Up @@ -554,7 +554,7 @@ public RegisterAccessDirectKeyboard(HidPlusPlusDevice.RegisterAccessDirect devic

public override DeviceCategory DeviceCategory => DeviceCategory.Keyboard;

IDeviceFeatureSet<IKeyboardDeviceFeature> IDeviceDriver<IKeyboardDeviceFeature>.Features => FeatureCollection.Empty<IKeyboardDeviceFeature>();
IDeviceFeatureSet<IKeyboardDeviceFeature> IDeviceDriver<IKeyboardDeviceFeature>.Features => FeatureSet.Empty<IKeyboardDeviceFeature>();
}

internal class RegisterAccessDirectMouse : RegisterAccessDirect, IDeviceDriver<IMouseDeviceFeature>
Expand All @@ -566,7 +566,7 @@ public RegisterAccessDirectMouse(HidPlusPlusDevice.RegisterAccessDirect device,

public override DeviceCategory DeviceCategory => DeviceCategory.Mouse;

IDeviceFeatureSet<IMouseDeviceFeature> IDeviceDriver<IMouseDeviceFeature>.Features => FeatureCollection.Empty<IMouseDeviceFeature>();
IDeviceFeatureSet<IMouseDeviceFeature> IDeviceDriver<IMouseDeviceFeature>.Features => FeatureSet.Empty<IMouseDeviceFeature>();
}

internal class RegisterAccessThroughReceiverGeneric : RegisterAccessThroughReceiver
Expand All @@ -589,7 +589,7 @@ public RegisterAccessThroughReceiverKeyboard(HidPlusPlusDevice.RegisterAccessThr

public override DeviceCategory DeviceCategory => DeviceCategory.Keyboard;

IDeviceFeatureSet<IKeyboardDeviceFeature> IDeviceDriver<IKeyboardDeviceFeature>.Features => FeatureCollection.Empty<IKeyboardDeviceFeature>();
IDeviceFeatureSet<IKeyboardDeviceFeature> IDeviceDriver<IKeyboardDeviceFeature>.Features => FeatureSet.Empty<IKeyboardDeviceFeature>();
}

internal class RegisterAccessThroughReceiverMouse : RegisterAccessThroughReceiver, IDeviceDriver<IMouseDeviceFeature>
Expand All @@ -601,7 +601,7 @@ public RegisterAccessThroughReceiverMouse(HidPlusPlusDevice.RegisterAccessThroug

public override DeviceCategory DeviceCategory => DeviceCategory.Mouse;

IDeviceFeatureSet<IMouseDeviceFeature> IDeviceDriver<IMouseDeviceFeature>.Features => FeatureCollection.Empty<IMouseDeviceFeature>();
IDeviceFeatureSet<IMouseDeviceFeature> IDeviceDriver<IMouseDeviceFeature>.Features => FeatureSet.Empty<IMouseDeviceFeature>();
}

internal class FeatureAccessDirectGeneric : FeatureAccessDirect
Expand All @@ -624,11 +624,11 @@ public FeatureAccessDirectKeyboard(HidPlusPlusDevice.FeatureAccessDirect device,
{
_keyboardFeatures = HasLockKeys ?
HasBacklight ?
FeatureCollection.Create<IKeyboardDeviceFeature, FeatureAccessDirectKeyboard, IKeyboardLockKeysFeature, IKeyboardBacklightFeature>(this) :
FeatureCollection.Create<IKeyboardDeviceFeature, FeatureAccessDirectKeyboard, IKeyboardLockKeysFeature>(this) :
FeatureSet.Create<IKeyboardDeviceFeature, FeatureAccessDirectKeyboard, IKeyboardLockKeysFeature, IKeyboardBacklightFeature>(this) :
FeatureSet.Create<IKeyboardDeviceFeature, FeatureAccessDirectKeyboard, IKeyboardLockKeysFeature>(this) :
HasBacklight ?
FeatureCollection.Create<IKeyboardDeviceFeature, FeatureAccessDirectKeyboard, IKeyboardBacklightFeature>(this) :
FeatureCollection.Empty<IKeyboardDeviceFeature>();
FeatureSet.Create<IKeyboardDeviceFeature, FeatureAccessDirectKeyboard, IKeyboardBacklightFeature>(this) :
FeatureSet.Empty<IKeyboardDeviceFeature>();
}

public override DeviceCategory DeviceCategory => DeviceCategory.Keyboard;
Expand All @@ -645,7 +645,7 @@ public FeatureAccessDirectMouse(HidPlusPlusDevice.FeatureAccessDirect device, IL

public override DeviceCategory DeviceCategory => DeviceCategory.Mouse;

IDeviceFeatureSet<IMouseDeviceFeature> IDeviceDriver<IMouseDeviceFeature>.Features => FeatureCollection.Empty<IMouseDeviceFeature>();
IDeviceFeatureSet<IMouseDeviceFeature> IDeviceDriver<IMouseDeviceFeature>.Features => FeatureSet.Empty<IMouseDeviceFeature>();
}

internal sealed class FeatureAccessThroughReceiverGeneric : FeatureAccessThroughReceiver
Expand All @@ -668,11 +668,11 @@ public FeatureAccessThroughReceiverKeyboard(HidPlusPlusDevice.FeatureAccessThrou
{
_keyboardFeatures = HasLockKeys ?
HasBacklight ?
FeatureCollection.Create<IKeyboardDeviceFeature, FeatureAccessThroughReceiverKeyboard, IKeyboardLockKeysFeature, IKeyboardBacklightFeature>(this) :
FeatureCollection.Create<IKeyboardDeviceFeature, FeatureAccessThroughReceiverKeyboard, IKeyboardLockKeysFeature>(this) :
FeatureSet.Create<IKeyboardDeviceFeature, FeatureAccessThroughReceiverKeyboard, IKeyboardLockKeysFeature, IKeyboardBacklightFeature>(this) :
FeatureSet.Create<IKeyboardDeviceFeature, FeatureAccessThroughReceiverKeyboard, IKeyboardLockKeysFeature>(this) :
HasBacklight ?
FeatureCollection.Create<IKeyboardDeviceFeature, FeatureAccessThroughReceiverKeyboard, IKeyboardBacklightFeature>(this) :
FeatureCollection.Empty<IKeyboardDeviceFeature>();
FeatureSet.Create<IKeyboardDeviceFeature, FeatureAccessThroughReceiverKeyboard, IKeyboardBacklightFeature>(this) :
FeatureSet.Empty<IKeyboardDeviceFeature>();
}

public override DeviceCategory DeviceCategory => DeviceCategory.Keyboard;
Expand All @@ -689,7 +689,7 @@ public FeatureAccessThroughReceiverMouse(HidPlusPlusDevice.FeatureAccessThroughR

public override DeviceCategory DeviceCategory => DeviceCategory.Mouse;

IDeviceFeatureSet<IMouseDeviceFeature> IDeviceDriver<IMouseDeviceFeature>.Features => FeatureCollection.Empty<IMouseDeviceFeature>();
IDeviceFeatureSet<IMouseDeviceFeature> IDeviceDriver<IMouseDeviceFeature>.Features => FeatureSet.Empty<IMouseDeviceFeature>();
}
}

Expand Down
10 changes: 5 additions & 5 deletions Exo.Devices.Monitors/GenericMonitorDriver.cs
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ protected enum SupportedFeatures : ulong
AudioVolume = 0x00000008,
}

private sealed class MonitorFeatureCollection : IDeviceFeatureSet<IMonitorDeviceFeature>
private sealed class MonitorFeatureSet : IDeviceFeatureSet<IMonitorDeviceFeature>
{
private readonly GenericMonitorDriver _driver;
private Dictionary<Type, IMonitorDeviceFeature>? _cachedFeatureDictionary;
Expand All @@ -131,7 +131,7 @@ public int Count
}
}

public MonitorFeatureCollection(GenericMonitorDriver driver) => _driver = driver;
public MonitorFeatureSet(GenericMonitorDriver driver) => _driver = driver;

IMonitorDeviceFeature? IDeviceFeatureSet<IMonitorDeviceFeature>.this[Type type]
=> (_cachedFeatureDictionary ??= new(this))[type];
Expand Down Expand Up @@ -203,10 +203,10 @@ DeviceConfigurationKey configurationKey
_deviceId = deviceId;

_genericFeatures = configurationKey.UniqueId is not null ?
FeatureCollection.Create<IGenericDeviceFeature, GenericMonitorDriver, IDeviceIdFeature, IDeviceSerialNumberFeature>(this) :
FeatureCollection.Create<IGenericDeviceFeature, GenericMonitorDriver, IDeviceIdFeature>(this);
FeatureSet.Create<IGenericDeviceFeature, GenericMonitorDriver, IDeviceIdFeature, IDeviceSerialNumberFeature>(this) :
FeatureSet.Create<IGenericDeviceFeature, GenericMonitorDriver, IDeviceIdFeature>(this);

_monitorFeatures = new MonitorFeatureCollection(this);
_monitorFeatures = new MonitorFeatureSet(this);
}

public override ValueTask DisposeAsync() => ValueTask.CompletedTask;
Expand Down
6 changes: 3 additions & 3 deletions Exo.Devices.NVidia/NVidiaGpuDriver.cs
Original file line number Diff line number Diff line change
Expand Up @@ -654,10 +654,10 @@ ImmutableArray<LightingZone> lightingZones
_lightingZones = lightingZones;
_gpu = gpu;
_lock = @lock;
_genericFeatures = FeatureCollection.Create<IGenericDeviceFeature, NVidiaGpuDriver, IDeviceIdFeature>(this);
_displayAdapterFeatures = FeatureCollection.Create<IDisplayAdapterDeviceFeature, NVidiaGpuDriver, IDisplayAdapterI2CBusProviderFeature>(this);
_genericFeatures = FeatureSet.Create<IGenericDeviceFeature, NVidiaGpuDriver, IDeviceIdFeature>(this);
_displayAdapterFeatures = FeatureSet.Create<IDisplayAdapterDeviceFeature, NVidiaGpuDriver, IDisplayAdapterI2CBusProviderFeature>(this);
_lightingZoneCollection = ImmutableCollectionsMarshal.AsArray(lightingZones)!.AsReadOnly();
_lightingFeatures = FeatureCollection.Create<ILightingDeviceFeature, NVidiaGpuDriver, ILightingControllerFeature, ILightingDeferredChangesFeature>(this);
_lightingFeatures = FeatureSet.Create<ILightingDeviceFeature, NVidiaGpuDriver, ILightingControllerFeature, ILightingDeferredChangesFeature>(this);
}

public override ValueTask DisposeAsync() => ValueTask.CompletedTask;
Expand Down
Loading

0 comments on commit e010c29

Please sign in to comment.