コード例 #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;
 }
コード例 #2
0
ファイル: Database.cs プロジェクト: smdx24/CPI-Source-Code
 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;
 }
コード例 #3
0
        private static string BuildDocCollectionPath(IDatabaseDirectoryCreator directoryCreator, string userSwid)
        {
            string dir = directoryCreator.CreateUserDirectory();

            return(HashedPathGenerator.GetPath(dir, userSwid));
        }
コード例 #4
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));
        }