public async Task UploadFile(IFileListEntry[] files)
        {
            var file = files.FirstOrDefault();

            var(state, stateDisplay, validFile, filename) = CheckFile(file);

            ApplicationState.ProcessingState   = state;
            ApplicationState.Filename          = filename;
            ApplicationState.InputStateDisplay = stateDisplay;
            ApplicationState.ShowReport        = false;
            ApplicationState.BadgeErrorCount   = 0;
            ApplicationState.SelectedTab       = 0;


            if (validFile)
            {
                var(processingStateProcess, processedPayload) = await ProcessFile(file, (processState, processDisplay) =>
                {
                    ApplicationState.ProcessingState   = processState;
                    ApplicationState.InputStateDisplay = processDisplay;
                });

                if (processingStateProcess == ProcessingStatus.ParsingFinished)
                {
                    ApplicationState.ProcessingState   = ProcessingStatus.CompilingReport;
                    ApplicationState.InputStateDisplay = "Compiling report ...";

                    ApplicationState.BadgeErrorCount = ParserService.GetErrorCount();
                    ApplicationState.SelectedTab     = 0;
                    ApplicationState.ShowReport      = true;
                }
            }
        }