コード例 #1
0
 public void mPlugin_PluginAdded(ISystemPlugin input)
 {
     inputSelectionBox.Items.Add(input);
     if (mPlugin.CurrentPlugin == input)
     {
         inputSelectionBox.SelectedItem = input;
     }
 }
コード例 #2
0
 private void ExecuteNodeViewPrivate(LoadedNodeSet loaderContextDefinition, IProcessingContext processingContext, View view)
 {
     if (view != null)
     {
         ISystemPlugin systemPlugin = Utilities.GetPlugin <ISystemPlugin>(view.SystemPluginName, _TransactionScope.DependencyInjectionContainer, _KraftModuleConfigurationSettings, ELoaderType.ViewLoader);
         GenericUtilities.CheckNullOrEmpty(systemPlugin, true);
         IPluginsSynchronizeContextScoped synchronizeContextScoped = _TransactionScope.GetSynchronizeContextScopedAsync(view.SystemPluginName, ELoaderType.ViewLoader, _KraftModuleConfigurationSettings, systemPlugin).Result;
         GenericUtilities.CheckNullOrEmpty(synchronizeContextScoped, true);
         systemPlugin.ExecuteAsync(loaderContextDefinition, processingContext, _TransactionScope.PluginServiceManager, synchronizeContextScoped, view);
     }
 }
コード例 #3
0
ファイル: Core.cs プロジェクト: veyvin/ChimeraClean
        /// <summary>
        /// Get the plugin instance of the specified type. Throws an ArgumentException if no such plugin is found.
        /// </summary>
        public T GetPlugin <T> () where T : ISystemPlugin
        {
            Type          t   = typeof(T);
            ISystemPlugin ret = mPlugins.FirstOrDefault(plugin => plugin.GetType() == t);

            if (ret == null)
            {
                throw new ArgumentException("Unable to get plugin. No plugin of the specified type (" + t.FullName + ") found.");
            }
            return((T)ret);
        }
コード例 #4
0
 public void AddInput(ISystemPlugin input)
 {
     if (mCurrentInput == null)
     {
         mCurrentInput         = input;
         mCurrentInput.Enabled = mEnabled;
     }
     mPlugins.Add(input);
     if (PluginAdded != null)
     {
         PluginAdded(input);
     }
 }
コード例 #5
0
 internal bool PluginEnabled(ISystemPlugin plugin)
 {
     return Get(true, plugin.Name + "Enabled", true, "Find out whether a plugin is enabled.");
 }
コード例 #6
0
 internal bool PluginEnabled(ISystemPlugin plugin)
 {
     return Get("Plugins", plugin.Name, true, "Set whether a plugin is enabled.");
 }
コード例 #7
0
 internal bool PluginEnabled(ISystemPlugin plugin)
 {
     return(Get(true, plugin.Name + "Enabled", true, "Find out whether a plugin is enabled."));
 }
コード例 #8
0
 internal bool PluginEnabled(ISystemPlugin plugin)
 {
     return(Get("Plugins", plugin.Name, plugin.Enabled, "Set whether a plugin is enabled."));
 }
コード例 #9
0
 public void AddInput(ISystemPlugin input)
 {
     if (mCurrentInput == null) {
         mCurrentInput = input;
         mCurrentInput.Enabled = mEnabled;
     }
     mPlugins.Add(input);
     if (PluginAdded != null)
         PluginAdded(input);
 }
コード例 #10
0
 public void mPlugin_PluginAdded(ISystemPlugin input)
 {
     inputSelectionBox.Items.Add(input);
     if (mPlugin.CurrentPlugin == input)
         inputSelectionBox.SelectedItem = input;
 }