Skip to content

Commit

Permalink
Optional parameters and params are not a good idea
Browse files Browse the repository at this point in the history
  • Loading branch information
Christian Wischenbart committed Jun 22, 2019
1 parent 91de477 commit 649e617
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/StreamDeckSharp/StreamDeck.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,13 @@ public static class StreamDeck
/// </summary>
/// <returns>The default <see cref="IStreamDeckBoard"/> HID</returns>
/// <exception cref="StreamDeckNotFoundException">Thrown if no Stream Deck is found</exception>
public static IStreamDeckBoard OpenDevice(bool useWriteCache = true, params IUsbHidHardware[] hardware)
public static IStreamDeckBoard OpenDevice(params IUsbHidHardware[] hardware)
{
var dev = EnumerateDevices(hardware).FirstOrDefault();

if (dev is null)
throw new StreamDeckNotFoundException();

dev.UseWriteCache = useWriteCache;
return dev.Open();
}

Expand Down

0 comments on commit 649e617

Please sign in to comment.