C# Class BackgroundTasks.LightControllerVoiceCommandService

Handler for background Cortana interactions with Hue.
Inheritance: IBackgroundTask
Show file Open project: Microsoft/Windows-appsample-huelightcontroller

Public Methods

Method Description
Run ( IBackgroundTaskInstance taskInstance ) : void

Entry point for the background task.

Private Methods

Method Description
ChangeLightStateAsync ( ) : System.Threading.Tasks.Task

Handles the command to change the state of all the lights.

ChangeSpecificLightStateAsync ( ) : System.Threading.Tasks.Task

Handles the command to change the state of a specific light.

CreateCortanaResponse ( string message ) : VoiceCommandResponse

Helper method for creating a message for Cortana to speak and write to the user.

ExecutePhrase ( Light light, string phrase ) : System.Threading.Tasks.Task

Converts a phrase to a light command and executes it.

InitializeAsync ( AppServiceTriggerDetails triggerDetails ) : Task

Helper method for initalizing the voice service, bridge, and lights. Returns if successful.

SelectColorAsync ( ) : System.Threading.Tasks.Task

Handles an interaction with Cortana where the user selects from randomly chosen colors to change the lights to.

Method Details

Run() public method

Entry point for the background task.
public Run ( IBackgroundTaskInstance taskInstance ) : void
taskInstance IBackgroundTaskInstance
return void