Beispiel #1
0
        /// <summary>
        /// Loads extenstions.
        /// </summary>
        private void LoadExtensions()
        {
            ExtensionHolder = new(ErrLog);

            foreach (string extensionCode in AppConfig.ExtensionCodes)
            {
                if (ExtensionFactory.GetExtensionLogic(AppDirs.LibDir, extensionCode, this,
                                                       out ExtensionLogic extensionLogic, out string message))
                {
                    ExtensionHolder.AddExtension(extensionLogic);
                }
Beispiel #2
0
        /// <summary>
        /// Initializes the extension item if needed.
        /// </summary>
        private void InitExtensionItem(ExtentionItem extensionItem)
        {
            if (!extensionItem.IsInitialized)
            {
                extensionItem.IsInitialized = true;

                if (ExtensionFactory.GetExtensionLogic(appData.AppDirs.LibDir, extensionItem.ExtentionCode, appData,
                                                       out ExtensionLogic extensionLogic, out string message))
                {
                    extensionItem.Descr          = BuildExtensionDescr(extensionLogic);
                    extensionItem.ExtensionLogic = extensionLogic;
                }
                else
                {
                    extensionItem.Descr          = message;
                    extensionItem.ExtensionLogic = null;
                }
            }