Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
05/04/17 17:19:35 (8 years ago)
Author:
gkronber
Message:

#2520: changed all usages of StorableClass to use StorableType with an auto-generated GUID (did not add StorableType to other type definitions yet)

Location:
branches/PersistenceReintegration/HeuristicLab.PluginInfrastructure/3.3
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • branches/PersistenceReintegration/HeuristicLab.PluginInfrastructure/3.3/Advanced/DeploymentService/ServiceClients.cs

    r14738 r14927  
    124124        }
    125125    }
    126    
    127     [System.Diagnostics.DebuggerStepThroughAttribute()]
    128     [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Runtime.Serialization", "4.0.0.0")]
    129     [System.Runtime.Serialization.DataContractAttribute(Name="ProductDescription", Namespace="http://schemas.datacontract.org/2004/07/HeuristicLab.Services.Deployment")]
    130     public partial class ProductDescription : object, System.Runtime.Serialization.IExtensibleDataObject
    131     {
    132        
    133         private System.Runtime.Serialization.ExtensionDataObject extensionDataField;
    134        
    135         private string NameField;
    136        
    137         private HeuristicLab.PluginInfrastructure.Advanced.DeploymentService.PluginDescription[] PluginsField;
    138        
    139         private System.Version VersionField;
    140        
    141         public System.Runtime.Serialization.ExtensionDataObject ExtensionData
    142         {
    143             get
    144             {
    145                 return this.extensionDataField;
    146             }
    147             set
    148             {
    149                 this.extensionDataField = value;
    150             }
    151         }
    152        
    153         [System.Runtime.Serialization.DataMemberAttribute()]
    154         public string Name
    155         {
    156             get
    157             {
    158                 return this.NameField;
    159             }
    160             set
    161             {
    162                 this.NameField = value;
    163             }
    164         }
    165        
    166         [System.Runtime.Serialization.DataMemberAttribute()]
    167         public HeuristicLab.PluginInfrastructure.Advanced.DeploymentService.PluginDescription[] Plugins
    168         {
    169             get
    170             {
    171                 return this.PluginsField;
    172             }
    173             set
    174             {
    175                 this.PluginsField = value;
    176             }
    177         }
    178        
    179         [System.Runtime.Serialization.DataMemberAttribute()]
    180         public System.Version Version
    181         {
    182             get
    183             {
    184                 return this.VersionField;
    185             }
    186             set
    187             {
    188                 this.VersionField = value;
    189             }
    190         }
    191     }
    192    
    193     [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")]
     126
     127  [System.Diagnostics.DebuggerStepThroughAttribute()]
     128  [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Runtime.Serialization", "4.0.0.0")]
     129  [System.Runtime.Serialization.DataContractAttribute(Name = "ProductDescription", Namespace = "http://schemas.datacontract.org/2004/07/HeuristicLab.Services.Deployment")]
     130  public partial class ProductDescription : object, System.Runtime.Serialization.IExtensibleDataObject {
     131
     132    private System.Runtime.Serialization.ExtensionDataObject extensionDataField;
     133
     134    private string NameField;
     135
     136    private HeuristicLab.PluginInfrastructure.Advanced.DeploymentService.PluginDescription[] PluginsField;
     137
     138    private System.Version VersionField;
     139
     140    public System.Runtime.Serialization.ExtensionDataObject ExtensionData {
     141      get {
     142        return this.extensionDataField;
     143      }
     144      set {
     145        this.extensionDataField = value;
     146      }
     147    }
     148
     149    [System.Runtime.Serialization.DataMemberAttribute()]
     150    public string Name {
     151      get {
     152        return this.NameField;
     153      }
     154      set {
     155        this.NameField = value;
     156      }
     157    }
     158
     159    [System.Runtime.Serialization.DataMemberAttribute()]
     160    public HeuristicLab.PluginInfrastructure.Advanced.DeploymentService.PluginDescription[] Plugins {
     161      get {
     162        return this.PluginsField;
     163      }
     164      set {
     165        this.PluginsField = value;
     166      }
     167    }
     168
     169    [System.Runtime.Serialization.DataMemberAttribute()]
     170    public System.Version Version {
     171      get {
     172        return this.VersionField;
     173      }
     174      set {
     175        this.VersionField = value;
     176      }
     177    }
     178  }
     179
     180  [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")]
    194181    [System.ServiceModel.ServiceContractAttribute(ConfigurationName="HeuristicLab.PluginInfrastructure.Advanced.DeploymentService.IUpdateService")]
    195182    public interface IUpdateService
     
    205192        HeuristicLab.PluginInfrastructure.Advanced.DeploymentService.PluginDescription[] GetPlugins();
    206193    }
    207    
    208     [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")]
    209     public interface IUpdateServiceChannel : HeuristicLab.PluginInfrastructure.Advanced.DeploymentService.IUpdateService, System.ServiceModel.IClientChannel
    210     {
    211     }
    212    
    213     [System.Diagnostics.DebuggerStepThroughAttribute()]
     194
     195  [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")]
     196  public interface IUpdateServiceChannel : HeuristicLab.PluginInfrastructure.Advanced.DeploymentService.IUpdateService, System.ServiceModel.IClientChannel {
     197  }
     198
     199  [System.Diagnostics.DebuggerStepThroughAttribute()]
    214200    [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")]
    215201    public partial class UpdateServiceClient : System.ServiceModel.ClientBase<HeuristicLab.PluginInfrastructure.Advanced.DeploymentService.IUpdateService>, HeuristicLab.PluginInfrastructure.Advanced.DeploymentService.IUpdateService
     
    255241        }
    256242    }
    257    
    258     [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")]
    259     [System.ServiceModel.ServiceContractAttribute(ConfigurationName="HeuristicLab.PluginInfrastructure.Advanced.DeploymentService.IAdminService")]
    260     public interface IAdminService
    261     {
    262        
    263         [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IAdminService/DeployProduct", ReplyAction="http://tempuri.org/IAdminService/DeployProductResponse")]
    264         void DeployProduct(HeuristicLab.PluginInfrastructure.Advanced.DeploymentService.ProductDescription product);
    265        
    266         [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IAdminService/DeleteProduct", ReplyAction="http://tempuri.org/IAdminService/DeleteProductResponse")]
    267         void DeleteProduct(HeuristicLab.PluginInfrastructure.Advanced.DeploymentService.ProductDescription product);
    268        
    269         [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IAdminService/DeployPlugin", ReplyAction="http://tempuri.org/IAdminService/DeployPluginResponse")]
    270         void DeployPlugin(HeuristicLab.PluginInfrastructure.Advanced.DeploymentService.PluginDescription plugin, byte[] zipFile);
    271     }
    272    
    273     [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")]
     243
     244  [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")]
     245  [System.ServiceModel.ServiceContractAttribute(ConfigurationName = "HeuristicLab.PluginInfrastructure.Advanced.DeploymentService.IAdminService")]
     246  public interface IAdminService {
     247
     248    [System.ServiceModel.OperationContractAttribute(Action = "http://tempuri.org/IAdminService/DeployProduct", ReplyAction = "http://tempuri.org/IAdminService/DeployProductResponse")]
     249    void DeployProduct(HeuristicLab.PluginInfrastructure.Advanced.DeploymentService.ProductDescription product);
     250
     251    [System.ServiceModel.OperationContractAttribute(Action = "http://tempuri.org/IAdminService/DeleteProduct", ReplyAction = "http://tempuri.org/IAdminService/DeleteProductResponse")]
     252    void DeleteProduct(HeuristicLab.PluginInfrastructure.Advanced.DeploymentService.ProductDescription product);
     253
     254    [System.ServiceModel.OperationContractAttribute(Action = "http://tempuri.org/IAdminService/DeployPlugin", ReplyAction = "http://tempuri.org/IAdminService/DeployPluginResponse")]
     255    void DeployPlugin(HeuristicLab.PluginInfrastructure.Advanced.DeploymentService.PluginDescription plugin, byte[] zipFile);
     256  }
     257
     258  [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")]
    274259    public interface IAdminServiceChannel : HeuristicLab.PluginInfrastructure.Advanced.DeploymentService.IAdminService, System.ServiceModel.IClientChannel
    275260    {
    276261    }
    277    
    278     [System.Diagnostics.DebuggerStepThroughAttribute()]
    279     [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")]
    280     public partial class AdminServiceClient : System.ServiceModel.ClientBase<HeuristicLab.PluginInfrastructure.Advanced.DeploymentService.IAdminService>, HeuristicLab.PluginInfrastructure.Advanced.DeploymentService.IAdminService
    281     {
    282        
    283         public AdminServiceClient()
    284         {
    285         }
    286        
    287         public AdminServiceClient(string endpointConfigurationName) :
    288                 base(endpointConfigurationName)
    289         {
    290         }
    291        
    292         public AdminServiceClient(string endpointConfigurationName, string remoteAddress) :
    293                 base(endpointConfigurationName, remoteAddress)
    294         {
    295         }
    296        
    297         public AdminServiceClient(string endpointConfigurationName, System.ServiceModel.EndpointAddress remoteAddress) :
    298                 base(endpointConfigurationName, remoteAddress)
    299         {
    300         }
    301        
    302         public AdminServiceClient(System.ServiceModel.Channels.Binding binding, System.ServiceModel.EndpointAddress remoteAddress) :
    303                 base(binding, remoteAddress)
    304         {
    305         }
    306        
    307         public void DeployProduct(HeuristicLab.PluginInfrastructure.Advanced.DeploymentService.ProductDescription product)
    308         {
    309             base.Channel.DeployProduct(product);
    310         }
    311        
    312         public void DeleteProduct(HeuristicLab.PluginInfrastructure.Advanced.DeploymentService.ProductDescription product)
    313         {
    314             base.Channel.DeleteProduct(product);
    315         }
    316        
    317         public void DeployPlugin(HeuristicLab.PluginInfrastructure.Advanced.DeploymentService.PluginDescription plugin, byte[] zipFile)
    318         {
    319             base.Channel.DeployPlugin(plugin, zipFile);
    320         }
    321     }
     262
     263  [System.Diagnostics.DebuggerStepThroughAttribute()]
     264  [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")]
     265  public partial class AdminServiceClient : System.ServiceModel.ClientBase<HeuristicLab.PluginInfrastructure.Advanced.DeploymentService.IAdminService>, HeuristicLab.PluginInfrastructure.Advanced.DeploymentService.IAdminService {
     266
     267    public AdminServiceClient() {
     268    }
     269
     270    public AdminServiceClient(string endpointConfigurationName) :
     271            base(endpointConfigurationName) {
     272    }
     273
     274    public AdminServiceClient(string endpointConfigurationName, string remoteAddress) :
     275            base(endpointConfigurationName, remoteAddress) {
     276    }
     277
     278    public AdminServiceClient(string endpointConfigurationName, System.ServiceModel.EndpointAddress remoteAddress) :
     279            base(endpointConfigurationName, remoteAddress) {
     280    }
     281
     282    public AdminServiceClient(System.ServiceModel.Channels.Binding binding, System.ServiceModel.EndpointAddress remoteAddress) :
     283            base(binding, remoteAddress) {
     284    }
     285
     286    public void DeployProduct(HeuristicLab.PluginInfrastructure.Advanced.DeploymentService.ProductDescription product) {
     287      base.Channel.DeployProduct(product);
     288    }
     289
     290    public void DeleteProduct(HeuristicLab.PluginInfrastructure.Advanced.DeploymentService.ProductDescription product) {
     291      base.Channel.DeleteProduct(product);
     292    }
     293
     294    public void DeployPlugin(HeuristicLab.PluginInfrastructure.Advanced.DeploymentService.PluginDescription plugin, byte[] zipFile) {
     295      base.Channel.DeployPlugin(plugin, zipFile);
     296    }
     297  }
    322298}
  • branches/PersistenceReintegration/HeuristicLab.PluginInfrastructure/3.3/Advanced/InstallationManager.cs

    r14185 r14927  
    5454        client.Close();
    5555        return plugins;
    56       }
    57       catch (TimeoutException e) {
     56      } catch (TimeoutException e) {
    5857        client.Abort();
    5958        throw new InstallationManagerException("Time out while connecting to server.", e);
    60       }
    61       catch (FaultException e) {
     59      } catch (FaultException e) {
    6260        client.Abort();
    6361        throw new InstallationManagerException("Fault in connection to server.", e);
    64       }
    65       catch (CommunicationException e) {
     62      } catch (CommunicationException e) {
    6663        client.Abort();
    6764        throw new InstallationManagerException("General communication exception in connection to server.", e);
     
    7976        client.Close();
    8077        return products;
    81       }
    82       catch (TimeoutException e) {
     78      } catch (TimeoutException e) {
    8379        client.Abort();
    8480        throw new InstallationManagerException("Time out while connecting to server.", e);
    85       }
    86       catch (FaultException e) {
     81      } catch (FaultException e) {
    8782        client.Abort();
    8883        throw new InstallationManagerException("Fault in connection to server.", e);
    89       }
    90       catch (CommunicationException e) {
     84      } catch (CommunicationException e) {
    9185        client.Abort();
    9286        throw new InstallationManagerException("General communication exception in connection to server.", e);
     
    111105          }
    112106          client.Close();
    113         }
    114         catch (TimeoutException e) {
     107        } catch (TimeoutException e) {
    115108          client.Abort();
    116109          throw new InstallationManagerException("Time out while connecting to server.", e);
    117         }
    118         catch (FaultException e) {
     110        } catch (FaultException e) {
    119111          client.Abort();
    120112          throw new InstallationManagerException("Fault in connection to server.", e);
    121         }
    122         catch (CommunicationException e) {
     113        } catch (CommunicationException e) {
    123114          client.Abort();
    124115          throw new InstallationManagerException("General communication exception in connection to server.", e);
     
    146137          }
    147138          client.Close();
    148         }
    149         catch (TimeoutException e) {
     139        } catch (TimeoutException e) {
    150140          client.Abort();
    151141          throw new InstallationManagerException("Time out while connecting to server.", e);
    152         }
    153         catch (FaultException e) {
     142        } catch (FaultException e) {
    154143          client.Abort();
    155144          throw new InstallationManagerException("Fault in connection to server.", e);
    156         }
    157         catch (CommunicationException e) {
     145        } catch (CommunicationException e) {
    158146          client.Abort();
    159147          throw new InstallationManagerException("General communication exception in connection to server.", e);
  • branches/PersistenceReintegration/HeuristicLab.PluginInfrastructure/3.3/ErrorHandling/ErrorDialog.cs

    r14185 r14927  
    5858        System.Diagnostics.Process.Start("mailto:" + supportLinkLabel.Text);
    5959        supportLinkLabel.LinkVisited = true;
    60       }
    61       catch (Exception) { }
     60      } catch (Exception) { }
    6261    }
    6362  }
  • branches/PersistenceReintegration/HeuristicLab.PluginInfrastructure/3.3/LightweightApplicationManager.cs

    r14185 r14927  
    7575      foreach (Type t in GetTypes(type)) {
    7676        object instance = null;
    77         try { instance = Activator.CreateInstance(t); }
    78         catch { }
     77        try { instance = Activator.CreateInstance(t); } catch { }
    7978        if (instance != null) instances.Add(instance);
    8079      }
     
    138137
    139138        return matchingTypes;
    140       }
    141       catch (TypeLoadException) {
     139      } catch (TypeLoadException) {
    142140        return Enumerable.Empty<Type>();
    143       }
    144       catch (ReflectionTypeLoadException) {
     141      } catch (ReflectionTypeLoadException) {
    145142        return Enumerable.Empty<Type>();
    146143      }
  • branches/PersistenceReintegration/HeuristicLab.PluginInfrastructure/3.3/Manager/PluginManager.cs

    r14185 r14927  
    8383        // forward all events from the remoteValidator to listeners
    8484        remoteValidator.PluginLoaded +=
    85           delegate(object sender, PluginInfrastructureEventArgs e) {
     85          delegate (object sender, PluginInfrastructureEventArgs e) {
    8686            OnPluginLoaded(e);
    8787          };
     
    9090        plugins.AddRange(remoteValidator.Plugins);
    9191        applications.AddRange(remoteValidator.Applications);
    92       }
    93       finally {
     92      } finally {
    9493        // discard the AppDomain that was used for plugin discovery
    9594        AppDomain.Unload(pluginDomain);
     
    130129        OnApplicationStarted(new PluginInfrastructureEventArgs(appInfo));
    131130        applicationManager.Run(appInfo, args);
    132       }
    133       finally {
     131      } finally {
    134132        // make sure domain is unloaded in all cases
    135133        AppDomain.Unload(applicationDomain);
  • branches/PersistenceReintegration/HeuristicLab.PluginInfrastructure/3.3/Manager/PluginValidator.cs

    r14185 r14927  
    184184          RegisterLoadedAssembly(asm);
    185185          assemblies.Add(asm);
    186         }
    187         catch (BadImageFormatException) { } // just ignore the case that the .dll file is not a CLR assembly (e.g. a native dll)
    188         catch (FileLoadException) { }
    189         catch (SecurityException) { }
    190         catch (ReflectionTypeLoadException) { } // referenced assemblies are missing
     186        } catch (BadImageFormatException) { } // just ignore the case that the .dll file is not a CLR assembly (e.g. a native dll)
     187        catch (FileLoadException) { } catch (SecurityException) { } catch (ReflectionTypeLoadException) { } // referenced assemblies are missing
    191188      }
    192189      return assemblies;
     
    217214            desc.Disable(errorStrBuiler.ToString());
    218215          }
    219         }
    220         catch (BadImageFormatException ex) {
     216        } catch (BadImageFormatException ex) {
    221217          // disable the plugin
    222218          desc.Disable("Problem while loading plugin assemblies:" + Environment.NewLine + "BadImageFormatException: " + ex.Message);
    223         }
    224         catch (FileNotFoundException ex) {
     219        } catch (FileNotFoundException ex) {
    225220          // disable the plugin
    226221          desc.Disable("Problem while loading plugin assemblies:" + Environment.NewLine + "FileNotFoundException: " + ex.Message);
    227         }
    228         catch (FileLoadException ex) {
     222        } catch (FileLoadException ex) {
    229223          // disable the plugin
    230224          desc.Disable("Problem while loading plugin assemblies:" + Environment.NewLine + "FileLoadException: " + ex.Message);
    231         }
    232         catch (ArgumentException ex) {
     225        } catch (ArgumentException ex) {
    233226          // disable the plugin
    234227          desc.Disable("Problem while loading plugin assemblies:" + Environment.NewLine + "ArgumentException: " + ex.Message);
    235         }
    236         catch (SecurityException ex) {
     228        } catch (SecurityException ex) {
    237229          // disable the plugin
    238230          desc.Disable("Problem while loading plugin assemblies:" + Environment.NewLine + "SecurityException: " + ex.Message);
     
    261253        // ignore exceptions. Just don't yield a plugin description when an exception is thrown
    262254        catch (FileNotFoundException) {
    263         }
    264         catch (FileLoadException) {
    265         }
    266         catch (InvalidPluginException) {
    267         }
    268         catch (TypeLoadException) {
    269         }
    270         catch (MissingMemberException) {
     255        } catch (FileLoadException) {
     256        } catch (InvalidPluginException) {
     257        } catch (TypeLoadException) {
     258        } catch (MissingMemberException) {
    271259        }
    272260      }
     
    340328          try {
    341329            version = new Version((string)dependencyAttr.ConstructorArguments[1].Value); // might throw FormatException
    342           }
    343           catch (FormatException ex) {
     330          } catch (FormatException ex) {
    344331            throw new InvalidPluginException("Invalid version format of dependency " + name + " in plugin " + pluginType.ToString(), ex);
    345332          }
     
    520507              Assembly.Load(assemblyName);
    521508              assemblyNames.Add(assemblyName);
    522             }
    523             catch (BadImageFormatException) {
     509            } catch (BadImageFormatException) {
    524510              desc.Disable(Path.GetFileName(assemblyLocation) + " is not a valid assembly.");
    525             }
    526             catch (FileLoadException) {
     511            } catch (FileLoadException) {
    527512              desc.Disable("Can't load file " + Path.GetFileName(assemblyLocation));
    528             }
    529             catch (FileNotFoundException) {
     513            } catch (FileNotFoundException) {
    530514              desc.Disable("File " + Path.GetFileName(assemblyLocation) + " is missing.");
    531             }
    532             catch (SecurityException) {
     515            } catch (SecurityException) {
    533516              desc.Disable("File " + Path.GetFileName(assemblyLocation) + " can't be loaded because of security constraints.");
    534             }
    535             catch (NotSupportedException ex) {
     517            } catch (NotSupportedException ex) {
    536518              // disable the plugin
    537519              desc.Disable("Problem while loading plugin assemblies:" + Environment.NewLine + "NotSupportedException: " + ex.Message);
  • branches/PersistenceReintegration/HeuristicLab.PluginInfrastructure/3.3/SandboxApplicationManager.cs

    r14185 r14927  
    119119      try {
    120120        runnablePlugin.Run(args);
    121       }
    122       finally {
     121      } finally {
    123122        // unload plugins in reverse order
    124123        foreach (var plugin in loadedPlugins.Reverse<IPlugin>()) {
     
    150149      foreach (Type t in GetTypes(typeof(T), plugin, onlyInstantiable: true, includeGenericTypeDefinitions: false)) {
    151150        T instance = null;
    152         try { instance = (T)Activator.CreateInstance(t); }
    153         catch { }
     151        try { instance = (T)Activator.CreateInstance(t); } catch { }
    154152        if (instance != null) instances.Add(instance);
    155153      }
     
    166164      foreach (Type t in GetTypes(typeof(T), asm, onlyInstantiable: true, includeGenericTypeDefinitions: false)) {
    167165        T instance = null;
    168         try { instance = (T)Activator.CreateInstance(t); }
    169         catch { }
     166        try { instance = (T)Activator.CreateInstance(t); } catch { }
    170167        if (instance != null) instances.Add(instance);
    171168      }
     
    191188      foreach (Type t in GetTypes(type, onlyInstantiable: true, includeGenericTypeDefinitions: false)) {
    192189        object instance = null;
    193         try { instance = Activator.CreateInstance(t); }
    194         catch { }
     190        try { instance = Activator.CreateInstance(t); } catch { }
    195191        if (instance != null) instances.Add(instance);
    196192      }
  • branches/PersistenceReintegration/HeuristicLab.PluginInfrastructure/3.3/Starter/SplashScreen.cs

    r14185 r14927  
    101101      try {
    102102        Invoke((Action<string>)UpdateMessage, msg);
    103       }
    104       catch (ObjectDisposedException) { }
     103      } catch (ObjectDisposedException) { }
    105104    }
    106105
Note: See TracChangeset for help on using the changeset viewer.