Ejemplo n.º 1
0
        protected void DemoteEmailReminders()
        {
            if (base.Context.Method != CalendarMethod.Request && base.Context.Method != CalendarMethod.Publish)
            {
                return;
            }
            Reminders <EventTimeBasedInboxReminder> reminders = Reminders <EventTimeBasedInboxReminder> .Get(this.item, InternalSchema.EventTimeBasedInboxReminders);

            if (reminders != null)
            {
                foreach (EventTimeBasedInboxReminder eventTimeBasedInboxReminder in reminders.ReminderList)
                {
                    TimeSpan minutes = TimeSpan.FromMinutes((double)eventTimeBasedInboxReminder.ReminderOffset).Negate();
                    VAlarm.Demote(base.OutboundContext.Writer, minutes, eventTimeBasedInboxReminder.CustomMessage, this.item.Session.MailboxOwner.MailboxInfo.PrimarySmtpAddress.ToString());
                }
            }
        }
Ejemplo n.º 2
0
        protected void DemoteReminder()
        {
            if (base.Context.Method != CalendarMethod.Request && base.Context.Method != CalendarMethod.Publish)
            {
                return;
            }
            if (!this.item.GetValueOrDefault <bool>(InternalSchema.ReminderIsSetInternal))
            {
                return;
            }
            int?valueAsNullable = this.item.GetValueAsNullable <int>(InternalSchema.ReminderMinutesBeforeStartInternal);

            if (valueAsNullable == null)
            {
                return;
            }
            valueAsNullable = new int?(Reminder.NormalizeMinutesBeforeStart(valueAsNullable.Value, 15));
            TimeSpan minutes = ((double)valueAsNullable.Value != TimeSpan.MinValue.TotalMinutes) ? TimeSpan.FromMinutes((double)valueAsNullable.Value).Negate() : TimeSpan.FromMinutes(-15.0);

            VAlarm.Demote(base.OutboundContext.Writer, minutes, "REMINDER", null);
        }