/// <summary>
 /// Initializes a new instance of the <see cref="ServerBusyException"/> class.
 /// </summary>
 /// <param name="response">The ServiceResponse when service operation failed remotely.</param>
 public ServerBusyException(ServiceResponse response) 
     : base(response)
 {
     if (response.ErrorDetails != null && response.ErrorDetails.ContainsKey(ServerBusyException.BackOffMillisecondsKey))
     {
         Int32.TryParse(response.ErrorDetails[ServerBusyException.BackOffMillisecondsKey], out this.backOffMilliseconds);
     }
 }
 /// <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="ServiceResponseException"/> class.
 /// </summary>
 /// <param name="response">The ServiceResponse when service operation failed remotely.</param>
 internal ServiceResponseException(ServiceResponse response)
 {
     this.response = response;
 }
 /// <summary>
 /// Parses the response.
 /// </summary>
 /// <param name="reader">The reader.</param>
 /// <returns>Response object.</returns>
 internal override object ParseResponse(EwsServiceXmlReader reader)
 {
     ServiceResponse response = new ServiceResponse();
     response.LoadFromXml(reader, GetResponseXmlElementName());
     return response;
 }
 /// <summary>
 /// Parses the response.
 /// </summary>
 /// <param name="reader">The reader.</param>
 /// <returns>Response object.</returns>
 internal override object ParseResponse(EwsServiceXmlReader reader)
 {
     ServiceResponse serviceResponse = new ServiceResponse();
     serviceResponse.LoadFromXml(reader, XmlElementNames.DisconnectPhoneCallResponse);
     return serviceResponse;
 }
        /// <summary>
        /// Parses the response.
        /// </summary>
        /// <param name="reader">The reader.</param>
        /// <returns>Service response.</returns>
        internal override object ParseResponse(EwsServiceXmlReader reader)
        {
            ServiceResponse serviceResponse = new ServiceResponse();

            serviceResponse.LoadFromXml(reader, XmlElementNames.ResponseMessage);

            return serviceResponse;
        }
Exemplo n.º 7
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ServiceResponseException"/> class.
 /// </summary>
 /// <param name="response">The ServiceResponse when service operation failed remotely.</param>
 internal ServiceResponseException(ServiceResponse response)
 {
     this.response = response;
 }
Exemplo n.º 8
0
 /// <summary>
 /// Initializes a new instance of the <see cref="T:Microsoft.Exchange.WebServices.Data.ServiceResponseException"/> class with serialized data.
 /// </summary>
 /// <param name="info">The object that holds the serialized object data.</param>
 /// <param name="context">The contextual information about the source or destination.</param>
 protected ServiceResponseException(SerializationInfo info, StreamingContext context)
     : base(info, context)
 {
     this.response = (ServiceResponse)info.GetValue("Response", typeof(ServiceResponse));
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="T:Microsoft.Exchange.WebServices.Data.UpdateInboxRulesException"/> class with serialized data.
 /// </summary>
 /// <param name="info">The object that holds the serialized object data.</param>
 /// <param name="context">The contextual information about the source or destination.</param>
 private UpdateInboxRulesException(SerializationInfo info, StreamingContext context)
     : base(info, context)
 {
     this.serviceResponse = (ServiceResponse)info.GetValue("ServiceResponse", typeof(ServiceResponse));
     this.errors          = (RuleOperationErrorCollection)info.GetValue("Errors", typeof(RuleOperationErrorCollection));
 }