public OnAdditionToSolver ( Solver newSolver ) : void | ||
newSolver | Solver | Solver to which the updateable was added. |
return | void |
///<summary> /// Adds a solver updateable to the solver. ///</summary> ///<param name="item">Updateable to add.</param> ///<exception cref="ArgumentException">Thrown when the item already belongs to a solver.</exception> public void Add(SolverUpdateable item) { if (item.Solver == null) { item.Solver = this; item.solverIndex = solverUpdateables.count; solverUpdateables.Add(item); DeactivationManager.Add(item.simulationIslandConnection); item.OnAdditionToSolver(this); } else { throw new ArgumentException("Solver updateable already belongs to something; it can't be added.", "item"); } }
///<summary> /// Adds a solver updateable to the solver. ///</summary> ///<param name="item">Updateable to add.</param> ///<exception cref="ArgumentException">Thrown when the item already belongs to a solver.</exception> public void Add(SolverUpdateable item) { if (item.Solver == null) { item.Solver = this; item.solverIndex = solverUpdateables.Count; solverUpdateables.Add(item); DeactivationManager.Add(item.simulationIslandConnection); item.OnAdditionToSolver(this); } else throw new ArgumentException("Solver updateable already belongs to something; it can't be added.", "item"); }