// ReSharper disable MemberCanBePrivate.Global
// ReSharper disable UnusedAutoPropertyAccessor.Global
using System;
namespace RGB.NET.Core;
///
///
/// Represents the information supplied with an -event.
///
public class ExceptionEventArgs : EventArgs
{
#region Properties & Fields
///
/// Gets the which is responsible for the event-call.
///
public Exception Exception { get; }
///
/// Gets a bool indicating if the exception is critical for the thrower.
///
public bool IsCritical { get; }
///
/// Gets or sets if the exception should be thrown after the event is handled.
///
public bool Throw { get; set; }
#endregion
#region Constructors
///
///
/// Initializes a new instance of the class.
///
/// The which is responsible for the event-call.
/// Indicates if the exception is critical for the thrower.
/// Indicates if the exception should be thrown after the event is handled.
public ExceptionEventArgs(Exception exception, bool isCritical = false, bool @throw = false)
{
this.Exception = exception;
this.IsCritical = isCritical;
this.Throw = @throw;
}
#endregion
}