/// <summary> /// Launch a direct method on a set of devices /// </summary> //// <param name="devices">List of device ids</param> /// <returns>True if the masstransit publish command has succeeded</returns> public async Task <bool> LaunchDevicesDirectMethods(DevicesLaunchDirectMethodModel devices) { await _serviceBus.BusAccess.Publish(new IoTDevicesDirectMethodRequestedEvent() { DeviceIds = devices.DeviceIds, MethodName = devices.MethodName, MethodPayload = devices.Payload }); return(true); }
public async Task <IActionResult> LaunchDevicesDirectMethod(DevicesLaunchDirectMethodModel devices) { var result = await _iotHubControllerDataManager.LaunchDevicesDirectMethods(devices); return(Ok(result)); }