Answer the question
In order to leave comments, you need to log in
How to implement storage of files in memory using a repository?
There is a C# lab that requires you to implement a mechanism for creating backups. Difficulties arose with the storage of copies. Here is what is written:
Answer the question
In order to leave comments, you need to log in
I still don’t understand why there will be problems if the tests use the local file system;
backups will be created locally on the file system
in tests it is worth implementing storage in memory
I don't understand how to implement a repository that will work with memory.
I dare to assume that the following is meant:
1) This implementation should use the file system to store files;
2) Yours (so as not to litter with files on the disk) stores all these bytes in memory.
Those. FileRepository
you do insteadMemoryRepositiory
DIP from SOLIDI’m not sure how deep you are ready to get into the problem, since the approach to development will depend on this. The choice - support or not for almost any of these items will change the structure and algorithm almost completely.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question