Exemplo n.º 1
0
        internal virtual RumInfo CreateRumInfo(CalendarValidationContext context, IList <Attendee> attendees)
        {
            switch (this.Flag)
            {
            case CalendarInconsistencyFlag.None:
            case CalendarInconsistencyFlag.StoreObjectValidation:
            case CalendarInconsistencyFlag.StorageException:
            case CalendarInconsistencyFlag.UserNotFound:
            case CalendarInconsistencyFlag.LegacyUser:
            case CalendarInconsistencyFlag.LargeDL:
            case CalendarInconsistencyFlag.RecurrenceAnomaly:
            case CalendarInconsistencyFlag.RecurringException:
            case CalendarInconsistencyFlag.ModifiedOccurrenceMatch:
            case CalendarInconsistencyFlag.DuplicatedItem:
            case CalendarInconsistencyFlag.MissingCvs:
                return(NullOpRumInfo.CreateInstance());

            case CalendarInconsistencyFlag.VersionInfo:
            case CalendarInconsistencyFlag.TimeOverlap:
            case CalendarInconsistencyFlag.StartTime:
            case CalendarInconsistencyFlag.EndTime:
            case CalendarInconsistencyFlag.StartTimeZone:
            case CalendarInconsistencyFlag.RecurringTimeZone:
            case CalendarInconsistencyFlag.Location:
            case CalendarInconsistencyFlag.RecurrenceBlob:
            case CalendarInconsistencyFlag.MissingOccurrenceDeletion:
                return(UpdateRumInfo.CreateMasterInstance(attendees, this.Flag));
            }
            throw new NotImplementedException(string.Format("Unrecognized inconsistency: {0}", this.Flag));
        }
        internal override RumInfo CreateRumInfo(CalendarValidationContext context, IList <Attendee> attendees)
        {
            CalendarInconsistencyFlag flag = base.Flag;

            if (flag != CalendarInconsistencyFlag.Cancellation)
            {
                return(base.CreateRumInfo(context, attendees));
            }
            bool flag2;

            if (!bool.TryParse(this.ExpectedValue, out flag2))
            {
                throw new ArgumentException("Expected value for cancellation inconsistency should be Boolean.", "inconsistency.ExpectedValue");
            }
            if (flag2)
            {
                return(CancellationRumInfo.CreateMasterInstance(attendees));
            }
            return(UpdateRumInfo.CreateMasterInstance(attendees, base.Flag));
        }