Пример #1
0
        /// <summary>
        ///     Removes the prediction module.
        /// </summary>
        /// <param name="observerModule">The calculating module.</param>
        /// <exception cref="System.InvalidOperationException"></exception>
        public virtual void RemovePredictionModule(HealthPredictionObserverModule observerModule)
        {
            if (!this.PredictionModules.Contains(observerModule))
            {
                throw new InvalidOperationException(
                          $"{this.PredictionModules} does not contain {observerModule}, therefore it can't get removed");
            }

            this.PredictionModules.Remove(observerModule);
        }
Пример #2
0
 /// <summary>
 ///     Adds the prediction module.
 /// </summary>
 /// <param name="observerModule">The calculating module.</param>
 public virtual void AddPredictionModule(HealthPredictionObserverModule observerModule)
 {
     this.PredictionModules.Add(observerModule);
 }