private static void ValidateConstructionParams( IQueryHandler <GetDocumentToProcess, DocumentToProcess> getDocumentHandler, IImageProcessingPersistenceConfiguration persistenceConfiguration, ICommandHandler <SaveDomainObject <ProcessedDocumentPage> > saveProcessedPageHandler, ImageProcessingPreparationSteps imagePreparationSteps, IHandwrittenInputRecognizer handwrittenInputRecognizer, IHandwrittenChoiceRecognizer handwrittenChoiceRecognizer) { if (getDocumentHandler == null) { throw new ArgumentNullException(nameof(getDocumentHandler)); } if (persistenceConfiguration == null) { throw new ArgumentNullException(nameof(persistenceConfiguration)); } if (saveProcessedPageHandler == null) { throw new ArgumentNullException(nameof(saveProcessedPageHandler)); } if (imagePreparationSteps == null) { throw new ArgumentNullException(nameof(imagePreparationSteps)); } if (handwrittenInputRecognizer == null) { throw new ArgumentNullException(nameof(handwrittenInputRecognizer)); } if (handwrittenChoiceRecognizer == null) { throw new ArgumentNullException(nameof(handwrittenChoiceRecognizer)); } }
public SaveRecognizedChoicePartHandler(IImageProcessingPersistenceConfiguration persistenceConfiguration) { if (persistenceConfiguration == null) { throw new ArgumentNullException(nameof(persistenceConfiguration)); } _persistenceConfiguration = persistenceConfiguration; }
public GetCanvasesBitmapsForTemplateResourceHandler(IImageProcessingPersistenceConfiguration persistenceConfiguration) { if (persistenceConfiguration == null) { throw new ArgumentNullException(nameof(persistenceConfiguration)); } _persistenceConfiguration = persistenceConfiguration; }
public GetImageRecognitionModelHandler(IImageProcessingPersistenceConfiguration persistenceConfiguration) { if (persistenceConfiguration == null) { throw new ArgumentNullException(nameof(persistenceConfiguration)); } _persistenceConfiguration = persistenceConfiguration; }
public GetDocumentToProcessResourcesHandler(IImageProcessingPersistenceConfiguration persistenceConfiguration) { if (persistenceConfiguration == null) { throw new ArgumentNullException(nameof(persistenceConfiguration)); } _persistenceConfiguration = persistenceConfiguration; }
public SaveProcessedDocumentPageHandler(IImageProcessingPersistenceConfiguration persistenceConfiguration) { if (persistenceConfiguration == null) { throw new ArgumentNullException(nameof(persistenceConfiguration)); } _persistenceConfiguration = persistenceConfiguration; }
public PrepareTemplates(IImageProcessingPersistenceConfiguration imageProcessingConfig, ITemplatingPersistenceConfiguration templatingConfig) { if (imageProcessingConfig == null) { throw new ArgumentNullException(nameof(imageProcessingConfig)); } if (templatingConfig == null) { throw new ArgumentNullException(nameof(templatingConfig)); } ImageProcessingConfig = imageProcessingConfig; TemplatingConfig = templatingConfig; }
public HomeController(IImageProcessingPersistenceConfiguration imageProcessingConfig, ITemplatingPersistenceConfiguration templatingConfig, PrepareTemplates prepareTemplates) { if (imageProcessingConfig == null) { throw new ArgumentNullException(nameof(imageProcessingConfig)); } if (templatingConfig == null) { throw new ArgumentNullException(nameof(templatingConfig)); } if (prepareTemplates == null) { throw new ArgumentNullException(nameof(prepareTemplates)); } ImageProcessingConfig = imageProcessingConfig; TemplatingConfig = templatingConfig; _prepareTemplates = prepareTemplates; }
public DocumentImagesProcessor(IQueryHandler <GetDocumentToProcess, DocumentToProcess> getDocumentHandler, IImageProcessingPersistenceConfiguration persistenceConfiguration, ICommandHandler <SaveDomainObject <ProcessedDocumentPage> > saveProcessedPageHandler, ImageProcessingPreparationSteps imagePreparationSteps, IHandwrittenInputRecognizer handwrittenInputRecognizer, IHandwrittenChoiceRecognizer handwrittenChoiceRecognizer) { ValidateConstructionParams(getDocumentHandler, persistenceConfiguration, saveProcessedPageHandler, imagePreparationSteps, handwrittenInputRecognizer, handwrittenChoiceRecognizer); PersistenceConfiguration = persistenceConfiguration; _getDocumentHandler = getDocumentHandler; _saveProcessedPageHandler = saveProcessedPageHandler; _imagePreparationSteps = imagePreparationSteps; _handwrittenInputRecognizer = handwrittenInputRecognizer; _handwrittenChoiceRecognizer = handwrittenChoiceRecognizer; _tokenSource = new CancellationTokenSource(); Ready(); }
public GetDocumentToProcessHandler(IImageProcessingPersistenceConfiguration persistenceConfiguration, IResourceQueryHandler <GetBitmapsForDocumentToProcess, FileStorageRequestResult <ICollection <OrderedBitmapResource> > > getDocumentBitmapsHandler, IQueryHandler <GetTemplateDefinitionById, TemplateDefinition> getTemplateById) { if (persistenceConfiguration == null) { throw new ArgumentNullException(nameof(persistenceConfiguration)); } if (getDocumentBitmapsHandler == null) { throw new ArgumentNullException(nameof(getDocumentBitmapsHandler)); } if (getTemplateById == null) { throw new ArgumentNullException(nameof(getTemplateById)); } _persistenceConfiguration = persistenceConfiguration; _getDocumentBitmapsHandler = getDocumentBitmapsHandler; _getTemplateById = getTemplateById; }
internal ImageProcessingContext(IImageProcessingPersistenceConfiguration configuration) : base(new DbContextOptionsBuilder <ImageProcessingContext>() .UseSqlServer(configuration.DatabaseConnectionString).Options) { Database.EnsureCreated(); }