mirror of
https://github.com/soukoku/ntwain.git
synced 2026-02-25 13:04:07 +08:00
#90 Interface for Capabilities
This commit is contained in:
@@ -79,6 +79,9 @@
|
|||||||
<Compile Include="..\NTwain\DeviceEventArgs.cs">
|
<Compile Include="..\NTwain\DeviceEventArgs.cs">
|
||||||
<Link>DeviceEventArgs.cs</Link>
|
<Link>DeviceEventArgs.cs</Link>
|
||||||
</Compile>
|
</Compile>
|
||||||
|
<Compile Include="..\NTwain\ICapabilities.cs">
|
||||||
|
<Link>ICapabilities.cs</Link>
|
||||||
|
</Compile>
|
||||||
<Compile Include="..\NTwain\ICapWrapper.cs">
|
<Compile Include="..\NTwain\ICapWrapper.cs">
|
||||||
<Link>ICapWrapper.cs</Link>
|
<Link>ICapWrapper.cs</Link>
|
||||||
</Compile>
|
</Compile>
|
||||||
|
|||||||
@@ -27,11 +27,15 @@ namespace NTwain
|
|||||||
/// <param name="source">The source.</param>
|
/// <param name="source">The source.</param>
|
||||||
/// <param name="capability">The capability.</param>
|
/// <param name="capability">The capability.</param>
|
||||||
/// <param name="getConversionRoutine">The value conversion routine in Get methods.</param>
|
/// <param name="getConversionRoutine">The value conversion routine in Get methods.</param>
|
||||||
/// <exception cref="System.ArgumentNullException">
|
/// <param name="readOnly">if set to <c>true</c> then make this cap read-only.</param>
|
||||||
|
/// <exception cref="ArgumentNullException">
|
||||||
/// source
|
/// source
|
||||||
/// or
|
/// or
|
||||||
/// getConversionRoutine
|
/// getConversionRoutine
|
||||||
/// </exception>
|
/// </exception>
|
||||||
|
/// <exception cref="System.ArgumentNullException">source
|
||||||
|
/// or
|
||||||
|
/// getConversionRoutine</exception>
|
||||||
public CapWrapper(IDataSource source, CapabilityId capability,
|
public CapWrapper(IDataSource source, CapabilityId capability,
|
||||||
Func<object, TValue> getConversionRoutine, bool readOnly)
|
Func<object, TValue> getConversionRoutine, bool readOnly)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ namespace NTwain
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Exposes capabilities of a data source as properties.
|
/// Exposes capabilities of a data source as properties.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class Capabilities
|
public class Capabilities : ICapabilities
|
||||||
{
|
{
|
||||||
IDataSource _source;
|
IDataSource _source;
|
||||||
|
|
||||||
|
|||||||
@@ -265,7 +265,7 @@ namespace NTwain
|
|||||||
/// <value>
|
/// <value>
|
||||||
/// The capabilities.
|
/// The capabilities.
|
||||||
/// </value>
|
/// </value>
|
||||||
public Capabilities Capabilities
|
public ICapabilities Capabilities
|
||||||
{
|
{
|
||||||
get { return _caps ?? (_caps = new Capabilities(this)); }
|
get { return _caps ?? (_caps = new Capabilities(this)); }
|
||||||
}
|
}
|
||||||
|
|||||||
1206
src/NTwain/ICapabilities.cs
Normal file
1206
src/NTwain/ICapabilities.cs
Normal file
File diff suppressed because it is too large
Load Diff
@@ -78,7 +78,7 @@ namespace NTwain
|
|||||||
/// <value>
|
/// <value>
|
||||||
/// The capabilities.
|
/// The capabilities.
|
||||||
/// </value>
|
/// </value>
|
||||||
Capabilities Capabilities { get; }
|
ICapabilities Capabilities { get; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets the current settings (CustomDSData) of this source if supported.
|
/// Gets or sets the current settings (CustomDSData) of this source if supported.
|
||||||
|
|||||||
@@ -62,6 +62,7 @@
|
|||||||
<Compile Include="Data\TwainTypesExtended.cs" />
|
<Compile Include="Data\TwainTypesExtended.cs" />
|
||||||
<Compile Include="DeviceEventArgs.cs" />
|
<Compile Include="DeviceEventArgs.cs" />
|
||||||
<Compile Include="GlobalSuppressions.cs" />
|
<Compile Include="GlobalSuppressions.cs" />
|
||||||
|
<Compile Include="ICapabilities.cs" />
|
||||||
<Compile Include="IDataSource.cs" />
|
<Compile Include="IDataSource.cs" />
|
||||||
<Compile Include="ILog.cs" />
|
<Compile Include="ILog.cs" />
|
||||||
<Compile Include="Internals\TraceLog.cs" />
|
<Compile Include="Internals\TraceLog.cs" />
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ namespace NTwain
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// The build release version number.
|
/// The build release version number.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public const string Build = "3.4.2"; // change this for each nuget release
|
public const string Build = "3.5.0"; // change this for each nuget release
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ namespace NTwain
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public static class WpfImageTools
|
public static class WpfImageTools
|
||||||
{
|
{
|
||||||
// <summary>
|
/// <summary>
|
||||||
/// Loads a <see cref="Stream" /> into WPF <see cref="BitmapSource" />. The image created
|
/// Loads a <see cref="Stream" /> into WPF <see cref="BitmapSource" />. The image created
|
||||||
/// will be a copy so the stream can be disposed once this call returns.
|
/// will be a copy so the stream can be disposed once this call returns.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
Reference in New Issue
Block a user