You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
AnsiConsole.Progress().AutoRefresh(false)// Turn off auto refresh.AutoClear(false)// Do not remove the task list when done.HideCompleted(false)// Hide tasks as they are completed.Start(ctx =>{vartask1= ctx.AddTask("[green]Parsing facWalk files:[/]",true, facWalkFiles.Count);vartask2= ctx.AddTask("[green]Parsing mes files:[/]",true, mesFiles.Count);vartask3= ctx.AddTask("[green]Parsing sector files:[/]",true, secFiles.Count);while(!ctx.IsFinished){foreach(var file in facWalkFiles){ ParseAndWriteFile(file, FileType.FacadeWalk,dirPath+@"\out\"); task1.Increment(_facadeWalksRed);}foreach(var file in mesFiles){ ParseAndWriteFile(file, FileType.Message,dirPath+@"\out\"); task2.Increment(_messagesRed);}foreach(var file in secFiles){ ParseAndWriteFile(file, FileType.Sector,dirPath+@"\out\"); task3.Increment(_sectorsRed);}}});
Any of the files.Count may be 0 which should imply that the task is done and no calculation of percentage is needed,
however it claims that percentage is NaN which implies 0.0/0.0, why is there need to calculate percentage on tasks which are done already? Can there exist a task which is done and yet its percentage is different from 100%?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
So lets say I want to use progress like this.
Any of the files.Count may be 0 which should imply that the task is done and no calculation of percentage is needed,
however it claims that percentage is NaN which implies 0.0/0.0, why is there need to calculate percentage on tasks which are done already? Can there exist a task which is done and yet its percentage is different from 100%?
Beta Was this translation helpful? Give feedback.
All reactions