Ejemplo n.º 1
0
        public void RegisterForMsExchangeTransportServiceDeletedEvents()
        {
            if (!this.NeedExplicitDeletedObjectSubscription)
            {
                return;
            }
            ADObjectId rootOrgContainerIdForLocalForest = TransportADNotificationAdapter.GetRootOrgContainerIdForLocalForest();
            ADObjectId childId  = rootOrgContainerIdForLocalForest.GetChildId("Administrative Groups").GetChildId(AdministrativeGroup.DefaultName);
            ADObjectId childId2 = childId.GetChildId(ServersContainer.DefaultName);
            ADObjectId childId3 = childId2.GetChildId(Environment.MachineName).GetChildId(ProtocolsContainer.DefaultName).GetChildId(ReceiveConnector.DefaultName);

            this.RegisterChangeNotificationForDeletedObject <Server>(childId2, new ADNotificationCallback(this.HandleExchangeServerDeleted));
            this.RegisterChangeNotificationForDeletedObject <ReceiveConnector>(childId3, new ADNotificationCallback(this.HandleReceiveConnectorDeleted));
        }
Ejemplo n.º 2
0
        public void RegisterForEdgeTransportEvents()
        {
            if (!this.NeedExplicitDeletedObjectSubscription)
            {
                return;
            }
            ADObjectId rootOrgContainerIdForLocalForest = TransportADNotificationAdapter.GetRootOrgContainerIdForLocalForest();
            ADObjectId childId            = rootOrgContainerIdForLocalForest.GetChildId("Administrative Groups").GetChildId(AdministrativeGroup.DefaultName);
            ADObjectId childId2           = rootOrgContainerIdForLocalForest.GetChildId(AcceptedDomain.AcceptedDomainContainer.Parent.Name);
            ADObjectId childId3           = childId.GetChildId(ServersContainer.DefaultName);
            ADObjectId childId4           = childId2.GetChildId(AcceptedDomain.AcceptedDomainContainer.Name);
            ADObjectId childId5           = childId3.GetChildId(Environment.MachineName).GetChildId(ProtocolsContainer.DefaultName).GetChildId(ReceiveConnector.DefaultName);
            ADObjectId childId6           = rootOrgContainerIdForLocalForest.GetChildId("Global Settings").GetChildId("Internet Message Formats");
            ADObjectId childId7           = childId.GetChildId(DatabasesContainer.DefaultName);
            ADObjectId childId8           = childId2.GetChildId("Rules").GetChildId("TransportVersioned");
            ADObjectId childId9           = childId2.GetChildId("Rules").GetChildId("JournalingVersioned");
            ADObjectId descendantId       = rootOrgContainerIdForLocalForest.GetDescendantId(InterceptorRule.InterceptorRulesContainer);
            ADObjectId childId10          = ADSession.GetConfigurationNamingContextForLocalForest().GetChildId(SitesContainer.DefaultName);
            ADObjectId childId11          = childId10.GetChildId("Inter-Site Transports").GetChildId("IP");
            ADObjectId childId12          = childId.GetChildId(RoutingGroupsContainer.DefaultName).GetChildId(RoutingGroup.DefaultName).GetChildId("Connections");
            ADObjectId parentContainerId  = childId12;
            ADObjectId parentContainerId2 = childId12;

            this.RegisterChangeNotificationForDeletedObject <AcceptedDomain>(childId4, new ADNotificationCallback(this.HandleAcceptedDomainDeleted));
            this.RegisterChangeNotificationForDeletedObject <ADSiteLink>(childId11, new ADNotificationCallback(this.HandleADSiteLinkDeleted));
            this.RegisterChangeNotificationForDeletedObject <DeliveryAgentConnector>(parentContainerId, new ADNotificationCallback(this.HandleDeliveryAgentConnectorDeleted));
            this.RegisterChangeNotificationForDeletedObject <DomainContentConfig>(childId6, new ADNotificationCallback(this.HandleRemoteDomainDeleted));
            this.RegisterChangeNotificationForDeletedObject <ForeignConnector>(parentContainerId2, new ADNotificationCallback(this.HandleForeignConnectorDeleted));
            this.RegisterChangeNotificationForDeletedObject <MailboxDatabase>(childId7, new ADNotificationCallback(this.HandleDatabaseDeleted));
            this.RegisterChangeNotificationForDeletedObject <ReceiveConnector>(childId5, new ADNotificationCallback(this.HandleReceiveConnectorDeleted));
            this.RegisterChangeNotificationForDeletedObject <Server>(childId3, new ADNotificationCallback(this.HandleExchangeServerDeleted));
            this.RegisterChangeNotificationForDeletedObject <SmtpSendConnectorConfig>(childId12, new ADNotificationCallback(this.HandleSmtpSendConnectorDeleted));
            this.RegisterChangeNotificationForDeletedObject <TransportRule>(childId8, new ADNotificationCallback(this.HandleTransportRuleDeleted));
            this.RegisterChangeNotificationForDeletedObject <TransportRule>(childId9, new ADNotificationCallback(this.HandleJournalRuleDeleted));
            this.RegisterChangeNotificationForDeletedObject <InterceptorRule>(descendantId, new ADNotificationCallback(this.HandleInterceptorRuleDeleted));
        }