// --------------------------------------------------------------------------------------------------------------------
//
// 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 HandBrakeWPF.Services.Scan.EventArgs
{
using System;
using HandBrakeWPF.Services.Scan.Model;
///
/// Scan Progress Event Args
///
public class ScanCompletedEventArgs : EventArgs
{
///
/// Initializes a new instance of the class.
///
///
/// Whether the scan was cancelled.
///
///
/// The exception.
///
///
/// The error information.
///
///
/// The scanned Source.
///
public ScanCompletedEventArgs(bool cancelled, Exception exception, string errorInformation, Source scannedSource)
{
this.Successful = !cancelled && exception == null && string.IsNullOrEmpty(errorInformation) && scannedSource != null && scannedSource.Titles != null && scannedSource.Titles.Count > 0;
this.Cancelled = cancelled;
this.Exception = exception;
this.ErrorInformation = errorInformation;
this.ScannedSource = scannedSource;
}
///
/// Gets a value indicating whether Successful.
///
public bool Successful { get; private set; }
///
/// Gets a value indicating whether Cancelled.
///
public bool Cancelled { get; private set; }
///
/// Gets the Exception.
///
public Exception Exception { get; private set; }
///
/// Gets ErrorInformation.
///
public string ErrorInformation { get; private set; }
///
/// Gets the scanned source.
///
public Source ScannedSource { get; private set; }
}
}