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 )); }
public Task Initialize() { var port = new SerialPort(_devicePath); port.Open(); _mpos = new Mpos(port.BaseStream, _encryptionKey); return(_mpos.Initialize()); }
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)); }