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);
 }
Esempio n. 2
0
 private void PrepareAggregatedUserConfigurationUpdate(CoreItem coreItem)
 {
     if (!coreItem.CoreObjectUpdateContext.ContainsKey(this) && this.IsEnabledForConfigurationAggregation(coreItem))
     {
         IList <IAggregatedUserConfigurationWriter> writers = AggregatedUserConfiguration.GetWriters(AggregatedUserConfigurationSchema.Instance, coreItem.Session as IMailboxSession, coreItem);
         if (writers != null)
         {
             coreItem.CoreObjectUpdateContext[this] = writers;
             foreach (IAggregatedUserConfigurationWriter aggregatedUserConfigurationWriter in writers)
             {
                 aggregatedUserConfigurationWriter.Prepare();
             }
         }
     }
 }