コード例 #1
0
 /// <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);
     }
 }
コード例 #2
0
 /// <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);
     }
 }
コード例 #3
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;
 }
コード例 #4
0
 /// <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;
 }
コード例 #5
0
 /// <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;
 }
コード例 #6
0
        /// <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;
        }
コード例 #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;
 }
コード例 #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));
 }
コード例 #9
0
 /// <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));
 }