Example #1
0
 public SessionFactory(AbstractLogger logger, ICoroutineManager coroutineManager, IStopwatch pollCountdownStopwatch, IEpochTime epochTime, DatabaseCorruptionHandler databaseCorruptionHandler, INotificationQueue notificationQueue, INotificationDispatcher notificationDispatcher, ISessionStatus sessionStatus, IMixWebCallFactoryFactory mixWebCallFactoryFactory, IWebCallEncryptorFactory webCallEncryptorFactory, IMixSessionStarter mixSessionStarter, IKeychain keychain, ISessionRefresherFactory sessionRefresherFactory, IGuestControllerClientFactory guestControllerClientFactory, IRandom random, IEncryptor encryptor, IFileSystem fileSystem, IWwwCallFactory wwwCallFactory, string localStorageDirPath, string clientVersion, IDatabaseDirectoryCreator databaseDirectoryCreator, IDocumentCollectionFactory documentCollectionFactory, IDatabase database)
 {
     this.logger                       = logger;
     this.coroutineManager             = coroutineManager;
     this.pollCountdownStopwatch       = pollCountdownStopwatch;
     this.epochTime                    = epochTime;
     this.databaseCorruptionHandler    = databaseCorruptionHandler;
     this.notificationQueue            = notificationQueue;
     this.notificationDispatcher       = notificationDispatcher;
     this.sessionStatus                = sessionStatus;
     this.mixWebCallFactoryFactory     = mixWebCallFactoryFactory;
     this.webCallEncryptorFactory      = webCallEncryptorFactory;
     this.mixSessionStarter            = mixSessionStarter;
     this.keychain                     = keychain;
     this.sessionRefresherFactory      = sessionRefresherFactory;
     this.guestControllerClientFactory = guestControllerClientFactory;
     this.random                       = random;
     this.encryptor                    = encryptor;
     this.fileSystem                   = fileSystem;
     this.wwwCallFactory               = wwwCallFactory;
     this.localStorageDirPath          = localStorageDirPath;
     this.clientVersion                = clientVersion;
     this.databaseDirectoryCreator     = databaseDirectoryCreator;
     this.documentCollectionFactory    = documentCollectionFactory;
     this.database                     = database;
 }
 public CosmosSqlDatabase(
     [NotNull] DatabaseDependencies dependencies,
     CosmosClient cosmosClient,
     IDocumentCollectionFactory documentCollectionFactory)
     : base(dependencies)
 {
     _cosmosClient = cosmosClient;
     _documentCollectionFactory = documentCollectionFactory;
 }
Example #3
0
 public Database(byte[] encryptionKey, IRandom random, IEpochTime epochTime, IDatabaseDirectoryCreator directoryCreator, IDocumentCollectionFactory documentCollectionFactory, DatabaseCorruptionHandler databaseCorruptionHandler)
 {
     this.encryptionKey             = encryptionKey;
     this.random                    = random;
     this.epochTime                 = epochTime;
     this.directoryCreator          = directoryCreator;
     this.documentCollectionFactory = documentCollectionFactory;
     this.databaseCorruptionHandler = databaseCorruptionHandler;
 }
Example #4
0
 public UserDatabase(IDocumentCollection <AlertDocument> alerts, IDocumentCollection <FriendDocument> friends, IDocumentCollection <FriendInvitationDocument> friendInvitations, IDocumentCollection <UserDocument> users, byte[] encryptionKey, string dirPath, IEpochTime epochTime, IDocumentCollectionFactory documentCollectionFactory, DatabaseCorruptionHandler databaseCorruptionHandler, ICoroutineManager coroutineManager)
 {
     this.alerts                    = alerts;
     this.friends                   = friends;
     this.friendInvitations         = friendInvitations;
     this.users                     = users;
     this.encryptionKey             = encryptionKey;
     this.dirPath                   = dirPath;
     this.epochTime                 = epochTime;
     this.documentCollectionFactory = documentCollectionFactory;
     this.databaseCorruptionHandler = databaseCorruptionHandler;
     this.coroutineManager          = coroutineManager;
     callbacks             = new Dictionary <long, Action>();
     pendingIndexedThreads = new List <long>();
 }
Example #5
0
 public CPKeyValueDatabase(byte[] databaseEncryptionKey, string localStorageDirPath, IDocumentCollectionFactory documentCollectionFactory)
 {
     this.databaseEncryptionKey     = databaseEncryptionKey;
     this.localStorageDirPath       = localStorageDirPath;
     this.documentCollectionFactory = documentCollectionFactory;
 }
Example #6
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));
        }