/// <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 IMessageCreateForwardRequest CreateRequest(string functionUrl, IEnumerable <Option> options)
        {
            var request = new MessageCreateForwardRequest(functionUrl, this.Client, options);

            if (this.HasParameter("toRecipients"))
            {
                request.RequestBody.ToRecipients = this.GetParameter <IEnumerable <Recipient> >("toRecipients");
            }

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

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

            return(request);
        }
Exemple #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 IMessageCreateForwardRequest CreateRequest(string functionUrl, IEnumerable <Option> options)
        {
            var request = new MessageCreateForwardRequest(functionUrl, this.Client, options);

            return(request);
        }