Class CommonUtils
Common utility methods. May be useful when developing simulator connectors
public static class CommonUtils
- Inheritance
-
CommonUtils
- Inherited Members
Methods
FormatDuration(TimeSpan)
Format a duration of a TimeSpan in a human readable format
public static string FormatDuration(TimeSpan duration)
Parameters
durationTimeSpanDuration to format
Returns
- string
Formatted duration
GetAssemblyVersion()
Returns the assembly version
public static string GetAssemblyVersion()
Returns
RunAll(IEnumerable<Task>, CancellationTokenSource)
Run all of the tasks in this enumeration. If any fail or is canceled, cancel the remaining tasks and return. The first found exception is thrown
public static Task RunAll(this IEnumerable<Task> tasks, CancellationTokenSource tokenSource)
Parameters
tasksIEnumerable<Task>List of tasks to run
tokenSourceCancellationTokenSourceSource of cancellation tokens