Ejemplo n.º 1
0
        /// <summary>
        ///     Adds the module.
        /// </summary>
        /// <param name="module">The module.</param>
        /// <exception cref="ArgumentException">There can't be multiple similar modules in the PlaySharpBootstrap.</exception>
        public virtual void AddModule(LoadableBase module)
        {
            if (this.Modules.Contains(module))
            {
                throw new ArgumentException("There can't be multiple similar modules in the PlaySharpBootstrap.");
            }

            this.Modules.Add(module);
        }
Ejemplo n.º 2
0
        /// <summary>
        ///     Removes the module.
        /// </summary>
        /// <param name="module">The module.</param>
        public virtual void RemoveModule(LoadableBase module)
        {
            if (!this.Modules.Contains(module))
            {
                return;
            }

            this.Modules.Remove(module);
        }