Exemple #1
0
        private async Task <string> MoveGarage(IGarage garage, Intent intent)
        {
            var action        = intent.Slots["action"].Resolution?.Authorities.FirstOrDefault()?.Values.FirstOrDefault()?.Value.Id;
            var currentStatus = await garage.GetGarageStatus();

            if (currentStatus.ToString() == action)
            {
                return($"Garage is already {ConvertStatus(currentStatus)}");
            }
            await garage.ToggleGarage();

            return($"Garage is {action}ing");
        }