public UserConfigurationManager.IAggregationContext AttachAggregator(AggregatedUserConfigurationDescriptor aggregatorDescription)
 {
     UserConfigurationManager.AggregationContext aggregationContext = null;
     if (ConfigurationItemSchema.IsEnabledForConfigurationAggregation(this.mailboxSession.MailboxOwner))
     {
         IAggregatedUserConfigurationReader reader = AggregatedUserConfiguration.GetReader(aggregatorDescription, this);
         aggregationContext = new UserConfigurationManager.AggregationContext(this, reader);
         lock (this.aggregators)
         {
             this.aggregators.Add(aggregationContext);
         }
     }
     return(aggregationContext);
 }
 public UserConfigurationManager.IAggregationContext AttachAggregator(UserConfigurationManager.IAggregationContext ictx)
 {
     UserConfigurationManager.AggregationContext aggregationContext = null;
     if (ConfigurationItemSchema.IsEnabledForConfigurationAggregation(this.mailboxSession.MailboxOwner))
     {
         UserConfigurationManager.AggregationContext aggregationContext2 = ictx as UserConfigurationManager.AggregationContext;
         if (aggregationContext2 == null)
         {
             throw new ArgumentException("The shared context must be non-null and have been created by a UserConfigurationManager");
         }
         aggregationContext = aggregationContext2.Clone(this);
         lock (this.aggregators)
         {
             this.aggregators.Add(aggregationContext);
         }
     }
     return(aggregationContext);
 }
Пример #3
0
 private bool IsEnabledForConfigurationAggregation(CoreItem coreItem)
 {
     return(coreItem.Session != null && coreItem.Session.MailboxOwner != null && ConfigurationItemSchema.IsEnabledForConfigurationAggregation(coreItem.Session.MailboxOwner));
 }