Hello,
I want to manage input and output. I checked your sample project. I found DocumentInfoRepository.cs and FileRepository classes to manage input/output in your sample project. I implemented them in my project. Also added them to Unity config like below:
var annotator = new AnnotationImageHandler(
new AnnotationConfig { StoragePath = repositoryFolder, TempPath = tempPath },
new Data.Repositories.UserRepository(),
new Data.Repositories.AnnotationDocumentRepository(),
new Data.Repositories.AnnotationRepository(),
new Data.Repositories.AnnotationReplyRepository(),
new Data.Repositories.AnnotationCollaboratorRepository(),
new Data.Repositories.FileRepository(repositoryFolder),
new Data.Repositories.DocumentInfoRepository(repositoryFolder));
By the way, I created a DLL to manage annotation data. We want to store them in SQL/Oracle DB.
But in your sample FileRepository and DocumentInfoRepository classes contain NotImplemented methods. And a couple of methods don’t exist in the interfaces.
My question is how should I implement those methods. Because some of them are called from AnnotationImageHandler.GetDocumentInfo() method. When I debug FileRepository and DocumentInfoRepository I get the following results:
AnnotationImageHandler.GetDocumentInfo() method’s first call is FileRepository.GetFileDescription(string guid) method. This method was not implemented (I’m talking throw new NotImplementedException() kind of not implemented). I create a new FileDescription instance and everything is fine. BTW the guid variable was my absolute path (as I wanted).
Then it calls DocumentInfoMethod.GetFileData(FileDescription fileDescription) method. This was not implemented too. This method returns a FileData object, and I create a new instance of FileData class and return it as default. But I guess this object must be filled and this object contains properties like pages, pageCount, maxHeight, maxWidth. For filling them I have to process the document. Is this mandatory? Or could you give me a sample of usage of this method, if you have? Also do I need to do anything besides filling the FileData instance?
Then it calls FileRepository.GetFile(string guid) method. In this method the guid variable is "Temp//abc.pdf". It should be in my repositoryFolder, I guess I have to create it by myself? Or is there a helper class/method to create it? Or where should I create it (i.e., which class/method)?
Because abc.docx does not exist I can’t go further.
One last thing: do you have any fully implemented sample about this subject?
Kind regards,