public void Run(InputSet inputSet) { ParameterSet parameterSet = ParameterSet(inputSet); if (parameterSet == null) { return; } #if V3 || V4_0 || V4_1 || V4_2_0 || V4_2_1 || V4_2_2 || V4_2_3 || V4_2_4 || V4_2_5 || V4_2_6 parameterSet.Reset(new Scenario(Scenario)); #else parameterSet.Apply(Scenario); #endif }
public void UpdateInstructions(InputSet inputSet, string[] newInstructions) { ParameterSet parameterSet = ParameterSet(inputSet); if (parameterSet == null) { parameterSet = new ParameterSet(); var inputSetParameterSet = new InputSetParameterSet { InputSet = inputSet, Parent = null, Parameters = parameterSet }; ParameterSetManager().ParameterSets.Add(inputSetParameterSet); } parameterSet.Configuration.Instructions = String.Join(Environment.NewLine, newInstructions); }
public string[] Instructions(InputSet inputSet) { ParameterSet parameterSet = ParameterSetManager().ParameterSets.FirstOrDefault(x => x.InputSet == inputSet)?.Parameters; if (parameterSet == null) { return(new string[0]); } try { #if V3 || V4_0 || V4_1 || V4_2_0 || V4_2_1 || V4_2_2 || V4_2_3 || V4_2_4 || V4_2_5 || V4_2_6 IEnumerable <string> result = parameterSet.Configuration.GetInstructions(new Scenario(Scenario)); #else IEnumerable <string> result = parameterSet.Configuration.GetInstructions(Scenario); #endif return(result.ToArray()); } catch { return(new string[] { "// Couldn't read instructions." }); } }