コード例 #1
0
ファイル: AddinsManager.cs プロジェクト: xenoinc/ToolsHub
        private void OnStartupAddins_ExtensionHandler(object sender, Mono.Addins.ExtensionNodeEventArgs args)
        {
            Log.Debug("Entering");

            Mono.Addins.TypeExtensionNode extNode = args.ExtensionNode as Mono.Addins.TypeExtensionNode;
            PrintInfo(ExtensionPath.OnStartup, args, extNode);

            // Execute via class interface definition of extension path
            // IOnStartupExtension ext = (IOnStartupExtension)args.ExtensionObject;
            IOnStartupExtension addin = extNode.GetInstance(typeof(IOnStartupExtension)) as IOnStartupExtension;

            addin.Execute();

            // Push event changed out to listeners
            OnApplicationAddinListChanged?.Invoke(sender, args);
        }