using NTwain.Data;
using System;
namespace NTwain
{
///
/// Contains TWAIN codes and source status when an error is encountered during transfer.
///
public class TransferErrorEventArgs : EventArgs
{
///
/// Initializes a new instance of the class.
///
/// The error.
public TransferErrorEventArgs(Exception error)
{
Exception = error;
}
///
/// Initializes a new instance of the class.
///
/// The code.
/// The status.
public TransferErrorEventArgs(ReturnCode code, TWStatus status)
{
ReturnCode = code;
SourceStatus = status;
}
///
/// Gets the return code from the transfer.
///
///
/// The return code.
///
public ReturnCode ReturnCode { get; private set; }
///
/// Gets the source status.
///
///
/// The source status.
///
public TWStatus SourceStatus { get; private set; }
///
/// Gets the exception if the error is from some exception.
///
///
/// The exception.
///
public Exception Exception { get; private set; }
}
}