Skip to content

Commit

Permalink
Make device subclass constructors internal
Browse files Browse the repository at this point in the history
  • Loading branch information
mfakane committed May 5, 2019
1 parent bf4e60a commit f6c3c09
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion RawInput.Sharp/RawInputDigitizer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ public class RawInputDigitizer : RawInputHid

public int MaxContactCount => Reader.ValueSets.SelectMany(x => x).FirstOrDefault(x => x.LinkUsageAndPage == UsageAndPage && x.UsageAndPage == UsageContactCount)?.MaxValue ?? 1;

public RawInputDigitizer(RawInputDeviceHandle device, RawInputDeviceInfo deviceInfo)
internal RawInputDigitizer(RawInputDeviceHandle device, RawInputDeviceInfo deviceInfo)
: base(device, deviceInfo)
{
if (!IsSupported(deviceInfo.Hid.UsageAndPage)) throw new ArgumentException($"UsagePage and Usage {deviceInfo.Hid.UsageAndPage} is not supported as a digitizer.", nameof(deviceInfo));
Expand Down
2 changes: 1 addition & 1 deletion RawInput.Sharp/RawInputHid.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public class RawInputHid : RawInputDevice

public HidReader Reader => hidReader.Value;

public RawInputHid(RawInputDeviceHandle device, RawInputDeviceInfo deviceInfo)
internal RawInputHid(RawInputDeviceHandle device, RawInputDeviceInfo deviceInfo)
: base(device, deviceInfo)
{
if (deviceInfo.Type != RawInputDeviceType.Hid) throw new ArgumentException($"Device type must be {RawInputDeviceType.Hid}.", nameof(deviceInfo));
Expand Down
2 changes: 1 addition & 1 deletion RawInput.Sharp/RawInputKeyboard.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public class RawInputKeyboard : RawInputDevice
public int IndicatorCount => DeviceInfo.Keyboard.IndicatorCount;
public int TotalKeyCount => DeviceInfo.Keyboard.TotalKeyCount;

public RawInputKeyboard(RawInputDeviceHandle device, RawInputDeviceInfo deviceInfo)
internal RawInputKeyboard(RawInputDeviceHandle device, RawInputDeviceInfo deviceInfo)
: base(device, deviceInfo)
{
if (deviceInfo.Type != RawInputDeviceType.Keyboard) throw new ArgumentException($"Device type must be {RawInputDeviceType.Keyboard}", nameof(deviceInfo));
Expand Down
2 changes: 1 addition & 1 deletion RawInput.Sharp/RawInputMouse.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public class RawInputMouse : RawInputDevice
public int SampleRate => DeviceInfo.Mouse.SampleRate;
public bool HasHorizontalWheel => DeviceInfo.Mouse.HasHorizontalWheel;

public RawInputMouse(RawInputDeviceHandle device, RawInputDeviceInfo deviceInfo)
internal RawInputMouse(RawInputDeviceHandle device, RawInputDeviceInfo deviceInfo)
: base(device, deviceInfo)
{
if (deviceInfo.Type != RawInputDeviceType.Mouse) throw new ArgumentException($"Device type must be {RawInputDeviceType.Mouse}.", nameof(deviceInfo));
Expand Down

0 comments on commit f6c3c09

Please sign in to comment.