Validate method
Validate request.
Implementation
@override
void Validate() {
super.Validate();
EwsUtilities.ValidateParam(this.PropertySet, "PropertySet");
EwsUtilities.ValidateParam(this.SyncFolderId, "SyncFolderId");
this
.SyncFolderId!
.ValidateExchangeVersion(this.Service.RequestedServerVersion);
// SyncFolderItemsScope enum was introduced with Exchange2010. Only
// value NormalItems is valid with previous server versions.
if (this.Service.RequestedServerVersion.index <
ExchangeVersion.Exchange2010.index &&
this._syncScope != SyncFolderItemsScope.NormalItems) {
throw new ServiceVersionException("""string.Format(
Strings.EnumValueIncompatibleWithRequestVersion,
this.syncScope.ToString(),
this.syncScope.GetType().Name,
ExchangeVersion.Exchange2010)""");
}
// NumberOfDays was introduced with Exchange 2013.
if (this.Service.RequestedServerVersion.index <
ExchangeVersion.Exchange2013.index &&
this.NumberOfDays != 0) {
throw new ServiceVersionException("""string.Format(
Strings.ParameterIncompatibleWithRequestVersion,
"numberOfDays",
ExchangeVersion.Exchange2013)""");
}
// SyncFolderItems can only handle summary properties
this.PropertySet!.ValidateForRequest(this, true /*summaryPropertiesOnly*/);
}