コード例 #1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="NSimulate.SimulationElement"/> class.
        /// </summary>
        /// <param name='context'>
        /// Context.
        /// </param>
        /// <param name='key'>
        /// Key.
        /// </param>
        public SimulationElement(SimulationContext context, object key)
        {
            Key = key;
            context?.Register(this.GetType(), this);

            Context = context;
        }
コード例 #2
0
        protected SimulationElement(SimulationContext context, object key)
        {
            Key = key;
            if (context != null)
            {
                context.Register(GetType(), this);
            }

            Context = context;
        }