- Timestamp:
- 04/11/11 15:32:27 (13 years ago)
- Location:
- branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive/3.4
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive/3.4/ExperimentManager/ExperimentManagerClient.cs
r5958 r6000 50 50 } 51 51 52 private IEnumerable<Plugin> onlinePlugins;53 public IEnumerable<Plugin> OnlinePlugins {52 private List<Plugin> onlinePlugins; 53 public List<Plugin> OnlinePlugins { 54 54 get { return onlinePlugins; } 55 55 set { onlinePlugins = value; } -
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive/3.4/PluginUtil.cs
r5958 r6000 24 24 using System.IO; 25 25 using System.Linq; 26 using System.ServiceModel; 26 27 using HeuristicLab.PluginInfrastructure; 27 28 … … 38 39 /// <param name="useLocalPlugins">If true, the plugins which are already online are ignored. All local plugins are uploaded, but only once.</param> 39 40 /// <returns></returns> 40 public static List<Guid> GetPluginDependencies(IHiveService service, IEnumerable<Plugin> onlinePlugins, List<Plugin> alreadyUploadedPlugins, IEnumerable<IPluginDescription> neededPlugins, bool useLocalPlugins) {41 public static List<Guid> GetPluginDependencies(IHiveService service, List<Plugin> onlinePlugins, List<Plugin> alreadyUploadedPlugins, IEnumerable<IPluginDescription> neededPlugins, bool useLocalPlugins) { 41 42 var pluginIds = new List<Guid>(); 42 43 foreach (var neededPlugin in neededPlugins) { 43 Plugin foundPlugin = alreadyUploadedPlugins. SingleOrDefault(p => p.Name == neededPlugin.Name && p.Version == neededPlugin.Version);44 Plugin foundPlugin = alreadyUploadedPlugins.FirstOrDefault(p => p.Name == neededPlugin.Name && p.Version == neededPlugin.Version); 44 45 if (foundPlugin == null) { 45 foundPlugin = onlinePlugins. SingleOrDefault(p => p.Name == neededPlugin.Name && p.Version == neededPlugin.Version);46 foundPlugin = onlinePlugins.FirstOrDefault(p => p.Name == neededPlugin.Name && p.Version == neededPlugin.Version); 46 47 if (useLocalPlugins || foundPlugin == null) { 47 48 Plugin p = CreatePlugin(neededPlugin, useLocalPlugins); 48 49 List<PluginData> pd = CreatePluginDatas(neededPlugin); 49 p.Id = service.AddPlugin(p, pd); 50 alreadyUploadedPlugins.Add(p); 51 pluginIds.Add(p.Id); 50 try { 51 p.Id = service.AddPlugin(p, pd); 52 alreadyUploadedPlugins.Add(p); 53 pluginIds.Add(p.Id); 54 } 55 catch (FaultException<PluginAlreadyExistsFault> fault) { 56 onlinePlugins.Add(service.GetPlugin(fault.Detail.Id)); 57 } 52 58 } else { 53 59 pluginIds.Add(foundPlugin.Id); -
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive/3.4/ServiceClients/HiveServiceClient.cs
r5955 r6000 1673 1673 } 1674 1674 1675 [System.Diagnostics.DebuggerStepThroughAttribute()] 1676 [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Runtime.Serialization", "4.0.0.0")] 1677 [System.Runtime.Serialization.DataContractAttribute(Name="PluginAlreadyExistsFault", Namespace="http://schemas.datacontract.org/2004/07/HeuristicLab.Services.Hive.Common")] 1678 [System.SerializableAttribute()] 1679 public partial class PluginAlreadyExistsFault : object, System.Runtime.Serialization.IExtensibleDataObject, System.ComponentModel.INotifyPropertyChanged 1680 { 1681 1682 [System.NonSerializedAttribute()] 1683 private System.Runtime.Serialization.ExtensionDataObject extensionDataField; 1684 1685 [System.Runtime.Serialization.OptionalFieldAttribute()] 1686 private System.Guid IdField; 1687 1688 public System.Runtime.Serialization.ExtensionDataObject ExtensionData 1689 { 1690 get 1691 { 1692 return this.extensionDataField; 1693 } 1694 set 1695 { 1696 this.extensionDataField = value; 1697 } 1698 } 1699 1700 [System.Runtime.Serialization.DataMemberAttribute()] 1701 public System.Guid Id 1702 { 1703 get 1704 { 1705 return this.IdField; 1706 } 1707 set 1708 { 1709 if ((this.IdField.Equals(value) != true)) 1710 { 1711 this.IdField = value; 1712 this.RaisePropertyChanged("Id"); 1713 } 1714 } 1715 } 1716 1717 public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged; 1718 1719 protected void RaisePropertyChanged(string propertyName) 1720 { 1721 System.ComponentModel.PropertyChangedEventHandler propertyChanged = this.PropertyChanged; 1722 if ((propertyChanged != null)) 1723 { 1724 propertyChanged(this, new System.ComponentModel.PropertyChangedEventArgs(propertyName)); 1725 } 1726 } 1727 } 1728 1675 1729 [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] 1676 1730 [System.ServiceModel.ServiceContractAttribute(ConfigurationName="HeuristicLab.Clients.Hive.IHiveService")] … … 1678 1732 { 1679 1733 1734 [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IHiveService/AddAppointment", ReplyAction="http://tempuri.org/IHiveService/AddAppointmentResponse")] 1735 System.Guid AddAppointment(HeuristicLab.Clients.Hive.Appointment appointment); 1736 1680 1737 [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IHiveService/DeleteAppointment", ReplyAction="http://tempuri.org/IHiveService/DeleteAppointmentResponse")] 1681 1738 void DeleteAppointment(System.Guid appointmentId); … … 1759 1816 System.Collections.Generic.List<HeuristicLab.Clients.Hive.MessageContainer> Heartbeat([System.ServiceModel.MessageParameterAttribute(Name="heartbeat")] HeuristicLab.Clients.Hive.Heartbeat heartbeat1); 1760 1817 1818 [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IHiveService/GetPlugin", ReplyAction="http://tempuri.org/IHiveService/GetPluginResponse")] 1819 HeuristicLab.Clients.Hive.Plugin GetPlugin(System.Guid pluginId); 1820 1761 1821 [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IHiveService/AddPlugin", ReplyAction="http://tempuri.org/IHiveService/AddPluginResponse")] 1822 [System.ServiceModel.FaultContractAttribute(typeof(HeuristicLab.Clients.Hive.PluginAlreadyExistsFault), Action="http://tempuri.org/IHiveService/AddPluginPluginAlreadyExistsFaultFault", Name="PluginAlreadyExistsFault", Namespace="http://schemas.datacontract.org/2004/07/HeuristicLab.Services.Hive.Common")] 1762 1823 System.Guid AddPlugin(HeuristicLab.Clients.Hive.Plugin plugin, System.Collections.Generic.List<HeuristicLab.Clients.Hive.PluginData> pluginData); 1763 1824 … … 1809 1870 [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IHiveService/TriggerLifecycle", ReplyAction="http://tempuri.org/IHiveService/TriggerLifecycleResponse")] 1810 1871 void TriggerLifecycle(bool force); 1811 1812 [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IHiveService/AddAppointment", ReplyAction="http://tempuri.org/IHiveService/AddAppointmentResponse")]1813 System.Guid AddAppointment(HeuristicLab.Clients.Hive.Appointment appointment);1814 1872 } 1815 1873 … … 1848 1906 } 1849 1907 1908 public System.Guid AddAppointment(HeuristicLab.Clients.Hive.Appointment appointment) 1909 { 1910 return base.Channel.AddAppointment(appointment); 1911 } 1912 1850 1913 public void DeleteAppointment(System.Guid appointmentId) 1851 1914 { … … 1983 2046 } 1984 2047 2048 public HeuristicLab.Clients.Hive.Plugin GetPlugin(System.Guid pluginId) 2049 { 2050 return base.Channel.GetPlugin(pluginId); 2051 } 2052 1985 2053 public System.Guid AddPlugin(HeuristicLab.Clients.Hive.Plugin plugin, System.Collections.Generic.List<HeuristicLab.Clients.Hive.PluginData> pluginData) 1986 2054 { … … 2067 2135 base.Channel.TriggerLifecycle(force); 2068 2136 } 2069 2070 public System.Guid AddAppointment(HeuristicLab.Clients.Hive.Appointment appointment)2071 {2072 return base.Channel.AddAppointment(appointment);2073 }2074 2137 } 2075 2138 } -
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive/3.4/ServiceClients/Plugin.cs
r5955 r6000 39 39 return new Plugin(this, cloner); 40 40 } 41 42 public override string ToString() { 43 return string.Format("{0}-{1}", this.Name, this.Version.ToString()) + (this.IsLocal ? ", Local" : string.Empty); 44 } 41 45 } 42 46 }
Note: See TracChangeset
for help on using the changeset viewer.