예제 #1
0
 /// <summary>
 /// Creates a new instance of the <see cref="PropertyEncoding"/> class.
 /// </summary>
 /// <param name="contentType">The Content-Type for encoding a specific property.</param>
 /// <param name="headers">The list of headers.</param>
 /// <param name="style"></param>
 /// <param name="options"></param>
 public PropertyEncoding(
     ContentType contentType = default,
     IReadOnlyDictionary <string, Referable <ParameterBody> > headers = default,
     ParameterStyle style            = default,
     PropertyEncodingOptions options = default)
 {
     ContentType = contentType;
     Headers     = headers ?? ReadOnlyDictionary.Empty <string, Referable <ParameterBody> >();
     Style       = style;
     Options     = options;
 }
예제 #2
0
 /// <summary>
 /// Creates a new instance of the <see cref="PropertyEncodingBuilder"/> class.
 /// </summary>
 /// <param name="value">The <see cref="PropertyEncoding"/> to copy values from.</param>
 public PropertyEncodingBuilder(PropertyEncoding value)
 {
     if (value is null)
     {
         throw new ArgumentNullException(nameof(value));
     }
     ContentType = value.ContentType;
     Headers     = new Dictionary <String, Referable <ParameterBody> >(value.Headers);
     Style       = value.Style;
     Options     = value.Options;
 }