Anul 3 Semestrul 2
This commit is contained in:
+25
@@ -0,0 +1,25 @@
|
||||
using System;
|
||||
using FileCompression.Interfaces;
|
||||
using FileCompression.Services.Strategies;
|
||||
|
||||
namespace FileCompression.Services.Composites;
|
||||
|
||||
public class FileCompressor : ICompressor
|
||||
{
|
||||
|
||||
private string sourcePath;
|
||||
private string destinationPath;
|
||||
private string basePath;
|
||||
private StrategyContext strategyContext;
|
||||
public FileCompressor(string sourcePath, string destinationPath, string basePath, StrategyContext strategyContext)
|
||||
{
|
||||
this.sourcePath = sourcePath;
|
||||
this.destinationPath = destinationPath;
|
||||
this.strategyContext = strategyContext;
|
||||
this.basePath = basePath;
|
||||
}
|
||||
public void Compress()
|
||||
{
|
||||
strategyContext.CompressFile(sourcePath, destinationPath, basePath);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user