// --------------------------------------------------------------------------------------------------------------------
//
// This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.
//
//
// Scan Progress Event Args
//
// --------------------------------------------------------------------------------------------------------------------
namespace HandBrake.ApplicationServices.EventArgs
{
using System;
using System.Runtime.Serialization;
///
/// Scan Progress Event Args
///
[DataContractAttribute]
public class ScanCompletedEventArgs : EventArgs
{
///
/// Initializes a new instance of the class.
///
///
/// Whether the scan was cancelled.
///
///
/// The exception.
///
///
/// The error information.
///
public ScanCompletedEventArgs(bool cancelled, Exception exception, string errorInformation)
{
this.Successful = !cancelled && exception == null && string.IsNullOrEmpty(errorInformation);
this.Cancelled = cancelled;
this.Exception = exception;
this.ErrorInformation = errorInformation;
}
///
/// Gets or sets a value indicating whether Successful.
///
[DataMember]
public bool Successful { get; set; }
///
/// Gets or sets a value indicating whether Cancelled.
///
[DataMember]
public bool Cancelled { get; set; }
///
/// Gets or sets Exception.
///
[DataMember]
public Exception Exception { get; set; }
///
/// Gets or sets ErrorInformation.
///
[DataMember]
public string ErrorInformation { get; set; }
}
}