Class TaskHandlerExtensions
Extension methods for ITaskHandler
public static class TaskHandlerExtensions
- Inheritance
-
objectTaskHandlerExtensions
Methods
OutputLow(ITaskHandler, string, string)
public static void OutputLow(this ITaskHandler handler, string title, string message)
Parameters
handlerITaskHandlerThe underlying ITaskHandler.
titlestringA title for the message.
messagestringThe string to display.
Remarks
Implementations may close the UI as a side effect. Therefore this should be your last call on the handler.
OutputLow<T>(ITaskHandler, string, NamedCollection<T>)
public static void OutputLow<T>(this ITaskHandler handler, string title, NamedCollection<T> data) where T : INamed
Parameters
handlerITaskHandlerThe underlying ITaskHandler.
titlestringA title for the data.INamed
dataNamedCollection<T>The data to display.
Type Parameters
T
Remarks
Implementations may close the UI as a side effect. Therefore this should be your last call on the handler.
OutputLow<T>(ITaskHandler, string, IEnumerable<T>)
public static void OutputLow<T>(this ITaskHandler handler, string title, IEnumerable<T> data)
Parameters
handlerITaskHandlerThe underlying ITaskHandler.
titlestringA title for the data.
dataIEnumerable<T>The data to display.
Type Parameters
T
Remarks
Implementations may close the UI as a side effect. Therefore this should be your last call on the handler.
RunTaskAndReturn<T>(ITaskHandler, ResultTask<T>)
Runs an IResultTask<T> and returns it's result once it has been completed.
public static T RunTaskAndReturn<T>(this ITaskHandler handler, ResultTask<T> task)
Parameters
handlerITaskHandlerThe task handler.
taskResultTask<T>The task to be run. (Run(CancellationToken, ICredentialProvider?, IProgress<TaskSnapshot>?) or equivalent is called on it.)
Returns
- T
The Result.
Type Parameters
T