Exemple #1
0
        protected override async Task SelectedIndexChangedAsync(ITashTaskHandlingStatus <ICacheckApplicationModel> status, string controlName, int selectedIndex, bool selectablesChanged)
        {
            if (selectedIndex < 0)
            {
                return;
            }

            SimpleLogger.LogInformation($"Changing selected index for {controlName} to {selectedIndex}");
            switch (controlName)
            {
            default:
                var errorMessage = $"Do not know how to select for {status.TaskBeingProcessed.ControlName}";
                SimpleLogger.LogInformation($"Communicating 'BadRequest' to remote controlling process ({errorMessage})");
                await TashCommunicator.ChangeCommunicateAndShowProcessTaskStatusAsync(status, ControllableProcessTaskStatus.BadRequest, false, "", errorMessage);

                break;
            }
        }
Exemple #2
0
        protected override async Task ProcessSingleTaskAsync(ITashTaskHandlingStatus <ICacheckApplicationModel> status)
        {
            using (SimpleLogger.BeginScope(SimpleLoggingScopeId.Create(nameof(TashAccessor), LogId))) {
                var s = string.IsNullOrEmpty(status.TaskBeingProcessed.ControlName)
                    ? $"Processing a task of type {status.TaskBeingProcessed.Type} in {nameof(TashHandler)}"
                    : $"Processing a task of type {status.TaskBeingProcessed.Type} on {status.TaskBeingProcessed.ControlName} in {nameof(TashHandler)}";
                SimpleLogger.LogInformation(s);

                switch (status.TaskBeingProcessed.Type)
                {
                case ControllableProcessTaskType.Reset:
                    await TashCommunicator.CommunicateAndShowCompletedOrFailedAsync(status, false, "");

                    break;

                default:
                    await base.ProcessSingleTaskAsync(status);

                    break;
                }
            }
        }