/// <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; }
protected SimulationElement(SimulationContext context, object key) { Key = key; if (context != null) { context.Register(GetType(), this); } Context = context; }