/// <summary> /// Sets up the behavior. /// </summary> /// <param name="behavior">The behavior that needs to be set up.</param> /// <param name="simulation">The simulation.</param> /// <exception cref="ArgumentNullException">simulation</exception> protected virtual void SetupBehavior(IBehavior behavior, Simulation simulation) { simulation.ThrowIfNull(nameof(simulation)); // Build the setup behavior var provider = BuildSetupDataProvider(simulation.EntityParameters, simulation.EntityBehaviors); behavior.Setup(simulation, provider); }
/// <summary> /// Sets up the behavior. /// </summary> /// <param name="behavior">The behavior that needs to be set up.</param> /// <param name="simulation">The simulation.</param> /// <exception cref="ArgumentNullException">simulation</exception> protected virtual void SetupBehavior(IBehavior behavior, Simulation simulation) { if (simulation == null) { throw new ArgumentNullException(nameof(simulation)); } // Build the setup behavior var provider = BuildSetupDataProvider(simulation.EntityParameters, simulation.EntityBehaviors); behavior.Setup(simulation, provider); }