Files
School/Anul 3/Semestrul 2/Design Patterns/FileCompression/Services/Composites/FileCompressor.cs
T
2025-07-03 20:56:38 +03:00

26 lines
743 B
C#

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);
}
}