コード例 #1
0
 // Token: 0x0600002B RID: 43 RVA: 0x000035DC File Offset: 0x000017DC
 internal override void OnStart()
 {
     lock (ModeratedDLApplication.SyncRoot)
     {
         if (ModeratedDLApplication.refCount == 0)
         {
             MessageTrackingLog.Start("MSGTRKMA");
             Server server = null;
             ADNotificationAdapter.TryRunADOperation(delegate()
             {
                 ITopologyConfigurationSession topologyConfigurationSession = DirectorySessionFactory.Default.CreateTopologyConfigurationSession(ConsistencyMode.IgnoreInvalid, ADSessionSettings.FromRootOrgScopeSet(), 144, "OnStart", "f:\\15.00.1497\\sources\\dev\\Approval\\src\\Applications\\ModeratedDLApplication\\ModeratedDLApplication.cs");
                 this.serverConfigNotificationCookie = ADNotificationAdapter.RegisterChangeNotification <Server>(topologyConfigurationSession.GetOrgContainerId(), new ADNotificationCallback(ModeratedDLApplication.ServerChangeCallback));
                 server = topologyConfigurationSession.ReadLocalServer();
                 Microsoft.Exchange.Data.Directory.SystemConfiguration.AcceptedDomain acceptedDomain = topologyConfigurationSession.GetDefaultAcceptedDomain();
                 if (acceptedDomain != null && acceptedDomain.DomainName.SmtpDomain != null)
                 {
                     this.defaultAcceptedDomain = acceptedDomain.DomainName.SmtpDomain.Domain;
                 }
             });
             if (server == null)
             {
                 ModeratedDLApplication.diag.TraceError((long)this.GetHashCode(), "Cannot read local server for message tracking");
             }
             MessageTrackingLog.Configure(server);
         }
         ModeratedDLApplication.refCount++;
     }
     base.OnStart();
 }
コード例 #2
0
 public void Load(IMbxDeliveryListener submitHandler)
 {
     if (!this.isInitialized)
     {
         DeliveryConfiguration.app.Load();
         this.submitHandler = submitHandler;
         this.ConstructComponentLoadTree();
         DeliveryConfiguration.components.Start(new Components.StopServiceHandler(DeliveryConfiguration.OnStopServiceBecauseOfFailure), false, false, true, true);
         DeliveryConfiguration.components.Continue();
         MessageTrackingLog.Configure(Components.Configuration.LocalServer.TransportServer);
         LatencyTracker.Start(Components.TransportAppConfig.LatencyTracker, ProcessTransportRole.MailboxDelivery);
         this.isInitialized = true;
     }
 }
コード例 #3
0
        // Token: 0x06000032 RID: 50 RVA: 0x0000389C File Offset: 0x00001A9C
        private static void ServerChangeCallback(ADNotificationEventArgs args)
        {
            Server server = null;

            ADNotificationAdapter.TryReadConfiguration <Server>(delegate()
            {
                ITopologyConfigurationSession topologyConfigurationSession = DirectorySessionFactory.Default.CreateTopologyConfigurationSession(ConsistencyMode.IgnoreInvalid, ADSessionSettings.FromRootOrgScopeSet(), 362, "ServerChangeCallback", "f:\\15.00.1497\\sources\\dev\\Approval\\src\\Applications\\ModeratedDLApplication\\ModeratedDLApplication.cs");
                return(topologyConfigurationSession.ReadLocalServer());
            }, out server);
            if (server == null)
            {
                ModeratedDLApplication.diag.TraceError(0L, "Cannot read local server for updating message tracking config. Continue with previous config.");
                return;
            }
            MessageTrackingLog.Configure(server);
        }