public void AddFeature(EngineFeature feature) { (Features as List <EngineFeature>).Add(feature); if (IsInitialized) { feature.Attach(this); } }
public void RemoveFeature(EngineFeature feature) { if (!Features.Contains(feature)) { throw new InvalidOperationException("Cannot remove feature that is not added to this Engine."); } feature.UnAttach(this); (Features as List <EngineFeature>).Remove(feature); }