public SystemIoFileStorage(PathResolver pathResolver, IOptions <SystemIoStorageOptions> configuration, ImageFormatDefinition formatDefinition) { Ensure.NotNull(pathResolver, "pathResolver"); Ensure.NotNull(configuration, "configuration"); Ensure.NotNull(formatDefinition, "formatDefinition"); this.pathResolver = pathResolver; this.configuration = configuration.Value; this.formatDefinition = formatDefinition; }
public ImagePath(SystemIoFileStorage storage, ImageFormatDefinition formatDefinition, Entry entry, Image image) { Ensure.NotNull(formatDefinition, "formatDefinition"); Ensure.NotNull(entry, "entry"); Ensure.NotNull(image, "image"); string storagePath = storage.GetStoragePath(entry); string baseName = Path.GetFileNameWithoutExtension(image.FileName); Original = Path.Combine(storagePath, image.FileName); Thumbnail = Path.Combine(storagePath, String.Concat(baseName, ".thumbnail", formatDefinition.FileExtension)); Preview = Path.Combine(storagePath, String.Concat(baseName, ".preview", formatDefinition.FileExtension)); }
public ImageResizeService(ImageFormatDefinition formatDefinition) { Ensure.NotNull(formatDefinition, "formatDefinition"); this.formatDefinition = formatDefinition; }