Example #1
0
        private ImportProgressMessage Message(string message, int idx)
        {
            var msg = new ImportProgressMessage
            {
                Message  = message,
                Progress = (int)10 + (idx + 1) * 90 / ResourceCount
            };

            return(msg);
        }
        public async System.Threading.Tasks.Task SendProgressUpdate(int progress, string message)
        {
            _logger.LogInformation($"[{progress}%] {message}");

            _progress = progress;

            var msg = new ImportProgressMessage {
                Message = message, Progress = progress
            };

            await _hubContext.Clients.All.SendAsync("UpdateProgress", msg).ConfigureAwait(false);
        }
Example #3
0
        public async System.Threading.Tasks.Task SendProgressUpdate(string message, int progress)
        {
            _progress = progress;

            var msg = new ImportProgressMessage
            {
                Message  = message,
                Progress = progress
            };

            await Clients.All.SendAsync("UpdateProgress", msg);
        }
Example #4
0
        public async Task SendProgressUpdate(string message, int progress)
        {
            _logger.LogInformation($"[{progress}%] {message}");

            _progress = progress;

            var msg = new ImportProgressMessage
            {
                Message  = message,
                Progress = progress
            };

            await _hubContext.Clients.All.SendAsync("UpdateProgress", msg);
        }