Lamp.FromIdAsync(String) Method

Definition

Gets a Lamp object representing the lamp device with the specified ID.

public:
 static IAsyncOperation<Lamp ^> ^ FromIdAsync(Platform::String ^ deviceId);
/// [Windows.Foundation.Metadata.RemoteAsync]
 static IAsyncOperation<Lamp> FromIdAsync(winrt::hstring const& deviceId);
[Windows.Foundation.Metadata.RemoteAsync]
public static IAsyncOperation<Lamp> FromIdAsync(string deviceId);
function fromIdAsync(deviceId)
Public Shared Function FromIdAsync (deviceId As String) As IAsyncOperation(Of Lamp)

Parameters

deviceId
String

Platform::String

winrt::hstring

The ID of the requested lamp device.

Returns

An asynchronous operation that returns a Lamp object upon successful completion.

Attributes

Remarks

Use GetDefaultAsync to get the default lamp for a device. Enumerate lamp devices by passing the class selection string returned by the GetDeviceSelector method to the FindAllAsync or CreateWatcher method. Once retrieved, use the DeviceId property to retrieve the ID for the associated lamp.

Applies to