コード例 #1
0
 internal void Run(MeetingComparisonResult comparisonResult, ref Dictionary <GlobalObjectId, List <Attendee> > organizerRumsSent)
 {
     if (!this.SkipItem(ref organizerRumsSent))
     {
         PrimaryConsistencyCheckChain primaryConsistencyCheckChain = ConsistencyCheckFactory.Instance.CreatePrimaryConsistencyCheckChain(this.context, comparisonResult);
         primaryConsistencyCheckChain.PerformChecks(this.context);
         if (primaryConsistencyCheckChain.ShouldTerminate)
         {
             if (RumFactory.Instance.Policy.RepairMode == CalendarRepairType.ValidateOnly && this.context.BaseItem.CalendarItemType == CalendarItemType.RecurringMaster)
             {
                 RecurrenceBlobsConsistentCheck recurrenceBlobsConsistentCheck = new RecurrenceBlobsConsistentCheck(this.context);
                 ConsistencyCheckResult         consistencyCheckResult         = recurrenceBlobsConsistentCheck.Run();
                 if (consistencyCheckResult.ShouldBeReported)
                 {
                     comparisonResult.AddCheckResult(consistencyCheckResult);
                 }
             }
         }
         else
         {
             ConsistencyCheckChain <ConsistencyCheckResult> consistencyCheckChain = ConsistencyCheckFactory.Instance.CreateGeneralConsistencyCheckChain(this.context, comparisonResult, RumFactory.Instance.Policy.RepairMode == CalendarRepairType.ValidateOnly);
             consistencyCheckChain.PerformChecks();
         }
         if (RumFactory.Instance.Policy.RepairMode == CalendarRepairType.RepairAndValidate && comparisonResult.RepairInfo.SendRums(this.context.BaseItem, ref organizerRumsSent))
         {
             this.NumberOfSuccessfulRepairAttempts += 1L;
         }
     }
 }
コード例 #2
0
        internal PrimaryConsistencyCheckChain CreatePrimaryConsistencyCheckChain(CalendarValidationContext context, MeetingComparisonResult comparisonResult)
        {
            PrimaryConsistencyCheckChain primaryConsistencyCheckChain = new PrimaryConsistencyCheckChain(2, comparisonResult);

            primaryConsistencyCheckChain.AddCheck(new CanValidateOwnerCheck(context));
            primaryConsistencyCheckChain.AddCheck(new ValidateStoreObjectCheck(context));
            return(primaryConsistencyCheckChain);
        }