mirror of
https://github.com/soukoku/ntwain.git
synced 2025-11-07 18:14:46 +08:00
Made it possible to create event args externally for testing.
This commit is contained in:
@@ -1730,12 +1730,13 @@ namespace NTwain.Data
|
||||
public string ProductName { get { return _productName; } set { value.VerifyLengthUnder(TwainConst.String32 - 1); _productName = value; } }
|
||||
|
||||
/// <summary>
|
||||
/// Creates a <see cref="TWIdentity"/> from assembly values.
|
||||
/// Creates a <see cref="TWIdentity" /> from assembly values.
|
||||
/// </summary>
|
||||
/// <param name="supportedGroups">The supported groups.</param>
|
||||
/// <param name="assembly">The assembly.</param>
|
||||
/// <returns></returns>
|
||||
/// <exception cref="ArgumentNullException">assembly</exception>
|
||||
/// <exception cref="System.ArgumentNullException">assembly</exception>
|
||||
/// <exception cref="System.ArgumentException"></exception>
|
||||
public static TWIdentity CreateFromAssembly(DataGroups supportedGroups, Assembly assembly)
|
||||
{
|
||||
if (assembly == null) { throw new ArgumentNullException("assembly"); }
|
||||
@@ -1755,10 +1756,16 @@ namespace NTwain.Data
|
||||
/// <param name="productName">Name of the product.</param>
|
||||
/// <param name="productDescription">The product description.</param>
|
||||
/// <returns></returns>
|
||||
/// <exception cref="ArgumentNullException">version</exception>
|
||||
/// <exception cref="System.ArgumentNullException">assembly</exception>
|
||||
/// <exception cref="System.ArgumentException"></exception>
|
||||
public static TWIdentity Create(DataGroups supportedGroups, Version version,
|
||||
string manufacturer, string productFamily, string productName, string productDescription)
|
||||
{
|
||||
if ((supportedGroups & DataGroups.Image) == 0 &&
|
||||
(supportedGroups & DataGroups.Audio) == 0)
|
||||
{
|
||||
throw new ArgumentException(Resources.BadDataGroupsForAppId);
|
||||
}
|
||||
if (version == null) { throw new ArgumentNullException("version"); }
|
||||
|
||||
return new TWIdentity
|
||||
|
||||
Reference in New Issue
Block a user