15 public abstract class NfcInterface(Tag Tag, BasicTagTechnology Technology) :
INfcInterface
20 protected readonly Tag tag = Tag;
25 protected readonly BasicTagTechnology technology = Technology;
27 private bool isDisposed;
42 public async Task OpenIfClosed()
44 if (!this.technology.IsConnected)
45 await this.technology.ConnectAsync();
51 public void CloseIfOpen()
53 if (this.technology.IsConnected)
54 this.technology.Close();
63 GC.SuppressFinalize(
this);
69 protected virtual void Dispose(
bool Disposing)
77 this.technology.Dispose();
81 this.isDisposed =
true;
88 internal static IOException UnableToReadDataFromDevice()
90 return new IOException(
"Unable to read data from device.");
Specific Interface (technology) for communication with an NFC Tag.
Interface for an NFC Tag.