示例#1
0
        public Task StartReadingAsync()
        {
            Task.Run(() =>
            {
                System.Threading.Thread.Sleep(_delay);

                if (_tag == null)
                {
                    TagDetected?.Invoke(NfcTagFake.RandomTextRecord());
                }
                else
                {
                    TagDetected?.Invoke(_tag);
                }
            });


            return(Task.CompletedTask);
        }
示例#2
0
 public NfcReadeFake(int delay, NfcTagFake tag)
 {
     _delay = delay;
     _tag   = tag;
 }
 public NfcReaderFakeFactory(int timeout, NfcTagFake tag)
 {
     _delay = timeout;
     _tag   = tag;
 }