Ejemplo n.º 1
0
        public static FreefareTag AsFreefareTag(this NfcTarget target)
        {
            if (target == null)
            {
                throw new ArgumentNullException(nameof(target));
            }
            IntPtr ptrTag = NativeMethods.freefare_tag_new(target.Device.DangerousGetHandle(), target.Handle);

            if (ptrTag == IntPtr.Zero)
            {
                Console.WriteLine("A");
                return(null);
            }
            FreefareTag tag = FreefareTag.Build(ptrTag, true, target.Device, target);

            return(tag);
        }
Ejemplo n.º 2
0
 public static bool IsNTag21x(this FreefareTag tag)
 {
     return(NativeMethods.is_ntag21x(tag.Handle));
 }