public RenamingService(string fileNameFormat, string outputDirectory, bool replaceOriginals, ResizeSize size) { Contract.Requires(!String.IsNullOrWhiteSpace(fileNameFormat)); Contract.Requires(fileNameFormat.Contains("{0}")); Contract.Requires(size != null); _fileNameFormat = fileNameFormat; _outputDirectory = outputDirectory; _replaceOriginals = replaceOriginals; _size = size; }
public ResizingService(int qualityLevel, bool shrinkOnly, bool ignoreRotations, ResizeSize size, RenamingService renamer) { Debug.Assert(qualityLevel >= 1 && qualityLevel <= 100); Debug.Assert(size != null); Debug.Assert(renamer != null); _qualityLevel = qualityLevel; _shrinkOnly = shrinkOnly; _ignoreRotations = ignoreRotations; _size = size; _renamer = renamer; }
public ResizingService(int qualityLevel, bool shrinkOnly, bool ignoreRotations, ResizeSize size, RenamingService renamer) { Contract.Requires(qualityLevel >= 1 && qualityLevel <= 100); Contract.Requires(size != null); Contract.Requires(renamer != null); _qualityLevel = qualityLevel; _shrinkOnly = shrinkOnly; _ignoreRotations = ignoreRotations; _size = size; _renamer = renamer; }
private ResizingService CreateResizer(ResizeSize size, int qualityLevel = 75, bool shrinkOnly = false, bool ignoreRotations = true) { return new ResizingService( qualityLevel, shrinkOnly, ignoreRotations, size, new RenamingService( "{0} ({1})", null, false, size)); }