Load() public static méthode

public static Load ( ) : ImageOutputCollection
Résultat ImageOutputCollection
Exemple #1
0
 private static void EnsureOutputsLoaded()
 {
     //DC this is a hack to make sure we can load the subMenus (which on 2nd load were causing an exception)
     try
     {
         foreach (IPersistableImageFormat format in imageOutputCollection)
         {
             var text = format.Menu.Text;
         }
     }
     catch
     {
         imageOutputCollection = null;
     }
     if (imageOutputCollection == null)
     {
         imageOutputCollection = Plugins.Load();
         foreach (IPersistableImageFormat format in imageOutputCollection)
         {
             IConfigurablePlugin plugin = format as IConfigurablePlugin;
             if (plugin != null && plugin.Settings != null)
             {
                 object settings = Configuration.Current.RetrieveSettingsForPlugin(plugin.Settings.GetType());
                 if (settings != null)
                 {
                     plugin.Settings = settings;
                 }
             }
         }
     }
 }
Exemple #2
0
 private static void EnsureOutputsLoaded()
 {
     if (imageOutputCollection == null)
     {
         imageOutputCollection = Plugins.Load();
         foreach (IPersistableImageFormat format in imageOutputCollection)
         {
             IConfigurablePlugin plugin = format as IConfigurablePlugin;
             if (plugin != null && plugin.Settings != null)
             {
                 object settings = Configuration.Current.RetrieveSettingsForPlugin(plugin.Settings.GetType());
                 if (settings != null)
                 {
                     plugin.Settings = settings;
                 }
             }
         }
     }
 }
Exemple #3
0
 public void An_assembly_that_contains_only_an_abstrat_implementation_of_the_IPersistableImageFormat_interface_does_not_crash_the_application()
 {
     Plugins.Load();
 }