Table of Contents

Class MediaRecord

Namespace
Iot.Device.Ndef
Assembly
Iot.Device.Ndef.dll

Create a Media NDEF Record class

public class MediaRecord : NdefRecord
Inheritance
MediaRecord
Inherited Members

Constructors

MediaRecord(NdefRecord)

Create a Media Record from a NDEF Record

public MediaRecord(NdefRecord ndefRecord)

Parameters

ndefRecord NdefRecord

A valid NDEF Record

MediaRecord(string, SpanByte)

Create a Media Record from the type and the payload

public MediaRecord(string payloadType, SpanByte payload)

Parameters

payloadType string

The payload type

payload SpanByte

The byte payload

Properties

IsTextType

True if the payload is text based

public bool IsTextType { get; }

Property Value

bool

PayloadType

Returns the Media Payload type

public string PayloadType { get; set; }

Property Value

string

Methods

IsMediaRecord(NdefRecord)

Check if it's a valid Media Record

public static bool IsMediaRecord(NdefRecord ndefRecord)

Parameters

ndefRecord NdefRecord

A valid NDEF Record

Returns

bool

TryGetPayloadAsText(out string)

Try to get our the encoded text

public bool TryGetPayloadAsText(out string payloadAsText)

Parameters

payloadAsText string

The payload as a text

Returns

bool

True if success