Class TextRecord
Create a Text Record class
public class TextRecord : NdefRecord
- Inheritance
-
TextRecord
- Inherited Members
Constructors
TextRecord(NdefRecord)
Create a Text Record from a NDEF Record
public TextRecord(NdefRecord ndefRecord)
Parameters
ndefRecordNdefRecordA valid NDEF Record
TextRecord(SpanByte)
Create a Text Record from a span of bytes
public TextRecord(SpanByte record)
Parameters
recordSpanByteThe record as a span of bytes
TextRecord(string, string, Encoding)
Create a Text Record based on its characteristics
public TextRecord(string text, string language, Encoding encoding)
Parameters
textstringThe text payload
languagestringThe language of the text
encodingEncodingThe Encoding type. Encoding
Properties
Encoding
The Encoding type used for the text, only UTF8 and Unicode are valid
public Encoding Encoding { get; set; }
Property Value
LanguageCode
A valid language code, should be less than 63 characters
public string LanguageCode { get; set; }
Property Value
Text
The text payload
public string Text { get; set; }
Property Value
Methods
IsTextRecord(NdefRecord)
Check if it's a valid Text Record
public static bool IsTextRecord(NdefRecord ndefRecord)
Parameters
ndefRecordNdefRecordThe NDEF Record to check
Returns
- bool
True if it's a valid Text Record