I have a console application written in C# which processes some data then prints the results. Until the results are available there is a little animation ( / - \ | ) and progress percentage ( xx% ) which is constantly updating.
Obviously if the user redirects the output of my application this will be printed to the text file where output is redirected to. If possible I would like to avoid this.
So is there a way to detect if the output of my application is redirected? (if not I will close the question).
I am considering only showing the progress indicators when run with a specified parameter, but I'm hoping someone will have a good answer for me :)
Any input is appreciated, thank you :)