Пример #1
0
        private static IDocumentCollection <TDocument> GetDocumentCollection <TDocument>(string userSwid, string entityName, IDatabaseDirectoryCreator directoryCreator, byte[] encryptionKey, IDocumentCollectionFactory documentCollectionFactory) where TDocument : AbstractDocument, new()
        {
            string dir  = BuildDocCollectionPath(directoryCreator, userSwid);
            string path = HashedPathGenerator.GetPath(dir, entityName);

            return(documentCollectionFactory.CreateHighSecurityFileSystemCollection <TDocument>(path, encryptionKey));
        }
Пример #2
0
        public string CreateUserDirectory(string documentCollectionName)
        {
            string dir  = CreateUserDirectory();
            string path = HashedPathGenerator.GetPath(dir, documentCollectionName);

            EnsureDirectoryExists(path);
            return(path);
        }
Пример #3
0
        private static string BuildDocCollectionPath(IDatabaseDirectoryCreator directoryCreator, string userSwid)
        {
            string dir = directoryCreator.CreateUserDirectory();

            return(HashedPathGenerator.GetPath(dir, userSwid));
        }