Esempio n. 1
0
        private CompressionType GetCompressionTypeFor(FileSpec file)
        {
            var message = "=> " + file.FileName;
            var actualCompressionType = _compressionType;
            var overrideType          = file.CompressionType;

            if (!string.IsNullOrEmpty(overrideType))
            {
                actualCompressionType = ParseCompressionType(overrideType);
                if (actualCompressionType != _compressionType)
                {
                    message += string.Format(" (CompressionType: {0})", actualCompressionType.ToString());
                }
            }
            LogMessage(message, true);
            return(actualCompressionType);
        }
 private CompressionType GetCompressionTypeFor(FileSpec file)
 {
     var message = "=> " + file.FileName;
     var actualCompressionType = this.compressionType;
     var overrideType = file.CompressionType;
     if (!string.IsNullOrEmpty(overrideType))
     {
         actualCompressionType = this.ParseCompressionType(overrideType);
         if (actualCompressionType != this.compressionType)
         {
             message += string.Format(" (CompressionType: {0})", actualCompressionType.ToString());
         }
     }
     this.LogMessage(message, true);
     return actualCompressionType;
 }
 protected internal virtual string Compress(FileSpec file, string originalContent)
 {
     compressor.CompressionType = GetCompressionTypeFor(file);
     compressor.LineBreakPosition = LineBreakPosition;
     return compressor.Compress(originalContent);
 }
Esempio n. 4
0
 protected internal virtual string Compress(FileSpec file, string originalContent)
 {
     _compressor.CompressionType   = GetCompressionTypeFor(file);
     _compressor.LineBreakPosition = LineBreakPosition;
     return(_compressor.Compress(originalContent));
 }