I have problem in creating modular analysis architecture for C# application.
Aim:
It is basically like a dynamic plug and play calculator. Start with one input (A), build multiple operation process in GUI
e.g, A² (square) -> B (multiply) A -> C (divide by) B -> D
By clicking one execute button in GUI with one input A, how to arrive at D?
In the GUI one list box with necessary inputs as double values and another list box will load type of particular interface using reflection say square, multiply, etc.. Then user will build up new process by plugging in existing processes and inputs say with A as input -> square -> gives B as output -> using A, B as input -> multiply -> gives C as output -> using C / A -> gives output D During instantiation of particular process their output will be loaded dynamically using constructor.
Example problem:
public interface IProcess
{
double ExecuteProcess()
}
Base process class:
public abstract class Process
{
public double Output {get; set;}
}
Process class example:
public class Square : Process, IProcess
{
public double Input {get; set;}
public double ExecuteProcess()
}
Question
I hope I have explained my problem correctly. I have searched some example pattern but unable to find one to tackle this problem. Can anyone guide how to approach this problem?