/// <summary> /// Validates FolderId against a specified request version. /// </summary> /// <param name="version">The version.</param> internal void Validate(ExchangeVersion version) { // The FolderName property is a WellKnownFolderName, an enumeration type. If the property // is set, make sure that the value is valid for the request version. if (this.FolderName.HasValue) { EwsUtilities.ValidateEnumVersionValue(this.FolderName.Value, version); } }
/// <summary> /// Validates this view. /// </summary> /// <param name="request">The request using this view.</param> internal override void InternalValidate(ServiceRequestBase request) { base.InternalValidate(request); if (this.ViewFilter.HasValue) { EwsUtilities.ValidateEnumVersionValue(this.viewFilter, request.Service.RequestedServerVersion); } }
/// <summary> /// Validates this instance. /// </summary> internal override void Validate() { base.Validate(); object fileAsMapping; if (this.TryGetProperty(ContactSchema.FileAsMapping, out fileAsMapping)) { // FileAsMapping is extended by 5 new values in 2010 mode. Validate that they are used according the version. EwsUtilities.ValidateEnumVersionValue((FileAsMapping)fileAsMapping, this.Service.RequestedServerVersion); } }
void InternalValidate(ServiceRequestBase request) { super.InternalValidate();request); if (this.Traversal.HasValue) { EwsUtilities.ValidateEnumVersionValue(this.traversal, request.Service.RequestedServerVersion); } if (this.ViewFilter.HasValue) { EwsUtilities.ValidateEnumVersionValue(this.viewFilter, request.Service.RequestedServerVersion); } }
/// <summary> /// Validate request. /// </summary> internal override void Validate() { base.Validate(); EwsUtilities.ValidateParamCollection(this.DelegateUsers, "DelegateUsers"); foreach (DelegateUser delegateUser in this.DelegateUsers) { delegateUser.ValidateUpdateDelegate(); } if (this.MeetingRequestsDeliveryScope.HasValue) { EwsUtilities.ValidateEnumVersionValue(this.MeetingRequestsDeliveryScope.Value, this.Service.RequestedServerVersion); } }
/// <summary> /// Validate request. /// </summary> internal override void Validate() { base.Validate(); EwsUtilities.ValidateParam(this.FolderIds, "FolderIds"); EwsUtilities.ValidateParamCollection(this.EventTypes, "EventTypes"); this.FolderIds.Validate(this.Service.RequestedServerVersion); // Check that caller isn't trying to subscribe to Status events. if (this.EventTypes.Count <EventType>(eventType => (eventType == EventType.Status)) > 0) { throw new ServiceValidationException(Strings.CannotSubscribeToStatusEvents); } // If Watermark was specified, make sure it's not a blank string. if (!string.IsNullOrEmpty(this.Watermark)) { EwsUtilities.ValidateNonBlankStringParam(this.Watermark, "Watermark"); } this.EventTypes.ForEach(eventType => EwsUtilities.ValidateEnumVersionValue(eventType, this.Service.RequestedServerVersion)); }
/// <summary> /// Validates this view. /// </summary> /// <param name="request">The request using this view.</param> internal override void InternalValidate(ServiceRequestBase request) { base.InternalValidate(request); EwsUtilities.ValidateEnumVersionValue(this.traversal, request.Service.RequestedServerVersion); }