Пример #1
0
        /// <summary>
        /// Команда для выполнения изменения настроек устройства.
        /// </summary>
        public void Setup([NotNull] DeviceSettings newSettings)
        {
            if (newSettings == null)
            {
                throw new ArgumentNullException(nameof(newSettings));
            }

            cashRegisterSettings = (CashRegisterSettings)newSettings;

            PluginContext.Log.InfoFormat("Device: '{0} ({1})' was setup", DeviceName, deviceId);
        }
        public ICashRegister Create(Guid deviceId, [NotNull] CashRegisterSettings settings)
        {
            if (settings == null)
            {
                throw new ArgumentNullException(nameof(settings));
            }

            var sampleCashRegister = new SampleCashRegister(deviceId, settings);

            return(sampleCashRegister);
        }
Пример #3
0
 public SampleCashRegister(Guid deviceId, CashRegisterSettings cashRegisterSettings)
 {
     this.deviceId             = deviceId;
     this.cashRegisterSettings = cashRegisterSettings;
 }
 public SampleCashRegisterSettings(CashRegisterSettings settings)
 {
     deviceSettings = settings;
 }