Exemple #1
0
        /// <summary>
        /// Creates a new <see cref="FileSystemServer"/>.
        /// </summary>
        /// <param name="config">The configuration for the created <see cref="FileSystemServer"/>.</param>
        public FileSystemServer(FileSystemServerConfig config)
        {
            if (config.FsCreators == null)
            {
                throw new ArgumentException("FsCreators must not be null");
            }

            if (config.DeviceOperator == null)
            {
                throw new ArgumentException("DeviceOperator must not be null");
            }

            ExternalKeySet externalKeySet = config.ExternalKeySet ?? new ExternalKeySet();

            Timer = config.TimeSpanGenerator ?? new StopWatchTimeSpanGenerator();

            FsProxyCore = new FileSystemProxyCore(config.FsCreators, externalKeySet, config.DeviceOperator);
            var fsProxy = new FileSystemProxy(FsProxyCore, this);

            FsClient = new FileSystemClient(this, fsProxy, Timer);

            // NS usually takes care of this
            if (FsClient.IsSdCardInserted())
            {
                FsClient.SetSdCardAccessibility(true);
            }

            SaveDataIndexerManager = new SaveDataIndexerManager(FsClient, SaveIndexerId);

            fsProxy.CleanUpTemporaryStorage().IgnoreResult();
        }
Exemple #2
0
        internal FileSystemProxy(FileSystemProxyCore fsProxyCore, FileSystemServer fsServer)
        {
            FsProxyCore = fsProxyCore;
            FsServer    = fsServer;

            CurrentProcess      = -1;
            SaveDataSize        = 0x2000000;
            SaveDataJournalSize = 0x1000000;
            AutoCreateSaveData  = true;
        }
Exemple #3
0
        /// <summary>
        /// Creates a new <see cref="FileSystemServer"/>.
        /// </summary>
        /// <param name="config">The configuration for the created <see cref="FileSystemServer"/>.</param>
        public FileSystemServer(FileSystemServerConfig config)
        {
            if (config.FsCreators == null)
            {
                throw new ArgumentException("FsCreators must not be null");
            }

            if (config.DeviceOperator == null)
            {
                throw new ArgumentException("DeviceOperator must not be null");
            }

            ExternalKeySet     externalKeySet = config.ExternalKeySet ?? new ExternalKeySet();
            ITimeSpanGenerator timer          = config.TimeSpanGenerator ?? new StopWatchTimeSpanGenerator();

            FsProxyCore = new FileSystemProxyCore(config.FsCreators, externalKeySet, config.DeviceOperator);
            FsClient    = new FileSystemClient(this, timer);
            Timer       = timer;

            SaveDataIndexerManager = new SaveDataIndexerManager(FsClient, SaveIndexerId);
        }