Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
01/13/12 13:45:51 (13 years ago)
Author:
spimming
Message:

#1680:

  • Methods to add and remove Subscription in CloudManagerClient
  • AddSubscriptionDialog integrated
  • OnContentChanged implemented
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/HeuristicLab.Hive.Azure/HeuristicLab.Clients.Hive.CloudManager/3.3/CloudManagerClient.cs

    r7317 r7324  
    1616    }
    1717
    18     private CloudManagerClient() { }
     18    private CloudManagerClient() {
     19      subscriptions = new ItemList<Subscription>();
     20      azureProvider = new AzureProvider();
     21    }
    1922
    2023    #region Properties
     
    5962
    6063      try {
    61 
     64        IItemList<Subscription> subs = new ItemList<Subscription>(Subscriptions);
     65        // TODO ...
    6266      }
    6367      catch {
     
    7175    #endregion
    7276
     77    public void Add(Subscription subscription) {
     78      if (subscription == null) {
     79        throw new ArgumentNullException("subscription", "Subscription must not be null.");
     80      }
     81      if (Subscriptions.Contains(subscription)) {
     82        Subscriptions.Remove(subscription);
     83      }
     84      Subscriptions.Add(subscription);
     85    }
     86
     87    public void Remove(Subscription subscription) {
     88      if (subscription == null) {
     89        throw new ArgumentNullException("subscription", "Subscription must not be null.");
     90      }
     91      if (Subscriptions.Contains(subscription)) {
     92        Subscriptions.Remove(subscription);
     93      }
     94    }
     95
     96
     97
    7398
    7499  }
Note: See TracChangeset for help on using the changeset viewer.