コード例 #1
0
        /// <inheritdoc/>
        protected override void OnOperationFailure(OperationFailureDiagnosticData data)
        {
            if (data is null)
            {
                return;
            }

            if (_operationBuilders.TryGetValue(data.Operation, out var builder))
            {
                try
                {
                    builder.Outdent();
                    builder.AppendLine(TracerMessages.ExitBrace);
                    builder.AppendException(TracerMessages.OperationFailed, data.OperationException);

                    OnOperationCompleted(new OperationTraceCompletedArgs <string>(data.Operation, false, builder.ToString()));
                }
                finally
                {
                    _operationBuilders.TryRemove(data.Operation, out var _);
                }
            }
        }
コード例 #2
0
 /// <summary>
 /// Handles the event raised when a resolve operation encounters an error.
 /// </summary>
 /// <param name="data">
 /// Diagnostic data associated with the event.
 /// </param>
 /// <remarks>
 /// <para>
 /// Derived classes can override this method and perform actions based
 /// on the event. By default, the base class does nothing.
 /// </para>
 /// </remarks>
 protected virtual void OnOperationFailure(OperationFailureDiagnosticData data)
 {
 }