Пример #1
0
        /// <summary>
        /// Executes this request.
        /// </summary>
        /// <returns>Service response.</returns>
        internal async Task <GetUserOofSettingsResponse> Execute(CancellationToken token)
        {
            GetUserOofSettingsResponse serviceResponse = (GetUserOofSettingsResponse)await this.InternalExecuteAsync(token).ConfigureAwait(false);

            serviceResponse.ThrowIfNecessary();

            return(serviceResponse);
        }
        /// <summary>
        /// Executes this request.
        /// </summary>
        /// <returns>Service response.</returns>
        internal GetUserOofSettingsResponse Execute()
        {
            GetUserOofSettingsResponse serviceResponse = (GetUserOofSettingsResponse)this.InternalExecute();

            serviceResponse.ThrowIfNecessary();

            return(serviceResponse);
        }
Пример #3
0
        /// <summary>
        /// Parses the response.
        /// </summary>
        /// <param name="reader">The reader.</param>
        /// <returns>Response object.</returns>
        internal override object ParseResponse(EwsServiceXmlReader reader)
        {
            GetUserOofSettingsResponse serviceResponse = new GetUserOofSettingsResponse();

            serviceResponse.LoadFromXml(reader, XmlElementNames.ResponseMessage);

            if (serviceResponse.ErrorCode == ServiceError.NoError)
            {
                reader.ReadStartElement(XmlNamespace.Types, XmlElementNames.OofSettings);

                serviceResponse.OofSettings = new OofSettings();
                serviceResponse.OofSettings.LoadFromXml(reader, reader.LocalName);

                serviceResponse.OofSettings.AllowExternalOof = reader.ReadElementValue <OofExternalAudience>(
                    XmlNamespace.Messages,
                    XmlElementNames.AllowExternalOof);
            }

            return(serviceResponse);
        }
        /// <summary>
        /// Parses the response.
        /// </summary>
        /// <param name="reader">The reader.</param>
        /// <returns>Response object.</returns>
        internal override object ParseResponse(EwsServiceXmlReader reader)
        {
            GetUserOofSettingsResponse serviceResponse = new GetUserOofSettingsResponse();

            serviceResponse.LoadFromXml(reader, XmlElementNames.ResponseMessage);

            if (serviceResponse.ErrorCode == ServiceError.NoError)
            {
                reader.ReadStartElement(XmlNamespace.Types, XmlElementNames.OofSettings);

                serviceResponse.OofSettings = new OofSettings();
                serviceResponse.OofSettings.LoadFromXml(reader, reader.LocalName);

                serviceResponse.OofSettings.AllowExternalOof = reader.ReadElementValue<OofExternalAudience>(
                    XmlNamespace.Messages,
                    XmlElementNames.AllowExternalOof);
            }

            return serviceResponse;
        }