private NDefTypeNameFormat GetTypeNameFormat(NFCTypeNameFormat nativeRecordTypeNameFormat) { switch (nativeRecordTypeNameFormat) { case NFCTypeNameFormat.AbsoluteUri: return(NDefTypeNameFormat.AbsoluteUri); case NFCTypeNameFormat.Empty: return(NDefTypeNameFormat.Empty); case NFCTypeNameFormat.NFCExternal: return(NDefTypeNameFormat.External); case NFCTypeNameFormat.Media: return(NDefTypeNameFormat.Media); case NFCTypeNameFormat.Unchanged: return(NDefTypeNameFormat.Unchanged); case NFCTypeNameFormat.Unknown: return(NDefTypeNameFormat.Unknown); case NFCTypeNameFormat.NFCWellKnown: return(NDefTypeNameFormat.WellKnown); } return(NDefTypeNameFormat.Unknown); }
private static string ParseRecordType(NFCTypeNameFormat format, string ndefType) { switch (format) { case NFCTypeNameFormat.Empty: return(NdefRecordType.Empty); case NFCTypeNameFormat.NFCWellKnown: switch (ndefType) { case "T": return(NdefRecordType.Text); case "U": return(NdefRecordType.Url); case "Sp": return(NdefRecordType.SmartPoster); default: return(":" + ndefType); } case NFCTypeNameFormat.Media: return(NdefRecordType.Mime); case NFCTypeNameFormat.AbsoluteUri: return(NdefRecordType.AbsoluteUri); case NFCTypeNameFormat.NFCExternal: return(ndefType); default: return(NdefRecordType.Unknown); } }