Compartilhar via


VsTaskLibraryHelper.FileAndForget Method

Definition

Overloads

FileAndForget(JoinableTask, String, String, Func<Exception,Boolean>)

Records error information when the given JoinableTask faults.

FileAndForget(Task, String, String, Func<Exception,Boolean>)

Records error information when the given Task faults.

FileAndForget(JoinableTask, String, String, Func<Exception,Boolean>)

Records error information when the given JoinableTask faults.

public static void FileAndForget (this Microsoft.VisualStudio.Threading.JoinableTask joinableTask, string faultEventName, string faultDescription = default, Func<Exception,bool> fileOnlyIf = default);
static member FileAndForget : Microsoft.VisualStudio.Threading.JoinableTask * string * string * Func<Exception, bool> -> unit
<Extension()>
Public Sub FileAndForget (joinableTask As JoinableTask, faultEventName As String, Optional faultDescription As String = Nothing, Optional fileOnlyIf As Func(Of Exception, Boolean) = Nothing)

Parameters

joinableTask
JoinableTask

The task to track failures of.

faultEventName
String

An event name following data model schema to use when filing a fault event when joinableTask faults. Must not be null or empty. It consists of 3 parts and must follows pattern [product]/[featureName]/[entityName]. FeatureName could be a one-level feature or feature hierarchy delimited by "/". For examples: vs/platform/opensolution; vs/platform/editor/lightbulb/fixerror.

faultDescription
String

A description to include in the fault telemetry event when joinableTask faults. This value is not put in a bucket parameter, but it is in the ErrorInformation.txt file in the Cab file sent to Watson, and in the AI event.

fileOnlyIf
Func<Exception,Boolean>

An optional exception filter that must return true for the exception to be reported to the VS activity log and fault telemetry.

Applies to

FileAndForget(Task, String, String, Func<Exception,Boolean>)

Records error information when the given Task faults.

public static void FileAndForget (this System.Threading.Tasks.Task task, string faultEventName, string faultDescription = default, Func<Exception,bool> fileOnlyIf = default);
static member FileAndForget : System.Threading.Tasks.Task * string * string * Func<Exception, bool> -> unit
<Extension()>
Public Sub FileAndForget (task As Task, faultEventName As String, Optional faultDescription As String = Nothing, Optional fileOnlyIf As Func(Of Exception, Boolean) = Nothing)

Parameters

task
Task

The task to track failures of.

faultEventName
String

An event name following data model schema to use when filing a fault event when task faults. Must not be null or empty. It consists of 3 parts and must follows pattern [product]/[featureName]/[entityName]. FeatureName could be a one-level feature or feature hierarchy delimited by "/". For examples, vs/platform/opensolution; vs/platform/editor/lightbulb/fixerror; This value is also provided as the source (first argument) to TryLogError(String, String).

faultDescription
String

A description to include in the fault telemetry event when task faults. This value is not put in a bucket parameter, but it is in the ErrorInformation.txt file in the Cab file sent to Watson, and in the AI event. If specified, this value is used as part of the message (second argument) to TryLogError(String, String).

fileOnlyIf
Func<Exception,Boolean>

An optional exception filter that must return true for the exception to be reported to the VS activity log and fault telemetry.

Applies to