mirror of
https://github.com/soukoku/ntwain.git
synced 2025-04-30 09:41:48 +08:00
Renamed to ThreadPoolMarshaller.
This commit is contained in:
parent
c75781e04b
commit
d9e56794e5
@ -30,10 +30,10 @@ namespace NTwain
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Doesn't actually use any particular thread.
|
/// Async calls are marshalled to threadpool thread.
|
||||||
/// Should only be used in non-UI apps.
|
/// Should only be used in non-UI apps.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class NoParticularMarshaller : IThreadMarshaller
|
public class ThreadPoolMarshaller : IThreadMarshaller
|
||||||
{
|
{
|
||||||
public bool InvokeRequired => throw new NotImplementedException();
|
public bool InvokeRequired => throw new NotImplementedException();
|
||||||
|
|
||||||
|
@ -29,7 +29,7 @@ namespace NTwain
|
|||||||
(uint)(DG.APP2 | DG.IMAGE),
|
(uint)(DG.APP2 | DG.IMAGE),
|
||||||
country, "", language, 2, 4, false, true, HandleDeviceEvent, HandleScanEvent, HandleUIThreadAction, hWnd);
|
country, "", language, 2, 4, false, true, HandleDeviceEvent, HandleScanEvent, HandleUIThreadAction, hWnd);
|
||||||
|
|
||||||
_threadMarshaller = threadMarshaller ?? new NoParticularMarshaller();
|
_threadMarshaller = threadMarshaller ?? new ThreadPoolMarshaller();
|
||||||
_hWnd = hWnd;
|
_hWnd = hWnd;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user