using System.Collections.Generic;
using Toolbox.Docking.Api.Objects;
namespace Toolbox.Docking.Api
{
    /// <summary>
    /// <para> This is the main Toolbox addin mechanism for third party Toolbox modules.</para>
    /// <para>Upon Toolbox start the Server application scans the <b>..\Toolbox Server\bin\Addins\</b> sub-folder of the Server binaries folder. Resulting in a list of sub-folders, 
    /// each Addin assembly being in its own sub-folder e.g.:</para>
    /// <list type="number">
    /// <item>
    /// <description>
    ///  ..\Addins\ThirdPartyProfilerAddinA\ThirdPartyProfilerAddinA.dll
    /// </description>
    /// </item>
    /// <item>
    /// <description>
    ///  ..\Addins\ThirdPartyProfilerAddinB\ThirdPartyProfilerAddinB.dll
    /// </description>
    /// </item>
    /// <item>
    /// <description>
    ///  ..\Addins\ThirdPartyProfilerAddinC\ThirdPartyProfilerAddinC.dll
    /// </description>
    /// </item>
    /// </list>
    /// <para>
    /// The scanner will then traverse the folder tree and load all assemblies searching
    ///  for types that implement the <b>IToolboxAddin</b> interface. 
    /// </para>
    /// <para>After the scanner enumerates the third party assemblies  it will construct the IToolboxAddin 
    /// implementers and pull the available <see cref="ITbObjectFactory"/> objects 
    /// via the  <see cref="IToolboxAddin.GetToolboxObjectFactories"/>   method. </para>
    /// </summary>
    /// <remarks>
    /// The Toolbox scanning sub-system would create IToolboxAddin instances via 
    /// a call to Activator.CreateInstance which means that implementing classes should provide a default 
    /// parameterless constructor. 
    /// </remarks>
    public interface IToolboxAddin
    {
        /// <summary>
        /// This method returns the object factories provided by the addin
        /// </summary>
        /// <returns>
        /// Returns the list of Toolbox objects the addin supplies.
        /// </returns>
        IEnumerable<ITbObjectFactory> GetToolboxObjectFactories();
    }
}