public void AddBeforeSetup(BaseSimulation simulation, Action <BaseSimulation, SimulationEvaluationContexts> update) { if (simulation == null) { throw new ArgumentNullException(nameof(simulation)); } if (!SpecificUpdates.ContainsKey(simulation)) { SpecificUpdates[simulation] = new SimulationUpdates() { Simulation = simulation }; } SpecificUpdates[simulation].ParameterUpdatesBeforeSetup.Add(new SimulationUpdate() { Simulation = simulation, Update = update }); }
public SimulationsUpdates(SimulationEvaluationContexts contexts) { Contexts = contexts; SpecificUpdates = new ConcurrentDictionary <BaseSimulation, SimulationUpdates>(); CommonUpdates = new SimulationUpdates(); }