Beispiel #1
0
 public AggregationSubscriptionDataProvider(AggregationTaskType taskType, IRecipientSession session, ADUser adUser)
 {
     session.LinkResolutionServer = ADSession.GetCurrentConfigDC(session.SessionSettings.GetAccountOrResourceForestFqdn());
     session.UseGlobalCatalog     = false;
     this.taskType         = taskType;
     this.adUser           = adUser;
     this.recipientSession = session;
     this.aggregationSubscriptionConstraintChecker = new AggregationSubscriptionConstraintChecker();
     if (this.adUser != null)
     {
         try
         {
             this.primaryExchangePrincipal = ExchangePrincipal.FromADUser(this.recipientSession.SessionSettings, this.adUser, RemotingOptions.AllowCrossSite);
         }
         catch (ObjectNotFoundException innerException)
         {
             throw new MailboxFailureException(innerException);
         }
     }
 }
 public ConnectSubscriptionDataProvider(AggregationTaskType taskType, IRecipientSession session, ADUser adUser) : base(taskType, session, adUser)
 {
 }
        public AggregationSubscriptionDataProvider CreateSubscriptionDataProvider(AggregationType aggregationType, AggregationTaskType taskType, IRecipientSession session, ADUser adUser)
        {
            if (aggregationType <= AggregationType.Migration)
            {
                if (aggregationType != AggregationType.Aggregation && aggregationType != AggregationType.Migration)
                {
                    goto IL_33;
                }
            }
            else
            {
                if (aggregationType == AggregationType.PeopleConnection)
                {
                    return(new ConnectSubscriptionDataProvider(taskType, session, adUser));
                }
                if (aggregationType != AggregationType.All)
                {
                    goto IL_33;
                }
            }
            return(new AggregationSubscriptionDataProvider(taskType, session, adUser));

IL_33:
            throw new InvalidOperationException("Invalid Aggregation Type:" + aggregationType);
        }