/// <summary> /// Parses the response. /// </summary> /// <param name="reader">The reader.</param> /// <returns>Response object.</returns> internal override object ParseResponse(EwsServiceXmlReader reader) { UpdateInboxRulesResponse response = new UpdateInboxRulesResponse(); response.LoadFromXml(reader, XmlElementNames.UpdateInboxRulesResponse); return(response); }
/// <summary> /// Executes this request. /// </summary> /// <returns>Service response.</returns> internal async Task <UpdateInboxRulesResponse> Execute() { UpdateInboxRulesResponse serviceResponse = (UpdateInboxRulesResponse)await this.InternalExecuteAsync().ConfigureAwait(false); if (serviceResponse.Result == ServiceResult.Error) { throw new UpdateInboxRulesException(serviceResponse, this.inboxRuleOperations.GetEnumerator()); } return(serviceResponse); }
/// <summary> /// Initializes a new instance of the <see cref="UpdateInboxRulesException"/> class. /// </summary> /// <param name="serviceResponse">The rule operation service response.</param> /// <param name="ruleOperations">The original operations.</param> internal UpdateInboxRulesException(UpdateInboxRulesResponse serviceResponse, IEnumerator <RuleOperation> ruleOperations) : base() { this.serviceResponse = serviceResponse; this.errors = serviceResponse.Errors; foreach (RuleOperationError error in this.errors) { error.SetOperationByIndex(ruleOperations); } }
/// <summary> /// Initializes a new instance of the <see cref="UpdateInboxRulesException"/> class. /// </summary> /// <param name="serviceResponse">The rule operation service response.</param> /// <param name="ruleOperations">The original operations.</param> internal UpdateInboxRulesException(UpdateInboxRulesResponse serviceResponse, IEnumerator<RuleOperation> ruleOperations) : base() { this.serviceResponse = serviceResponse; this.errors = serviceResponse.Errors; foreach (RuleOperationError error in this.errors) { error.SetOperationByIndex(ruleOperations); } }
/// <summary> /// Executes this request. /// </summary> /// <returns>Service response.</returns> internal UpdateInboxRulesResponse Execute() { UpdateInboxRulesResponse serviceResponse = (UpdateInboxRulesResponse)this.InternalExecute(); if (serviceResponse.Result == ServiceResult.Error) { throw new UpdateInboxRulesException(serviceResponse, this.inboxRuleOperations.GetEnumerator()); } return(serviceResponse); }
/// <summary> /// Parses the response. /// </summary> /// <param name="reader">The reader.</param> /// <returns>Response object.</returns> internal override object ParseResponse(EwsServiceXmlReader reader) { UpdateInboxRulesResponse response = new UpdateInboxRulesResponse(); response.LoadFromXml(reader, XmlElementNames.UpdateInboxRulesResponse); return response; }