/// <summary>
 /// Initializes a new instance of the <see cref="HttpUrlParameter"/> class with a specified parameter name and value.
 /// </summary>
 /// <param name="value">The parameter value.</param>
 /// <param name="name">The parameter name.</param>
 public HttpUrlParameter(string name, HttpParameterValue value) : base(HttpParameterType.Url, name, value, null)
 {
     if (String.IsNullOrEmpty(name))
     {
         throw new ArgumentNullException("name");
     }
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="HttpUrlParameter"/> class with a specified parameter name and value.
 /// </summary>
 /// <param name="value">The parameter value.</param>
 /// <param name="name">The parameter name.</param>
 public HttpUrlParameter(string name, HttpParameterValue value) : base(HttpParameterType.Url, name, value, null)
 {
   if (String.IsNullOrEmpty(name))
   {
     throw new ArgumentNullException("name");
   }
 }
Esempio n. 3
0
 /// <summary>
 /// Initializes a new instance of the <see cref="HttpParameter"/> class.
 /// </summary>
 /// <param name="name">The name of the parameter.</param>
 /// <param name="value">The value of the parameter.</param>
 /// <param name="parameterType">The type of the parameter.</param>
 /// <param name="contentType">The content-type of the parameter.</param>
 protected HttpParameter(HttpParameterType parameterType, string name, HttpParameterValue value, string contentType)
 {
     this.ParameterType = parameterType;
     this.Name          = name;
     this.Value         = value;
     this.ContentType   = contentType;
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="HttpParameter"/> class.
 /// </summary>
 /// <param name="name">The name of the parameter.</param>
 /// <param name="value">The value of the parameter.</param>
 /// <param name="parameterType">The type of the parameter.</param>
 /// <param name="contentType">The content-type of the parameter.</param>
 protected HttpParameter(HttpParameterType parameterType, string name, HttpParameterValue value, string contentType)
 {
   this.ParameterType = parameterType;
   this.Name = name;
   this.Value = value;
   this.ContentType = contentType;
 }
Esempio n. 5
0
 /// <summary>
 /// Initializes a new instance of the <see cref="HttpFile"/> class.
 /// </summary>
 /// <param name="fileContent">Content of the file.</param>
 /// <param name="fileName">Name of the file.</param>
 /// <param name="parameterName">The name of the parameter.</param>
 /// <param name="contentType">MIME type of the file.</param>
 public HttpFile(string parameterName, string fileName, string contentType, HttpParameterValue fileContent) : base(HttpParameterType.File, parameterName, fileContent, contentType)
 {
     if (String.IsNullOrEmpty(fileName)) // String.IsNullOrWhiteSpace
     {
         throw new ArgumentNullException("fileName");
     }
     if (String.IsNullOrEmpty(contentType)) // String.IsNullOrWhiteSpace
     {
         contentType = "application/octet-stream";
     }
     this.FileName = fileName;
 }
Esempio n. 6
0
 /// <summary>
 /// Initializes a new instance of the <see cref="HttpFile"/> class.
 /// </summary>
 /// <param name="fileContent">Content of the file.</param>
 /// <param name="fileName">Name of the file.</param>
 /// <param name="parameterName">The name of the parameter.</param>
 /// <param name="contentType">MIME type of the file.</param>
 public HttpFile(string parameterName, string fileName, string contentType, HttpParameterValue fileContent) : base(HttpParameterType.File, parameterName, fileContent, contentType)
 {
   if (String.IsNullOrEmpty(fileName)) // String.IsNullOrWhiteSpace
   {
     throw new ArgumentNullException("fileName");
   }
   if (String.IsNullOrEmpty(contentType)) // String.IsNullOrWhiteSpace
   {
     contentType = "application/octet-stream";
   }
   this.FileName = fileName;
 }
Esempio n. 7
0
 /// <summary>
 /// Initializes a new instance of the <see cref="HttpParameter"/> class.
 /// </summary>
 /// <param name="name">The name of the parameter.</param>
 /// <param name="value">The value of the parameter.</param>
 /// <param name="contentType">The content-type of the parameter.</param>
 internal HttpParameter(string name, HttpParameterValue value, string contentType = null) : this(HttpParameterType.Unformed, name, value, contentType)
 {
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="HttpFormParameter"/> class with a specified parameter name and value.
 /// </summary>
 /// <param name="value">The parameter value.</param>
 /// <param name="name">The parameter name.</param>
 public HttpFormParameter(string name, HttpParameterValue value) : base(HttpParameterType.Form, name, value, null)
 {
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="HttpParameter"/> class.
 /// </summary>
 /// <param name="name">The name of the parameter.</param>
 /// <param name="value">The value of the parameter.</param>
 /// <param name="contentType">The content-type of the parameter.</param>
 internal HttpParameter(string name, HttpParameterValue value, string contentType = null) : this(HttpParameterType.Unformed, name, value, contentType) { }
Esempio n. 10
0
 /// <summary>
 /// Initializes a new instance of the <see cref="HttpFile"/> class.
 /// </summary>
 /// <param name="fileContent">Content of the file.</param>
 /// <param name="fileName">Name of the file.</param>
 /// <param name="parameterName">The name of the parameter.</param>
 public HttpFile(string parameterName, string fileName, HttpParameterValue fileContent) : this(parameterName, fileName, null, fileContent)
 {
 }
Esempio n. 11
0
 /// <summary>
 /// Initializes a new instance of the <see cref="HttpFile"/> class.
 /// </summary>
 /// <param name="fileContent">Content of the file.</param>
 /// <param name="fileName">Name of the file.</param>
 /// <param name="parameterName">The name of the parameter.</param>
 public HttpFile(string parameterName, string fileName, HttpParameterValue fileContent) : this(parameterName, fileName, null, fileContent)
 { }
 /// <summary>
 /// Initializes a new instance of the <see cref="HttpFormParameter"/> class with a specified parameter name and value.
 /// </summary>
 /// <param name="value">The parameter value.</param>
 /// <param name="name">The parameter name.</param>
 public HttpFormParameter(string name, HttpParameterValue value) : base(HttpParameterType.Form, name, value, null) { }