ThrowHelper.ThrowOperationCanceledException Method

Definition

Overloads

ThrowOperationCanceledException(String, Exception, CancellationToken)

Throws a new OperationCanceledException.

ThrowOperationCanceledException(String, Exception)

Throws a new OperationCanceledException.

ThrowOperationCanceledException(String, CancellationToken)

Throws a new OperationCanceledException.

ThrowOperationCanceledException(String)

Throws a new OperationCanceledException.

ThrowOperationCanceledException()

Throws a new OperationCanceledException.

ThrowOperationCanceledException(CancellationToken)

Throws a new OperationCanceledException.

ThrowOperationCanceledException<T>(String, Exception, CancellationToken)

Throws a new OperationCanceledException.

ThrowOperationCanceledException<T>(String, CancellationToken)

Throws a new OperationCanceledException.

ThrowOperationCanceledException<T>(String, Exception)

Throws a new OperationCanceledException.

ThrowOperationCanceledException<T>()

Throws a new OperationCanceledException.

ThrowOperationCanceledException<T>(String)

Throws a new OperationCanceledException.

ThrowOperationCanceledException<T>(CancellationToken)

Throws a new OperationCanceledException.

ThrowOperationCanceledException(String, Exception, CancellationToken)

public static void ThrowOperationCanceledException (string? message, Exception? innerException, System.Threading.CancellationToken token);
static member ThrowOperationCanceledException : string * Exception * System.Threading.CancellationToken -> unit
Public Shared Sub ThrowOperationCanceledException (message As String, innerException As Exception, token As CancellationToken)

Parameters

message
String

The message to include in the exception.

innerException
Exception

The inner Exception to include.

Exceptions

Thrown with the specified parameters.

Applies to

ThrowOperationCanceledException(String, Exception)

public static void ThrowOperationCanceledException (string? message, Exception? innerException);
static member ThrowOperationCanceledException : string * Exception -> unit
Public Shared Sub ThrowOperationCanceledException (message As String, innerException As Exception)

Parameters

message
String

The message to include in the exception.

innerException
Exception

The inner Exception to include.

Exceptions

Thrown with the specified parameter.

Applies to

ThrowOperationCanceledException(String, CancellationToken)

public static void ThrowOperationCanceledException (string? message, System.Threading.CancellationToken token);
static member ThrowOperationCanceledException : string * System.Threading.CancellationToken -> unit
Public Shared Sub ThrowOperationCanceledException (message As String, token As CancellationToken)

Parameters

message
String

The message to include in the exception.

Exceptions

Thrown with the specified parameters.

Applies to

ThrowOperationCanceledException(String)

public static void ThrowOperationCanceledException (string? message);
static member ThrowOperationCanceledException : string -> unit
Public Shared Sub ThrowOperationCanceledException (message As String)

Parameters

message
String

The message to include in the exception.

Exceptions

Thrown with the specified parameter.

Applies to

ThrowOperationCanceledException()

public static void ThrowOperationCanceledException ();
static member ThrowOperationCanceledException : unit -> unit
Public Shared Sub ThrowOperationCanceledException ()

Exceptions

Thrown with no parameters.

Applies to

ThrowOperationCanceledException(CancellationToken)

public static void ThrowOperationCanceledException (System.Threading.CancellationToken token);
static member ThrowOperationCanceledException : System.Threading.CancellationToken -> unit
Public Shared Sub ThrowOperationCanceledException (token As CancellationToken)

Parameters

Exceptions

Thrown with the specified parameters.

Applies to

ThrowOperationCanceledException<T>(String, Exception, CancellationToken)

public static T ThrowOperationCanceledException<T> (string? message, Exception? innerException, System.Threading.CancellationToken token);
static member ThrowOperationCanceledException : string * Exception * System.Threading.CancellationToken -> 'T
Public Shared Function ThrowOperationCanceledException(Of T) (message As String, innerException As Exception, token As CancellationToken) As T

Type Parameters

T

The type of expected result.

Parameters

message
String

The message to include in the exception.

innerException
Exception

The inner Exception to include.

Returns

T

This method always throws, so it actually never returns a value.

Exceptions

Thrown with the specified parameters.

Applies to

ThrowOperationCanceledException<T>(String, CancellationToken)

public static T ThrowOperationCanceledException<T> (string? message, System.Threading.CancellationToken token);
static member ThrowOperationCanceledException : string * System.Threading.CancellationToken -> 'T
Public Shared Function ThrowOperationCanceledException(Of T) (message As String, token As CancellationToken) As T

Type Parameters

T

The type of expected result.

Parameters

message
String

The message to include in the exception.

Returns

T

This method always throws, so it actually never returns a value.

Exceptions

Thrown with the specified parameters.

Applies to

ThrowOperationCanceledException<T>(String, Exception)

public static T ThrowOperationCanceledException<T> (string? message, Exception? innerException);
static member ThrowOperationCanceledException : string * Exception -> 'T
Public Shared Function ThrowOperationCanceledException(Of T) (message As String, innerException As Exception) As T

Type Parameters

T

The type of expected result.

Parameters

message
String

The message to include in the exception.

innerException
Exception

The inner Exception to include.

Returns

T

This method always throws, so it actually never returns a value.

Exceptions

Thrown with the specified parameter.

Applies to

ThrowOperationCanceledException<T>()

public static T ThrowOperationCanceledException<T> ();
static member ThrowOperationCanceledException : unit -> 'T
Public Shared Function ThrowOperationCanceledException(Of T) () As T

Type Parameters

T

The type of expected result.

Returns

T

This method always throws, so it actually never returns a value.

Exceptions

Thrown with no parameters.

Applies to

ThrowOperationCanceledException<T>(String)

public static T ThrowOperationCanceledException<T> (string? message);
static member ThrowOperationCanceledException : string -> 'T
Public Shared Function ThrowOperationCanceledException(Of T) (message As String) As T

Type Parameters

T

The type of expected result.

Parameters

message
String

The message to include in the exception.

Returns

T

This method always throws, so it actually never returns a value.

Exceptions

Thrown with the specified parameter.

Applies to

ThrowOperationCanceledException<T>(CancellationToken)

public static T ThrowOperationCanceledException<T> (System.Threading.CancellationToken token);
static member ThrowOperationCanceledException : System.Threading.CancellationToken -> 'T
Public Shared Function ThrowOperationCanceledException(Of T) (token As CancellationToken) As T

Type Parameters

T

The type of expected result.

Parameters

Returns

T

This method always throws, so it actually never returns a value.

Exceptions

Thrown with the specified parameters.

Applies to