TypeWritterWriteColorLineTask(CancellationToken, String, Char, Int32, Int32) Method

Asynchronously writes colored text simulating a typewritter effect, and adds an empty line at the end.

Use *F##* as the start delimiter of the ForeColor, use *-F* as the end delimiter of the ForeColor.

Use *B##* as the start delimiter of the BackColor, use *-B* as the end delimiter of the BackColor.

Definition

Namespace: DevCase.Core.Application.Console
Assembly: DevCase.net48 (in DevCase.net48.dll) Version: 6.0.0.0 (6.0)
XMLNS for XAML: Not mapped to an xmlns.
public static Task WriteColorLineTask(
	CancellationToken cancellationToken,
	string text,
	char[] delimiters,
	int typeSpeed = 75,
	int pauseDuration = 400
)

Parameters

cancellationToken  CancellationToken
A CancellationToken that you must use to cancel this Task.
text  String
The color-delimited text to write.
delimiters  Char
A set of 1 or 2 delimiters to parse the color-delimited string.
typeSpeed  Int32  (Optional)
The typying speed, in ms.
pauseDuration  Int32  (Optional)
The pause duration of the punctuation characters, in ms.

Return Value

Task
A Task object to asynchronously write colored text simulating a typewritter effect.

Example

This is a code example.
C#
No code example is currently available or this language may not be supported.

See Also