Пример #1
0
 public HwiDeviceClient(HwiClient hwiClient, DeviceSelector deviceSelector, HardwareWalletModels model, HDFingerprint?fingerprint)
 {
     HwiClient      = hwiClient ?? throw new ArgumentNullException(nameof(hwiClient));
     DeviceSelector = deviceSelector ?? throw new ArgumentNullException(nameof(deviceSelector));
     Model          = model;
     Fingerprint    = fingerprint;
 }
Пример #2
0
        private Task <string> SendCommandAsync(HwiCommands?command = null, string[] commandArguments = null, CancellationToken cancellationToken = default)
        {
            List <HwiOption> options = new List <HwiOption>();

            if (!string.IsNullOrEmpty(Password))
            {
                options.Add(HwiOption.Password(Password));
            }
            return(HwiClient.SendCommandAsync(DeviceSelector, options, command, commandArguments, cancellationToken));
        }
Пример #3
0
 private Task<string> SendCommandAsync(HwiCommands? command = null, string[] commandArguments = null, CancellationToken cancellationToken = default)
 {
     return HwiClient.SendCommandAsync(DeviceSelector, null, command, commandArguments, cancellationToken);
 }