@@ -25,7 +25,7 @@ public abstract class AbstractRGBDeviceProvider : IRGBDeviceProvider
2525 /// <summary>
2626 /// The list of devices managed by this device-provider.
2727 /// </summary>
28- protected List < IRGBDevice > InternalDevices { get ; } = new ( ) ;
28+ protected List < IRGBDevice > InternalDevices { get ; } = [ ] ;
2929
3030 /// <inheritdoc />
3131 public virtual IReadOnlyList < IRGBDevice > Devices => new ReadOnlyCollection < IRGBDevice > ( InternalDevices ) ;
@@ -34,7 +34,7 @@ public abstract class AbstractRGBDeviceProvider : IRGBDeviceProvider
3434 /// Gets the dictionary containing the registered update triggers.
3535 /// Normally <see cref="UpdateTriggers"/> should be used to access them.
3636 /// </summary>
37- protected Dictionary < int , IDeviceUpdateTrigger > UpdateTriggerMapping { get ; } = new ( ) ;
37+ protected Dictionary < int , IDeviceUpdateTrigger > UpdateTriggerMapping { get ; } = [ ] ;
3838
3939 /// <inheritdoc />
4040 public IReadOnlyList < ( int id , IDeviceUpdateTrigger trigger ) > UpdateTriggers => new ReadOnlyCollection < ( int id , IDeviceUpdateTrigger trigger ) > ( UpdateTriggerMapping . Select ( x => ( x . Key , x . Value ) ) . ToList ( ) ) ;
@@ -116,7 +116,7 @@ protected virtual IEnumerable<IRGBDevice> GetLoadedDevices(RGBDeviceType loadFil
116116 {
117117 if ( _isDisposed ) throw new ObjectDisposedException ( GetType ( ) . FullName ) ;
118118
119- List < IRGBDevice > devices = new ( ) ;
119+ List < IRGBDevice > devices = [ ] ;
120120 foreach ( IRGBDevice device in LoadDevices ( ) )
121121 {
122122 try
@@ -189,7 +189,7 @@ protected virtual void Reset()
189189 foreach ( IRGBDevice device in Devices )
190190 device . Dispose ( ) ;
191191
192- List < IRGBDevice > devices = new ( InternalDevices ) ;
192+ List < IRGBDevice > devices = [ .. InternalDevices ] ;
193193 foreach ( IRGBDevice device in devices )
194194 RemoveDevice ( device ) ;
195195
0 commit comments