Changeset 2527 for branches/PluginInfrastructure Refactoring
- Timestamp:
- 11/23/09 20:27:43 (15 years ago)
- Location:
- branches/PluginInfrastructure Refactoring/HeuristicLab.PluginInfrastructure
- Files:
-
- 1 deleted
- 18 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/PluginInfrastructure Refactoring/HeuristicLab.PluginInfrastructure/Advanced/InstallationManager.cs
r2517 r2527 116 116 117 117 private static IEnumerable<string> GetDeclaredDependencies(PluginDescription desc) { 118 var plugin = DefaultApplicationManager.GetInstances<IPlugin>(desc).Single();118 var plugin = ApplicationManager.GetInstances<IPlugin>(desc).Single(); 119 119 return plugin.GetType().GetCustomAttributes(typeof(PluginDependencyAttribute), false).Cast<PluginDependencyAttribute>().Select(x => x.Dependency); 120 120 } … … 146 146 147 147 public void Install(IEnumerable<string> pluginNames) { 148 IEnumerable<PluginInformation> pluginsToInstall; 149 using (UpdateLocationClient updateLocation = new UpdateLocationClient()) { 150 pluginsToInstall = from pluginName in pluginNames 151 select GetMatchingPluginInformation(pluginName, updateLocation.GetAvailablePlugins()); 152 153 var args = new PluginInfrastructureCancelEventArgs("Installing", pluginsToInstall); 154 OnPreInstall(args); 155 foreach (var pluginInfo in pluginsToInstall) { 156 var s = updateLocation.GetPackedPlugin(pluginInfo); 157 Console.WriteLine("Downloading: {0} {1} {2}", pluginInfo.Name, pluginInfo.Version, pluginInfo.BuildDate); 158 } 159 } 160 OnInstalled(new PluginInfrastructureEventArgs("Installed", pluginsToInstall)); 161 } 162 163 private static PluginInformation GetMatchingPluginInformation(string pluginName, IEnumerable<PluginInformation> plugins) { 164 var exactMatch = from pluginDesc in plugins 165 where string.Equals(pluginName, pluginDesc.Name, StringComparison.InvariantCultureIgnoreCase) 166 select pluginDesc; 167 var inexactMatch = from pluginDesc in plugins 168 where MatchPluginNameInexact(pluginName, pluginDesc.Name) 169 select pluginDesc; 170 return exactMatch.Count() > 0 ? exactMatch.Single() : inexactMatch.First(); 171 } 148 throw new NotImplementedException(); 149 //IEnumerable<PluginInformation> pluginsToInstall; 150 //using (UpdateLocationClient updateLocation = new UpdateLocationClient()) { 151 // pluginsToInstall = from pluginName in pluginNames 152 // from matchingPlugin in updateLocation.GetAvailablePluginsByName(pluginName) 153 // select matchingPlugin; 154 155 // var args = new PluginInfrastructureCancelEventArgs("Installing", pluginsToInstall); 156 // OnPreInstall(args); 157 // foreach (var pluginInfo in pluginsToInstall) { 158 // var s = updateLocation.GetPluginFiles(pluginInfo); 159 // Console.WriteLine("Downloading: {0} {1} {2}", pluginInfo.Name, pluginInfo.Version, pluginInfo.BuildDate); 160 // } 161 //} 162 //OnInstalled(new PluginInfrastructureEventArgs("Installed", pluginsToInstall)); 163 } 164 165 //private static PluginInformation GetMatchingPluginInformation(string pluginName, IEnumerable<PluginInformation> plugins) { 166 // var exactMatch = from pluginDesc in plugins 167 // where string.Equals(pluginName, pluginDesc.Name, StringComparison.InvariantCultureIgnoreCase) 168 // select pluginDesc; 169 // var inexactMatch = from pluginDesc in plugins 170 // where MatchPluginNameInexact(pluginName, pluginDesc.Name) 171 // select pluginDesc; 172 // return exactMatch.Count() > 0 ? exactMatch.Single() : inexactMatch.First(); 173 //} 172 174 173 175 public void Remove(IEnumerable<string> pluginNames) { … … 188 190 189 191 public void Update(IEnumerable<string> pluginNames) { 190 throw new NotImplementedException(); 192 var pluginDescriptions = from name in pluginNames 193 select GetPluginDescription(name); 194 Dictionary<PluginInformation, string> matchingPlugins = new Dictionary<PluginInformation, string>(); 195 foreach (var updateLocation in HeuristicLab.PluginInfrastructure.Properties.Settings.Default.UpdateLocations) { 196 using (UpdateLocationClient client = new UpdateLocationClient("", updateLocation)) { 197 var updateLocationMatchingPlugins = from desc in pluginDescriptions 198 from info in client.GetAvailablePluginsByName(desc.Name) 199 select info; 200 foreach (PluginInformation info in updateLocationMatchingPlugins) { 201 // keep only the highest version and most recent build of any plugin 202 var existingPlugin = matchingPlugins.Keys.FirstOrDefault(x => x.Name == info.Name); 203 if (existingPlugin == null || existingPlugin.Version < info.Version || (existingPlugin.Version == info.Version && existingPlugin.BuildDate < info.BuildDate)) { 204 matchingPlugins.Remove(existingPlugin); 205 matchingPlugins.Add(info, updateLocation); 206 } 207 } 208 } 209 } 210 PluginInfrastructureCancelEventArgs args = new PluginInfrastructureCancelEventArgs("Updating", matchingPlugins.Keys); 211 OnPreUpdate(args); 212 if (!args.Cancel) { 213 var groupedInfos = matchingPlugins.GroupBy(x => x.Value); 214 foreach (var group in groupedInfos) { 215 using (UpdateLocationClient client = new UpdateLocationClient(group.Key)) { 216 foreach (var info in group) { 217 client.GetPluginFiles(info.Key); 218 } 219 } 220 } 221 OnUpdated(new PluginInfrastructureEventArgs("Updated", matchingPlugins.Keys)); 222 } 223 } 224 225 private void OnPreUpdate(PluginInfrastructureCancelEventArgs args) { 226 if (PreUpdatePlugin != null) PreUpdatePlugin(this, args); 227 } 228 229 private void OnUpdated(PluginInfrastructureEventArgs args) { 230 if (PluginUpdated != null) PluginUpdated(this, args); 191 231 } 192 232 -
branches/PluginInfrastructure Refactoring/HeuristicLab.PluginInfrastructure/Advanced/InstallationManagerConsole.cs
r2517 r2527 6 6 using System.IO; 7 7 using System.ComponentModel; 8 using HeuristicLab.PluginInfrastructure.UpdateLocationReference; 8 9 9 10 namespace HeuristicLab.PluginInfrastructure.Advanced { 10 11 public class InstallationManagerConsole { 11 12 private InstallationManager installManager; 12 public InstallationManagerConsole( ) {13 this.installManager = new InstallationManager( Path.GetFullPath(HeuristicLab.PluginInfrastructure.Properties.Settings.Default.PluginDir));13 public InstallationManagerConsole(string pluginDir) { 14 this.installManager = new InstallationManager(pluginDir); 14 15 installManager.PreInstallPlugin += new EventHandler<PluginInfrastructureCancelEventArgs>(installManager_PreInstallPlugin); 15 16 installManager.PreRemovePlugin += new EventHandler<PluginInfrastructureCancelEventArgs>(installManager_PreRemovePlugin); … … 21 22 22 23 void installManager_PreUpdatePlugin(object sender, PluginInfrastructureCancelEventArgs e) { 23 throw new NotImplementedException(); 24 Console.WriteLine("Following plugins are updated:"); 25 var infos = (IEnumerable<PluginInformation>)e.Entity; 26 foreach (var info in infos) { 27 Console.WriteLine(info.Name + " " + info.Version + " " + info.BuildDate); 28 } 29 if (GetUserConfirmation()) e.Cancel = false; 30 else e.Cancel = true; 31 return; 24 32 } 25 33 26 34 void installManager_PluginUpdated(object sender, PluginInfrastructureEventArgs e) { 27 throw new NotImplementedException(); 35 foreach (var info in (IEnumerable<PluginInformation>)e.Entity) 36 Console.WriteLine("Updated: {0}", info.Name); 28 37 } 29 38 … … 45 54 46 55 void installManager_PreInstallPlugin(object sender, PluginInfrastructureCancelEventArgs e) { 47 56 48 57 } 49 58 50 59 void installManager_PluginInstalled(object sender, PluginInfrastructureEventArgs e) { 51 60 52 61 } 53 62 -
branches/PluginInfrastructure Refactoring/HeuristicLab.PluginInfrastructure/ApplicationManager.cs
r2503 r2527 28 28 using System.Security; 29 29 using System.Linq; 30 using HeuristicLab.PluginInfrastructure.Manager; 31 using System.IO; 30 32 31 33 namespace HeuristicLab.PluginInfrastructure { … … 35 37 /// The application manager provides 36 38 /// </summary> 37 public s tatic classApplicationManager {39 public sealed class ApplicationManager : MarshalByRefObject, IApplicationManager { 38 40 private static IApplicationManager appManager; 39 41 /// <summary> … … 42 44 public static IApplicationManager Manager { 43 45 get { return appManager; } 46 } 47 48 internal event EventHandler<PluginInfrastructureEventArgs> PluginLoaded; 49 internal event EventHandler<PluginInfrastructureEventArgs> PluginUnloaded; 50 51 // cache for the AssemblyResolveEvent 52 // which must be handled when assemblies are loaded dynamically after the application start 53 private Dictionary<string, Assembly> loadedAssemblies; 54 55 private List<IPlugin> loadedPlugins; 56 57 private List<PluginDescription> plugins; 58 /// <summary> 59 /// Gets all plugins. 60 /// </summary> 61 public IEnumerable<IPluginDescription> Plugins { 62 get { return plugins.Cast<IPluginDescription>(); } 63 } 64 65 private List<ApplicationDescription> applications; 66 /// <summary> 67 /// Gets all installed applications. 68 /// </summary> 69 public IEnumerable<IApplicationDescription> Applications { 70 get { return applications.Cast<IApplicationDescription>(); } 71 } 72 73 internal ApplicationManager() 74 : base() { 75 loadedAssemblies = new Dictionary<string, Assembly>(); 76 loadedPlugins = new List<IPlugin>(); 77 // needed for the special case when assemblies are loaded dynamically via LoadAssemblies() 78 AppDomain.CurrentDomain.AssemblyResolve += (sender, args) => { 79 if (loadedAssemblies.ContainsKey(args.Name)) { 80 return loadedAssemblies[args.Name]; 81 } 82 return null; 83 }; 84 } 85 86 internal void PrepareApplicationDomain(IEnumerable<ApplicationDescription> apps, IEnumerable<PluginDescription> plugins) { 87 this.plugins = new List<PluginDescription>(plugins); 88 this.applications = new List<ApplicationDescription>(apps); 89 RegisterApplicationManager((IApplicationManager)this); 90 LoadPlugins(plugins); 44 91 } 45 92 … … 52 99 appManager = manager; 53 100 } 101 102 private void LoadPlugins(IEnumerable<PluginDescription> plugins) { 103 // load all loadable plugins (all dependencies available) into the execution context 104 foreach (var desc in PluginDescriptionIterator.IterateDependenciesBottomUp(plugins.Where(x => x.PluginState != PluginState.Disabled))) { 105 foreach (string assembly in desc.Assemblies) { 106 var asm = Assembly.LoadFrom(assembly); 107 108 // instantiate and load all plugins in this assembly 109 foreach (var plugin in GetInstances<IPlugin>(asm)) { 110 plugin.OnLoad(); 111 loadedPlugins.Add(plugin); 112 } 113 } 114 OnPluginLoaded(new PluginInfrastructureEventArgs("Plugin loaded", desc)); 115 desc.Load(); 116 } 117 } 118 119 internal void Run(ApplicationDescription appInfo) { 120 IApplication runnablePlugin = (IApplication)Activator.CreateInstance(appInfo.DeclaringAssemblyName, appInfo.DeclaringTypeName).Unwrap(); 121 try { 122 runnablePlugin.Run(); 123 } 124 finally { 125 // unload plugins in reverse order 126 foreach (var plugin in loadedPlugins.Reverse<IPlugin>()) { 127 plugin.OnUnload(); 128 } 129 foreach (var desc in PluginDescriptionIterator.IterateDependenciesBottomUp(plugins.Where(x => x.PluginState != PluginState.Disabled))) { 130 desc.Unload(); 131 OnPluginUnloaded(new PluginInfrastructureEventArgs("Plugin unloaded", desc)); 132 } 133 } 134 } 135 136 /// <summary> 137 /// Loads assemblies dynamically from a byte array 138 /// </summary> 139 /// <param name="plugins">bytearray of all assemblies that should be loaded</param> 140 public void LoadAssemblies(IEnumerable<byte[]> assemblies) { 141 foreach (byte[] asm in assemblies) { 142 Assembly loadedAsm = Assembly.Load(asm); 143 RegisterLoadedAssembly(loadedAsm); 144 } 145 } 146 147 // register assembly in the assembly cache for the AssemblyResolveEvent 148 private void RegisterLoadedAssembly(Assembly asm) { 149 loadedAssemblies.Add(asm.FullName, asm); 150 loadedAssemblies.Add(asm.GetName().Name, asm); // add short name 151 } 152 153 /// <summary> 154 /// Creates an instance of all types that are subtypes or the same type of the specified type and declared in <paramref name="plugin"/> 155 /// </summary> 156 /// <typeparam name="T">Most general type.</typeparam> 157 /// <returns>Enumerable of the created instances.</returns> 158 public static IEnumerable<T> GetInstances<T>(IPluginDescription plugin) where T : class { 159 return from t in GetTypes(typeof(T), plugin) 160 select (T)Activator.CreateInstance(t); 161 } 162 /// <summary> 163 /// Creates an instance of all types declared in assembly <param name="asm"/> that are subtypes or the same type of the specified type and declared in <paramref name="plugin"/> 164 /// </summary> 165 /// <typeparam name="T">Most general type.</typeparam> 166 /// <param name="asm">Declaring assembly.</param> 167 /// <returns>Enumerable of the created instances.</returns> 168 private static IEnumerable<T> GetInstances<T>(Assembly asm) where T : class { 169 return from t in GetTypes(typeof(T), asm) 170 select (T)Activator.CreateInstance(t); 171 } 172 /// <summary> 173 /// Creates an instance of all types that are subtypes or the same type of the specified type 174 /// </summary> 175 /// <typeparam name="T">Most general type.</typeparam> 176 /// <returns>Enumerable of the created instances.</returns> 177 public static IEnumerable<T> GetInstances<T>() where T : class { 178 return from i in GetInstances(typeof(T)) 179 select (T)i; 180 } 181 182 /// <summary> 183 /// Creates an instance of all types that are subtypes or the same type of the specified type 184 /// </summary> 185 /// <typeparam name="type">Most general type.</typeparam> 186 /// <returns>Enumerable of the created instances.</returns> 187 public static IEnumerable<object> GetInstances(Type type) { 188 return from t in GetTypes(type) 189 select Activator.CreateInstance(t); 190 } 191 192 /// <summary> 193 /// Finds all types that are subtypes or equal to the specified type. 194 /// </summary> 195 /// <param name="type">Most general type for which to find matching types.</param> 196 /// <returns>Enumerable of the discovered types.</returns> 197 public static IEnumerable<Type> GetTypes(Type type) { 198 return from asm in AppDomain.CurrentDomain.GetAssemblies() 199 from t in GetTypes(type, asm) 200 select t; 201 } 202 203 /// <summary> 204 /// Finds all types that are subtypes or equal to the specified type if they are part of the given 205 /// <paramref name="plugin"/>. 206 /// </summary> 207 /// <param name="type">Most general type for which to find matching types.</param> 208 /// <param name="plugin">The plugin the subtypes must be part of.</param> 209 /// <returns>Enumerable of the discovered types.</returns> 210 public static IEnumerable<Type> GetTypes(Type type, IPluginDescription pluginDescription) { 211 PluginDescription pluginDesc = (PluginDescription)pluginDescription; 212 return from asm in AppDomain.CurrentDomain.GetAssemblies() 213 where pluginDesc.Assemblies.Any(asmPath => Path.GetFullPath(asmPath) == Path.GetFullPath(asm.Location)) 214 from t in GetTypes(type, asm) 215 select t; 216 } 217 218 /// <summary> 219 /// Gets types that are assignable (same of subtype) to the specified type only from the given assembly. 220 /// </summary> 221 /// <param name="type">Most general type we want to find.</param> 222 /// <param name="assembly">Assembly that should be searched for types.</param> 223 /// <returns>Enumerable of the discovered types.</returns> 224 private static IEnumerable<Type> GetTypes(Type type, Assembly assembly) { 225 return GetTypes(type, assembly, false); 226 } 227 228 private static IEnumerable<Type> GetTypes(Type type, Assembly assembly, bool includeNotInstantiableTypes) { 229 return from t in assembly.GetTypes() 230 where type.IsAssignableFrom(t) 231 where includeNotInstantiableTypes || (type.IsAssignableFrom(t) && !t.IsAbstract && !t.IsInterface && !t.HasElementType) 232 select t; 233 } 234 235 private void OnPluginLoaded(PluginInfrastructureEventArgs e) { 236 if (PluginLoaded != null) PluginLoaded(this, e); 237 } 238 239 private void OnPluginUnloaded(PluginInfrastructureEventArgs e) { 240 if (PluginUnloaded != null) PluginUnloaded(this, e); 241 } 242 243 // infinite lease time 244 /// <summary> 245 /// Initializes the life time service with infinite lease time. 246 /// </summary> 247 /// <returns><c>null</c>.</returns> 248 public override object InitializeLifetimeService() { 249 return null; 250 } 251 252 #region IApplicationManager Members 253 254 255 IEnumerable<T> IApplicationManager.GetInstances<T>(IPluginDescription plugin) { 256 return GetInstances<T>(plugin); 257 } 258 259 IEnumerable<T> IApplicationManager.GetInstances<T>() { 260 return GetInstances<T>(); 261 } 262 263 IEnumerable<Type> IApplicationManager.GetTypes(Type type) { 264 return GetTypes(type); 265 } 266 267 IEnumerable<Type> IApplicationManager.GetTypes(Type type, IPluginDescription plugin) { 268 return GetTypes(type, plugin); 269 } 270 271 #endregion 54 272 } 55 273 } -
branches/PluginInfrastructure Refactoring/HeuristicLab.PluginInfrastructure/HeuristicLab.PluginInfrastructure.csproj
r2517 r2527 111 111 <Compile Include="Manager\ApplicationDescription.cs" /> 112 112 <Compile Include="Manager\PluginInfrastructureCancelEventArgs.cs" /> 113 <Compile Include="Manager\DefaultApplicationManager.cs" />114 113 <Compile Include="Manager\PluginDescription.cs" /> 115 114 <Compile Include="Manager\PluginInfrastructureEventArgs.cs" /> -
branches/PluginInfrastructure Refactoring/HeuristicLab.PluginInfrastructure/Manager/ApplicationDescription.cs
r2517 r2527 53 53 /// Gets or sets the description of the application. 54 54 /// </summary> 55 internalstring Description {55 public string Description { 56 56 get { return description; } 57 set { description = value; }57 internal set { description = value; } 58 58 } 59 59 -
branches/PluginInfrastructure Refactoring/HeuristicLab.PluginInfrastructure/Manager/PluginManager.cs
r2513 r2527 104 104 AppDomain.Unload(pluginDomain); 105 105 // unload all plugins 106 foreach (var pluginDescription in plugins )106 foreach (var pluginDescription in plugins.Where(x => x.PluginState == PluginState.Loaded)) 107 107 pluginDescription.Unload(); 108 108 initialized = true; … … 128 128 setup.PrivateBinPath = pluginDir; 129 129 applicationDomain = AppDomain.CreateDomain(appInfo.Name, null, setup); 130 Type applicationManagerType = typeof( DefaultApplicationManager);131 DefaultApplicationManager applicationManager =132 ( DefaultApplicationManager)applicationDomain.CreateInstanceAndUnwrap(applicationManagerType.Assembly.FullName, applicationManagerType.FullName, true, BindingFlags.NonPublic | BindingFlags.Instance, null, null, null, null, null);130 Type applicationManagerType = typeof(ApplicationManager); 131 ApplicationManager applicationManager = 132 (ApplicationManager)applicationDomain.CreateInstanceAndUnwrap(applicationManagerType.Assembly.FullName, applicationManagerType.FullName, true, BindingFlags.NonPublic | BindingFlags.Instance, null, null, null, null, null); 133 133 applicationManager.PluginLoaded += applicationManager_PluginLoaded; 134 134 applicationManager.PluginUnloaded += applicationManager_PluginUnloaded; -
branches/PluginInfrastructure Refactoring/HeuristicLab.PluginInfrastructure/Manager/PluginValidator.cs
r2517 r2527 27 27 using System.Diagnostics; 28 28 using System.Linq; 29 using System.Security; 29 30 30 31 … … 86 87 pluginDependencies.Clear(); 87 88 88 IEnumerable<Assembly> reflectionOnlyAssemblies = ReflectionOnlyLoadDlls( );89 IEnumerable<Assembly> reflectionOnlyAssemblies = ReflectionOnlyLoadDlls(PluginDir); 89 90 IEnumerable<PluginDescription> pluginDescriptions = GatherPluginDescriptions(reflectionOnlyAssemblies); 90 91 CheckPluginFiles(pluginDescriptions); 92 93 CheckPluginAssemblies(pluginDescriptions); 91 94 92 95 // a full list of plugin descriptions is available now we can build the dependency tree … … 137 140 } 138 141 139 private IEnumerable<Assembly> ReflectionOnlyLoadDlls() {142 private static IEnumerable<Assembly> ReflectionOnlyLoadDlls(string baseDir) { 140 143 List<Assembly> assemblies = new List<Assembly>(); 144 // recursively load .dll files in subdirectories 145 foreach (string dirName in Directory.GetDirectories(baseDir)) { 146 assemblies.AddRange(ReflectionOnlyLoadDlls(dirName)); 147 } 141 148 // try to load each .dll file in the plugin directory into the reflection only context 142 foreach (string filename in Directory.GetFiles( PluginDir, "*.dll")) {149 foreach (string filename in Directory.GetFiles(baseDir, "*.dll")) { 143 150 try { 144 151 assemblies.Add(Assembly.ReflectionOnlyLoadFrom(filename)); 145 152 } 146 153 catch (BadImageFormatException) { } // just ignore the case that the .dll file is not a CLR assembly (e.g. a native dll) 154 catch (FileLoadException) { } 155 catch (SecurityException) { } 147 156 } 148 157 return assemblies; 149 158 } 159 160 /// <summary> 161 /// Checks if all plugin assemblies can be loaded. If an assembly can't be loaded the plugin is disabled. 162 /// </summary> 163 /// <param name="pluginDescriptions"></param> 164 private void CheckPluginAssemblies(IEnumerable<PluginDescription> pluginDescriptions) { 165 foreach (var desc in pluginDescriptions.Where(x => x.PluginState != PluginState.Disabled)) { 166 try { 167 foreach (var asm in desc.Assemblies) { 168 Assembly.ReflectionOnlyLoadFrom(asm); 169 } 170 } 171 catch (BadImageFormatException) { 172 // disable the plugin 173 desc.Disable(); 174 } 175 catch (FileNotFoundException) { 176 // disable the plugin 177 desc.Disable(); 178 } 179 catch (FileLoadException) { 180 // disable the plugin 181 desc.Disable(); 182 } 183 catch (ArgumentException) { 184 // disable the plugin 185 desc.Disable(); 186 } 187 catch (SecurityException) { 188 // disable the plugin 189 desc.Disable(); 190 } 191 } 192 } 193 150 194 151 195 // find all types implementing IPlugin in the reflectionOnlyAssemblies and create a list of plugin descriptions … … 158 202 // of the current assembly is missing. 159 203 try { 160 foreach (Type t in assembly.GetExportedTypes()) { 161 // if there is a type that implements IPlugin 162 // use AssemblyQualifiedName to compare the types because we can't directly 163 // compare ReflectionOnly types and Execution types 164 if (!t.IsAbstract && 165 t.GetInterfaces().Any(x => x.AssemblyQualifiedName == typeof(IPlugin).AssemblyQualifiedName)) { 166 // fetch the attributes of the IPlugin type 167 pluginDescriptions.Add(GetPluginDescription(t)); 168 } 169 } 204 // if there is a type that implements IPlugin 205 // use AssemblyQualifiedName to compare the types because we can't directly 206 // compare ReflectionOnly types and execution types 207 var assemblyPluginDescriptions = from t in assembly.GetExportedTypes() 208 where !t.IsAbstract && t.GetInterfaces().Any(x => x.AssemblyQualifiedName == typeof(IPlugin).AssemblyQualifiedName) 209 select GetPluginDescription(t); 210 pluginDescriptions.AddRange(assemblyPluginDescriptions); 170 211 } 171 212 // ignore exceptions. Just don't yield a plugin description when an exception is thrown … … 206 247 string pluginFileName = (string)attributeData.ConstructorArguments[0].Value; 207 248 PluginFileType fileType = (PluginFileType)attributeData.ConstructorArguments[1].Value; 208 pluginFiles.Add(Path. Combine(PluginDir, pluginFileName));249 pluginFiles.Add(Path.GetFullPath(Path.Combine(PluginDir, pluginFileName))); 209 250 if (fileType == PluginFileType.Assembly) { 210 pluginAssemblies.Add(Path. Combine(PluginDir, pluginFileName));251 pluginAssemblies.Add(Path.GetFullPath(Path.Combine(PluginDir, pluginFileName))); 211 252 } 212 253 } … … 302 343 303 344 // checks if all declared plugin files are actually available and disables plugins with missing files 304 private staticvoid CheckPluginFiles(IEnumerable<PluginDescription> pluginDescriptions) {345 private void CheckPluginFiles(IEnumerable<PluginDescription> pluginDescriptions) { 305 346 foreach (PluginDescription desc in pluginDescriptions) { 306 347 if (!CheckPluginFiles(desc)) { … … 310 351 } 311 352 312 private staticbool CheckPluginFiles(PluginDescription pluginDescription) {353 private bool CheckPluginFiles(PluginDescription pluginDescription) { 313 354 foreach (string filename in pluginDescription.Files) { 314 if (!File.Exists(filename)) { 355 if (!FileLiesInDirectory(PluginDir, filename) || 356 !File.Exists(filename)) { 315 357 return false; 316 358 } 317 359 } 318 360 return true; 361 } 362 363 private static bool FileLiesInDirectory(string dir, string fileName) { 364 var basePath = Path.GetFullPath(dir); 365 return Path.GetFullPath(fileName).StartsWith(basePath); 319 366 } 320 367 -
branches/PluginInfrastructure Refactoring/HeuristicLab.PluginInfrastructure/Properties/Settings.Designer.cs
r2504 r2527 26 26 [global::System.Configuration.ApplicationScopedSettingAttribute()] 27 27 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 28 [global::System.Configuration.DefaultSettingValueAttribute("plugins")] 29 public string PluginDir { 30 get { 31 return ((string)(this["PluginDir"])); 32 } 33 } 34 35 [global::System.Configuration.ApplicationScopedSettingAttribute()] 36 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 37 [global::System.Configuration.DefaultSettingValueAttribute("")] 28 [global::System.Configuration.DefaultSettingValueAttribute("Gabriel Kronberger")] 38 29 public string User { 39 30 get { … … 44 35 [global::System.Configuration.ApplicationScopedSettingAttribute()] 45 36 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 46 [global::System.Configuration.DefaultSettingValueAttribute(" ")]37 [global::System.Configuration.DefaultSettingValueAttribute("HEAL")] 47 38 public string Organization { 48 39 get { … … 50 41 } 51 42 } 43 44 [global::System.Configuration.ApplicationScopedSettingAttribute()] 45 [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 46 [global::System.Configuration.DefaultSettingValueAttribute("<?xml version=\"1.0\" encoding=\"utf-16\"?>\r\n<ArrayOfString xmlns:xsi=\"http://www.w3." + 47 "org/2001/XMLSchema-instance\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\">\r\n <s" + 48 "tring>http://localhost:59253/UpdateLocation.svc</string>\r\n</ArrayOfString>")] 49 public global::System.Collections.Specialized.StringCollection UpdateLocations { 50 get { 51 return ((global::System.Collections.Specialized.StringCollection)(this["UpdateLocations"])); 52 } 53 } 52 54 } 53 55 } -
branches/PluginInfrastructure Refactoring/HeuristicLab.PluginInfrastructure/Properties/Settings.settings
r2504 r2527 3 3 <Profiles /> 4 4 <Settings> 5 <Setting Name="PluginDir" Type="System.String" Scope="Application">6 <Value Profile="(Default)">plugins</Value>7 </Setting>8 5 <Setting Name="User" Type="System.String" Scope="Application"> 9 <Value Profile="(Default)" />6 <Value Profile="(Default)">Gabriel Kronberger</Value> 10 7 </Setting> 11 8 <Setting Name="Organization" Type="System.String" Scope="Application"> 12 <Value Profile="(Default)" /> 9 <Value Profile="(Default)">HEAL</Value> 10 </Setting> 11 <Setting Name="UpdateLocations" Type="System.Collections.Specialized.StringCollection" Scope="Application"> 12 <Value Profile="(Default)"><?xml version="1.0" encoding="utf-16"?> 13 <ArrayOfString xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> 14 <string>http://localhost:59253/UpdateLocation.svc</string> 15 </ArrayOfString></Value> 13 16 </Setting> 14 17 </Settings> -
branches/PluginInfrastructure Refactoring/HeuristicLab.PluginInfrastructure/Service References/UpdateLocationReference/Reference.cs
r2517 r2527 95 95 internal interface IUpdateLocation { 96 96 97 [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IUpdateLocation/GetAvailablePlugins ", ReplyAction="http://tempuri.org/IUpdateLocation/GetAvailablePluginsResponse")]98 HeuristicLab.PluginInfrastructure.UpdateLocationReference.PluginInformation[] GetAvailablePlugins ();97 [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IUpdateLocation/GetAvailablePluginsByName", ReplyAction="http://tempuri.org/IUpdateLocation/GetAvailablePluginsByNameResponse")] 98 HeuristicLab.PluginInfrastructure.UpdateLocationReference.PluginInformation[] GetAvailablePluginsByName(string name); 99 99 100 [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IUpdateLocation/GetP ackedPlugin", ReplyAction="http://tempuri.org/IUpdateLocation/GetPackedPluginResponse")]101 System.IO.Stream GetPackedPlugin(HeuristicLab.PluginInfrastructure.UpdateLocationReference.PluginInformation info);100 [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IUpdateLocation/GetPluginFiles", ReplyAction="http://tempuri.org/IUpdateLocation/GetPluginFilesResponse")] 101 byte[][] GetPluginFiles(HeuristicLab.PluginInfrastructure.UpdateLocationReference.PluginInformation info); 102 102 } 103 103 … … 129 129 } 130 130 131 public HeuristicLab.PluginInfrastructure.UpdateLocationReference.PluginInformation[] GetAvailablePlugins () {132 return base.Channel.GetAvailablePlugins ();131 public HeuristicLab.PluginInfrastructure.UpdateLocationReference.PluginInformation[] GetAvailablePluginsByName(string name) { 132 return base.Channel.GetAvailablePluginsByName(name); 133 133 } 134 134 135 public System.IO.Stream GetPackedPlugin(HeuristicLab.PluginInfrastructure.UpdateLocationReference.PluginInformation info) {136 return base.Channel.GetP ackedPlugin(info);135 public byte[][] GetPluginFiles(HeuristicLab.PluginInfrastructure.UpdateLocationReference.PluginInformation info) { 136 return base.Channel.GetPluginFiles(info); 137 137 } 138 138 } -
branches/PluginInfrastructure Refactoring/HeuristicLab.PluginInfrastructure/Service References/UpdateLocationReference/UpdateLocation.wsdl
r2517 r2527 107 107 </wsp:ExactlyOne> 108 108 </wsp:Policy> 109 <wsp:Policy wsu:Id="WSHttpBinding_IUpdateLocation_GetAvailablePlugins _Input_policy">110 <wsp:ExactlyOne> 111 <wsp:All> 112 <sp:SignedParts xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy"> 113 <sp:Body /> 114 <sp:Header Name="To" Namespace="http://www.w3.org/2005/08/addressing" /> 115 <sp:Header Name="From" Namespace="http://www.w3.org/2005/08/addressing" /> 116 <sp:Header Name="FaultTo" Namespace="http://www.w3.org/2005/08/addressing" /> 117 <sp:Header Name="ReplyTo" Namespace="http://www.w3.org/2005/08/addressing" /> 118 <sp:Header Name="MessageID" Namespace="http://www.w3.org/2005/08/addressing" /> 119 <sp:Header Name="RelatesTo" Namespace="http://www.w3.org/2005/08/addressing" /> 120 <sp:Header Name="Action" Namespace="http://www.w3.org/2005/08/addressing" /> 121 </sp:SignedParts> 122 <sp:EncryptedParts xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy"> 123 <sp:Body /> 124 </sp:EncryptedParts> 125 </wsp:All> 126 </wsp:ExactlyOne> 127 </wsp:Policy> 128 <wsp:Policy wsu:Id="WSHttpBinding_IUpdateLocation_GetAvailablePlugins _output_policy">129 <wsp:ExactlyOne> 130 <wsp:All> 131 <sp:SignedParts xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy"> 132 <sp:Body /> 133 <sp:Header Name="To" Namespace="http://www.w3.org/2005/08/addressing" /> 134 <sp:Header Name="From" Namespace="http://www.w3.org/2005/08/addressing" /> 135 <sp:Header Name="FaultTo" Namespace="http://www.w3.org/2005/08/addressing" /> 136 <sp:Header Name="ReplyTo" Namespace="http://www.w3.org/2005/08/addressing" /> 137 <sp:Header Name="MessageID" Namespace="http://www.w3.org/2005/08/addressing" /> 138 <sp:Header Name="RelatesTo" Namespace="http://www.w3.org/2005/08/addressing" /> 139 <sp:Header Name="Action" Namespace="http://www.w3.org/2005/08/addressing" /> 140 </sp:SignedParts> 141 <sp:EncryptedParts xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy"> 142 <sp:Body /> 143 </sp:EncryptedParts> 144 </wsp:All> 145 </wsp:ExactlyOne> 146 </wsp:Policy> 147 <wsp:Policy wsu:Id="WSHttpBinding_IUpdateLocation_GetP ackedPlugin_Input_policy">148 <wsp:ExactlyOne> 149 <wsp:All> 150 <sp:SignedParts xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy"> 151 <sp:Body /> 152 <sp:Header Name="To" Namespace="http://www.w3.org/2005/08/addressing" /> 153 <sp:Header Name="From" Namespace="http://www.w3.org/2005/08/addressing" /> 154 <sp:Header Name="FaultTo" Namespace="http://www.w3.org/2005/08/addressing" /> 155 <sp:Header Name="ReplyTo" Namespace="http://www.w3.org/2005/08/addressing" /> 156 <sp:Header Name="MessageID" Namespace="http://www.w3.org/2005/08/addressing" /> 157 <sp:Header Name="RelatesTo" Namespace="http://www.w3.org/2005/08/addressing" /> 158 <sp:Header Name="Action" Namespace="http://www.w3.org/2005/08/addressing" /> 159 </sp:SignedParts> 160 <sp:EncryptedParts xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy"> 161 <sp:Body /> 162 </sp:EncryptedParts> 163 </wsp:All> 164 </wsp:ExactlyOne> 165 </wsp:Policy> 166 <wsp:Policy wsu:Id="WSHttpBinding_IUpdateLocation_GetP ackedPlugin_output_policy">109 <wsp:Policy wsu:Id="WSHttpBinding_IUpdateLocation_GetAvailablePluginsByName_Input_policy"> 110 <wsp:ExactlyOne> 111 <wsp:All> 112 <sp:SignedParts xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy"> 113 <sp:Body /> 114 <sp:Header Name="To" Namespace="http://www.w3.org/2005/08/addressing" /> 115 <sp:Header Name="From" Namespace="http://www.w3.org/2005/08/addressing" /> 116 <sp:Header Name="FaultTo" Namespace="http://www.w3.org/2005/08/addressing" /> 117 <sp:Header Name="ReplyTo" Namespace="http://www.w3.org/2005/08/addressing" /> 118 <sp:Header Name="MessageID" Namespace="http://www.w3.org/2005/08/addressing" /> 119 <sp:Header Name="RelatesTo" Namespace="http://www.w3.org/2005/08/addressing" /> 120 <sp:Header Name="Action" Namespace="http://www.w3.org/2005/08/addressing" /> 121 </sp:SignedParts> 122 <sp:EncryptedParts xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy"> 123 <sp:Body /> 124 </sp:EncryptedParts> 125 </wsp:All> 126 </wsp:ExactlyOne> 127 </wsp:Policy> 128 <wsp:Policy wsu:Id="WSHttpBinding_IUpdateLocation_GetAvailablePluginsByName_output_policy"> 129 <wsp:ExactlyOne> 130 <wsp:All> 131 <sp:SignedParts xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy"> 132 <sp:Body /> 133 <sp:Header Name="To" Namespace="http://www.w3.org/2005/08/addressing" /> 134 <sp:Header Name="From" Namespace="http://www.w3.org/2005/08/addressing" /> 135 <sp:Header Name="FaultTo" Namespace="http://www.w3.org/2005/08/addressing" /> 136 <sp:Header Name="ReplyTo" Namespace="http://www.w3.org/2005/08/addressing" /> 137 <sp:Header Name="MessageID" Namespace="http://www.w3.org/2005/08/addressing" /> 138 <sp:Header Name="RelatesTo" Namespace="http://www.w3.org/2005/08/addressing" /> 139 <sp:Header Name="Action" Namespace="http://www.w3.org/2005/08/addressing" /> 140 </sp:SignedParts> 141 <sp:EncryptedParts xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy"> 142 <sp:Body /> 143 </sp:EncryptedParts> 144 </wsp:All> 145 </wsp:ExactlyOne> 146 </wsp:Policy> 147 <wsp:Policy wsu:Id="WSHttpBinding_IUpdateLocation_GetPluginFiles_Input_policy"> 148 <wsp:ExactlyOne> 149 <wsp:All> 150 <sp:SignedParts xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy"> 151 <sp:Body /> 152 <sp:Header Name="To" Namespace="http://www.w3.org/2005/08/addressing" /> 153 <sp:Header Name="From" Namespace="http://www.w3.org/2005/08/addressing" /> 154 <sp:Header Name="FaultTo" Namespace="http://www.w3.org/2005/08/addressing" /> 155 <sp:Header Name="ReplyTo" Namespace="http://www.w3.org/2005/08/addressing" /> 156 <sp:Header Name="MessageID" Namespace="http://www.w3.org/2005/08/addressing" /> 157 <sp:Header Name="RelatesTo" Namespace="http://www.w3.org/2005/08/addressing" /> 158 <sp:Header Name="Action" Namespace="http://www.w3.org/2005/08/addressing" /> 159 </sp:SignedParts> 160 <sp:EncryptedParts xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy"> 161 <sp:Body /> 162 </sp:EncryptedParts> 163 </wsp:All> 164 </wsp:ExactlyOne> 165 </wsp:Policy> 166 <wsp:Policy wsu:Id="WSHttpBinding_IUpdateLocation_GetPluginFiles_output_policy"> 167 167 <wsp:ExactlyOne> 168 168 <wsp:All> … … 189 189 <xsd:import schemaLocation="http://localhost:59253/UpdateLocation.svc?xsd=xsd2" namespace="http://schemas.datacontract.org/2004/07/HeuristicLab.Update.Service" /> 190 190 <xsd:import schemaLocation="http://localhost:59253/UpdateLocation.svc?xsd=xsd3" namespace="http://schemas.datacontract.org/2004/07/System" /> 191 <xsd:import schemaLocation="http://localhost:59253/UpdateLocation.svc?xsd=xsd4" namespace="http://schemas.microsoft.com/ Message" />191 <xsd:import schemaLocation="http://localhost:59253/UpdateLocation.svc?xsd=xsd4" namespace="http://schemas.microsoft.com/2003/10/Serialization/Arrays" /> 192 192 </xsd:schema> 193 193 </wsdl:types> 194 <wsdl:message name="IUpdateLocation_GetAvailablePlugins _InputMessage">195 <wsdl:part name="parameters" element="tns:GetAvailablePlugins " />196 </wsdl:message> 197 <wsdl:message name="IUpdateLocation_GetAvailablePlugins _OutputMessage">198 <wsdl:part name="parameters" element="tns:GetAvailablePlugins Response" />199 </wsdl:message> 200 <wsdl:message name="IUpdateLocation_GetP ackedPlugin_InputMessage">201 <wsdl:part name="parameters" element="tns:GetP ackedPlugin" />202 </wsdl:message> 203 <wsdl:message name="IUpdateLocation_GetP ackedPlugin_OutputMessage">204 <wsdl:part name="parameters" element="tns:GetP ackedPluginResponse" />194 <wsdl:message name="IUpdateLocation_GetAvailablePluginsByName_InputMessage"> 195 <wsdl:part name="parameters" element="tns:GetAvailablePluginsByName" /> 196 </wsdl:message> 197 <wsdl:message name="IUpdateLocation_GetAvailablePluginsByName_OutputMessage"> 198 <wsdl:part name="parameters" element="tns:GetAvailablePluginsByNameResponse" /> 199 </wsdl:message> 200 <wsdl:message name="IUpdateLocation_GetPluginFiles_InputMessage"> 201 <wsdl:part name="parameters" element="tns:GetPluginFiles" /> 202 </wsdl:message> 203 <wsdl:message name="IUpdateLocation_GetPluginFiles_OutputMessage"> 204 <wsdl:part name="parameters" element="tns:GetPluginFilesResponse" /> 205 205 </wsdl:message> 206 206 <wsdl:portType name="IUpdateLocation"> 207 <wsdl:operation name="GetAvailablePlugins ">208 <wsdl:input wsaw:Action="http://tempuri.org/IUpdateLocation/GetAvailablePlugins " message="tns:IUpdateLocation_GetAvailablePlugins_InputMessage" />209 <wsdl:output wsaw:Action="http://tempuri.org/IUpdateLocation/GetAvailablePlugins Response" message="tns:IUpdateLocation_GetAvailablePlugins_OutputMessage" />210 </wsdl:operation> 211 <wsdl:operation name="GetP ackedPlugin">212 <wsdl:input wsaw:Action="http://tempuri.org/IUpdateLocation/GetP ackedPlugin" message="tns:IUpdateLocation_GetPackedPlugin_InputMessage" />213 <wsdl:output wsaw:Action="http://tempuri.org/IUpdateLocation/GetP ackedPluginResponse" message="tns:IUpdateLocation_GetPackedPlugin_OutputMessage" />207 <wsdl:operation name="GetAvailablePluginsByName"> 208 <wsdl:input wsaw:Action="http://tempuri.org/IUpdateLocation/GetAvailablePluginsByName" message="tns:IUpdateLocation_GetAvailablePluginsByName_InputMessage" /> 209 <wsdl:output wsaw:Action="http://tempuri.org/IUpdateLocation/GetAvailablePluginsByNameResponse" message="tns:IUpdateLocation_GetAvailablePluginsByName_OutputMessage" /> 210 </wsdl:operation> 211 <wsdl:operation name="GetPluginFiles"> 212 <wsdl:input wsaw:Action="http://tempuri.org/IUpdateLocation/GetPluginFiles" message="tns:IUpdateLocation_GetPluginFiles_InputMessage" /> 213 <wsdl:output wsaw:Action="http://tempuri.org/IUpdateLocation/GetPluginFilesResponse" message="tns:IUpdateLocation_GetPluginFiles_OutputMessage" /> 214 214 </wsdl:operation> 215 215 </wsdl:portType> … … 217 217 <wsp:PolicyReference URI="#WSHttpBinding_IUpdateLocation_policy" /> 218 218 <soap12:binding transport="http://schemas.xmlsoap.org/soap/http" /> 219 <wsdl:operation name="GetAvailablePlugins ">220 <soap12:operation soapAction="http://tempuri.org/IUpdateLocation/GetAvailablePlugins " style="document" />219 <wsdl:operation name="GetAvailablePluginsByName"> 220 <soap12:operation soapAction="http://tempuri.org/IUpdateLocation/GetAvailablePluginsByName" style="document" /> 221 221 <wsdl:input> 222 <wsp:PolicyReference URI="#WSHttpBinding_IUpdateLocation_GetAvailablePlugins _Input_policy" />222 <wsp:PolicyReference URI="#WSHttpBinding_IUpdateLocation_GetAvailablePluginsByName_Input_policy" /> 223 223 <soap12:body use="literal" /> 224 224 </wsdl:input> 225 225 <wsdl:output> 226 <wsp:PolicyReference URI="#WSHttpBinding_IUpdateLocation_GetAvailablePlugins _output_policy" />226 <wsp:PolicyReference URI="#WSHttpBinding_IUpdateLocation_GetAvailablePluginsByName_output_policy" /> 227 227 <soap12:body use="literal" /> 228 228 </wsdl:output> 229 229 </wsdl:operation> 230 <wsdl:operation name="GetP ackedPlugin">231 <soap12:operation soapAction="http://tempuri.org/IUpdateLocation/GetP ackedPlugin" style="document" />230 <wsdl:operation name="GetPluginFiles"> 231 <soap12:operation soapAction="http://tempuri.org/IUpdateLocation/GetPluginFiles" style="document" /> 232 232 <wsdl:input> 233 <wsp:PolicyReference URI="#WSHttpBinding_IUpdateLocation_GetP ackedPlugin_Input_policy" />233 <wsp:PolicyReference URI="#WSHttpBinding_IUpdateLocation_GetPluginFiles_Input_policy" /> 234 234 <soap12:body use="literal" /> 235 235 </wsdl:input> 236 236 <wsdl:output> 237 <wsp:PolicyReference URI="#WSHttpBinding_IUpdateLocation_GetP ackedPlugin_output_policy" />237 <wsp:PolicyReference URI="#WSHttpBinding_IUpdateLocation_GetPluginFiles_output_policy" /> 238 238 <soap12:body use="literal" /> 239 239 </wsdl:output> -
branches/PluginInfrastructure Refactoring/HeuristicLab.PluginInfrastructure/Service References/UpdateLocationReference/UpdateLocation.xsd
r2517 r2527 2 2 <xs:schema xmlns:tns="http://tempuri.org/" elementFormDefault="qualified" targetNamespace="http://tempuri.org/" xmlns:xs="http://www.w3.org/2001/XMLSchema"> 3 3 <xs:import schemaLocation="http://localhost:59253/UpdateLocation.svc?xsd=xsd2" namespace="http://schemas.datacontract.org/2004/07/HeuristicLab.Update.Service" /> 4 <xs:import schemaLocation="http://localhost:59253/UpdateLocation.svc?xsd=xsd4" namespace="http://schemas.microsoft.com/Message" /> 5 <xs:element name="GetAvailablePlugins"> 6 <xs:complexType> 7 <xs:sequence /> 8 </xs:complexType> 9 </xs:element> 10 <xs:element name="GetAvailablePluginsResponse"> 4 <xs:import schemaLocation="http://localhost:59253/UpdateLocation.svc?xsd=xsd4" namespace="http://schemas.microsoft.com/2003/10/Serialization/Arrays" /> 5 <xs:element name="GetAvailablePluginsByName"> 11 6 <xs:complexType> 12 7 <xs:sequence> 13 <xs:element xmlns:q1="http://schemas.datacontract.org/2004/07/HeuristicLab.Update.Service" minOccurs="0" name="GetAvailablePluginsResult" nillable="true" type="q1:ArrayOfPluginInformation" />8 <xs:element minOccurs="0" name="name" nillable="true" type="xs:string" /> 14 9 </xs:sequence> 15 10 </xs:complexType> 16 11 </xs:element> 17 <xs:element name="GetPackedPlugin"> 12 <xs:element name="GetAvailablePluginsByNameResponse"> 13 <xs:complexType> 14 <xs:sequence> 15 <xs:element xmlns:q1="http://schemas.datacontract.org/2004/07/HeuristicLab.Update.Service" minOccurs="0" name="GetAvailablePluginsByNameResult" nillable="true" type="q1:ArrayOfPluginInformation" /> 16 </xs:sequence> 17 </xs:complexType> 18 </xs:element> 19 <xs:element name="GetPluginFiles"> 18 20 <xs:complexType> 19 21 <xs:sequence> … … 22 24 </xs:complexType> 23 25 </xs:element> 24 <xs:element name="GetP ackedPluginResponse">26 <xs:element name="GetPluginFilesResponse"> 25 27 <xs:complexType> 26 28 <xs:sequence> 27 <xs:element xmlns:q3="http://schemas.microsoft.com/ Message" name="GetPackedPluginResult" type="q3:StreamBody" />29 <xs:element xmlns:q3="http://schemas.microsoft.com/2003/10/Serialization/Arrays" minOccurs="0" name="GetPluginFilesResult" nillable="true" type="q3:ArrayOfbase64Binary" /> 28 30 </xs:sequence> 29 31 </xs:complexType> -
branches/PluginInfrastructure Refactoring/HeuristicLab.PluginInfrastructure/Service References/UpdateLocationReference/UpdateLocation4.xsd
r2517 r2527 1 1 <?xml version="1.0" encoding="utf-8"?> 2 <xs:schema xmlns:tns="http://schemas.microsoft.com/Message" elementFormDefault="qualified" targetNamespace="http://schemas.microsoft.com/Message" xmlns:xs="http://www.w3.org/2001/XMLSchema"> 3 <xs:simpleType name="StreamBody"> 4 <xs:restriction base="xs:base64Binary" /> 5 </xs:simpleType> 2 <xs:schema xmlns:tns="http://schemas.microsoft.com/2003/10/Serialization/Arrays" elementFormDefault="qualified" targetNamespace="http://schemas.microsoft.com/2003/10/Serialization/Arrays" xmlns:xs="http://www.w3.org/2001/XMLSchema"> 3 <xs:complexType name="ArrayOfbase64Binary"> 4 <xs:sequence> 5 <xs:element minOccurs="0" maxOccurs="unbounded" name="base64Binary" nillable="true" type="xs:base64Binary" /> 6 </xs:sequence> 7 </xs:complexType> 8 <xs:element name="ArrayOfbase64Binary" nillable="true" type="tns:ArrayOfbase64Binary" /> 6 9 </xs:schema> -
branches/PluginInfrastructure Refactoring/HeuristicLab.PluginInfrastructure/Starter/SplashScreen.Designer.cs
r2504 r2527 21 21 22 22 using HeuristicLab.PluginInfrastructure; 23 namespace HeuristicLab.PluginInfrastructure {23 namespace HeuristicLab.PluginInfrastructure.Starter { 24 24 partial class SplashScreen { 25 25 /// <summary> -
branches/PluginInfrastructure Refactoring/HeuristicLab.PluginInfrastructure/Starter/SplashScreen.cs
r2506 r2527 30 30 using HeuristicLab.PluginInfrastructure.Manager; 31 31 32 namespace HeuristicLab.PluginInfrastructure {32 namespace HeuristicLab.PluginInfrastructure.Starter { 33 33 internal partial class SplashScreen : Form { 34 34 private const int FADE_INTERVAL = 50; -
branches/PluginInfrastructure Refactoring/HeuristicLab.PluginInfrastructure/Starter/StarterForm.Designer.cs
r2507 r2527 20 20 #endregion 21 21 22 namespace HeuristicLab.PluginInfrastructure {22 namespace HeuristicLab.PluginInfrastructure.Starter { 23 23 partial class StarterForm { 24 24 /// <summary> -
branches/PluginInfrastructure Refactoring/HeuristicLab.PluginInfrastructure/Starter/StarterForm.cs
r2513 r2527 34 34 using System.IO; 35 35 36 namespace HeuristicLab.PluginInfrastructure {36 namespace HeuristicLab.PluginInfrastructure.Starter { 37 37 public partial class StarterForm : Form { 38 38 … … 45 45 InitializeComponent(); 46 46 47 string pluginPath = Path.GetFullPath( HeuristicLab.PluginInfrastructure.Properties.Settings.Default.PluginDir);47 string pluginPath = Path.GetFullPath(Application.StartupPath); 48 48 pluginManager = new PluginManager(pluginPath); 49 49 SplashScreen splashScreen = new SplashScreen(pluginManager, 1000, "Loading HeuristicLab..."); -
branches/PluginInfrastructure Refactoring/HeuristicLab.PluginInfrastructure/app.config
r2517 r2527 8 8 <applicationSettings> 9 9 <HeuristicLab.PluginInfrastructure.Properties.Settings> 10 <setting name="PluginDir" serializeAs="String">11 <value>plugins</value>12 </setting>13 10 <setting name="User" serializeAs="String"> 14 <value />11 <value>Gabriel Kronberger</value> 15 12 </setting> 16 13 <setting name="Organization" serializeAs="String"> 17 <value /> 14 <value>HEAL</value> 15 </setting> 16 <setting name="UpdateLocations" serializeAs="Xml"> 17 <value> 18 <ArrayOfString xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 19 xmlns:xsd="http://www.w3.org/2001/XMLSchema"> 20 <string>http://localhost:59253/UpdateLocation.svc</string> 21 </ArrayOfString> 22 </value> 18 23 </setting> 19 24 </HeuristicLab.PluginInfrastructure.Properties.Settings>
Note: See TracChangeset
for help on using the changeset viewer.