ClaimedMagneticStripeReader.EnableAsync 方法

定义

使磁条读取器进入就绪状态以接收数据事件。

public:
 virtual IAsyncAction ^ EnableAsync() = EnableAsync;
/// [Windows.Foundation.Metadata.RemoteAsync]
IAsyncAction EnableAsync();
[Windows.Foundation.Metadata.RemoteAsync]
public IAsyncAction EnableAsync();
function enableAsync()
Public Function EnableAsync () As IAsyncAction

返回

此方法在完成时不会返回任何对象或值。

属性

示例

// Enables the magnetic stripe reader to receive data.
task<void> Scenario1::EnableReader()
{
    return create_task(_claimedReader->EnableAsync()).then([this](void)
    {
        // UpdateReaderStatusTextBlock("Magnetic stripe reader enabled successfully.");
    });

}
    // Enables the magnetic stripe reader to receive data
    private async Task<bool> EnableReader()
    {

        await _claimedReader.EnableAsync();
        return true;
    }

适用于

另请参阅