// Token: 0x06001C09 RID: 7177 RVA: 0x0006DD6C File Offset: 0x0006BF6C
        protected override ValidateAggregatedConfigurationResponse InternalExecute()
        {
            ValidateAggregatedConfigurationResponse report = new ValidateAggregatedConfigurationResponse();
            bool   flag  = false;
            object obj   = ValidateAggregatedConfiguration.RemoveFromValidationCache(base.MailboxIdentityMailboxSession);
            bool   flag2 = obj is bool && (bool)obj;

            UserConfigurationManager.IAggregationContext aggregationContext = obj as UserConfigurationManager.IAggregationContext;
            try
            {
                if (flag2)
                {
                    flag = true;
                    ExTraceGlobals.SessionDataHandlerTracer.TraceDebug((long)this.GetHashCode(), "ValidateAggregatedConfiguration was invoked and the aggregator was recently validated.");
                }
                else if (aggregationContext != null)
                {
                    aggregationContext.Validate(base.MailboxIdentityMailboxSession, delegate(IEnumerable <UserConfigurationDescriptor.MementoClass> faisRebuilt, IEnumerable <string> typesRebuilt)
                    {
                        foreach (UserConfigurationDescriptor.MementoClass mementoClass in faisRebuilt)
                        {
                            report.FaiUpdates.Add(mementoClass.ConfigurationName);
                            OwaSingleCounters.AggregatedUserConfigurationPartsRebuilt.Increment();
                            ExTraceGlobals.SessionDataHandlerTracer.TraceError <string>((long)this.GetHashCode(), "error found in configuration type {0}", mementoClass.ConfigurationName);
                        }
                        foreach (string item in typesRebuilt)
                        {
                            report.TypeUpdates.Add(item);
                        }
                    });
                    flag = true;
                }
                if (flag)
                {
                    ValidateAggregatedConfiguration.AddToValidationCache(base.MailboxIdentityMailboxSession, true);
                    report.IsValidated = true;
                }
            }
            finally
            {
                DisposeGuard.DisposeIfPresent(aggregationContext);
            }
            return(report);
        }
예제 #2
0
        private void ValidateAndDisposeAggregatedConfiguration(UserConfigurationManager.IAggregationContext aggregator, MailboxSession session)
        {
            bool flag = true;

            try
            {
                if (aggregator != null)
                {
                    aggregator.Detach();
                    if (!base.CallContext.HasDeviceHeaders)
                    {
                        ValidateAggregatedConfiguration.AddToValidationCache(session, aggregator);
                        flag = false;
                    }
                    else
                    {
                        flag = true;
                        ExTraceGlobals.CoreTracer.TraceDebug((long)this.GetHashCode(), "user configuration being requested by an offline action.");
                        object obj   = ValidateAggregatedConfiguration.RemoveFromValidationCache(session);
                        bool   flag2 = obj is bool && (bool)obj;
                        if (flag2)
                        {
                            ExTraceGlobals.CoreTracer.TraceDebug((long)this.GetHashCode(), "aggregated configuration was already validated during boot.");
                        }
                        else
                        {
                            DisposeGuard.DisposeIfPresent(obj as IDisposable);
                            ExTraceGlobals.CoreTracer.TraceDebug((long)this.GetHashCode(), "aggregated configuration was not validated during boot. validating now.");
                            aggregator.Validate(session, delegate(IEnumerable <UserConfigurationDescriptor.MementoClass> param0, IEnumerable <string> param1)
                            {
                            });
                        }
                        ValidateAggregatedConfiguration.AddToValidationCache(session, true);
                    }
                }
            }
            finally
            {
                if (flag)
                {
                    DisposeGuard.DisposeIfPresent(aggregator);
                }
            }
        }