Esempio n. 1
0
        /// <summary>
        /// Handles the <see cref="E:RollbarEvent" /> event.
        /// </summary>
        /// <param name="e">The <see cref="RollbarEventArgs"/> instance containing the event data.</param>
        internal virtual void OnRollbarEvent(RollbarEventArgs e)
        {
            EventHandler <RollbarEventArgs> handler = InternalEvent;

            if (handler != null)
            {
                handler(this, e);
            }
        }
        private void OnRollbarEvent(RollbarEventArgs e)
        {
            EventHandler <RollbarEventArgs> handler = InternalEvent;

            if (handler != null)
            {
                handler(this, e);
            }

            e?.Config?.Logger?.OnRollbarEvent(e);
        }
        /// <summary>
        /// Handles the <see cref="E:RollbarEvent" /> event.
        /// </summary>
        /// <param name="e">The <see cref="RollbarEventArgs"/> instance containing the event data.</param>
        internal void OnRollbarEvent(RollbarEventArgs e)
        {
            Assumption.AssertNotNull(e, nameof(e));

            EventHandler <RollbarEventArgs> handler = InternalEvent;

            if (handler != null)
            {
                handler(this, e);
            }

            e.Logger?.OnRollbarEvent(e);
        }
Esempio n. 4
0
 protected virtual void OnRollbarEvent(RollbarEventArgs e)
 {
     Task.Factory.StartNew(() =>
     {
         EventHandler <RollbarEventArgs> handler = InternalEvent;
         if (handler != null)
         {
             handler(this, e);
         }
     },
                           new CancellationToken(),
                           TaskCreationOptions.None,
                           this._nativeTaskScheduler
                           );
 }
Esempio n. 5
0
        /// <summary>
        /// Handles the <see cref="E:RollbarEvent" /> event.
        /// </summary>
        /// <param name="e">The <see cref="RollbarEventArgs"/> instance containing the event data.</param>
        internal void OnRollbarEvent(RollbarEventArgs e)
        {
            Assumption.AssertNotNull(e, nameof(e));

            EventHandler <RollbarEventArgs> handler = InternalEvent;

            if (handler != null)
            {
                handler(this, e);
            }

            e.Logger?.OnRollbarEvent(e);

            const string category = nameof(this.OnRollbarEvent);// "OnRollbarEvent(...)";
            const int    id       = 0;

            switch (e)
            {
            case InternalErrorEventArgs internalErrorEvent:
                traceSource.TraceData(TraceEventType.Critical, id, category, e.TraceAsString());
                break;

            case CommunicationErrorEventArgs commErrorEvent:
            case RollbarApiErrorEventArgs apiErrorEvent:
                traceSource.TraceData(TraceEventType.Error, id, category, e.TraceAsString());
                break;

            case CommunicationEventArgs commEvent:
                transmittedPayloadsTraceSource.TraceData(TraceEventType.Information, id, e.Payload);
                traceSource.TraceData(TraceEventType.Information, id, category, e.TraceAsString());
                break;

            case TransmissionOmittedEventArgs transmissionOmittedEvent:
                omittedPayloadsTraceSource.TraceData(TraceEventType.Information, id, e.Payload);
                traceSource.TraceData(TraceEventType.Warning, id, category, e.TraceAsString());
                break;

            case PayloadDropEventArgs payloadDropEvent:
            default:
                traceSource.TraceData(TraceEventType.Warning, id, category, e.TraceAsString());
                break;
            }
            traceSource.Flush();
        }
Esempio n. 6
0
 /// <summary>
 /// Handles the <see cref="E:RollbarEvent" /> event.
 /// </summary>
 /// <param name="e">The <see cref="RollbarEventArgs"/> instance containing the event data.</param>
 internal virtual void OnRollbarEvent(RollbarEventArgs e)
 {
     InternalEvent?.Invoke(this, e);
 }