/// <summary>
        /// A method used by the base class to construct a request class instance.
        /// </summary>
        /// <param name="functionUrl">The request URL to </param>
        /// <param name="options">The query and header options for the request.</param>
        /// <returns>An instance of a specific request class.</returns>
        protected override IMessageCreateReplyRequest CreateRequest(string functionUrl, IEnumerable <Option> options)
        {
            var request = new MessageCreateReplyRequest(functionUrl, this.Client, options);

            if (this.HasParameter("message"))
            {
                request.RequestBody.Message = this.GetParameter <Message>("message");
            }

            if (this.HasParameter("comment"))
            {
                request.RequestBody.Comment = this.GetParameter <string>("comment");
            }

            return(request);
        }
예제 #2
0
        /// <summary>
        /// A method used by the base class to construct a request class instance.
        /// </summary>
        /// <param name="functionUrl">The request URL to </param>
        /// <param name="options">The query and header options for the request.</param>
        /// <returns>An instance of a specific request class.</returns>
        protected override IMessageCreateReplyRequest CreateRequest(string functionUrl, IEnumerable <Option> options)
        {
            var request = new MessageCreateReplyRequest(functionUrl, this.Client, options);

            return(request);
        }