Class TaskHandlerExtensions
Extension methods for ITaskHandler
public static class TaskHandlerExtensions
- Inheritance
-
TaskHandlerExtensions
Methods
OutputLow(ITaskHandler, string, string)
public static void OutputLow(this ITaskHandler handler, string title, string message)
Parameters
handler
ITaskHandlerThe underlying ITaskHandler.
title
stringA title for the message.
message
stringThe 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
handler
ITaskHandlerThe underlying ITaskHandler.
title
stringA title for the data.INamed
data
NamedCollection<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
handler
ITaskHandlerThe underlying ITaskHandler.
title
stringA title for the data.
data
IEnumerable<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
handler
ITaskHandlerThe task handler.
task
ResultTask<T>The task to be run. (Run(CancellationToken, ICredentialProvider?, IProgress<TaskSnapshot>?) or equivalent is called on it.)
Returns
- T
The Result.
Type Parameters
T
Exceptions
- OperationCanceledException
The user canceled the task.
- IOException
The task ended with IOError.
- WebException
The task ended with WebError.