- Timestamp:
- 05/04/17 17:19:35 (8 years ago)
- 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 124 124 } 125 125 } 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")] 194 181 [System.ServiceModel.ServiceContractAttribute(ConfigurationName="HeuristicLab.PluginInfrastructure.Advanced.DeploymentService.IUpdateService")] 195 182 public interface IUpdateService … … 205 192 HeuristicLab.PluginInfrastructure.Advanced.DeploymentService.PluginDescription[] GetPlugins(); 206 193 } 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()] 214 200 [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] 215 201 public partial class UpdateServiceClient : System.ServiceModel.ClientBase<HeuristicLab.PluginInfrastructure.Advanced.DeploymentService.IUpdateService>, HeuristicLab.PluginInfrastructure.Advanced.DeploymentService.IUpdateService … … 255 241 } 256 242 } 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")] 274 259 public interface IAdminServiceChannel : HeuristicLab.PluginInfrastructure.Advanced.DeploymentService.IAdminService, System.ServiceModel.IClientChannel 275 260 { 276 261 } 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 } 322 298 } -
branches/PersistenceReintegration/HeuristicLab.PluginInfrastructure/3.3/Advanced/InstallationManager.cs
r14185 r14927 54 54 client.Close(); 55 55 return plugins; 56 } 57 catch (TimeoutException e) { 56 } catch (TimeoutException e) { 58 57 client.Abort(); 59 58 throw new InstallationManagerException("Time out while connecting to server.", e); 60 } 61 catch (FaultException e) { 59 } catch (FaultException e) { 62 60 client.Abort(); 63 61 throw new InstallationManagerException("Fault in connection to server.", e); 64 } 65 catch (CommunicationException e) { 62 } catch (CommunicationException e) { 66 63 client.Abort(); 67 64 throw new InstallationManagerException("General communication exception in connection to server.", e); … … 79 76 client.Close(); 80 77 return products; 81 } 82 catch (TimeoutException e) { 78 } catch (TimeoutException e) { 83 79 client.Abort(); 84 80 throw new InstallationManagerException("Time out while connecting to server.", e); 85 } 86 catch (FaultException e) { 81 } catch (FaultException e) { 87 82 client.Abort(); 88 83 throw new InstallationManagerException("Fault in connection to server.", e); 89 } 90 catch (CommunicationException e) { 84 } catch (CommunicationException e) { 91 85 client.Abort(); 92 86 throw new InstallationManagerException("General communication exception in connection to server.", e); … … 111 105 } 112 106 client.Close(); 113 } 114 catch (TimeoutException e) { 107 } catch (TimeoutException e) { 115 108 client.Abort(); 116 109 throw new InstallationManagerException("Time out while connecting to server.", e); 117 } 118 catch (FaultException e) { 110 } catch (FaultException e) { 119 111 client.Abort(); 120 112 throw new InstallationManagerException("Fault in connection to server.", e); 121 } 122 catch (CommunicationException e) { 113 } catch (CommunicationException e) { 123 114 client.Abort(); 124 115 throw new InstallationManagerException("General communication exception in connection to server.", e); … … 146 137 } 147 138 client.Close(); 148 } 149 catch (TimeoutException e) { 139 } catch (TimeoutException e) { 150 140 client.Abort(); 151 141 throw new InstallationManagerException("Time out while connecting to server.", e); 152 } 153 catch (FaultException e) { 142 } catch (FaultException e) { 154 143 client.Abort(); 155 144 throw new InstallationManagerException("Fault in connection to server.", e); 156 } 157 catch (CommunicationException e) { 145 } catch (CommunicationException e) { 158 146 client.Abort(); 159 147 throw new InstallationManagerException("General communication exception in connection to server.", e); -
branches/PersistenceReintegration/HeuristicLab.PluginInfrastructure/3.3/ErrorHandling/ErrorDialog.cs
r14185 r14927 58 58 System.Diagnostics.Process.Start("mailto:" + supportLinkLabel.Text); 59 59 supportLinkLabel.LinkVisited = true; 60 } 61 catch (Exception) { } 60 } catch (Exception) { } 62 61 } 63 62 } -
branches/PersistenceReintegration/HeuristicLab.PluginInfrastructure/3.3/LightweightApplicationManager.cs
r14185 r14927 75 75 foreach (Type t in GetTypes(type)) { 76 76 object instance = null; 77 try { instance = Activator.CreateInstance(t); } 78 catch { } 77 try { instance = Activator.CreateInstance(t); } catch { } 79 78 if (instance != null) instances.Add(instance); 80 79 } … … 138 137 139 138 return matchingTypes; 140 } 141 catch (TypeLoadException) { 139 } catch (TypeLoadException) { 142 140 return Enumerable.Empty<Type>(); 143 } 144 catch (ReflectionTypeLoadException) { 141 } catch (ReflectionTypeLoadException) { 145 142 return Enumerable.Empty<Type>(); 146 143 } -
branches/PersistenceReintegration/HeuristicLab.PluginInfrastructure/3.3/Manager/PluginManager.cs
r14185 r14927 83 83 // forward all events from the remoteValidator to listeners 84 84 remoteValidator.PluginLoaded += 85 delegate (object sender, PluginInfrastructureEventArgs e) {85 delegate (object sender, PluginInfrastructureEventArgs e) { 86 86 OnPluginLoaded(e); 87 87 }; … … 90 90 plugins.AddRange(remoteValidator.Plugins); 91 91 applications.AddRange(remoteValidator.Applications); 92 } 93 finally { 92 } finally { 94 93 // discard the AppDomain that was used for plugin discovery 95 94 AppDomain.Unload(pluginDomain); … … 130 129 OnApplicationStarted(new PluginInfrastructureEventArgs(appInfo)); 131 130 applicationManager.Run(appInfo, args); 132 } 133 finally { 131 } finally { 134 132 // make sure domain is unloaded in all cases 135 133 AppDomain.Unload(applicationDomain); -
branches/PersistenceReintegration/HeuristicLab.PluginInfrastructure/3.3/Manager/PluginValidator.cs
r14185 r14927 184 184 RegisterLoadedAssembly(asm); 185 185 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 191 188 } 192 189 return assemblies; … … 217 214 desc.Disable(errorStrBuiler.ToString()); 218 215 } 219 } 220 catch (BadImageFormatException ex) { 216 } catch (BadImageFormatException ex) { 221 217 // disable the plugin 222 218 desc.Disable("Problem while loading plugin assemblies:" + Environment.NewLine + "BadImageFormatException: " + ex.Message); 223 } 224 catch (FileNotFoundException ex) { 219 } catch (FileNotFoundException ex) { 225 220 // disable the plugin 226 221 desc.Disable("Problem while loading plugin assemblies:" + Environment.NewLine + "FileNotFoundException: " + ex.Message); 227 } 228 catch (FileLoadException ex) { 222 } catch (FileLoadException ex) { 229 223 // disable the plugin 230 224 desc.Disable("Problem while loading plugin assemblies:" + Environment.NewLine + "FileLoadException: " + ex.Message); 231 } 232 catch (ArgumentException ex) { 225 } catch (ArgumentException ex) { 233 226 // disable the plugin 234 227 desc.Disable("Problem while loading plugin assemblies:" + Environment.NewLine + "ArgumentException: " + ex.Message); 235 } 236 catch (SecurityException ex) { 228 } catch (SecurityException ex) { 237 229 // disable the plugin 238 230 desc.Disable("Problem while loading plugin assemblies:" + Environment.NewLine + "SecurityException: " + ex.Message); … … 261 253 // ignore exceptions. Just don't yield a plugin description when an exception is thrown 262 254 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) { 271 259 } 272 260 } … … 340 328 try { 341 329 version = new Version((string)dependencyAttr.ConstructorArguments[1].Value); // might throw FormatException 342 } 343 catch (FormatException ex) { 330 } catch (FormatException ex) { 344 331 throw new InvalidPluginException("Invalid version format of dependency " + name + " in plugin " + pluginType.ToString(), ex); 345 332 } … … 520 507 Assembly.Load(assemblyName); 521 508 assemblyNames.Add(assemblyName); 522 } 523 catch (BadImageFormatException) { 509 } catch (BadImageFormatException) { 524 510 desc.Disable(Path.GetFileName(assemblyLocation) + " is not a valid assembly."); 525 } 526 catch (FileLoadException) { 511 } catch (FileLoadException) { 527 512 desc.Disable("Can't load file " + Path.GetFileName(assemblyLocation)); 528 } 529 catch (FileNotFoundException) { 513 } catch (FileNotFoundException) { 530 514 desc.Disable("File " + Path.GetFileName(assemblyLocation) + " is missing."); 531 } 532 catch (SecurityException) { 515 } catch (SecurityException) { 533 516 desc.Disable("File " + Path.GetFileName(assemblyLocation) + " can't be loaded because of security constraints."); 534 } 535 catch (NotSupportedException ex) { 517 } catch (NotSupportedException ex) { 536 518 // disable the plugin 537 519 desc.Disable("Problem while loading plugin assemblies:" + Environment.NewLine + "NotSupportedException: " + ex.Message); -
branches/PersistenceReintegration/HeuristicLab.PluginInfrastructure/3.3/SandboxApplicationManager.cs
r14185 r14927 119 119 try { 120 120 runnablePlugin.Run(args); 121 } 122 finally { 121 } finally { 123 122 // unload plugins in reverse order 124 123 foreach (var plugin in loadedPlugins.Reverse<IPlugin>()) { … … 150 149 foreach (Type t in GetTypes(typeof(T), plugin, onlyInstantiable: true, includeGenericTypeDefinitions: false)) { 151 150 T instance = null; 152 try { instance = (T)Activator.CreateInstance(t); } 153 catch { } 151 try { instance = (T)Activator.CreateInstance(t); } catch { } 154 152 if (instance != null) instances.Add(instance); 155 153 } … … 166 164 foreach (Type t in GetTypes(typeof(T), asm, onlyInstantiable: true, includeGenericTypeDefinitions: false)) { 167 165 T instance = null; 168 try { instance = (T)Activator.CreateInstance(t); } 169 catch { } 166 try { instance = (T)Activator.CreateInstance(t); } catch { } 170 167 if (instance != null) instances.Add(instance); 171 168 } … … 191 188 foreach (Type t in GetTypes(type, onlyInstantiable: true, includeGenericTypeDefinitions: false)) { 192 189 object instance = null; 193 try { instance = Activator.CreateInstance(t); } 194 catch { } 190 try { instance = Activator.CreateInstance(t); } catch { } 195 191 if (instance != null) instances.Add(instance); 196 192 } -
branches/PersistenceReintegration/HeuristicLab.PluginInfrastructure/3.3/Starter/SplashScreen.cs
r14185 r14927 101 101 try { 102 102 Invoke((Action<string>)UpdateMessage, msg); 103 } 104 catch (ObjectDisposedException) { } 103 } catch (ObjectDisposedException) { } 105 104 } 106 105
Note: See TracChangeset
for help on using the changeset viewer.