Renamed to ThreadPoolMarshaller.

This commit is contained in:
Eugene Wang 2021-04-26 23:10:14 -04:00
parent c75781e04b
commit d9e56794e5
2 changed files with 3 additions and 3 deletions

View File

@ -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();

View File

@ -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;
} }