mirror of
https://github.com/cyanfish/naps2.git
synced 2024-09-11 15:26:55 +03:00
Fix DesktopController constructor
This commit is contained in:
parent
7e69e6c93f
commit
60a7362708
@ -38,7 +38,6 @@ public class DesktopControllerTests : ContextualTests
|
||||
private readonly DesktopFormProvider _desktopFormProvider;
|
||||
private readonly IScannedImagePrinter _scannedImagePrinter;
|
||||
private readonly ThumbnailController _thumbnailController;
|
||||
private readonly IWorkerFactory _workerFactory;
|
||||
|
||||
public DesktopControllerTests()
|
||||
{
|
||||
@ -62,7 +61,7 @@ public class DesktopControllerTests : ContextualTests
|
||||
_desktopFormProvider = new DesktopFormProvider();
|
||||
_scannedImagePrinter = Substitute.For<IScannedImagePrinter>();
|
||||
_thumbnailController = new ThumbnailController(_thumbnailRenderQueue, _config);
|
||||
_workerFactory = Substitute.For<IWorkerFactory>();
|
||||
ScanningContext.WorkerFactory = Substitute.For<IWorkerFactory>();
|
||||
_desktopController = new DesktopController(
|
||||
ScanningContext,
|
||||
_imageList,
|
||||
@ -82,8 +81,7 @@ public class DesktopControllerTests : ContextualTests
|
||||
_desktopImagesController,
|
||||
_desktopScanController,
|
||||
_desktopFormProvider,
|
||||
_scannedImagePrinter,
|
||||
_workerFactory
|
||||
_scannedImagePrinter
|
||||
);
|
||||
|
||||
_operationFactory.Create<RecoveryOperation>().Returns(
|
||||
|
@ -32,13 +32,12 @@ public class DesktopController
|
||||
private readonly IDesktopScanController _desktopScanController;
|
||||
private readonly DesktopFormProvider _desktopFormProvider;
|
||||
private readonly IScannedImagePrinter _scannedImagePrinter;
|
||||
private readonly IWorkerFactory _workerFactory;
|
||||
|
||||
private bool _closed;
|
||||
private bool _initialized;
|
||||
private bool _suspended;
|
||||
|
||||
internal DesktopController(ScanningContext scanningContext, UiImageList imageList,
|
||||
public DesktopController(ScanningContext scanningContext, UiImageList imageList,
|
||||
RecoveryStorageManager recoveryStorageManager, ThumbnailController thumbnailController,
|
||||
OperationProgress operationProgress, Naps2Config config, IOperationFactory operationFactory,
|
||||
StillImage stillImage,
|
||||
@ -46,7 +45,7 @@ public class DesktopController
|
||||
ImageClipboard imageClipboard, ImageListActions imageListActions,
|
||||
DialogHelper dialogHelper,
|
||||
DesktopImagesController desktopImagesController, IDesktopScanController desktopScanController,
|
||||
DesktopFormProvider desktopFormProvider, IScannedImagePrinter scannedImagePrinter, IWorkerFactory workerFactory)
|
||||
DesktopFormProvider desktopFormProvider, IScannedImagePrinter scannedImagePrinter)
|
||||
{
|
||||
_scanningContext = scanningContext;
|
||||
_imageList = imageList;
|
||||
@ -66,7 +65,6 @@ public class DesktopController
|
||||
_desktopScanController = desktopScanController;
|
||||
_desktopFormProvider = desktopFormProvider;
|
||||
_scannedImagePrinter = scannedImagePrinter;
|
||||
_workerFactory = workerFactory;
|
||||
}
|
||||
|
||||
public bool SkipRecoveryCleanup { get; set; }
|
||||
@ -171,7 +169,7 @@ public class DesktopController
|
||||
}
|
||||
_closed = true;
|
||||
_thumbnailController.Dispose();
|
||||
_workerFactory.Dispose();
|
||||
_scanningContext.WorkerFactory!.Dispose();
|
||||
}
|
||||
|
||||
public bool PrepareForClosing(bool userClosing)
|
||||
|
Loading…
Reference in New Issue
Block a user