Dargon.Nest.DevelopmentUtilities.CliProgressSpinner.Render C# (CSharp) Method

Render() public method

public Render ( ) : void
return void
        public void Render()
        {
            using (new ConsolePosition(x, y)) {
            var w = Console.BufferWidth;
            string progress = status ?? ("-\\|/"[(DateTime.Now.Millisecond / 125) % 4] + "");
            if (taskName.Length + progress.Length > w) {
               var finalLength = Math.Max(0, w - taskName.Length);
               progress = progress.Substring(progress.Length - finalLength);
            }
            Console.Write(taskName.PadRight(w - progress.Length) + progress);
             }
        }