Esempio n. 1
0
        public TextModel()
        {
            var settings = new AppSettingsReader();

            MaxMemoryMb    = GetIntConfig(settings, "MaxMemoryMb", 1024);
            MaxFilesPerZip = GetIntConfig(settings, "MaxFilesPerZip", 25);
            int maxConcurrency = GetIntConfig(settings, "MaxCompressConcurrency", 4);

            m_storage = new CompressedStorage(MaxMemoryMb, maxConcurrency);

            m_timer              = new Timer(OnTick, null, TickPeriod, Timeout.Infinite);
            m_storage.OnNewData += OnNewData;
        }
Esempio n. 2
0
 public StoredFile(CompressedStorage storage, string id)
 {
     m_storage = storage;
     m_id      = id;
     m_asyncOp = AsyncOperationManager.CreateOperation(null);
 }