Class TaskExtension
Extensions for Task
Inherited Members
Namespace: Microsoft.Graph.Communications.Common
Assembly: Microsoft.Graph.Communications.Common.dll
Syntax
public static class TaskExtension
Methods
ExpectExceptionAsync(Task, Type)
Except an exception
Declaration
public static Task ExpectExceptionAsync(this Task task, Type expectedEx)
Parameters
Type | Name | Description |
---|---|---|
Task | task | task |
Type | expectedEx | expected exception |
Returns
Type | Description |
---|---|
Task | Task representing completion |
ExpectExceptionAsync<T>(Task<T>, Type)
Except an exception
Declaration
public static Task ExpectExceptionAsync<T>(this Task<T> task, Type expectedEx)
Parameters
Type | Name | Description |
---|---|---|
Task<T> | task | task |
Type | expectedEx | expected exception |
Returns
Type | Description |
---|---|
Task | Task representing completion |
Type Parameters
Name | Description |
---|---|
T | type |
IgnoreExceptionAsync(Task, Type)
Ignore exception
Declaration
public static Task IgnoreExceptionAsync(this Task task, Type exceptionType)
Parameters
Type | Name | Description |
---|---|---|
Task | task | task |
Type | exceptionType | exception type |
Returns
Type | Description |
---|---|
Task | Task representing completion |
IgnoreExceptionAsync<T>(Task<T>, Type)
Ignore exception
Declaration
public static Task<T> IgnoreExceptionAsync<T>(this Task<T> task, Type exceptionType)
Parameters
Type | Name | Description |
---|---|---|
Task<T> | task | task |
Type | exceptionType | exception type |
Returns
Type | Description |
---|---|
Task<T> | Task representing completion |
Type Parameters
Name | Description |
---|---|
T | type |