2using System.Collections.Generic;
42 catch (Exception ex) when (ex is IOException or UnauthorizedAccessException)
45 $
"Saving settings to the file {filePath} failed.", ex);
65 var settings = File.ReadAllText(filePath);
68 catch (Exception ex) when (ex is IOException or UnauthorizedAccessException)
71 $
"Loading settings from the file {filePath} failed.", ex);
91 public virtual object Process(
object input)
95 foreach (var module
in GetModules())
97 data = module.Process(data);
115 protected abstract IReadOnlyList<IModule> GetModules();
Exception thrown when an I/O operation fails.
Base class for implementing a custom pipeline.
string TypeId
The type identifier of the pipeline.This is a unique string used to identify the specific pipeline im...
string ExportSettingsToString()
Returns the current settings of the pipeline and its modules as a string.A string representation of t...
void ResetToDefault()
Resets the pipeline and its modules to their default state.
virtual void ExportSettingsToFile(string filePath)
Saves the current settings of the pipeline and its modules to a file.
virtual object Process(object input)
Processes the input through all pipeline modules and returns the result.
virtual void ImportSettingsFromFile(string filePath)
Loads the settings of the pipeline and its modules from a file.
void ImportSettingsFromString(string settings)
Loads settings for the pipeline and its modules from a string.
Interface defining the structure and behavior of a processing pipeline.