FRBDK/Glue/Glue/Plugins/PluginManager.cs
/// <summary>
/// Method called after a project is loaded, but before any code has been generated
/// </summary>
/// <param name="glueProjectSave">The newly-loaded project.</param>
/// <param name="fileName">The file name of the plugin.</param>
/// <param name="displayCurrentStatusMethod">The method to call to update the status</param>
Method called after a project is loaded, but before any code has been generated
Method called after a project is loaded but before any code has been generated
internal static void ReactToLoadedGlux(GlueProjectSave glueProjectSave, string fileName, Action<string> displayCurrentStatusMethod)
        {
            SaveRelativeDirectory();
            foreach (PluginManager pluginManager in mInstances)
            {
                foreach (IGluxLoad plugin in pluginManager.GluxLoadPlugins)
                {
                    PluginContainer container = pluginManager.mPluginContainers[plugin];
                    if (container.IsEnabled)
                    {
                        displayCurrentStatusMethod?.Invoke("Notifying " + container.Name + " of startup...");
                        IGluxLoad plugin1 = plugin;
                        PluginCommand(() =>
                            {
                                plugin1.ReactToGluxLoad(glueProjectSave, fileName);
                            },container, "Failed in ReactToGluxLoad");
                    }
                }
                var plugins = pluginManager.ImportedPlugins.Where(x => x.ReactToLoadedGlux != null);
                foreach (var plugin in plugins)
                {
                    var container = pluginManager.mPluginContainers[plugin];
                    if (container.IsEnabled)
                    {
                        displayCurrentStatusMethod?.Invoke("Notifying " + container.Name + " of startup...");
                        PluginBase plugin1 = plugin;
                        PluginCommand(() =>
                            {
                                plugin1.ReactToLoadedGlux();
                            }, container, "Failed in ReactToLoadedGlux");
                    }
                }
            }
            ResumeRelativeDirectory("ReactToLoadedGlux");
        }
internal static void ReactToLoadedGlux ( GlueProjectSave glueProjectSave , string fileName , Action < string > displayCurrentStatusMethod ) { SaveRelativeDirectory ( ) ; foreach ( PluginManager pluginManager in mInstances ) { foreach ( IGluxLoad plugin in pluginManager . GluxLoadPlugins ) { PluginContainer container = pluginManager . mPluginContainers [ plugin ] ; if ( container . IsEnabled ) { displayCurrentStatusMethod ? . Invoke ( " " + container . Name + " " ) ; IGluxLoad plugin1 = plugin ; PluginCommand ( ( ) => { plugin1 . ReactToGluxLoad ( glueProjectSave , fileName ) ; } , container , " " ) ; } } var plugins = pluginManager . ImportedPlugins . Where ( x => x . ReactToLoadedGlux != null ) ; foreach ( var plugin in plugins ) { var container = pluginManager . mPluginContainers [ plugin ] ; if ( container . IsEnabled ) { displayCurrentStatusMethod ? . Invoke ( " " + container . Name + " " ) ; PluginBase plugin1 = plugin ; PluginCommand ( ( ) => { plugin1 . ReactToLoadedGlux ( ) ; } , container , " " ) ; } } } ResumeRelativeDirectory ( " " ) ; }
Method called after a project is loaded, but before any code has been generated
Method called after a project is loaded but before any code has been generated
// Execute the new style plugins
glueProjectSave
GlueProjectSave
The newly-loaded project.
The newly - loaded project .
fileName
string
The file name of the plugin.
The file name of the plugin .
displayCurrentStatusMethod
Action<string>
The method to call to update the status
The method to call to update the status