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
handlerITaskHandlertitlestringA 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 : notnull, INamed
Parameters
handlerITaskHandlertitlestringA 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) where T : notnull
Parameters
handlerITaskHandlertitlestringA 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
handlerITaskHandlertaskResultTask<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.