Updated SimpleStorage demos and added IDocument
As I promised, I updated the demos. I added two new demos. One showing how to manipulate collection of documents and the other to show how to Encrypt / Decrypt whole documents.
I also made a change in the “Cromis.SimpleStorage.Collection.pas” unit. There is now a new “IDocument” interface which is very simple:
IDocument = Interface(IInterface) ['{0B2F03BD-9929-43A1-A7E8-62B372D2D96C}'] function GetPath: string; function GetData: ISimpleStorage; property Data: ISimpleStorage read GetData; property Path: string read GetPath; end;
Now instead of the collection returning directly ISimpleStorage interface, it returns the IDocument. The interface holds the storage XML and the additional property, the path of the document. This can be important in certain situations. Here I would also like to clarify that for now the collection can only hold XML documents on file system. They cannot be held directly in memory. This is intentional, because in many cases the collections can be huge and there is no way that all those XML documents would fit into memory. It would also be very time consuming to parse and load all XML documents in advance, before even using them.
You can get the new version and demos from the download page.