Alexandria.AlexandriaPlugin.AddEngine C# (CSharp) Method

AddEngine() protected method

Add an engine to this plugin.
is null. is not part of this . is already in this .
protected AddEngine ( Engine engine ) : void
engine Engine The engine to add.
return void
        protected void AddEngine(Engine engine)
        {
            if (engine == null)
                throw new ArgumentNullException("engine");
            if (engine.Plugin != this)
                throw new ArgumentException(engine.Name + " is not part of this " + Name + ".");
            if (EnginesMutable.Contains(engine))
                throw new ArgumentException(engine.Name + " is already added to this " + Name + ".");
            EnginesMutable.Add(engine);
        }