/// <summary>
        /// Setup the behavior for the specified simulation.
        /// </summary>
        /// <param name="simulation">The simulation.</param>
        /// <param name="provider">The provider.</param>
        /// <exception cref="ArgumentNullException">provider</exception>
        public override void Setup(Simulation simulation, SetupDataProvider provider)
        {
            provider.ThrowIfNull(nameof(provider));

            // Get parameters
            BaseParameters  = provider.GetParameterSet <BaseParameters>();
            BaseParameters1 = provider.GetParameterSet <InductorBehaviors.BaseParameters>("inductor1");
            BaseParameters2 = provider.GetParameterSet <InductorBehaviors.BaseParameters>("inductor2");
        }
        /// <summary>
        /// Bind the behavior. for the specified simulation.
        /// </summary>
        /// <param name="simulation">The simulation.</param>
        /// <param name="context">The provider.</param>
        public override void Bind(Simulation simulation, BindingContext context)
        {
            base.Bind(simulation, context);

            // Get parameters
            BaseParameters  = context.GetParameterSet <BaseParameters>();
            BaseParameters1 = context.GetParameterSet <InductorBehaviors.BaseParameters>("inductor1");
            BaseParameters2 = context.GetParameterSet <InductorBehaviors.BaseParameters>("inductor2");
        }
Example #3
0
        /// <summary>
        /// Setup the behavior for the specified simulation.
        /// </summary>
        /// <param name="simulation">The simulation.</param>
        /// <param name="provider">The provider.</param>
        /// <exception cref="ArgumentNullException">provider</exception>
        public override void Setup(Simulation simulation, SetupDataProvider provider)
        {
            if (provider == null)
            {
                throw new ArgumentNullException(nameof(provider));
            }

            // Get parameters
            BaseParameters  = provider.GetParameterSet <BaseParameters>();
            BaseParameters1 = provider.GetParameterSet <InductorBehaviors.BaseParameters>("inductor1");
            BaseParameters2 = provider.GetParameterSet <InductorBehaviors.BaseParameters>("inductor2");
        }