/// Controls whether or not we actually report the failure.
/// There are situations where we know we're in a bad state and any further reports are unlikely to be
/// helpful, so we shouldn't send them.
/// </summary>
internalstaticclassWatsonDisabled
{
// we have it this way to make debugging easier since VS debugger can't reach
// static type with same fully qualified name in multiple dlls.
publicstaticbools_reportWatson=true;
}
internalstaticclassWatsonReporter
{
/// <summary>
/// The default callback to pass to <see cref="TelemetrySessionExtensions.PostFault(TelemetrySession, string, string, Exception, Func{IFaultUtility, int})"/>.
// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
usingSystem.Collections.Concurrent;
usingSystem.IO;
usingSystem.Threading;
usingSystem.Threading.Tasks;
...
...
@@ -21,32 +22,35 @@ internal partial class CodeAnalysisService
///
/// This will be called by ServiceHub/JsonRpc framework
/// The default callback to pass to <see cref="TelemetrySessionExtensions.PostFault(TelemetrySession, string, string, Exception, Func{IFaultUtility, int})"/>.
/// Returning "0" signals that we should send data to Watson; any other value will cancel the Watson report.