Пример #1
0
        /// <summary>
        /// Turns on/off the message marking status.
        /// </summary>
        /// <param name="control">Control on/off</param>
        /// <returns>True if the request is successful, otherwise returns false.</returns>
        public async Task <bool> SetMessageMarkingStatusAsync(MessageMarkingStatusEnum control)
        {
            _logger.Debug("WilmaService SetMessageMarkingStatusAsync enter with value: " + control);

            var resp = await _httpClient.GetAsync(GetUrl(STATUS_SETMESSAGEMARKING_URL_POSTFIX_FORMAT, control.ToString().ToLower()));

            if (resp.IsSuccessStatusCode)
            {
                _logger.Debug("WilmaService SetMessageMarkingStatus success.");
                return(true);
            }

            _logger.Debug("WilmaService SetMessageMarkingStatus failed: {0}", resp.StatusCode);
            return(false);
        }
Пример #2
0
        /// <summary>
        /// Turns on/off the message marking status.
        /// </summary>
        /// <param name="control">Control on/off</param>
        /// <returns>True if the request is successful, otherwise returns false.</returns>
        public async Task<bool> SetMessageMarkingStatusAsync(MessageMarkingStatusEnum control)
        {
            _logger.Debug("WilmaService SetMessageMarkingStatusAsync enter with value: " + control);

            var resp = await _httpClient.GetAsync(GetUrl(STATUS_SETMESSAGEMARKING_URL_POSTFIX_FORMAT, control.ToString().ToLower()));
            if (resp.IsSuccessStatusCode)
            {
                _logger.Debug("WilmaService SetMessageMarkingStatus success.");
                return true;
            }

            _logger.Debug("WilmaService SetMessageMarkingStatus failed: {0}", resp.StatusCode);
            return false;
        }