public void UpdateDomain(Domain domain)
 {
     try
     {
         Store.Domains.Update(domain);
     }
     catch (Exception ex)
     {
         throw CreateFault("UpdateDomain", ex);
     }
 }
 public Domain AddDomain(Domain domain)
 {
     try
     {
         return Store.Domains.Add(domain);
     }
     catch (Exception ex)
     {
         throw CreateFault("AddDomain", ex);
     }
 }
Exemple #3
0
 internal void ApplyChanges(Domain source)
 {
     this.Status = source.Status;
     this.AgentName = source.AgentName;
     this.UpdateDate = DateTimeHelper.Now;
 }
Exemple #4
0
 internal void CopyFixed(Domain source)
 {
     this.ID = source.ID;
     this.CreateDate = source.CreateDate;
     this.Name = source.Name;
     this.UpdateDate = source.UpdateDate;
 }
Exemple #5
0
 public void Delete(Domain domain)
 {
     // TODO: this should be moved to the server-side implementation to hide this detail from the client
     new AddressManagerClient().RemoveDomainAddresses(domain.ID);
     Client.RemoveDomain(domain.Name);
 }
Exemple #6
0
 public Domain Update(Domain domain)
 {
     Client.UpdateDomain(domain);
     domain.UpdateDate = DateTimeHelper.Now;
     return domain;
 }
Exemple #7
0
 public Domain Add(Domain domain)
 {
     return Client.AddDomain(domain);
 }
Exemple #8
0
        public HttpResponseMessage RemoveDomain(Domain domain)
        {
            try
            {
                _configStore.Domains.Remove(domain.Name);

                return Request.CreateResponse(HttpStatusCode.OK);
            }
            catch (Exception ex)
            {
                _logger.Info("RemoveDomain failed with exception.", ex);
                return Request.CreateResponse(HttpStatusCode.InternalServerError);
            }
        }