Validate method

  1. @override
void Validate()
override
Validates this instance.

Implementation

@override
void Validate() {
  super.Validate();

  //  Make sure that if we're on the Exchange2007_SP1 schema version, if any of the following
  //  properties are set or updated:
  //      o   Start
  //      o   End
  //      o   IsAllDayEvent
  //      o   Recurrence
  //  ... then, we must send the MeetingTimeZone element (which is generated from StartTimeZone for
  //  Exchange2007_SP1 requests (see StartTimeZonePropertyDefinition.cs).  If the StartTimeZone isn't
  //  in the property bag, then throw, because clients must supply the proper time zone - either by
  //  loading it from a currently-existing appointment, or by setting it directly.  Otherwise, to dirty
  //  the StartTimeZone property, we just set it to its current value.
  if ((this.Service.RequestedServerVersion ==
          ExchangeVersion.Exchange2007_SP1) &&
      !this.Service.Exchange2007CompatibilityMode) {
//              throw UnimplementedError("Appointment.Validate");
    if (this.PropertyBag.IsPropertyUpdated(AppointmentSchema.Start) ||
        this.PropertyBag.IsPropertyUpdated(AppointmentSchema.End) ||
        this.PropertyBag.IsPropertyUpdated(AppointmentSchema.IsAllDayEvent) ||
        this.PropertyBag.IsPropertyUpdated(AppointmentSchema.Recurrence)) {
      //  If the property isn't in the property bag, throw....
      if (!this.PropertyBag.Contains(AppointmentSchema.StartTimeZone)) {
        // TODO fix Appointment.Validate
//          throw new ServiceLocalException("Strings.StartTimeZoneRequired");
      }

      //  Otherwise, set the time zone to its current value to force it to be sent with the request.
//                    this.StartTimeZone = this.StartTimeZone;
      // TODO fix Appointment.Validate
      print("TODO(fix Appointment.Validate)");
    }
  }
}