/// <summary>
        /// Updates the given <see cref="formatter"/>'s set of <see cref="MediaTypeMapping"/> elements
        /// so that it associates the <paramref name="mediaType"/> with <see cref="Uri"/>s containing
        /// a specific query parameter and value.
        /// </summary>
        /// <param name="formatter">The <see cref="MediaTypeFormatter"/> to receive the new <see cref="QueryStringMapping"/> item.</param>
        /// <param name="queryStringParameterName">The name of the query parameter.</param>
        /// <param name="queryStringParameterValue">The value assigned to that query parameter.</param>
        /// <param name="mediaType">The <see cref="MediaTypeHeaderValue"/> to associate 
        /// with a <see cref="Uri"/> containing a query string matching <see cref="queryStringParameterName"/> 
        /// and <see cref="queryStringParameterValue"/>.</param>
        public static void AddQueryStringMapping(
            this MediaTypeFormatter formatter,
            string queryStringParameterName,
            string queryStringParameterValue,
            MediaTypeHeaderValue mediaType)
        {
            if (formatter == null)
            {
                throw Fx.Exception.ArgumentNull("formatter");
            }

            QueryStringMapping mapping = new QueryStringMapping(queryStringParameterName, queryStringParameterValue, mediaType);
            formatter.MediaTypeMappings.Add(mapping);
        }
        /// <summary>
        /// Updates the given <see cref="formatter"/>'s set of <see cref="MediaTypeMapping"/> elements
        /// so that it associates the <paramref name="mediaType"/> with <see cref="Uri"/>s containing
        /// a specific query parameter and value.
        /// </summary>
        /// <param name="formatter">The <see cref="MediaTypeFormatter"/> to receive the new <see cref="QueryStringMapping"/> item.</param>
        /// <param name="queryStringParameterName">The name of the query parameter.</param>
        /// <param name="queryStringParameterValue">The value assigned to that query parameter.</param>
        /// <param name="mediaType">The media type to associate
        /// with a <see cref="Uri"/> containing a query string matching <see cref="queryStringParameterName"/>
        /// and <see cref="queryStringParameterValue"/>.</param>
        public static void AddQueryStringMapping(
            this MediaTypeFormatter formatter,
            string queryStringParameterName,
            string queryStringParameterValue,
            string mediaType)
        {
            if (formatter == null)
            {
                throw Fx.Exception.ArgumentNull("formatter");
            }

            QueryStringMapping mapping = new QueryStringMapping(queryStringParameterName, queryStringParameterValue, mediaType);

            formatter.MediaTypeMappings.Add(mapping);
        }