Skip to content

Commit

Permalink
Revert using removal
Browse files Browse the repository at this point in the history
  • Loading branch information
DennisDyallo committed Aug 13, 2024
1 parent 4d6580a commit d40d837
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions Yubico.Core/src/Yubico/Core/Devices/Hid/MacOSHidDevice.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,18 +18,19 @@
using System.Linq;
using Microsoft.Extensions.Logging;
using Yubico.PlatformInterop;
using Yubico.Core.Logging;

using static Yubico.PlatformInterop.NativeMethods;

namespace Yubico.Core.Devices.Hid
{
/// <summary>
/// macOS implementation of a Human Interface Device (HID)
/// MacOS implementation of a Human Interface Device (HID)
/// </summary>
internal class MacOSHidDevice : HidDevice
{
private readonly long _entryId;
private readonly ILogger _log = Logging.Log.GetLogger<MacOSHidDevice>();
private readonly ILogger _log = Log.GetLogger<MacOSHidDevice>();

public MacOSHidDevice(long entryId) :
base(entryId.ToString(CultureInfo.InvariantCulture))
Expand All @@ -49,7 +50,7 @@ public MacOSHidDevice(long entryId) :
/// </returns>
public static IEnumerable<HidDevice> GetList()
{
ILogger log = Logging.Log.GetLogger(typeof(MacOSHidDevice).FullName!);
ILogger log = Log.GetLogger(typeof(MacOSHidDevice).FullName!);
using IDisposable? logScope = log.BeginScope("MacOSHidDevice.GetList()");

IntPtr manager = IntPtr.Zero;
Expand Down Expand Up @@ -116,7 +117,7 @@ public override IHidConnection ConnectToIOReports() =>

internal static long GetEntryId(IntPtr device)
{
ILogger log = Logging.Log.GetLogger(typeof(MacOSHidDevice).FullName!);
ILogger log = Log.GetLogger(typeof(MacOSHidDevice).FullName!);

int service = IOHIDDeviceGetService(device);
kern_return_t result = IORegistryEntryGetRegistryEntryID(service, out long entryId);
Expand Down

0 comments on commit d40d837

Please sign in to comment.