/// <summary> /// Saves the output to the target directory /// </summary> /// <param name="output">The ouput to be saved</param> private void _saveOutput(IProcessedImage output) { string path = string.Format(@"{0}/Output/{1}", OutputDirectory, _coerceIdentifier(output.Identifier)); using (Stream s = File.Create(path)) { output.Output.Save(s, ImageFormat.Png); } }
/// <summary> /// Saves the output from the processor to the data-store. This is invoked /// when no corresponding input is found. /// </summary> /// <param name="output">The output from the processor.</param> protected override void Save(IProcessedImage output) { readImage reader = new readImage(); byte[] blob = reader.ImageToByteArray(output.Output); ProcessedImageRepository processed = new ProcessedImageRepository(); processed.saveImage(null, blob); }
/// <summary> /// Saves the output from the processor to the data-store. /// </summary> /// <param name="input">The input object provided to the processor.</param> /// <param name="output">The output from the processor.</param> protected override void Save(JobInput input, IProcessedImage output) { FileInfo file = (FileInfo)output.Identifier; readImage reader = new readImage(); byte[] blob = reader.ImageToByteArray(output.Output); ProcessedImageRepository processed = new ProcessedImageRepository(); processed.saveImage(file, blob); }
/// <summary> /// Saves the output from the processor to the data-store. /// </summary> /// <param name="input">The input object provided to the processor.</param> /// <param name="output">The output from the processor.</param> protected override void Save(JobInput input, IProcessedImage output) { _validateDirectories(); string path = string.Format(@"{0}/Input/{1}", OutputDirectory, _coerceIdentifier(input.Identifier)); using (Stream s = File.Create(path)) { input.Input.Save(s, ImageFormat.Png); } _saveOutput(output); }
/// <summary> /// Saves the output from the processor to the data-store. This is invoked /// when no corresponding input is found. /// </summary> /// <param name="output">The output from the processor.</param> protected override void Save(IProcessedImage output) { _validateDirectories(); _saveOutput(output); }
/// <summary> /// Saves the output from the processor to the data-store. /// </summary> /// <param name="input">The input object provided to the processor.</param> /// <param name="output">The output from the processor.</param> protected abstract void Save(JobInput input, IProcessedImage output);
/// <summary> /// Saves the output from the processor to the data-store. This is invoked /// when no corresponding input is found. /// </summary> /// <param name="output">The output from the processor.</param> protected abstract void Save(IProcessedImage output);