コード例 #1
0
 /// <summary>
 /// Sets the User-Agent header of the request to the specified comment.
 /// </summary>
 /// <param name="comment">The Upgrade header comment.</param>
 /// <returns>An <see cref="IRequest"/> object that represents the request.</returns>
 public static IRequest UserAgent(this IWith @this, string comment)
 => @this.UserAgent(new ProductInfoHeaderValue(comment));
コード例 #2
0
 /// <summary>
 /// Sets the User-Agent header of the request to the specified product name and product version.
 /// </summary>
 /// <param name="productName">The Upgrade header product name.</param>
 /// <param name="productVersion">The Upgrade header product version.</param>
 /// <returns>An <see cref="IRequest"/> object that represents the request.</returns>
 public static IRequest UserAgent(this IWith @this, string productName, string productVersion)
 => @this.UserAgent(new ProductInfoHeaderValue(productName, productVersion));
コード例 #3
0
 /// <summary>
 /// Sets the User-Agent header of the request to the specified product.
 /// </summary>
 /// <param name="product">The Upgrade header product.</param>
 /// <returns>An <see cref="IRequest"/> object that represents the request.</returns>
 public static IRequest UserAgent(this IWith @this, ProductHeaderValue product)
 => @this.UserAgent(new ProductInfoHeaderValue(product));