Ejemplo n.º 1
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="tag"></param>
        /// <returns></returns>
        INFCNdefTag GetNdefTag(INFCTag tag)
        {
            if (tag == null || !tag.Available)
            {
                return(null);
            }

            INFCNdefTag ndef;

            if (tag.GetNFCMiFareTag() != null)
            {
                ndef = tag.GetNFCMiFareTag();
            }
            else if (tag.GetNFCIso7816Tag() != null)
            {
                ndef = tag.GetNFCIso7816Tag();
            }
            else if (tag.GetNFCFeliCaTag() != null)
            {
                ndef = tag.GetNFCFeliCaTag();
            }
            else
            {
                ndef = null;
            }

            return(ndef);
        }
Ejemplo n.º 2
0
        public static INFCNdefTag GetNdefTag(INFCTag tag)
        {
            if (tag == null /*|| !tag.Available*/)
            {
                return(null);
            }
            NFCTagType tp = (NFCTagType)tag.Type;

            INFCNdefTag ndef;

            if (tag.GetNFCMiFareTag() != null)
            {
                ndef = tag.GetNFCMiFareTag();
            }
            else if (tag.GetNFCIso7816Tag() != null)
            {
                ndef = tag.GetNFCIso7816Tag();
            }
            else if (tag.GetNFCFeliCaTag() != null)
            {
                ndef = tag.GetNFCFeliCaTag();
            }
            else
            {
                ndef = null;
            }

            return(ndef);
        }