コード例 #1
0
ファイル: GZipper.cs プロジェクト: Vidilin/Gzipper
 public GZipper(string sourceFileName, string destinationFileName, WorkMode mode, bool needProcessInfo = false)
     : base(sourceFileName, destinationFileName, needProcessInfo)
 {
     lastWritedBlockId = 0;
     this.mode         = mode;
     this.modeMessage  = mode.ToString();
     if (mode == WorkMode.Compress)
     {
         this.reader = new CompressReader(sourceFileName, blockSize);
         work        = CompressWork;
         write       = CompressWrite;
     }
     else if (mode == WorkMode.Decompress)
     {
         this.reader = new DecompressReader(sourceFileName, blockSize);
         work        = DecompressWork;
         write       = DecompressWrite;
     }
     else
     {
         throw new InvalidOperationException("Unknown work mode");
     }
 }
コード例 #2
0
 public void SetWorkMode(WorkMode newWorkMode)
 {
     workMode = newWorkMode.ToString("G");
 }
コード例 #3
0
 public void SetCurrentWorkMode(WorkMode newMode)
 {
     Logger.V(">> AppManager.SetCurrentWorkMode(@1:" + newMode.ToString() + ")");
     m_currWorkMode = newMode;
     Logger.V("<< AppManager.SetCurrentWorkMode(@1:" + newMode.ToString() + ")");
 }
コード例 #4
0
ファイル: AppManager.cs プロジェクト: c-jiang/ProxyManager
 public void SetCurrentWorkMode(WorkMode newMode)
 {
     Logger.V(">> AppManager.SetCurrentWorkMode(@1:" + newMode.ToString() + ")");
     m_currWorkMode = newMode;
     Logger.V("<< AppManager.SetCurrentWorkMode(@1:" + newMode.ToString() + ")");
 }