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

            return(msg);
        }
コード例 #2
0
        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);
        }
コード例 #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);
        }
コード例 #4
0
ファイル: MaintenanceHub.cs プロジェクト: tomhydra/spark
        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);
        }