Changeset 7433 for branches/HeuristicLab.Hive.Azure/HeuristicLab.Clients.Hive.CloudManager/3.3/Model
- Timestamp:
- 01/31/12 15:25:18 (13 years ago)
- Location:
- branches/HeuristicLab.Hive.Azure/HeuristicLab.Clients.Hive.CloudManager/3.3/Model
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HeuristicLab.Hive.Azure/HeuristicLab.Clients.Hive.CloudManager/3.3/Model/Deployment.cs
r7429 r7433 99 99 //this.Modified = deployment.Modified; 100 100 //this.NewInstanceCount = deployment.NewInstanceCount; 101 102 if (!this.Modified) { 103 this.Modified = deployment.Modified; 104 this.NewInstanceCount = deployment.NewInstanceCount; 105 } 101 106 } 102 107 } -
branches/HeuristicLab.Hive.Azure/HeuristicLab.Clients.Hive.CloudManager/3.3/Model/HostedService.cs
r7402 r7433 20 20 #endregion 21 21 22 using System; 22 23 using System.Collections.Generic; 23 24 using HeuristicLab.Common; … … 61 62 return new HostedService(this, cloner); 62 63 } 64 65 public void Merge(HostedService hostedService) { 66 if (!this.Equals(hostedService)) { 67 throw new ArgumentException("Objects must be equal to be merged.", "subscription"); 68 } 69 this.ServiceName = hostedService.ServiceName; 70 this.Url = hostedService.Url; 71 this.Subscription = hostedService.Subscription; 72 this.HostedServiceProperties = hostedService.HostedServiceProperties; 73 74 foreach (Deployment dep in hostedService.Deployments) { 75 int idx = this.Deployments.IndexOf(dep); 76 if (idx != -1) { 77 this.Deployments[idx].Merge(dep); 78 } else { 79 this.Deployments.Add(dep); 80 } 81 } 82 83 foreach (Deployment dep in this.Deployments) { 84 int idx = hostedService.Deployments.IndexOf(dep); 85 if (idx == -1) { 86 this.Deployments.Remove(dep); 87 } 88 } 89 } 63 90 } 64 91 }
Note: See TracChangeset
for help on using the changeset viewer.