コード例 #1
0
 public void AddFeature(EngineFeature feature)
 {
     (Features as List <EngineFeature>).Add(feature);
     if (IsInitialized)
     {
         feature.Attach(this);
     }
 }
コード例 #2
0
        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);
        }