Ejemplo n.º 1
0
 protected TrezorManagerBrokerBase(EnterPinArgs enterPinArgs, EnterPinArgs enterPassphraseArgs, int?pollInterval, ICoinUtility coinUtility)
 {
     EnterPinArgs        = enterPinArgs;
     EnterPassphraseArgs = enterPassphraseArgs;
     CoinUtility         = coinUtility;
     PollInterval        = pollInterval;
 }
Ejemplo n.º 2
0
 protected TrezorManagerBase(EnterPinArgs enterPinCallback, EnterPinArgs enterPassphraseCallback, IDevice device, ICoinUtility coinUtility)
 {
     CoinUtility              = coinUtility;
     _EnterPinCallback        = enterPinCallback;
     _EnterPassphraseCallback = enterPassphraseCallback;
     Device = device ?? throw new ArgumentNullException(nameof(device));
 }
Ejemplo n.º 3
0
 public LedgerManagerBroker(int?pollInterval, ICoinUtility coinUtility, ErrorPromptDelegate errorPromptDelegate, ILedgerManagerFactory ledgerManagerFactory)
 {
     CoinUtility          = coinUtility;
     PollInterval         = pollInterval;
     ErrorPromptDelegate  = errorPromptDelegate;
     LedgerManagerFactory = ledgerManagerFactory;
 }
Ejemplo n.º 4
0
 public LedgerManager(IHandlesRequest ledgerManagerTransport, ICoinUtility coinUtility, ErrorPromptDelegate errorPrompt)
 {
     ErrorPrompt    = errorPrompt;
     RequestHandler = ledgerManagerTransport;
     CoinUtility    = coinUtility ?? new DefaultCoinUtility();
     SetCoinNumber(0);
 }
Ejemplo n.º 5
0
        public LedgerManager(IHidDevice ledgerHidDevice, ICoinUtility coinUtility)
        {
            LedgerHidDevice = ledgerHidDevice;
            CoinUtility     = coinUtility ?? new DefaultCoinUtility();

            SetCoinNumber(60);
        }
Ejemplo n.º 6
0
        public LedgerManager(IDevice ledgerHidDevice, ICoinUtility coinUtility, ErrorPromptDelegate errorPrompt)
        {
            ErrorPrompt = errorPrompt;

            LedgerHidDevice = ledgerHidDevice;

            CoinUtility = coinUtility ?? new DefaultCoinUtility();

            SetCoinNumber(0);
        }
Ejemplo n.º 7
0
        public LedgerManager(IHidDevice ledgerHidDevice, ICoinUtility coinUtility)
        {
            LedgerHidDevice = ledgerHidDevice;
            CoinUtility     = coinUtility;

            if (CoinUtility == null)
            {
                CoinUtility = new DefaultCoinUtility();
            }

            SetCoinNumber(0);
        }
Ejemplo n.º 8
0
 protected TrezorManagerBase(
     EnterPinArgs enterPinCallback,
     EnterPinArgs enterPassphraseCallback,
     IDevice device,
     ILogger <TrezorManagerBase <TMessageType> > logger = null,
     ICoinUtility coinUtility = null)
 {
     CoinUtility              = coinUtility ?? DefaultCoinUtility.Instance;
     _EnterPinCallback        = enterPinCallback;
     _EnterPassphraseCallback = enterPassphraseCallback;
     Device = device ?? throw new ArgumentNullException(nameof(device));
     Logger = (ILogger)logger ?? NullLogger.Instance;
 }
Ejemplo n.º 9
0
 public TrezorManager(
     EnterPinArgs enterPinCallback,
     EnterPinArgs enterPassphraseCallback,
     IDevice trezorDevice,
     ILogger <TrezorManager> logger = null,
     ICoinUtility coinUtility       = null) : base(
         enterPinCallback,
         enterPassphraseCallback,
         trezorDevice,
         logger,
         coinUtility)
 {
 }
Ejemplo n.º 10
0
        protected TrezorManagerBase(EnterPinArgs enterPinCallback, IHidDevice hidDevice, ICoinUtility coinUtility)
        {
            CoinUtility = coinUtility;

            if (hidDevice == null)
            {
                throw new ArgumentNullException(nameof(hidDevice));
            }

            hidDevice.Connected += HidDevice_Connected;

            _EnterPinCallback = enterPinCallback;
            _HidDevice        = hidDevice;
        }
Ejemplo n.º 11
0
        public LedgerManager(IHidDevice ledgerHidDevice, ICoinUtility coinUtility, ErrorPromptDelegate errorPrompt)
        {
            ErrorPrompt = errorPrompt;

            LedgerHidDevice = ledgerHidDevice;
            CoinUtility     = coinUtility;

            if (CoinUtility == null)
            {
                CoinUtility = new DefaultCoinUtility();
            }

            SetCoinNumber(0);
        }
Ejemplo n.º 12
0
 public TrezorManagerBroker(
     EnterPinArgs enterPinArgs,
     EnterPinArgs enterPassphraseArgs,
     int?pollInterval,
     IDeviceFactory deviceFactory,
     ICoinUtility coinUtility     = null,
     ILoggerFactory loggerFactory = null
     ) : base(
         enterPinArgs,
         enterPassphraseArgs,
         pollInterval,
         deviceFactory,
         coinUtility,
         loggerFactory)
 {
 }
Ejemplo n.º 13
0
        protected TrezorManagerBrokerBase(
            EnterPinArgs enterPinArgs,
            EnterPinArgs enterPassphraseArgs,
            int?pollInterval,
            IDeviceFactory deviceFactory,
            ICoinUtility coinUtility     = null,
            ILoggerFactory loggerFactory = null)
        {
            EnterPinArgs        = enterPinArgs;
            EnterPassphraseArgs = enterPassphraseArgs;
            CoinUtility         = coinUtility ?? new DefaultCoinUtility();
            PollInterval        = pollInterval;
            LoggerFactory       = loggerFactory;


            _DeviceListener = new DeviceListener(deviceFactory, PollInterval, loggerFactory);
            _DeviceListener.DeviceDisconnected += DevicePoller_DeviceDisconnected;
            _DeviceListener.DeviceInitialized  += DevicePoller_DeviceInitialized;
        }
Ejemplo n.º 14
0
 public LedgerManagerBroker(int?pollInterval, ICoinUtility coinUtility, ErrorPromptDelegate errorPromptDelegate)
 {
     CoinUtility         = coinUtility;
     PollInterval        = pollInterval;
     ErrorPromptDelegate = errorPromptDelegate;
 }
Ejemplo n.º 15
0
 public IManagesLedger GetNewLedgerManager(IDevice ledgerHidDevice, ICoinUtility coinUtility, ErrorPromptDelegate errorPrompt)
 {
     return(new LedgerManager(MockLedgerManagerTransport, null, _PromptDelegate));
 }
Ejemplo n.º 16
0
 public TrezorManager(EnterPinArgs enterPinCallback, IDevice trezorHidDevice, ICoinUtility coinUtility) : base(enterPinCallback, trezorHidDevice, coinUtility)
 {
 }
 public IManagesLedger GetNewLedgerManager(IDevice ledgerHidDevice, ICoinUtility coinUtility, ErrorPromptDelegate errorPrompt)
 {
     return(new LedgerManager(new LedgerManagerTransport(ledgerHidDevice), coinUtility, errorPrompt));
 }
Ejemplo n.º 18
0
 public TrezorManager(EnterPinArgs enterPinCallback, EnterPinArgs enterPassphraseCallback, IDevice trezorDevice, ICoinUtility coinUtility) : base(enterPinCallback, enterPassphraseCallback, trezorDevice, coinUtility)
 {
 }
Ejemplo n.º 19
0
 public LedgerManager(IDevice ledgerHidDevice, ICoinUtility coinUtility) : this(ledgerHidDevice, coinUtility, null)
 {
 }
Ejemplo n.º 20
0
 public TrezorManagerBroker(EnterPinArgs enterPinArgs, EnterPinArgs enterPassphraseArgs, int?pollInterval, ICoinUtility coinUtility) : base(enterPinArgs, enterPassphraseArgs, pollInterval, coinUtility)
 {
 }