I need to do something similar with command pattern, but in terms of delegate or something similar.
It should look like this:
private MyFunc Method1() {
MyFunc func;
/*
set all parameters to func
*/
return func;
}
private void Method2()
{
var funcWithAllParameters = Method1();
funcWithAllParameters.Invoke();
}
private MyFunc(a lot of parameters) {}