MifareClassic.RestoreAsync(Int32) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Copies a value block to the tag's temporary block on a thread-pool thread.
public System.Threading.Tasks.Task RestoreAsync(int blockIndex);
member this.RestoreAsync : int -> System.Threading.Tasks.Task
Parameters
- blockIndex
- Int32
The zero-based index of the source value block, from 0 through 255. The block must be available on the tag.
Returns
A task that represents the restore operation.
Remarks
This managed wrapper uses Task.Run to call Restore(Int32). Connect and authenticate the block's sector first. Await the task, then use TransferAsync(Int32) to copy the temporary value to a value block.
The synchronous method's connection, access, and NFC permission requirements apply. The method has no cancellation-token parameter. Calling Close() from another thread cancels blocked I/O with IOException. Exceptions from the synchronous call are reported through the task.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.