Exemplo n.º 1
0
        /// <summary>
        /// Setup the behavior.
        /// </summary>
        /// <param name="simulation">The simulation.</param>
        /// <param name="provider">The data provider.</param>
        public override void Setup(Simulation simulation, SetupDataProvider provider)
        {
            base.Setup(simulation, provider);
            // Get parameters
            _bp = provider.GetParameterSet <BaseParameters>();

            // Get transient
            _tran = provider.GetBehavior <TransientBehavior>();
        }
Exemplo n.º 2
0
        /// <summary>
        /// Bind the behavior.
        /// </summary>
        /// <param name="simulation">The simulation.</param>
        /// <param name="context">The context.</param>
        public override void Bind(Simulation simulation, BindingContext context)
        {
            base.Bind(simulation, context);

            // Get parameters
            _bp = context.GetParameterSet <BaseParameters>();

            // Get transient
            _tran = context.GetBehavior <TransientBehavior>();

            _method = ((TimeSimulation)simulation).Method.ThrowIfNull("method");
        }