Ejemplo n.º 1
0
        /// <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));
        }
Ejemplo n.º 2
0
 /// <summary>
 /// Asserts the valid.
 /// </summary>
 internal override void Validate()
 {
     base.Validate();
     EwsUtilities.ValidateNonBlankStringParam(this.NameToResolve, "NameToResolve");
 }
Ejemplo n.º 3
0
 /// <summary>
 /// Validates the request.
 /// </summary>
 internal override void Validate()
 {
     base.Validate();
     EwsUtilities.ValidateNonBlankStringParam(this.SubscriptionId, "SubscriptionId");
     EwsUtilities.ValidateNonBlankStringParam(this.Watermark, "Watermark");
 }