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
ndefRecord
NdefRecordA valid NDEF Record
TextRecord(SpanByte)
Create a Text Record from a span of bytes
public TextRecord(SpanByte record)
Parameters
record
SpanByteThe 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
text
stringThe text payload
language
stringThe language of the text
encoding
EncodingThe 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
ndefRecord
NdefRecordThe NDEF Record to check
Returns
- bool
True if it's a valid Text Record