FRBDK/Glue/Glue/Plugins/PluginManager.cs
/// <summary>
/// Notifies all contained plugins that an property on an element or variable has changed. 
/// Properties are values which control how Glue generates the code of
/// an element or variable. 
/// </summary>
/// <param name="changedMember">The member that has changed</param>
/// <param name="oldValue">The value of the member before the change</param>
Notifies all contained plugins that an property on an element or variable has changed.
Properties are values which control how Glue generates the code of
an element or variable.
Notifies all contained plugins that an property on an element or variable has changed . Properties are values which control how Glue generates the code of an element or variable .
internal static void ReactToChangedProperty(string changedMember, object oldValue)
        {
            foreach (PluginManager pluginManager in mInstances)
            {
                foreach (IPropertyChange plugin in pluginManager.PropertyChangePlugins)
                {
                    PluginContainer container = pluginManager.mPluginContainers[plugin];
                    if (container.IsEnabled)
                    {
                        IPropertyChange plugin1 = plugin;
                        PluginCommand(() =>
                            {
                                plugin1.ReactToChangedProperty(changedMember, oldValue);
                            },container, "Failed in ReactToChangedProperty");
                    }
                }
                var plugins = pluginManager.ImportedPlugins.Where(x => x.ReactToChangedPropertyHandler != null);
                foreach (var plugin in plugins)
                {
                    var container = pluginManager.mPluginContainers[plugin];
                    if (container.IsEnabled)
                    {
                        PluginBase plugin1 = plugin;
                        PluginCommand(() =>
                            {
                                plugin1.ReactToChangedPropertyHandler(changedMember, oldValue);
                            },container, "Failed in ReactToChangedProperty");
                    }
                }
            }
        }
internal static void ReactToChangedProperty ( string changedMember , object oldValue ) { foreach ( PluginManager pluginManager in mInstances ) { foreach ( IPropertyChange plugin in pluginManager . PropertyChangePlugins ) { PluginContainer container = pluginManager . mPluginContainers [ plugin ] ; if ( container . IsEnabled ) { IPropertyChange plugin1 = plugin ; PluginCommand ( ( ) => { plugin1 . ReactToChangedProperty ( changedMember , oldValue ) ; } , container , " " ) ; } } var plugins = pluginManager . ImportedPlugins . Where ( x => x . ReactToChangedPropertyHandler != null ) ; foreach ( var plugin in plugins ) { var container = pluginManager . mPluginContainers [ plugin ] ; if ( container . IsEnabled ) { PluginBase plugin1 = plugin ; PluginCommand ( ( ) => { plugin1 . ReactToChangedPropertyHandler ( changedMember , oldValue ) ; } , container , " " ) ; } } } }
Notifies all contained plugins that an property on an element or variable has changed.
Notifies all contained plugins that an property on an element or variable has changed .
// Execute the new style plugins
changedMember
string
The member that has changed
The member that has changed
oldValue
object
The value of the member before the change
The value of the member before the change