public ADNotificationRequestCookie RegisterForJournalRuleNotifications(ADObjectId baseDN, ADNotificationCallback callback) { ADNotificationRequestCookie result = ADNotificationAdapter.RegisterChangeNotification <TransportRule>(baseDN, callback); if (this.NeedExplicitDeletedObjectSubscription) { this.VerifyRootWasRegistered <TransportRule>(); } return(result); }
public ADNotificationRequestCookie RegisterForRemoteDomainNotifications(ADObjectId baseDN, ADNotificationCallback callback) { ADNotificationRequestCookie result = ADNotificationAdapter.RegisterChangeNotification <DomainContentConfig>(baseDN, callback); if (this.NeedExplicitDeletedObjectSubscription) { this.VerifyRootWasRegistered <DomainContentConfig>(); } return(result); }
public ADNotificationRequestCookie RegisterForLocalServerReceiveConnectorNotifications(ADObjectId baseDN, ADNotificationCallback callback) { ADNotificationRequestCookie result = ADNotificationAdapter.RegisterChangeNotification <ReceiveConnector>(baseDN, callback); if (this.NeedExplicitDeletedObjectSubscription) { this.VerifyRootWasRegistered <ReceiveConnector>(); } return(result); }
public static ADOperationResult TryRegisterNotifications(Func <ADObjectId> baseDNGetter, ADNotificationCallback callback, TransportADNotificationAdapter.TransportADNotificationRegister registerDelegate, int retryCount, out ADNotificationRequestCookie cookie) { ADNotificationRequestCookie adCookie = null; ADOperationResult result = ADNotificationAdapter.TryRunADOperation(delegate() { ADObjectId root = (baseDNGetter == null) ? null : baseDNGetter(); adCookie = registerDelegate(root, callback); }, retryCount); cookie = adCookie; return(result); }
public ADNotificationRequestCookie RegisterForMailGatewayNotifications(ADObjectId rootId, ADNotificationCallback callback) { ADNotificationRequestCookie result = ADNotificationAdapter.RegisterChangeNotification <MailGateway>(rootId, callback); if (this.NeedExplicitDeletedObjectSubscription) { this.VerifyRootWasRegistered <SmtpSendConnectorConfig>(); this.VerifyRootWasRegistered <DeliveryAgentConnector>(); this.VerifyRootWasRegistered <ForeignConnector>(); } return(result); }
protected override ADNotificationRequestCookie Register(IConfigurationSession session) { ADNotificationRequestCookie request = ADNotificationAdapter.RegisterChangeNotification <PolicyTipMessageConfig>(PerTenantPolicyNudgeRulesCollection.GetPolicyTipMessageConfigsContainerId(session), new ADNotificationCallback(base.ChangeCallback), session); ADNotificationRequestCookie result; try { result = ADNotificationAdapter.RegisterChangeNotification <TransportRule>(PerTenantPolicyNudgeRulesCollection.GetPolicyNudgeRuleContainerId(session), new ADNotificationCallback(base.ChangeCallback), session); } catch (Exception ex) { ADNotificationAdapter.UnregisterChangeNotification(request); throw ex; } return(result); }
// Token: 0x06000002 RID: 2 RVA: 0x000020F4 File Offset: 0x000002F4 public override void Work() { Servicelet.Tracer.TraceDebug((long)this.GetHashCode(), "Work(): Entering"); this.session = DirectorySessionFactory.Default.CreateTopologyConfigurationSession(ConsistencyMode.PartiallyConsistent, ADSessionSettings.FromRootOrgScopeSet(), 104, "Work", "f:\\15.00.1497\\sources\\dev\\Management\\src\\ServiceHost\\Servicelets\\CertificateDeployment\\Program\\CertificateDeploymentServicelet.cs"); try { this.localServer = this.session.FindLocalServer(); } catch (LocalServerNotFoundException ex) { Servicelet.Tracer.TraceError <LocalServerNotFoundException>((long)this.GetHashCode(), "LocalServerNotFound: {0}", ex); this.eventLogger.LogEvent(MSExchangeCertificateDeploymentEventLogConstants.Tuple_PermanentException, null, new object[] { ex }); return; } ADNotificationRequestCookie adnotificationRequestCookie = null; ADNotificationRequestCookie adnotificationRequestCookie2 = null; try { this.distributionTimer = new GuardedTimer(new TimerCallback(this.DoScheduledWork), null, Servicelet.NotificationDelay, Servicelet.ReloadDelay); adnotificationRequestCookie = this.InstallConfigMonitor <FederationTrust>("Federation Trusts"); adnotificationRequestCookie2 = this.InstallConfigMonitor <AuthConfig>(AuthConfig.ContainerName); base.StopEvent.WaitOne(); Servicelet.Tracer.TraceDebug((long)this.GetHashCode(), "Work(): Exiting"); } finally { if (adnotificationRequestCookie != null) { ADNotificationAdapter.UnregisterChangeNotification(adnotificationRequestCookie); } if (adnotificationRequestCookie2 != null) { ADNotificationAdapter.UnregisterChangeNotification(adnotificationRequestCookie2); } if (this.distributionTimer != null) { this.distributionTimer.Dispose(false); } } }
// Token: 0x06000003 RID: 3 RVA: 0x0000227C File Offset: 0x0000047C private ADNotificationRequestCookie InstallConfigMonitor <T>(string containerName) where T : ADConfigurationObject, new() { ADNotificationRequestCookie notificationCookie = null; ADOperationResult adoperationResult = ADNotificationAdapter.TryRunADOperation(delegate() { ADObjectId childId = this.session.GetOrgContainerId().GetChildId(containerName); notificationCookie = ADNotificationAdapter.RegisterChangeNotification <T>(childId, new ADNotificationCallback(this.ChangeNotificationDispatch)); }, 3); if (!adoperationResult.Succeeded) { Servicelet.Tracer.TraceError <Exception>((long)this.GetHashCode(), "Notification Registration Failed: {0}", adoperationResult.Exception); this.eventLogger.LogEvent(MSExchangeCertificateDeploymentEventLogConstants.Tuple_NotificationException, null, new object[] { adoperationResult.Exception }); } return(notificationCookie); }
public void UnregisterChangeNotification(ADNotificationRequestCookie cookie) { ADNotificationAdapter.UnregisterChangeNotification(cookie); }