mirror of
https://github.com/soukoku/ntwain.git
synced 2025-12-01 10:54:08 +08:00
Made it possible to create event args externally for testing.
This commit is contained in:
@@ -8,13 +8,33 @@ namespace NTwain
|
||||
/// </summary>
|
||||
public class TransferErrorEventArgs : EventArgs
|
||||
{
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="TransferErrorEventArgs"/> class.
|
||||
/// </summary>
|
||||
/// <param name="error">The error.</param>
|
||||
public TransferErrorEventArgs(Exception error)
|
||||
{
|
||||
Exception = error;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="TransferErrorEventArgs"/> class.
|
||||
/// </summary>
|
||||
/// <param name="code">The code.</param>
|
||||
/// <param name="status">The status.</param>
|
||||
public TransferErrorEventArgs(ReturnCode code, TWStatus status)
|
||||
{
|
||||
ReturnCode = code;
|
||||
SourceStatus = status;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the return code from the transfer.
|
||||
/// </summary>
|
||||
/// <value>
|
||||
/// The return code.
|
||||
/// </value>
|
||||
public ReturnCode ReturnCode { get; internal set; }
|
||||
public ReturnCode ReturnCode { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the source status.
|
||||
@@ -22,7 +42,7 @@ namespace NTwain
|
||||
/// <value>
|
||||
/// The source status.
|
||||
/// </value>
|
||||
public TWStatus SourceStatus { get; internal set; }
|
||||
public TWStatus SourceStatus { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the exception if the error is from some exception.
|
||||
@@ -30,6 +50,6 @@ namespace NTwain
|
||||
/// <value>
|
||||
/// The exception.
|
||||
/// </value>
|
||||
public Exception Exception { get; internal set; }
|
||||
public Exception Exception { get; private set; }
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user