Exemple #1
0
        public void Dispose()
        {
            mpos?.Dispose();
            mpos = null;

            device?.Close();
        }
 public static Error UpdateTables(Mpos mpos, MposTablesLoadedCallbackDelegate tableCallback, Aid[] aidList, Capk[] capkList)
 {
     return(Dll.UpdateTables(
                mpos.nativeMpos, mpos.TMSStorage.GetGlobalVersion(), true,
                tableCallback, aidList, capkList
                ));
 }
Exemple #3
0
        public Task Initialize()
        {
            var port = new SerialPort(_devicePath);

            port.Open();

            _mpos = new Mpos(port.BaseStream, _encryptionKey);

            return(_mpos.Initialize());
        }
Exemple #4
0
        public Task Open(InitializationOptions options)
        {
            device = options.Device;
            var stream = device.Open(options.BaudRate);

            mpos = new mpos(stream, options.EncryptionKey, options.StoragePath);

            mpos.Errored += errored;

            onError = options.OnError;

            return(Task.Run(mpos.Initialize));
        }