Пример #1
0
 protected override void InternalProcessRecord()
 {
     base.InternalProcessRecord();
     if (!base.HasErrors)
     {
         ADObjectId         orgContainerId     = ((IConfigurationSession)base.DataSession).GetOrgContainerId();
         ADObjectId         childId            = orgContainerId.GetChildId(NewExchangeServer.adminGroupContainer).GetChildId(NewExchangeServer.adminGroup).GetChildId(NewExchangeServer.serversContainer);
         ADObjectId         childId2           = childId.GetChildId(this.DataObject.Name);
         ProtocolsContainer protocolsContainer = new ProtocolsContainer();
         ADObjectId         childId3           = childId2.GetChildId(NewExchangeServer.protocolsContainer);
         protocolsContainer.SetId(childId3);
         base.DataSession.Save(protocolsContainer);
         SmtpContainer smtpContainer = new SmtpContainer();
         ADObjectId    childId4      = childId3.GetChildId(NewExchangeServer.smtpContainer);
         smtpContainer.SetId(childId4);
         base.DataSession.Save(smtpContainer);
     }
 }
Пример #2
0
        protected override void InternalProcessRecord()
        {
            ADObjectId         orgContainerId     = ((IConfigurationSession)base.DataSession).GetOrgContainerId();
            ADObjectId         childId            = orgContainerId.GetChildId(NewHttpContainer.adminGroupContainer).GetChildId(NewHttpContainer.adminGroup).GetChildId(NewHttpContainer.serversContainer).GetChildId(this.serverName);
            ProtocolsContainer protocolsContainer = new ProtocolsContainer();
            ADObjectId         childId2           = childId.GetChildId(NewHttpContainer.protocolsContainer);

            protocolsContainer.SetId(childId2);
            try
            {
                base.DataSession.Save(protocolsContainer);
            }
            catch (ADObjectAlreadyExistsException)
            {
            }
            try
            {
                base.InternalProcessRecord();
            }
            catch (ADOperationException)
            {
            }
        }