using System; using System.Collections.Generic; using System.Text; using Duplicati.Library.Interface; namespace Duplicati.Library.DynamicLoader { /// /// An interface class that provides easy loading of plugable setting controls /// public static class SettingsControlLoader { /// /// Implementation overrides specific to encryption /// private class SettingsControlLoaderSub : DynamicLoader { /// /// Returns the filename extension, which is also the key /// /// The item to load the key for /// The file extension used by the module protected override string GetInterfaceKey(ISettingsControl item) { return item.Key; } /// /// Returns the subfolders searched for encryption modules /// protected override string[] Subfolders { get { return new string[] { "settingcontrols" }; } } } #region Public static API /// /// Gets a list of loaded settings controls, the instances can be used to extract interface information, not used to interact with the module. /// public static ISettingsControl[] Modules { get { return new SettingsControlLoaderSub().Interfaces; } } #endregion } }